<!--#include file="../conn.asp"-->
<!--#include file="inc/admin_config.asp"-->
<%
If Cint(AdminGroup(3))=1   or Cint(Request.Cookies("IsSuper"))=1 then
else
Response.Redirect("Default.asp")
Response.End()
End If



%>
<!--#include file="inc/top.asp"-->
<%
select case request("action")
case "edit"
call edit()
case else
call normal()
end select
sub normal()
dim wt_sortId,strFileName
wt_sortId=request.QueryString("wt_sortId")
strFileName="about.asp?wt_sortId=" & wt_sortId
pageno=20
%>
<table border="0" align="center" cellpadding="3" cellspacing="1" class="tablecolor">
  <tr> 
    <td height="25" align="center" class="banner">关于我们管理</td>
    <td width="20%" align="center" class="banner"><a href="about_add.asp">添加数据</a></td>
  </tr>
</table>
<%
dim rs
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from wd_about   order by wt_grade asc,wt_id desc",conn,1,1
rscount=rs.recordcount
%>
<table border="0" align="center" cellpadding="3" cellspacing="1" class="tablecolor">
  <%
   if  rscount<1 then
  %>
  <tr> 
    <td height="25" colspan="5" align="center" class="tablebody">该栏目还没有数据</td>
  </tr>
<%
else
call showsql(pageno)
 %>
 <tr> 
    <td align="center" class="tablebody">排序</td>
    <td align="center" class="tablebody">标题</td>
    <td width="25%" align="center" class="tablebody">加入时间</td>
 	<td width="10%" align="center" class="tablebody">修改</td>
    <td width="10%" align="center" class="tablebody">删除</td>
  </tr><form name="form2" method="post" action="?action=edit" onSubmit="return checkf(form2)">
  <%
rs.move(rsno)
for i=1 to loopno
  %>
   <tr> 
    <td align="center" class="tablebody"> <%=rs("wt_grade")%> </td>
    <td align="center" class="tablebody"> <%=rs("wt_title")%> </td>
    <td align="center" class="tablebody"><%=rs("wt_addtime")%></td>
 	<td align="center" class="tablebody"><a href="about_add.asp?id=<%=rs("wt_id")%> ">修改</a></td>
    <td align="center" class="tablebody">
	<%if rs("wt_id") >7 then
	%><input name="id" type="checkbox" id="id" value="<%=rs("wt_id")%>">
   </tr><%
   end if
  rs.movenext
  next
  %>
  <tr>
    <td height="25" colspan="5" align="right"  class="tablebody"><INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>
      &nbsp;全选
        <input name="Submit" type="submit" id="Submit" value="删除" onclick="SetSubmitImgId('realdel');">
        &nbsp;</td>
  </tr>
  </form>
  <tr> 
      <td colspan="5" align="right"  class="tablebody"><%call showpage(strFileName,rscount,pageno,false,true,"条信息")%></td>
  </tr>
  <% end if%>
</table>
<%
end sub
sub edit()
dim id,sql
if request("id")="" then
response.Write("<script>alert('参数错误！');history.back(-1)</script>")
response.End()
end if
select case request("submit")
case "删除"
sql="delete from wd_about where wt_id="
case else
response.Write("<script>alert('参数错误！');history.back(-1)</script>")
response.End()
end select
for each id in request("id")
conn.execute(sql&id)
next
dim ip
ip=Request.ServerVariables("HTTP_REFERER")
response.Write("<script>alert('操作成功！');location='"&ip&"'</script>")
response.End()
end sub
%>
<%CloseConn%><!--#include file="inc/end.asp"-->
