Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

index.htm 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. {include file="public/layout" /}
  2. <body class="bodysy-w">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div id="page_div" class="page" style="margin-top: 15px;min-width: auto;box-shadow:none;">
  6. <div class="flexigrid" {eq name='$Request.param.archives' value='1'}style="margin-top: 0px;"{/eq}>
  7. <div class="mDiv" {eq name='$Request.param.archives' value='1'}style="padding: 5px 0px;"{/eq}>
  8. <div class="ftitle">
  9. {eq name="'Guestbook@ajax_excel_export'|is_check_access" value="1"}
  10. <div class="fbutton">
  11. {if condition="$Request.param.typeid > 0"}
  12. <a href="javascript:void(0);" onclick="excel_export(this, 'ids');" data-url="{:url('Guestbook/ajax_excel_export')}">
  13. <div class="add">
  14. <span><i class="fa fa-reply"></i>导出Excel</span>
  15. </div>
  16. </a>
  17. {else /}
  18. <a href="javascript:void(0);" onclick="showErrorMsg('请指定所属栏目!');">
  19. <div class="add">
  20. <span><i class="fa fa-reply"></i>导出Excel</span>
  21. </div>
  22. </a>
  23. {/if}
  24. </div>
  25. {/eq}
  26. </div>
  27. <form class="navbar-form form-inline" action="{:url('Guestbook/index')}" method="get" onsubmit="layer_loading('正在处理');">
  28. {$searchform.hidden|default=''}
  29. <div class="sDiv">
  30. <div class="sDiv2">
  31. <input type="text" name="add_time_begin" id="add_time_begin" value="{$Request.param.add_time_begin}" class="qsbox" autocomplete="off" placeholder="起始日期">
  32. </div>
  33. &nbsp;至&nbsp;
  34. <div class="sDiv2">
  35. <input type="text" name="add_time_end" id="add_time_end" value="{$Request.param.add_time_end}" class="qsbox" autocomplete="off" placeholder="结束日期">
  36. </div>
  37. <div class="sDiv2">
  38. <input type="hidden" name="typeid" id="typeid" value="{$Request.param.typeid|default=''}">
  39. <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="模糊搜索...">
  40. <input type="submit" class="btn" value="搜索">
  41. <i class="iconfont e-sousuo"></i>
  42. </div>
  43. </div>
  44. </form>
  45. </div>
  46. <div class="hDiv">
  47. <div class="hDivBox">
  48. <table cellspacing="0" cellpadding="0" style="width: 100%;">
  49. <thead>
  50. <tr>
  51. <th class="sign w40" axis="col0">
  52. <div class="tc w40"><input type="checkbox" autocomplete="off" class="checkAll"></div>
  53. </th>
  54. <th abbr="article_show" axis="col5" class="w50">
  55. <div class="tc">ID</div>
  56. </th>
  57. {volist name="tab_list" id="vo1"}
  58. {if condition="$i elt 4" }
  59. {if $i == 1}
  60. <th abbr="ac_id" axis="col4">
  61. <div class="text-l10">{$vo1.attr_name}</div>
  62. </th>
  63. {else /}
  64. <th abbr="article_show" axis="col5" class="w150">
  65. <div class="tc">{$vo1.attr_name}</div>
  66. </th>
  67. {/if}
  68. {/if}
  69. {/volist}
  70. {empty name='$tab_list'}
  71. <th abbr="ac_id" axis="col4">
  72. <div class="text-l10">所属栏目</div>
  73. </th>
  74. {else /}
  75. <th abbr="article_time" axis="col6" class="w100">
  76. <div class="tc">所属栏目</div>
  77. </th>
  78. {/empty}
  79. <th abbr="article_time" axis="col6" class="w50">
  80. <div class="tc">查阅</div>
  81. </th>
  82. <th abbr="article_time" axis="col6" class="w160">
  83. <div class="tc">新增时间</div>
  84. </th>
  85. <th axis="col1" class="w120">
  86. <div class="tc">操作</div>
  87. </th>
  88. </tr>
  89. </thead>
  90. </table>
  91. </div>
  92. </div>
  93. <div class="bDiv" style="height: auto;">
  94. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  95. <table style="width: 100%;">
  96. <tbody>
  97. {empty name="list"}
  98. <tr>
  99. <td class="no-data" align="center" axis="col0" colspan="50">
  100. <div class="no_row">
  101. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  102. </div>
  103. </td>
  104. </tr>
  105. {else/}
  106. {foreach name="list" item="vo" key="k" }
  107. <tr>
  108. <td class="sign">
  109. <div class="w40 tc"><input type="checkbox" autocomplete="off" name="ids[]" value="{$vo.aid}"></div>
  110. </td>
  111. <td class="sort">
  112. <div class="w50 tc">
  113. {$vo.aid}
  114. </div>
  115. </td>
  116. {for start="0" end="count($tab_list)"}
  117. {if condition="$i lt 4" }
  118. {if $i == 0}
  119. <td style="width: 100%">
  120. <div class="text-l10">
  121. {$vo['attr_list'][$i]['attr_value']}
  122. </div>
  123. </td>
  124. {else /}
  125. <td class="">
  126. <div class="w150 tc">
  127. {$vo['attr_list'][$i]['attr_value']}
  128. </div>
  129. </td>
  130. {/if}
  131. {/if}
  132. {/for}
  133. {empty name='$tab_list'}
  134. <td style="width: 100%">
  135. <div class="text-l10">
  136. <a href="{:url('Guestbook/index', ['typeid'=>$vo.typeid])}">{$vo.typename|default='<i class="red">数据出错!</i>'}</a>
  137. </div>
  138. </td>
  139. {else /}
  140. <td class="">
  141. <div class="w100 tc">
  142. <a href="{:url('Guestbook/index', ['typeid'=>$vo.typeid])}">{$vo.typename|default='<i class="red">数据出错!</i>'}</a>
  143. </div>
  144. </td>
  145. {/empty}
  146. <td class="">
  147. <div class="w50 tc" id="td_is_read_{$vo.aid}">
  148. {eq name='$vo.is_read' value='1'}
  149. 已读
  150. {else /}
  151. <font color="red">未读</font>
  152. {/eq}
  153. </div>
  154. </td>
  155. <td class="">
  156. <div class="w160 tc">
  157. {$vo.add_time|date='Y-m-d H:i:s',###}
  158. </div>
  159. </td>
  160. <td class="operation">
  161. <div class="w120 tc">
  162. <a class="btn blue" href="javascript:void(0);" data-href="{:url('Guestbook/details', ['aid'=>$vo['aid']])}" onclick="openFullframe(this, '留言详情', '800px', '80%');$('#td_is_read_{$vo.aid}').html('已读');">查看</a>
  163. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  164. <i></i>
  165. <a class="btn red" href="javascript:void(0);" data-url="{:url('Guestbook/del')}" data-id="{$vo.aid}" onClick="delfun(this);">删除</a>
  166. {/eq}
  167. </div>
  168. </td>
  169. </tr>
  170. {/foreach}
  171. {/empty}
  172. </tbody>
  173. </table>
  174. </div>
  175. <div class="iDiv" style="display: none;"></div>
  176. </div>
  177. {notempty name="list"}
  178. <div class="tDiv">
  179. <div class="tDiv2">
  180. <div class="fbutton checkboxall">
  181. <input type="checkbox" autocomplete="off" class="checkAll">
  182. </div>
  183. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  184. <div class="fbutton">
  185. <a onclick="batch_del(this, 'ids');" data-url="{:url('Guestbook/del')}">
  186. <div class="add">
  187. <span>批量删除</span>
  188. </div>
  189. </a>
  190. </div>
  191. {/eq}
  192. {include file="public/page" /}
  193. </div>
  194. <div style="clear:both"></div>
  195. </div>
  196. {/notempty}
  197. </div>
  198. </div>
  199. <script type="text/javascript">
  200. $(function(){
  201. $('input[name*=ids]').click(function(){
  202. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  203. $('.checkAll').prop('checked','checked');
  204. } else {
  205. $('.checkAll').prop('checked', false);
  206. }
  207. });
  208. $('input[type=checkbox].checkAll').click(function(){
  209. $('input[type=checkbox]').prop('checked',this.checked);
  210. });
  211. });
  212. layui.use('laydate', function(){
  213. var laydate = layui.laydate;
  214. //执行一个laydate实例
  215. laydate.render({
  216. elem: '#add_time_begin' //指定元素
  217. });
  218. laydate.render({
  219. elem: '#add_time_end' //指定元素
  220. });
  221. });
  222. $(document).ready(function(){
  223. // 表格行点击选中切换
  224. $('#flexigrid > table>tbody >tr').click(function(){
  225. $(this).toggleClass('trSelected');
  226. });
  227. // 点击刷新数据
  228. $('.fa-refresh').click(function(){
  229. location.href = location.href;
  230. });
  231. });
  232. function excel_export(obj,name) {
  233. var url = $(obj).attr('data-url');
  234. var aid = [];
  235. var typeid = $('input[name=typeid]').val();
  236. var start_time = $('input[name=add_time_begin]').val();
  237. var end_time = $('input[name=add_time_end]').val();
  238. $('input[name^='+name+']').each(function(i,o){
  239. if($(o).is(':checked')){
  240. aid.push($(o).val());
  241. }
  242. });
  243. url = url+"&aid="+aid+"&typeid="+typeid+"&start_time="+start_time+"&end_time="+end_time;
  244. window.location.href = url;
  245. }
  246. </script>
  247. {include file="public/footer" /}