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

📄 leibie_more.asp

📁 日记本(多用户版)V3.0 主要功能: 1、日记本基本功能:添加、修改日记等。 2、日记加密:当日记添加时
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->

<%
'=========================================================
' 随然日记本(多用户版) Version:3.0
' Date: 2004-11-15
' Script Written by 随然(dampure)
' 随然日记本演示地址:http://www.suiran.cn
'=========================================================
' Copyright (C) 2003,2004 真露无香. All rights reserved.
' Web: www.yongzi.com
' Diary:http://www.suiran.cn
'=========================================================

leibie=request("leibie")
address=request("address")
set rs=server.createobject("adodb.recordset")
if leibie<>"" then
sql="select * from admin where leibie like '%"&leibie&"%' order by userid desc"
elseif address<>"" then
sql="select * from admin where address like '%"&address&"%' order by userid desc"
else
call showleibie
response.end
end if
rs.open sql,conn,1,1

const MaxPerPage=25
page=request("page")

if page<>empty and page<>"" then

   '检测输入页数是否合法
   pagestrlong=len(page)
   chOK="0123456789"
   chvalid=true
   j=1
   do while j<=pagestrlong
      ch=mid(page,j,1)
      If instr(chOK,ch)=0 then
         chvalid=false
         exit do
      end if
      j=j+1
   loop
   '检测完毕
   
   if not chvalid then '如果不合法
      currentPage=1    '默认为第1页
   else
      currentPage=int(page) '如果合法则取整数
      if currentpage=0 then '如果是0页取1
         currentpage=1
      end if
   end if
else
   currentPage=1   '如果空白测取第1页
end if

if rs.eof and rs.bof then
   showadd
else
   totalPut=rs.recordcount '记录总数

   '判断最大显示页数
   if totalput<=maxperpage then
      maxpagenum=1
   else
      pageys=totalput/maxperpage
      if pageys > int(pageys) then
         maxpagenum=int(pageys)+1
      else
         maxpagenum=int(pageys)
      end if
   end if

   if currentPage=1 then
      j = 1
      showContent
   else
      if (currentPage-1)*MaxPerPage>=totalPut then
         currentPage=maxpagenum
      end if
      rs.move (currentPage-1)*MaxPerPage
      j = (currentPage-1)*MaxPerPage+1
      showContent
   end if
   rs.close
end if
set rs=nothing  
conn.close
set conn=nothing  

sub showContent
%>
<HTML><HEAD><TITLE>真露无香—网络日记本——分类查询</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META http-equiv=robots content=all>
<LINK href="images/styles.css" type=text/css rel=stylesheet>
<STYLE>A {
	COLOR: #999999; TEXT-DECORATION: none
}
A:hover {
	COLOR: #e65c09; FONT-SIZE: 10pt;LINE-HEIGHT: 14pt; TEXT-DECORATION: underline
}
</STYLE>

<META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD>
<BODY leftMargin=0 background=images/bg.gif topMargin=0>
<TABLE cellSpacing=0 cellPadding=0 width=617 align=center border=0>
  <TBODY>
  <TR>
    <TD vAlign=top bgColor=#ffffff height=16>

      <TABLE cellSpacing=0 cellPadding=0 width=617 align=center border=0>
        <TBODY>
        <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
              <TBODY>
              <TR>
                <TD height=2><IMG height=8 src="images/top01.gif" 
                  width=617></TD></TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width=609 align=center 
              border=0><TBODY>
              <TR>
                <TD width=569 bgColor=#ffffff>
                  <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                    <TBODY>
                    <TR>
                      <TD width="23%">
                        <DIV align=center><img src="images/diary_title.jpg" width="171" height="47"></DIV></TD>
                      <TD width="77%">
                        <DIV align=right></DIV></TD></TR></TBODY></TABLE></TD>
                <TD vAlign=bottom width=40 bgColor=#ffffff>
                  <DIV align=center> </DIV></TD></TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width=609 align=center 
              border=0><TBODY>
              <TR>
                <TD height=2><IMG height=1 src="images/top02.gif" 
                  width=605></TD></TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width=609 align=center 
            bgColor=#9c9a9d border=0>
              <TBODY>
              <TR>
                <TD>
                  <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center 
                  border=0>
                    <TBODY>
                    <TR>
                      <TD width="71%"></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width=609 align=center 
            bgColor=#636562 border=0>
              <TBODY>
              <TR>
                <TD width=319>&nbsp;</TD>
                <TD width=290>
                  <DIV align=center><IMG height=16 
                  src="images/top_words.gif" 
            width=244></DIV></TD></TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width=609 align=center 
              border=0><TBODY>
              <TR>
                <TD height=2><IMG height=4 src="images/top03.gif" 
                  width=605></TD></TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width=609 align=center 
            bgColor=#ffffff border=0>
              <TBODY>
              <TR>
                <TD vAlign=top width=265 height=105><IMG height=105 
                  src="images/title_mini03.jpg" width=416></TD>
                <TD vAlign=center width=189 height=105>
                  <DIV align=center><A target=_blank 
                  href="http://www.yongzi.com"><IMG 
                  height=105 src="images/editor.jpg" width=190 
                  border=0></A></DIV></TD></TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width=609 align=center 
              border=0><TBODY>
              <TR>
                <TD height=2><IMG height=4 src="images/top03.gif" 
                  width=605></TD></TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width=609 align=center 
            bgColor=#636562 border=0>
              <TBODY>
              <TR>
                <TD>
                  <DIV align=left></DIV></TD></TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width=609 align=center 
            bgColor=#999999 border=0>
              <TBODY>
              <TR>
                <TD align="center"><a href="index.asp"><FONT color=#ffffff size=2>日记首页</FONT></a>&nbsp; &nbsp; &nbsp; <a href="diary_more.asp"><FONT color=#ffffff size=2>公开日记</FONT></a>&nbsp; &nbsp; &nbsp; <a href="best_more.asp"><FONT color=#ffffff size=2>优秀日记</FONT></a>&nbsp; &nbsp; &nbsp; <a href="user_more.asp"><FONT color=#ffffff size=2>用户列表</FONT></a>&nbsp; &nbsp; &nbsp; <a href="leibie_more.asp"><FONT color=#ffffff size=2>日记类型</FONT></a>&nbsp; &nbsp; &nbsp; <a href="reg.asp"><FONT color=#ffffff size=2>免费注册日记本</FONT></a></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TD vAlign=top bgColor=#ffffff>
      <TABLE cellSpacing=0 cellPadding=0 width=609 align=center border=0>
        <TBODY>
        <TR>
          <TD height=2>
            <TABLE borderColor=#e3e3e3 cellSpacing=0 borderColorDark=#e3e3e3 
            cellPadding=0 width=609 align=center bgColor=#ffffff border=1 
             bordercolorlight="#E3E3E3">
                  <TBODY>
                  
    <% 
    i=1
    do while not (rs.eof or err)
