<!--#Include File="Connection.Asp"-->
 
<!--#include FILE="JaInc/Upload_Inc.asp"-->
<%
Dim JaZ,C,flyN,B,cur
Set JaZ = new q_zone
B = JaZ.JaKillStr(Request.QueryString("JaUid"))
If B="" Then
B= "2"
End If
C=Split(JaZ.GetHeadElement("*",B,"JaFaceSet",""),"<><><>")
flyN = split(Trim(C(2)),"|")
If Cint(Trim(C(1)))<>0 Then
cur = "CURSOR:url('cur/"&C(1)&".ani');"
Else
cur = ""
End If

Dim JaCheckIsLog
JaCheckIsLog = JaZ.JaIsUser(B)
If JaCheckIsLog <> "yes" Then
Response.Write "<script language=javascript>alert('你没有权限观看该页面!');"
Response.Write "window.document.location.href='javascript:history.go(-1)';</script>"
Else

Dim upload,file,upfilename,upfileext,ufp,FormName,UpLoadSize
UpLoadSize = 500
set upload=new upload_5xsoft
set file=upload.file("file1")
if file.fileSize<10 or file.fileSize>UpLoadSize*1024 then
  Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('上传文件超过了"&UpLoadSize&"K的大小,请返回!');" & Chr(13)
		Response.write "javascript:history.go(-1);"&Chr(13)
		Response.write "</script>" & Chr(13)
    Response.End
end if
upfilename = split(file.FileName,".")
upfileext = upfilename(ubound(upfilename))
if lcase(upfileext)<>"jpg" and lcase(upfileext)<>"gif" then
  Response.write "<script language='javascript'>" & chr(13)
		Response.write "alert('只能上传JPG和GIF图片!');" & Chr(13)
		Response.write "javascript:history.go(-1);"&Chr(13)
		Response.write "</script>" & Chr(13)
    Response.End
end if
ufp="Ja"&year(now)&month(now)&day(now)&hour(now)&minute(now)&second(now)&"."&upfilename(ubound(upfilename))
file.saveas Server.mappath("UpLoad/"&ufp)

Session("ufpName") = ufp
Session("Add")="Yes"
%>
<html>
<head>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JaZone</title>
<link type="text/css" rel="stylesheet" href="Style/<%=Trim(C(5))%>/css.css">
</head>
<body leftmargin="2" topmargin="2" style="background-color:transparent;<%=cur%>" text="#cccccc" link="#cccccc" vlink="#cccccc" alink="#cccccc">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
<%
If Session("ufpName")<>"" Or Session("ufpName")<>ufp Then
Response.Write "图片上传成功!"
End if
%></td>
  </tr>
</table>
</body>
</html>
<%
End if
%>
