<!--#include file="template_Fun.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="<%=sitepath%>css/bootstrap.min.css" rel="stylesheet">
<link href="<%=sitepath%>css/font-awesome.min.css" rel="stylesheet">
<link href="<%=sitepath%>css/animate.min.css" rel="stylesheet">
<link href="<%=sitepath%>css/style.min.css" rel="stylesheet">
<link href="<%=sitepath%>plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<link href="<%=sitepath&adminPath%>css/adminstyle.css" rel="stylesheet">
<script src="<%=sitepath%>js/jquery.min.js"></script>
<!--[if lte IE 9]>
<script src="<%=sitepath%>js/respond.min.js"></script>
<script src="<%=sitepath%>js/html5.js"></script>
<![endif]-->
</head>
<div class="wrapper wrapper-content">
  <div class="row">
    <div class="col-sm-3">

<div class="panel">
								<div class="panel-heading">
									<h3 class="panel-title"><a href="?parentPath=/Template/pc/">PC模板目录</a></h3>
									<div class="panel-aj">
										<button type="button" class="btn-toggle-collapse"><i class="fa fa-chevron-down"></i></button>
										<button type="button" class="btn-remove"><i class="fa fa-times"></i></button>
									</div>
								</div>
<div class="panel-body">
<div class="panel-body no-padding">		
<div class="ibox float-e-margins">
        <div class="ibox-content">
            <ul class="folder-list" style="padding: 0">
              <%call folder_list(pctempath,0)%>
            </ul>
        </div>        
      </div>
</div>
</div>
    </div>
<br/>
<div class="panel">
								<div class="panel-heading">
									<h3 class="panel-title"><a href="?parentPath=/Template/wap/">Wap模板目录</a></h3>
									<div class="panel-aj">
										<button type="button" class="btn-toggle-collapse"><i class="fa fa-chevron-down"></i></button>
										<button type="button" class="btn-remove"><i class="fa fa-times"></i></button>
									</div>
								</div>
<div class="panel-body">
<div class="panel-body no-padding">		
<div class="ibox-content show-grid">
            <ul class="folder-list" style="padding: 0">
              <%call folder_list(Waptempath,0)%>
            </ul>
        </div>
</div>
</div>
    </div>

	</div>
	
    <div class="col-sm-9">

<div class="panel">
								<div class="panel-heading">
									<h3 class="panel-title">当前文件夹</h3>
									<div class="panel-aj">
										<button type="button" class="btn-toggle-collapse"><i class="fa fa-chevron-down"></i></button>
										<button type="button" class="btn-remove"><i class="fa fa-times"></i></button>
									</div>
								</div>
<div class="panel-body">
<div class="panel-body no-padding">		
<div class="ibox float-e-margins">

