📄 search.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%const need_purview=2%>
<!--#include file="../localhost.asp"-->
<!--#include file="../purview.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="show_error.asp"-->
<!--#include file="../lockip.asp"-->
<%
Response.CacheControl = "no-cache"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../eric.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
if lcase(trim(request.querystring("action")))<>"search" then%>
<form name="form1" method="post" action="?action=search">
<table width="600" border="0" align="center" cellpadding="4" cellspacing="1" id="table_01">
<tr>
<td class="white_bold_blue">搜索:</td>
<td class="white_bold_blue"> </td>
<td class="white_bold_blue"> </td>
</tr>
<tr>
<td><input name="keyword" type="text" class="input_text_01" id="keyword" size="50" maxlength="30"></td>
<td><select name="search_type" id="search_type">
<option value="" selected>搜索类型</option>
<option value="num">学号</option>
<option value="upload_path">学生姓名</option>
<option value="upload_homework_name">作业名称</option>
</select></td>
<td><input name="s_button" type="submit" id="s_button" value="提交">
<input type="reset" name="Submit2" value="重置"></td>
</tr>
</table>
</form>
<%else
dim keyword,search_type
keyword=request.form("keyword"):search_type=request.form("search_type")
'过滤字符
if keyword="" or search_type="" then
call error("关键词和搜索类型均不能为空")
call Iserror()
response.end
else
call opendb()
set rs=conn.execute("select * from upload_info where " & search_type & " Like '%" & keyword & "%' and teacher='" & session("teacher_name") & "' order by num asc")
if rs.eof then
response.write "查无相关记录"
else%>
<table width="600" border="0" align="center" cellpadding="4" cellspacing="1" id="table_01">
<tr>
<td colspan="2" class="white_bold_blue"><%=class_object%>--<%=homework_name%>次作业:</td>
<td width="77" class="white_bold_blue">上传时间:</td>
<td width="81" class="white_bold_blue">下载该作业</td>
<td width="65" class="white_bold_blue">批阅时间:</td>
<td width="113" class="white_bold_blue">是否批阅:(评分)</td>
</tr>
<%do while not rs.eof%>
<tr>
<td width="16"><%=rs("num")%></td>
<td width="92"><%
name=right(rs("upload_path"),len(rs("upload_path"))-instrRev(rs("upload_path"),"/"))
array_name=split(name,"_")
response.write array_name(1)%></td>
<td><%=rs("upload_time")%></td>
<td><%response.write "<a target='_blank' href='../" & rs("upload_path") & "'>下载</a>"%></td>
<td> </td>
<td align="right"><input name="textfield" type="text" class="input_text_01" size="2" maxlength="2">
<input type="submit" name="Submit2" value="提交"></td>
</tr>
<%
rs.movenext
loop
call closers()
call closedb()
response.write "</table>"
end if%>
<%
end if
end if%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -