Ingen beskrivning
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 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. {include file="public/layout" /}
  2. <body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page" style="box-shadow:none;">
  6. {include file="article/bar" /}
  7. <div class="flexigrid" style="min-height: 600px;">
  8. <div class="mDiv">
  9. <div class="ftitle">
  10. {include file="archives/tags_btn" /}
  11. </div>
  12. <form class="navbar-form form-inline" id="searchForm" action="{:url('Download/index')}" method="get" onsubmit="layer_loading('正在处理');">
  13. {$searchform.hidden|default=''}
  14. <div class="sDiv">
  15. {include file="archives/flag_btn" /}
  16. <div class="sDiv2">
  17. <input type="hidden" name="typeid" id="typeid" value="{$Request.param.typeid|default=''}">
  18. <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="标题搜索...">
  19. <input type="submit" class="btn" value="搜索">
  20. <i class="iconfont e-sousuo"></i>
  21. </div>
  22. </div>
  23. </form>
  24. </div>
  25. <div class="hDiv">
  26. <div class="hDivBox">
  27. <table cellspacing="0" cellpadding="0" style="width: 100%">
  28. <thead>
  29. <tr>
  30. <th class="sign w40" axis="col0">
  31. <div class="tc"><input type="checkbox" class="checkAll" autocomplete="off"></div>
  32. </th>
  33. <th abbr="download_title" axis="col3" class="w70">
  34. <div class="tc">ID</div>
  35. </th>
  36. <th abbr="download_title" axis="col3" class="">
  37. <div style="text-align: left; padding-left: 10px;" class="">标题</div>
  38. </th>
  39. <!-- <th abbr="article_time" axis="col6" class="w120">
  40. <div class="tc">付费限制</div>
  41. </th> -->
  42. <th abbr="download_time" axis="col6" class="w120">
  43. <div class="tc">所属栏目</div>
  44. </th>
  45. <th abbr="article_time" axis="col6" class="w50">
  46. <div class="tc sort_style"><a href="{:getArchivesSortUrl('arcrank')}">审核&nbsp;<i {eq name='$Request.param.orderby' value='arcrank'}{eq name='$Request.param.orderway' value='asc'}class="asc"{else /}class="desc"{/eq}{/eq}></i></a></div>
  47. </th>
  48. <th align="center" abbr="download_time" axis="col6" class="w50">
  49. <div class="tc">推荐</div>
  50. </th>
  51. <th abbr="download_time" axis="col6" class="w60">
  52. <div class="tc">点击</div>
  53. </th>
  54. <th abbr="download_time" axis="col6" class="w60">
  55. <div class="tc">下载</div>
  56. </th>
  57. <th abbr="download_time" axis="col6" class="w100">
  58. <div class="tc">发布时间</div>
  59. </th>
  60. <th axis="col1" class="w160">
  61. <div class="tc">操作</div>
  62. </th>
  63. <th abbr="download_time" axis="col6" class="w60">
  64. <div class="tc sort_style"><a href="{:getArchivesSortUrl('sort_order')}">排序&nbsp;<i {eq name='$Request.param.orderby' value='sort_order'}{eq name='$Request.param.orderway' value='asc'}class="asc"{else /}class="desc"{/eq}{/eq}></i></a></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. <td class="sign">
  87. <div class="tc w40"><input type="checkbox" name="ids[]" value="{$vo.aid}" autocomplete="off"></div>
  88. </td>
  89. <td class="sort">
  90. <div class="tc w70">
  91. {$vo.aid}
  92. </div>
  93. </td>
  94. <td style="width: 100%;">
  95. <div class="tl" style="padding-left: 10px;">
  96. {notempty name="$vo.is_litpic"}
  97. <i class="fa fa-picture-o color_z" onmouseover="layer_tips=layer.tips('<img src={$vo.litpic} class=\'layer_tips_img\'>',this,{tips: [3, '#fff'],skin:'layer-yourskin-mt0'});" onmouseout="layer.close(layer_tips);"></i>
  98. {/notempty}
  99. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  100. <a href="{:url('Download/edit',array('id'=>$vo['aid'], 'callback_url'=>$callback_url))}" title="{$vo.title}" style="{eq name="vo.is_b" value="1"} font-weight: bold;{/eq}">{$vo.title}</a>
  101. {else /}
  102. {$vo.title}
  103. {/eq}
  104. {assign name='showArcFlagData' value='$vo|showArchivesFlagStr'}
  105. {volist name='$showArcFlagData' id="vo1"}
  106. {eq name='$i' value='1'}<span style="color: red;">[{/eq}
  107. <i style="font-size: 12px;">{$vo1['small_name']}</i>
  108. {eq name='$i' value='$showArcFlagData|count'}]</span>{/eq}
  109. {/volist}
  110. </div>
  111. </td>
  112. <!-- <td class="">
  113. <div class="w120 tc">
  114. <span style="display: block;">{$vo.restric_type_text}</span>
  115. {if condition="1 == $vo.restric_type"}
  116. <span class="red">¥{$vo.users_price}</span>
  117. {elseif condition="2 == $vo.restric_type"}
  118. <span class="red">{$vo.arc_level_name}{if condition="!empty($vo.no_vip_pay) && !empty($vo.users_price)" }(非会员: ¥{$vo.users_price}){/if}</span>
  119. {elseif condition="3 == $vo.restric_type"}
  120. <span class="red">{$vo.arc_level_name}(¥{$vo.users_price})</span>
  121. {/if}
  122. </div>
  123. </td> -->
  124. <td>
  125. <div class="w120 tc ellipsis"><a href="{:url('Download/index', array('typeid'=>$vo['typeid'], 'tab'=>3))}" title="{$vo.typename}">{$vo.typename|default='<i class="red">数据出错!</i>'}</a></div>
  126. </td>
  127. <td>
  128. <div class="tc w50">
  129. {if condition="$vo['arcrank'] eq -1"}
  130. <span class="no" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"} data-typeid="{$vo.typeid}" data-seo_pseudo="{$seo_pseudo|default='1'}" onclick="changeTableVal('archives','aid','{$vo.aid}','arcrank',this);" {/eq} ><i class="fa fa-ban"></i>否</span>
  131. {else /}
  132. <span class="yes" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"} data-typeid="{$vo.typeid}" data-seo_pseudo="{$seo_pseudo|default='1'}" onclick="changeTableVal('archives','aid','{$vo.aid}','arcrank',this);" {/eq} ><i class="fa fa-check-circle"></i>是</span>
  133. {/if}
  134. </div>
  135. </td>
  136. <td>
  137. <div class="tc w50">
  138. {if condition="$vo['is_recom'] eq 1"}
  139. <span class="yes" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}onClick="changeTableVal('archives','aid','{$vo.aid}','is_recom',this);"{/eq} ><i class="fa fa-check-circle"></i>是</span>
  140. {else /}
  141. <span class="no" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}onClick="changeTableVal('archives','aid','{$vo.aid}','is_recom',this);"{/eq} ><i class="fa fa-ban"></i>否</span>
  142. {/if}
  143. </div>
  144. </td>
  145. <td>
  146. <div class="tc w60">
  147. {$vo.click}
  148. </div>
  149. </td>
  150. <td>
  151. <div class="tc w60">
  152. {$vo.downcount}
  153. </div>
  154. </td>
  155. <td>
  156. <div class="w100 tc">
  157. {$vo.add_time|date='Y-m-d',###}
  158. </div>
  159. </td>
  160. <td class="operation">
  161. <div class="w160 tc">
  162. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  163. <a href="{:url('Download/edit',array('id'=>$vo['aid'], 'callback_url'=>$callback_url))}" class="btn blue">编辑</a>
  164. <i></i>
  165. {/eq}
  166. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  167. <a class="btn red" href="javascript:void(0);" data-url="{:url('Download/del')}" data-id="{$vo.aid}" {eq name="$global['web_recycle_switch']" value='1'} data-deltype="del" {else /} data-deltype="pseudo" {/eq} onClick="delfun(this);">删除</a>
  168. <i></i>
  169. {/eq}
  170. <a href="{$vo.arcurl}" class="btn blue" target="_blank">浏览</a>
  171. </div>
  172. </td>
  173. <td class="sort">
  174. <div class="w60 tc">
  175. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  176. <input type="text" onchange="changeTableVal('archives','aid','{$vo.aid}','sort_order',this);" size="4" value="{$vo.sort_order}" />
  177. {else /}
  178. {$vo.sort_order}
  179. {/eq}
  180. </div>
  181. </td>
  182. </tr>
  183. {/foreach}
  184. {/empty}
  185. </tbody>
  186. </table>
  187. </div>
  188. <div class="iDiv" style="display: none;"></div>
  189. </div>
  190. {notempty name="list"}
  191. <div class="footer-oper">
  192. <span class="ml15">
  193. <input type="checkbox" class="checkAll" autocomplete="off">
  194. </span>
  195. <div class="nav-dropup">
  196. <button class="layui-btn layui-btn-primary dropdown-bt">批量操作<i class="layui-icon layui-icon-up"></i></button>
  197. <div class="dropdown-menus" style="display:none; {if condition='0 < $pager->totalRows && ($pager->totalRows < 3 || $pager->listRows < 3)'}top:28px;bottom:unset;border-bottom:1px solid rgba(0,0,0,.15);border-top:none;min-height: 250px;{/if}">
  198. {eq name="'Archives@batch_attr'|is_check_access" value="1"}
  199. <a href="javascript:void(0);" onclick="batch_attr(this, 'ids', '批量新增属性');" data-url="{:url('Archives/batch_attr', ['opt'=>'add'])}">新增属性</a>
  200. <a href="javascript:void(0);" onclick="batch_attr(this, 'ids', '批量删除属性');" data-url="{:url('Archives/batch_attr', ['opt'=>'del'])}">删除属性</a>
  201. <hr class="layui-bg-gray">
  202. {/eq}
  203. {eq name="'Archives@batch_copy'|is_check_access" value="1"}
  204. <a href="javascript:void(0);" onclick="func_batch_copy(this, 'ids');" data-url="{:url('Archives/batch_copy', array('typeid'=>$Request.param.typeid))}">复制文档</a>
  205. {/eq}
  206. {eq name="'Archives@move'|is_check_access" value="1"}
  207. <a href="javascript:void(0);" onclick="func_move(this, 'ids');" data-url="{:url('Archives/move', array('typeid'=>$Request.param.typeid))}">移动文档</a>
  208. {/eq}
  209. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  210. <a href="javascript:void(0);" onclick="batch_del(this, 'ids');" data-url="{:url('Download/del')}" {eq name="$global['web_recycle_switch']" value='1'} data-deltype="del" {else /} data-deltype="pseudo" {/eq}>删除文档</a>
  211. {/eq}
  212. {eq name="'Archives@check'|is_check_access" value="1"}
  213. <hr class="layui-bg-gray">
  214. <a href="javascript:void(0);" onclick="batch_check(this, 'ids');" data-url="{:url('Archives/check')}">审核文档</a>
  215. <a href="javascript:void(0);" onclick="batch_check(this, 'ids');" data-url="{:url('Archives/uncheck')}">取消审核</a>
  216. {/eq}
  217. </div>
  218. </div>
  219. {eq name="'RecycleBin@archives_index'|is_check_access" value="1"}
  220. {neq name="$global['web_recycle_switch']" value='1'} <a href="{:url('RecycleBin/archives_index')}" class="layui-btn layui-btn-primary" title="回收站">回收站</a> {/neq}
  221. {/eq}
  222. {include file="public/page" /}
  223. </div>
  224. {/notempty}
  225. </div>
  226. </div>
  227. <script type="text/javascript">
  228. $(function(){
  229. $('input[name*=ids]').click(function(){
  230. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  231. $('.checkAll').prop('checked','checked');
  232. } else {
  233. $('.checkAll').prop('checked', false);
  234. }
  235. });
  236. $('input[type=checkbox].checkAll').click(function(){
  237. $('input[type=checkbox]').prop('checked',this.checked);
  238. });
  239. });
  240. $(document).ready(function(){
  241. // 表格行点击选中切换
  242. $('#flexigrid > table>tbody >tr').click(function(){
  243. $(this).toggleClass('trSelected');
  244. });
  245. // 点击刷新数据
  246. $('.fa-refresh').click(function(){
  247. location.href = location.href;
  248. });
  249. // 批量操作
  250. $(".dropdown-bt").click(function(){
  251. $(".dropdown-menus").slideToggle(200);
  252. event.stopPropagation();
  253. })
  254. $(document).click(function(){
  255. $(".dropdown-menus").slideUp(200);
  256. event.stopPropagation();
  257. })
  258. });
  259. var aids = '';
  260. function func_move(obj, name)
  261. {
  262. var a = [];
  263. var k = 0;
  264. aids = '';
  265. $('input[name^='+name+']').each(function(i,o){
  266. if($(o).is(':checked')){
  267. a.push($(o).val());
  268. if (k > 0) {
  269. aids += ',';
  270. }
  271. aids += $(o).val();
  272. k++;
  273. }
  274. })
  275. if(a.length == 0){
  276. layer.alert('请至少选择一项', {
  277. shade: layer_shade,
  278. area: ['480px', '190px'],
  279. move: false,
  280. title: '提示',
  281. btnAlign:'r',
  282. closeBtn: 3,
  283. success: function () {
  284. $(".layui-layer-content").css('text-align', 'left');
  285. }
  286. });
  287. return;
  288. }
  289. var url = $(obj).attr('data-url');
  290. //iframe窗
  291. layer.open({
  292. type: 2,
  293. title: '移动文档',
  294. fixed: true, //不固定
  295. shadeClose: false,
  296. shade: layer_shade,
  297. closeBtn: 3,
  298. maxmin: false, //开启最大化最小化按钮
  299. area: ['480px', '360px'],
  300. content: url
  301. });
  302. }
  303. /**
  304. * 批量审核
  305. */
  306. function batch_check(obj, name) {
  307. var url = $(obj).attr('data-url');
  308. var a = [];
  309. $('input[name^='+name+']').each(function(i,o){
  310. if($(o).is(':checked')){
  311. a.push($(o).val());
  312. }
  313. })
  314. if(a.length == 0){
  315. layer.alert('请至少选择一项', {
  316. shade: layer_shade,
  317. area: ['480px', '190px'],
  318. move: false,
  319. title: '提示',
  320. btnAlign:'r',
  321. closeBtn: 3,
  322. success: function () {
  323. $(".layui-layer-content").css('text-align', 'left');
  324. }
  325. });
  326. return;
  327. }
  328. // title = '批量审核';
  329. // btn = ['确定', '取消']; //按钮
  330. // // 删除按钮
  331. // layer.confirm(title, {
  332. // title: false,
  333. // btn: btn //按钮
  334. // }, function () {
  335. layer_loading('正在处理');
  336. $.ajax({
  337. type: "POST",
  338. url: url,
  339. data: {ids:a, _ajax:1},
  340. dataType: 'json',
  341. success: function (data) {
  342. layer.closeAll();
  343. if(data.code == 1){
  344. layer.msg(data.msg, {icon: 1});
  345. window.location.reload();
  346. }else{
  347. layer.alert(data.msg, {icon: 2, title:false});
  348. }
  349. },
  350. error:function(e){
  351. layer.closeAll();
  352. layer.alert(e.responseText, {icon: 2, title:false});
  353. }
  354. });
  355. // }, function (index) {
  356. // layer.closeAll(index);
  357. // });
  358. }
  359. /**
  360. * 获取修改之前的内容
  361. */
  362. function get_aids()
  363. {
  364. return aids;
  365. }
  366. </script>
  367. {include file="public/footer" /}