<!--
############################  智思留言本 版权声明  ##############################
#####  智思留言本系统（版本：ZSBS v3.1 构建于 2006/09/25）                  #####
#####  智思网络（zhisi.net) （2004-2024）版权所有！                         #####
#####  此留言本为自由源码版，你可以自由传播和使用而不用交纳任何款项，       #####
#####  你也可以进行更改，但必须本保留版权信息！                             #####
#####  如需删除版权信息，则必须经授权，并交纳版权费，否则将会诉诸于法律！   #####
#####  电子邮箱：zhisi@126.com  QQ：122178250  POPO：simonda                #####
#################################################################################
#####  此版权信息不会妨碍你正常使用本留言本，我们承诺完全免费，但保留版权！ #####
################ 请访问http://www.zhisi.net 查看新版本信息 ######################
-->
<!--#include file="common.asp"-->
<!--#include file="KeywordFilter.asp"-->
<!-- #include file="zsbs_editor.asp" -->
<%
'- zsbs v 3.01 禁止来自添加到“IP阻止列表”的IP留言 -----
  sip = Request.Servervariables("REMOTE_addr")
  sql = "select * from DenyIP where IPAddr='"&sip&"'"
  Set rs = Server.CreateObject("ADODB.Recordset")
  rs.Open sql, conn, 1, 3
  If Not ( rs.BOF Or rs.EOF ) Then
    rs.Close
	Set rs = Nothing
  	Response.Write "<script Language=Javascript>alert('对不起，你被禁止发言，请联系管理员!');location.href = 'javascript:history.back()';</script>"
	Response.End()
  Else
    rs.Close
  End If
'- zsbs v 3.01 禁止来自添加到“IP阻止列表”的IP留言 -----
%>
<%
	if trim(Request("op"))<>empty then
		if Trim(Request.Form("nname"))=empty then
			Response.Write "<script Language=Javascript>alert('请输入昵称!');location.href = 'javascript:history.back()';</script>"
		elseif Trim(Request.Form("ntitl"))=empty then
			Response.Write "<script Language=Javascript>alert('请输入留言主题!');location.href = 'javascript:history.back()';</script>"
		elseif Trim(Request.Form("ncont"))=empty then
			Response.Write "<script Language=Javascript>alert('请输入留言内容!');location.href = 'javascript:history.back()';</script>"
	else
%>
<%
'------------------- v 1.4 解决留言不会换行的Bug-----------------------
  	content=HtmlEncode(Request.form("ncont"))
  
'------------------- v 3.0 Security Encode -----------------------
	content	= SecEncode( content )
	
  dim sname,ssex,saddr,smail,spage,soicq,shead,stitl,scont,stime,sip,srepflag,stimeflag
  'set rs=Server.CreateObject("ADODB.Recordset")
  sqlstr="select * from guest"
  
  sip=Request.Servervariables("REMOTE_addr")
  sTitle = Request.form("ntitl")
  sTitle = replace(sTitle, ">", "&nbsp;")
  sTitle = replace(sTitle, "<", "&nbsp;")

  rs.open sqlstr,conn,1,3
  rs.addnew
    rs("Name")=Request.form("nname")
    rs("Sex")=Request.form("nsex")
    rs("Address")=Request.form("naddr")
    rs("Email")=Request.form("nmail")
    rs("Homepage")=Request.form("npage")
    rs("Oicq")=Request.form("noicq")
    rs("headpic")=Request.form("nhead")
    rs("Title") = sTitle
    rs("content")=content
		If Request.Form("sec")=1 Then
      rs("sec")=1
    End If
		If Request.Form("RepUnabled")=1 Then
      rs("RepUnabled")=True
    End If
    rs("Date")=Date()
    rs("Time")=Time
    rs("Ip")=sip
	If ifNeedAuditing="NO" Then
		rs("ifHadDealAuditing")= True
    	rs("ifHadPassAuditing") = True
	End If
	
  rs.update
 
  rs.close
  set rs=nothing
  conn.close
  set conn=nothing
%>
<%
  Response.redirect("state.asp?state=guestsuc")
%>
<%
  end if
 end if
%>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=<% =Char_Set %>">
	<title>新留言</title>
	<link href="<%=GBCss%>/common.css" rel="stylesheet" type="text/css">
	<link href="commcss.css" rel="stylesheet" type="text/css">
	<script src="common.js" type="text/javascript"></script>
</head>

