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

📄 adminbook.asp

📁 睿网留言版 2004 v1.0
💻 ASP
字号:
<!--#include file="conn.inc"-->
<%
if session("nimadebuyaokan")<>"tingbaxiaozi" then
   for i=1 to 10
   response.write "<br>"
   next
   response.write "<center>"
   response.write "你不是站长,请不要乱跑!" 
   response.write "好关闭窗口啦!"
   response.redirect "mbbook.asp"
end if
%>


<%
dim adminmail
dim adminname
dim counter
dim adminhomepage
dim logout
dim title
dim bgcolor1
dim background1
dim bianchuang
dim maxperpage
dim banquan
dim zhizuo
set rs1=server.createobject("adodb.recordset")
sql1="select * from admin where id=1"
rs1.open sql1,conn,1,3
adminmail=rs1("adminemail")
adminname=rs1("adminname")
title=rs1("title")
bgcolor1=rs1("bgcolor1")
background1="image/"&rs1("background1")
bianchuang=rs1("bianchuang")
MaxPerPage=rs1("maxperpage")
adminhomepage=rs1("adminhomepage")
banquan=rs1("banquan")
zhizuo=rs1("zhizuo")
if instr(1,zhizuo,"realnet",1)=0 then
 zhizuo="程序制作:<a href=mailto:realnet@realnet.cn>realnet.cn</a>"
 rs1("zhizuo")=zhizuo
end if
counter=rs1("counter")
rs1("counter")=counter
rs1.update


rs1.close
set rs1=nothing
%>

<%
   dim totalPut   
   dim currentPage
   dim TotalPages
   dim i,j
   if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if


set rs=server.createobject("adodb.recordset")
sql="select * from book 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
      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 
           showpage totalput,MaxPerPage,"mbbook.asp" 
            showContent 
            showpage totalput,MaxPerPage,"mbbook.asp" 
       else 
          if (currentPage-1)*MaxPerPage<totalPut then 
            rs.move  (currentPage-1)*MaxPerPage 
            dim bookmark 
            bookmark=rs.bookmark 
           showpage totalput,MaxPerPage,"mbbook.asp" 
            showContent 
             showpage totalput,MaxPerPage,"mbbook.asp" 
        else 
	        currentPage=1 
           showpage totalput,MaxPerPage,"mbbook.asp" 
           showContent 
           showpage totalput,MaxPerPage,"mbbook.asp" 
	      end if 
	   end if 
   rs.close 
   end if 
   set rs=nothing  
sub showcontent
dim pageye
   pageye=1
%>
<html>

<head><META HTTP-EQUIV="content-type" CONTENT="text/html; charset=GB2312">
<script language="javaScript" type="text/javascript" SRC="js/pz_chromeless_2.1.js"></SCRIPT>

