ad_edit.asp
来自「OFFICE办公自动化」· ASP 代码 · 共 200 行
ASP
200 行
<%
'==============================================================
'OA 表单生成器
'版本: 1.1.0 -- 2005-5-24
'程序版权:(c) 2004 by 展亮
'说明:本代码为自由代码,用户可以自由使用,但请保留作者文件头部说明
' 在使用过程中如出现什么问题请及时与作者联系。
' 电子邮件:zlbox@yeah.net QQ:2343397
'=============================================================
'功能:添加/编辑户外广告登记表
'参数: request.form("addedit_subed")="true"#表单提交; request("id")#要编辑记录的ID;
'=============================================================
%>
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<!--#include file="../inc/ronger.asp"-->
<%
'response.buffer=false
'------------------------------------------------设置参数
LoginID=trim(Session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
pid=request("id"):if pid="" then pid=0 '记录ID
'------------------------------------------------
'------------------------------------------------添加/修改记录
table="tbioaAd" '表名
if request.form("addedit_subed")="true" then
'表单提交后
if pid=0 then
call insert(table,false)
response.write "<script>alert('户外广告登记表录入成功,继续编辑该记录可以录入广告样件!');this.location='ad_list.asp'</script>"
response.end
else
call update(table,"id",pid,false)
response.write "<script>alert('户外广告登记表修改成功!');history.go(-2)</script>"
response.end
end if
end if
'--------------------------------------------取记录
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from " & table & " where ID="&pid
rs.open sql,oConn,1,1
'------------------------------------------------
function showvalue(field)
if rs.eof then
showvalue=""
else
if (isnull(rs(field))) then showvalue="" else showvalue=Server.HTMLEncode(rs(field))
end if
end function
%>
<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 src="../js/Popup.js"></script>
<script src="../js/formatdate.js"></script>
<script src="../js/front_chec.js"></script>
<script language="javascript">
function WindowOpen(strURL){
DocumentWin = window.open(strURL,"","top=300,left=200,width=350,height=100,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no");
DocumentWin.focus();
}
</script>
</head>
<body topmargin="10" leftmargin="10">
<!--#include file="ad_menu.html"-->
<hr width="100%" size=1 color="#000000">
<br>
<div align="center">
<table width="500" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td width="100%" class="tdTop">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="tdTop">
<p align="left"><img border="0" src="../images/icon_title.gif" align="left">录入户外广告登记表</p>
</td>
<td width="90" class="tdTop">
<p align="left"><img border="0" src="../images/icon_return.gif" align="left">
<a href="javascript:history.back()" class="linkTop">返回列表</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="25%" class="td1">
<form name="eventfrm" method="POST" action="?id=<%=pid%>" onSubmit="return checknull(this)">
<input type=hidden name="addedit_subed" value="true">
<input type=hidden name="userid" value="<%=LoginID%>">
<input type=hidden name="smod" value="1">
<input type=hidden name="scr" value="">
<input type=hidden name="scrq" value="">
<input type=hidden name="shr" value="">
<input type=hidden name="shrq" value="">
<input type=hidden name="shyj" value="">
<table border="0" width="590" cellspacing="10" cellpadding="0">
<tr>
<td align="right" valign="top" nowrap>登记所:</td>
<td nowrap>
<select size="1" name="area" class="input">
<option value="<%=Session("DepID")%>" <%if area=Session("DepID") then response.write"selected"%>><%=GetTableValue("tbioaDepartment","Name","id",Session("DepID"))%></option>
<%Call pOptions("tbioaDepartment","Name",Session("DepID"),showvalue("area"),"├-")%>
</select> <font COLOR="RED">*</font>
</td>
</tr>
<tr>
<td align="right" valign="top" nowrap>受理通知书文号:</td>
<td nowrap><input type="text" name="wh" value="<%=showvalue("wh")%>" size="12" maxlength="250" class="input" check_null="请填写受理通知书文号"> <font COLOR="RED">*</font>
</td>
</tr>
<tr>
<%slrq=showvalue("slrq")
if slrq="" then slrq=date()
slry=showvalue("slry")
if slry="" then slry=GetUserName(LoginID)
%>
<td align="right" valign="top" nowrap>受理日期:</td>
<td nowrap><input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="slrq" value="<%=slrq%>" class="input" check_date="日期格式错误" onKeyUp="DateFormat(this,this.value,event,false,'2')" check_null="请填写受理日期"> <a href=# title="选择日期" onClick="fPopUpDlg('../js/calendar.htm', document.eventfrm.slrq, 'winpop', 234, 261);return false"><img src="../images/datetime.gif" border=0></a> <font COLOR="RED">*</font>
受理人员:<input type="text" name="slry" value="<%=slry%>" size="12" maxlength="250" class="input" check_null="请填写受理人员"> <font COLOR="RED">*</font>
</td>
</tr>
<tr>
<td align="right" valign="top" nowrap>发布单位名称:</td>
<td nowrap><input type="text" name="fbdw" value="<%=showvalue("fbdw")%>" size="50" maxlength="250" class="input" check_null="请填写发布单位名称"> <font COLOR="RED">*</font>
</td>
</tr>
<tr>
<td align="right" valign="top" nowrap>广告发布地点及具体位置:</td>
<td nowrap><input type="text" name="fbwz" value="<%=showvalue("fbwz")%>" size="50" maxlength="250" class="input" check_null="请填写广告发布地点及具体位置"> <font COLOR="RED">*</font>
</td>
</tr>
<tr>
<td align="right" valign="top" nowrap>广告发布期限:</td>
<td nowrap><input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="fbqxs" value="<%=showvalue("fbqxs")%>" class="input" check_date="日期格式错误" onKeyUp="DateFormat(this,this.value,event,false,'2')" check_null="请填写广告发布期限"> <a href=# title="选择日期" onClick="fPopUpDlg('../js/calendar.htm', document.eventfrm.fbqxs, 'winpop', 234, 261);return false"><img src="../images/datetime.gif" border=0></a>
至<font color="RED"> </font><input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="fbqxe" value="<%=showvalue("fbqxe")%>" class="input" check_date="日期格式错误" onKeyUp="DateFormat(this,this.value,event,false,'2')" check_null="请填写广告截止期限"> <a href=# title="选择日期" onClick="fPopUpDlg('../js/calendar.htm', document.eventfrm.fbqxe, 'winpop', 234, 261);return false"><img src="../images/datetime.gif" border=0></a> <font COLOR="RED">*</font>
</td>
</tr>
<tr>
<td align="right" valign="top" nowrap>广告形式、数量及规格:</td>
<td nowrap><input type="text" name="ggxs" value="<%=showvalue("ggxs")%>" size="50" maxlength="250" class="input" check_null="请填写广告形式、数量及规格"> <font COLOR="RED">*</font>
</td>
</tr>
<tr>
<td align="right" nowrap>广告内容:</td>
<td nowrap>名称 <input type="text" name="ggmc" value="<%=showvalue("ggmc")%>" size="26" maxlength="250" class="input" check_null="请填写广告名称"> <font COLOR="RED">*</font><font color="RED">
</font>样件编号 <input type="text" name="yjbh" value="<%=showvalue("yjbh")%>" size="7" maxlength="250" class="input" check_null="请填写样件编号"> <font COLOR="RED">*</font>
</td>
</tr>
<tr>
<td align="right" valign="top" nowrap>户外广告登记证号标准要求:</td>
<td nowrap>
<input type="radio" name="bzyq" value="0" checked> 应当标注
<input type="radio" name="bzyq" value="1" <%if showvalue("bzyq")="1" then response.write"checked"%>> 同意不标注
<font COLOR="RED">*</font>
</td>
</tr>
<%if pid>0 then%>
<tr>
<td colspan=2 align="center" valign="top">
<fieldset style="width:98%" align="center"> <legend>广告样件 [<img src="../images/icon_close.gif" align="absmiddle"> <a href='javascript:WindowOpen("FileUpForm.asp?id=<%=PID%>")'>添加</a>]</legend>
<iframe id="Accessory" src="Document_Accessory.asp?id=<%=pid%>" frameBorder="0" width="100%" height="70" marginHeight="0" marginWidth="0" scrolling="auto"></iframe>
</td>
</tr>
<%end if%>
<tr>
<td colspan="2" align="center">
<input type="submit" value="确定" class="button0" onmouseout=className="button0" onmouseover=className="button1"> <input type="reset" value="全部重写" class="button0" onmouseout=className="button0" onmouseover=className="button1">
</td>
</tr>
</table>
</form>
</td>
</tr>
<tr>
<td width="25%" class="tdBottom">
</td>
</tr>
</table>
</div>
</body>
</html>
<%'释放对象变量
rs.close
oConn.close
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?