<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>报告错误</title>
<style type="text/css">
<!--
body {
	font-size:12px;
	color:#1E7ACE;
	background:#fff;
	text-align:center;
	line-height:22px;
}
fieldset {
	padding:10px;
	margin-top:5px;
	border:1px solid #1E7ACE;
	background:#fff;
}
fieldset legend {
	color:#1E7ACE;
	font-weight:bold;
	padding:3px 20px 3px 20px;
	border:1px solid #1E7ACE;	
	background:#fff;
}
.submit {
	border: 1px solid #1E7ACE;
	background-color: #FFFFFF;
}
-->
</style>
</head>
<BODY bottomMargin=20 Margin=0>
<!--#include file="../Conn.asp" -->
<!--#include file="../Function/Function.asp" -->
<%sub AddSave()
IF GetConfig("webmode")=1 Then 
IF ChecKWcafesIP(UsersIP())=True Then
ErrorsUsers=session("WcafesName")
UsersGroupx=RS("UsersGroup")
else
if Request.Cookies("YWNTUserCookie")("UserName")="" then
Call UsersLogin()
response.end
else
Set RS=Server.CreateObject(YWNT_TMS_RS)
SQL="select UsersName,UsersGroup from YWNT_TMS_Users Where UsersName='"&Request.Cookies("YWNTUserCookie")("UserName")&"'"
Rs.open sql,Conn,1,1
If not RS.Eof Then
ErrorsUsers=RS("UsersName")
UsersGroupx=RS("UsersGroup")
End If
RS.Close
Set RS = Nothing
end if
end if
if GetUsersGroup("GroupErrors",UsersGroupx)=0 then
	response.write"<script>alert('您所在用户组无权报告错误！');window.close();</Script>"
	response.end
end if
else
ErrorsUsers="游客"
end if
Set Rs=Server.CreateObject(YWNT_TMS_RS)
sql="select * from YWNT_TMS_UsersErrors"
Rs.open sql,Conn,1,3
RS.AddNew
RS("ErrorsUsers")=ErrorsUsers
RS("ErrorsUsersIP")=UsersIP()
RS("ErrorsDate")=Now()
RS("ErrorsMovie")=NoSqlHack(Request.Form("ErrorsMovie"))
RS("ErrorsReasons")=NoSqlHack(Replacehtml(Request.Form("ErrorsConten")))
Rs.Update
Rs.Close
Set Rs = Nothing
   response.write "<script>alert('该信息成功发送，我们收到后马上进行处理!');window.close();</Script>"
end sub
Action=Trim(Request.QueryString("Action"))
Select Case Action
Case "AddSave"
	call AddSave()
Case else
	call Add() 
End Select
sub Add()%>
<script language="JavaScript" type="text/javascript">
function MovieErrors(form) {
if (form.ErrorsConten.value=='') {
alert("请填写报错原因！");
form.ErrorsConten.focus()
return false;
}
}
</script>

    <form action="Users_MovieErrors.asp?Action=AddSave" method="post"  onSubmit="return MovieErrors(this);">
   <fieldset>
      <legend>影片报错</legend>
      <p><textarea rows="9" name="ErrorsConten" cols="60" class="submit"></textarea></p>
      <p><input name="ErrorsMovie" type="hidden" value="<%=Request.QueryString("ErrorsMovie")%>" /><input type="submit" value="提 交" class="submit" name="submit"></p>
	  <p>请你在上面填写你要报告的<b>《错误原因》</b></p>
  </fieldset>
  	  </form>
<%end sub
call connclose()%>
</body>
</html>