📄 ziliao_disp.asp
字号:
<!--#include file="open.asp" -->
<!--#include file="inc/md5.inc" -->
<%self_name="ziliao_disp.asp"%>
<%
doing=request.querystring("doing")
ziliao_id=request.querystring("ziliao_id")
if doing="login" then '用户登录
user_id=trim(request.form("user_id"))
pass=trim(request.form("pass"))
if user_id<>"" and pass<>"" and instr(user_id,"'")=0 and instr(user_id,"&")=0 then
pass=ucase(md5(pass))
str="select * from user_teacher where teacher_user='"&user_id&"' and teacher_pass='"&pass&"'"
set rs=conn.execute(str)
if not rs.eof then
session("zzteacher")=true
session("name")=rs("teacher_name")
if rs("teacher_class")="超级管理员" then session("zzadmin")=true end if
else
str="select * from user_student where 学籍号='"&user_id&"' and 密码='"&pass&"'"
set rs=conn.execute(str)
if not rs.eof then
session("zzstudent")=true
session("student_id")=user_id
session("name")=rs("姓名")
session("student_bj")=rs("班级")
end if
end if
end if
end if
%>
<%'置顶操作
if doing="top" and session("zzteacher")=true then
str="update ziliao set 置顶=1 where id="&ziliao_id&""
conn.execute(str)
response.redirect("ziliao.asp")
end if
%>
<%'取消置顶操作
if doing="untop" and session("zzteacher")=true then
str="update ziliao set 置顶=0 where id="&ziliao_id&""
conn.execute(str)
response.redirect("ziliao.asp")
end if
%>
<%'删除资料
if doing="dele" and session("zzteacher")=true then
str="select 附件 from ziliao where id="&ziliao_id&"" '删除附件,先。
set rs=conn.execute(str)
if rs("附件")<>" " then
dim fs,del_file
del_file=rs("附件")
del_file=Server.MapPath(del_file)
set fs=CreateObject("Scripting.FileSystemObject")
if fs.FileExists(del_file) then
Set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.DeleteFile del_file,True
end if
end if
str="delete from ziliao where id="&ziliao_id&""
conn.execute(str)
response.redirect("ziliao.asp")
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><!--#include file="inc/css.css" -->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>留溪在线考试(学习资料浏览)</title>
</head>
<body topmargin="1">
<!--#include file="top.asp" -->
<!--#include file="menu.asp" -->
<table width="770" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#ff99cc" bgcolor="#edebdb">
<%if session("zzteacher")=true or session("zzstudent")=true then%>
<tr>
<td height="20" class="unnamed12"><div align="center">用户已登录 用户类别:
<%if session("zzstudent")=true then%>学生 学籍号:<%=session("student_id")%> 姓名:<%=session("name")%> 班级:<%=session("student_bj")%><%end if%>
<%if session("zzteacher")=true then%>教师 姓名:<%=session("name")%><%end if%>
<%if session("zzadmin")=true then%><a href=system_setup.asp>系统设置</a><%end if%>
<%if session("zzteacher")=true then%><a href=ziliao_send.asp>上传信息</a><%end if%>
<a href="quit.asp?back=ziliao.asp">退出</a></div></td>
</tr>
<%else%>
<tr>
<td height="20" class="unnamed12"> <form name="form1" method="post" action="<%=self_name%>?doing=login&ziliao_id=<%=ziliao_id%>">
<div align="center">用户登录 输入学籍号或用户名:
<input name="user_id" type="text" id="user_id" value=<%=id_disp%> size="20">
密码:
<input name="pass" type="password" id="pass" size="16">
<input type="submit" name="Submit" class="unnamed12" value="登录">
<input type="reset" name="Submit2" class="unnamed12" value="重填">
<a href="reg.asp?back=<%=self_name%>">注册</a> <a href="rereg.asp">忘记密码</a></div>
</td></form>
</tr>
<%end if%>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="unnamed4"> </td>
</tr>
</table>
<table width="770" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#ff99cc" bgcolor="#edebdb">
<tr>
<td valign="top"><table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="unnamed10"> </td>
</tr>
</table>
<%
str="update ziliao set 浏览次数=浏览次数+1 where id="&ziliao_id&""
conn.execute(str)
str="select * from ziliao where id="&ziliao_id&""
set rs=conn.execute(str)
%>
<table width="700" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" bgcolor="#CCCCCC" class="unnamed16"><strong> <%=rs("标题")%></strong></td>
</tr>
</table>
<table width="700" border="1" align="center" cellpadding="0" cellspacing="0">
<tr class="unnamed14">
<td width="25%" height="25"> <div align="center">发布人:<%=rs("发文者")%></div></td>
<td width="25%" height="25"> <div align="center">发布日期:<%=rs("发文日期")%></div></td>
<td width="25%" height="25"> <div align="center">发布时间:<%=rs("发文时间")%></div></td>
<td width="25%" height="25"> <div align="center">点击数:<%=rs("浏览次数")%></div></td>
</tr>
<tr>
<td colspan="4"><table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td class="unnamed14H20"><%=rs("内容")%></td>
</tr>
</table></td>
</tr>
<tr>
<td height="30" colspan="4" class="unnamed14"> 附件:<%if rs("附件")=" " then%>无<%else%>
<a href=<%=rs("附件")%> target="_blank">此处下载</a> 请右击选“目标另存为…”把附件下载到自己的硬盘上。
<%end if%>
<INPUT class=unnamed14 onclick=javascript:history.go(-1) type=button value=返回></td>
</tr>
<%if session("zzteacher")=true then%>
<tr>
<td height="30" colspan="4" class="unnamed14">
<div align="center">
<table width="250" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td>
<div align="center" class="unnamed14">
<%if rs("置顶")=0 then%><a href="ziliao_disp.asp?doing=top&ziliao_id=<%=ziliao_id%>">置顶</a><%else%><a href="ziliao_disp.asp?doing=untop&ziliao_id=<%=ziliao_id%>">取消置顶</a><%end if%>
<a href="ziliao_disp.asp?doing=dele&ziliao_id=<%=ziliao_id%>">删除</a>
</div></td>
</tr>
</table>
</div>
<div align="right"></div></td>
</tr>
<%end if%>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="unnamed10"> </td>
</tr>
</table>
<div align="center" class="unnamed14h20"> <font color="#FF0000">
</font> </div></td>
</tr>
</table>
<!--#include file="inc/bottom.asp" -->
<%conn.close%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -