<%@ LANGUAGE = "VBScript.Encode" codepage="65001" %>
<%
Server.ScriptTimeOut=999999
%>
<html>
<head>
<title>上传反馈信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<body bgcolor="#666666">
<table width="100%" border="0" height="100%">
  <tr>
    <td>
      <table width="80%" height="200" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#000000">
        <tr> 
          <td valign="middle"> <table width="99%" border="0" align="center" bgcolor="#FFFFFF" height="99%" cellpadding="20">
              <tr> 
                <td> 
 <!--#include FILE="upload_5xsoft.inc"-->
 <%
	set upload=new upload_5xsoft
	set file=upload.file("file1")
	if session("uppath")="" then uppath="other"
		uppath=session("uppath")
		ProdId=session("ProdId")
		frmname=session("frmname")
	if uppath="" then 
		response.write "<BLOCKQUOTE>参数错误！请返回前一个页面<b>刷新后</b>上传！"
		Response.write "<br><A HREF='javascript:history.go(-1)'><b>点击返回,然后刷新页面</b></A></BLOCKQUOTE>"
		response.end
	end if
	if file.fileSize>0 then
   	 '自动生成文件名
    	filename=request.cookies("kkadmin")&"."
    	filenameend=file.filename
    	filenameend=split(filenameend,".")
    	filename=filename&filenameend(1)
     	if filenameend(1)="csv" or filenameend(1)="CSV"   or filenameend(1)="MDB"  OR filenameend(1)="mdb"  then
		else
		response.write "<BLOCKQUOTE>请确认上传的文件类型为：CSV或者mdb格式 "
		Response.write "<br><br>操作失败！<A HREF='javascript:history.go(-1)'><b>点击返回</b></A></BLOCKQUOTE>"
		response.end
	end if
	file.saveAs Server.mappath("../mall/xlsdata/"&filename)
%>
<%if session("prodid")="one" then%>
<script language=JavaScript>
function inserttext(){
<%
	response.write "self.opener.myform."&frmname&".value =""xlsdata/"&filename&""";"
%>
}
inserttext();
alert("文件上传成功");
window.close();
</script>
<% else %>
<%
  response.write "<br><center><font size=2 color=red>图片上传成功，请复制下边剪切板中内容而后粘贴到商品图片剪切板内!</font></center><br>"
  response.write "<center><input type=text size=26 value='images/"&uppath&"/"&filename&"'><button onclick=window.clipboardData.setData('text',this.previousSibling.value)>复制</button><br><br><a href='javascript:window.close()'><font color=red size=2>关闭窗口</font></a></center>"
  response.end
%>
<% end if%>
<%

else
    response.write "文件内容不能为空"
    response.write "<a href='javascript:history.go(-1);'>返回"
end if
set upload=nothing
response.write "<br>"
%>
                </td>
              </tr>

            </table></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body> 
</html>
<%
session("uppath")=""
session("ProdId")=""
session("frmname")=""
%> 

