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

📄 guestbook.asp

📁 旅游路线管理 比较方便的旅游路线管理
💻 ASP
字号:
<!--===============================================================-->
<!--Mfkiqpl旅行社旅游线路预订程序源代码仅供学习或部分旅行社网站用---->
<!--任何单位或个人不得随意修改、截取其中代码或做不法用途------------->
<!--版权归属:mfkiqpl   http://www.zjjnet.com 所有-------------------->
<!--请务必保留以下版权信息------------------------------------------->
<!--作者:mfkiqpl----------------------------------------------------->
<!--QQ:31827726 mail:mfkiqpl@126.com--------------------------------->
<!--主页地址:http://www.zjjnet.com----------------------------------->
<!----------------欢迎各位站长与本人小站进行友情链接----------------->
<!--===============================================================-->
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="config.asp"-->
<!--#include file="system/ubb.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><%=title%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.hh {
	cursor: hand;
}
-->
</style>
</head>
<body>
<script>
function mfk(){
if(form1.t1.value==""){
alert("请填写姓名!");
form1.t1.focus();
return false;
}
if(form1.t4.value==""){
alert("请填写留言内容!");
form1.t4.focus();
return false;
}
if(form1.t1.value.length>50){
alert("姓名的字数不能大于50");
form1.t1.focus();
return false;
}
if(form1.t2.value.length>50){
alert("邮件的字数不能大于50");
form1.t2.focus();
return false;
}
if(form1.t3.value.length>50){
alert("主页的字数不能大于50");
form1.t3.focus();
return false;
}
}
function addmfk(str){
	form1.t4.value+=str;
	form1.t4.focus;
}
function opennew(url,hh,ww){
properties  = "width=" + ww;
properties += ",height=" + hh;
properties += ",scrollbars=0,toolbar=0,location=0";
properties += ",directories=0,status=0,menubar=0";
properties += ",resizable=0,left=200,top=100";
window.open (url,null,properties);
}
</script>
<%
dim page
page=request("page")
if page="" then
page=1
end if
if session("admin")="mfkiqpl" then
admin=true
end if
sub addly()
dim t1,t2,t3,t4,t5
t1=replace(request("t1"),"'","’")
t2=replace(request("t2"),"'","’")
t3=replace(request("t2"),"'","’")
t3=replace(request("t3"),"'","’")
t4=replace(request("t4"),"'","’")
t5=now()
if t1<>"" and t4<>"" then
sql="insert into guestbook(uname,uemail,uhomepage,utext,utime)values('"&t1&"','"&t2&"','"&t3&"','"&t4&"','"&t5&"')"
conn.execute (sql)
response.Redirect("guestbook.asp")
end if
end sub
dim action
action=request("action")
if action="ok" then
addly
end if
call pagestart%>
<table width="755" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="<%=color1%>">  <tr><td height="22" bgcolor="<%=color2%>"><table width="750" border="0" cellspacing="0" cellpadding="0">
 <tr>   <td width="45" align="center"><img src="images/write.gif" width="31" height="20"></td>   <td width="550"><strong>书写留言</strong></td>   <td width="77" class="hh"><a onclick="opennew('manageguestbook.asp','350','300');" title="进入留言板管理">管理留言板</a></td>
   <td width="78" class="hh"><a onclick="opennew('help.asp','200','200');" title="帮助">UBB代码帮助</a></td>
 </tr></table></td>  </tr>  <tr><td height="173" bgcolor="<%=color3%>"><table width="750" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td height="28" colspan="3"><table width="700" border="0" align="center" cellpadding="0" cellspacing="0"><tr>
  <td width="130" align="center">选择插入心情图标:</td>
  <td width="30" align="center"><img src="mfk-face/1.gif" alt="[mfk1]" width="19" height="19" class="hh" onclick="addmfk('[mfk1]')"></td>
  <td width="30" align="center"><img src="mfk-face/2.gif" alt="[mfk2]" width="19" height="19" onclick="addmfk('[mfk2]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/3.gif" alt="[mfk3]" width="19" height="19" onclick="addmfk('[mfk3]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/4.gif" alt="[mfk4]" width="19" height="19" onclick="addmfk('[mfk4]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/5.gif" alt="[mfk5]" width="19" height="19" onclick="addmfk('[mfk5]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/6.gif" alt="[mfk6]" width="19" height="19" onclick="addmfk('[mfk6]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/7.gif" alt="[mfk7]" width="19" height="19" onclick="addmfk('[mfk7]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/8.gif" alt="[mfk8]" width="19" height="19" onclick="addmfk('[mfk8]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/9.gif" alt="[mfk9]" width="19" height="19" onclick="addmfk('[mfk9]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/10.gif" alt="[mfk10]" width="19" height="19" onclick="addmfk('[mfk10]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/11.gif" alt="[mfk11]" width="19" height="19" onclick="addmfk('[mfk11]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/12.gif" alt="[mfk12]" width="19" height="19" onclick="addmfk('[mfk12]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/13.gif" alt="[mfk13]" width="19" height="19" onclick="addmfk('[mfk13]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/14.gif" alt="[mfk14]" width="19" height="19" onclick="addmfk('[mfk14]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/15.gif" alt="[mfk15]" width="19" height="19" onclick="addmfk('[mfk15]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/16.gif" alt="[mfk16]" width="19" height="19" onclick="addmfk('[mfk16]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/17.gif" alt="[mfk17]" width="19" height="19" onclick="addmfk('[mfk17]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/18.gif" alt="[mfk18]" width="19" height="19" onclick="addmfk('[mfk18]')" class="hh"></td>
  <td width="30" align="center"><img src="mfk-face/19.gif" alt="[mfk19]" width="19" height="19" onclick="addmfk('[mfk19]')" class="hh"></td>