<div class="ibox-content">
          <div class="col-sm-12">
           <div class="col-sm-4">
            <h5>当前路径：<%=parentPath%></h5>
            </div>
            <div class="col-sm-4">
            PC模板文件夹
            <input type="text" name="PchtmlPath" id="PchtmlPath" style="width:60px" value="<%=zset.PchtmlPath%>"  onmouseover="layer.tips('防止直接下载模板',this);">
            <button onClick="savepchtmlpath()">保存</button>
            </div>
            <div class="col-sm-4">
            WAP模板文件夹
            <input type="text" name="WaphtmlPath" id="WaphtmlPath"  style="width:60px" value="<%=zset.WaphtmlPath%>"  onmouseover="layer.tips('防止直接下载模板',this);">
             <button onClick="savewaphtmlpath()">保存</button>
            </div>
          </div>
          <%if not isnul(parentPath) then%>
          <button class="btn  btn-primary" type="button" onClick="location.href='template_add.asp?parentPath=<%=parentPath%>'"><i class="fa fa-plus"></i>　当前目录添加</button>
          <button  class="btn"  id="divAddFiles"></button>
          <%else%>
          <button class="btn  btn-primary" type="button" ><i class="fa fa-plus"></i>　请选择左侧对应目录</button>
          <%end if%>
          <button onClick="location.reload()" class="btn btn-primary1" type="button"><i class="fa fa-refresh"></i>　刷新</button>
          <div id="moswf"></div>
          <table id="table"
           data-toggle="table"
           data-pagination="true"  
           data-id-field="id"       
           data-id-table="advancedTable"
           data-page-size="50"
           data-page-list="[50,100,200]">
            <thead>
              <tr>
                <th  data-field="id" data-sortable="tableid">ID</th>
                <th data-sortable="true">文件名</th>
                <th data-sortable="true">大小</th>
                <th data-sortable="true">时间</th>
                <th class="tablename" data-field="edit">操作</th>
              </tr>
            </thead>
            <%if isnul(parentPath) then
				   echo "<tr><td colspan='6'>未选择目录</td></tr>"	
				else  
				  fileListArray= getFileList(parentPath)
				  if instr(fileListArray(0),",")>0 then	
					  for  i = 0 to ubound(fileListArray)
						  fileAttr=split(fileListArray(i),",")
						  echo"<tr>"&vbcrlf  
						  
						  echo "<td>"&i+1&"</td>"
							if ifstrin("jpg,jpeg,png,gif,",fileAttr(1)) then
						 		echo "<td class='social-avatar'><a title='"&fileAttr(0)&"' rel='group1' href="&fileAttr(4)&" class='fancybox img-circle' ><img src="&fileAttr(4)&"></a>"
							elseif ifstrin("htm,html,css,js,asp,",fileAttr(1)) then
								echo "<td><a  target=""_blank"" href="""&fileAttr(4)&""">"&fileAttr(0)&"</a></td>"
							else
								echo "<td>"&fileAttr(0)&"</td>"
							end if
						  echo "<td>"&fileAttr(2)&"</td>"&vbcrlf  
						  echo "<td>"&fileAttr(3)&"</td>"&vbcrlf  
							
							if ifstrin("jpg,jpeg,png,gif,",fileAttr(1)) then
						  		echo "<td><a title='"&fileAttr(0)&"' rel='group2' href="&fileAttr(4)&" class='fancybox' >查看</a> | "&vbcrlf  
							elseif ifstrin("xml,htm,html,css,js,asp,",fileAttr(1)) then
						  		echo "<td><a href=""Template_Edit.asp?filepath="&fileAttr(4)&"&filename="&fileAttr(0)&""" class=""txt_C1"" >编辑</a> | "&vbcrlf  
							else
								echo "<td>"&vbcrlf  
							end if
						 echo "<a onclick=rename('"&fileAttr(4)&"','"&fileAttr(0)&"') class=""txt_C1"">改名</a> | "	&vbcrlf  
						  echo "<a onclick=delfile('"&fileAttr(4)&"') class=""txt_C1"" >删除</a></td>"&vbcrlf  
						  echo "</tr>"&vbcrlf  
					  next		
				  end if			  
				  if not instr(fileListArray(0),",")>0 then
					  echo "<tr bgcolor=""#FFFFFF"" align=""center""><td></td><td>空文件夹,<a href=""javascript:history.go(-1)"" class=""txt_C1"">返回</a></td></tr>"
				  end if	
				end if
				%>
          </table>
        </div>

      </div>
</div>
</div>
      
    </div>

    </div>
</div>
</div>
<body class="gray-bg">
<script src="<%=sitepath%>js/klorofil-common.js"></script>
<script src="<%=sitepath%>js/bootstrap.min.js"></script> 
<script src="<%=sitepath%>plugins/bootstrap-table/bootstrap-table.min.js"></script> 
<script src="<%=sitepath%>plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> 
<script src="<%=sitepath%>plugins/layer/layer.min.js"></script> 
<script src="<%=sitepath%>plugins/fancybox/jquery.fancybox.js"></script>
<link href="<%=sitepath%>plugins/fancybox/jquery.fancybox.css " rel="stylesheet">
<link href="<%=sitepath&adminpath%>inc/swfupload/js/swfupload.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<%=sitepath&adminpath%>inc/swfupload/js/swfupload.min.js"></script> 
<script type="text/javascript" src="<%=sitepath&adminpath%>inc/swfupload/js/swfupload.handler.min.js"></script> 
<script type="text/javascript" src="<%=sitepath&adminpath%>inc/swfupload/js/swfupload.callback.min.js"></script> 
 
<script src="<%=sitepath&adminPath%>js/content.min.js"></script> 
<script src="<%=sitepath&adminPath%>js/adminjs.js"></script> 

</BODY>
</HTML>