set rs2=server.createobject("adodb.recordset")
sql="select * from diary where userid="&rs("userid")
rs2.open sql,conn,1,1
total=rs2.recordcount
    %>
               <TR>
                <TD width=280>
                  <DIV align=right><%if total>30 or rs("best")=1 then response.Write "<FONT color=#cc6600>推荐:</FONT>" %><A 
                  target=_blank 
                  href="diary.asp?user=<%=rs("user")%>">《<%=rs("title")%>》</A></DIV></TD>
                <TD width=80>
                  <DIV align=center><A 
                  target=_blank 
                  href="leibie_more.asp?leibie=<%=rs("leibie")%>"><FONT color=#996600><%=rs("leibie")%></FONT></A></DIV></TD>
                <TD width=60>
                  <DIV align=center><A 
                  target=_blank 
                  href="leibie_more.asp?address=<%=rs("address")%>"><%=rs("address")%></A></DIV></TD>
                <TD width=189>
                  <DIV align=left>作者:<A target=_blank 
                  href="diary.asp?user=<%=rs("user")%>"><%=rs("nickname")%></A></DIV></TD></TR>
                  
<%
       j=j+1
       
       i=i+1
       if i>MaxPerPage then exit do '循环时如果到尾部则先退出,如果记录达到页最大显示数,也退出
          rs.movenext
    loop
    %>


                  </TBODY>
                </TABLE></TD></TR></TBODY></TABLE>
      <TABLE cellSpacing=2 cellPadding=2 width="100%" bgColor=#ffffee 
        border=0><TBODY>
<tr><td valign=middle nowrap>
页次:<b><%=currentpage%></b>/<b><%=maxpagenum%></b>页
&nbsp;
每页<b><%=MaxPerPage%></b>个  总<b><%=totalPut%></b>个用户</td>
<td valign=middle nowrap><div align=right><p>分页: 
        <%if leibie<>"" then%>
<%
	if currentpage > 4 then
	response.write "<a href=""?page=1&leibie="&leibie&""">[1]</a> ..."
	end if
	if maxpagenum>currentpage+3 then
	endpage=currentpage+3
	else
	endpage=maxpagenum
	end if
	for i=currentpage-3 to endpage
	if not i<1 then
		if i = clng(currentpage) then
			response.write " <font color=#996600>["&i&"]</font>"
		else
			response.write " <a href=""?page="&i&"&leibie="&leibie&""">["&i&"]</a>"
		end if
	end if
	next
	if currentpage+3 < maxpagenum then
		response.write "... <a href=""?page="&maxpagenum&"&leibie="&leibie&""">["&maxpagenum&"]</a>"
	end if
%>
            <%else%>
<%
	if currentpage > 4 then
	response.write "<a href=""?page=1&address="&address&""">[1]</a> ..."
	end if
	if maxpagenum>currentpage+3 then
	endpage=currentpage+3
	else
	endpage=maxpagenum
	end if
	for i=currentpage-3 to endpage
	if not i<1 then
		if i = clng(currentpage) then
			response.write " <font color=#996600>["&i&"]</font>"
		else
			response.write " <a href=""?page="&i&"&address="&address&""">["&i&"]</a>"
		end if
	end if
	next
	if currentpage+3 < maxpagenum then
		response.write "... <a href=""?page="&maxpagenum&"&address="&address&""">["&maxpagenum&"]</a>"
	end if
%>
            <%end if%>
</p></div></td></tr></TBODY></TABLE></TD></TR>
  <TR>
    <TD bgColor=#ffffff height=16>
      <TABLE cellSpacing=0 cellPadding=3 width=609 align=center bgColor=#9c9a9d 
      border=0>
        <TBODY>
<!--#include file="foot.asp"-->
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
</BODY></HTML>
<%end sub%>
<%sub showadd%>
<HTML><HEAD><TITLE>真露无香—网络日记本——分类查询</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META http-equiv=robots content=all>
<LINK href="images/styles.css" type=text/css rel=stylesheet>
<STYLE>A {
	COLOR: #999999; TEXT-DECORATION: none
}
A:hover {
	COLOR: #e65c09; FONT-SIZE: 10pt;LINE-HEIGHT: 14pt; TEXT-DECORATION: underline
}

⌨️ 快捷键说明

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