📄 guestbook.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<!--#include file="../Conn.asp"-->
<!--#include file="../SysCls/KS_CommonCls.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 SP2 Free
'Copyright (C) 2006-2008 Kesion.Com All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail :kesioncms@hotmail.com webmaster@kesion.com
'官方网站:http://www.kesion.com
'演示站点:http://test.kesion.com
'郑重声明:
' ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
' ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
' ③、科汛网络保留此软件的法律追究权利
'===================================================================================================================
Dim KSCls
Set KSCls = New User_GuestBook
KSCls.Execute()
Set KSCls = Nothing
Class User_GuestBook
Private KSCMS
Private GuestNum,GuestCheckTF
Private Sub Class_Initialize()
Set KSCMS=New CommonCls
End Sub
Private Sub Class_Terminate()
Call KSCMS.CloseConn()
Set KSCMS=Nothing
End Sub
Public Sub Execute()
GuestNum=KSCMS.GetConfig("GuestNum")
GuestCheckTF=KSCMS.GetConfig("GuestCheckTF")
%>
<html>
<head>
<title><%=KSCMS.GetConfig("WebName")%>-雁过留声</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="<%=KSCMS.GetConfig("InstallDir")%>Skin/Style.css" type="text/css">
<SCRIPT language="javascript">
<!--
function changeimage()
{
document.myform.pic.value=document.myform.Image.value;
document.myform.showimages.src='<%=KSCMS.GetConfig("InstallDir")%>Skin/Face/'+document.myform.Image.value+'.gif';
}
function guestpreview()
{
document.preview.content.value=document.myform.GuestContent.value;
var popupWin = window.open('GuestPreview.asp', 'GuestPreview', 'scrollbars=yes,width=620,height=230');
document.preview.submit();
}
function datacheck()
{
if (myform.Name.value==""){
alert("你好像还忘了填昵称哦!");
myform.Name.focus();
return false;
}
if (myform.Email.value==""){
alert("电子邮件一定要填写哦!");
myform.Email.focus();
return false;
}
haha=myform.Email.value
if(haha.length>0)
{
i=haha.indexOf("@");
if(i==-1)
{
alert("哇!您输入的电子邮件有错误哦!")
myform.Email.focus();
return false;
}
ii=haha.indexOf(".")
if(ii==-1)
{
alert("哇!您输入的电子邮件有错误哦!")
myform.Email.focus();
return false;
}
}
if (checktext(haha))
{
alert("能告诉我您的有效电子邮件吗?");
myform.Email.focus();
return false;
}
<%IF KSCMS.GetConfig("GuestVerificTF")=1 Then%>
if (myform.Code.value==""){
alert("请输入附加码,留言要有点耐心哦!!");
myform.Code.focus();
return false;
}
<%End IF%>
if (myform.Memo.value==""){
alert("留言还没写呢,这样可不行哦!!");
myform.Memo.focus();
return false;
}
}
function checktext(text)
{
allValid = true;
for (i = 0; i < text.length; i++)
{
if (text.charAt(i) != " ")
{
allValid = false;
break;
}
}
return allValid;
}
function gbcount(message,total,used,remain)
{
var max;
max = total.value;
if (message.value.length > max) {
message.value = message.value.substring(0,max);
used.value = max;
remain.value = 0;
alert("留言不能超过 <%=KSCMS.ChkClng(GuestNum)%> 个字!");
}
else {
used.value = message.value.length;
remain.value = max - used.value;
}
}
-->
</script>
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
</head>
<body>
<TABLE cellSpacing=0 cellPadding=0 width=770 align=center bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="1%"><IMG height=32 src="/Skin/Skin1/05top_02.gif" width=11 twffan="done"></TD>
<TD width="59%" background=/Skin/Skin1/05top_03.gif>当前位置:<a href="<%=KSCMS.GetDomain%>"><%=KSCMS.GetConfig("WebName")%></a> >> <a href="Index.asp">雁过留声</a> >> 签写留言</TD>
<TD vAlign=bottom align=right width=300 background=/Skin/Skin1/05top_05.gif> </TD>
<TD width="1%"><IMG height=32 src="/Skin/Skin1/05top_08.gif" width=10 twffan="done"></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
</TBODY>
</TABLE>
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="TableControl">
<tbody>
<tr>
<td valign="top" class="TableListRIght"><table cellspacing=0 cellpadding=0 width="100%" align=center border=0>
<tbody>
<tr>
<td height="40" background="Images/Title.gif" style="padding-left:60; font-size:16px; font-weight:bold; color:#FF6600"> 访客留言</td>
</tr>
</tbody>
</table>
<table cellspacing=0 cellpadding=0 width=100% border=0>
<tbody>
<tr>
<td valign=top>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<form action="GuestBook_Save.asp" method="post" name="myform" onSubmit="return datacheck();">
<tr>
<td height="25" align="right" valign="top"><img src="images/gbook.gif" width="18" height="18" border="0" align="absmiddle"> <a href="Index.asp">查看留言</a> <a href="GuestBook.asp"><img src="images/weite.gif" border="0" width="18" height="14"> 签写留言</a></td>
</tr>
<%If GuestCheckTF = 1 Then%>
<tr>
<td height="25" valign="top"><span style="line-height:150%; padding:10px 10px 10px 10px;"><font color="#cc0000"><b>留 言 需 知</b></font>:本站留言需要经过审核才能显示,请大家耐心等待,站长会在第一时间给你回复,发布留言时请不要重复发布。</span></td>
</tr>
<%End IF%>
<tr>
<td valign="top">
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" class="font">
<tr>
<td width="15%" height="25" align="right" >昵 称 :</td>
<td height="25" ><input name="Name" maxlength="15" class=inputtext size="25" >
<span class="Notice STYLE1">*</span></td>
</tr>
<tr>
<td height="25" align="right" >信 箱 :</td>
<td height="25" ><input name="Email" size="25" maxlength="50" class=inputtext >
<span class="Notice STYLE1">*</span></td>
</tr>
<tr>
<td height="25" align="right" >主 页 :</td>
<td height="25" ><input name="Homepage" size="35" maxlength="50" value="http://" class=inputtext ></td>
</tr>
<tr>
<td height="25" align="right" >QQ号码 :</td>
<td height="25">
<input name="Oicq" maxlength="10" class=inputtext size="25" ></td>
</tr>
<tr<%if KSCMS.GetConfig("GuestVerificTF")=0 Then Response.Write " Style='display:none'"%>>
<td height="25" align="right">附加码 :</td>
<td height="25"><input name="Code" type="text" class=inputtext size="8">
<IMG style="cursor:hand" src="<%=KSCMS.GetDomain%>inc/verifycode.asp" onClick="this.src=this.src;" align="absmiddle"> <-- 请输入左边的数字</td>
</tr>
<tr>
<td height="25" align="right">选择头像 :</td>
<td height="25"><INPUT type=hidden value=01 name=pic><IMG title=点击选择头像 style="CURSOR: hand" onClick="window.open('guestselect.asp?action=face','face','width=480,height=400,resizable=1,scrollbars=1')"
height=90 src="<%=KSCMS.GetConfig("InstallDir")%>Skin/Face/01.gif" width=80 border=0 name=showimages> <SELECT onchange=changeimage(); size=1 name=Image>
<OPTION value=01 selected>01</OPTION> <OPTION value=02>02</OPTION>
<OPTION value=03>03</OPTION> <OPTION value=04>04</OPTION> <OPTION
value=05>05</OPTION> <OPTION value=06>06</OPTION> <OPTION
value=07>07</OPTION> <OPTION value=08>08</OPTION> <OPTION
value=09>09</OPTION> <OPTION value=10>10</OPTION> <OPTION
value=11>11</OPTION> <OPTION value=12>12</OPTION> <OPTION
value=13>13</OPTION> <OPTION value=14>14</OPTION> <OPTION
value=15>15</OPTION> <OPTION value=16>16</OPTION> <OPTION
value=17>17</OPTION> <OPTION value=18>18</OPTION> <OPTION
value=19>19</OPTION> <OPTION value=20>20</OPTION> <OPTION
value=21>21</OPTION> <OPTION value=22>22</OPTION> <OPTION
value=23>23</OPTION></SELECT> </td>
</tr>
</table>
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center" >
<tr>
<td height="20" colspan="16" align="center" nowrap class="font"> ::::::::::::::::::::::::::::::::::::::::::::: 选 择 表 情 ::::::::::::::::::::::::::::::::::::::::::::</td>
</tr>
<tr align="center" height="25">
<td colspan="16">
<%Dim I
For I=1 To 30
Response.Write "<input type=""radio"" name=""txthead"" value=""" & I & """"
IF I=1 Then Response.Write(" Checked")
Response.Write" ><img src=""../Skin/Face1/Face" & I & ".gif"" border=""0"">"
IF I Mod 15=0 Then Response.Write("<BR>")
Next
%>
</td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" align="center" width="90%" class="font">
<tr>
<td align="center"> ::::::::::::::::::::::::::::::::::::::::::::: 留 言 内 容 ::::::::::::::::::::::::::::::::::::::::::::</td>
</tr>
<tr>
<td height="140" align="center"><textarea class="inputmultiline" name="Memo" rows="10" wrap=PHYSICAL cols="80" onKeyDown="gbcount(this.form.Memo,this.form.total,this.form.used,this.form.remain);" onKeyUp="gbcount(this.form.Memo,this.form.total,this.form.used,this.form.remain);"></textarea></td>
</tr>
<tr>
<td height="25"> 最多字数:
<input disabled maxLength="4" name="total" size="3" value="<%=KSCMS.ChkClng(GuestNum)%>" class="inputtext">
已用字数:
<input disabled maxLength="4" name="used" size="3" value="0" class="inputtext">
剩余字数:
<input disabled maxLength="4" name="remain" size="3" value="<%=KSCMS.ChkClng(GuestNum)%>" class="inputtext"></td>
</tr>
<tr>
<td height="25"> 注:严禁使用任何html、javascript脚本或其他非法性字符,书写留言请少于<%=KSCMS.ChkClng(GuestNum)%>字。</td>
</tr>
<tr>
<td height="45" align="center">
<input type="submit" class=inputbutton value="立即提交" name="Submit">
<input type="button" value="重新设置" name="cmdExit" class="inputbutton" onClick=" history.back()"></td>
</tr>
</table>
<p> </p></td>
</tr>
</form>
</table> </td>
</tr>
</tbody>
</table> </td>
</tr>
</tbody>
</table>
<table height="37" cellspacing="0" cellpadding="0" width="770" align="center" bgcolor="#ffffff" background="/Skin/Skin1/but05_bg.gif" border="0">
<tbody>
<tr>
<td width="19" background="/Skin/Skin1/k_bg_left.gif" bgcolor="#ffa200"><img height="37" src="/Skin/Skin1/but05_left.gif" width="19" /></td>
<td align="left" width="278" height="37"><a href="http://www.kesion.com">关于我们</a> | <a href="http://bbs.kesion.com">技术论坛</a> | <a href="http://www.kesion.com" target="_blank">官方站点</a> </td>
<td class="fil" align="right" width="459">科汛网络 © 版权所有 2006-2008 Powered By <a href="http://www.kesion.coM" target="_blank"><font color="#FF0000">KeSion.Com</font></a> <br />
</td>
<td align="middle" width="14"><img height="37" src="/Skin/Skin1/but05_right.gif" width="12" /></td>
</tr>
</tbody>
</table>
<%
End Sub
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -