<!--#include file="../Include/Conn.asp" -->
<!--#include file="../Include/const.asp" -->
<!--#include file="../Include/char.asp" -->
<!--#include file="IsLogin.asp" -->
<%
f_id=clng(request("id"))
if f_id="" or IsNumeric(f_id)=false then
 Call Msgbox("对不起，ID号错误！",1)
 Response.end
 end if
 m_ID = Session("CurUserID")
 m_username= Session("CurUserName")

set rs_a=server.createobject("adodb.recordset")
sql_a="select * from t_club where F_id="&f_id
rs_a.open sql_a,conn,1,3

if rs_a.eof then
 Call Msgbox("对不起，该俱乐部已经不存在！",1)
 Response.end
end if
'判别身份，是否有权限上传照片
set rs_user=server.createobject("adodb.recordset")
sql_user="select f_ischeck,f_identity,f_grade from t_club_member where F_club_id="&f_id&" and f_username='"&m_username&"'"
rs_user.open sql_user,conn
if rs_user.eof and rs_user.bof then
 Call Msgbox("对不起,您还未加入本俱乐部！",1)
 Response.end
 else
 if rs_user("f_ischeck")=false then
 Call Msgbox("对不起,您还未通过审核加入本俱乐部，请耐心等待！",1)
 Response.end
 end if
end if
if rs_user("f_identity")="初级会员" then    '初级会员无权上传照片
 Call Msgbox("对不起,您是本俱乐部[初级会员]暂无上传照片权限！",1)
 Response.end
end if
 filepath="ClubImages/"&f_id  '子俱乐部的照片存放位置
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>子俱乐部:</title>
<link href="../Files/Style.css" rel="stylesheet" type="text/css">
<script language=Javascript>
<!--
function formsub(i){
if (i==1){
if (confirm('确定删除以上照片！')==1){
   Del.action="club_photodel.asp";
   Del.submit();
}
}
if (i==2){
	if (confirm('确定审核通过以上照片！')==1){
	Del.action="club_photoflag.asp";
    Del.submit();
	}
}
}

//-->
</script>
<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="600" align="center" valign="top"><table width="600" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/xxclub_01.gif" width="600" height="154"></td>
      </tr>
    </table>
      <table width="580" border="0" cellpadding="0" cellspacing="5" bgcolor="f4f4f4">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td width="100" align="center"><a href="<%=rs_a("f_photo")%>" target="_blank"><img src="<%=rs_a("f_photo")%>" width="80" height="80" border="0"></a></td>
              <td width="81%"><table width="100%"  border="0" cellspacing="3" cellpadding="0">
                <tr>
                  <td width="68" align="left" class="p1">名　　称：</td>
                  <td colspan="4" align="left"><strong><%=rs_a("f_name")%></strong></td>
                  </tr>
                <tr>
                  <td height="1" colspan="5" align="left" background="images/line.gif"></td>
                </tr>
                <tr>
                  <td align="left" class="p1">创 始 人：</td>
                  <td align="left"><a href="club_member.asp?username=<%=rs_a("f_username")%>" target="_blank"><%=rs_a("f_username")%></a></td>
                  <td align="left"><span class="p1">现任主席：</span></td>
                  <td width="156" align="left"><a href="club_member.asp?username=<%=rs_a("f_manage_username")%>" target="_blank"><%=rs_a("f_manage_username")%></a></td>
                </tr>
                <tr>
                  <td height="1" colspan="5" align="left" background="images/line.gif"></td>
                </tr>
                <tr>
                  <td width="68" align="left" class="p1">创立时间：</td>
                  <td width="146" align="left"><%=rs_a("f_regtime")%></td>
                  <td width="76" align="left" class="p1">所在城市：</td>
                  <td colspan="2" align="left"><%=rs_a("f_area")%></td>
                </tr>
                <tr>
                  <td height="1" colspan="5" align="left" background="images/line.gif"></td>
                </tr>
                <tr>
                  <td height="25" colspan="5" align="left">名气度：<%=rs_a("f_hit")%>　　成员数：<%=rs_a("f_usercount")%>　　活动数：<%=rs_a("f_clubactive")%>　　留言数：<%=rs_a("f_clubbook")%>　　照片数：<%=rs_a("f_clubphoto")%></td>
                  </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
      </table>
      <br>
	  <%
					dim PerPage
					set rs_c=server.createobject("adodb.recordset")
					if rs_a("f_manage_username")=m_username then
					sql_c="select * from t_club_photo where f_club_id="&rs_a("f_id")&" order by f_regtime desc"
					else
					sql_c="select * from t_club_photo where f_club_id="&rs_a("f_id")&" and f_username='"&m_username&"' order by f_regtime desc"
					end if
					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					
				%>
     <% if rs_a("f_manage_username")<>m_username then %>[<%=m_username%>]会员 (<font color="#FF0000">您</font>)向<% end if %>本子俱乐部总共上传 <FONT 
      color=#ff0000><B><%=Cstr(rs_c.RecordCount)%></B></FONT> 张照片, 共 <FONT color=#ff0000><B><%=Cstr(rs_c.pagecount)%></B></FONT> 
      页，每页 <FONT color=#ff0000><B><%=PerPage%></B></FONT> 张 <BR> 
      <TABLE cellSpacing=1 cellPadding=0 width=580 bgColor=#f2f2f2 border=0>
        <TBODY>
          <TR align=middle bgColor=#f2f2f2> 
            <TD width=25 height=25>&nbsp;</TD>
            <TD width=38>ID号</TD>
            <TD width=259 height=25 bgcolor="f2f2f2">照片说明</TD>
            <TD width=103 height=25 bgcolor="f2f2f2">上传时间</TD>
           <% if rs_a("f_manage_username")=m_username then %><TD width=74 height=25 bgcolor="f2f2f2">上传会员</TD><% end if %>
            <TD width=74 bgcolor="f2f2f2">审核状态</TD>
          </TR>
        <form name="Del" method="Post">
          <%
if not rs_c.eof then
i=0
do while not rs_c.eof
%>
          <TR align=middle bgColor=#ffffff> 
            <TD height=25> <input name='ArticleID' type='checkbox' id="ArticleID" value="<%=rs_c("f_id")%>"> 
            </TD>
            <TD height=25><%=rs_c("f_id")%></TD>
            <TD height=25><div align="left"> &nbsp;<a href="club_photoview.asp?id=<%=rs_a("f_id")%>&p_id=<%=rs_c("f_id")%>" target=_blank><u><% if len(rs_c("f_content"))>20 then %><%=left(rs_c("f_content"),20)%>... 
                <% else %>
                <%=rs_c("f_content")%> 
                <% end if %>
                </U></A></div></TD>
            <TD height=25><%=datevalue(rs_c("f_regtime"))%></TD>
            <% if rs_a("f_manage_username")=m_username then %><TD height=25><A 
            href="club_member.asp?username=<%=rs_c("f_username")%>" 
            target=_blank><U><%=rs_c("f_username")%></U></A> </TD><% end if %>
            <TD height=25>
              <% if rs_c("f_ischeck")=true then%>
              通过审核 
              <%else %>
              <font color="#FF0000">等待审核</font> 
              <% end if %>
            </TD>
          </TR>
          <%
i=i+1
if i >= Perpage then exit do
rs_c.movenext
loop
end if
%>
          <TR align=middle bgColor=f2f2f2> 
            <TD height=25 colSpan=7> <% If currentpage > 1 Then  %> &nbsp;<a href='club_photomanage.asp?id=<%=rs_a("f_id")%>&page=<%=cstr(1)%>'><SPAN style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">9</SPAN></a> 
              &nbsp;<a href='club_photomanage.asp?id=<%=rs_a("f_id")%>&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_photomanage.asp?id=<%=rs_a("f_id")%>&page=<%=n%>'><FONT color=#ff0000><B><%=n%></B></FONT></a> <%
			  next
			 %> <% If currentpage < Rs_c.PageCount Then %> &nbsp;<a href='club_photomanage.asp?id=<%=rs_a("f_id")%>&page=<%=Cstr(currentPage+1)%>'><SPAN  style="FONT-SIZE: 15px; COLOR: #000000; FONT-FAMILY: webdings">8</SPAN></a> 
              &nbsp;<a href='club_photomanage.asp?id=<%=rs_a("f_id")%>&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>
          <TR align=center bgColor=#FFFFFF> 
            <TD height=25 colSpan=7> <input type="button" name="Submit2" value="删除上传照片" onclick="formsub(1)"> 
              <input name="id" type="hidden" id="id" value="<%=rs_a("f_id")%>"> 
            </TD>
          </TR>
        </form></TBODY>
      </TABLE> 
      
      <br>
      <TABLE cellSpacing=1 cellPadding=5 width=580 align=center 
            bgColor=#ececec border=0>
        <FORM name=SignUpF action="club_photomanageadd.asp" method=post enctype="multipart/form-data">
          <TBODY>
            <TR bgColor=#f2f2f2> 
              <TD colSpan=3>　上传本俱乐部的照片（<font color="#FF0000">*</font>为必填项）</TD>
            </TR>
            <TR bgColor=#ffffff> 
              <TD align=right width=96>照片说明：</TD>
              <TD width="430" colSpan=2><textarea name="content" cols="35" rows="3" id="content" autocomplete="off"></textarea> 
                <FONT color=#ff0000><B>*</B></FONT></TD>
            </TR>
         
          <TR bgColor=#ffffff> 
            <TD align=right width=96>上传照片：</TD>
            <TD colSpan=2><input type="file" name="file_up1" size="30">
              <FONT color=#ff0000><B>*</B></FONT></TD>
          </TR>
          <TR bgColor=#ffffff>
            <TD align=right>&nbsp;</TD>
            <TD colSpan=2><font color="#666666">请选择你要上传的照片，照片说明可选。<br>
              可上传的照片类型为 <font color="#FF0000">JPG、GIF</font> 和 <font color="#FF0000">PNG</font>，限制大小 
              400 X 500 像素与 <font color="#FF0000">1 MB</font>以内。<br>
              请不要上传色情、暴力、血腥、骇人或政治相关图片，一经查到，我们将在不作任何通知的情况下注销会员。<br>
              照片说明不支持 HTML 或 UBB 代码。</font></TD>
          </TR>
          <TR align="center" bgColor=#f2f2f2> 
            <TD colSpan=3> <input type="hidden" name="filepath" value="<%=filepath%>"> 
              <INPUT type=submit value="确定上传照片" name=submit>  <% session("f_club_id")=rs_a("f_id")%>
             </TD>
          </TR>
        </FORM>
      </TABLE>
      <br>
    </td>
    <td valign="top" bgcolor="f4f4f4"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/xxclub_02.gif" width="180" height="79"></td>
      </tr>
      <tr>
         <td style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; LINE-HEIGHT: 140%; PADDING-TOP: 10px" height="100"> 
            <MARQUEE onmouseover=this.stop(); onmouseout=this.start(); 
            scrollAmount=1 scrollDelay=50 direction=up width=160 
            height=140>
			<%
			set rs_g=server.createobject("adodb.recordset")
			sql_g="select f_username,f_content,f_regtime from t_club_board where f_club_id="&rs_a("f_id")&" order by f_regtime desc"
			rs_g.open sql_g,conn
			if not rs_g.eof then
			do while not rs_g.eof			
			%>
			<B>时间：</B><%=rs_g("f_regtime")%><BR><B>发布者：</B><A 
            href="club_member.asp?username=<%=rs_g("f_username")%>"><U><%=rs_g("f_username")%></U></A><BR>
            <%=rs_g("f_content")%><BR>
            <FONT color=#666666>--------------------------</FONT>
			<%
			rs_g.movenext
			loop
			end if
			rs_g.close
			set rs_g=nothing
			%>
			</MARQUEE>
		</td>
      </tr>
      <tr>
        <td height="70" align="center"><a href="club_addmember.asp?id=<%=rs_a("f_id")%>" onclick="return confirm('您确定要加入这个子俱乐部吗？')" ><img src="images/xxclub_login.gif" width="136" height="62" border="0"></a></td>
      </tr>
    </table>
      <!--#include file="club_manage.asp" --></td>
  </tr>
</table>
<!--#include file="../Include/Bottom.asp" -->
</body>
</html>
<%
rs_user.close
set rs_user=nothing
rs_a.close
rs_c.close
set rs_c=nothing
set rs_a=nothing
%>
