📄 admin_list.asp
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--#include file="connsf.asp" -->
<!--#include file="md5.inc" -->
<!--#include file="checkstr.asp" -->
<!--#include file="config.asp" -->
<%'检验用户
user=checkstr(session("user"))
pass1=ucase(md5(session("pass")))
str="select 姓名,用户类别 from user_teacher where 用户名='"&user&"' and 密码='"&pass1&"'"
set rs=conn.execute(str)
if rs.eof or rs("用户类别")<>"管理员" then
response.redirect("user_login.asp")
else
user_name=rs("姓名")
user_class=rs("用户类别")
end if
rs.close
%>
<%doing=Trim(Request.QueryString("doing"))%>
<%'删除信息
if doing="delete" then
dele_id=cint(Request.QueryString("dele_id"))
str="select 跟贴数,附件数,附件 from woa where id="&dele_id&" and 主题=1"
set rs=conn.execute(str)
if rs("跟贴数")>0 then '先删除该信息下的留言
str="select 附件数,附件 from woa where 跟贴主题="&dele_id&""
set rs1=conn.execute(str)
do while not rs1.eof
if rs1("附件数")>0 then
fj_file=rs1("附件")
do while len(fj_file)>1
del_file=mid(fj_file,1,instr(fj_file,"|")-1)
fj_file=mid(fj_file,instr(fj_file,"|")+1)
del_file=Server.MapPath(del_file)
Set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.FileExists(del_file) then
fs.DeleteFile del_file,True
end if
loop
end if
rs1.movenext
loop
rs1.close
str="delete from woa where 跟贴主题="&dele_id&""
conn.execute(str)
end if
if rs("附件数")>0 then '删除主题下的附件
fj_file=rs("附件")
do while len(fj_file)>1
del_file=mid(fj_file,1,instr(fj_file,"|")-1)
fj_file=mid(fj_file,instr(fj_file,"|")+1)
del_file=Server.MapPath(del_file)
Set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.FileExists(del_file) then
fs.DeleteFile del_file,True
end if
loop
end if
rs.close
str="delete from woa where id="&dele_id&" and 发文者='"&user_name&"' and 主题=1"
conn.execute(str)
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<!--#include file="css.css" -->
</head>
<body topmargin="1" oncontextmenu="return false">
<div align="center">
<table width="760" border="0" cellpadding="0" cellspacing="0" class="tabletblg">
<tr>
<td><!--#include file="top.asp" --></td>
</tr>
</table>
<table width="760" border="0" cellpadding="0" cellspacing="0" class="tablelrb">
<tr>
<td class="fontsize04"> </td>
</tr>
</table>
<table width="760" border="0" cellpadding="0" cellspacing="0" class="tablelrb">
<tr>
<td height="30" bgcolor="#6699FF">
<!--#include file="admin_menu.asp" -->
</td>
</tr>
</table>
<table width="760" border="0" cellpadding="0" cellspacing="0" class="tablelrb">
<tr>
<td class="fontsize04"> </td>
</tr>
</table>
<table width="760" border="0" cellpadding="0" cellspacing="0" class="tablelrb">
<tr>
<td height="30" bgcolor="#6699FF" class="fontsize14"> <%=user_name%>,你好!欢迎使用留溪网上传文系统。 以下是你收到的信息和你发送的信息。</td>
</tr>
</table>
<table width="760" border="0" cellpadding="0" cellspacing="0" class="tablelrb">
<tr>
<td class="fontsize04"> </td>
</tr>
</table>
<table width="760" border="0" cellpadding="0" cellspacing="0" class="tablelrb">
<tr>
<td bgcolor="#6699FF">
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="fontsize10"> </td>
</tr>
</table>
<table width="740" border="1" align="center" cellpadding="2" cellspacing="0" borderColorLight="#000000" borderColorDark="#ffffff">
<tr class="fontsize12">
<td bgcolor="#99CCFF"> <div align="center"><strong>状态</strong></div></td>
<td height="30" bgcolor="#99CCFF"> <div align="center"><strong>主 题 </strong>(点击主题文字可浏览信息内容)</div></td>
<td bgcolor="#99CCFF"> <div align="center"><strong>发送人</strong></div></td>
<td bgcolor="#99CCFF"> <div align="center"><strong>日期</strong></div></td>
<td bgcolor="#99CCFF"> <div align="center"><strong>时间</strong></div></td>
<td bgcolor="#99CCFF"> <div align="center"><strong>点击</strong></div></td>
<td bgcolor="#99CCFF"> <div align="center"><strong>回复</strong></div></td>
<td bgcolor="#99CCFF"> <div align="center"><strong>操作</strong></div></td>
</tr>
<%'确定显示的信息
user_name1="|"&user_name&"|"
str="select * from woa where 主题=1 order by 置顶 desc,发文日期 desc,发文时间 desc"
rs.open str,conn,3,2
rs.pagesize=msgpagesize
%>
<% '确定显示的页码
pageno=request("pageno")
if isnumeric(pageno)=false then pageno=1 end if
pageno=cint(pageno)
if pageno="" or pageno<=0 then
pageno=1
end if
if pageno>rs.pagecount then
pageno=rs.pagecount
end if
%>
<%if rs.eof then%>
<tr class="fontsize12">
<td height="30" colspan="8" bgcolor="#99CCFF"><div align="center" class="fontsize14"><font color="#FF0000">没有任何信息。</font></div></td>
</tr>
<%else%>
<%rs.absolutepage=pageno
for n=1 to rs.pagesize%>
<tr class="fontsize12">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -