<!--#include file="../fy_inc/fy.User.asp"-->
  <% 
    dim  UserHS,ClassID,sh,shset
	ConnectionDatabase 
	ClassID=Rsql(fycms.G("ClassID"))
	Set UserHS = New ACT_User
	IF Cbool(UserHS.UserLoginChecked)=false then
	  echo "<script>top.location.href ='login.asp' ;</script>"
	  Response.end
	End If	
	sh=ChkNumeric(fycms.s("sh"))
	if sh="999" then shset=" delif=1  " else shset=" isAccept="&sh&" "

%><!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>
<script language="JavaScript" src="main.js"></script>
 <link href="images/css.css" rel="stylesheet" type="text/css" />
 </head>
<body style="background-color:#fff">
<div id="head">
  <div id="logo"><a href="index.asp" alt=""><img src="images/logo_member.gif" alt="fycms"></a></div><div id="banner"></div>
</div>
<div id="membermenu">
<!--#include file="menu.asp"-->
</div>
 
<div id="main">
  <div id="left">
    <div id="treemenu">
      <h5>信息管理</h5>
      <ul>
        <li><a href="fy.Add.asp?action=add&ClassID=<%= ClassID %>">发布信息</a></li>
        <li><a href="fy.manage.asp?sh=0">审核通过</a></li>
        <li><a href="fy.manage.asp?sh=1">草稿</a></li>
        <li><a href="fy.manage.asp?sh=2">待审核</a></li>
        <li><a href="fy.manage.asp?sh=3">被退稿</a></li>
        <li><a href="fy.manage.asp?sh=999">已删除</a></li>
      </ul>
    </div>
    <ol>
    <li class="local"><a href="<%= fycms.Domain%>">返回网站首页</a></li>
    <li class="exit"><a href="Checklogin.asp?Action=LoginOut">退出登录</a></li>
    </ol>
  </div>
  <div id="right">

<p id="position"><strong>当前位置：</strong><a href="index.asp">会员中心</a><a href="fy.manage.asp">信息管理</a></p>
<div class="clear"></div>
<div class="clear"></div>


<%=ClassPurview(1)&"</table>"%>


  </div>
</div>
  <%Function ClassPurview(ModeID) %>
  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table_list">
	
		<tr class="bg_tr">
			<td width="50%" height="25" class="bg_tr">
				<div align="center">栏目名称</div>			</td>
			<td width="10%" class="bg_tr">
				<div align="center">信息数</div>			</td>
		  <td width="20%"  align="center" class="bg_tr">管理操作</td>
	    </tr>
		<%
	Dim Article_rs,Article_rs_1,ChangesLink
	Set Article_rs = Server.CreateObject("adodb.recordset")
	Article_rs.Open "Select Orderid,id,ClassID,ClassName,enname,ClassEName,actlink,ismenu,tg,TGGroupID from Class_fy where rootid=0     and actlink=1 Order by Orderid asc,ID asc",Conn,1,1
	if Article_rs.eof then
	   echo"<TR  ><TD colspan=""5""   height=""40"">没有记录</TD></TR>"
	else
	
	do while not Article_rs.eof
			if Article_rs.eof Then exit do
	%>
		<tr >
			<td height="22" >
            
          	<% 
			echo  "<img src=""../fy_inc/share/nolines_minus.gif""></img><a href=""fy.List.asp?ClassID="&Article_rs("classid")&"&sh="&sh&""">"&Article_rs("ClassName")&"</a>"
		Set Article_rs_1 = server.CreateObject("adodb.recordset")
		%>  
            
            </td>
			<td height="22" >
			
            <div align="center">
			<%= fycms.actexe("select count(id) from  "&fycms.ACT_C(ChkNumeric(fycms.ACT_L(Article_rs("classid"),10)),2)&" where    classid="&Article_rs("classid")&" and "&shset&" and articleinput='"& UserHS.UserName &"' ")(0) 
			%></div>
            
            </td>
				<td  align="center">
				<%
		IF InStr(Article_rs("TGGroupID"),UserHS.GroupID)=0 Then		
			
				%>
<span disabled="disabled">发布</span>  | <span disabled="disabled">管理</span>		<%	 Else
			 
				%>
<a href='fy.Add.asp?action=add&ClassID=<%= Article_rs("classid") %>'>发布</a>  | <a href='fy.List.asp?ClassID=<%= Article_rs("classid") %>&sh=<%= sh %>'>管理</a>			 
	<%	End IF	
				
				
				%>
</td>
		</tr>
		<%
		echo(GetClassValue(Article_rs("ClassID"),""))
		Article_rs.MoveNext
	Loop
	Article_rs.close
	End if
	End Function 
	Public Function GetClassValue(TypeID,CompatStr)  
		Dim tg,ismenu,ClassRs,TempStr 
		Set ClassRs = Conn.Execute("Select id,ismenu,orderid,ClassName,tg,ClassEName,enname,ClassID,actlink,TGGroupID from Class_fy where rootid=" & TypeID & "    and actlink=1 order by Orderid desc,id desc" )
		TempStr =CompatStr & "<img src=""../fy_inc/share/joinbottom.gif""></img>"
		do while Not ClassRs.Eof
	  		GetClassValue = GetClassValue & "<tr >"&Chr(13) & Chr(10)
			GetClassValue = GetClassValue & "<td >"& TempStr &"<Img src=""../fy_inc/share/nolines_minus.gif""></img><a href=""fy.List.asp?ClassID="&ClassRs("classid")&"&sh="&sh&""">"&ClassRs("ClassName")&"</a> </td>" & Chr(13) & Chr(10) 
			GetClassValue = GetClassValue & "<td  align=""center"">"& fycms.actexe("select count(id) from  "&fycms.ACT_C(ChkNumeric(fycms.ACT_L(ClassRs("classid"),10)),2)&" where    classid="&ClassRs("classid")&" and   "&shset&"  and articleinput='"& UserHS.UserName &"' ")(0)&"</td>" & Chr(13) & Chr(10)
 			GetClassValue = GetClassValue & "<td  align=""center"">"& vbCrLf
			IF InStr(ClassRs("TGGroupID"),UserHS.GroupID)=0 Then	
				GetClassValue = GetClassValue & "<span disabled=""disabled"">发布</span>  | "&vbCrLf
				GetClassValue = GetClassValue & "<span disabled=""disabled"">管理</span>"&vbCrLf
			Else 
 			GetClassValue = GetClassValue & "<a href='fy.Add.asp?action=add&ClassID="& ClassRs("classid")&"'>发布</a>  | "&vbCrLf
 			GetClassValue = GetClassValue & "<a href='fy.List.asp?ClassID="& ClassRs("classid")&"&sh="&sh&"'>管理</a>"&vbCrLf
			End If 
			GetClassValue = GetClassValue & "</td>" & Chr(13) & Chr(10)
			GetClassValue = GetClassValue & "</tr>" & Chr(13) & Chr(10)
			GetClassValue = GetClassValue &GetClassValue(ClassRs("ClassID"),TempStr)
			ClassRs.MoveNext
		loop
		ClassRs.Close
		Set ClassRs = Nothing
	End Function
 %> 
<!--#include file="foot.asp"-->
</body>
</html>