Nessuna descrizione
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 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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 other">
  6. {include file="other/bar" /}
  7. <div class="flexigrid">
  8. <div class="mDiv">
  9. <div class="ftitle">
  10. <h3>广告列表</h3>
  11. <h5>(共{$pager->totalRows}条数据)</h5>
  12. </div>
  13. <div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
  14. <form class="navbar-form form-inline" action="{:U('Other/index')}" method="get" onsubmit="layer_loading('正在处理');">
  15. {$searchform.hidden|default=''}
  16. <div class="sDiv">
  17. <div class="sDiv2">
  18. <select name="pid" class="select" style="margin:0px 5px;">
  19. <option value="">--查看全部--</option>
  20. {volist name="ad_position" id="vo"}
  21. <option value="{$vo.id}" {eq name="$Request.param.pid" value="$vo.id"}selected{/eq}>{$vo.title}</option>
  22. {/volist}
  23. </select>
  24. </div>
  25. <div class="sDiv2">
  26. <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="广告名称搜索...">
  27. <input type="submit" class="btn" value="搜索">
  28. </div>
  29. </div>
  30. </form>
  31. </div>
  32. <div class="hDiv">
  33. <div class="hDivBox">
  34. <table cellspacing="0" cellpadding="0" style="width: 100%">
  35. <thead>
  36. <tr>
  37. {eq name='$main_lang' value='$admin_lang'}
  38. <th class="sign w40" axis="col0">
  39. <div class="tc"><input type="checkbox" autocomplete="off" class="checkAll"></div>
  40. </th>
  41. {/eq}
  42. <th abbr="article_title" axis="col3" class="w40">
  43. <div class="tc">ID</div>
  44. </th>
  45. <th abbr="article_time" axis="col6" class="">
  46. <div style="text-align: left; padding-left: 10px;" class="">广告名称</div>
  47. </th>
  48. <th abbr="article_title" axis="col3" class="w160">
  49. <div class="tc">广告位置</div>
  50. </th>
  51. <th abbr="article_time" axis="col6" class="w120">
  52. <div class="tc">广告图片</div>
  53. </th>
  54. <!-- <th align="center" abbr="article_time" axis="col6" class="">
  55. <div style="text-align: left; width: 120px;" class="">投放时间</div>
  56. </th>
  57. <th align="center" abbr="article_time" axis="col6" class="">
  58. <div style="text-align: left; width: 120px;" class="">结束时间</div>
  59. </th> -->
  60. <th axis="col1" class="w180">
  61. <div class="tc">操作</div>
  62. </th>
  63. <th abbr="article_time" axis="col6" class="w60">
  64. <div class="tc">排序</div>
  65. </th>
  66. </tr>
  67. </thead>
  68. </table>
  69. </div>
  70. </div>
  71. <div class="bDiv" style="height: auto;">
  72. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  73. <table style="width: 100%;">
  74. <tbody>
  75. {empty name="list"}
  76. <tr>
  77. <td class="no-data" align="center" axis="col0" colspan="50">
  78. <div class="no_row">
  79. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  80. </div>
  81. </td>
  82. </tr>
  83. {else/}
  84. {foreach name="list" item="vo" key="k" }
  85. <tr>
  86. {eq name='$main_lang' value='$admin_lang'}
  87. <td class="sign w40">
  88. <div class="tc">
  89. <input type="checkbox" autocomplete="off" name="ids[]" value="{$vo.id}"></div>
  90. </td>
  91. {/eq}
  92. <td class="sort w40">
  93. <div class="tc">
  94. {$vo.id}
  95. </div>
  96. </td>
  97. <td>
  98. <div class="tl" style="padding-left: 10px;">
  99. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  100. <a href="{:U('Other/edit',array('id'=>$vo['id']))}">{$vo.title}</a>
  101. {else /}
  102. {$vo.title}
  103. {/eq}
  104. </div>
  105. </td>
  106. <td class="w160">
  107. <div class="tc">{$ad_position[$vo['pid']]['title']|default='<i class="red">数据出错!</i>'}</div>
  108. </td>
  109. <td class="w120">
  110. <div class="tc">
  111. <img src="{$vo.litpic|default='__STATIC__/common/images/not_adv.jpg'}" width="60" onmouseover="layer_tips=layer.tips('<img src={$vo.litpic|default='__STATIC__/common/images/not_adv.jpg'} width=150 style=\'max-height:250px;\'>',this,{tips: [3, '#fff'],skin:'layer-yourskin-mt0'});" onmouseout="layer.close(layer_tips);">&nbsp;
  112. </div>
  113. </td>
  114. <!-- <td align="center" class="">
  115. <div style="text-align: left; width: 120px;">
  116. {empty name="vo.start_time"}
  117. —————
  118. {else /}
  119. {$vo.start_time|date='Y-m-d H:i:s',###}
  120. {/empty}
  121. </div>
  122. </td>
  123. <td align="center" class="">
  124. <div style="text-align: left; width: 120px;">
  125. {empty name="vo.end_time"}
  126. —————
  127. {else /}
  128. {$vo.end_time|date='Y-m-d H:i:s',###}
  129. {/empty}
  130. </div>
  131. </td> -->
  132. <td class="w180">
  133. <div class="tc">
  134. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  135. <a href="{:U('Other/edit',array('id'=>$vo['id']))}" class="btn blue"><i class="fa fa-pencil-square-o"></i>编辑</a>
  136. {/eq}
  137. {eq name='$main_lang' value='$admin_lang'}
  138. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  139. <a class="btn red" href="javascript:void(0);" data-url="{:U('Other/del')}" data-id="{$vo.id}" onClick="delfun(this);"><i class="fa fa-trash-o"></i>删除</a>
  140. {/eq}
  141. {/eq}
  142. <a class="btn blue" href="javascript:void(0);" onclick="copyToClipBoard({$vo['id']})">标签调用</a>
  143. </div>
  144. </td>
  145. <td class="sort w60">
  146. <div class="tc">
  147. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  148. <input style="text-align: center;" type="text" onchange="changeTableVal('ad','id','{$vo.id}','sort_order',this);" size="4" value="{$vo.sort_order}" />
  149. {else /}
  150. {$vo.sort_order}
  151. {/eq}
  152. </div>
  153. </td>
  154. </tr>
  155. {/foreach}
  156. {/empty}
  157. </tbody>
  158. </table>
  159. </div>
  160. <div class="iDiv" style="display: none;"></div>
  161. </div>
  162. <div class="tDiv">
  163. <div class="tDiv2">
  164. {eq name='$main_lang' value='$admin_lang'}
  165. <div class="fbutton checkboxall">
  166. <input type="checkbox" autocomplete="off" class="checkAll">
  167. </div>
  168. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  169. <div class="fbutton">
  170. <a onclick="batch_del(this, 'ids');" data-url="{:U('Other/del')}">
  171. <div class="add" title="批量删除">
  172. <span>批量删除</span>
  173. </div>
  174. </a>
  175. </div>
  176. {/eq}
  177. {eq name="$Think.const.CONTROLLER_NAME.'@add'|is_check_access" value="1"}
  178. <div class="fbutton">
  179. <a href="{:U('Other/add', array('pid'=>$pid))}">
  180. <div class="add" title="新增广告">
  181. <span class="red">新增广告</span>
  182. </div>
  183. </a>
  184. </div>
  185. {/eq}
  186. {/eq}
  187. </div>
  188. <div style="clear:both"></div>
  189. </div>
  190. <!--分页位置-->
  191. {$page}
  192. </div>
  193. </div>
  194. <script type="text/javascript">
  195. $(function(){
  196. $('input[name*=ids]').click(function(){
  197. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  198. $('.checkAll').prop('checked','checked');
  199. } else {
  200. $('.checkAll').prop('checked', false);
  201. }
  202. });
  203. $('input[type=checkbox].checkAll').click(function(){
  204. $('input[type=checkbox]').prop('checked',this.checked);
  205. });
  206. });
  207. $(document).ready(function(){
  208. // 表格行点击选中切换
  209. $('#flexigrid > table>tbody >tr').click(function(){
  210. $(this).toggleClass('trSelected');
  211. });
  212. // 点击刷新数据
  213. $('.fa-refresh').click(function(){
  214. location.href = location.href;
  215. });
  216. });
  217. /**
  218. * 代码调用js
  219. * @param id id
  220. * @param limit 条数
  221. */
  222. function copyToClipBoard(id) {
  223. var adstr = "{eyou:ad aid='" + id + "'}\r\n <a href='{$"+"field.links}' {$"+"field.target}><img src='{$"+"field.litpic}' alt='{$"+"field.title}' /></a>\r\n{/eyou:ad";
  224. var contentdiv = '<div class="dialog_content" style="margin: 0px; padding: 0px;"><dl style="padding:10px 30px;line-height:30px"><dd>标签 ad 调用:</dd>'
  225. contentdiv += '<textarea rows="4" cols="60" style="width:400px;height:80px;">' + adstr + '}</textarea>'
  226. contentdiv += '<dd style="border-top: dotted 1px #E7E7E7; color: #F60;">请将对应标签代码复制并粘贴到对应模板文件中!</dd></dl></div>'
  227. layer.open({
  228. title: '代码调用',
  229. type: 1,
  230. shade: layer_shade,
  231. skin: 'layui-layer-demo',
  232. area: ['480px', '240px'], //宽高
  233. content: contentdiv
  234. });
  235. }
  236. </script>
  237. {include file="public/footer" /}