📄 guest_bf_bk.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-----------------------
function HTMLEncode(fString)
if not isnull(fString) then
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, CHR(32), " ")
fString = Replace(fString, CHR(9), " ")
fString = Replace(fString, CHR(34), """)
fString = Replace(fString, CHR(39), "'")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
fString = Replace(fString, CHR(10), "<BR> ")
HTMLEncode = fString
end if
end function
'------------------- v 1.4 解决留言不会换行的Bug-----------------------
%>
<%
'------------------- v 1.4 解决留言不会换行的Bug-----------------------
content=HtmlEncode(Request.form("ncont"))
'------------------- v 1.4 解决留言不会换行的Bug-----------------------
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")
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")=Request.form("ntitl")
rs("content")=content
if request.Form("sec")=1 then
rs("sec")=1
end if
rs("Date")=Date()
rs("Time")=Time
rs("Ip")=sip
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=gb2312">
<title>发表新留言</title>
<style type="text/css">
<!--
body {
background-color: #CCCCCC;
font-size: 12px;
background-image: url();
}
.mytext {
font-size: 12px;
color: #003366;
}
.txt_h {
font-size: 14px;
border-bottom-width: 1px;
border-bottom-style: dashed;
border-bottom-color: #0099CC;
}
-->
</style>
</head>
<body>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" bgcolor="#FFFFFF" align="center" style="background-image:url(<% =GBSkin %>/guest_top.gif) " class="txt_h"><font color="#006699"><b>填写留言 <a href="index.asp">返回</a></b></font></td>
</tr>
</table>
<table width="500" border="0" align="center" cellpadding="0" cellspacing="5" bgcolor="#FFFFFF" style="background-image:url(<% =GBSkin %>/guest_bg.gif) ">
<form name="lyform" method="POST" action="guest.asp?op=addguest">
<tr>
<td height="5" class="mytext"></td>
<td></td>
</tr>
<tr>
<td width="283" class="mytext"> 昵 称:
<input type="text" name="nname" style="width: 120px; height:18px; border-top-width:1px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px; font-size:12px "></td>
<td width="202"> <span class="mytext"> 你是: 帅哥:
<input name="nsex" type="radio" value="帅哥" checked>
靓女:
<input type="radio" name="nsex" value="靓女">
</span></td>
</tr>
<tr>
<td height="19" class="mytext"> 来 自:
<input name="naddr" type="text" value="广东省广州市" size="15" maxlength="6" style="width: 120px; height:18px; border-top-width:1px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px; font-size:12px ">(最多6位)</td>
<td class="mytext"> OICQ: <input name="noicq" type="text" size="15" style="width: 100px; height:18px; border-top-width:1px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px; font-size:12px ">
</td>
</tr>
<tr>
<td class="mytext"> 邮 箱:
<input type="text" name="nmail" style="width: 150px; height:18px; border-top-width:1px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px; font-size:12px "></td>
<td class="mytext"> 头像:
<select name="nhead">
<option>pic1</option>
<option>pic2</option>
<option>pic3</option>
<option>pic4</option>
<option>pic5</option>
<option>pic6</option>
<option>pic7</option>
<option>pic8</option>
<option>pic9</option>
<option>pic10</option>
<option>pic11</option>
<option>pic12</option>
<option>pic13</option>
<option>pic14</option>
<option>pic15</option>
<option>pic16</option>
<option>pic17</option>
<option>pic18</option>
<option>pic19</option>
<option>pic20</option>
</select>
<a href="piclist.htm" target="_blank">头像列表</a> </td>
</tr>
<tr>
<td colspan="2" class="mytext"> 主 页:
<input name="npage" type="text" value="http://www.zhisi.net" size="28" style="width: 180px; height:18px; border-top-width:1px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px; font-size:12px "><span class="mytext"> </span></td>
</tr>
<tr>
<td colspan="2" class="mytext"> 主 题:
<input name="ntitl" type="text" size="28" style="width: 240px; height:18px; border-top-width:1px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px; font-size:12px "></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 align="center">
<td colspan="2"><textarea name="ncont" cols="62" rows="6" style="border-top-width:1px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px; font-size:12px "></textarea></td>
</tr>
<tr align="center">
<td height="30" colspan="2"><input type="reset" value="重新填写" style="width: 80px; height:18px; border-top-width:1px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px; font-size:12px "> <input name="按钮" type="submit" value="保存留言" style="width: 80px; height:18px; border-top-width:1px; border-bottom-width:1px; border-left-width:1px; border-right-width:1px; font-size:12px "></td>
</tr>
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -