📄 doc_find.asp
字号:
<%response.expires=0%>
<!--#include file="../asp/sqlstr.asp"-->
<!--#include file="../asp/bgsub.asp"-->
<%
'session.abandon
'Server.ScriptTimeOut=500
function opendb(DBPath,sessionname,dbsort)
dim conn
'if not isobject(session(sessionname)) then
Set conn=Server.CreateObject("ADODB.Connection")
'if dbsort="accessdsn" then conn.Open "DSN=" & DBPath
'if dbsort="access" then conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
'if dbsort="sqlserver" then conn.Open "DSN=" & DBPath & ";uid=wsw;pwd=wsw"
DBPath1=server.mappath("../db/jzud-oa.asa")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath1
set session(sessionname)=conn
'end if
set opendb=session(sessionname)
end function
%>
<!--#include file="../asp/keepformat.asp"-->
<!--#include file="public.asp"-->
<!--#include file="conn.asp"-->
<%
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='default.asp';")
response.write("</script>")
response.end
end if
doctypename=request.form("typelist")
set conn=openconn("conn")
set rs=server.createobject("adodb.recordset")
sql="select * from TypeTable"
rs.open sql,conn,1
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>档案资料库</title>
<link rel="stylesheet" type="text/css" href="../css/css.css">
</head>
<body bgcolor="#ffffff" topmargin="5" leftmargin="5">
<%
%>
<center>
<table align="center">
<tr>
<td><b>档案资料查询</b></td>
</tr>
</table>
</center>
<%
if rs.eof and rs.bof then
response.write("<center><br><br><font color=""red"" size=""+1"">请先增加档案资料库类别!</font></center><br><br>")
else
if request.form("ok")=" 提 交 " then
sql="select * from ContentTable"
Condition1=""
Condition2=""
Condition3=""
Find_Mode=replace(request.form("R1"),"'","''")
Find_Text=replace(request.form("T1"),"'","''")
Find_Type=replace(request.form("D1"),"'","")
Find_SendDate=REPLACE(request.form("T2"),"'","''")
errorinfo=""
if Find_SendDate<>"" and not isdate(Find_SendDate) then
errorinfo="请输入正确的颁发日期,如2001-1-1!<br>"
end if
if errorinfo="" then
if Find_Text<>"" then
Condition1=Find_Mode&" LIKE '%"&Find_Text&"%' "
end if
if Find_Type<>"" then
Condition2="TypeName='"&Find_Type&"'"
end if
if Find_SendDate<>"" and isdate(Find_SendDate) then
Condition3="SendDate=#"&Find_SendDate&"#"
end if
if Condition1<>"" or Condition2<>"" or Condition3<>"" then
sql=sql&" where "
end if
if Condition1<>"" then
sql=sql&Condition1
end if
if Condition2<>"" then
if Condition1<>"" then
sql=sql&" and "&Condition2
else
sql=sql&condition2
end if
end if
if Condition3<>"" then
if (Condition1<>"" or Condition2<>"") then
sql=sql&" and "&Condition3
else
sql=sql&Condition3
end if
end if
call DispList("",sql,"disp")
response.write("<br><center><input type=""button"" onclick=""javscript:history.go(-1);"" value=""返回""></center><br>")
else
response.write("<br><br><center><font color=""red"" size=""+1"">"&errorinfo&"</font><br><br><input type=""button"" onclick=""javscript:history.go(-1);"" value=""返回""></center><br>")
end if
else
%>
<form method="POST" action="Doc_Find.asp">
<div align="center">
<center>
<br><br>
<table border="1" cellpadding="5" cellspacing="0" width="80%" bordercolorlight="#808080" bordercolordark="#D4D0C8">
<tr>
<td width="70" height="20" bgcolor="#EFEFEF">查询方式:</td>
<td width="308" height="20"><input type="radio" value="KeyWord" checked name="R1">按关键字<input type="radio" name="R1" value="Title">按标题<input type="radio" name="R1" value="Content">按内容</td>
</tr>
<tr>
<td width="70" height="20" bgcolor="#EFEFEF">查询内容:</td>
<td width="308" height="20"><input type="text" name="T1" size="42"></td>
</tr>
<tr>
<td width="70" height="20" bgcolor="#EFEFEF">类
别:</td>
<td width="308" height="20">
<select size="1" name="D1">
<option value="">所有档案资料</option>
<%
do while not rs.eof
response.write("<option value="&chr(34)&rs("TypeName")&chr(34)&">"&Server.htmlencode(rs("TypeName"))&"</option>")
rs.movenext
loop
%>
</select>
</td>
</tr>
<tr>
<td width="70" height="20" bgcolor="#EFEFEF">颁发日期:</td>
<td width="308" height="20"><input type="text" name="T2" size="20"></td>
</tr>
</table>
</center>
</div>
<p align="center"><input type="submit" value=" 提 交 " name="ok">
<input type="reset" value=" 重 填 " name="B2"></p>
</form>
<%
end if
end if
conn.close
set conn=nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -