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

📄 add.asp

📁 这是一个单用户的留言本
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--#INCLUDE FILE="conn.asp"-->
<%
dim RS,strSQL
strSQL="select * from Book"
set Rs=server.CreateObject("adodb.Recordset")
Rs.source=strSQL
Rs.CursorType=3
Rs.LockType=3
Rs.ActiveConnection=Conn
Rs.open
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加留言</title>
<style type="text/css">
<!--
body {
	background-image: url(images/beijing.gif);
}
.style1 {
	font-size: 14px;
	color: #6666FF;
}
.style2 {font-size: 12px}
.style3 {font-size: 14px}
a:link {
	color: #6666FF;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #6666FF;
}
a:hover {
	text-decoration: underline;
	color: #FF00FF;
}
a:active {
	text-decoration: none;
	color: #9999FF;
}
.style4 {color: #6666FF}
.style5 {color: #6666FF; font-size: 12px; }
-->
</style>

</head>
<body topmargin="0">

<%if request("name")="" or request("main")="" or len(request("main"))>250 then 
Response.Write "<script Language=Javascript>alert('您的填写未符合要求,请查看提示!');location.href = 'addpage.asp';</script>"
else%>


<div align="center">
<%
rs.addnew
rs("Name").value=Cstr(server.HTMLEncode(request("Name")))
rs("Sex").value=Cstr(server.HTMLEncode(request("Sex")))
rs("Qq").value=Cstr(server.HTMLEncode(request("Qq")))
rs("Email").value=Cstr(server.HTMLEncode(request("Email")))
rs("Web").value=Cstr(server.HTMLEncode(request("Web")))
rs("Main").value=Cstr(server.HTMLEncode(request("Main")))
rs("Date").value=now()
rs.update
%>
<!--#INCLUDE FILE="top.asp"-->
<br>
<table width="650" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="20" colspan="3"><img src="images/top1.gif" width="650" height="20"></td>
    </tr>
    <tr>
      <td height="22" colspan="3" background="images/bg.gif" class="style2"><div align="center" class="style4">这是您给本站的留言,感谢您的支持!</div></td>
    </tr>
    <tr>
      <td width="3" height="158" background="images/leftline.gif"></td>
      <td width="644"><table width="600" border="0" align="center" cellpadding="0" cellspacing="4">
        <tr>
          <td width="19" height="18"><img src="images/em38.gif" width="18" height="18"></td>
          <td width="50"><p align="left" class="style5">姓名:</p>
            </td>
          <td class="style4"><div align="left" class="style5"><%=rs("Name")%></div></td>
          <td width="20"><img src="images/mail.gif" width="18" height="18"></td>
          <td width="55"><p align="left" class="style4 style2">Email:</p>
            </td>
          <td class="style4"><div align="left" class="style5"><%=rs("Email")%></div></td>
        </tr>
        <tr>
          <td width="19" height="18"><img src="images/topicnew.gif" width="18" height="18"></td>
          <td width="50" class="style5"><div align="left">性别:</div></td>
          <td width="215" class="style4"><div align="left" class="style5"><%=rs("sex")%></div></td>
          <td width="20"><img src="images/home.gif" width="18" height="18"></td>
          <td width="55" class="style5"><div align="left">主页:</div></td>
          <td width="213" class="style4"><div align="left" class="style5"><%=rs("Web")%></div></td>
        </tr>
        <tr>
          <td><img src="images/OICQ.gif" width="18" height="18"></td>
          <td class="style5"><div align="left">OICQ:</div></td>
          <td class="style4"><div align="left" class="style5"><%=rs("Qq")%></div></td>
          <td><img src="images/date.gif" width="18" height="18"></td>
          <td class="style5"><div align="left"><span class="style4">留言于</span>:</div></td>
          <td class="style4"><div align="left" class="style5"><%=now()%></div></td>
        </tr>
        <tr>
          <td colspan="3"><div align="left"><img src="images/shareforum.gif" width="25" height="25"><span class="style5">留言内容:</span></div></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td height="52">&nbsp;</td>
          <td colspan="5" class="style4"><div align="left" class="style5"><%=rs("Main")%></div></td>
          </tr>
      </table>      </td>
      <td width="3" background="images/rightline.gif"></td>
    </tr>
    <tr>
      <td height="15" colspan="3"><img src="images/low.gif" width="650" height="15"></td>
    </tr>
  </table>
<%rs.close
conn.close
%>
</div>
<br>
<div align="center">
  <table width="650" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="22" background="images/bg.gif"><div align="center" class="style1 style3"><a href="Index.asp" class="style1 style2">返回君应有语首页,请点击这里!</a></div></td>
    </tr>
  </table>
  <br>
  <!--#INCLUDE FILE="copyright.asp"-->
</div>
<%end if%>
</body>
</html>

⌨️ 快捷键说明

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