暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.htm 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. {include file="public/layout" /}
  2. <body class="bodystyle" style="cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page min-hg-c-10">
  6. {include file="zc_position/admin_bar" /}
  7. <div class="flexigrid">
  8. <div class="mDiv">
  9. <div class="ftitle">
  10. {if condition="$main_lang == $admin_lang || !empty($global['language_split'])"}
  11. {eq name="$Think.const.CONTROLLER_NAME.'@add'|is_check_access" value="1"}
  12. <div class="fbutton">
  13. <a href="javascript:void(0);" data-href="{:url('ZczsPosition/add')}" onclick="openFullframe(this, '新增证书', '80%', '70%');">
  14. <div class="add">
  15. <span><i class="layui-icon layui-icon-addition"></i>新增证书</span>
  16. </div>
  17. </a>
  18. </div>
  19. {/eq}
  20. {/if}
  21. </div>
  22. <form id="searchForm" class="navbar-form form-inline" action="{:url('ZczsPosition/index')}" method="get" onsubmit="layer_loading('正在处理');">
  23. {$searchform.hidden|default=''}
  24. <div class="sDiv">
  25. <div class="sDiv2">
  26. <select name="type" class="select" style="margin:0px 5px;">
  27. <option value="">--选择一级--</option>
  28. {eyou:foreach name='$pos_list' item='field1'}
  29. <option value="{$field1.id}" {eq name="$Request.param.type" value="$field1.id"}selected{/eq}>{$field1.name}</option>
  30. {/eyou:foreach}
  31. </select>
  32. </div>
  33. <div class="sDiv2">
  34. <select name="type2" id="type2" class="select" style="margin:0px 5px;">
  35. <option value="0">--选择二级--</option>
  36. {eyou:foreach name='$pos_list2' item='field1'}
  37. <option value="{$field1.id}" {eq name="$Request.param.type2" value="$field1.id"}selected{/eq}>{$field1.name}</option>
  38. {/eyou:foreach}
  39. </select>
  40. </div>
  41. <div class="sDiv2">
  42. <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="名称搜索...">
  43. <input type="submit" class="btn" value="搜索">
  44. <i class="iconfont e-sousuo"></i>
  45. </div>
  46. </div>
  47. </form>
  48. <div class="sDiv">
  49. {eq name="$Think.const.CONTROLLER_NAME.'@addtype'|is_check_access" value="1"}
  50. <a href="javascript:void(0);" data-href="{:url('ZczsPosition/addtype',array('id'=>$vo['id']))}" data-closereload="1" class="btn blue" onclick="openFullframe(this, '添加分类', '70%', '80%');">添加分类</a> <i></i>
  51. {/eq}
  52. {eq name="$Think.const.CONTROLLER_NAME.'@edittype'|is_check_access" value="1"}
  53. <a href="javascript:void(0);" data-href="{:url('ZczsPosition/edittype',array('type'=>$Request.param.type,'type2'=>$Request.param.type2))}" data-closereload="1" class="btn blue" onclick="openFullframe(this, '编辑分类', '70%', '80%');">编辑分类</a> <i></i>
  54. {/eq}
  55. {eq name="$Think.const.CONTROLLER_NAME.'@deltype'|is_check_access" value="1"}
  56. <a href="javascript:void(0);" data-href="{:url('ZczsPosition/deltype',array('type'=>$Request.param.type,'type2'=>$Request.param.type2))}" data-closereload="1" class="btn blue" onclick="openFullframe(this, '删除分类', '70%', '80%');">删除分类</a> <i></i>
  57. {/eq}
  58. </div>
  59. <!--
  60. <button id="addType">添加分类</button>-->
  61. <!--
  62. <button id="editType">编辑分类</button>-->
  63. </div>
  64. <div class="hDiv">
  65. <div class="hDivBox">
  66. <table cellspacing="0" cellpadding="0" style="width: 100%">
  67. <thead>
  68. <tr>
  69. {if condition="$main_lang == $admin_lang || !empty($global['language_split'])"}
  70. <th class="sign w40" axis="col0">
  71. <div class="tc"><input type="checkbox" class="checkAll"></div>
  72. </th>
  73. {/if}
  74. <th abbr="article_title" axis="col3" class="w60">
  75. <div class="tc">ID</div>
  76. </th>
  77. <th abbr="article_title" axis="col3">
  78. <div class="tl text-l10" style="width: 100%">证书名称</div>
  79. </th>
  80. <th abbr="article_title" axis="col3" class="w100">
  81. <div class="tc">绑定学历</div>
  82. </th>
  83. <th abbr="article_title" axis="col3" class="w100">
  84. <div class="tc">证书级别</div>
  85. </th>
  86. <th abbr="article_title" axis="col3" class="w120">
  87. <div class="tc">主题图片</div>
  88. </th>
  89. <th abbr="article_time" axis="col6" class="w60">
  90. <div class="tc">启用</div>
  91. </th>
  92. <th axis="col1" class="w180">
  93. <div class="tc">操作</div>
  94. </th>
  95. </tr>
  96. </thead>
  97. </table>
  98. </div>
  99. </div>
  100. <div class="bDiv" style="height: auto;">
  101. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  102. <table style="width: 100%">
  103. <tbody>
  104. {empty name="list"}
  105. <tr>
  106. <td class="no-data" align="center" axis="col0" colspan="50">
  107. <div class="no_row">
  108. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  109. </div>
  110. </td>
  111. </tr>
  112. {else/}
  113. {foreach name="list" item="vo" key="k" }
  114. <tr>
  115. {if condition="$main_lang == $admin_lang || !empty($global['language_split'])"}
  116. <td class="sign">
  117. <div class="w40 tc"> <input type="checkbox" name="ids[]" value="{$vo.id}"> </div>
  118. </td>
  119. {/if}
  120. <td>
  121. <div class="tc w60">
  122. {eq name='$main_lang' value='$admin_lang'}
  123. {$vo.id}
  124. {else /}
  125. {$main_adv_list[$vo['id']]['id']|default=$vo['id']}
  126. {/eq}
  127. </div>
  128. </td>
  129. <td align="left" style="width:100%;">
  130. <div class="tl text-l10">
  131. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  132. <a href="javascript:void(0);" data-href="{:url('ZczsPosition/edit',array('id'=>$vo['id']))}" data-closereload="1" onclick="openFullframe(this, '编辑广告', '100%', '100%');">{$vo.title}</a>
  133. {else /}
  134. {$vo.title}
  135. {/eq}
  136. </div>
  137. </td>
  138. <td>
  139. <div class="tc w100"> {$vo.xl_name} </div>
  140. </td>
  141. <td>
  142. <div class="tc w100"> {$vo.type_name} </div>
  143. </td>
  144. <td>
  145. <div class="tc w120">
  146. <ul class="adpic">
  147. {volist name="$vo.ad" id="vs" length="1" }
  148. <li>
  149. <img src="{$vs.litpic}"> {eq name="$vo.type" value="1"}<span>{$vo.ad_count}</span>{/eq}
  150. </li>
  151. {/volist}
  152. </ul>
  153. </div>
  154. </td>
  155. <td>
  156. <div class="tc w60">
  157. {if condition="$vo['status'] eq 1"}
  158. <span class="yes" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}onClick="changeTableVal('zczs_position','id','{$vo.id}','status',this);"{/eq} ><i class="fa fa-check-circle"></i>是</span>
  159. {else /}
  160. <span class="no" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}onClick="changeTableVal('zczs_position','id','{$vo.id}','status',this);"{/eq} ><i class="fa fa-ban"></i>否</span>
  161. {/if}
  162. </div>
  163. </td>
  164. <td class="operation">
  165. <div class="w180 tc">
  166. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  167. <a href="javascript:void(0);" data-href="{:url('ZczsPosition/edit',array('id'=>$vo['id']))}" data-closereload="1" class="btn blue" onclick="openFullframe(this, '编辑证书', '100%', '100%');">编辑</a> <i></i>
  168. {/eq}
  169. {if condition="$main_lang == $admin_lang || !empty($global['language_split'])"}
  170. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  171. <a class="btn red" href="javascript:void(0);" data-url="{:url('ZczsPosition/del')}" data-id="{$vo.id}" onClick="delfun(this);">删除</a>
  172. {/eq} <!--<i></i>-->
  173. {/if}
  174. <!-- <a class="btn blue" href="javascript:void(0);" onclick="copyToClipBoard({$main_adv_list[$vo['id']]['id']|default=$vo['id']}, 1, {$vo['type']})">标签调用</a>-->
  175. </div>
  176. </td>
  177. </tr>
  178. {/foreach}
  179. {/empty}
  180. </tbody>
  181. </table>
  182. </div>
  183. <div class="iDiv" style="display: none;"></div>
  184. </div>
  185. {notempty name="list"}
  186. <div class="tDiv">
  187. <div class="tDiv2">
  188. {if condition="$main_lang == $admin_lang || !empty($global['language_split'])"}
  189. <div class="fbutton checkboxall"> <input type="checkbox" class="checkAll"> </div>
  190. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  191. <div class="fbutton">
  192. <a onclick="batch_del(this, 'ids');" data-url="{:url('ZczsPosition/del')}" class="layui-btn layui-btn-primary">批量删除</a>
  193. </div>
  194. {/eq}
  195. {/if}
  196. <!-- 分页 -->
  197. {include file="public/page" /}
  198. </div>
  199. <div style="clear:both"></div>
  200. </div>
  201. {/notempty}
  202. </div>
  203. </div>
  204. <script type="text/javascript">
  205. $(function() {
  206. $('input[name*=ids]').click(function() {
  207. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  208. $('.checkAll').prop('checked', 'checked');
  209. } else {
  210. $('.checkAll').prop('checked', false);
  211. }
  212. });
  213. $('input[type=checkbox].checkAll').click(function() {
  214. $('input[type=checkbox]').prop('checked', this.checked);
  215. });
  216. });
  217. $(document).ready(function() {
  218. // 表格行点击选中切换
  219. $('#flexigrid > table>tbody >tr').click(function() {
  220. $(this).toggleClass('trSelected');
  221. });
  222. // 点击刷新数据
  223. $('.fa-refresh').click(function() {
  224. location.href = location.href;
  225. });
  226. $('#searchForm select[name=type]').change(function(){
  227. if($(this).val() == 0){
  228. //重置二级分类
  229. $('#type2').val(0);
  230. }
  231. $('#searchForm').submit();
  232. });
  233. $('#searchForm select[name=type2]').change(function(){
  234. $('#searchForm').submit();
  235. });
  236. $('#searchForm select[name=map]').change(function(){
  237. $('#searchForm').submit();
  238. });
  239. });
  240. /**
  241. * 代码调用js
  242. * @param id id
  243. * @param limit 条数
  244. */
  245. function copyToClipBoard(id, limit, type) {
  246. var advstr = '';
  247. if (1 == type) {
  248. advstr = "{eyou:adv pid='" + id + "'}\r\n <img src='{$"+"field.litpic}' alt='{$"+"field.title}' />\r\n{/eyou:adv";
  249. } else if (2 == type) {
  250. advstr = "{eyou:adv pid='" + id + "'}\r\n <video src='{$"+"field.litpic}' controls preload='auto' oncontextmenu='return fase'></video>\r\n{/eyou:adv";
  251. } else if (3 == type) {
  252. advstr = "{eyou:adv pid='" + id + "'}\r\n {$"+"field.intro}\r\n{/eyou:adv";
  253. }
  254. var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px"><dd>标签 adv 调用:</dd>';
  255. contentdiv += '<textarea rows="4" cols="60" style="width:400px;height:60px;">' + advstr + '}</textarea>';
  256. contentdiv += '<dd>JavaScript:</dd>';
  257. contentdiv += '<dd><input type="text" style=" width:400px;" value="<script type=&quot;text/javascript&quot; src=&quot;http://' + '{$Think.server.http_host}' + '__ROOT_DIR__/index.php?m=api&amp;c=Other&amp;a=other_show&amp;pid=' + id + '&amp;row='+limit+'&quot;><\/script>"></dd>';
  258. contentdiv += '<dd style="border-top: dotted 1px #E7E7E7; color: #F60;">请将标签adv或JavaScript代码复制并粘贴到对应模板文件中!</dd></dl></div>';
  259. layer.open({
  260. title: '代码调用',
  261. type: 1,
  262. shade: layer_shade,
  263. skin: 'layui-layer-demo',
  264. area: ['480px', '280px'], //宽高
  265. content: contentdiv
  266. });
  267. }
  268. </script>
  269. {include file="public/footer" /}