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

📄 agentsite_site.asp

📁 OFFICE办公自动化
💻 ASP
字号:
<%
'OA 表单生成器1.0
'功能:编辑事务提醒
'参数:	request.form("addedit_subed")="true"#表单提交; request("id")#要编辑记录的ID;
'	request("page")=int #当前页码;  request.form("Search")=chr #上次查询条件
%>

<!--#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
currentpage=request("page") : if currentpage="" then currentpage=1 '当前页码
Search=request("Search") '上次查询条件
pid=request("id") '记录ID
'------------------------------------------------
'------------------------------------------------修改记录
table="tbioaAgentBase" '表名
if request.form("addedit_subed")="true" then 
'表单提交后

	'接受录入参数
	input_AlertTime=Request.Form("input_AlertTime")'事务提醒间隔时间
	input_MsgTime=Request.Form("input_MsgTime")'系统消息刷新时间
	input_UserMsgMod=Request.Form("input_UserMsgMod")'是否允许发送用户消息
	input_OaUrl=Request.Form("input_OaUrl")'OA URL路径


	'添加时使用的字段
	field1=array("AlertTime","MsgTime","UserMsgMod","OaUrl")
	value1=array(input_AlertTime,input_MsgTime,input_UserMsgMod,input_OaUrl)


	sql="UPDATE " & table & " SET "
	for i=0 to ubound(field1)
		sql = sql & field1(i) & "='" & replace(value1(i),"'","''") & "'" 
		if i <> ubound(field1) then sql=sql & ","  else  sql=sql
	next
	oConn.Execute sql
end if
'--------------------------------------------取记录
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from " & table
rs.open sql,oConn,3,2
if rs.EOF then'初始化数据
	rs.AddNew
	rs("AlertTime")=300
	rs("MsgTime")=5
	rs("UserMsgMod")=1
	rs("OaUrl")="http://"&Request.ServerVariables("HTTP_HOST")&"/Main.asp"
	rs.Update
	rs.close
	rs.open sql,oConn,1,1
end if

'显示字段变量
if (isnull(rs("AlertTime"))) then show_AlertTime="" else show_AlertTime=Server.HTMLEncode(rs("AlertTime"))
if (isnull(rs("MsgTime"))) then show_MsgTime="" else show_MsgTime=Server.HTMLEncode(rs("MsgTime"))
if (isnull(rs("UserMsgMod"))) then show_UserMsgMod="" else show_UserMsgMod=Server.HTMLEncode(rs("UserMsgMod"))
if (isnull(rs("OaUrl"))) then show_OaUrl="" else show_OaUrl=Server.HTMLEncode(rs("OaUrl"))
'------------------------------------------------
%>


<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_AlertTime,"请填写事务提醒间隔时间!")&&
	checnumber(form.input_AlertTime,"事务提醒间隔时间必须为数字!")&&
	checnull(form.input_MsgTime,"请填写系统消息刷新时间!")&&
	checnumber(form.input_MsgTime,"系统消息刷新时间必须为数字!")&&
	checnull(form.input_OaUrl,"请填写OA系统访问网址!")&&
	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">OA精灵参数设置</p>
          </td>
          <td width="90" class="tdTop">
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td width="25%" class="td1">
    <form name="eventfrm" method="POST" action="?id=<%=pid%>&page=<%=currentpage%>" onSubmit="return require(this)">
      <input type=hidden name="addedit_subed" value="true">
      <table border="0" width="100%" cellspacing="10" cellpadding="0">
        <tr>
          <td width="150" align="right" valign="top" nowrap>事务提醒间隔时间:</td>
          <td width="400" nowrap>
            <input type="text" name="input_AlertTime" value="<%=show_AlertTime%>" size="5" maxlength="5" class="input">(秒) <font COLOR="RED">*</font>
          </td>
        </tr>
        <tr>
          <td width="150" align="right" valign="top" nowrap>系统消息刷新时间:</td>
          <td width="400" nowrap>
            <input type="text" name="input_MsgTime" value="<%=show_MsgTime%>" size="5" maxlength="5" class="input">(秒) <font COLOR="RED">*</font><br>
          </td>
        </tr>
        <tr>
          <td width="150" align="right" valign="top" nowrap>是否允许发送用户消息:</td>
          <td width="400" nowrap>
            <input type="radio" value="1" name="input_UserMsgMod" <%if show_UserMsgMod then response.write("checked")%>>是 
            <input type="radio" value="0" name="input_UserMsgMod" <%if not show_UserMsgMod then response.write("checked")%>>否
          </td>
        </tr>
        <tr>
          <td width="150" align="right" valign="top" nowrap>OA系统访问网址:</td>
          <td width="400" nowrap>
            <input type="text" name="input_OaUrl" value="<%=show_OaUrl%>" size="40" maxlength="250" class="input"> <font COLOR="RED">*</font><br>
          </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>
    <% 
     rs.close
    %>
    
    </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 + -