📄 usercar_view_edit.asp
字号:
<!--#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
'------------------------------------------------
'------------------------------------------------添加/修改记录
ID = ChkInt(Request("ID"))
currentpage=request("page") '当前页码
If Request.Form("addedit_subed") = "true" Then
PartManSay = Request.Form("PartManSay")
PartMan_OK = ChkInt(Request.Form("PartMan_OK"))
Stau_IsOK = 1
field1=array("PartManSay","PartMan_OK","Stau_IsOK")
value1=array( PartManSay , PartMan_OK , Stau_IsOK )
sql="UPDATE tbioa_UserCar 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 id=" & ID & " And PartMan_ID = "&LoginID
next
oConn.Execute sql
Response.Write ShowSubmit("","批复完毕!点击确定返回列表!",1,"UserCar_Edit.asp?Page="¤tpage)
End If
set rs=Server.CreateObject("ADODB.RecordSet")
sql="SELECT tbioa_UserCar.*, tbioaUser.Name AS User_Name, tbioaDepartment.Name AS Department_Name FROM tbioa_UserCar INNER JOIN tbioaUser ON tbioa_UserCar.User_ID = tbioaUser.ID INNER JOIN tbioaDepartment ON tbioa_UserCar.Use_Depar_ID = tbioaDepartment.ID Where tbioa_UserCar.ID = "&ID&" And tbioa_UserCar.PartMan_ID="&LoginID
rs.open sql,oConn,1,1
If Rs.Eof And Rs.Bof Then
Rs.Close
Set Rs = NoThing
Response.Write ShowSubmit("","未找到匹配的数据!",1,"UserCar_List.asp")
End If
Function ChkInt(Str)
If Not(IsNumeric(Str))Then
ChkInt = 0
Else
If Int(Str) < 0 Or Int(Str) > 999999999 Then
ChkInt = 0
Else
ChkInt = Int(Str)
End If
End If
End Function
Function ShowSubmit(VarContent,Msg,Close,Page)
If VarContent = "" Then
If Close = 1 Then
oConn.Close
Set oConn = NoThing
End If
Response.Write CHR(10) & "<SCRIPT LANGUAGE=""JavaScript"">" & CHR(10)
Response.Write "<!--" & CHR(10)
If Page = "" Then
Response.Write "alert('"&Msg&"');history.back();" & CHR(10)
Else
Response.Write "alert('"&Msg&"');location.href='"&Page&"';" & CHR(10)
End If
Response.Write "-->" & CHR(10)
Response.Write "</SCRIPT>" & CHR(10)
Response.End
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/front_chec.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!--
//function selectmanager(form)
//{
// form.manager.value = showModalDialog("job_selectmanager.asp", "", "dialogWidth:14em; dialogHeight:8em; center: Yes; scroll:No; resizable: No; status: No; help: No;")
//}
//-->
</SCRIPT>
</head>
<body topmargin="10" leftmargin="10">
<!--#include file="UserCar_menu.html"-->
<hr width="100%" size=1 color="#000000">
<br>
<div align="center">
<table width="710" 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" align="center">
<br>
<strong>用车申请表</strong>
<br><br>
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="tab">
<tr class="td1">
<td width="27%">申 请 人: <%=HtmlOut(rs("User_Name"))%></td>
<td width="27%">申请时间:<%=HtmlOut(rs("GetFr_Date"))%></td>
<td width="46%">用车部门:<%=GetTableValue("tbioaDepartment","Name","ID",Rs("Use_Depar_ID"))%></td>
</tr>
<tr class="td1">
<td width="50%" colspan="2">用车时间: <input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="Use_Date" class="input" readonly value="<%=HtmlOut(rs("Use_Date"))%>"></td>
<td width="50%" rowspan="4">事由:<br>
<Textarea Name="User_What" Rows="10" Cols="50" readonly><%=Rs("User_What")%></Textarea>
</td>
</tr>
<tr class="td1">
<td width="50%" colspan="2">用车联系人:<input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="Use_Man" class="input" readonly value="<%=Rs("Use_Man")%>"></td>
</tr>
<tr class="td1">
<td width="50%" colspan="2">部门审批人:<SELECT NAME="PartMan_ID">
<option value=""><%=GetTableValue("tbioaUser","Name","ID",Rs("PartMan_ID"))%></option>
</SELECT>
</td>
</tr>
<tr class="td1">
<td width="50%" colspan="2">使用线路:<br>
<Textarea Name="Use_Line" Rows="5" Cols="50" readonly><%=Rs("Use_Line")%></Textarea>
</td>
<tr class="td1">
<form name="eventfrm" method="POST" action="?ID=<%=ID%>&Page=<%=currentpage%>">
<input type=hidden name="addedit_subed" value="true">
<td width="50%" colspan="2">
<fieldset style="width:100%" align="center"> <legend>批复意见:</legend>
<Textarea Name="PartManSay" Rows="4" Cols="50" style="overflow:auto;"></Textarea>
</fieldset>
</td>
<td width="50%">
<fieldset style="width:100%" align="center"> <legend>批复结果:</legend>
<TABLE border="0" cellspacing="4" cellpadding="0" width="100%">
<TR>
<TD>
<INPUT TYPE="radio" NAME="PartMan_OK" value=0 checked> <font color=green>同意用车</font>
<INPUT TYPE="radio" NAME="PartMan_OK" value=1> <font color=red>不同意用车</font><hr>
</TD>
</TR>
<TR>
<TD align="Right">
<INPUT TYPE="submit" value="批复并处理" class="button0" onmouseout=className="button0" onmouseover=className="button1">
</TD>
</TR>
</TABLE>
</fieldset>
</td>
</form>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
<%'释放对象变量
Rs.Close
Set Rs = NoThing
oConn.close
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -