<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>

<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Conn_User.asp"-->

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>日志</title>
<style type="text/css">
BODY {
	scrollbar-face-color:#DDDDDD;
	scrollbar-highlight-color: #cccccc;
	scrollbar-shadow-color: #CCCCCC;
	scrollbar-3dlight-color: #F5F5F5;
	scrollbar-darkshadow-color: #F5F5F5;
	scrollbar-track-color: #F0F0F0;
	scrollbar-arrow-color: #FFFFFF;
	margin-left: 10px;
	margin-top: 10px;
	margin-right: 10px;
	margin-bottom: 10px;
}
</style>
<SCRIPT language=javascript>
function unselectall()
{
    if(document.form1.chkAll.checked){
	document.form1.chkAll.checked = document.myform.chkAll.checked&0;
    } 	
}

function ConfirmDel()
{
   if(confirm("确定要删除吗？一旦删除将不能恢复！"))
     return true;
   else
     return false;
	 
}

</SCRIPT>
<link href="new/css.CSS" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE4 {color: #707070}
-->
</style></head>

<body>
<%if request("action")="list" then%>

<%userid=request("userid")
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where userid="&userid&" order by userid desc"
rs.open sql,Conn_User,1,1
username=rs("username")

rs.close
set rs=nothing
%>
<%if request("dates")="" then%>
<%
myPagesize=10

set rs=server.createobject("adodb.recordset")

rs.open "select * from article where editor='"&username&"' order by articleid desc",conn,1,1 
call myPages(rs,myPagesize)
%>
<%else%>
<%
myPagesize=10
dates=request("dates")
set rs=server.createobject("adodb.recordset")

rs.open "select * from article where editor='"&username&"' and updatetime=#"&dates&"# order by articleid desc",conn,1,1 
call myPages(rs,myPagesize)
%>
<%end if%>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="1" height="1"></td>
    <td height="1" bgcolor="#BCBCBC"></td>
    <td width="1" height="1"></td>
  </tr>
  <tr>
    <td bgcolor="#BCBCBC"></td>
    <td height="27" align="center" bgcolor="f2f2f2"><table width="97%" height="18"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width=25 align="center"><img src="user/newpage_main_010.gif" width="15" height="13"></td>
        <td valign="bottom"><strong><font color="#535353">我的日志</font> </strong><font style="FONT-SIZE:11px" color="#535353">
          <script language="JavaScript" type="text/JavaScript">
var day="";
var month="";
var ampm="";
var ampmhour="";
var myweekday="";
var year="";
mydate=new Date();
myweekday=mydate.getDay();
mymonth=mydate.getMonth()+1;
myday= mydate.getDate();
myyear= mydate.getYear();
year=(myyear > 200) ? myyear : 1900 + myyear;
if(myweekday == 0)
weekday=" 星期日 ";
else if(myweekday == 1)
weekday=" 星期一 ";
else if(myweekday == 2)
weekday=" 星期二 ";
else if(myweekday == 3)
weekday=" 星期三 ";
else if(myweekday == 4)
weekday=" 星期四 ";
else if(myweekday == 5)
weekday=" 星期五 ";
else if(myweekday == 6)
weekday=" 星期六 ";
document.write(year+"."+mymonth+"."+myday+"");
              </script>
        </font></td>
        <td valign="bottom"><div align="right" class="STYLE4">查看方式&nbsp;</div></td>
        <td width="22" align="center" valign="bottom"><img src="user/ico_l_03.gif" width="17" height="17"></td>
        <td width="17" valign="bottom"><a href="log.asp?userid=<%=request("userid")%>&action=all"><img src="user/ico_l_01_on.gif" width="17" height="17" border="0"></a></td>
      </tr>
    </table></td>
    <td bgcolor="#BCBCBC"></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0"  style="display:" id='submenu2'>
          
            <tr>
              <td><table width="100%" border="0" cellspacing="0" cellpadding="0" >
                  <tr>
                    <td height="1" bgcolor="#BCBCBC"></td>
                    <td height="1" align="center" bgcolor="#BCBCBC"></td>
                    <td height="1" bgcolor="#BCBCBC"></td>
                  </tr>
                  <tr>
                    <td bgcolor="#BCBCBC"></td>
                    <td align="center" bgcolor="fafafa"><table width="100%"  border="0" cellpadding="5" cellspacing="0">
                        <tr  bgcolor="#FFFFFF">
                         
                          <td align="center"  bgcolor="#FFFFFF">
						  <%if rs.recordcount=0 then %>
                  <table height="50" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="15"><img src="user/main_giftshop_main_19.gif" width="9" height="12"></td>
                      <td>暂时还没有日志!!!</td>
                    </tr>
                  </table> <%else%>
                  <%line=myPagesize
do while not rs.eof and line>0
%>
                  <table width="99%" height="29" border="0" cellpadding="0" cellspacing="0">
                              <tr>
                                <td ></td>
                                <td height="25" align="center" bgcolor="ffffff"><table width="97%" cellpadding="0" cellspacing="0">
                                    <tr>
                                      <Td width="3%"><img src=user/head.gif></td>
                                      <Td><%
  set classrs=server.createobject("adodb.recordset")
classrs.open "select * from articleclass where classid="&rs("classid"),conn,1,1
%>
                                        [&nbsp;<a href=logclass.asp?userid=<%=userid%>&classid=<%=classrs("classID")%>><%=classrs("classname")%></a>&nbsp;]&nbsp; <a href=article_show.asp?userid=<%=userid%>&articleid=<%=rs("ArticleID")%>>
                                        <% if rs("TitleFontColor")<>"" then%>
                                          <font color=<%=rs("TitleFontColor")%>><%=left(rs("title"),12)%>
                                            <%if len(rs("title"))>12 then%>...
                                            <%else%>
                                            <%end if%>
                                        </font>
                                          <%else%>
                                          <%=left(rs("title"),12)%>
                                          <%if len(rs("title"))>12 then%>...
                                          <%else%>
                                          <%end if%>
                                          <%end if%>
                                        </a>&nbsp;&nbsp;<font style='FONT-SIZE: 11px' color='#333333'>(<%=rs("hits")%>)</font>
                                        <%if FormatDateTime(rs("UpdateTime"),1)=FormatDateTime(now,1) then%>
                                        &nbsp;<img src=user/ico_new.gif border="0">
                                        <%else%>
                                        <% end if%></td>
                                      <td width="15%"><table width="100%" height="3"  border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                          <td></td>
                                        </tr>
                                      </table>
                                      <%
	  userid=request("userid")
	
	  if CheckUserLogined()=true then
	  UserNamed=Request.Cookies("asp163")("UserName")
	 
	 set userq=server.createobject("adodb.recordset")
sql="select * from [user] where UserName='"&UserNamed&"' order by userid desc"
userq.open sql,Conn_User,1,1

	  
	  userw=userq("userid")
	 
	  If cint(userw)=cint(userid) then
	  
	  %>
                                          <a href="User_ArticleMan.asp?ArticleID=<%=rs("articleid")%>&userid=<%=userid%>"><img src=user/mody.gif border="0"></a> <a href="User_ArticleDel.asp?ArticleID=<%=rs("ArticleID")%>&userid=<%=userid%>&action=" onClick="return ConfirmDel();"><img src=user/del.gif border="0"></a>
                                          <%else
	  end if%>
                                          <%
	  else
	  end if
	  %></td>
                                      <Td width=15% align="right"><font color='#999999' style='FONT-SIZE: 11px'><%=year(rs("UpdateTime"))%>.<%=month(rs("UpdateTime"))%>.<%=day(rs("UpdateTime"))%></font></td>
                                    </tr>
                                </table></td>
                                <td ></td>
                              </tr>
                              <tr>
                                <td width="1" height="1" bgcolor="#BCBCBC"></td>
                                <td height="1"  background="user/li_x_02.gif"></td>
                                <td width="1" height="1" bgcolor="#BCBCBC"></td>
                              </tr>
                            </table>
                            <div align="center">
                            <%rs.movenext
   line=line-1
loop
  %>
  <%end if%>
                            <table width="100%" height="5"  border="0" cellpadding="0" cellspacing="0">
                              <tr>
                                <td></td>
                              </tr>
                            </table></td>
                         
                        </Tr>
                        
                    </table></td>
                    <td bgcolor="#BCBCBC"></td>
                  </tr>
                  <tr>
                    <td width="1" height="1" bgcolor="bcbcbc"></td>
                    <td height="1"bgcolor="#BCBCBC"></td>
                    <td width="1" height="1" bgcolor="bcbcbc"></td>
                  </tr>
                </table>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0" >
                    <tr>
                      <td bgcolor="#BCBCBC"></td>
                      <td align="center" bgcolor="fafafa"><table width="100%"  border="0" cellpadding="1" cellspacing="0">
                          <tr  bgcolor="#FFFFFF">
                            <td height="25" align="center"  bgcolor="f2f2f2"><%call listpages(mycondition)%>
                            <%rs.close
set rs=nothing%></td>
                          </Tr>
                      </table></td>
                      <td bgcolor="#BCBCBC"></td>
                    </tr>
                    <tr>
                      <td width="1" height="1"></td>
                      <td height="1"bgcolor="#BCBCBC"></td>
                      <td width="1" height="1"></td>
                    </tr>
                  </table>
              </td>
            </tr>
         
</table>
	  
      
	<%else%>

<%userid=request("userid")
set rs=server.createobject("adodb.recordset")
sql="select * from [user] where userid="&userid&" order by userid desc"
rs.open sql,Conn_User,1,1
username=rs("username")

rs.close
set rs=nothing
%>
<%if request("dates")="" then%>
<%
myPagesize=1

set rs=server.createobject("adodb.recordset")

rs.open "select * from article where editor='"&username&"' order by articleid desc",conn,1,1 
call myPages(rs,myPagesize)
%>
<%else%>
<%
myPagesize=1
dates=request("dates")
set rs=server.createobject("adodb.recordset")

rs.open "select * from article where editor='"&username&"' and updatetime=#"&dates&"# order by articleid desc",conn,1,1 
call myPages(rs,myPagesize)
%>
<%end if%>
<%if rs.eof then%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="1" height="1"></td>
    <td height="1" bgcolor="#BCBCBC"></td>
    <td width="1" height="1"></td>
  </tr>
  <tr>
    <td bgcolor="#BCBCBC"></td>
    <td height="25" align="center" bgcolor="f6f6f6"><table width="97%" height="18"  border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width=25 align="center"><img src="user/newpage_main_010.gif" width="15" height="13"></td>
          <td valign="bottom"><strong><font color="#535353">我的日志</font> </strong><font style="FONT-SIZE:11px" color="#535353"> 
            <script language="JavaScript" type="text/JavaScript">
var day="";
var month="";
var ampm="";
var ampmhour="";
var myweekday="";
var year="";
mydate=new Date();
myweekday=mydate.getDay();
mymonth=mydate.getMonth()+1;
myday= mydate.getDate();
myyear= mydate.getYear();
year=(myyear > 200) ? myyear : 1900 + myyear;
if(myweekday == 0)
weekday=" 星期日 ";
else if(myweekday == 1)
weekday=" 星期一 ";
else if(myweekday == 2)
weekday=" 星期二 ";
else if(myweekday == 3)
weekday=" 星期三 ";
else if(myweekday == 4)
weekday=" 星期四 ";
else if(myweekday == 5)
weekday=" 星期五 ";
else if(myweekday == 6)
weekday=" 星期六 ";
document.write(year+"."+mymonth+"."+myday+"");
              </script>
            </font></td>
          <td align="right" valign="bottom"><table height="22"  border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td valign="middle"><div align="right" class="STYLE4">查看方式&nbsp;&nbsp;</div></td>
              <td width="19" align="center" valign="middle"><a href="log.asp?userid=<%=request("userid")%>&action=list"><img src="user/ico_l_03_on.gif" width="17" height="17" border="0"></a></td>
              <td width="22" align="center" valign="middle"><img src="user/ico_l_01.gif" width="17" height="17"></td>
            </tr>
          </table></td>
        </tr>
      </table></td>
    <td bgcolor="#BCBCBC"></td>
  </tr>
</table>
<table width="100%" height="10"  border="0" cellpadding="5" cellspacing="1" bgcolor="#bcbcbc">
  <tr>
    <td align="center" bgcolor="#FFFFFF">
<table height="50" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="15"><img src="user/main_giftshop_main_19.gif" width="9" height="12"></td>
          <td>暂时还没有日志!!!</td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#BCBCBC"></td>
    <td height="25" align="center" bgcolor="fafafa"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
    <td bgcolor="#BCBCBC"></td>
  </tr>
  <tr>
    <td width="1" height="1"></td>
    <td height="1" bgcolor="#BCBCBC"></td>
    <td width="1" height="1"></td>
  </tr>
</table>
<%end if%>
<%line=myPagesize
do while not rs.eof and line>0
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="1" height="1"></td>
    <td height="1" bgcolor="#BCBCBC"></td>
    <td width="1" height="1"></td>
  </tr>
  <tr>
    <td bgcolor="#BCBCBC"></td>
    <td height="27" align="center" bgcolor="f2f2f2" >
<table width="100%" height="25"  border="0" align="left" cellpadding="0" cellspacing="0">
        <tr>
          <td width="10"></td>
          <td width="17" align="left"><img src=user/008.gif width="10" height="11"></td>
          <td><table width="99%" cellpadding="0" cellspacing="0">
              <tr> 
                <Td width="20%">
<table width="100%" height="1"  border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td></td>
                    </tr>
                  </table>
                  <%
  set classrs=server.createobject("adodb.recordset")
classrs.open "select * from articleclass where classid="&rs("classid"),conn,1,1
%>
                  [&nbsp;<a href=logclass.asp?userid=<%=userid%>&classid=<%=classrs("classID")%>><%=classrs("classname")%></a>&nbsp;]&nbsp;</td>
                <Td>
<table width="100%" height="3"  border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td></td>
                    </tr>
                  </table>
                  <%
	  userid=request("userid")
	
	  if CheckUserLogined()=true then
	  UserNamed=Request.Cookies("asp163")("UserName")
	 
	 set userq=server.createobject("adodb.recordset")
sql="select * from [user] where UserName='"&UserNamed&"' order by userid desc"
userq.open sql,Conn_User,1,1

	  
	  userw=userq("userid")
	 
	  If cint(userw)=cint(userid) then
	  
	  %>
                  <a href="User_ArticleMan.asp?ArticleID=<%=rs("articleid")%>&userid=<%=userid%>"><img src=user/mody.gif border="0"></a> 
                  <a href="User_ArticleDel.asp?ArticleID=<%=rs("ArticleID")%>&userid=<%=userid%>&action=all" onClick="return ConfirmDel();"><img src=user/del.gif border="0"></a> 
                  <%else
	  end if%>
                  <%
	  else
	  end if
	  %>
                </td>
                <Td width="30%" align="right"><table width="100%" height="1"  border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td></td>
                    </tr>
                  </table> 
                  <table height="22"  border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td valign="middle"> <div align="right" class="STYLE4">查看方式&nbsp;&nbsp;</div></td>
                      <td width="19" align="center" valign="middle"><a href="log.asp?userid=<%=request("userid")%>&action=list"><img src="user/ico_l_03_on.gif" width="17" height="17" border="0"></a></td>
                      <td width="22" align="center" valign="middle"><img src="user/ico_l_01.gif" width="17" height="17"></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table></td>
    <td bgcolor="#BCBCBC"></td>
  </tr>
</table>

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	 <tr>
        <td width="1" height="1" bgcolor="#BCBCBC"></td>
            <td height="1" background="user/li_x_02.gif"></td>
        <td width="1" height="1" bgcolor="#BCBCBC"></td>
      </tr>
      <tr>
        <td bgcolor="#BCBCBC"></td>
        <td height="27" align="center" bgcolor="#ffffff"><table width="95%" height="30" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td height="35" align="center" valign="middle"> 
            <table width="100%" height="4"  border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td></td>
              </tr>
            </table> 
            <% if rs("TitleFontColor")<>"" then%>
            <font color=<%=rs("TitleFontColor")%> style='FONT-SIZE: 14px'><strong><%=left(rs("title"),12)%></strong> 
            <%if len(rs("title"))>12 then%>
            ... 
            <%else%>
            <%end if%>
            </font> 
            <%else%>
            <font style='FONT-SIZE: 14px'><strong><%=left(rs("title"),12)%></strong></font> 
            <%if len(rs("title"))>12 then%>
            ... 
            <%else%>
            <%end if%>
            <%end if%>
            <%if FormatDateTime(rs("UpdateTime"),1)=FormatDateTime(now,1) then%>
            &nbsp;<img src=user/ico_new.gif border="0"> 
            <%else%>
            <% end if%>
          </td>
        </tr>
<tr>
      
        <td height="1" background="user/li_x_02.gif"></td>
      
      </tr>
        <tr>
          <td align="center" valign="bottom"><table width="100%" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="f2f2f2">
              <tr> 
                <td width="33%"> &nbsp;&nbsp; 
                  <%
				
		response.write "作者："
		set tUser=Conn_User.execute("select " & db_User_ID & " from " & db_User_Table & " where " & db_User_Name & "='" & rs("Editor") & "'")
		if tUser.bof and tUser.eof then
			response.write rs("Editor")
			
		else
			response.write "<a href='user.asp?userid=" & tUser(0) & "&mdid=indexd&htm=indexs.asp?userid=" & tUser(0) & "' target=_blank>" & rs("Editor") & "</a>"
		end if
		
		%>
                  <%
				
		
		set tUsers=Conn_User.execute("select " & db_User_usermane & " from " & db_User_Table & " where " & db_User_Name & "='" & rs("Editor") & "'")
		
		
		%>
                </td>
                <td width="33%" align="center"><font style='FONT-SIZE: 11px' color='#333333'>点击:<%=rs("hits")%></font> 
                </td>
                <td width="33%" align="right"> <font color='#333333' style='FONT-SIZE: 11px'><%=year(rs("UpdateTime"))%>.<%=month(rs("UpdateTime"))%>.<%=day(rs("UpdateTime"))%>&nbsp;&nbsp;</font></td>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="98%" cellpadding="10" cellspacing="0">
        <tr>
              <Td><p><%=rs("Content")%></p></td>
            </tr>
        </table></td>
        <td bgcolor="#BCBCBC"></td>
      </tr>
      <tr>
        <td width="1" height="1" bgcolor="#BCBCBC"></td>
        <td height="1" background="user/li_x_02.gif"></td>
        <td width="1" height="1" bgcolor="#BCBCBC"></td>
      </tr>
    </table>
	<%
articleid=rs("articleid")
set rsc=server.createobject("adodb.recordset")
sql="select * from [articlecomment] where articleid="&articleid
rsc.open sql,Conn,1,1

%>
	<%do while not rsc.eof %>
    <%
usernames=rsc("UserName")
set rsuser=server.createobject("adodb.recordset")
sql="select * from [user] where username='"&usernames&"'"
rsuser.open sql,Conn_user,1,1

%>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">

      <tr>
        <td bgcolor="#BCBCBC"></td>
        <td height="25" align="left" bgcolor="F0F0F0"><table width="100%" height="25"  border="0" align="left" cellpadding="0" cellspacing="0">
            <tr>
              <td width="10"></td>
              
          <td width="13" align="left"><img src="user/bbs_s02_04.gif" width="11" height="11"></td>
              <td><table width="100%"  border="0" cellspacing="0" cellpadding="3">
                  <tr>
                    <td><p><a href="user.asp?userid=<%=rsuser("userid")%>&mdid=indexd&htm=indexs.asp?userid=<%=rsuser("userid")%>" target="_blank"><font style='FONT-SIZE: 11px' color='#1F3174' class="no"><%=rsc("username")%></font></a>&nbsp;&nbsp;<font style='FONT-SIZE: 11px' color='#666666'>(<%=rsc("writetime")%>)</font>&nbsp;&nbsp;<%=rsc("content")%></p></td>
                  </tr>
              </table></td>
            </tr>
        </table></td>
        <td bgcolor="#BCBCBC"></td>
      </tr>
	        <tr>
        <td width="1" height="1" bgcolor="#BCBCBC"></td>
        <td height="1" background="user/li_x_02.gif"></td>
        <td width="1" height="1" bgcolor="#BCBCBC"></td>
      </tr>
    </table>
    <%rsc.movenext
  loop
  %>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <form name="form1" method="post" action="articleCommentsave.asp">
      
        <tr>
          <td bgcolor="#BCBCBC"></td>
          <td height="30" align="left" bgcolor="#FFFFFF"><table height="28"  border="0" align="left" cellpadding="0" cellspacing="0">
              <tr>
                <td width="15">&nbsp;</td>
                <td width="35" align="left">评论:</td>
                <td><%if Request.Cookies("asp163")("username") <>"" then%>
                    <input name="Content" class="inputnoa" type="text" size="53">
                    <%else%>
                    <input name="Content2" class="inputno" type="text" size="53" value=登录后发表评论 readonly>
                    <%end if%>
                    <input name="userid" type="hidden" size="50" value="<%=request("userid")%>">
                    <input name="articleid" type="hidden" size="50" value="<%=rs("articleid")%>"></td>
                <td width="58" align="center"><%if Request.Cookies("asp163")("username") <>"" then%>
                    <input name="imageField" type="image" src="user/enter.gif" width="46" height="16" border="0"></td>
                <td width="15"></td>
                <%else%>
                <table width="100%" height="3"  border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td></td>
                  </tr>
                </table>
                <img src="user/enter.gif">
                <%end if%>
              </tr>
          </table></td>
          <td bgcolor="#BCBCBC"></td>
        </tr>
      </form>
	    <tr>
          <td width="1" height="1" ></td>
          <td height="1" bgcolor="#BCBCBC"></td>
          <td width="1"></td>
        </tr>
    </table>
    <table width="100%" height="10"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td>
		</td>
      </tr>
    </table>
	<div align="center">
	  <div align="center">
	    <%rs.movenext
   line=line-1
loop
  %>
	      <center><%call listpages(mycondition)%></center>
</div>
	  <%

rs.close
set rs=nothing%>  
      
	<%end if%>
	<%sub listpages(mycondition)
	response.write "<table height=22  border=0 cellpadding=0 cellspacing=0><Tr><td><table width='100%' border=0 cellspacing=0 cellpadding=0><tr><td height=3></td></tr></table>"
	if pages<1 then
		exit sub
	end if
	
	
	if p>0 then
		response.write	"<a href="&request.ServerVariables("script_name")&"?userid="&userid&"&currentpage=10&p="&p-1&mycondition&"&action="&request("action")&"><img src=user/prepre.gif alt=前十页 border=0></a>&nbsp;&nbsp;&nbsp;"
    else
	response.write	"<img src=user/prepre.gif alt=前十页 border=0>&nbsp;&nbsp;&nbsp;"
    end if
	'-------------------下面写出当前十个页码
	response.write "</td><td><img src=user/lined.gif border=0><img src=user/k.gif border=0 width=5>"
	for i=1 to 10
		if (p*10+i)>pages then exit for
		if currentpage=i then
		
			response.write "<b><a style='color:ff6600'"
		else
			response.write "<a"
		end if 
		dates=request("dates")
		response.write " href="&request.ServerVariables("script_name")&"?userid="&userid&"&dates="&dates&"&currentpage="&i&"&p="&p&mycondition&"&action="&request("action")&"><font class=no >"&(p*10+i)&"</font></a></b>&nbsp;&nbsp;<img src=user/lined.gif border=0><img src=user/k.gif width=5 border=0>"	
     next
	 response.write "</td><td><table width='100%' border=0 cellspacing=0 cellpadding=0><tr><td height=3></td></tr></table>"
	 '--------------------察看下十页的连接
    if (p*10+10)<pages then
		response.write "<img src=user/k.gif border=0><a href="&request.ServerVariables("script_name")&"?userid="&userid&"&currentpage=1&p="&p+1&mycondition&"&action="&request("action")&"><img src=user/nextnext.gif alt=后十页 border=0></a>&nbsp;&nbsp;" 
		else
		response.write "<img src=user/k.gif border=0><img src=user/nextnext.gif alt=后十页 border=0>&nbsp;&nbsp;"
	end if
	'-----------------------------------------------上下页导航
	response.write "&nbsp;</td>"
	

	  response.write "</tr></table>"
end sub

sub myPages(myRS,mysize)  '------mysize为内部变量（主页面没有定义），myRS为主页面传递过来的RS对象（地址传递）
	if myRS.eof and myRS.bof then str="没有纪录"
	if str="" then
		if mysize="" or NOT IsNumeric(mysize) then
			mysize=15
		end if
		myRS.PageSize=mysize
		pages=myRS.pagecount
		records=myRS.recordcount
		On Error Resume Next '取得数字
		currentPage=request("currentPage")
		if currentPage="" then
			currentPage=1
		end if
		currentPage=CInt(currentPage)
		if Err.Number <> 0 Then
			currentPage=1
			Err.Clear
		end if
		if currentPage<1 then
			currentPage=1
		elseIf currentPage>10 then
			currentPage=10
		end if
		'----------------处理p
		p=request("p")
		if p="" then
			p=0
		end if
		p=CLng(p)
		if Err.Number <> 0 Then
			p=0
			Err.Clear
		end if
		if p<0 then
			p=0
		end if
		'--判断是否出了页数范围
		nowPage=p*10+currentPage
		if nowPage>pages then
			p=(pages-1)\10
			currentPage=((pages-1) mod 10)+1
		end if
		myRS.absolutepage=p*10+currentPage
	else
	   currentPage=1
	   records=0
	   pages=1
	end if
end sub

dim pages,records,currentPage,p '--------定义变量，这些变量在主页面中，进行地址传递%>
    </div>
</body>
</html>
