<!--#include file="../inc/config.asp"-->
<%
Response.Buffer = True 
Response.ExpiresAbsolute = Now() - 1 
Response.Expires = 0 
Response.CacheControl = "no-cache" 
Response.AddHeader "Pragma", "No-Cache" 

if request("pat")="" then
paths=cf_root&"skins/"&cf_skin
else
paths=request("pat")
end if

%>
<html>
<head>
<title>模板选择</title>
<base target="_self" />
<style type="text/css">
body,td{font-size:12px;}
body{padding:10px; margin:0px}
html{overflow-x:hidden}
img{border:0px;}
a:link{color:#000000; text-decoration:none}
a:visited{color:#000000; text-decoration:none}
.temp ul{margin:0px; padding:0px;}
.temp ul li{float:left; border-bottom:1px solid #DDDDDD; margin-left:10px; line-height:28px; width:180px}
</style>
</head>

<body>
<table border="0" width="100%" bgcolor="#DDDDDD" cellpadding="0" cellspacing="1">
   <tr onmouseover=this.bgColor='#EEFEED'; onmouseout=this.bgColor='#ffffff';>
      <td bgcolor='#ffffff'><img src="ext/folder.gif" align="absmiddle" /><a href="?">返回根目录</a></td>
   </tr>
  <tr>
    <td  bgcolor='#ffffff'>
	  <div class="temp">
	    <ul>
		<%
		'文件夹
Set Fso=CreateObject("Scripting.Filesystemobject")
	Set FsoFolder=Fso.GetFolder(Server.mappath(paths))
	Set Fsocontent=FsoFolder.files
	For Each Fsocount In FsoFolder.Subfolders
%>
		 <li><a href="cw_temp.asp?pat=<%=paths%><%=Fsocount.Name%>"><img src="ext/folder.gif" align="absmiddle" width="25" height="25" /><%=Fsocount.Name%></a></li>
		 <%next%>
		 <%
For Each f2 in FsoFolder.files
Select Case Lcase(Right(f2.Name,3))
			Case "htm","tml"
			     picsrc="html"
			Case ".js"
			     picsrc="js"
			Case "bmp","jpg","gif","png","swf","css","txt","asp","vbs","xml","xsl"
			     picsrc=right(f2.name,3)
			Case Else
			picsrc="folder"
End Select
%>
         <li><a href="#" onClick="outfilename('<%=f2.Name%>')"><img src="ext/<%=picsrc%>.gif" align="absmiddle" width="25" height="25" /><%=f2.Name%></a></li>
		 <%next%>
		</ul>
	  </div>
	  <div style="clear:both; margin-top:5px;"></div>
	</td>
  </tr> 
</table>
<%
Set Fso=Nothing
Set F=Nothing
%>  

<script language="javascript" type="text/javascript">  
function outfilename(msgbody)
{
window.returnValue = msgbody;
this.close();
}
</script>
</body>
</html>