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

📄 write.asp

📁 留言版整站文件包。数据库管理。前台后台登录。
💻 ASP
📖 第 1 页 / 共 2 页
字号:
                    <img src="images/face/6.gif" width="32" height="32"> <input type="radio" name="face" value="images/face/7.gif">
                  <img src="images/face/7.gif" width="32" height="32"><br> <input type="radio" name="face" value="images/face/8.gif"> 
                    <img src="images/face/8.gif" width="32" height="32"> <input type="radio" name="face" value="images/face/9.gif">
                  <img src="images/face/9.gif" width="32" height="32"> <input type="radio" name="face" value="images/face/10.gif">
                  <img src="images/face/10.gif" width="32" height="32"> 
                  <input type="radio" name="face" value="images/face/11.gif"> 
                    <img src="images/face/11.gif" width="32" height="32"> <input type="radio" name="face" value="images/face/12.gif"> 
                    <img src="images/face/12.gif" width="32" height="32"> <input type="radio" name="face" value="images/face/13.gif"> 
                    <img src="images/face/13.gif" width="32" height="32"> <input type="radio" name="face" value="images/face/14.gif"> 
                    <img src="images/face/14.gif" width="32" height="32"> </td>
                </tr>
                
              <tr bgcolor="#FFFFF0"> 
                <td colspan="2" align="center" nowrap> 
                  <input type="submit" name="Submit" value="发表留言" onclick="return clckcntr();" style="backgroud-color: #ffffff; border-bottom: 1px solid; border-left: 1px solid; border-right: 1px solid; border-top: 1px solid; FONT-FAMILY: 宋体; FONT-SIZE: 9pt; HEIGHT: 18px; WIDTH: 50px"> 
                    <input type="reset" name="Submit2" value="重写留言" style="backgroud-color: #ffffff; border-bottom: 1px solid; border-left: 1px solid; border-right: 1px solid; border-top: 1px solid; FONT-FAMILY: 宋体; FONT-SIZE: 9pt; HEIGHT: 18px; WIDTH: 50px"> 
                    <input type="button" name="Submit3" value="取消留言" onClick="javascript:history.back(-1);" style="backgroud-color: #ffffff; border-bottom: 1px solid; border-left: 1px solid; border-right: 1px solid; border-top: 1px solid; FONT-FAMILY: 宋体; FONT-SIZE: 9pt; HEIGHT: 18px; WIDTH: 50px">
                  </td>
                </tr></form>
              </table>
            </td>
        </tr>
      </table></table>
<table width=760 height="22" border=0 align="center" cellpadding=0 cellspacing=1 background="images/dh.gif" style="border: 1px solid #CCCCCC;">
  <tr> 
    <td width="510" height="18">&nbsp;</td>
    <td width="245">&nbsp;</td>
  </tr>
</table>
<%
call htmlend()

Response.End
end sub

sub addto()
dim username, email, homeurl, qq, body, addtime, sql, Rs, ip, face, brow

username=htmlencode2(trim(Request.form("username")))
zt=htmlencode2(trim(Request.form("zt")))
email=htmlencode2(trim(Request.form("email")))
homeurl=htmlencode2(trim(Request.form("homeurl")))
qq=htmlencode2(trim(Request.form("qq")))
body=htmlencode2(Request.form("body"))
face=Request.form("face")
ip=Request.ServerVariables("REMOTE_ADDR")
brow=Request.form("brow")


if session("OldGuestSave") <> "" then
message1="请不要重复提交同一条信息嘛!\n"
end if

if username = "" then
message="请填写您的名字哦!\n"
end if

if zt = "" then
message="请填写留言主题!\n"
end if

if email <> "" and IsValidEmail(email)=false then
message=message&"您的电子邮件是不是错了?\n"
end if

if qq <> "" and isInteger(qq) = false then
message=message&"对不起,您所填写的 QQ 号码不是数字哦,这样是不行的!\n"
end if

if qq <> "" and len(qq) < 4 then
message=message&"好像没有小于4位号码的QQ吧?\n"
end if

if qq <> "" and len(qq) > 11 then
message=message&"好像还没有超过11位号码的QQ吧!\n"
end if

if qq = "" then
qq="不告诉你"
end if

if body = "" then
message=message&"留言内容不能为空!\n"
end if

if face = "" then
facerand=16
randomize
facerand=Int((facerand*rnd)+1)
face="images/face/"&facerand&".gif"
end if

if body <> "" and Len(body)> bodymax then
message=message&"对不起,留言字数不能超过 "&bodymax&" 字,谢谢!\n"
end if

if brow = "" then
browrand=16
randomize
browrand=Int((browrand*rnd)+1)
brow="images/brow/"&browrand&".gif"
end if
	if message1<> "" then call error1(""&message1&"")
	if message<> "" then
	call error(""&message&"")
	else

sql = "select * from gbook"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open sql,conn,3,2
Rs.addnew
Rs("username")=username
Rs("zt")=zt
Rs("email")=email
Rs("homeurl")=homeurl
Rs("qq")=qq
Rs("body")=body
Rs("face")=face
Rs("brow")=brow
Rs("ip")=ip
Rs("addtime")=now
Rs.update
Rs.close
session("OldGuestSave")="Saved"
	sql="select * from admin"
	Rs.open sql,conn,3,2
	if date <> today_time then
	Rs("today_count") = 1
	else
	Rs("today_count") = Rs("today_count")+1
	end if
	Rs("today_time") = date
	Rs.update
	Rs.close

set Rs = nothing
conn.close
set conn = nothing

Response.redirect "index.asp"
Response.End
	end if
end sub
%>
<table width=754 height="50" align=center cellpadding=0 cellspacing=1 bgcolor="#99CCFF">
  <tbody>
    <tr> 
      <td width="750" align=center valign="middle" bgcolor="#FFFFf0"> <p><a href=<%=url%>><%=name%></a>留言本言论纯属发表者个人意见,与<font color=#990000><b> 
          <a href="http://www.szok.org" target="_blank">龙腾视觉</a></b></font> 立场无关<br>
          Copyright&copy;2002 - 2003:<a href="http://www.szok.org" target="_blank"><b><font color="#FF0000">龙腾视觉网</font></b></a> 
          &amp; <strong><font color="#000066">会飞的鱼</font></strong> 版本:<a href="http://szok.org">龙腾留言本1.0XP版</a></p></td>
    </tr>
  </tbody>
</table>
<tr>
  <td align=middle height="3">&nbsp;

⌨️ 快捷键说明

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