Ei kuvausta
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 8.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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">
  6. {include file="filemanager/bar" /}
  7. <div class="flexigrid">
  8. <div class="hDiv">
  9. <div class="hDivBox">
  10. <table cellspacing="0" cellpadding="0" style="width: 100%">
  11. <thead>
  12. <tr>
  13. <th abbr="" axis="col3" class="">
  14. <div class="" style="padding-left:15px ">文件名</div>
  15. </th>
  16. <th abbr="" axis="col3" class="w200">
  17. <div class="tc">文件大小</div>
  18. </th>
  19. <th abbr="" axis="col6" class="w100">
  20. <div class="tc">更新时间</div>
  21. </th>
  22. <th axis="col1" class="w120">
  23. <div class="tc">操作</div>
  24. </th>
  25. </tr>
  26. </thead>
  27. </table>
  28. </div>
  29. </div>
  30. <div class="bDiv" style="height: auto;">
  31. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  32. <table style="width: 100%">
  33. <tbody>
  34. {empty name="list"}
  35. <tr>
  36. <td class="no-data" align="center" axis="col0" colspan="50">
  37. <div class="no_row">
  38. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  39. </div>
  40. </td>
  41. </tr>
  42. {else/}
  43. {foreach name="list" item="vo" key="k" }
  44. <tr>
  45. <td style="width: 100%">
  46. <div style="text-align: left; padding-left: 15px;">
  47. {if condition="in_array($vo['filetype'], array('dir','dir2'))"}
  48. <a href="{:url('Filemanager/index', array('activepath'=>replace_path($vo.filepath)))}"><img src="__SKIN__/images/{$vo.icon}" border="0" width="16" height="16" align="absmiddle" class="flt_u">&nbsp;{$vo.filename}</a>
  49. {else /}
  50. {notempty name="$vo.icon"}
  51. <img class="flt_u" src="__SKIN__/images/{$vo.icon}" border="0" width="16" height="16" align="absmiddle" {if condition="!empty($vo.filepath) AND 'image' == $vo.filemine"}onmouseover="layer_tips=layer.tips('<img src=__ROOT_DIR__{$vo.filepath}?v={php}echo time();{/php} class=\'layer_tips_img\'>',this,{tips: [3, '#fff'],skin:'layer-yourskin-mt0'});"{/if} onmouseout="layer.close(layer_tips);">
  52. {/notempty}
  53. &nbsp;
  54. {eq name="$vo['filemine']" value='image'}
  55. <a href="__ROOT_DIR__{$vo['filepath']}?v={php}echo time();{/php}" target="_blank">{$vo.filename}</a>
  56. {else /}
  57. <a href="{:url('Filemanager/edit',array('filename'=>$vo['filename'], 'activepath'=>replace_path(dirname($vo['filepath']))))}">{$vo.filename}</a>
  58. {/eq}
  59. {/if}
  60. {$vo.intro}
  61. </div>
  62. </td>
  63. <td class="">
  64. <div class="w200 tc">
  65. {$vo.filesize|default=''}
  66. </div>
  67. </td>
  68. <td class="">
  69. <div class="w100 tc">
  70. {notempty name="$vo.filetime"}
  71. {$vo.filetime|date='Y-m-d',###}
  72. {/notempty}
  73. </div>
  74. </td>
  75. <td class="operation">
  76. <div class="w120 tc">
  77. {eq name="$vo['filemine']" value='image'}
  78. {if condition="in_array($vo['filetype'], $replaceImgOpArr)"}
  79. {eq name="$Think.const.CONTROLLER_NAME.'@replace_img'|is_check_access" value="1"}
  80. <a href="{:url('Filemanager/replace_img',array('filename'=>$vo['filename'], 'activepath'=>replace_path(dirname($vo['filepath']))))}" class="btn blue">替换</a>
  81. {/eq}
  82. {/if}
  83. {else /}
  84. {if condition="in_array($vo['filetype'], $editOpArr)"}
  85. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  86. <a href="{:url('Filemanager/edit',array('filename'=>$vo['filename'], 'activepath'=>replace_path(dirname($vo['filepath']))))}" class="btn blue">编辑</a>
  87. {/eq}
  88. {/if}
  89. {/eq}
  90. </div>
  91. </td>
  92. </tr>
  93. {/foreach}
  94. {/empty}
  95. </tbody>
  96. </table>
  97. </div>
  98. <div class="iDiv" style="display: none;"></div>
  99. </div>
  100. <div class="tDiv">
  101. <div class="tDiv2">
  102. {eq name="'Filemanager@newfile'|is_check_access" value="1"}
  103. <div class="fbutton">
  104. <a href="{:url('Filemanager/newfile', array('activepath'=>replace_path($activepath)))}" class="layui-btn layui-btn-primary">
  105. <span class="red">新建文件</span>
  106. </a>
  107. </div>
  108. {/eq}
  109. <div class="fbuttonr" style=" margin-right: 15px; ">
  110. <div class="total">
  111. <h5>共有{$list|count}条数据</h5>
  112. </div>
  113. </div>
  114. </div>
  115. <div style="clear:both"></div>
  116. </div>
  117. <!--分页位置-->
  118. </div>
  119. </div>
  120. <form class="none" id="post_del" method="POST" action="">
  121. <input type="hidden" name="filename" value="">
  122. <input type="hidden" name="activepath" value="">
  123. </form>
  124. <script type="text/javascript">
  125. $(document).ready(function(){
  126. // 表格行点击选中切换
  127. $('#flexigrid > table>tbody >tr').click(function(){
  128. $(this).toggleClass('trSelected');
  129. });
  130. // 点击刷新数据
  131. $('.fa-refresh').click(function(){
  132. location.href = location.href;
  133. });
  134. });
  135. function delfilename(obj, formid) {
  136. layer.confirm('此操作不可恢复,确认删除?', {
  137. shade: layer_shade,
  138. area: ['480px', '190px'],
  139. move: false,
  140. title: '提示',
  141. btnAlign:'r',
  142. closeBtn: 3,
  143. btn: ['确定', '取消'] ,//按钮
  144. success: function () {
  145. $(".layui-layer-content").css('text-align', 'left');
  146. }
  147. }, function(){
  148. // 确定
  149. var form = $('#post_del');
  150. var filename = $(obj).attr('data-filename');
  151. var activepath = $(obj).attr('data-activepath');
  152. var url = $(obj).attr('data-url');
  153. $(form).find('input[name=filename]').val(filename);
  154. $(form).find('input[name=activepath]').val(activepath);
  155. $(form).attr('action', url);
  156. layer_loading('正在处理');
  157. $('#post_del').submit();
  158. }, function(index){
  159. layer.close(index);
  160. return false;// 取消
  161. }
  162. );
  163. }
  164. </script>
  165. {include file="public/footer" /}