📄 gbook.asp
字号:
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height
</script>
<%
end if
rs.close
Response.end
%>
<% EnD iF %>
<% If Request("i")="sub" Then %>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style>
<body STYLE="background-color:transparent">
<form action="?action=post" method="post" name="form" id="form">
<table width="100%" border="0" align="center">
<tr>
<td width="187" height="23" align="right">留言昵称:</td>
<td colspan="2" align="left">
<input name="name" type="text" size="20" class="input2" />
* (请使用中文)</td>
</tr>
<tr>
<td height="26" align="right">来自哪里:</td>
<td width="261" align="left"><select name="where" size="1" class="input2" id="select2" style="border: 1px solid #E6E6E6">
<option value="未知" selected="selected">保密</option>
<option value="北京">北京</option>
<option value="上海">上海</option>
<option value="天津">天津</option>
<option value="重庆">重庆</option>
<option value="河北">河北</option>
<option value="山西">山西</option>
<option value="内蒙古">内蒙古</option>
<option value="辽宁">辽宁</option>
<option value="吉林">吉林</option>
<option value="黑龙江">黑龙江</option>
<option value="江苏">江苏</option>
<option value="浙江">浙江</option>
<option value="安徽">安徽</option>
<option value="福建">福建</option>
<option value="江西">江西</option>
<option value="山东">山东</option>
<option value="河南">河南</option>
<option value="湖北">湖北</option>
<option value="湖南">湖南</option>
<option value="广东">广东</option>
<option value="广西">广西</option>
<option value="海南">海南</option>
<option value="四川">四川</option>
<option value="贵州">贵州</option>
<option value="云南">云南</option>
<option value="西藏">西藏</option>
<option value="陕西">陕西</option>
<option value="甘肃">甘肃</option>
<option value="宁夏">宁夏</option>
<option value="青海">青海</option>
<option value="新疆">新疆</option>
<option value="香港">香港</option>
<option value="澳门">澳门</option>
<option value="台湾">台湾</option>
<option value="海外">海外</option>
</select>
</td>
<td width="239" rowspan="2" align="left"><img src="images/face/1.gif" name="iface" width="75" height="75" id="iface" /></td>
</tr>
<tr>
<td height="26" align="right">选择头像:</td>
<td align="left">
<select name="pic" size="1" class="input2" style="border: 1px solid #E6E6E6" onchange="document.images ['iface'].src=options[selectedIndex].value;">
<option value="images/face/1.gif" selected="selected">NO. 01</option>
<%for i=2 to 21%>
<option value="images/face/<%=i%>.gif">NO.
<%if i<10 then
response.write "0"&i
else response.write i
end if
%>
</option>
<%next%>
</select></td>
</tr>
<tr>
<td height="26" align="right">留言性质:</td>
<td colspan="2" align="left">
<input name="show" type="radio" class="input2" value="1" checked="checked" />
公开
<input name="show" type="radio" class="input2" value="2" />
悄悄话</td>
</tr>
<tr>
<td align="right" valign="middle">留言内容:<br />
<br />
</td>
<td colspan="2" align="left">
<textarea name="content" cols="55" rows="9" id="textarea3" class="input2"></textarea>
</td>
</tr>
<%
dim rndnum,checkCode
Randomize
Do While Len(rndnum)<4
num1=CStr(Chr((57-48)*rnd+48))
rndnum=rndnum&num1
loop
session("checkCode")=rndnum
%>
<tr>
<td height="26" align="right">验证码:</td>
<td colspan="2" align="left">
<input name="checkcode" type="text" class="input2" size="4" maxlength="4" />
<font color="#FF0000"><%=rndnum%></font>
</td>
</tr>
<tr>
<td height="40" colspan="3" valign="middle" align="center">
<input name="submit" type="submit" class="input2" id="submit3" value="发表留言" onclick="javascript:return CheckForm();"/>
<input type="reset" name="Submit2" value="清除留言" class="input2" />
<input type="button" value="返 回" name="cmdExit" onclick=" history.back()" class="input2" />
</td>
</tr>
<tr>
<td colspan="3" valign="middle"> </td>
</tr>
</table>
</form>
<%
Response.end
End iF
%>
<%
if request("action")="post" then
dim bookname
dim bookwhere
dim bookpic
dim bookface
dim bookcontent
dim booktime
dim bookip
dim FoundErr,ErrMsg
bookname=request("name")
bookwhere=request("where")
bookpic=request("pic")
bookface=request("face")
bookshow=request("show")
bookcontent=request("content")
checkcode=Request("checkcode")
bookip=request.ServerVariables("REMOTE_ADDR")
if bookname="" then
Response.Write "<SCRIPT LANGUAGE='JavaScript'>"
Response.Write "alert('留言昵称不能为空!');"
Response.Write "history.go(-1);"
Response.Write "</SCRIPT>"
Response.End
end If
if bookcontent="" then
Response.Write "<SCRIPT LANGUAGE='JavaScript'>"
Response.Write "alert('留言内容不能为空!');"
Response.Write "history.go(-1);"
Response.Write "</SCRIPT>"
Response.End
end if
if checkcode="" Or checkcode<> Session("checkcode") then
Response.Write "<SCRIPT LANGUAGE='JavaScript'>"
Response.Write "alert('验证码输错啦!');"
Response.Write "history.go(-1);"
Response.Write "</SCRIPT>"
Response.End
end If
strArr=split(W_BookWorryNeed,"|")
set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from book"
rs.open sql,conn,1,3
rs.addnew
rs("name")=htmlencode(bookname)
rs("where")=htmlencode(bookwhere)
rs("pic")=bookpic
rs("face")="images/face/"&bookface&".gif"
rs("show")=bookshow
rs("content")=htmlencode(bookcontent)
rs("ip")=bookip
rs("time")=now()
rs.update
rs.close
Response.Write "<SCRIPT LANGUAGE='JavaScript'>"
Response.Write "alert('恭喜您!您已经成功提交了信息!');"
Response.Write "window.location.href='Gbook.asp?i=show'"
Response.Write "</SCRIPT>"
Response.end
end if
%>
<body>
<table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="14" rowspan="2" valign="top"><img src="images/index_01.gif" width="14" height="600" alt=""></td>
<td width="298" height="83" valign="top"><a href="Index.asp"><img src="images/index_021.gif" alt="" width="298" height="83" border="0"></a></td>
<td valign="top" background="images/index_03_07.gif"><a href="News.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','images/index_03_011.gif',1)"><img src="images/index_03_01.gif" width="101" height="83" border="0" name="Image1"></a><a href="Article.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','images/index_03_021.gif',1)"><img src="images/index_03_02.gif" width="110" height="83" border="0" name="Image2"></a><a href="Product.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','images/index_03_031.gif',1)"><img src="images/index_03_03.gif" width="117" height="83" border="0" name="Image3"></a><a href="Download.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image4','','images/index_03_041.gif',1)"><img src="images/index_03_04.gif" width="116" height="83" border="0" name="Image4"></a><a href="Aboutus.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','images/index_03_051.gif',1)"><img src="images/index_03_05.gif" width="109" height="83" border="0" name="Image5"></a><a href="Gbook.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','images/index_03_061.gif',1)"><img src="images/index_03_06.gif" width="103" height="83" border="0" name="Image6"></a></td>
</tr>
<tr>
<td height="517" colspan="2" valign="top" background="images/bg.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="503"><table width="700" height="192" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="50" valign="top" background="images/bg2.jpg"><img src="images/index_v5_book.gif" width="50" height="492"></td>
<td valign="top" background="images/bg2.jpg">
<table width="95%" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td height="30" align="right">
<a href="Gbook.asp?i=sub" target="demo">发表留言</a> <a href="Gbook.asp?i=show" target="demo">查看留言</a> </td>
<tr>
<td height="30">
<iframe name="demo" width="600" height="430" src="Gbook.asp?i=show" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowTransparency="true">浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td align="center" valign="baseline"><img src="images/copyright.jpg" width="330" height="13"></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -