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

📄 show.asp

📁 留言薄系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#INCLUDE FILE="config.asp"-->

<%
session("useridname")=Request.cookies("ly")("useridname")
session("useridpassword")=Request.cookies("ly")("useridpassword")
session("admin")=Request.cookies("ly")("admin")
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.open "Select * From option1" ,Conn,1,1
webname=rs("webname")
homepage=rs("weblink")
rs.close
del=no
type1=no
del=request("del")
type1=request("type1")
if del="ok" and ((session("admin")=1) or (session("admin")=2)) then
if type1="ok" then 
	dsql="delete From reply where replyid="&request("replyid")	
	conn.execute(dsql)
	rs.open "Select * from guest where ID = " & request("ID"),conn,2,3
	rs("hf")=rs("hf")-1
	Set rs1=Server.CreateObject("ADODB.RecordSet")
	rs1.open "Select * from reply where id="&rs("id")&" order by id desc",conn,1,1
	if rs1.eof then rs("lastname")="——" else rs("lastname")=rs1("replyname")
	rs.update
	rs1.close
else
	rs.open "Select * from guest where ID = " & request("ID"),conn,2,3
	dsql="delete from reply where id="&request("id")
	conn.execute(dsql)
	dsql="delete From guest where id="&request("id")
	conn.execute(dsql)
end if
set rs=nothing
set rs1=nothing
response.Redirect "default.asp"
end if

ID=request("id")
up1="no"
next1="no"
up1=request("up")
next1=request("next")
	Set rs=Server.CreateObject("ADODB.RecordSet")
    Set rs1=Server.CreateObject("ADODB.RecordSet")
	if up1="ok" then 
		rs.open "Select * from guest where ID < " & ID,conn,3,3
		if rs.recordcount=0 then 
		rs.close
		rs.open "select * from guest where ID="&ID,conn,3,3
		end if
		rs.movelast
		rs1.open "Select * from reply where ID = " & rs("id")&" order by replydate",conn,3,3
	end if
	if next1="ok" then
		rs.open "Select * from guest where ID > " & ID,conn,3,3
		if rs.recordcount=0 then 
		rs.close
		rs.open "select * from guest where ID="&ID,conn,3,3
		end if
		rs1.open "Select * from reply where ID = " & rs("id")&" order by replydate",conn,3,3
	end if
	if (up1<>"ok") and (next1<>"ok") then
		rs.open "Select * from guest where ID = " & ID,conn,3,3
		rs1.open "Select * from reply where ID = " & ID&" order by replydate",conn,3,3
	end if
	rs("yd")=rs("yd")+1
	rs.update
if rs1.recordcount<>0 then
     rs1.pagesize=10
	 PageNo=REQUEST("PageNo")
	 if PageNo="" or PageNo=0 then PageNo=1
	 rs1.AbsolutePage=PageNo
	 TSum=rs1.pagecount
	 RowCount=rs1.PageSize
	 PageNo=PageNo+1
	 PageNo=PageNo-1
end if
%>
<SCRIPT language=javascript>
function  save_onclick()
{
  var strTemp = document.form.UserName.value;
  if (strTemp.length == 0 )
  {
      alert("请输入用户名!");
      document.form.UserName.focus();
      return false;
  }
  var strTemp = document.form.content.value;
  if (strTemp.length == 0 )
  {
      alert("请填写留言内容!");
      document.form.content.focus();
      return false;
  }
  return true;  
}
</SCRIPT>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>显示回复留言</title>
<link href="1.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body onkeydown="if(event.keyCode==13 && event.ctrlKey) if(save_onclick())document.form.submit()">
<div align="center">
<!--#INCLUDE FILE="top.asp"-->
</div>
<table border=0 width=100% align=center>
        <tr> 
          <td width="100%" align=center> 
            
        </tr>
        <tr> 
          <td align=center><hr size=1 width=100% noshade color=#C0C0C0></tr>
