<!--#include file="main.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>圈网_经商网</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
.STYLE2 {font-size: 9pt}
.STYLE2 {font-size: 10pt}
-->
</style>
</head>
<body background="images/bj.gif">
<!--#include file="top.asp" -->
<table class="border2" cellspacing="0" cellpadding="0" width="780" align="center" 
bgcolor="white" border="0">
  <tbody>
    
    <tr align="left" height="40">
      <td width="2%"></td>
      <td width="96%" colspan="3"><table cellspacing="0" cellpadding="0" width="100%" border="0">
        <tbody>
          <tr>
            <td height="5"></td>
          </tr>
          <tr>
            <td bgcolor="#a6d688" colspan="3" height="1"></td>
          </tr>
          <tr align="left" height="20">
            <td width="1" bgcolor="#a6d688"></td>
            <td bgcolor="#e6e6e6">&nbsp;导航：&nbsp;<a class="blue3ln" 
            href="index.asp">网站首页</a>&gt;&gt;<a class="blue3ln" 
            href="user/">我的管理中心</a>&gt;&gt;圈志分类 </td>
            <td width="1" bgcolor="#a6d688"></td>
          </tr>
          <tr>
            <td bgcolor="#a6d688" colspan="3" height="1"></td>
          </tr>
          <tr>
            <td height="5"></td>
          </tr>
        </tbody>
      </table></td>
      <td width="2%"></td>
    </tr>
  </tbody>
</table>
<table class="border3" cellspacing="0" cellpadding="0" width="780" align="center" 
bgcolor="white" border="0">
  <tbody>
    <tr>
      <td width="2%"></td>
      <td width="98%" align="left" valign="top" bordercolor="#ffffff">
<%if request("action")="save" then
userid=request("userid")
bokesort=trim(request("bokesort"))
club=request("club")
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from boke_sort_club where user_id="&userid
rs.open sql,conn,1,3
rs.addnew
rs("bokesort")=bokesort
rs("club")=club
rs("user_id")=userid
rs.update
rs.close
set rs=nothing
response.redirect"blog_sort_add.asp?userid="&request("userid")&"&club="&request("club")&"&username="&request("username")&""

'==============================================
elseif request("action")="edit" then
userid=request("userid")
bokesort=trim(request("bokesort"))
club=request.form("club")
if bokesort="" then
errstyle="·对不起，分类不能为空"
scripterr
end if
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from boke_sort_club where id="&request("id")&" and user_id="&request("userid")
rs.open sql,conn,1,3
rs("club")=club
rs("bokesort")=bokesort
rs.update
rs.close
set rs=nothing
response.redirect"blog_sort_add.asp?userid="&request("userid")&"&club="&request("club")&"&username="&request("username")&""

elseif request("action")="px" then
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from boke_sort_club where id="&request("id")&" and user_id="&request("userid")
rs.open sql,conn,1,3
rs("date")=now()
rs.update
rs.close
set rs=nothing
response.redirect"blog_sort_add.asp?userid="&request("userid")&"&club="&request("club")&"&username="&request("username")&""
elseif request("action")="del" then

conn.execute("delete From boke_sort_club Where id="&request("id")&" and user_id="&request("userid")&"")

set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from boke_club where boke_sortid="&request("id")
rs.open sql,conn,1,1
do while not rs.eof
conn.execute("delete From boke_club Where id="&rs("id")&" and user_id="&request("userid")&"")
rs.movenext
loop
rs.close
set rs=nothing
response.redirect"blog_sort_add.asp?userid="&request("userid")&"&club="&request("club")&"&username="&request("username")&""
end if
%>
<%
if session("goname")="" then
response.Redirect("login.asp")
end if
set rs2=Server.CreateObject("Adodb.Recordset")
rs2.Open "Select *  from T_club_member where F_username='"&session("goname")&"' and F_club_id="&request("club")&" and F_type=1",conn
if rs2.EOF then
Response.Write "<script>alert('用户出错，下面是产生错误的可能原因：\n\n·对不起，您不是管理员!');history.go(-1);</Script>"
Response.End   
end if
%>
	  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td width="831"><!--####################################-->
            <table width="90%" border="0" cellspacing="1" cellpadding="0">
              
              <tr bgcolor="#e6e6e6">
                <td class="con2" align="left" height="30"><b>添加圈志类别</b> </td>
              </tr>
              <tr>
                <td height=25><!--======-->
                    <table width="750" border="0" align=center cellpadding="0" cellspacing="0">
                      <form name="addform" method="post" action="blog_sort_add.asp?action=save" onSubmit="return checkdata()">
					  <input name="userid" type="hidden" value="<%=request("userid")%>">
	 <input name="club" type="hidden" value="<%=request("club")%>">
	 <input name="username" type="hidden" value="<%=request("username")%>">
                        <tr>
                          <td width="14%" align=center height=30>&nbsp;</td>
                          <td width="59%"><input name="bokesort" type="text" id="bokesort" size="40" maxlength="20"></td>
                          <td width="15%">&nbsp;</td>
                          <td width="12%"><input type="submit" name="Submit" value="添 加" class="input1"></td>
                        </tr>
                      </form>
                    </table>
                <!--======-->                </td>
              </tr>
            </table>
          <br>
            <table width="88%" border="0" cellspacing="1" cellpadding="0">
              <tr bgcolor="#e6e6e6">
                <td class="con2" align="left" height="30"><b>管理圈志类别</b> </td>
              </tr>
              <tr>
                <td height=25><!--======-->
                    <table width="750" border="0" align=center cellpadding="0" cellspacing="0">
                      <%set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from boke_sort_club where club="&request("club")&" order by date desc"
rs.open sql,conn,1,1
if rs.eof then
response.write"<tr align=center><td height=30>暂无分类</td></tr>"
else
do while not rs.eof%>
                      <form name="addform1" method="post" action="blog_sort_add.asp?action=edit">
					  <input name="userid" type="hidden" value="<%=request("userid")%>">
	 <input name="club" type="hidden" value="<%=request("club")%>">
	 <input name="username" type="hidden" value="<%=request("username")%>">
                        <input name="id" type="hidden" value="<%=rs("id")%>">
                        <tr align=center>
                          <td width="14%">&nbsp;</td>
                          <td width="54%" height=30 align="left"><input name="bokesort" type="text" id="bokesort" value="<%=rs("bokesort")%>" size="40" maxlength="20" /></td>
                          <td width="32%"><input type="submit" name="Submit" value="修 改" class="input1">
                            　
                            <span class="STYLE2"><a href=blog_sort_add.asp?id=<%=rs("id")%>&action=px&userid=<%=request("userid")%>&club=<%=request("club")%>&username=<%=request("username")%>>排序</a>　<a href=blog_sort_add.asp?id=<%=rs("id")%>&action=del&userid=<%=request("userid")%>&club=<%=request("club")%>&username=<%=request("username")%>>删除</a></span></td>
                        </tr>
                      </form>
                      <%rs.movenext
loop
end if
rs.close
set rs=nothing%>
                    </table>
                <!--======-->                </td>
              </tr>
            </table>
          <!--####################################-->
        </td>
      </tr>
      <tr>
        <td height=25></td>
      </tr>
    </table></td>
      <td width="0%"></td>
    </tr>
  </tbody>
</table>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
   <td height="23" colspan="2" align="center">
<DIV id=sub_nav>
<%set rs=server.createobject("adodb.recordset")
sql="select * from T_ypxxone"
rs.open sql,conn,1,1
n=0
do while not rs.eof
n=n+1%><A href="group.asp?id=<%=rs("xxone_id")%>"><%=rs("xxone")%></A> | <%
rs.movenext
loop
rs.close%></DIV></td>
  </tr>
</table>
<!--#include file="bottom.asp" -->
</body>
</html>
