Açıklama Yok
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 18KB

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