</table></td>
	   </tr>
	   <tr>
	     <td>
  	      <table border=0 width=100% align=center>
      <tr>
        <td width="3%" align=lift><font color="#FF0000">&nbsp;<img src="images/back.gif" width="17" height="17"></font></td>
        <td width="15%" align=lift><a href="<%if session("list")=0 then%>default.asp<%else%>default1.asp<%end if%>">回留言列表</a></td>
        <td width="82%" align=right>
          <!--#INCLUDE FILE="link.asp"-->        </td>
    </table>
  </tr>
	    <tr><td><HR SIZE=1 WIDTH=100% NOSHADE COLOR=#C0C0C0>
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr> 
        <td width="72%"><font color="#FF0000">&nbsp;<a href="<%=homepage%>"><%=webname%>首页</a> 
          </font><a href="default1.asp">留言板方式查看</a> 
        </td>
        <td width="28%"> <div align="right"> <a href="show.asp?up=ok&id=<%=rs("ID")%>">上一条留言</a> <a href="show.asp?next=ok&id=<%=rs("ID")%>">下一条留言</a></div></td>
      </tr>
    </table>
    
  </td>
</tr>
        <tr>
		 
  <td align=left> 
    <div align="center">
    <table width="100%" border="0" bgcolor="#E6F2FF" style="word-break:break-all;BORDER-LEFT:#0098c8 1PX SOLID;BORDER-RIGHT:#0098c8 1PX SOLID;BORDER-TOP:#0098c8 1PX SOLID">
      <tr> 
        <td height="17"> <div align="left"><strong><img src="images/foot.gif" width="16" height="16">留言主题: 
            <%if rs("subject")="" then %>
            无标题 
            <%else%>
            <%=rs("subject")%> 
            <%end if%>
        </strong> </div></td>
      </tr>
    </table>
	</div>
	<%
	bool=true
	if (rs1.recordcount=0) or (PageNo=1) then%>
    <table width="100%" border="0" align=center cellpadding="0" cellspacing="5" style="BORDER-LEFT:#0098c8 1PX SOLID;BORDER-RIGHT:#0098c8 1PX SOLID;<% if bool=false then%>BORDER-TOP:#0098c8 1PX SOLID;<%bool=true%><%end if%>BORDER-BOTTOM:#0098c8 1PX SOLID" <%if bg mod 2=0 then%>bgcolor="#f0f8ff"<%else%>bgcolor="#f8f8f8"<%end if%>>
      <tr> 
        <td width="18%" rowspan="2" align=center valign="top" style=" BORDER-right:#98ccff 1PX SOLID"> 
          <table width="127" border="0" align="center" >
            <tr> 
              <td width="90" style=filter:glow(color=#0000FF,strength=2)> 
                <div align="center"><font color=#F0FFFF> 
                  <%if rs("username")<>"" then%>
                  <%=rs("username")%> 
                  <%else%>
                  无名氏 
                  <%end if%>
                  </font> </div></td>
              <td width="50"> 
                <%
			  Set rs2=server.createobject("ADODB.RECORDSET")
			  sql2="SELECT * FROM register where username='"&rs("username")&"'"
			  rs2.open sql2,conn,3,3
			  if not rs2.eof then
			if Instr(rs2("levels"),"嘉宾")>0 then%>
                <font color=#000000><img src="images/fbz.gif" alt="嘉宾" width="16" height="16"></font> 
                <%end if
			if Instr(rs2("levels"),"版主")>0 then%>
                <font color=#000000><img src="images/bz.gif" alt="版主" width="16" height="16"></font> 
                <%end if
			if rs2("levels")="管理员"  then%>
                <img src="images/gly.gif" alt="管理员" width="15" height="18"> 
                <%	end if
			  end if
			%>
                <%
			  if not rs2.eof then
			  %>
                <%if rs2("sex")="1" then%>
                <img src="images/man.gif" alt="GG" width="20" height="14"> 
                <%end if%>
                <%if rs2("sex")="0" then%>
                <img src="images/woman.gif" alt="MM" width="20" height="14"> 
                <%end if%>
                <%else%>
                <%if rs("sex")="1" then%>
                <img src="images/man.gif" alt="GG" width="20" height="14"> 
                <%end if%>
                <%if rs("sex")="0" then%>
                <img src="images/woman.gif" alt="MM" width="20" height="14"> 
                <%end if%>
                <%end if%>
              </td>
            </tr>
          </table>        
          <br>
          <%if not rs2.eof then%>
          <img src="<%=rs2("face")%>"> 
          <%else if rs("face")="" then%>
          <img src="face/1.gif"> 
          <%else%>
          <img src="<%=rs("face")%>"> 
          <%end if%>
          <%end if%>
          <br>
          <%
			  if not rs2.eof then
			  %>
          头衔:<%=rs2("levels")%><br>
            发言数:<%=rs2("counts")%> 
            <%end if%>
        </p>        </td>
        <td height="130" colspan="2" valign="top" style=" BORDER-bottom:#0098c8 1PX SOLID"> 
          <br>          <table border="0" width="100%" cellspacing="0" cellpadding="2" style="word-break:break-all">
            <tr valign=top>
              <td width="5%" ><img src="images/<%=rs("pic")%>" > </td>
              <td width="95%"><%if not rs("secret") then%>
                <%=rs("content")%>
                <%else 
			  response.Write "<font color=#FF0000>◎该留言为悄悄话◎</font><br>" 
			  if (session("useridname")=rs("username")) or (session("admin")=1) or (session("admin")=2) then%>
                <%=rs("content")%>
                <%end if%>
              <%end if%></td>
            </tr>
          </table></td>
      </tr>
      <tr> 
        <td width="58%" height="10" Valign=middle><font color="#000000"><img src="images/time.gif" width="16" height="15"> 
          <%if left(rs("lydate"),1)=0 then response.write "20"&rs("lydate") else response.write rs("lydate")%>
          </font> <IMG SRC="images/mailto.gif"  BORDER="0"> 
          <%if not rs2.eof then%>
          <%if rs2("mail")<>"" then%>
          <a href="mailto:<%=rs2("mail")%>"> 
          <%end if%>
          邮件</a> 
          <%else%>
          <%if rs("mail")<>"" then%>
          <a href="mailto:<%=rs("mail")%>"> 
          <%end if%>
          邮件</a> 
          <%end if%>
          <img src="images/home.gif" width="16" height="16"> 
          <%if not rs2.eof then%>
          <%if rs2("homepage")<>"" then%>
          <a href="<%=rs2("homepage")%>" target="_blank"> 
          <%end if%>
          主页</a> 
          <%else%>
          <%if rs("homepage")<>"" then%>
          <a href="<%=rs("homepage")%>" target="_blank"> 
          <%end if%>
          主页</a> 
          <%end if%>
          <img src="images/qq.gif"> 
          <%if not rs2.eof then%>
          <%if rs2("qq")<>"" then%>
          <a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=rs2("qq")%>" target="_blank"> 
          <%end if%>
          QQ</a> 
          <%else%>
          <%if rs("qq")<>"" then%>
          <a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=rs("qq")%>" target="_blank"> 
          <%end if%>
          QQ</a> 
          <%end if%>
          <img src="images/ip.gif" <%if (session("admin")=1) or (session("admin")=2) then response.write("alt="&rs("ip")) else response.write("alt=保密")%>> 
        IP </td>
        <td width="24%" Valign=middle> 
          <div align="right">
            <%if (session("admin")=1) or (session("admin")=2) then%>
            <img src="images/dele.gif" alt=Delete border="0"><a href="show.asp?del=ok&id=<%=rs("id")%>">删除</a> 
            <%end if%>
            <%if not rs("lock") then%>
            <img src="images/edit.gif" width="13" height="15"><a href="guest_edit.asp?ID=<%=rs("ID")%>">修改</a> 
            <img src="images/reply.gif" alt=Reply border="0"><a href="guest_reply.asp?id=<%=rs("id")%>">回复</a> 
            <%end if%>        
        </div></td>
      </tr>
    </table>
	<%end if%>
	<%bg=1%>
<% DO WHILE NOT rs1.EOF AND RowCount>0%> 
    <table width="100%" align="center" style="BORDER-LEFT:#0098c8 1PX SOLID;BORDER-RIGHT:#0098c8 1PX SOLID;<% if bool=false then%>BORDER-TOP:#0098c8 1PX SOLID;<%bool=true%><%end if%>BORDER-BOTTOM:#0098c8 1PX SOLID" <%if bg mod 2=0 then%>bgcolor="#f0f8ff"<%else%>bgcolor="#f8f8f8"<%end if%>>
      
      <tr> 
        <td width="18%" rowspan="2" align=center valign="top" style=" BORDER-right:#98ccff 1PX SOLID">
<table width="125" border="0" align="center" >
            <tr> 
              <td width="90" style=filter:glow(color=#0000FF,strength=2)> <div align="center"><font color=#F0FFFF> 
                  <%if rs1("replyname")<>"" then%>
                  <%=rs1("replyname")%> 
                  <%else%>
                  无名氏 
                  <%end if%>
                  </font><font color=F0FFFF> </font> </div></td>
              <td width="50"> 
                <%Set rs3=server.createobject("ADODB.RECORDSET")
			  sql3="SELECT * FROM register where username='"&rs1("replyname")&"'"

⌨️ 快捷键说明

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