<!--#include file="conn.asp"-->
<!--#include file="ConnUser.asp"-->
<!--#include file="config.asp"-->
<!--#include file="char.inc"-->
<!--#include file="md5.asp"-->
<!--#include file="ChkURL.asp"-->

<%
ComplainID=ChkRequest(request("ComplainID"),1)	'防注入

Topic=checkstr(request.form("Topic"))
ComplainClass=checkstr(request.form("ComplainClass"))
b_name=checkstr(request.form("b_name"))
b_person=checkstr(request.form("b_person"))
b_tel=checkstr(request.form("b_tel"))
b_adress=checkstr(request.form("b_adress"))

YourName=checkstr(request.form("YourName"))
TelePhone=checkstr(request.form("TelePhone"))
Address=checkstr(request.form("Address"))
mobile=checkstr(request.form("mobile"))
Email=checkstr(request.form("Email"))
ClassID=(request.form("ClassID"))
e_password=checkstr(request.form("e_password"))

content=trim(htmlencode1((request.form("content"))))
content=replace(content,"<p> ","")
content=replace(content,"<P> ","")
ComplainIP=checkstr(Request.serverVariables("REMOTE_ADDR"))
Response.cookies(echsys)("content")=content


Function gen_key(digits) 

'Create and define array 
dim char_array(50) 
char_array(0) = "0" 
char_array(1) = "1" 
char_array(2) = "2" 
char_array(3) = "3" 
char_array(4) = "4" 
char_array(5) = "5" 
char_array(6) = "6" 
char_array(7) = "7" 
char_array(8) = "8" 
char_array(9) = "9" 

'Initiate randomize method for default seeding 
randomize 

'Loop through and create the output based on the the variable passed to 
'the function for the length of the key. 
do while len(output) < digits 
num = char_array(Int((9 - 0 + 1) * Rnd + 0)) 
output = output + num 
loop 

'Set return 
gen_key = output 
End Function 

'Write the results to the browser, currently setting a 13 digit key 
'response.write "<pre>" & gen_key(12) & "</pre>" & vbcrlf 


dim byte1
byte1=split(byteType,"|")

for i=0 to ubound(byte1)
	content=replace(content,trim(byte1(i)),"***")
next

dim byte2
byte2=split(byteipType,"|")

for i=0 to ubound(byte2)
if Request.serverVariables("REMOTE_ADDR")=byte2(i) then
	Show_Err("对不起，你的IP地址已被锁定，请联系管理员！！！。<br><br><a href='javascript:history.back()'>返回</a>")
	Response.cookies(echsys)("content")=""
	Response.End 
end if
next

dim byte3
byte3=split(bytezfType,"|")

for i=0 to ubound(byte3)
if Instr(request("content"),byte3(i))>0  then
	Show_Err("对不起，请不要发布非法小广告！！！。<br><br><a href='javascript:history.back()'>返回</a>")
	Response.cookies(echsys)("content")=""
	Response.End 
end if
next

if Instr(request("content"),"'")>0 or Instr(request("content"),"script")>0 or Instr(request("content"),"onClick")>0  or Instr(request("content"),"onload")>0 then
	Show_Err("对不起，您输入的投诉内容包含有非法字符。<br><br><a href='javascript:history.back()'>返回</a>")
	Response.End 
end if

if ComplainID="" then
	set rs=server.createobject("adodb.recordset")
	sql="select * from "& db_wygkcn_Complain_Table &"" 
	rs.open sql,conn,1,3
	rs.addnew
	rs("Topic")=Topic
	rs("ComplainClass")=ComplainClass
	rs("content")=content
	rs("b_name")=b_name
	rs("b_person")=b_person
	rs("b_tel")=b_tel
	rs("b_adress")=b_adress	
	rs("YourName")=YourName
	rs("TelePhone")=TelePhone
	rs("Address")=Address
	rs("mobile")=mobile
	rs("email")=email			
	rs("ComplainIP")=ComplainIP
	rs("ClassID")=ClassID
	rs("e_password")=e_password
	rs("updatetime")=now()
	rs("acceptnum")=gen_key(12)
	
	if ReviewCheck=1 then		'根据默认审核状态进行审核状态的设置
		rs("Checked")=1
	else
		rs("Checked")=0
	end if
			
	rs.update
	
	set rs=conn.execute( "select * from "& db_wygkcn_Complain_Table&" order by ComplainID desc ") 
    acceptnum = rs("acceptnum")
	
	rs.close
	set rs=nothing
	Response.cookies(echsys)("content")=""
end if
%>
<!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" lang="gb2312">
<head>
<title>投诉举报成功__<%=eChSys_Com%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="CSS/Wygkcn_Home.css" rel=stylesheet type=text/css>
<LINK href="CSS/Wygkcn_News.css" rel="stylesheet" type=text/css>
</head>
<body>
<!--内容部分开始-->
<div id="EC_Content">
<!--#include file="Top.asp"-->
<!--位置导航部分开始-->
<div class="position">
<img src="Images/lm_dot.gif" width="11" height="11">&nbsp;&nbsp;您的位置&nbsp;&nbsp;<a href="./" >首页</a> >> <a href="wygkcn_Conmunicate.asp">交流互动</a> >> <a href="Complain.asp">投诉举报</a> >>投诉举报成功</div>
<!--位置导航部分结束-->
<!--中间内容部分开始-->
<div class=back>
            投诉举报成功，请耐心等待 审核，回复!<br>			  
			 您的投诉举报受理号是： 
			 <%response.write  acceptnum %> &nbsp;&nbsp;知情密码是：<%response.write  e_password %>  ，   请牢记!查询详细办理情况时将用到！<br>
			 <a href="Complain.asp">返回</a>
</div>
<!--中间内容部分结束-->

<!--#include file="bottom.asp"-->
<%Response.cookies(echsys)("content")=""
'response.redirect "Complain.asp"%>
</div>
<!--内容部分结束-->
</body>
</html>

