📄 admin_disp.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"))
disp_id=cint(Request.QueryString("disp_id"))
pageno=cint(Request.QueryString("pageno"))
back=Trim(Request.QueryString("back"))
m=request.querystring("m")
n=1+m
%>
<%'加入留言
if user_class="管理员" and doing="liuyan" then
ly=Request.Form("ly")
ly=checkstr(ly)
if ly="" then ly=" "
fj_name=session("fj_name")
session("fj_name")=empty
fj_sm=session("fj_sm")
session("fj_sm")=empty
if fj_name="" then fj_name=" "
if fj_sm="" then fj_sm=" "
fj_count=int(len(fj_name)/24)
sql="select * from woa"
rs.open sql,conn,2,3
rs.addnew
rs("主题")=0
rs("跟贴主题")=disp_id
rs("内容")=ly
rs("发文日期")=date
rs("发文时间")=time
rs("发文者")=user_name
rs("接收者")="此为留言"
rs("已看者")="|"
rs("已清除者")="|"
rs("附件数")=fj_count
rs("附件说明")=fj_sm
rs("附件")=fj_name
rs("所有人")=2
rs("置顶")=0
rs("成批删除")=1
rs("清除")=1
rs.update
rs.close
str="update woa set 跟贴数=跟贴数+1 where id="&disp_id&""
conn.execute(str)
end if
%>
<%'删除留言
if user_class="管理员" and doing="delely" then
dele_id=cint(Request.QueryString("dele_id"))
str="select 附件 from woa where id="&dele_id&""
set rs=conn.execute(str)
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
rs.close
str="delete from woa where id="&dele_id&" and 主题=0 and 跟贴主题="&disp_id&""
conn.execute(str)
str="update woa set 跟贴数=跟贴数-1 where id="&disp_id&""
conn.execute(str)
end if
%>
<%'删除信息
if user_class="管理员" and doing="delemsg" then
str="select 跟贴数,附件数,附件 from woa where id="&disp_id&""
set rs=conn.execute(str)
if rs("跟贴数")>0 then '先删除该信息下的留言
str="select 附件数,附件 from woa where 跟贴主题="&disp_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 跟贴主题="&disp_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="&disp_id&" and 主题=1"
conn.execute(str)
response.redirect("admin_list.asp")
end if
%>
<%'信息置顶
if doing="top" and user_class="管理员" then
str="update woa set 置顶=1 where id="&disp_id&""
conn.execute(str)
end if
%>
<%'取消置顶
if doing="nottop" and user_class="管理员" then
str="update woa set 置顶=0 where id="&disp_id&""
conn.execute(str)
end if
%>
<%'设置不能批量删除
if doing="delallnot" and user_class="管理员" then
str="update woa set 成批删除=0 where id="&disp_id&""
conn.execute(str)
end if
%>
<%'设置能批量删除
if doing="deleallyes" and user_class="管理员" then
str="update woa set 成批删除=1 where id="&disp_id&""
conn.execute(str)
end if
%>
<%'设置不能清除
if doing="clearnot" and user_class="管理员" then
str="update woa set 清除=0 where id="&disp_id&""
conn.execute(str)
end if
%>
<%'设置能清除
if doing="clearyes" and user_class="管理员" then
str="update woa set 清除=1 where id="&disp_id&""
conn.execute(str)
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>显示信息</title>
<!--#include file="css.css" -->
<SCRIPT>
// Begin upload1
function upload1(upload1)
{
url ='upload1.asp';
window.open(url,upload1,"width=520,height=180,status=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}
// End adduser-->
</script>
</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 bgcolor="#6699FF">
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="fontsize10"> </td>
</tr>
</table>
<%str="select * from woa where id="&disp_id&""
set rs=conn.execute(str)%>
<table width="741" border="1" align="center" cellpadding="2" cellspacing="0" borderColorLight="#000000" borderColorDark="#ffffff" bgcolor="#99CCFF">
<tr>
<td width="130" height="30"> <div align="center" class="fontsize14"><strong>主 题</strong></div></td>
<td class="fontsize14h20"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="94%" class="fontsize14h20"> <%=rs("标题")%> </td>
<td width="6%"><INPUT name="button" type=button class=inputbox onclick=javascript:history.go(-<%=n%>) value=返回></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="130" valign="top" class="fontsize12h20"> <table width="125" border="0" cellspacing="0" cellpadding="2">
<tr>
<td height="20" class="fontsize12h20">发 文 者:<a href=serch.asp?keyword=<%=rs("发文者")%>&sclass=发文者 class="fontsize12wu"><%=rs("发文者")%></a></td>
</tr>
<tr>
<td height="20" class="fontsize12h20">发文日期:<a href=serch.asp?keyword=<%=rs("发文日期")%>&sclass=发文日期 class="fontsize12wu"><%=rs("发文日期")%></a></td>
</tr>
<tr>
<td height="20" class="fontsize12h20">发文时间:<%=rs("发文时间")%></td>
</tr>
<tr>
<td height="20" class="fontsize12h20">点 击 数:<%=rs("点击数")%></td>
</tr>
<tr>
<td height="20" class="fontsize12h20">回 复 数:<%=rs("跟贴数")%></td>
</tr>
</table></td>
<td valign="top" class="fontsize12h20"><%=rs("内容")%>
<%if rs("附件数")>0 then %> <table width="98%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td width="60" height="20" valign="top" class="fontsize14h20">
<div align="right">附件:</div></td>
<td><table width="90%" border="0" cellspacing="0" cellpadding="2">
<%fj_sm=rs("附件说明")
fj_name=rs("附件")
for m=1 to rs("附件数")
temp1=mid(fj_sm,1,instr(fj_sm,"|")-1)
fj_sm=mid(fj_sm,instr(fj_sm,"|")+1)
temp2=mid(fj_name,1,instr(fj_name,"|")-1)
fj_name=mid(fj_name,instr(fj_name,"|")+1)
%>
<tr>
<td><a href=<%=temp2%> target="_blank" class="fontsize12"><%=temp1%></a></td>
</tr>
<%next%>
</table></td>
</tr>
</table>
<%end if%> </td>
</tr>
<%if user_class="管理员" then%>
<tr>
<td height="30" valign="middle" class="fontsize12h20"><div align="center"><strong>信息详细情况</strong></div></td>
<td valign="middle" class="fontsize12h20"> <a href="admin_disp.asp?disp_id=<%=disp_id%>&doing=listrev&pageno=<%=pageno%>&m=<%=n%>" class="fontsize12">接收人员</a> <a href="admin_disp.asp?disp_id=<%=disp_id%>&doing=listlooked&pageno=<%=pageno%>&m=<%=n%>">已查看人员</a> <a href="admin_disp.asp?disp_id=<%=disp_id%>&doing=listnotlook&pageno=<%=pageno%>&m=<%=n%>">未查看人员</a> <a href="admin_disp.asp?disp_id=<%=disp_id%>&doing=listclear&pageno=<%=pageno%>&m=<%=n%>">已清除人员</a> <a href="admin_editmsg.asp?edit_id=<%=rs("id")%>">修改信息</a>
<%if rs("置顶")=0 then%><a href="admin_disp.asp?disp_id=<%=disp_id%>&doing=top&pageno=<%=pageno%>&m=<%=n%>">信息置顶</a><%else%><a href="admin_disp.asp?disp_id=<%=disp_id%>&doing=nottop&pageno=<%=pageno%>&m=<%=n%>">取消置顶</a><%end if%>
<%if rs("成批删除")=0 then%> <a href="admin_disp.asp?disp_id=<%=disp_id%>&doing=deleallyes&pageno=<%=pageno%>&m=<%=n%>">批量删除能</a><%else%> <a href="admin_disp.asp?disp_id=<%=disp_id%>&doing=delallnot&pageno=<%=pageno%>&m=<%=n%>">批量删除否</a><%end if%>
<%if rs("清除")=0 then%> <a href="admin_disp.asp?disp_id=<%=disp_id%>&doing=clearyes&pageno=<%=pageno%>&m=<%=n%>">能够清除</a><%else%> <a href="admin_disp.asp?disp_id=<%=disp_id%>&doing=clearnot&pageno=<%=pageno%>&m=<%=n%>">不能清除</a><%end if%>
<a href="admin_disp.asp?doing=delemsg&disp_id=<%=disp_id%>">删除信息</a></td>
</tr>
<%end if%>
</table>
<%user_all=rs("所有人")
jsr=rs("接收者")
ykr=rs("已看者")
qcr=rs("已清除者")
lycount=rs("跟贴数")
rs.close%>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="fontsize10"> </td>
</tr>
</table>
<%if doing="listrev" then%>
<table width="740" border="1" align="center" cellpadding="2" cellspacing="0" borderColorLight="#000000" borderColorDark="#ffffff" bgcolor="#99CCFF">
<tr>
<td width="130" height="20" valign="top" class="fontsize12h20wu">
<div align="center"><strong>接受此信息人员名单</strong></div></td>
<td width="598">
<%if user_all="1" then%>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td width="12%" class="fontsize12wu">所有人</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<%else%>
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr class="fontsize12h20">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -