📄 ad_list.asp
字号:
<%
'OA 表单生成器1.0
'功能:户外广告登记表列表
'参数:request("page")=int #当前页码; request.form("Search")=chr #上次查询条件
%>
<!--#include file="../inc/NoCatch.asp"-->
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<%
'response.buffer=false
'------------------------------------------------设置参数
LoginID=trim(Session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
maxmessage=15 '每页显示记录数
currentpage=request("page") '当前页码
Search=request("Search") '上次查询条件
'------------------------------------------------
'------------------------------------------------取记录
'分页取记录 (返回rs对象)
'rs.recordcount 为记录总数
'rs.PageSize 为本页记录数
'
table="tbioaAd" '表名
'接受查询参数
area=Request("area")'所属所
wh=Request("wh")'受理通知书文号
slrq=Request("slrq")'受理日期
slrq_end=Request("slrq_end")'受理日期(结束)
slry=Request("slry")'受理人员
fbdw=Request("fbdw")'发布单位名称
fbqx=Request("fbqx")'广告发布期
ggmc=Request("ggmc")'广告名称
yjbh=Request("yjbh")'样件编号
bzyq=Request("bzyq")'户外广告登记证号标准要求
djzbh=Request("djzbh")'《户外广告登记证》编号
fzrq=Request("fzrq")'发证日期
fzrq_end=Request("fzrq_end")'发证日期(结束)
smod=Request("smod")'处理状态
'查寻条件
if Search="" then
Search="WHERE "
if wh<>"" then Search = Search & "wh LIKE '%" & wh & "%' and "
if slrq<>"" then Search = Search & "slrq>='" & cdate(slrq) & "' and "
if slrq_end<>"" then Search = Search & "slrq<='" & cdate(slrq_end) & "' and "
if slry<>"" then Search = Search & "slry LIKE '%" & slry & "%' and "
if fbdw<>"" then Search = Search & "fbdw LIKE '%" & fbdw & "%' and "
if fbqx<>"" then Search = Search & "fbqxs<='" & cdate(fbqx) & "' and fbqxe>='" & cdate(fbqx) & "' and "
if ggmc<>"" then Search = Search & "ggmc LIKE '%" & ggmc & "%' and "
if yjbh<>"" then Search = Search & "yjbh LIKE '%" & yjbh & "%' and "
if bzyq<>"" then Search = Search & "bzyq='" & bzyq & "' and "
if djzbh<>"" then Search = Search & "djzbh LIKE '%" & djzbh & "%' and "
if fzrq<>"" then Search = Search & "fzrq>='" & cdate(fzrq) & "' and "
if fzrq_end<>"" then Search = Search & "fzrq<='" & cdate(fzrq_end) & "' and "
if smod<>"" then Search = Search & "smod='" & smod & "' and "
if area="" then area=session("DepID")
Search=Search & "area in ("&GetTreeId("tbioaDepartment","ID","ParentID",area)&")" '可查看本部门及下属部门的记录
END if
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from " & table & " " & Search & " order by ID desc"
rs.open sql,oConn,1,1
Showpage=Paging(rs,maxmessage,currentpage,"Search="&Server.URLEncode(Search))
'------------------------------------------------删除记录
if request("mod")="dele" then
id=request("id") : if id="" then id=0 '删除记录ID
oConn.Execute "delete from "&table&" where id="&id
response.write "<script>alert('户外广告登记表成功删除!');history.back()</script>"
response.end
end if
'------------------------------------------------
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>main</title>
</head>
<body topmargin="10" leftmargin="10">
<!--#include file="ad_menu.html"-->
<hr width="100%" size=1 color="#000000">
<table border=0 cellspacing="0" cellpadding="0">
<tr>
<form name="eventfrm" method="GET" action="">
<td nowrap>
快速查询:
所属所:<select size="1" name="area" class="input">
<option value="<%=Session("DepID")%>"><%=GetTableValue("tbioaDepartment","Name","id",Session("DepID"))%></option>
<%Call pOptions("tbioaDepartment","Name",Session("DepID"),area,"├-")%>
</select>
文号:<input type="text" name="wh" value="<%=htmlout(wh)%>" size="5" maxlength="20" class="input">
广告名称:<input type="text" name="ggmc" value="<%=htmlout(ggmc)%>" size="8" maxlength="50" class="input">
发布单位:<input type="text" name="fbdw" value="<%=htmlout(fbdw)%>" size="8" maxlength="50" class="input">
状态:<select size="1" name="smod" class="input">
<option value="">不限制</option>
<option value="1" <%=selected(smod,"1")%>>待审查</option>
<option value="2" <%=selected(smod,"2")%>>待审核</option>
<option value="3" <%=selected(smod,"3")%>>待发证</option>
<option value="4" <%=selected(smod,"4")%>>已发证</option>
<option value="0" <%=selected(smod,"0")%>>退回</option>
</select>
<input type="submit" value="查询" class="button0" onmouseout=className="button0" onmouseover=className="button1">
</td>
</form>
</tr>
</table>
<hr width="100%" size=1 color="#000000">
<%=Showpage%>
<br>
<%
if rs.RecordCount=0 then
response.write "<BR><BR>暂时为空!"
else
%>
<table width="100%" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td class="tdTop" width=40 nowrap>文号</td>
<td class="tdTop" width=65 nowrap>受理日期</td>
<td class="tdTop" nowrap>登记所</td>
<td class="tdTop" nowrap>广告名称</td>
<td class="tdTop" nowrap>发布单位名称</td>
<td class="tdTop" width=50 nowrap>处理状态</td>
<td class="tdTop" colspan="2" nowrap>相关操作</td>
</tr>
<%for i = 0 to rs.PageSize-1
If rs.EOF Then Exit For
if i mod 2 = 0 then td_class="td1" else td_class="td2"
%>
<tr>
<td class="<%=td_class%>" nowrap><%=HtmlOut(rs("wh"))%></td>
<td class="<%=td_class%>"><%=HtmlOut(rs("slrq"))%></td>
<td class="<%=td_class%>" nowrap><%=HtmlOut(GetTableValue("tbioaDepartment","Name","id",rs("area")))%></td>
<td class="<%=td_class%>"><a href="ad_show.asp?id=<%=rs("ID")%>" class="link" target="_blank"><%=HtmlOut(rs("ggmc"))%></a></td>
<td class="<%=td_class%>"><%=HtmlOut(rs("fbdw"))%></td>
<td class="<%=td_class%>"><%=GetAdMod(rs("smod"))%></td>
<%if rs("UserID")=cint(LoginID) or returnqx(qx_zhyw) then%>
<td class="<%=td_class%>" width="50" nowrap>
<%if rs("smod")<2 then%>
<img border="0" src="../images/icon_edit.gif" align="left">
<a href="ad_edit.asp?id=<%=rs("ID")%>">编辑</a>
<%else%>
<center>--<center>
<%end if%>
</td>
<td class="<%=td_class%>" width="50" nowrap>
<%if rs("smod")<2 then%>
<img border="0" src="../images/icon_dele.gif" align="left">
<a href="ad_list.asp?mod=dele&id=<%=rs("ID")%>" onClick="return confirm('确定要删除该条记录吗?\n该操作不可恢复!')">删除</a>
<%else%>
<center>--<center>
<%end if%>
</td>
<%else%>
<td class="<%=td_class%>" width="50" align="center" nowrap>
--
</td>
<td class="<%=td_class%>" width="50" align="center" nowrap>
--
</td>
<%end if%>
</tr>
<%
rs.MoveNext
next
%>
</table>
<%
end if
rs.close
%>
</body>
</html>
<%'释放对象变量
oConn.close
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -