<!--#include file="../main.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML 
xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>管理中心-这里是所有管理的入口</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK 
href="images/global.css" type=text/css rel=stylesheet><LINK 
href="images/main.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.3790.218" name=GENERATOR><script language="JavaScript">
  function CheckValid()
  {

    var msg="";
	if (document.SignUpForm.xxone_id.value=="") 
	{
		msg="请选择圈圈大类!";
		alert(msg);
	 	document.SignUpForm.xxone_id.focus();
	return false;
	}
		if (document.SignUpForm.xxtwo_id.value=="") 
	{
		msg="请选择圈圈小类!";
		alert(msg);
	 	document.SignUpForm.xxtwo_id.focus();
	return false;
	}
	if (document.SignUpForm.name.value=="") 
	{
		msg="对不起,圈圈名字不可以为空!";
		alert(msg);
	 	document.SignUpForm.name.focus();
	return false;
	}

	if (document.SignUpForm.content.value =="")
	{
		msg="请填写圈圈简介！";
		alert(msg);
	 	document.SignUpForm.content.focus();
	return false;
	}
	if (document.SignUpForm.addone_id.value=="") 
	{
		msg="对不起，所在地大类不能为空";
		alert(msg);
	 	document.SignUpForm.addone_id.focus();
	return false;
	}	
	if (document.SignUpForm.addtwo_id.value=="") 
	{
		msg="对不起，所在地小类不能为空!";
		alert(msg);
	 	document.SignUpForm.addtwo_id.focus();
	return false;
	}  
	if (document.SignUpForm.photo.value=="") 
	{
		msg="对不起，图片不能为空!";
		alert(msg);
	 	document.SignUpForm.photo.focus();
	return false;
	}  
  }
</script>
</HEAD>
<BODY id=main background="../images/bj.gif">
<%
 m_ID = Request.Cookies("aspxnet")("CurUserID")
 m_username= Request.Cookies("aspxnet")("CurUsername")
 m_grade=request.cookies("aspxnet")("curgrade")
dim upload
set upload=new upload_5xSoft
 if Request.ServerVariables("REQUEST_METHOD")="POST" then
photo=upload.form("photo")
xxone=upload.form("xxone_id")
xxtwo=upload.form("xxtwo_id")
m_name=upload.form("name")
m_manage=upload.form("manage")
m_content=upload.form("content")
addone=upload.form("addone_id")
addtwo=upload.form("addtwo_id")
key1=upload.form("key1")

'加入判断，看是否有此会员
sql="select * from T_member where f_username='"&m_username&"'"
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
if  rs.eof then 
Call Msgbox("对不起，圈圈主席会员不存在！",1)
response.end
end if
m_age=int(year(date())-year(rs("f_birthday")))
m_edu=rs("f_edu")
m_realname=rs("f_realname")
m_email=rs("f_email")
m_qq=rs("f_qq")
m_tel=rs("f_tel")
f_userid=rs("F_id")
m_grade=rs("f_grade")
rs.close
set rs=nothing
	m_datenow=now()
	sql1="select * from t_club"
	set rs1=server.createobject("ADODB.Recordset")
     rs1.open sql1,conn,1,3
	 rs1.addnew
	' rs1("f_id")=itime
	 rs1("f_photo")=photo
     rs1("f_name")=m_name
	 rs1("f_regtime")=m_datenow
	 rs1("f_manage_username")=m_username
	 rs1("f_content")=m_content
	 rs1("f_username")=m_username
	 rs1("F_ypaddone")=addone	
	 rs1("F_ypaddtwo")=addtwo	
	 rs1("F_ypxxone")=xxone
	 rs1("F_ypxxtwo")=xxtwo
	 rs1("F_co")="co1"
	 rs1("F_key")=key1
	 rs1("f_usercount")=rs1("f_usercount")+1  
	 rs1.update
	' m_club_id=itime
	' rs1.movenext	 
	 rs1.close
	 set rs1=nothing
	sql1="select f_id from t_club where f_name='"&m_name&"'"
	set rs1=server.createobject("ADODB.Recordset")
	rs1.open sql1,conn
	if not rs1.eof then
	m_club_id=rs1("f_id")
	end if
	rs1.close
	set rs1=nothing
	 '写入圈圈会员表
	set rs1=server.createobject("ADODB.Recordset")
	sql1="select * from t_club_member"
	rs1.open sql1,conn,1,3
	rs1.addnew
	rs1("f_club_id")=m_club_id
	rs1("f_username")=m_username
	rs1("f_user_id")=F_userid
	rs1("F_type")=1
	rs1.update	
	rs1.close
	set rs1=nothing	 
	 set upload=nothing  '删除对象
    url="club_exit.asp"
    response.redirect url 
	end if
%>
<DIV id=wrapper>
<!--#include file="top.asp"-->
<DIV class=row>
<!--#include file="left.asp"-->
<DIV class=right_side>
<DIV class=col id=bulletin>
<DIV class=col_head>
<H3><IMG height=16 alt=a hspace=3 src="images/ico_dots.gif" 
width=20 align=left vspace=3>创建圈子</H3>
<SPAN class=float_right><STRONG><a href="club_add.asp"></a><a href="club_exit.asp">管理圈子</a></STRONG></SPAN><SPAN class=float_right>------</SPAN><SPAN class=float_right><STRONG><a href="club_add.asp">创建圈子</a><a href="club_exit.asp"></a></STRONG></SPAN></DIV>
<DIV class=col_body><P>
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><TABLE width="570" border=1  align=center cellPadding=0 cellSpacing=0 bordercolor="#E6EFFD" >
                    <FORM name=SignUpForm 
              onsubmit="return CheckValid()" 
              action=club_add.asp method=post enctype="multipart/form-data">
                      <TBODY>
                        <TR> 
                          <TD colSpan=3 >　 <span class="STYLE2">创建您的圈圈（*为必填项）</span></TD>
                        </TR>
											   <TR bgColor=#ffffff> 
                        <TD width=142 align=right ><span class="STYLE2">类别：</span></TD>
                        <TD colSpan=2 align="left"> <%
 set rs=server.createobject("ADODB.Recordset")
 sql = "select *  from T_ypxxtwo order by date desc"
rs.open sql,conn,1,1%>
            <script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%count = 0
do while not rs.eof%>
subcat[<%=count%>] = new Array("<%= trim(rs("xxtwo"))%>","<%= trim(rs("xxone_id"))%>","<%= trim(rs("xxtwo_id"))%>");
        <%count = count + 1
        rs.movenext
        loop
        rs.close
       %>
onecount=<%=count%>;

function changelocation(xxone)
    {
    document.SignUpForm .xxtwo_id.length = 0; 

    var xxone_id=xxone_id;
    var i;
    document.SignUpForm .xxtwo_id.options[0] = new Option('请选择小类','');
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == xxone)
            { 
                document.SignUpForm .xxtwo_id.options[document.SignUpForm .xxtwo_id.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }
      </script>
	<table width="100%" height="35" border="0"  cellpadding="0" cellspacing="0">
  <tr>
            <td height="40"><select name="xxone_id" onChange="changelocation(document.SignUpForm .xxone_id.options[document.SignUpForm .xxone_id.selectedIndex].value)">
             <option value="">请选择大类</option>
			  <%
sql="select *  from T_ypxxone order by date desc"
rs.open sql,conn,1,1
while not rs.eof%>
              <option value="<%=rs("xxone_id")%>"><%=rs("xxone")%></option>
              <%rs.movenext
wend
rs.Close()
%>
            </select>
              <select name="xxtwo_id">
			     <option value="">请选择小类</option>
            </select><font color="#FF0000">(给圈子设置类型,属性,主题以方便归类)</font></td>
        </tr>
</table></TD>
                      </TR>
					                        <TR bgColor=#ffffff>
                        <TD width=142 align="right"><span class="STYLE2">区域：</span></TD>
                        <TD colSpan=2 align="left"> <%
 set rs=server.createobject("ADODB.Recordset")
 sql = "select *  from ypaddtwo order by date desc"
rs.open sql,conn,1,1%>
            <script language = "JavaScript">
var onecount1;
onecount1=0;
subcat1 = new Array();
<%count = 0
do while not rs.eof%>
subcat1[<%=count%>] = new Array("<%= trim(rs("addtwo"))%>","<%= trim(rs("addone_id"))%>","<%= trim(rs("addtwo_id"))%>");
        <%count = count + 1
        rs.movenext
        loop
        rs.close
       %>
onecount1=<%=count%>;

function changelocation1(addone)
    {
    document.SignUpForm .addtwo_id.length = 0; 

    var addone_id=addone_id;
    var i;
    document.SignUpForm .addtwo_id.options[0] = new Option('请选择地区(市)','');
    for (i=0;i < onecount1; i++)
        {
            if (subcat1[i][1] == addone)
            { 
                document.SignUpForm .addtwo_id.options[document.SignUpForm .addtwo_id.length] = new Option(subcat1[i][0], subcat1[i][2]);
            }        
        }
        
    }
      </script>
	<table width="100%" height="35" border="0"  cellpadding="0" cellspacing="0">
  <tr>
            <td height="40"><select name="addone_id" onChange="changelocation1(document.SignUpForm .addone_id.options[document.SignUpForm .addone_id.selectedIndex].value)">
             <option value="">请选择省份</option>
			  <%
sql="select *  from ypaddone order by date desc"
rs.open sql,conn,1,1
while not rs.eof%>
              <option value="<%=rs("addone_id")%>"><%=rs("addone")%></option>
              <%rs.movenext
wend
rs.Close()
%>
            </select>
              <select name="addtwo_id">
			     <option value="">请选择城市</option>
            </select><font color="#FF0000">(设置地域可以让圈子更吻合为相关人群)</font></td>
        </tr>
</table></TD>
					                        </TR>
                        <TR bgColor=#ffffff> 
                          <TD width=142 align=right><span class="STYLE2">圈子名称：</span></TD>
                          <TD width="422" colSpan=2 align="left" ><INPUT name=name id="name" size=35 
                  autocomplete="off"> <span class="STYLE2"><FONT color=#ff0000><B>*</B></FONT></span></TD>
                        </TR>
                        <TR bgColor=#ffffff> 
                          <TD width=142 align=right><span class="STYLE2">圈主：</span></TD>
                          <TD colSpan=2 align="left"><INPUT disabled
                  name=manage type=text id="manage" value="<%=m_username%>" size=19 autocomplete="off">
                          <FONT 
                  color=#ff0000>&nbsp;</FONT></TD>
                        </TR>
                      <INPUT type=hidden 码汉
              name=personal_URL>
                      <TR bgColor=#ffffff> 
                        <TD width=142 align=right ><span class="STYLE2">圈子描述：</span></TD>
                        <TD colSpan=2 >
                                              <FONT color=#ff0000><span class="STYLE8"><span class="STYLE2"><B> 
                        <textarea name="content" cols="50" rows="5" id="content"></textarea>
                        *</B><FONT 
                  color=#ff0000>(限800字)</FONT><FONT 
                  color=#000000></FONT></span></span></FONT></TD>
                      </TR>
                      <TR bgColor=#ffffff>
                        <TD align=right ><p class="STYLE2">是否允许</p>
                        <p class="STYLE2">直接加入</TD>
                        <TD colSpan=2 align="left" ><input name="key1" type="radio" value="1" checked>
                          <span class="STYLE2">是</span><font color="#FF0000">（任何网友都可以加入）</font>
                          <input name="key1" type="radio" value="0">
                          <span class="STYLE2">否</span><font color="#FF0000">（需要圈主审核才能加入）</font></TD>
                      </TR>
                      <TR bgColor=#ffffff> 
                        <TD width=142 align=right><span class="STYLE2">圈子形象图片：</span></TD>
                        <TD colSpan=2 align="left"><input name="photo" type="text" id="photo" size="40">
      <input type="button" name="Submit2" value="上传图片" onClick="window.open('../jbw_zgcren2.asp?formname=SignUpForm&editname=photo&uppath=photo&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
                        <span class="STYLE2"><FONT color=#ff0000><B>*增加真实性</B></FONT></span></TD>
                      </TR>

                      <TR align="center"> 
                        <TD colSpan=3>  <INPUT type=submit value="确 定" name=submit> <INPUT type=reset value="取 消" name=reset></TD>
                      </TR>
                    </FORM>
					
                      <TR align="left" >
                        <TD height="25" colSpan=3>&nbsp; </TD>
                  </TR>
				  <TR align="left" bgcolor="#EBEBEB">
                        <TD colSpan=3> <font color="#FF0000">提醒：</font> 用户不得建立包含破坏宪法和法律、破坏民族团结、捏造或者歪曲事实、宣扬封建迷信、淫秽、色情，及其他违反宪法和法律行政法规的圈子，同时也不要建立任何情色类乃至一夜情之类的圈子，无论圈子封闭与否！ <br>
否则不但该圈子将被删除，而且您在圈网的人际关系网络以及相关的留言图片乃至帐户都将被删除。 <br>
用户因为违反规定而触犯中华人民共和国法律的，责任自负，本站不承担任何责任。 请大家一起努力维护圈网一个健康阳光的空间! </TD>
                  </TR>
    </TABLE>
</td>
    </tr>
  </table> 
  </P>
</DIV>
</DIV>
</DIV>
</DIV>
<!--#include file="bottom.asp"-->
</DIV></BODY></HTML>