<body>
<form name="lyform" method="POST" action="guest.asp?op=addguest">
<table border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td height="20">&nbsp;</td>
	</tr>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="0" style="background-image:url(<% =GBSkin %>/guest_bg.gif) ">
  <tr>
    <td height="30" colspan="2" align="center" class="text_header" style="background-image:url(<% =GBSkin %>/guest_top.gif) "><b>填写留言</b></td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td width="250" valign="top"><table width="250" border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF" style="background-image:url(<% =GBSkin %>/guest_bg.gif) ">  
        <tr>
          <td width="50" align="right">昵 称：</td>
          <td width="200" height="25">
              <input name="nname" type="text" class="input_common" style="width:180px;height:18px;" maxlength="15"></td>
        </tr>
        <tr>
          <td align="right">你 是：</td>
          <td height="25">
              <select name="nsex" id="nsex">
                <option value="帅哥" selected>帅哥</option>
                <option value="靓女">靓女</option>
              </select>
          </td>
        </tr>
        <tr>
          <td align="right">来 自：</td>
          <td height="25">
              <input name="naddr" type="text" value="" size="15" maxlength="6" class="input_common" style="width: 180px; height:18px;">
</td>
        </tr>
        <tr>
          <td align="right">&nbsp;OICQ：</td>
          <td height="25">
              <input name="noicq" type="text" size="15" class="input_common" style="width: 180px; height:18px;"></td>
        </tr>
        <tr>
          <td align="right">Email：</td>
          <td>
              <input name="nmail" type="text" class="input_common" style="width: 180px; height:18px;" maxlength="30"></td>
        </tr>
        <tr>
          <td align="right">主 页：</td>
          <td>
              <input name="npage" type="text" class="input_common" style="width: 180px; height:18px;" value="" maxlength="120">
&nbsp;</td>
        </tr>
        <tr>
          <td align="right">&nbsp;</td>
          <td align="center"><table border="0" align="center" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF" style="background-image:url(<% =GBSkin %>/guest_bg.gif) ">
              <tr>
                <td width="109" rowspan="4" align="center" height="110"><img border="0" src="images/pic1.gif" alt="" id="faceid"> </td>
                <td width="81" rowspan="4" valign="bottom">头像：&nbsp;
                    <select name="nhead" onChange="document.images['faceid'].src='images/'+options[selectedIndex].value+'.gif';">
                      <option value="pic1" selected>pic1</option>
                      <option value="pic2">pic2</option>
                      <option value="pic3">pic3</option>
                      <option value="pic4">pic4</option>
                      <option value="pic5">pic5</option>
                      <option value="pic6">pic6</option>
                      <option value="pic7">pic7</option>
                      <option value="pic8">pic8</option>
                      <option value="pic9">pic9</option>
                      <option value="pic10">pic10</option>
                      <option value="pic11">pic11</option>
                      <option value="pic12">pic12</option>
                      <option value="pic13">pic13</option>
                      <option value="pic14">pic14</option>
                      <option value="pic15">pic15</option>
                      <option value="pic16">pic16</option>
                      <option value="pic17">pic17</option>
                      <option value="pic18">pic18</option>
                      <option value="pic19">pic19</option>
                      <option value="pic20">pic20</option>
                  </select></td>
              </tr>
              <tr> </tr>
              <tr> </tr>
              <tr> </tr>
              <tr>
                <td></td>
                <td></td>
              </tr>
          </table></td>
        </tr>
    </table></td>
    <td width="410" valign="top"><table width="410" border="0" align="center" cellpadding="0" cellspacing="5" bgcolor="#FFFFFF" style="background-image:url(<% =GBSkin %>/guest_bg.gif) ">
          <tr>
            <td colspan="2">&nbsp;主 题：
                <input name="ntitl" type="text" size="28" maxlength="30" class="input_common" style="width:300px;height:18px;"></td>
          </tr>
          <tr>
            <td height="20" colspan="2">&nbsp;内 容：&nbsp;<input name="sec" type="checkbox" id="sec" value="1">与站长的悄悄话 &nbsp;<input id="RepUnabled" name="RepUnabled" type="checkbox" value="1">不允许回复
</td></tr>
		  <tr>
		    <td width="410"><%Call Editor( "ncont", "" )%></td>
		  </tr>
    </table></td>
  </tr>
  <tr align="center">
    <td colspan="2" height="40">
	<input type="button" value="返  回" onClick="javascript:location.href='index.asp';" class="button_common" style="width: 80px; height:18px;">
	&nbsp;
	<input type="reset" value="重新填写" class="button_common" style="width: 80px; height:18px;">
&nbsp;
      <input name="按钮" type="submit" value="保存留言" class="button_common" style="width: 80px; height:18px;">
	  </td>
  </tr>
</table>
</form>
</body>
</html>
