<%
Sub PageControl(iCount,pagecount,page,table_style,font_style,per_page,sex)
'生成上一页下一页链接
    Dim query, a, x, temp
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
	
    temp=""

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

    if page>=pagecount then
        Response.Write ("下页 " & vbCrLf)
        Response.Write ("尾页 " & vbCrLf)            
    else
        Response.Write("<A HREF=" & action & "?" & temp & "web_id="&web_id&"&bigcate="&bigcate&"&smallcate="&smallcate&"&list="&listlx&"&Page=" & (Page+1) & "&sex="&sex&">下页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "web_id="&web_id&"&bigcate="&bigcate&"&smallcate="&smallcate&"&list="&listlx&"&Page=" & pagecount & "&sex="&sex&">尾页</A> " & vbCrLf)            
    end if

    Response.Write(" 页次：" & page & "/" & pageCount & "页" &  vbCrLf)
    Response.Write(" 共有" & iCount & "条/每页"&per_page&"条" &  vbCrLf)
    Response.Write(" 转到 " & "<INPUT TYEP=TEXT NAME=page SIZE=4 Maxlength=8 VALUE=""" & page & """ class=wenbenkuang>" & " 页"  & vbCrLf & "<input name=go type=image  src=/img/btn_go.gif alt=GO align=absMiddle  border=0>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%>