📄 ziliao_send.asp
字号:
<!--#include file="open.asp" -->
<!--#include file="inc/md5.inc" -->
<%self_name="ziliao_send.asp"%>
<%
doing=request.querystring("doing")
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
%>
<!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=<%=self_name%>">退出</a></div></td>
</tr>
<%else%>
<tr>
<td height="20" class="unnamed12"> <form name="form1" method="post" action="<%=self_name%>?doing=login">
<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>
<%if session("zzteacher")=true then%>
<%
if doing="insert" then
ziliao_title=trim(request.form("ziliao_title"))
ziliao_text=request.form("ziliao_text")
ziliao_text=replace(ziliao_text,chr(13),"<br>")
ziliao_text=replace(ziliao_text," "," ")
if trim(ziliao_text)="" then ziliao_text=" " end if
if ziliao_title="" then
msg="标题不能为空,请输入信息的标题"
else
if session("up_file_name")<>"" then fj="ziliaofile/"&session("up_file_name") else fj=" " end if
str="insert into ziliao(标题,内容,发文日期,发文时间,发文者,附件) values('"&ziliao_title&"','"&ziliao_text&"',#"&date&"#,#"&time&"#,'"&session("name")&"','"&fj&"')"
conn.execute(str)
session("up_file_name")=""
response.redirect("ziliao.asp")
end if
end if
%>
<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>
<table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><form name="form2" method="post" action="ziliao_send.asp?doing=insert">
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="40" colspan="2" bgcolor="#CCCCCC"> <div align="center" class="unnamed18"><strong>新
增 学 习 信 息</strong></div></td>
</tr>
<tr>
<td width="60" height="25" class="unnamed14"><div align="center">标题:</div></td>
<td width="540" height="25"> <input name="ziliao_title" type="text" id="ziliao_title" size="70"></td>
</tr>
<tr>
<td width="60" class="unnamed14"><div align="center">内容:</div></td>
<td width="540"> <textarea name="ziliao_text" cols="68" rows="16" id="ziliao_text"></textarea></td>
</tr>
<%
file_name=year(now)
if month(now)<10 then file_name=file_name&"0"&month(now) else file_name=file_name&month(now) end if
if day(now)<10 then file_name=file_name&"0"&day(now) else file_name=file_name&day(now) end if
if hour(now)<10 then file_name=file_name&"0"&hour(now) else file_name=file_name&hour(now) end if
if minute(now)<10 then file_name=file_name&"0"&minute(now) else file_name=file_name&minute(now) end if
if second(now)<10 then file_name=file_name&"0"&second(now) else file_name=file_name&second(now) end if
%>
<tr>
<td width="60" class="unnamed14"><div align="center">附件:</div></td>
<td width="540" height="26" class="unnamed14"> <a href="select_upfile.asp?file_name=<%=file_name%>&direr=ziliaofile" target="_blank">上传附件</a></td>
</tr>
<tr>
<td height="40" colspan="2"><div align="center"> <a href="ziliao.asp" class="unnamed14wu"><span class="unnamed14">返 回</span></a>
<input type="submit" name="Submit3" class="unnamed14" value=" 发 送 ">
<input type="reset" name="Submit4" class="unnamed14" value=" 重 填 ">
</div></td>
</tr>
</table>
</form></td>
</tr>
</table>
<div align="center" class="unnamed14h20"> <font color="#FF0000">
<%if msg<>"" then response.write msg end if%>
</font> </div></td>
</tr>
</table>
<%end if%>
<!--#include file="inc/bottom.asp" -->
<%conn.close%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -