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

📄 carplan.asp

📁 功能非常强大的一款办公自动化软件原代码,其中的文档签收功能特别实用.不相信下下来看下.
💻 ASP
字号:
<!--#include file="check.asp"-->
<!--#INCLUDE FILE="connect.asp" --> 
<%
dim firsttime
dim firstdate
dim rs

public sub carplan()
firsttime=trim(request("applydate"))
if firsttime<>"" then
syear=left(firsttime,4)
smonth=mid(firsttime,5,2)
sday=mid(firsttime,7,2)
firsttime=left(firsttime,8)
firstdate=syear&"-"&smonth&"-"&sday
else
syear=year(date())
smonth=month(date())
if len(smonth)=1 then smonth="0"&smonth
sday=day(date())
if len(sday)=1 then sday="0"&sday
firsttime=syear&smonth&sday
firstdate=syear&"-"&smonth&"-"&sday
end if

set rs=server.createobject("adodb.recordset")
if Request.ServerVariables("Request_Method")="POST" then
firstdate=request("timeDate")
dodate=split(request("timeDate"),"-")
carid=trim(request("carid"))
firsttime=dodate(0)&dodate(1)&dodate(2)
  sql="select * from applycar where status=1"
  if carid<>"" then sql=sql&" and carid='"&carid&"'"
  sql=sql&" and (timestart like '"&firsttime&"%' or timeend like '"&firsttime&"%') order by carname,timestart"
else
sql="select * from applycar where status=1 and (timestart like '"&firsttime&"%' or timeend like '"&firsttime&"%') order by carname,timestart"
end if
rs.open sql,conn,1,1
end sub
call carplan()
%>
<html>
<head>
<title>车辆安排</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="outplan.css" type="text/css">
<style type="text/css">
<!--
.style2 {font-size: 10pt}
-->
</style>
</head>
<script language=javascript>
function sendmail(){
if(form.mailtitle.value==""){
alert("请填写标题");
form.mailtitle.focus();
return false;
}
document.form.submit();
}
</script>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="form" method="post" action="carplan.asp">
  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="123">
    <tr> 
      <td height="33" valign="top"> 
        <div align="center"> 
          <table width="100%" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" align="center">
            <tr>
              <td height="27" align="left">&nbsp;</td>
              <td align="left"></td>
              <td height="27">&nbsp;</td>
            </tr>
            <tr>
              <td width="49" height="40" align="left">&nbsp; </td>
              <td width="256" align="left">车 辆: 
			     <%  set ptr=server.createobject("adodb.recordset")
						  sql="select * from car"
						  ptr.open sql,conn,1,1
					%>
                    <select name="carid" size="1">
                      <option value="">所有车辆</option>
					          <%while not ptr.eof %>
                                <option value="<%=ptr("id")%>" <%if trim(request("carid"))=cstr(ptr("id")) then response.write " selected"%>><%=ptr("carname")%></option>
                        <%ptr.movenext
						  wend
						  ptr.close
						  set ptr=nothing
						 %>
                              </select>
			  </td>
              <td width="446" height="40"><table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
                  <tr>
                    <td width="50%">时 间: 
                    <input  name="timeDate" type="text" class="noinput" style="cursor:hand" title="点击选择时间!" onClick="setday(timeDate,document.all.timeDate)" value="<%=firstdate%>" size="11" readonly >                    </td>
                    <td width="50%"><input type="image" name="find3" value="查 找" src="images/findgif.gif" alt="查找">
                    <input name="find3" type="image" value="查 找" src="images/closegif.gif" alt="关闭" width="71" height="19" onClick="window.close();"></td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td height="32" align="left"></td>
              <td height="32" colspan="2" align="left"><table width="90%" border="0" cellspacing="0" cellpadding="0">
                  <tr height="1">
                    <td bgcolor="0066CC" height="1"></td>
                  </tr height="1">
                  <tr>
                    <td bgcolor="ffffff" height="1"></td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td height="40" align="left">&nbsp;</td>
              <td height="40" colspan="2" align="left"><table width="90%" border="0" cellspacing="0" cellpadding="0">
                  <tr align="center">
                    <td height="26" width="19%">车 辆</td>
                    <td height="26" width="20%">申 请 人</td>
                    <td height="26" width="31%">用车时间</td>
                    <td height="26" width="30%">还车时间</td>
                  
                  </tr>
                  <%if rs.eof then %>
                  <tr height="1">
                    <td colspan="4" bgcolor="#D4DEF4" background="images/dotlineb.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                  </tr>
                  <tr align="center">
                    <td height="26" colspan="4" class="f6wait">没有找到相应记录</td>
                  </tr>
                  <tr height="1">
                    <td colspan="4" background="images/dotlineb.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                  </tr>
                  <%
		   else
		   while not rs.eof
		                 timestart=rs("timestart")
						 timeend=rs("timeend")
						  yearstart=left(timestart,4)
						  yearend=left(timeend,4)
						  monthstart=mid(timestart,5,2)
						  monthend=mid(timeend,5,2)
						  daystart=mid(timestart,7,2)
						  dayend=mid(timeend,7,2)
						   hourstart=mid(timestart,9,2)
						  minutestart=mid(timestart,11,2)
						   hourend=mid(timeend,9,2)
						  minuteend=mid(timeend,11,2)
		     %>
                  <tr height="1">
                    <td colspan="4" background="images/dotlineb.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                  </tr>
                  <tr align="center">
                    <td height="26" width="19%"><%=rs("carname")%></td>
                    <td height="26" width="20%"><%=rs("applyname")%></td>
                    <td height="26" width="31%" class="aapply">
					 <%response.write(yearstart&"-"&monthstart&"-"&daystart&"&nbsp;&nbsp;"&hourstart&":"&minutestart)%>
					</td>
                    <td height="26" width="30%" class="aapply">
					 <%response.write(yearend&"-"&monthend&"-"&dayend&"&nbsp;&nbsp;"&hourend&":"&minuteend)%>
					</td>
                   
                  </tr>
                  <tr height="1">
                    <td colspan="4" background="images/dotlineb.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                  </tr>
                  <%rs.movenext
		  wend
		  end if
		  rs.close
		  set rs=nothing
		  conn.close
		  set conn=nothing
		  %>
                </table></td>
              </tr>
          </table>
	    </div>
      </td>
    </tr>
  </table>
  </form>
<script language=javascript src="calendar.js">

</script>
</body>
</html>

⌨️ 快捷键说明

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