📄 liuyan.asp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>校园网</TITLE>
<META http-equiv=Content-Language content=zh-cn>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<link href="css.css" rel="stylesheet" type="text/css">
<link href="news.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.box4 {
border-top-width: 0px;
border-right-width: 1px;
border-bottom-width: 0px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #CCCCCC;
border-right-color: #CCCCCC;
border-bottom-color: #CCCCCC;
border-left-color: #CCCCCC;
}
-->
</style>
</HEAD>
<!--#include file=include/conn.asp-->
<!--#include file=include/top.asp -->
<%
const MaxPerPage=5
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<%
dim sql2
dim rs2
sql2="select * from admin"
Set rs2= Server.CreateObject("ADODB.Recordset")
rs2.open sql2,conn,1,1
%>
<%
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from guestbook order by id DESC"
rs.open sql,conn,1,1%>
<% if rs.eof and rs.bof then
response.write "<p align='center'> 还没有留言</p>"
else
totalPut=rs.recordcount
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"index.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"index.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"index.asp"
end if
end if
rs.close
end if
set rs=nothing
conn.close
set conn=nothing
sub showContent
dim i
i=0
%>
<body topmargin="0">
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5" background="../images/bgimg_left.gif"> </td>
<td><TABLE width="768" align="center" cellPadding=10 cellSpacing=0 bgcolor="#FFFFFF" class="box4">
<form ACTION="ly_save.asp" METHOD="POST" NAME="guestbook">
<script language="javascript">
<!--//
function checksignup() {
if ( document.guestbook.name.value == '' ) {
window.alert('请输入您的姓名!!');
document.guestbook.name.focus();
return false;
}
if ( document.guestbook.content.value == '' ) {
window.alert('请输入留言反馈内容!!');
document.guestbook.content.focus();
return false;
}
if ( document.guestbook.email.value.length> 0 &&!document.guestbook.email.value.indexOf("@")==-1|document.guestbook.email.value.indexOf(".")==-1 ) {
window.alert('请输入正确的Email地址!!');
document.guestbook.email.focus();
return false;
}
if((document.guestbook.tel.value!="")){if(isNaN(document.guestbook.tel.value)||(document.guestbook.tel.value.length<7)) {
window.alert("请输入有效电话号码,只能是数字!!");
document.guestbook.tel.focus();
return false;
}
}
if (document.guestbook.content.value.length>800)
{
window.alert("留言反馈内容不能超过800字!!");
document.guestbook.content.focus();
return false;
}
return true;
}
//-->
</script>
<TBODY>
<TR>
<TD align=center valign="middle" class="table-you"> <table width="427" cellspacing="1" bgcolor="#FFFFFF">
<tr align="center" valign="middle" bgcolor="f4f4f4">
<td height="20" colspan="2"><font color="#3366CC" size="2"><strong>我
要 留 言</strong></font></td>
</tr>
<tr valign="middle" bgcolor="#FFFFFF">
<td width="70" height="20" align="left">您的姓名<font color="#FF3333">*</font></td>
<td width="314" height="20">
<INPUT name=name
class=wenbenkuang size=15 maxlength="10" ></td>
</tr>
<tr valign="middle" bgcolor="#FFFFFF">
<td height="20" align="left">联系电话</td>
<td height="20">
<INPUT name=tel
class=wenbenkuang id="tel2" size=35 maxlength="20" ></td>
</tr>
<tr valign="middle" bgcolor="#FFFFFF">
<td height="20" align="left">电子信箱</td>
<td height="20">
<INPUT name=email
class=wenbenkuang id="email2" size=35 ></td>
</tr>
<tr valign="middle" bgcolor="#FFFFFF">
<td height="20" align="left" valign="top"><br>
留言内容<font color="#FF3333">*</font></td>
<td height="20">
<TEXTAREA title="留言反馈的内容,每条不能超过800字。
如果您有多项问题要反馈,请分开提交。
谢谢您对我的支持!" class=wenbenkuang name=content rows=5 cols=34 ></TEXTAREA></td>
</tr>
<tr valign="middle" bgcolor="#FFFFFF">
<td height="20" align="right"> </td>
<td height="20">
<INPUT name=submit type=submit class="go-wenbenkuang" id="submit2" ONCLICK="javascript:return checksignup()" value='提 交'>
<INPUT class=go-wenbenkuang type=reset value="重 填" name=B1>
</td>
</tr>
</table></TD>
</TR>
</FORM>
</TABLE></td>
<td width="5" background="../images/bgimg_right.gif"> </td>
</tr>
</table>
<%do while not rs.eof%>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr >
<td width="5" background="../images/bgimg_left.gif"> </td>
<td><table width="768" height="100" align="left" cellpadding="10" cellspacing="1" bgcolor="#CCCCCC" class="table-3" style="TABLE-LAYOUT: fixed">
<tr bgcolor="#FFFFFF">
<td width="120" align="center" valign="middle" class="table-you"><%=rs("name")%><br>
<img src="images/men1.gif" width="60" height="60">
</td>
<td valign="top" style="WORD-WRAP: break-word">留言时间:<%=rs("date")%>
<% if rs("tel")="" then Response.Write "" else Response.Write " <img src='images/ly_tel.gif'> "&rs("tel")&"" %>
<% if rs("email")="" then Response.Write "" else Response.Write " <img src='images/ly_mail.gif'> <a class=bai1 href=mailto:"&rs("email")&">"&rs("email")&"</a>" %>
<hr align="left" width="85%" size="1" noshade color="f1f1f1" class="h">
<%= rs("content")%>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="box4">
<tr>
<td height="5" bgcolor="#FFFFFF"></td>
</tr>
</table></td>
<td width="5" background="../images/bgimg_right.gif"> </td>
</tr>
</table>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
<table width="778" height="21" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5" background="../images/bgimg_left.gif"> </td>
<td>
<table width="768" height="21" border=0 align="center" cellpadding=0
cellspacing=0 bgcolor="#FFFFFF" i>
<tbody>
<tr>
<td height="21" valign=middle bgcolor="#FFFFFF">
<%
end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write " >>分页 "
response.write " 共"&totalnumber&"篇留言 每页显示"&maxperpage&"篇 目前显示第<font color=#ff6600>"&CurrentPage&"</font>/"&n&"页 "
if CurrentPage<2 then
response.write "首页 上一页 "
else
response.write "<a class=bai1 href="&filename&"?page=1 class=a-xixian>首页</a> "
response.write "<a class=bai1 href="&filename&"?page="&CurrentPage-1&" class=bai1 >上一页</a> "
end if
if n-currentpage<1 then
response.write "下一页 尾页"
else
response.write "<a class=bai1 href="&filename&"?page="&(CurrentPage+1)
response.write " class=bai1 >下一页</a> <a class=bai1 href="&filename&"?page="&n&" class=bai1 >尾页</a>"
end if
end function
%>
</td>
</tr>
</tbody>
</table></td>
<td width="5" background="../images/bgimg_right.gif"> </td>
</tr>
</table>
<table width="778" height="1" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5" height="1" background="../images/bgimg_left.gif"></td>
<td> <table width="768" height="1" border=0 align="center" cellpadding=0
cellspacing=0 bgcolor="#FFFFFF" i>
<tbody>
<tr>
<td height="1" valign=middle bgcolor="#CCCCCC"></td>
</tr>
</tbody>
</table></td>
<td width="5" height="1" background="../images/bgimg_right.gif"></td>
</tr>
</table>
<!--#include file=include/BOTTOM.asp -->
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -