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

📄 usercar_add.asp

📁 OFFICE办公自动化
💻 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
'------------------------------------------------
'------------------------------------------------添加/修改记录
table="tbioaCarBase" '表名
if request.form("addedit_subed")="true" then
'表单提交后
	User_ID      = LoginID
	GetFr_Date   = Request.Form("GetFr_Date")
	Use_Date     = Request.Form("Use_Date")
	Use_Depar_ID = ChkInt(Request.Form("Use_Depar_ID"))
	Use_Man      = Request.Form("Use_Man")
	Use_Line     = Request.Form("Use_Line")
	User_What    = Request.Form("User_What")
	PartMan_ID   = ChkInt(Request.Form("PartMan_ID"))
	Stau_IsOK    = 0
	Response.Write ShowSubmit(Use_Date,"请选择用车时间!",1,"")
	Response.Write ShowSubmit(Use_Man,"请填写用车联系人!",1,"")

	Field1 = Array("User_ID","GetFr_Date","Use_Date","Use_Depar_ID","Use_Man","Use_Line","User_What","PartMan_ID","Stau_IsOK")
	Value1 = Array( User_ID , GetFr_Date , Use_Date , Use_Depar_ID , Use_Man , Use_Line , User_What , PartMan_ID , Stau_IsOK )
	For d=0 To UBound(Field1)  
		Value1(d)=Replace(Value1(d),"'","''")
	Next
	Sql = "INSERT INTO tbioa_UserCar (" & Join(Field1, ",") & ") VALUES ('" & Join(Value1, "','") & "')"
	oConn.Execute Sql
	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">
	<form name="eventfrm" method="POST" action="?" onSubmit="return checknull(this)">
	<input type=hidden name="addedit_subed" value="true">
		<tr class="td1">
			<td width="27%">申 请 人: <%=Session("RealName")%><INPUT TYPE="hidden" name="User_ID" value="<%=Session("RealName")%>"></td>
			<td width="27%">申请时间:<%=Year(now()) & "年" & Right("0"&Month(now()),2) & "月" & Right("0"&Day(now()),2) & "日"%><INPUT TYPE="hidden" name="GetFr_Date" value="<%=Year(now()) & "-" & Right("0"&Month(now()),2) & "-" & Right("0"&Day(now()),2)%>"></td>
			<td width="46%">用车部门:<%=GetTableValue("tbioaDepartment","Name","ID",Session("DepID"))%><INPUT TYPE="hidden" name="Use_Depar_ID" value="<%=Session("DepID")%>"></td>
		</tr>
		<tr class="td1">
			<td width="50%" colspan="2">用车时间: <input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="Use_Date" class="input" readonly> <a href=# title="选择日期" onClick="fPopUpDlg('../js/calendar.htm', document.eventfrm.Use_Date, 'winpop', 234, 261);return false"><img src="../images/datetime.gif" border=0></a></td>
			<td width="50%" rowspan="4">事由:<br>
				<Textarea Name="User_What" Rows="10" Cols="50"></Textarea>
			</td>
		</tr>
		<tr class="td1">
			<td width="50%" colspan="2">用车联系人:<input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="Use_Man" class="input"></td>
		</tr>
		<tr class="td1">
			<td width="50%" colspan="2">部门审批人:<SELECT NAME="PartMan_ID">
					<%
					set rs_a=Server.CreateObject("ADODB.RecordSet")
					sql="SELECT Id,Name FROM tbioaUser where department="&Session("DepID")&" order by ID"
					rs_a.open sql,oConn,1,1
					For i = 1 To Rs_a.RecordCount
						Response.Write "<option value="""&rs_a(0)&""">"&rs_a(1)&"</option>"
						rs_a.MoveNext
					Next
					rs_a.Close
					Set rs_a = NoThing
					%>
				</SELECT>
			</td>
		</tr>
		<tr class="td1">
			<td width="50%" colspan="2">使用线路:<br>
				<Textarea Name="Use_Line" Rows="5" Cols="50"></Textarea>
			</td>
		</tr>
		<tr class="td1">
			<td width="50%" colspan="3"><CENTER>
			<INPUT TYPE="submit" value="提交申请" class="button0" onmouseout=className="button0" onmouseover=className="button1">  
			<INPUT TYPE="button" value="取消申请" onclick="javascript:history.back();" class="button0" onmouseout=className="button0" onmouseover=className="button1">
			</CENTER></td>
		</tr>
    </form>
	</table>
    </td>
  </tr>
</table>
</div>
</body>

</html>

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

⌨️ 快捷键说明

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