</tr>   </table></td>   </tr><form name="form1" method="post" action="guestbook.asp?action=ok" onSubmit="return mfk();"> <tr>   <td width="86" height="30" align="center"> 姓名:</td>   <td width="181" height="30"><input name="t1" type="text" id="t1" maxlength="50" value="<%=session("user")%>" onMouseOver="this.focus();"></td>   <td width="483" rowspan="3"><textarea name="t4" cols="60" rows="6" id="t4" onMouseOver="this.focus();"></textarea></td> </tr> <tr>   <td height="30" align="center">邮件:</td>   <td height="30"><input name="t2" type="text" id="t2" maxlength="50" onMouseOver="this.focus();"></td>   </tr> <tr><td height="30" align="center">主页:</td><td height="30"><input name="t3" type="text" id="t3" value="http://" maxlength="50" onMouseOver="this.focus();"></td>
</tr><tr><td height="30" colspan="3" align="center"><input type="submit" name="Submit" value="确定留言">      <input type="reset" name="Submit2" value="清除重写"></td></tr></form></table></td></tr></table>
<%
set rsl=server.createobject("adodb.recordset")
set rsl.activeconnection=conn
lis="select * from [guestbook] order by id desc"
rsl.open lis,,1,2
if (rsl.bof and rsl.eof) then
response.write("<table width=755 border=0 align=center cellpadding=0 cellspacing=1 bgcolor="&color1&"><tr><td height=20 align=center bgcolor="&color3&">暂时还没有人留言,您不想说几句吗?</td></tr></table>")
else
i=0
while not rsl.eof and i<(page-1)*pagesize
rsl.movenext
i=i+1
wend
while not rsl.eof and i<page*pagesize
%>
<table width="755" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="<%=color1%>">  <tr><td height="22" bgcolor="<%=color2%>"><table width="750" border="0" cellspacing="0" cellpadding="0">
<tr><td width="24" align="center"><img src="images/rr.gif" width="10" height="12"></td>   <td width="435"> <strong><%=rsl("uname")%></strong> 在 <strong><%=rsl("utime")%></strong> 说:</td>
<td width="72" align="center"><a href="mailto:<%=rsl("uemail")%>"><img src="images/email.gif" alt="给<%=rsl("uname")%>发邮件" width="42" height="16" border="0"></a></td>
<td width="72" align="center"><a href="<%=rsl("uhomepage")%>" target="_blank"><img src="images/homepage.gif" alt="查看<%=rsl("uname")%>的主页" width="42" height="16" border="0"></a></td>
<td width="72" align="center"><%if admin=true then%><a href="javascript:opennew('reguestbook.asp?id=<%=rsl("id")%>','200','400')"><img src="images/edit.gif" alt="回复" width="42" height="16" border="0"></a>
  <%else%><img src="images/edit.gif" alt="回复" width="42" height="16">
  <%end if%></td>
<td width="75" align="center"><%if admin=true then%><a href="javascript:opennew('delguestbook.asp?id=<%=rsl("id")%>','1','1')"><img src="images/del.gif" alt="删除" width="42" height="16" border="0"></a>
  <%else
response.write("<img src=""images/del.gif"" alt=""删除"" width=""42"" height=""16"">")
end if
response.write("</td></tr></table></td>  </tr>  <tr><td bgcolor="&color3&"><table width=""749"" border=""0"" align=""center"" cellpadding=""5"" cellspacing=""0"" class=""ttt"">")
response.write("<tr><td height=""36"" style=""word-break:break-all"">"&face(ubbcode(rsl("utext")))&"</td> </tr></table>")
if rsl("re").value<>"" then
response.write("<table width=750 border=0 align=center cellpadding=0 cellspacing=0 class=ttt><tr><td height=40 bgcolor="&color4&">    <img src=images/rr1.gif width=10 height=12>版主回复:<br>  ")
response.write(face(ubbcode(rsl("re"))))
response.write("</td></tr> </table>")
end if
response.write("</td></tr></table>")
rsl.movenext
i=i+1
wend
response.write("<table width=755 border=0 align=center cellpadding=0 cellspacing=1 bgcolor="&color1&"><tr><td height=22 bgcolor="&color2&">")
	rsl.pagesize=pagesize
	if rsl.pagecount>0 then
	response.write ("  分页:")
	for i=1 to rsl.pagecount
	response.Write (" <a href='guestbook.asp?page="&i&"'><"&i&"></a>")
	next
	end if
response.write("</td></tr></table>")
rsclose(rsl)
end if
response.write("<table width='755' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td height='5'></td></tr></table>")
pageend
%>

⌨️ 快捷键说明

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