⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ad_sh.asp

📁 OFFICE办公自动化
💻 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)&") and smod in (2,3)" '可查看本部门及下属部门的记录
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")<>"" then
	id=request("id") : if id="" then id=0 '处理记录ID
	oConn.Execute "update "&table&" set smod="&request("mod")&",shr="&LoginID&",shrq='"&date()&"',shyj='"&request("shyj")&"' 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>
<script language="javascript">
  function dosh(cmod,id)
  {
	 shyj = prompt("请填写审核意见:","");
	 if (!shyj)
	 	{return false;}
	 else
	 	{location.href="?mod="+cmod+"&id="+id+"&shyj="+shyj;}
  }
</script>
</head>

<body topmargin="10" leftmargin="10">

<table border=0 cellspacing="0" cellpadding="0">
  <tr>
    <td><img border="0" src="../images/icon_menu.gif" align="left"><a href="ad_sh.asp">户外广告审核</a> &nbsp;</td>
  </tr>
</table>

<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="2" <%=selected(smod,"2")%>>待审核</option>
          	  <option value="3" <%=selected(smod,"3")%>>待发证</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%>"><%=HtmlOut(rs("wh"))%></td>
	<td class="<%=td_class%>"><%=HtmlOut(rs("slrq"))%></td>
	<td class="<%=td_class%>"><%=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>
	<td class="<%=td_class%>" width="50" nowrap>
	  <%if rs("smod")=2 then%>
	    <img border="0" src="../images/CheckSignature.gif" align="left">
	    <a href="#" onClick="dosh(3,<%=rs("ID")%>); return false;">通过</a>
	  <%elseif rs("smod")=3 then%>
	    <img border="0" src="../images/icon_close.gif" align="left">
	    <a href="?mod=2&id=<%=rs("ID")%>">取消</a>
	  <%else%>
	  	--
	  <%end if%>
	</td>
	<td class="<%=td_class%>" width="50" nowrap>
	  <%if rs("smod")=2 then%>
	    <img border="0" src="../images/delete.gif" align="left">
	    <a href="#" onClick="if(confirm('确定要退回该审核表吗?\n该操作不可恢复!')){dosh(0,<%=rs("ID")%>);} return false;">退回</a>
	  <%else%>
	  	--
	  <%end if%>
	</td>
  </tr>
<%
rs.MoveNext
next
%>
</table>


<%
end if
rs.close
%>

</body>

</html>

<%'释放对象变量
oConn.close
%> <font face="宋体" size=2><p>Microsoft VBScript 运行时错误</font> <font face="宋体" size=2>错误 '800a005b'</font><p><font face="宋体" size=2>对象变量未设置: 'stream'</f

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -