<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../include/connect.asp" -->
<%
username=Checkstr(request.querystring("username"))
viewmode=Checkstr(request.querystring("viewmode"))
groupid=Checkstr(request.querystring("groupid"))
photoid=Checkstr(request.querystring("photoid"))
if photoid="" or username="" then
response.end()
else
      set rs = server.CreateObject("adodb.recordset")
	  sql="select * from Show5_Photocomment where CommentID is null"
	  rs.open sql,cn,1,3
	  rs.addnew
	  rs("Personaconid")=request.form("personaconid")
	  rs("Photoid")=photoid
	  rs("Commentuser")=request.form("commentuser")
	  rs("Comment")=request.form("comment")
	  rs.update
	  rs.close
	  set rs=nothing
	  
	  set rs = server.CreateObject("adodb.recordset")
	  sql="select * from Show5_ALLPhoto where PhotoID="&photoid&""
	  rs.open sql,cn,1,3
	  rs("Commentnum")=rs("Commentnum")+1
	  rs.update
	  rs.close
	  set rs=nothing
	  response.redirect ("photolist.asp?Username="&username&"&viewmode="&viewmode&"&GroupID="&groupid&"&seq=#"&photoid&"")
end if
%>
