📄 agentsite_add.asp
字号:
<%
'OA 表单生成器1.0
'功能:增加事务提醒
'参数:request.form("addedit_subed")="true"#表单提交;
%>
<!--#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
'------------------------------------------------
'------------------------------------------------增加记录
table="tbioaAgentSite" '表名
if request.form("addedit_subed")="true" then
'表单提交后
'接受录入参数
input_body=Request.Form("input_body")'内容提示
input_sqlstr=Request.Form("input_sqlstr")'SQL语句
input_alertmod=Request.Form("input_alertmod")'实时提醒
'添加时使用的字段
field1=array("body","sqlstr","alertmod","sdate","userid")
value1=array(input_body,input_sqlstr,input_alertmod,date(),LoginID)
for i=0 to ubound(field1)
value1(i)=replace(value1(i),"'","''")
next
sql = "INSERT INTO " & table & " (" & Join(field1, ",") & ") VALUES ('" & Join(value1, "','") & "')"
oConn.Execute sql
word="<p>事务提醒已成功提交!</p><p><img border=0 src=../images/icon_show.gif align=left width=16 height=16><a href=AgentSite_add.asp>继续提交</a>"
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 src="../js/Popup.js"></script>
<script src="../js/front_chec.js"></script>
<script language="JavaScript">
<!--
function require(form){
return checnull(form.input_body,"请填写内容提示!")&&
checnull(form.input_sqlstr,"请填写SQL语句!")&&
1==1;
}
-->
</script>
</head>
<body topmargin="10" leftmargin="10">
<!--#include file="AgentSite_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>
</tr>
</table>
</td>
</tr>
<tr>
<td width="25%" class="td1">
<% if request.form("addedit_subed")="true" then %>
<table border="0" width="100%" cellspacing="10" cellpadding="0">
<tr>
<td width="36%">
<p align="right"><img border="0" src="../images/edit.gif" width="32" height="32">
</td>
<td width="64%"><p> </p>
<%=word%>
</td>
</tr>
<tr>
<td width="100%" colspan="2">
</td>
</tr>
</table>
<% else %>
<form name="eventfrm" method="POST" action="" onSubmit="return require(this)">
<input type=hidden name="addedit_subed" value="true">
<table border="0" width="100%" cellspacing="10" cellpadding="0">
<tr>
<td width="100" align="right" valign="top" nowrap>内容提示:</td>
<td width="400" nowrap><input type="text" name="input_body" value="<%=show_body%>" size="40" maxlength="250" class="input"> <font COLOR="RED">*</font>
</td>
</tr>
<tr>
<td width="100" align="right" valign="top" nowrap>SQL语句:</td>
<td width="400" nowrap>
<textarea name="input_sqlstr" rows="5" cols="39" class="textarea"><%=show_sqlstr%></textarea> <font COLOR="RED">*</font><br>
(统计提醒信息得SQL语句,可以用":userid"表示用户ID)
</td>
</tr>
<tr>
<td width="100" align="right" valign="top" nowrap>实时提醒:</td>
<td width="400" nowrap>
<input type="radio" value="1" name="input_alertmod">是
<input type="radio" value="0" name="input_alertmod" checked>否 (当有未处理信息时,系统是否自动弹出提醒窗口。)
</td>
</tr>
<tr>
<td width="100%" colspan="2">
<input type="submit" value="确定" name="B1" class="button0" onmouseout=className="button0" onmouseover=className="button1"> <input type="reset" value="全部重写" name="B2" class="button0" onmouseout=className="button0" onmouseover=className="button1">
</td>
</tr>
</table>
</form>
<% end if %>
</td>
</tr>
<tr>
<td width="25%" class="tdBottom">
</td>
</tr>
</table>
</div>
</body>
</html>
<%'释放对象变量
oConn.close
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -