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

📄 outline_site.asp

📁 OFFICE办公自动化
💻 ASP
字号:
<%
'OA 表单生成器1.0
'功能:离线设置
%>

<!--#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="tbioaOutline" '表名
if request.form("addedit_subed")="true" then 
'表单提交后
	input_lxyy=Request.Form("input_lxyy")'离线原因
	input_yjhlsj=Request.Form("input_yjhlsj")'预计回来时间
	input_lxsm=Request.Form("input_lxsm")'离线说明
	input_lxfs=Request.Form("input_lxfs")'联系方式
	input_alertmod=Request.Form("input_alertmod")'退出时提示我
	
	
	'编辑时使用的字段
	field1=array("lxyy","yjhlsj","lxsm","lxfs","alertmod")
	value1=array(input_lxyy,input_yjhlsj,input_lxsm,input_lxfs,input_alertmod)
	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 & " where UserID=" & LoginID 
	next
	oConn.Execute sql
end if
'--------------------------------------------取记录
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from " & table & " where UserID="&LoginID
rs.open sql,oConn,3,2
if rs.EOF then
	rs.AddNew
	rs("UserID")=LoginID
	rs.Update
	rs.close
	rs.open sql,oConn,1,1
end if
'------------------------------------------------
if rs("alertmod")="1" then
%><script>parent.alertmod=1;</script><%
else
%><script>parent.alertmod=0;</script><%
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_yjhlsj,"请填写预计回来时间!")&&
	1==1;
 }
-->
</script>
</head>

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

<!--#include file="OutLine_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">
    
    <form name="eventfrm" method="POST" action="" enctype="POST" 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>
		<select name=input_lxyy>
		          <option value='出差' <%if rs("lxyy")="出差" then response.write "selected"%>>出差</option>
		          <option value='临时有事' <%if rs("lxyy")="临时有事" then response.write "selected"%>>临时有事</option>
		          <option value='一会儿就回来' <%if rs("lxyy")="一会儿就回来" then response.write "selected"%>>一会儿就回来</option>
		          <option value='正在用餐' <%if rs("lxyy")="正在用餐" then response.write "selected"%>>正在用餐</option>
		          <option value='外出' <%if rs("lxyy")="外出" then response.write "selected"%>>外出</option>
		  <%
		      set rs1=server.CreateObject("ADODB.recordset")
		      rs1.Open "Select * from tbioaLXYY Where UserID=" & LoginID,oConn,1,1
		      do while not rs1.EOF
		  %>
		          <option value='<%=HtmlOut(rs1("lxyy"))%>' <%if rs("lxyy")=rs1("lxyy") then response.write "selected"%>><%=HtmlOut(rs1("lxyy"))%></option>
		  <%
		          rs1.MoveNext
		      loop
		      rs1.Close
		      set rs1=nothing
		  %>
		</select>
           <font COLOR="RED">*</font>
          </td>
        </tr>
        <tr>
          <td width="100" align="right" valign="top" nowrap>预计回来时间:</td>
          <td width="400" nowrap><input type='text' name=input_yjhlsj class=input value='<%=Server.HTMLEncode(rs("yjhlsj"))%>' maxlength="50"> <font COLOR="RED">*</font>
          </td>
        </tr>
        <tr>
          <td width="100" align="right" valign="top" nowrap>离线说明:</td>
          <td width="400" nowrap><textarea name="input_lxsm" rows="3" cols="39" class="textarea"><%=Server.HTMLEncode(rs("lxsm"))%></textarea>
          </td>
        </tr>
        <tr>
          <td width="100" align="right" valign="top" nowrap>联系方式:</td>
          <td width="400" nowrap><textarea name="input_lxfs" rows="3" cols="39" class="textarea"><%=Server.HTMLEncode(rs("lxfs"))%></textarea>
          </td>
        </tr>
        <tr>
          <td width="100" align="right" valign="top" nowrap>退出时提示我:</td>
          <td width="400" nowrap> <input type="checkbox" name="input_alertmod" value="1" <%if rs("alertmod")="1" then response.write "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>

    </td>
  </tr>
  <tr>
    <td width="25%" class="tdBottom">
    </td>
  </tr>
</table>
</div>
</body>

</html>

<%'释放对象变量
rs.close
oConn.close
%> 

⌨️ 快捷键说明

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