<!--#include file=conn.asp-->
<!--#include file=config.asp-->
<!--#include file=const.asp-->
<!--#include file=char.asp-->
<%
 '=========================================================
' File: postcomp.asp
' Version:3.0
' Date: 2005-10-30
' Script Written by xmrxw
'=========================================================
' Copyright (C) 2004,2005 Xmrxw.Com All rights reserved.
' Web: http://www.xmrxw.com,http://www.xmzxw.com
' Email: info@mssky.com,super@mssky.com
' QQ：10689579　Msn：zdlmicr@hotmail.com
'=========================================================
dim typeid,pageurl,lockuser
typeid=Checkstr(Trim(Request("typeid")))
if typeid="" or not isnumeric(typeid) then
  	errmsg=errmsg+"<br>"+"<li>参数错误。"
	founderr=true
end if
Pageurl=Trim(Request("Page"))
response.buffer=true
if typeid=1 then
stats="用户举报"
elseif typeid=2 then
stats="日记举报"
elseif typeid=3 then
stats="文章举报"
elseif typeid=4 then
stats="征婚举报"
elseif typeid=5 then
stats="约会举报"
elseif typeid=6 then
stats="聚会举报"
elseif typeid=7 then
stats="相册举报"
elseif typeid=0 then
stats="意见建议"
end if
call nav()
if not founduser then
	Errmsg=Errmsg+"<br>"+"<li>您还没有登陆，请登陆后进行修改。"
	founderr=true
end if

if founderr then
	call head_var("","")
	call Mslove_error()
else
	call head_var(stats,"postcomp.asp")
if trim(request("action"))="save" then
call compsave()
else
call main()
end if
end if
call activeonline()
call footer()

sub main()%>
<table width="100%" align=center cellpadding=3 cellspacing=1 class=tableborder1>
  <form action="?action=save" method=POST name="theForm">
    <tr align="left"> 
      <th height="28" colspan="2" align="center"  class=tablebody1><%=stats%></th>
    </tr>
    <tr align="center"> 
      <td height="25" colspan="2"  class=tablebody2>注意：请真实客观反映信息，请放心您提交的信息只有管理级以上才可以看到！</td>
    </tr>
    <tr align="center"> 
      <td width="18%"  class=tablebody1 align="right"><strong>标题：</strong></td>
      <td width="82%"  class=tablebody1 align="left"><input name="Title" type="text" id="Title" size="40" maxlength="100">
        <strong>最多100个字符</strong></td>
    </tr>
    <tr align="center"> 
      <td align="right"  class=tablebody1><strong>对方：</strong></td>
      <td align="left"  class=tablebody1><input name="Comuser" type="text" id="Comuser" maxlength="20"><input name="Typeid" type="hidden" id="Typeid" value=<%=Typeid%>></td><input name="page" type="hidden" id="page" value=<%=trim(request("page"))%>>
    </tr>
    <tr align="center"> 
      <td align="right"  class=tablebody1><strong>内容：</strong></td>
      <td align="left"  class=tablebody1><textarea name="Content" cols="60" rows="5" ID="IDContent"></textarea>
        <a style=cursor:hand onclick="if (parseInt(IDContent.rows)-3>0)(IDContent.rows=parseInt(IDContent.rows)-3)"><img src="Skins/Default/minus.gif" unselectable="on" border='0'></a> 
        <a style=cursor:hand onclick="if (parseInt(IDContent.rows)+3>3)(IDContent.rows=parseInt(IDContent.rows)+3)"><img src="Skins/Default/plus.gif" unselectable="on" border='0'></a><br>
        内容不能大于500个字符。</td>
    </tr>
    <tr align="center"> 
      <td height="31" colspan="2"  class=tablebody1> 
        <input class=2 type=Submit value="保存" name=Submit> 
        &nbsp; <input class=2 type="reset" name="Clear" value="清除"></td>
    </tr>
  </form>
</table>
<%
end sub

sub compsave()
dim Title,Content,Comuser
	Title=checkStr(Request("Title"))
	Content=checkStr(Request("Content"))
	Comuser=checkStr(Request("Comuser"))
	if Typeid<>0 and (Comuser="" or strLength(Comuser)>20) then
	errmsg=errmsg+"<br>"+"<li>请输入举报对象(长度不能大于20)。"
		founderr=true
end if
	if Title<>"" and strLength(request("Title"))>100 then
		errmsg=errmsg+"<br>"+"<li>请输入标题(长度不能大于100)。"
		founderr=true
end if
	if Content<>"" and strLength(request("Content"))>500 then
		errmsg=errmsg+"<br>"+"<li>请输入内容信息(长度不能大于500)。"
		founderr=true
end if
if Typeid<>0 and Pageurl="" then
errmsg=errmsg+"<br>"+"<li>举报地址错误。"
		founderr=true
end if
if founderr=true then exit sub
sql="Insert into Ms_Complain (Username,Typeid,Title,Content,Comuser,Flag,Addtime,Pageurl) VALUES ('"&trim(MemberName)&"',"&typeid&",'"&Title&"','"&Content&"','"&Comuser&"',0,'"&now()&"','"&pageurl&"')"
	sucmsg=sucmsg+"<br>"+"<li><b>您已经成功提交投诉建议。"
		call Mslove_suc()
conn.execute(sql)
end sub
%>   
</body>
</html> 