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

📄 guestbook.asp

📁 网络书生留言本单用户 v1.0 正式版源码,大家下了就知道怎么用了!
💻 ASP
📖 第 1 页 / 共 2 页
字号:
countnum=rs.recordcount

if pagenum="" or isempty(pagenum) or pagenum<1 then
   pagenum=u_pagenum             	'设置每页数
end if
rs.pagesize=pagenum                	'取得每页数
mpage=rs.pagecount                   '取得总页数

if pageno="" then pageno=1
if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
	pageno=1
end if

if rs.bof and rs.eof then
	response.write "<table width='600' border='0' align='center' cellpadding='0' cellspacing='0' class='tableg1'><tr><td align='center' height='30'>没有留言!</td></tr></table>"
	pageno=0
else

rs.absolutepage=pageno	'将指针移至指定页的第一条记录
loopno=pagenum
do while not rs.eof and loopno>0

dim gid,g_name,g_email,g_page,g_oicq,g_address,g_face,g_content,g_ip,g_se,g_isu,g_time
gid=rs("id")
g_name=rs("g_name")
g_email=rs("g_email")
g_page=rs("g_page")
g_oicq=rs("g_oicq")
g_address=rs("g_address")
g_face=rs("g_face")
g_content=rs("g_content")
g_ip=rs("g_ip")
g_se=rs("g_se")
g_isu=rs("g_isu")
g_time=rs("g_time")
%>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="tableg1">
  <tr> 
    <td width="120" valign="top" class="lineh"> 
      <table width="100%" border="0">
        <tr> 
          <td height="50" align="center">
		  <%
		  if g_se=true then
		      if request.Cookies("qzenetgbuser")<>"" then
		      response.Write("<img src='"&g_face&"' width='32' height='32'>")
		      else
		      response.Write("<img src='face/0.gif' width='32' height='32'>")
			  end if
		  else
		  response.Write("<img src='"&g_face&"' width='32' height='32'>")		  
		  end if		   
		  %>
		 </td>
        </tr>
        <tr> 
          <td height="20" align="center" class="s_gb">
		  <%
		  if g_se=true then
		        if request.Cookies("qzenetgbuser")<>"" then
				    if g_isu=true then
		            response.Write("<img src='images/user.gif' width='16' height='18' alt='站长亲临:)'>&nbsp;")
		            else
			        response.Write("<img src='images/guest.gif' width='16' height='16'>&nbsp;")
			        end if
		            response.Write("<strong>"&g_name&"</strong>")
		        else
		        response.Write("<strong><u>无影者</u></strong>")
			    end if
		  else
		        if g_isu=true then
		        response.Write("<img src='images/user.gif' width='16' height='18' alt='站长亲临:)'>&nbsp;")
		        else
			    response.Write("<img src='images/guest.gif' width='16' height='16'>&nbsp;")
			    end if
		        response.Write("<strong>"&g_name&"</strong>")		  
		  end if		   
		  %></td>
        </tr>
        <tr> 
          <td height="20" align="center" class="s_gb">来自:
		  <%
		  if g_se=true then
		      if request.Cookies("qzenetgbuser")<>"" then
		      response.Write(g_address)
		      else
		      response.Write("<strong>神秘地带</strong>")

			  end if
		  else
		      response.Write(g_address)		  
		  end if		   
		  %>
		  </td>
        </tr>
      </table>
    </td>
    <td valign="top"> 
      <table width="100%" border="0">
        <tr> 
          <td class="linewb"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr align="center" valign="bottom"> 
                <td width="30"> 
                  <%
				  if g_email<>"" then
				  		  if g_se=true then
		                         if request.Cookies("qzenetgbuser")<>"" then
				                    response.Write("<a href='mailto:"&g_email&"'><img src='images/email.gif' width='16' height='18' border='0' title='给"&g_name&"发信'></a>")
		                         else
		                            response.Write("<strong>*</strong>")
			                     end if
		                   else
				           response.Write("<a href='mailto:"&g_email&"'><img src='images/email.gif' width='16' height='18' border='0' title='给"&g_name&"发信'></a>")
		                   end if
				 end if
				 %>
                </td>
                <td width="30"> 
                  <%if g_page<>"" then
				  		  if g_se=true then
		                         if request.Cookies("qzenetgbuser")<>"" then
				      				response.Write("<a href='"&g_page&"' target='_blank'><img src='images/page.gif' width='16' height='18' border='0' title='"&g_name&"的主页'></a>")
		                         else
		                            response.Write("<strong>*</strong>")
			                     end if
		                   else
						   response.Write("<a href='"&g_page&"' target='_blank'><img src='images/page.gif' width='16' height='18' border='0' title='"&g_name&"的主页'></a>")
		                   end if
				 end if%>
                </td>
                <td width="30"> 
                  <%if rs("g_oicq")<>"" then
				  		  if g_se=true then
		                         if request.Cookies("qzenetgbuser")<>"" then
				                    response.Write("<a href='http://search.tencent.com/cgi-bin/friend/user_show_info?ln="&g_oicq&"' target='_blank'><img src='images/qq.gif' width='16' height='18' border='0' title='QQ["&g_oicq&"]的情况'></a>")
		                         else
		                            response.Write("<strong>*</strong>")
			                     end if
		                   else
						   response.Write("<a href='http://search.tencent.com/cgi-bin/friend/user_show_info?ln="&g_oicq&"' target='_blank'><img src='images/qq.gif' width='16' height='18' border='0' title='QQ["&g_oicq&"]的情况'></a>")
		                   end if				  
				 end if%>
                </td>
                <td width="160" align="right" class="s_sa"> 
                <%if request.Cookies("qzenetgbuser")<>"" then
				 response.Write("<a href='reply.asp?user="&users&"&page="&pageno&"&rid="&gid&"' class='s' title='回复这条留言!'>回复</a>&nbsp;&nbsp;&nbsp;")
				%>
				<a href="del.asp?del=gb&page=<%=pageno%>&did=<%=gid%>" class="s" onclick="{if(confirm('确实要删除这条留言吗?')){return true;}return false;}" title="删除这条留言!">删除</a>
				<%end if%>
                </td>
                <td align="right" class="s_gb"><%=g_time%></td>
                <td width="30" align="right">
                  <%if u_ipset=true then
				           if g_se=true then
		                         if request.Cookies("qzenetgbuser")<>"" then
				                    response.Write("<img src='images/ip.gif' width='16' height='18' alt='"&g_ip&"'>")
		                         else
		                            response.Write("<img src='images/ip.gif' width='16' height='18' alt='保密'>")
			                     end if
		                   else
						   response.Write("<img src='images/ip.gif' width='16' height='18' alt='"&g_ip&"'>")
						   end if
		               end if	%>
				</td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td height="60" class="linecc"> 
            <%if g_se=true then
		                 if request.Cookies("qzenetgbuser")<>"" then
		                    response.Write(g_content)
		                  else
                            response.Write("<div align='center'><img src='images/user.gif' width='16' height='18'><strong>&nbsp;&nbsp;悄悄话!只有站长可以查看:)</strong></div>")
			              end if
		        else
				   response.Write(g_content)
		       end if	%>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<%dim r_id,r_content,r_time
set rsr=server.createobject("adodb.recordset")
sqlre="select * from reply where gid="&gid&" order by id desc"
rsr.open sqlre,conn,1,1
do while not rsr.eof
r_id=rsr("id")
r_content=rsr("r_content")
r_time=rsr("r_time")
%>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0" class="tableg2">
  <tr> 
    <td width="120" align="center" class="lineh"> 
      <p> <img src="images/reply.gif" width="32" height="32" alt="站长回复"><br>
        <strong>站长回复</strong></p>
      </td>
    <td> 
      <table width="100%" border="0">
        <tr> 
          <td height="40" class="linecc"><%=r_content%></td>
        </tr>
        <tr> 
          <td class="linewt">
		  <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
              <tr valign="bottom"> 
                <td align="right"> 
                  <%if request.Cookies("qzenetgbuser")<>"" then%>
                  <a href="del.asp?del=re&page=<%=pageno%>&did=<%=r_id%>" class="s" onclick="{if(confirm('确实要删除这条回复吗?')){return true;}return false;}" title="删除这条回复!">删</a> 
                  <%end if%>
				  &nbsp;
                </td>
                <td width="160" align="right"><%=r_time%></td>
                <td width="30" align="right">&nbsp; </td>
              </tr>
            </table></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<%
rsr.movenext
loop
rsr.close

rs.movenext
loopno=loopno-1
loop
end if
rs.close
%>
<!--#include file="page.asp" -->
<!--#include file="bof.asp" -->

⌨️ 快捷键说明

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