⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 add.asp

📁 鄂尔多斯建站网全站程序(冬季修正版)
💻 ASP
字号:
<!--#include file="config.asp"-->
<!--#include file="MD5.asp"-->
<!--#include file="pub.asp"-->
<!--#include file="header.asp"-->
<% 
IF Request("POST")<>"" Then
Call WriteData
End IF
Main
Bottom
Function Main
%>
<DIV align=center>
<%if shhe="1" then%><b>留言本状态:</b>留言审核机制已经打开,你的留言内容必须由版主审核通过后方能显示<br><br><%end if%>
<TABLE class=TABLE_OUT borderColor=#9cacd0 height=200 cellSpacing=0 
cellPadding=0 width=746 align=center bgColor=#f5f7fb>
  <TBODY>
  <TR>
    <TD vAlign=center>
      <FORM name=btb action="" method=post>
	  <input type="hidden" name="POST" value="True">
<input type="hidden" name="top" value="5">
<input type="hidden" name="ip" value=<%=Request.serverVariables("REMOTE_ADDR")%>>
      <TABLE borderColor=#9cacd0 height="100%" cellSpacing=1 cellPadding=1 
      width="736" align=center bgColor=#f5f7fb border=1>
        <TBODY>
        <TR>
          <TD width=96 height=16>
            <P align=center class=sd>【</FONT>你的姓名<FONT 
          face=宋体>】</P></TD>
        </CENTER>
          <TD width=284 height=16>
            <P align=left>&nbsp;<INPUT maxLength=12 name=name style="width:110; height:20" value="<%=name%>"> 
            <font color="#FF0000">*</font>&nbsp;不大于12个字符(6个汉字)</TD>    
          <TD width=94 height=16>    
            <p align="center"  class=sd>【</FONT>留言密码<FONT     
          face=宋体>】</TD>    
          <TD width=234 height=16>&nbsp;<INPUT size=25 maxLength=20 type="password" name=pass style="width: 157; height: 20" value="<%=UserPwd%>"></TD>  
        </TR>  
        <TR>  
          <TD width=96 height=15>  
            <P align=center  class=sd>【你的主页】</P></TD>  
          <TD height=15 width="284">  
            <P align=left>&nbsp;<INPUT maxLength=80 size=18 name=site style="width: 179; height: 20" value="<%=site%>"> </P></TD>  
      <CENTER>  
          <TD height=15 width="94">  
            <p align="center" class=sd>【</FONT>你的邮箱<FONT   
          face=宋体>】</TD>  
          <TD height=15 width="234">  
            &nbsp;<INPUT maxLength=50 size=25 name=mail style="width: 156; height: 20" value="<%=mail%>"></TD>  
          </TR>  
           <TR>  
          <TD width=96 height=16>  
            <P align=center  class=sd>【</FONT>来自何方<FONT     
          face=宋体>】</P></TD>  
        </CENTER>  
          <TD width=284 height=16>  
            <P align=left>&nbsp;<INPUT maxLength=10 size=25 name=from style="width: 179; height: 20" value="<%=from%>">   
            </TD>    
          <TD width=94 height=16>    
            <p align="center"  class=sd>【QQ 号码】</TD>    
          <TD width=234 height=16>&nbsp;<INPUT maxLength=10 size=25 name=OICQ style="width: 156; height: 20" value="<%=qq%>"></TD>  
        </TR>
		 <TR>  
          <TD width=96 height=16>  
            <P align=center  class=sd>【留言标题】</P></TD>  
        </CENTER>  
          <TD width=284 height=16>  
            <P align=left>&nbsp;<INPUT maxLength=30 size=18 name=title style="width: 179; height: 20">   
            <font color="#FF0000">*</font></TD>    
          <TD width=94 height=16>    
            <p align="center"  class=sd>【留言选项】</TD>    
          <TD width=234 height=16>&nbsp;类型:<select name="type" size=1><option selected value="open">公开留言</option><option value="close">私密留言</option><input type="hidden" name="savecookies" value="yes"></TD>  
        </TR> 
        <TR>   
          <TD width=96 height=16>   
            <P align=center  class=sd>【留言内容】</P><P align=left  class=sd>&nbsp;HTML:禁止&nbsp;&nbsp;<br>&nbsp;UBB:&nbsp;<%if ubbcode="1" then%>支持<a href="help.asp#ubb" target="_blank" title="查看UBB帮助"><img src="images/help.gif" border=0></a><%else%>禁止<%end if%><br>&nbsp;最大字符:<%=lymax%></P></TD>   
          <TD height=16 width="284">   
            <P><TEXTAREA style="BORDER-RIGHT: #b4b4b4 1px double; BORDER-TOP: #b4b4b4 1px double; BORDER-LEFT: #b4b4b4 1px double; COLOR: #336699; BORDER-BOTTOM: #b4b4b4 1px double" name=content rows=5 wrap=VIRTUAL cols=32></TEXTAREA>   
            <font color="#FF0000">*</font>      
            <BR>&nbsp; <INPUT type=submit class=sd1 value=提交留言 name=B1> <INPUT type=reset class=sd1 value=重新写过 name=B2>          
    </P></TD>       
          <TD height=16 width="94">       
            <p align="center"  class=sd>【你的头像】</TD>     
          <TD height=16 width="234">
			&nbsp;&nbsp;<SELECT 
            onchange="showimage()" size=6 name=head  style="color: #99CCFF; border: 1 dotted #99CCFF">
           <OPTION value=<%=head%> selected>头像</OPTION> <OPTION value=01>01</OPTION><OPTION value=02>02</OPTION> <OPTION 
              value=03>03</OPTION> <OPTION value=04>04</OPTION> <OPTION 
              value=05>05</OPTION> <OPTION value=06>06</OPTION> <OPTION 
              value=07>07</OPTION> <OPTION value=08>08</OPTION> <OPTION 
              value=09>09</OPTION> <OPTION value=10>10</OPTION> <OPTION 
              value=11>11</OPTION> <OPTION value=12>12</OPTION> <OPTION 
              value=13>13</OPTION> <OPTION value=14>14</OPTION> <OPTION 
              value=15>15</OPTION> <OPTION value=16>16</OPTION> <OPTION 
              value=17>17</OPTION> <OPTION value=18>18</OPTION> <OPTION 
              value=19>19</OPTION> <OPTION value=20>20</OPTION> <OPTION 
              value=21>21</OPTION> <OPTION value=22>22</OPTION>
