📄 guest.asp
字号:
<!--#include file="common.asp"-->
<%
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, ">", " ")
sTitle = replace(sTitle, "<", " ")
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
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">
<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"> </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> </td>
<td> </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" class="mytext">昵 称:</td>
<td width="200" height="25" class="mytext">
<input name="nname" type="text" class="input_common" style="width: 180px; height:18px;" maxlength="30"></td>
</tr>
<tr>
<td align="right" class="mytext">你 是:</td>
<td height="25" class="mytext">
<select name="nsex" id="nsex">
<option value="帅哥" selected>帅哥</option>
<option value="靓女">靓女</option>
</select>
</td>
</tr>
<tr>
<td align="right" class="mytext">来 自:</td>
<td height="25" class="mytext">
<input name="naddr" type="text" value="安徽省合肥市望西路529号" size="15" maxlength="6" class="input_common" style="width: 180px; height:18px;">
</td>
</tr>
<tr>
<td align="right" class="mytext"> OICQ:</td>
<td height="25" class="mytext">
<input name="noicq" type="text" size="15" class="input_common" style="width: 180px; height:18px;"></td>
</tr>
<tr>
<td align="right" class="mytext">Email:</td>
<td class="mytext">
<input name="nmail" type="text" class="input_common" style="width: 180px; height:18px;" maxlength="30"></td>
</tr>
<tr>
<td align="right" class="mytext">主 页:</td>
<td class="mytext">
<input name="npage" type="text" class="input_common" style="width: 180px; height:18px;" value="http://yongyan.icpcn.com" maxlength="30">
</td>
</tr>
<tr>
<td align="right" class="mytext"> </td>
<td align="center" class="mytext"><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">头像:
<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 class="mytext"></td>
<td class="mytext"></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="410" valign="top"><table width="400" border="0" align="center" cellpadding="0" cellspacing="5" bgcolor="#FFFFFF" style="background-image:url(<% =GBSkin %>/guest_bg.gif) ">
<tr>
<td colspan="2" class="mytext"> 主 题:
<input name="ntitl" type="text" size="28" class="input_common" style="width: 300px; height:18px;"></td>
</tr>
<tr>
<td height="20" colspan="2" class="mytext"> 内 容: 与站长的悄悄话【
<input name="sec" type="checkbox" id="sec" value="1">
】【 <a href="ubb.htm" target="_blank">UBB 帮助</a> 】</td>
</tr>
<tr>
<td height="20" colspan="2" class="mytext" width="400"><%dim a,i
for i=1 to 59
if len(i)=1 then a="0" & i else a=i
response.write "<img src=""images/faces/"&a&".gif"" width=20 height=20 border=0 onclick=""insertface('[face"&a&"]')"" style=""CURSOR: hand"">"
next
%>
</td>
</tr>
<tr>
<td height="20" colspan="2" class="mytext" width="400"><input name="链" type="button" value="链接" class="fastbtn" onclick="insertUBB('link');"><input name="大小" type="button" value="大小" class="fastbtn" onclick="insertUBB('size');"><input name="粗体" type="button" value="加粗" class="fastbtn" onclick="insertUBB('bold');"><input name="斜体" type="button" value="倾斜" class="fastbtn" onclick="insertUBB('ital');"><input name="斜体" type="button" value="下划" class="fastbtn" onclick="insertUBB('underline');"><input name="颜色" type="button" value="颜色" class="fastbtn" onclick="insertUBB('color');"><input name="字体" type="button" value="字体" class="fastbtn" onclick="insertUBB('font');"><input name="色" type="button" value="插图" class="fastbtn" onclick="insertUBB('images');"><input name="引用" type="button" value="引用" class="fastbtn" onclick="insertUBB('quote');"><input name="上标" type="button" value="上标" class="fastbtn" onclick="insertUBB('sup');"><input name="下标" type="button" value="下标" class="fastbtn" onclick="insertUBB('sub');">
</td>
</tr>
<tr>
<td colspan="2"><textarea id="ncont" name="ncont" cols="63" rows="8" class="input_common"></textarea></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;">
<input type="reset" value="重新填写" class="button_common" style="width: 80px; height:18px;">
<input name="按钮" type="submit" value="保存留言" class="button_common" style="width: 80px; height:18px;">
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -