<!--#include file="conn.asp"-->
<!--#include file="fuction.asp" -->
<!--#include file="webconfig.asp"-->
<!--#include file="webtop.asp"-->
<table width="1000" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
  <tr>
    <td width="20"></td>
    <td valign="bottom"><img src="<%=weburl%>images/arrow01.gif" width="11" height="11" /> Your present position: <a href="<%=weburl%>"><%=webname%></a> ->
        <span class="table-shangxia"><span class="b14">Guest Notices</span></span></td>
    <td valign="bottom"> 
       
    </td>
  </tr>
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
</table>
<table width="1000"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="205" valign="top"><!--#include file="index_login.asp"--><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="5"><img src="images/ge.gif" width="1" height="5"></td>
  </tr>
</table>
	<!--#include file="rexiao.asp"-->
</td>
    <td valign="top"><table width="780"  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="8"><img src="<%=weburl%>images/hygg.jpg" width="780" height="33"></td>
          </tr>
        </table>
        <%if session("username")="" then
				 set rs=server.createobject("adodb.recordset")
				 		rs.open "select * from shop_usergg where lx=0 order by id desc",conn,1,1
				 else
				set rs=server.createobject("adodb.recordset")
				rs.open "select * from shop_usergg where  lx="&nosql(session("reglx"))&" or lx=0 order by id desc",conn,1,1
				end if
		if rs.recordcount=0 then 
		%>
        <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
          <tr>
            <td align=center>Nothing</td>
          </tr>
        </table>
        <%
		else
	  		rs.PageSize =30 '每页记录条数
			iCount=rs.RecordCount '记录总数
			iPageSize=rs.PageSize
    		maxpage=rs.PageCount 
    		page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	%>
        <table width="98%" border="0" cellspacing="0" cellpadding="5" align="center">
          <%
			For i=1 To x
			%>
          <tr>
            <td align=center height=10 width="20"><img src="img/top1.gif" width="12" height="13" border="0"> </td>
            <td width="321" height=10 align=left><a href=gg_list.asp?id=<%=rs("id")%>><%=replace(trim(rs("zt")),"<br>","")%></a>[Browse：<%=rs("hot")%>]</td>
            <td width="122" align=left>Announcer：<%=trim(rs("fbr"))%></td>
            <td width="197" height=10 align=left>Date：<%=year(rs("adddate"))&"."&month(rs("adddate"))&"."&day(rs("adddate"))%></td>
          </tr>
 <tr>
                <td height="1" background="<%=weburl%>images/skin<%=cssid%>/x.gif" ></td>
                <td height="1" background="<%=weburl%>images/skin<%=cssid%>/x.gif"></td>
                <td height="1" background="<%=weburl%>images/skin<%=cssid%>/x.gif" ></td>
                <td height="1" background="<%=weburl%>images/skin<%=cssid%>/x.gif"></td>
          </tr>
          
          <%
			rs.movenext
		    next
			%>
        </table>
        <br>
        <%
		call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
		end if
		rs.close
		set rs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
    Dim query, a, x, temp
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")

    query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
    Next

    Response.Write("<table " & Table_style & ">" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
    Response.Write("<TD align=right>" & vbCrLf )
    Response.Write(font_style & vbCrLf )    
        
    if page<=1 then
        Response.Write ("First " & vbCrLf)        
        Response.Write ("Prev " & vbCrLf)
    else        
        Response.Write("<A HREF=" & action & "?" & temp & "Page=1>First</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">Prev</A> " & vbCrLf)
    end if

    if page>=pagecount then
        Response.Write ("Next " & vbCrLf)
        Response.Write ("Last " & vbCrLf)            
    else
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">Next</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">Last</A> " & vbCrLf)            
    end if

    Response.Write(" Totel Page：" & page & "/" & pageCount & "" &  vbCrLf)
    Response.Write(" Totel Notics" & iCount & "" &  vbCrLf)
    Response.Write(" Goto Page " & "<INPUT TYEP=TEXT NAME=page class=wenbenkuang SIZE=1 Maxlength=5 VALUE=" & page & ">" & " "  & vbCrLf & "<input name=go type=image  src="&weburl&"img/butn_go.gif alt=GO align=absMiddle  border=0>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%>
</td>
  </tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