</select>&nbsp;&nbsp;<img src="images/face/<%=head%>.gif" name="tus"><script>function showimage(){document.images.tus.src="images/face/"+document.btb.head.options[document.btb.head.selectedIndex].value+".gif";}</script>
		  </TD></TR>	</TBODY></TABLE></FORM></TD></TR></TBODY></TABLE>      
<CENTER><BR></CENTER></DIV> 
<%End Function

Function WriteData
LyContent=ChkZangHua(Trim(Request.form("content")))
LyName=Trim(Request.form("name"))
LyTitle=ChkZangHua(Trim(Request.form("title")))
Mail=Request.form("mail")
UserQQ=Request.form("qq")
LyType=Request.form("type")

posttime=session("posttime")
if posttime+30/86400>now() then
response.write "<script language='javascript'>"
   response.write "alert('留言错误:为防止灌水,本留言本两次留言间隔最小时间为30秒!');"
   response.write "history.go(-1);"
   response.write "</script>"
   Response.End
end if

if LyType="register" then
if Mail="" or Request.form("pass")="" then
call ShowErr("错误:申请认证用户必须填写密码及正确邮箱!")
else
LyContent="[认证申请]"&LyContent
end if
end if

IF LyContent="" or Lyname="" or LyTitle="" Then
call ShowErr("留言错误:你填写不完整!")
ELSEIF CheckHtml(Lyname) or StrLength(Lyname)>12 then
call ShowErr("留言错误:名字不能用特效字符或太长!!")
ELSEIF StrLength(Lytitle)>30 then
call ShowErr("留言错误:留言标题不要大于30个字符!!")
ELSEIF strLength(LyContent)>lymax then
call ShowErr("留言错误:你的留言太长了!!")
ELSEIF UserQQ<>"" and not isnumeric(UserQQ) then
call ShowErr("留言错误:QQ号码填错了!")
ELSEIF strLength(LyContent)<lymin then
call ShowErr("留言错误:你的留言太短啦!")
ELSEIF not Checksite(Request.form("site")) then
call ShowErr("留言错误:主页地址填写错误!")
ELSEIF Mail<>"" and not CheckEmail(Mail) then
call ShowErr("留言错误:你的EMAIL错误!!")
ELSEIF Request.form("pass")="" and LyType="close" then
call ShowErr("留言错误:须填写留言密码方可查阅版主回复!!")
Else
Set Rs = Server.CreateObject("ADODB.Recordset")
Sql = "Select * From gb"
Rs.Open Sql,conn,1,3
Rs.AddNew

shenhe=LyType
if shhe="1" then
shenhe="wait"&shenhe
end if

if Request.form("pass")<>"" then
Rs("psw")=MD5(Request.form("pass"))
end if
if UserQQ<>"" then
Rs("oicq")=UserQQ
end if
Rs("content")=HTMLcode(LyContent)
Rs("date")=now
Rs("title")=HTMLcode(LyTitle)
Rs("name")=HTMLcode(Lyname)
Rs("from")=Trim(Request.form("from"))
Rs("type")=shenhe
Rs("site")=Request.form("site")
Rs("mail")=Mail
Rs("head")=Request.form("head")
Rs("top")=Request.form("top")
Rs("ip")=Request.form("ip")
Rs.Update
Rs.Close
Set Rs=Nothing
Call CloseDB
session("posttime")=Now()
Response.Redirect "index.asp"
End IF
End Function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -