<!--#include file="../Include/Conn.asp" -->
<!--#include file="../Include/const.asp" -->
<!--#include file="../Include/char.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>子俱乐部列表</title>
<link href="../css/member.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--



function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<style type="text/css"></style>
</head>

<body onLoad="MM_preloadImages('images/hy_b_1b.gif','images/hy_b_3b.gif')">
<!--#include file="../include/top.asp" -->
<!--#include file="../Include/member_Top.asp" -->
<!--#include file="club_top.asp" -->
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="364"><img src="images/hd_01.gif" width="364" height="77"></td>
    <td width="416" align="right" background="images/hd_02.gif"><table border="0" cellspacing="3" cellpadding="0">
      <tr>
        <td width="170" height="20" align="left"><table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#E0AF1E">
            <tr>
                <td bgcolor="#FFEEB9">&nbsp;<img src="images/topad_arrow.gif" width="11" height="15"> 
                  <a href="club_subtop.asp?kind=1">名气最大的子俱乐部</a> </td>
            </tr>
          </table></td>
        <td width="20" >&nbsp;</td>
        <td width="150" align="left"><table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#E0AF1E">
          <tr>
                <td bgcolor="#FFEEB9">&nbsp;<img src="images/topad_arrow.gif" width="11" height="15"> 
                  <a href="club_subtop.asp?kind=2">成员最多的子俱乐部</a> </td>
          </tr>
        </table></td>
        <td width="15">&nbsp;</td>
      </tr>
      <tr>
        <td height="20" align="left"><table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#E0AF1E">
          <tr>
                <td bgcolor="#FFEEB9">&nbsp;<img src="images/topad_arrow.gif" width="11" height="15"> 
                  <a href="club_subtop.asp?kind=3">活动最多的子俱乐部</a> </td>
          </tr>
        </table></td>
        <td>&nbsp;</td>
        <td align="left"><table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#E0AF1E">
          <tr>
                <td bgcolor="#FFEEB9">&nbsp;<img src="images/topad_arrow.gif" width="11" height="15"> 
                  <a href="club_subtop.asp?kind=4">照片最多的子俱乐部</a> </td>
          </tr>
        </table></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="20" align="left"><table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#E0AF1E">
          <tr>
                <td bgcolor="#FFEEB9">&nbsp;<img src="images/topad_arrow.gif" width="11" height="15"> 
                  <a href="club_subtop.asp?kind=5">最有人气的子俱乐部</a> </td>
          </tr>
        </table></td>
        <td>&nbsp;</td>
        <td align="left"><table width="100%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#E0AF1E">
          <tr>
                <td bgcolor="#FFEEB9">&nbsp;<img src="images/topad_arrow.gif" width="11" height="15"> 
                  <a href="club_subtop.asp?kind=6">最新创建的子俱乐部</a> </td>
          </tr>
        </table></td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="174" align="center" valign="top" bgcolor="#FFFFFF"><img src="images/hd_03.gif" width="174" height="302">
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="center"><img src="images/hd_b_3.gif" width="170" height="38"></td>
        </tr>
      </table>
      <table width="100%" border="0">
<%
set rs_m=server.createobject("adodb.recordset")
sql_m="select top 10 f_id,f_title,f_club_id  from t_club_meet order by f_regtime desc"
rs_m.open sql_m,conn,1,1
do while not rs_m.eof
%>
              <tr> 
                <td>·<A title="<%=rs_m("f_title")%>" href="club_lookmeet.asp?id=<%=rs_m("f_club_id")%>&meetid=<%=rs_m("f_id")%>"><%=rs_m("f_title")%></a></td>
              </tr>
<%
rs_m.movenext
loop
rs_m.close
set rs_m=nothing
%>
           
            </table>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="50" align="center" valign="middle"><a href="club_add.asp"><img src="images/hd_b_2.gif" width="170" height="38" vspace="3" border="0"></a></td>
        </tr>
      </table></td>
    <td valign="top"><table width="606" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="593"><img src="images/hd_04.gif" width="593" height="14"></td>
        <td width="13"><img src="images/hd_05.gif" width="13" height="14"></td>
      </tr>
    </table>
      <table width="606" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="593" align="center" valign="top" background="images/hd_06.gif"> 
            <%
					dim PerPage
					set rs_c=server.createobject("adodb.recordset")
					sql_c="select  f_id,f_name,f_regtime,f_username,f_manage_username,f_photo from t_club"
					keyword=request("keyword")
					'if keyword <>"" then
					sql_c=sql_c&" where f_name like '%"&keyword&"%'"
					'end if
					sql_c=sql_c&" order by f_index desc, f_regtime desc"
					rs_c.open sql_c,conn,1,1
					'flag="尚未处理"
                    PerPage=10
				
                   '假如没有数据时
                 ' If rs_c.eof and rs_c.bof then
                  ' response.write "<p align='center'><font color='#ff0000'>还没任何新闻</font></p>"
                 ' response.end
                 ' End if
					'取得页数,并判断用户输入的是否数字类型的数据，如不是将以第一页显示
                    text="0123456789"
                    Rs_c.PageSize=PerPage
					
                    for i=1 to len(request("page"))
                    checkpage=instr(1,text,mid(request("page"),i,1))
                    if checkpage=0 then
                    exit for
                    end if
                    next

                  If checkpage<>0 then
                  If NOT IsEmpty(request("page")) Then
                  CurrentPage=Cint(request("page"))
                  If CurrentPage < 1 Then CurrentPage = 1
                  If CurrentPage > Rs_c.PageCount Then CurrentPage = Rs_c.PageCount
                  Else
                  CurrentPage= 1
                  End If
                 If not Rs_c.eof Then Rs_c.AbsolutePage = CurrentPage end if
                 Else
                 CurrentPage=1
                 End if					
				%>
            <table width="100%"  border="0" cellspacing="3" cellpadding="0">
          <FORM name=search action=club_sub.asp method=post>
		    <tr>
              <td width="38%" align="left"><img src="images/hd_b_1.gif" width="200" height="30"> </td>
              <td width="52%" align="right"><img src="images/2_25.gif" width="11" height="11"> 子俱乐部搜索
                    <input name="keyword" type="text" id="keyword"></td>
              <td width="10%"><INPUT type=image src="images/sear_ico.gif" width="50" height="18"></td>
            </tr>
			</form>
              <tr align="center" valign="top"> 
                <td height="20" colspan="3" class="p3"> 总共查询到 <strong><%=Cstr(rs_c.RecordCount)%> </strong> 家子俱乐部，每页 <strong><%=PerPage%></strong> 家，共 <strong><%=Cstr(rs_c.pagecount)%> </strong> 页，当前为第 <strong><%=CurrentPage%> </strong> 页 </td>
              </tr>
            <tr>
              <td height="1" colspan="3" background="images/line_02.gif"></td>
            </tr>
          </table>
		  <table width="580"  border="0" cellspacing="3" cellpadding="0">
              <tr> 
<%
if not rs_c.eof then
i=0
do while not rs_c.eof
%>
                <td width="50%" height="90" align="left" valign="top"><table width="100%"  border="0" cellspacing="3" cellpadding="0">
                    <tr> 
                      <td width="110" align="center"><a href="club_viewsub.asp?id=<%=rs_c("f_id")%>" class="p4"><img src="<%=rs_c("f_photo")%>" width="80" height="80" border="0"></a></td>
                      <td width="61%" valign="top"><table width="100%"  border="0" cellspacing="3" cellpadding="2">
                          <tr> 
                            <td> <strong><a href="club_viewsub.asp?id=<%=rs_c("f_id")%>" class="p4"><%=rs_c("f_name")%></a></strong></td>
                          </tr>
                          <tr> 
                            <td> 创立时间：<%=datevalue(rs_c("f_regtime"))%></td>
                          </tr>
                          <tr> 
                            <td>创 始 人：<a href="club_member.asp?username=<%=rs_c("f_username")%>" target="_blank"><%=rs_c("f_username")%></a></td>
                          </tr>
                          <tr> 
                            <td>俱乐部主席：<a href="club_member.asp?username=<%=rs_c("f_manage_username")%>" target="_blank"><%=rs_c("f_manage_username")%></a></td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
<%
i=i+1
if i mod 2=0 then
response.write "</tr><tr>"
end if
if i >= Perpage then exit do
rs_c.movenext
loop
end if
%>
               
              </tr>
            </table>
            <table width="100%"  border="0" cellspacing="3" cellpadding="0">
              <tr>
                <td align="center"> 
                  <% If currentpage > 1 Then  %>
                  &nbsp;<a href='club_sub.asp?keyword=<%=keyword%>&page=<%=cstr(1)%>'><SPAN style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">9</SPAN></a> 
                  &nbsp;<a href='club_sub.asp?keyword=<%=keyword%>&page=<%=Cstr(currentpage-1)%>'><SPAN style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">7</SPAN></a> 
                  &nbsp;
                  <% Else  %>
                  &nbsp;<SPAN style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">9</SPAN> 
                  &nbsp;<SPAN style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">7</SPAN> 
                  <% end if %>
                   <%
			  if rs_c.pagecount>8 then
			  n_star=currentpage
			  n_end=currentpage+7
			  else
			  n_star=1
			  n_end=rs_c.pagecount			  
			  end if
			  %>
              <% FOR n=n_star to n_end %>
                  <% if n>rs_c.pagecount then  exit for  end if%>
                  &nbsp;<a href='club_sub.asp?keyword=<%=keyword%>&page=<%=n%>'><FONT color=#ff0000><B><%=n%></B></FONT></a> 
                  <%
					  next
					  %>
                  <% If currentpage < Rs_c.PageCount Then %>
                  &nbsp;<a href='club_sub.asp?keyword=<%=keyword%>&page=<%=Cstr(currentPage+1)%>'><SPAN  style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">8</SPAN></a> 
                  &nbsp;<a href='club_sub.asp?keyword=<%=keyword%>&page=<%=Cstr(Rs_c.PageCount)%>'><SPAN  style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">:</SPAN></a> 
                  <% else %>
                  &nbsp;<SPAN  style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">8</SPAN> 
                  &nbsp;<SPAN  style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">:</SPAN> 
                  <% end if %>
                </td>
              </tr>
            </table></td>
          <td valign="top" bgcolor="#FFFFFF"><img src="images/hd_07.gif" width="13" height="288"></td>
        </tr>
        <tr>
          <td background="images/hd_06.gif"><img src="images/hd_09.gif" width="593" height="21"></td>
          <td valign="top" bgcolor="#FFFFFF">&nbsp;</td>
        </tr>
      </table></td>
  </tr>
</table>
<!--#include file="../Include/Bottom.asp" -->
</body>
</html>
<% rs_c.close
set rs_c=nothing
%>