<script>
function openIT(theURL,W,H) {
	
	wname ="CHROMELESSWIN"

	windowCERRARa 		= "image/close_a.gif"
	windowCERRARd 		= "image/close_d.gif"
	windowCERRARo 		= "image/close_o.gif"
	windowNONEgrf 		= "image/none.gif"
	windowCLOCK		= "image/clock.gif"
	windowREALtit		= "&nbsp;签写留言"
	windowTIT 	    	= "<font face=宋体 size='0'>&nbsp;<%=title%></font>"
	windowBORDERCOLOR   	= "#000000"
	windowBORDERCOLORsel	= "#000000"
	windowTITBGCOLOR    	= "#DBD9D9"
	windowTITBGCOLORsel 	= "#DBD9D9"
	openchromeless(theURL, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowNONEgrf, windowCLOCK, windowTIT, windowREALtit , windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
</script>
<link rel="stylesheet" type="text/css" href="style.css">
<title>欢迎光临<%=adminname%>的留言本</title>
</head>
<%
if instr(1,zhizuo,"realnet",1)=0 then
 response.write ("<center>请保留原程序制作人的名字,谢谢!<br>Designer:<a href=mailto:realnet@realnet.cn>realnet</a></center>")
 response.end
end if
%>
<body background="<%=background1%>" bgcolor="#999999">
<div align="center">

<center>

  <table border="0" width="600" height="232" cellpadding="0">
    <%do while not rs.eof
pic="pic/"&rs("pic")&".gif"
face="face/"&rs("face")&".gif"
  reply=rs("reply")
  content=rs("content")
  replytime=rs("replytime")
  single1=rs("single")
  if reply<>"" then
    reply="<a href=javascript:openIT('givereply.asp?id="&rs("id")&"',400,180);>"&rs("reply")&"</a>"
  else
   reply="<a href=javascript:openIT('givereply.asp?id="&rs("id")&"',400,180);>点击回复</a>"
   replytime="站长你快给回复"
  end if
  if single1<>"1" then
   passpass="没有密码"
  else
   passpass=rs("replypass")
  end if
%>
    <tr>
    <td width="594" height="186">

<table border="0" width="100%" height="100%" bgcolor="<%=bianchuang%>" cellspacing="1">
  <tr>
    <td width="18%" height="22" bgcolor="<%=bgcolor1%>">
      <p align="center"><img border="0" src="image/friend.gif"><%if rs("name")<>adminname then%><%=rs("name")%><%else%>站长<%end if%></td>
    <td width="15%" height="22" bgcolor="<%=bgcolor1%>" align="center"><img border="0" src="image/homepage.gif" width="16" height="16"><%if rs("homepage")<>"" then%><a href="<%=rs("homepage")%>">主页</a><%else%>主页<%end if%></td>
    <td width="14%" height="22" bgcolor="<%=bgcolor1%>" align="center"><img border="0" src="image/email.gif" width="16" height="16"><%if rs("email")<>"" then%><a href="mailto:<%=rs("email")%>">邮件</a><%else%>邮件<%end if%></td>
    <td width="14%" height="22" bgcolor="<%=bgcolor1%>" align="center"><img border="0" src=<%=pic%> width="16" height="16">心情</td>
    <td width="39%" height="22" bgcolor="<%=bgcolor1%>" align="center"><img border="0" src="image/oicq.gif" width="16" height="16">QQ:<%=rs("oicq")%></td>
  </tr>
  <tr>
    <td width="18%" rowspan="3" height="119" bgcolor="<%=bgcolor1%>">
      <p align="center"><img border="0" src=<%=face%> width="72" height="122"></p>
    </td>
    <td width="45%" height="22" bgcolor="<%=bgcolor1%>" colspan="3"><img border="0" src="image/message.gif" width="16" height="16">签名:<%=rs("sign")%></td>
    <td width="40%" height="22" bgcolor="<%=bgcolor1%>"><img border="0" src="image/edit.gif" width="16" height="15">主题:<%=rs("subject")%></td>
  </tr>
  <tr>
    <td width="85%" height="81" bgcolor="<%=bgcolor1%>" colspan="4">
      <table border="0" width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td width="9%">内容:</td>
          <td width="91%"><%=content%></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td width="85%" height="22" bgcolor="<%=bgcolor1%>" colspan="4">
      <p align="right"><img border="0" src="image/foot.gif">来自:[<%=rs("from")%>]&nbsp;<img border="0" src="image/posttime.gif" width="16" height="15">留言时间:[<%=rs("dateandtime")%>]</td>
  </tr>
  <tr>
    <td width="100%" height="22" bgcolor="<%=bgcolor1%>" colspan="5">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber1">
      <tr>
        <td width="11%"><img border="0" src="image/replynow.gif" width="16" height="16">回复:</td>
        <td width="89%"><%=reply%><font color="#FF0000">(密码:[<%=passpass%>])</font></td>
      </tr>
    </table>
    </td>
  </tr>
</center>
    <td width="100%" height="22" bgcolor="<%=bgcolor1%>" colspan="5">
      <p align="right"><img border="0" src="IMAGE/IP.GIF">IP:<font color="#FF0000">[<%=rs("ip")%>]</font><img border="0" src="image/posttime.gif" width="16" height="15">回复时间:<font color="#FF0000">[<%=replytime%>]
      <img border="0" src="image/CLOSE_D.GIF"><a href=mbdelbook.asp?id=<%=rs("id")%>>删除留言</a></font></td>
 
</table>
</td>
</tr>
<center>

<% 
pageye=pageye+1  
if pageye>MaxPerPage then Exit Do  
rs.movenext  
loop 
%>

</table>

</div>
<% 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 ("<center>")
  if CurrentPage<2 then
    response.write "首页 上一页&nbsp;"
  else
    response.write "<a href="&filename&"?page=1>首页</a>&nbsp;"
    response.write "<a href="&filename&"?page="&CurrentPage-1&">上一页</a>&nbsp;"
  end if
  if n-currentpage<1 then
    response.write "<font color='#000000'>下一页 尾页</font>"
  else
     response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
    response.write "下一页</a> <a href="&filename&"?page="&n&">尾页</a>"
  end if
   response.write "&nbsp;页次:"&CurrentPage&"/"&n&"页"
    response.write "&nbsp;共"&totalnumber&"</b>个留言<b>&nbsp;"&maxperpage&"</b>个留言/页 " 
end function
%>
<%
response.write("<center>")
response.write("<hr noshade size=""1"" color="&bgcolor1&">"&banquan&"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"&zhizuo)
response.write("</center>")
%>


</body>

</html>

⌨️ 快捷键说明

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