?? outline_site.asp
字號(hào):
<%
'OA 表單生成器1.0
'功能:離線設(shè)置
%>
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<%
'response.buffer=false
'------------------------------------------------設(shè)置參數(shù)
LoginID=trim(session("LoginID")) : if LoginID="" then LoginID=0 '當(dāng)前用戶ID
'------------------------------------------------
'------------------------------------------------修改記錄
table="tbioaOutline" '表名
if request.form("addedit_subed")="true" then
'表單提交后
input_lxyy=Request.Form("input_lxyy")'離線原因
input_yjhlsj=Request.Form("input_yjhlsj")'預(yù)計(jì)回來(lái)時(shí)間
input_lxsm=Request.Form("input_lxsm")'離線說(shuō)明
input_lxfs=Request.Form("input_lxfs")'聯(lián)系方式
input_alertmod=Request.Form("input_alertmod")'退出時(shí)提示我
'編輯時(shí)使用的字段
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,"請(qǐng)?zhí)顚戭A(yù)計(jì)回來(lái)時(shí)間!")&&
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">離線設(shè)置</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='臨時(shí)有事' <%if rs("lxyy")="臨時(shí)有事" then response.write "selected"%>>臨時(shí)有事</option>
<option value='一會(huì)兒就回來(lái)' <%if rs("lxyy")="一會(huì)兒就回來(lái)" then response.write "selected"%>>一會(huì)兒就回來(lái)</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>預(yù)計(jì)回來(lái)時(shí)間:</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>離線說(shuō)明:</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>聯(lián)系方式:</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>退出時(shí)提示我:</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>
<%'釋放對(duì)象變量
rs.close
oConn.close
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -