<!--#Include File="Connection.Asp"-->
 
<!--#Include File="JaInc/Upload_Inc.Asp"-->
<%
Dim JaZ,B
Set JaZ = new q_zone
B = JaZ.JaKillStr(Request.QueryString("JaUid"))
If B="" Then
B= "2"
End If

Dim JaCheckIsLog
JaCheckIsLog = JaZ.JaIsUser(B)
If JaCheckIsLog = "yes" Then
Dim Jatitle,Jatype,Jahassign,Jacontent,strLens
Dim JaBlog,JaInSQL
Dim JaVicNum,UpPh
JaVicNum = SESSION("VicNum")
UpPh = Session("ufpName")
If UpPh="" Then UpPh="defeat.gif"
Jatitle = JaZ.JaKillStr(Request.Form("photoname"))
Jatype = Trim(Request.Form("albumtype"))
Jahassign = Trim(Request.Form("photofrom"))
Jacontent = JaZ.JaKillStr(Trim(Request.Form("photomemo")))

strLens = Len(Jacontent)
If strLens>75 Then
Response.Write "<script language=javascript>alert('照片描述的长度在75个汉字以内!');"
Response.Write "window.document.location.href='javascript:history.go(-1)';</script>"
Else
if session("ufpname")<>"" then
	JaInSQL = "(JaAlbumID,JaUid,JaPhotoName,JaPhotoFrom,JaPhotoUrl,JaPhotoMemo) Values("&Jatype&",'"&JaVicNum&"','"&Jatitle&"','"&Jahassign&"','"&UpPh&"','"&Jacontent&"')"
	JaZ.JaInsert "JaPhoto",JaInSQL
	Session("ufpName") = ""
	Response.Write "<script language=javascript>alert('添加成功!');"
	Response.Write "window.document.location.href='AlbumAll.asp?JaUid="&JaVicNum&"';</script>"
else
	Response.Write "<script language=javascript>alert('对不起,您的图片未上传成功.您暂时还不能添加!!');"
		Response.write "javascript:history.go(-1);"&Chr(13)
		Response.write "</script>" & Chr(13)
end if
End if
Else
Response.Write "<script language=javascript>alert('你没有权限观看该页面!');"
Response.Write "window.document.location.href='javascript:history.go(-1)';</script>"
End if
%>
