<!--#include file="../conn/conn.asp"-->
<!--#include file="../conn/nosql.asp"-->
<!--#include file="../conn/config.asp"-->
<!--#include file="../conn/page.asp"-->
<%if Not ChkPosturl then response.redirect ("login.asp")
if session("adminname")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if request("action")="gd" then
if isChkInteger(request("id")) then
id=request("id")
else
Response.Redirect ("../../index.asp")
end if 
if id="" then 
response.write "<script language='javascript'>"
response.write "alert('非法操作！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
if nosql(request("gd"))=1 then
conn.execute("update [snsn_help] set gd=1 where id="&id&"")
elseif nosql(request("gd"))=0 then
conn.execute("update [snsn_help] set gd=0 where id="&id&"")
else
response.write "<script language='javascript'>"
response.write "alert('非法操作！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
response.write "<script language='javascript'>"
response.write "alert('操作成功，正在返回！');"
response.write"this.location.href='help.asp';</SCRIPT>"
response.end
end if
if request("action")="del" then
if isChkInteger(request("id")) then
id=request("id")
else
Response.Redirect ("../../index.asp")
end if 
lx=nosql(request("lx"))
if id="" then 
response.write "<script language='javascript'>"
response.write "alert('非法操作！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end
end if
conn.execute "delete from snsn_help where id in ("&id&")"
response.write "<script language='javascript'>"
response.write "alert('操作成功，正在返回！');"
if lx="gg" then
response.write"this.location.href='help.asp?action=gg';</SCRIPT>"
else
response.write"this.location.href='help.asp';</SCRIPT>"
end if
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../css.css" REL="stylesheet" TYPE="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td width="30%" style="font-size:14px;color:#ffffff">&nbsp;<strong><font color="#000000">帮助管理</font></strong></td>
    <td width="70%" align="right">&nbsp;</td>
  </tr>
</table>
<table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><%if nosql(request("action"))="gg" then%>
      <a href="help_add.asp">添加公告</a>
      <%else%><a href="help.asp?class=&#25152;&#26377;&#20998;&#31867;" target=forum>所有分类</a> <a href="help.asp?class=我的帐户" target=forum>我的帐户</a> <a href="help.asp?class=我的家园" target=forum>我的家园</a> <a href="help.asp?class=迷你主页" target=forum>迷你主页</a> <a href="help.asp?class=交友中心" target=forum>交友中心</a> <a href="help.asp?class=网友相册" target=forum>网友相册</a> <a href="help.asp?class=网友日记" target=forum>网友日记</a> <a href="help.asp?class=网友论坛">网友论坛</a> <a href="help.asp?class=网友文章" target=forum>网友文章</a> <a href="help.asp?class=其它帮助" target=forum>其它帮助</a><%end if%></td>
  </tr>
</table>

<TABLE width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#D7EBFF" bordercolordark="#D7EBFF" bgcolor="#BBD7FF" 退定文件夹中。\	???毎??style="border-collapse: collapse">
     <tr bgcolor="#e8f4ff">  <TD height="25" bgcolor="#e8f4ff">&nbsp;主题</td>
       <TD width="60" bgcolor="#e8f4ff">&nbsp;回复</td>
	   <TD width="100">&nbsp;提问人</td>
	   <TD width="160">&nbsp;时间</td>
	   <TD width="50">&nbsp;浏览</td>
       <TD width="50">&nbsp;固顶</td>
       <%
set rs=server.createobject("adodb.recordset") 
if nosql(request("action"))="gg" then
				    sql="select * from snsn_help  where class='网站公告' order by gd desc,id desc"
else
				if nosql(request("class"))="所有分类" then
                    sql="select * from snsn_help  where class<>'网站公告' order by gd desc,id desc"
			    elseif nosql(request("class"))="我的帐户" then 
				    sql="select * from snsn_help  where  class='我的帐户' order by gd desc,id desc"
				elseif nosql(request("class"))="迷你主页" then 
				    sql="select * from snsn_help  where  class='迷你主页' order by gd desc,id desc"
				elseif nosql(request("class"))="交友中心" then 
				    sql="select * from snsn_help  where class='交友中心' order by gd desc,id desc"
				elseif nosql(request("class"))="网友相册" then 
				    sql="select * from snsn_help  where  class='网友相册' order by gd desc,id desc"
				elseif nosql(request("class"))="网友日记" then 
				    sql="select * from snsn_help  where class='网友日记' order by gd desc,id desc"
				elseif nosql(request("class"))="网友论坛" then 
				    sql="select * from snsn_help  where class='网友论坛' order by gd desc,id desc"
				elseif nosql(request("class"))="网友文章" then
				    sql="select * from snsn_help  where class='网友文章' order by gd desc,id desc"
				elseif nosql(request("class"))="其它帮助" then 
				    sql="select * from snsn_help  where class='其它帮助' order by gd desc,id desc"
				else
				    sql="select * from snsn_help  where class<>'网站公告' order by gd desc,id desc"
				end if 
				end if
rs.open sql,conn,1,1 
if rs.eof or rs.bof then 
response.write "<tr><td bgcolor=#FFFFFF colSpan=6><p align='center'>对不起，没有您要查询的信息</p></td></tr>" 
else
rs.PageSize =20 '每页记录条数
		iCount=rs.RecordCount '记录总数
		iPageSize=rs.PageSize
    	maxpage=rs.PageCount 
    	page=request("page")
    	per_page=rs.PageSize
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	For i=1 To x%> <%do while not rs.eof%>
  <TR bgcolor="#FFFFFF" onMouseOver='JavaScript:this.style.backgroundColor="#FCFBF3"' onMouseOut='JavaScript:this.style.backgroundColor=""' height="20">
    <TD height="22"><span class="tmpstr1">&nbsp;</span><%if request("action")="gg" then%><a href="help_add.asp?action=save&id=<%=rs("id")%>"><%else%><a href="help_s.asp?id=<%=rs("id")%>"><%end if%><%=rs("title")%></a>[<%if rs("xs")=0 then%>显示<%else%>不显示<%end if%>]
        <%if rs("adddate")>=date()-1 then%>
        <span class="tmpstr1"><img src="/img/new.gif" width="30" height="10"></span>
    <%end if%> 
    <%if nosql(request("action"))="gg" then%><a href="?action=del&id=<%=rs("id")%>&lx=gg"><%else%><a href="?action=del&id=<%=rs("id")%>"><%end if%>删</a></td>
    <TD bgcolor="#FFFFFF">&nbsp;<%if (rs("reply")="") or isNull(rs("reply")) then%>未回复<%else%>
    <span class="style1">已回复</span><%end if%></td>
    <TD>&nbsp;<%=rs("tname")%></td>
    <TD>&nbsp;<%=rs("adddate")%></td>
    <TD>&nbsp;<%=rs("hits")%></td>
    <TD>&nbsp;
    <%if rs("gd")=1 then%>
    <a href="?action=gd&id=<%=rs("id")%>&gd=0">是</a>    <%else%>
    <a href="?action=gd&id=<%=rs("id")%>&gd=1">否</a>
    <%end if%></td>
  </TR>
  <%
rs.movenext
loop

%><%
		  icolor=icolor+1
if icolor>1 then icolor=0

next%>
</TABLE>
<TABLE width="90%" 
        border=0 align="center" cellPadding=4 cellSpacing=0>
  <TBODY>
    <TR>
      <TD class=M noWrap align=middle><%
					call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>",per_page)
				  %></TD>
    </TR>
  </TBODY>
</TABLE>
<%

end if%>
</body>
</html>
