www.gusucode.com > 源码留言本 3.2码程序 > index.asp

    <!--#include file="images/note_book.inc"-->
<% 
' *************************************************
'|                                                 |
'|-----------------源码留言本 3.10-----------------|
'|                                                 |
'|                         黔江热线                |
'|         相关站点:http://www.52qj.com           | 
'|                                                 |
'| 版权由kering源码所有,不经本人同意,不得随意修改 |
'| 如经发现必追究其责任!                          |
' *************************************************
sql="select * from [admin] where ID=1"
Set usrrs = Server.CreateObject("ADODB.Recordset")
usrrs.open sql,conn,1,1
    if not usrrs.eof then
		Response.Cookies("note_name")=usrrs("note_name")
    end if
usrrs.close
set usrrs=nothing
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Request.Cookies("note_name")%>请你留言</title>
<link href="css/black.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#000000" topmargin="2">
<div align="center">
  <table width="760" height="48" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="120" height="16"><img src="1/T_left.gif" width="120" height="26"></td>
      <td width="520" background="1/T_bg.gif"><img src="1/T_bg.gif" width="520" height="26"></td>
      <td width="120"><img src="1/T_right.gif" width="121" height="26"></td>
    </tr>
    <tr> 
      <td height="16" colspan="3">
	  <table width="100%" border="0" cellpadding="0" cellspacing="1" class="a2">
          <tr>
            <td height="150" background="images/bg.jpg"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">
              <param name="movie" value="images/xh.swf">
			  <param name="Wmode" value="transparent">
              <param name="quality" value="high"><param name="SCALE" value="noborder">
              <embed src="images/xh.swf" width="100%" height="100%" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" scale="noborder"></embed>
            </object></td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td width="120" height="16"><img src="1/B_left.gif" width="120" height="26"></td>
      <td width="520" background="1/B_bg.gif"><img src="1/B_bg.gif" width="520" height="26"></td>
      <td width="120"><img src="1/B_right.gif" width="120" height="26"></td>
    </tr>
  </table>
  <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="50">&nbsp;</td>
      <td width="102" height="40"><a href="write.asp"><img src="images/writebutton.gif" width="102" height="36" border="0" title="我要签写留言"></a></td>
      <td> -
<%
usrsql="SELECT * FROM [note_title] "
Set usrrs = Server.CreateObject("ADODB.Recordset")
    usrrs.OPEN usrsql, Conn
do while not usrrs.eof
   %>
   <a href="<%=usrrs("title_link")%>" title="<%=usrrs("title_title")%>" target="_blank"><%=usrrs("title_name")%></a>- 
        <%
		usrrs.movenext
		loop
		usrrs.close
		if request.cookies("admin_name")<>"" then
		response.write "<a href='?acc=del'>退出登录</a>"
		end if
		if request("acc")="del" then
		response.cookies("admin_name")=""
		end if
    %></td>
    </tr>
  </table>
  <table width="760" height="20" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="120"><img src="1/T_left.gif" width="120" height="26"></td>
      <td width="633" background="1/T_bg.gif">&nbsp;</td>
      <td width="120"><img src="1/T_right.gif" width="121" height="26"></td>
    </tr>
  </table>
  <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr> 
              <td>
			      <table width="100%" border="0" cellpadding="0" cellspacing="1" class="a2">
                       <tr> 
                           <td width="25%" height="18" class="a1">
                              <div align="center">留言人信息</div></td>
                           <td class="a1"> 
                              <div align="center">留言信息</div></td>
                       </tr>
                  </table>
			  </td>
           </tr>
  </table>
         <table width="760" height="1" border="0" cellpadding="0" cellspacing="0">
           <tr>
           <td>
		   </td>
           </tr>
         </table>
		 <%		       usrsql="SELECT * from [note] order by note_time desc"
                       Set usrrs = Server.CreateObject("ADODB.Recordset")
                       usrrs.OPEN usrsql, Conn,3,1
                       PageSize = 6
                       usrrs.PageSize = PageSize
                       TotalPages = usrrs.PageCount
                       TotalRecords = usrrs.RecordCount 
                       If TotalRecords<1 Then
                       Response.Write "没有人发表言论。"
                      %>
					  <table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="120" height="20"><img src="1/B_left.gif" width="120" height="26"></td>
      <td background="1/B_bg.gif">&nbsp;</td>
      <td width="120"><img src="1/B_right.gif" width="122" height="26"></td>
    </tr>
  </table>
                     <%
					 else
                     PageAction = Request.Form("PageAction")
                     Select Case PageAction
                            Case "首页"  Session("Page")=1
                            Case "上页"  Session("Page")=Session("Page")-1
                            Case "下页"  Session("Page")=Session("Page")+1
                            Case "尾页"  Session("Page")=TotalPages
                            Case Else  Session("Page")=1
                      End Select
                       If CInt(Session("Page"))<1 Then
                          Session("Page")=1
                      End If
                      If CInt(Session("Page"))>TotalPages Then
                          Session("Page")=TotalPages
                      End If
                          usrrs.AbsolutePage = Session("Page")
              i=0
              Do While Not usrrs.Eof And i<PageSize
              i = i + 1
	           %>   
          <table width="760" border="0" cellpadding="3" cellspacing="1" class="a2">
            <tr class="a3"> 
                 
      <td width="25%" rowspan="4" align="center" valign="middle"> 
        <div align="center">
                    <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                         <td>&nbsp;
						  
						 </td>
                       </tr>
                       <tr> 
                         <td>
						   <div align="center"><img src="face/<%=usrrs("user_face")%>.gif" width="64" height="64">
						   </div>
						 </td>
                       </tr>
                       <tr> 
                          <td height="30" valign="middle">
                             <div align="center"><SPAN STYLE="color:#FFFFFF;line-height:30pt;FILTER: glow(color=#000000,strength=0) shadow(color=#0080ff,direction=120); POSITION: relative;WIDTH: 100"><%=usrrs("user_name")%></span>
