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

📄 applycar.asp

📁 网络办公系统
💻 ASP
字号:
<!--#include file="check.asp"-->
<!--#INCLUDE FILE="connect.asp" --> 

<html>
<head>
<title>用车申请</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">


<script language="JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->


</script>

<link rel="stylesheet" href="apply.css" type="text/css">
</head>
<body text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" oncontextmenu="return false">
<%if request.servervariables("Request_Method")="POST" then
ipaddress=request.servervariables("remote_addr")
applytime=CDate(now())
timeDate=request("timeDate")
timeDate1=request("timeDate1")
timeDate=replace(timeDate,"-","")
timeDate1=replace(timeDate1,"-","")
timestart=timeDate&request("Startsi")&request("Startfen")
timeend=timeDate1&request("Endsi")&request("Endfen")
set rs=server.createobject("adodb.recordset")
sql="select * from applycar where status=1 and carid='"&request("carid")&"'"
rs.open sql,conn,1,1
while not rs.eof
if rs("timeend")<timestart or rs("timestart")>timeend then
free=true
else
free=false
response.write("<script language=javascript>alert('此时间车辆已被派出,请选择其他车辆!')</script>")
response.write("<script language=javascript>history.go(-1)</script>")
response.end
end if
rs.movenext
wend
rs.close
sql="select * from applycar"
rs.open sql,conn,1,3
rs.addnew
rs("title")=request("title")
'rs("carid")=request("carid")
'rs("carname")=request("carname")
rs("day")=request("day")
rs("timestart")=timestart
rs("timeend")=timeend
rs("reason")=request("reason")
rs("workpeople")=request("hiddenselect")
rs("applyname")=session("username")
rs("applyid")=session("uid")
rs("dep")=session("dep")
rs("applytime")=applytime
rs("ipaddress")=ipaddress
rs.update
if rs.eof then 
response.redirect "error.htm"
response.end
end if
applyid=rs("id")
rs.close
peoplelist=request("hiddenselect")
 postion=instr(peoplelist,";")
   if postion=len(peoplelist) then
nextpeople=left(peoplelist,postion-1)
peoplelist=""
       else
 nextpeople=left(peoplelist,postion-1)
 peoplelist=mid(peoplelist,postion+1) 
       end if
sql="select * from applygz where id=1"
rs.open sql,conn,1,3
rs.addnew
rs("flowid")=applyid
rs("handlename")=session("username")
rs("handleid")=session("uid")
rs("nextid")=nextpeople
rs("title")="用车申请"&request("title")
rs("handletime")=applytime
rs("ipaddress")=ipaddress
rs("handletype")="6"
rs.update
rs.close
 
sql="select * from newwork where id=1"
rs.open sql,conn,1,3
rs.addnew
rs("userid")=nextpeople
rs("userlist")=peoplelist
rs("title")=request("title")
rs("typed")="用车申请"
rs("url")="carsp.asp"
rs("baseid")=applyid
rs("applytime")=applytime
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write("<script language=javascript>alert('提交申请成功!')</script>")
response.write("<script>document.location='shenqing.asp'</script>")
response.end
end if
%>
<script language="JavaScript" src="apply.js">
</script>
<form name="form" method="post" action="">
  <table cellpadding="0" cellspacing="0" width="100%" class=main-table height="60">
    <tr> 
      <td valign="top" height="49"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td width="60" align="center">&nbsp; </td>
            <td height="45" align="center"><img src="images/applycar.gif"></td>
          </tr>
        </table>
        <table cellpadding="1" cellspacing="1" width="100%" height="250">
          <tr valign="middle" > 
            <td width="60"> </td>
            <td valign="top"> 
              <table width="100%" border="0" cellspacing="0" cellpadding="0" height="40">
                <tr> 
                  <td width="80" height="40">申请名称:</td>
                  <td height="40"> 
                    <input type="text" class="noinput"  name="title" size="72" tableindex=1 maxlength="45" title="请输入名称!">
                  </td>
                </tr>
                <tr> 
                  <td width="80" height="40">用车时间:</td>
                  <td height="40"> 
<input class="noinput" type="text" readonly title="点击选择用车时间!"  name="timeDate" size="25" onClick="setday(timeDate,document.all.timeDate)" style="cursor:hand" >                       
                    <select name="Startsi"  size="1"  >
                      <%for i=0 to 23%>
                      <option value="<%if len(i)=1 then Response.Write 0&i else Response.Write i%>" <%if hour(now)=i then Response.Write "selected"%> > 
                      <%if len(i)=1 then Response.Write 0&i else Response.Write i%>
                      </option>
                      <%next%>
                    </select>
                    点  
                    <select name="Startfen"  size="1"  >
                      <%for i=0 to 11%>
                      <option  value="<%if len(i*5)=1 then Response.Write 0&i*5 else Response.Write i*5%>" <%if minute(now)=i*5 then Response.Write "selected"%> > 
                      <%if len(i*5)=1 then Response.Write 0&i*5 else Response.Write i*5%>
                      </option>
                      <%next%>
                    </select>
                  分 </td>
                </tr>
                <tr> 
                  <td width="80" height="40">还车时间:</td>
                  <td height="40"> 
                    <input class="noinput" type="text" readonly title="点击选择还车时间!"  name="timeDate1" size="25" onClick="setday(timeDate1,document.all.timeDate1)" style="cursor:hand" >
                       
                    <select name="Endsi"  class=select-a size="1"  >
                      <%for i=0 to 23%>
                      <option value="<%if len(i)=1 then Response.Write 0&i else Response.Write i%>" <%if hour(now)=i then Response.Write "selected"%> > 
                      <%if len(i)=1 then Response.Write 0&i else Response.Write i%>
                      </option>
                      <%next%>
                    </select>
                    点  
<select name="Endfen"  class=select-a size="1"  >
                      <%for i=0 to 11%>
                      <option  value="<%if len(i*5)=1 then Response.Write 0&i*5 else Response.Write i*5%>" <%if minute(now)=i*5 then Response.Write "selected"%> > 
                      <%if len(i*5)=1 then Response.Write 0&i*5 else Response.Write i*5%>
                      </option>
                      <%next%>
                    </select>
                    分 </td>
                </tr>
              </table>
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr valign="middle" > 
                  <td width="80" height="40" align="left">使用天数:</td>
                  <td height="40" width="200"> 
                    <input type="text" name="day" class="noinput" title="点击输入使用天数" size="25" maxlength="15">
                  </td>
                  <td height="40" width="80" align="left">申请车辆:</td>
                  <td height="40"><input class="nobinput" type="text" readonly value="" name="temp" size="25"> 
                  </td>
                </tr>
                <tr> 
                  <td height="40" width="80" align="left">审批领导:</td>
                  <td height="40" width="200"> 
                    <input type="text" readonly title="从右边选择审批领导!"  name="username" size="25" class="noinput" onClick="javascript:alert('从右边选择审批领导')">
                  </td>
                  <td height="40" width="80" align="left">&nbsp;</td>
                  <td height="40">&nbsp;</td>
                </tr>
                <tr> 
                  <td height="40" width="80" align="left">申 请 人:</td>
                  <td height="40" width="200"> 
                    <input class="nobinput" type="text" readonly value=<%=session("username")%> size="25" name="applyuid">
                  </td>
                  <td height="40" width="80" align="left"> 所在部门:</td>
                  <td height="40"> 
                    <input class="nobinput" type="text" readonly value=<%=session("dep")%> name="applydep" size="25">
                  </td>
                </tr>
              </table>
              <table width="100%" border="0" cellspacing="0" cellpadding="0" height="120">
                <tr> 
                  <td width="80" valign="top">用车事由:</td>
                  <td valign="top"> 
                    <textarea class="body1" name="reason" rows="8" title="点击输入用车事由" cols="70"></textarea>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="40">
          <tr> 
            <td align="right" width="50%"> 
              <input type="image"  class="f0input" value="提交申请" name="submit2" onClick="return checkcar();return false;" src="images/applygif.gif" alt="提交申请">
            </td>
            <td align="center" width="60"></td>
            <td align="left"> 
              <input  type="image" class="f0input" name="send" value=" 返 回 " onClick="history.go(-1);return false;" src="images/fanhuigif.gif" alt="返回">
            </td>
          </tr>
        </table>
      </td>
      <td width="200" valign="top" height="280"> 
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="390" bgcolor="ECF2FC">
          <tr> 
            <td class="linetd" valign="top"> 
              <!--#include file="turnmore.asp"-->
            </td>
            <td width="1" background="images/emailr.gif" ><img src="images/emailr.gif"> 
            </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr > 
      <td height="10"> </td>
      <td height="10"> 
        <input type="hidden" name="hiddenselect">
      </td>
    </tr>
  </table>
</form>
<script language=javascript src="calendar.js">

</script>

 </body>
</html>

⌨️ 快捷键说明

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