<!--#include file="Conn.Asp"-->
<!--#include file="INC/UbbCode.Asp"-->
<!--#include file="Admin/Sql_Erro.asp"-->
<%if SystemPin<>"1" then
response.write("<script>alert('评论功能已被管理员关闭!');javascript:history.go(-1)</script>")
response.end
end if%>
<%
Dim PicID
PicID=request.QueryString("VoteID")
If PicID="" or not IsNumeric(PicID) Then
	Response.Write ("访问错误!")
	Response.End
End If
%>
<%
sql="select * from [desktop] where DesktopID="&PicID
set rs=server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,1
if not rs.bof and not rs.eof then
end if
rs.close
set rs=nothing
%>
<%
Dim action,notUser,notHits,notContent,IswNumsUser,IswNumsHits,IswNumsContent,IswNumsIP
if request("Action")="Send" then
ArticleID=Request.QueryString("VoteID")
notUser=request.form("notUser")
notHits=request.form("notHits")
notContent=request.form("notContent")
IP=Request("REMOTE_ADDR")

If notUser="" or notHits="" or notContent="" Then
	Response.Write ("<script>alert('友情提示!\n\n网友名称和评论内容未填!');history.back();</script>")
	Response.end
End If
If len(notContent)>200 Then
	Response.Write ("<script>alert('评论内容超过200字符!\n\n请返回重输入!');history.back();</script>")
	Response.end
End If
if Instr(notUser,">")>0 or Instr(notUser,"<")>0 or Instr(notUser,"=")>0 or Instr(notUser,"%")>0 or Instr(notUser,chr(32))>0 or Instr(notUser,"?")>0 or Instr(notUser,"&")>0 or Instr(notUser,";")>0 or Instr(notUser,",")>0 or Instr(notUser,"'")>0 or Instr(notUser,chr(34))>0 or Instr(notUser,chr(9))>0 or Instr(notUser,"")>0 or Instr(notUser,"$")>0 then
	Response.Write ("<script>alert('友情提示!\n\n网友名称含有非法字符!');history.back();</script>")
	Response.end
else
	notUser=Trim(notUser)
end if

sql="select * from [Pic_Review]"
set rs=server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,3
rs.addnew
rs("IswNumsClass")=PicID
rs("IswNumsUser")=notUser
rs("IswNumsHits")=notHits
rs("IswNumsContent")=notContent
rs("IswNumsIP")=IP
rs.update
rs.close
set rs=server.createobject("adodb.recordset")
sql="update desktop set Desktopre=Desktopre+1 where Desktopid="&request("Voteid")
conn.execute sql
set rs=nothing  
conn.close
set rs=nothing
response.redirect("Vote.Asp?VoteID="& PicID &"")
end if
conn.Close
set conn=nothing
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/Style.Css" rel="stylesheet" type="text/css">
</head>
<script language="JavaScript">
<!--
function form_onsubmit() {
if (document.form.notUser.value=="")
	{
	  alert("友情提示!\n\n请填写您的昵称!")
	  document.form.notUser.focus()
	  return false
	 }
if (document.form.notContent.value=="")
	{
	  alert("友情提示!\n\n请填写您要发表的评论内容!")
	  document.form.notContent.focus()
	  return false
	 }
}
// -->
</script>
<body topmargin="0" leftmargin="5">
<table border="0" width="495" cellspacing="0" cellpadding="0">
<tr>
<td width="96%" height="10" colspan="2"></td>
</tr>
<FORM name="form" method="post" action="VoteSend.Asp?Action=Send&VoteID=<%=PicID%>" onsubmit="return form_onsubmit()">
<tr>
<td width="96%" align="center">
<table border="0" cellpadding="0" cellspacing="0" width="102%">
<TR> 
<TD width="70">网友昵称：</TD>
<TD width="423"><INPUT class="an" name="notUser" maxlength="10" size="20" value="匿名网友"> 评论内容限制200字符</TD>
</TR>
<TR> 
<TD width="70">投票星级：</TD>
<TD width="423"><INPUT type="radio" value="1" name="notHits"><IMG src="IMAGES/Review/1star.gif">&nbsp;<INPUT type="radio" value="2" name="notHits"><IMG src="Images/Review/2star.gif">&nbsp;<INPUT type="radio" value="3" name="notHits" checked><IMG src="Images/Review/3star.gif">&nbsp;<INPUT type="radio" value="4" name="notHits"><IMG src="Images/Review/4star.gif">&nbsp;<INPUT type="radio" value="5" name="notHits"><IMG src="Images/Review/5star.gif"></TD>
</TR>
<TR>
<TD width="70">评论内容：</TD>
<TD width="423">
<TEXTAREA name="notContent" rows="4" cols="80"></TEXTAREA></TD>
</TR>
<TR> 
<TD></TD>
<TD height="25"><INPUT class="input1" type="submit" name="SUBMIT" value=" 发表投票评论 ">&nbsp;<INPUT class="input1" type="reset" value=" 清除重写 ">&nbsp;<a href="javascript:history.go(-1)"><u><b>返回上一页</b></u></a></TD>
</tr>
</table>
</td>
</tr>
</form>
</table>
</body>
</html> 