</div>
						  </td>
                       </tr>
                    </table>
                    
        </div>
	          </td>
                 <td height="9">
				   标题:<%=usrrs("note_title")%>
				 </td>
            </tr>
              <tr class="a3"> 
                 <td height="10" valign="middle"><img src="images/Email.gif" width="20" height="20">邮箱:<a href="mailto:<%=usrrs("user_email")%>"><%=usrrs("user_email")%></a> 
                   <img src="images/homepage.gif" width="20" height="20">主页:<a href="<%=usrrs("user_page")%>" target="_black"><%=usrrs("user_page")%></a>
                   <img src="images/qq_pic.gif" width="20" height="20">QQ:<%=usrrs("user_qq")%></td>
              </tr>
              <tr class="a3"> 
                   <td height="70"><br>
                      <table width="90%" border="0" align="center" cellpadding="5" cellspacing="1" class="a2">
                          <tr > 
                            
            <td height="30" valign="middle" class="a5">
<div >&nbsp;&nbsp;&nbsp;&nbsp;<%=usrrs("note_page")%></div>
							</td>
                          </tr>
                     </table> 
		      <% if usrrs("re_page")<>"" then %>
                     <br>
                      <table width="90%" border="0" align="center" cellpadding="8" cellspacing="1" class="a2">
                          <tr>
                             
            <td height="30" bgcolor="#4D4D4D" class="a3">站长回复:<%=usrrs("re_page")%>&nbsp;&nbsp;&nbsp;&nbsp;<font color="#CCCCCC">回复时间<b>:</b><%=usrrs("re_time")%></font> </td>
                          </tr>
                     </table>
		     <% end if %>
                     <br>
                </td>
            </tr>
                     <tr class="a3"> 
                        <td height="20"><div align="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="re_note.asp?note_ID=<%=usrrs("note_ID")%>"><img src="images/re_note.gif" width="50" height="20" border="0" title="回复留言"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="del_note.asp?note_ID=<%=usrrs("note_ID")%>" title="删除留言"><img src="images/del_note.gif" width="40" height="20" border="0"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
						</td>
                     </tr>
  </table>
			<% usrrs.MoveNext
			    loop
		        usrrs.close
	            Set usrrs=Nothing
	          %>
                <table width="760" height="1" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                   <td>
				   </td>
                  </tr>
                </table>
  
                <table width="760" border="0" cellpadding="0" cellspacing="1" class="a2" align="center">
                  <form action=index.asp method=POST><tr> 
                  
        <td height="24" class="a1"> 
          <div align="center"> 
            <%
   Response.Write "记录数:" &TotalRecords
   Response.Write "&nbsp;&nbsp;" & "总页数:" &TotalPages
   '显示现在是第几页
   Response.Write "&nbsp;&nbsp;" &"现在是第"&Session("Page")&"页"
   '显示首页、上页、下页和尾页四个按钮
   %>
   <input name=PageAction type=submit value=首页 class="i1"> &nbsp;
   <input name=PageAction type=submit value=上页 class="i1">
            &nbsp; 
            <input name=PageAction type=submit value=下页 class="i1">
            &nbsp; 
            <input name=PageAction type=submit value=尾页 class="i1"> &nbsp;
   
    </div></td>
                  </tr></form>
               </table>
              
  <table width="760" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td width="120" height="20"><img src="1/B_left.gif" width="120" height="26"></td>
      <td background="1/B_bg.gif">&nbsp;</td>
      <td width="120"><img src="1/B_right.gif" width="122" height="26"></td>
    </tr>
  </table>
  <%         conn.Close
             set conn=Nothing
			 end if
               %>
</div>
    </body>
    </html>
<!--#include file="_button.asp"-->