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

📄 car_tongji.asp

📁 网络办公系统源码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<!--#include file="../../inc/navigate.asp"-->
<%
dim sPageNavigate  '分页表格 
dim iRecordCount,iMaxPageCount,iPageCount,iCurrentPageIndex,i,sTMP  '分页
iMaxPageCount=20 '一页多少行记录
Submit=trim(request.Form("Submit"))
blogid=replace(trim(request.Form("blogid"))," ","")
car_num=trim(request("car_num"))
car_num1=trim(request.Form("car_num1"))
if Submit="删除信息" then
	if  ChkAdmin("oa_car")=False then
  		call message("您没有删除该信息的权限","back")
   		call endexit()
	end if

	if blogid="" then
		call message("请至少选择一项删除","back")
		call EndExit()
	end if
	bid=split(blogid,",")
	for i=0 to ubound(bid)
		delsql="delete from oa_car_usecar where id="&bid(i)&""
		conn.execute(delsql)
	next
	call message("删除成功","car_tongji.asp?car_num="&car_num1&"")
	call EndExit()
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>公司制度</title>
<link href="../img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {color: #FFFFFF}
.style3 {color: #FFFFFF; font-weight: bold; }
-->
</style>
</head>
<script language="JavaScript">
<!--
function FP_jumpMenu(el,frm,sel) {//v1.0
 var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
 if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
}
// -->
</script>

<body>
<form name="form1" method="post" action="car_tongji.asp">
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <tr align="right">
    <td height="25" colspan="6" align="left" bgcolor="#CC0000"><input name="Submit2" type="button" class="bon" id="Submit2" value="添加用车记录" onClick="window.location.href='car_usecar.asp'">      
      <input name="car_num1" type="hidden" id="car_num1" value="<%=car_num%>">
      <input name="Submit" type="submit" class="bon" id="Submit" value="删除信息"> 
      <input name="Submit3" type="button" class="tabel1" value="返回" onClick="window.history.go(-1)"></td>
    </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" colspan="6" align="left" bgcolor="#F2F2F2">选择车辆:
      <select name="car_num" id="car_num" onchange="FP_jumpMenu(this,'window',false)">
      <option value="car_tongji.asp?car_num=""">选择车辆</option>
      <%
	  	sql="select car_num, car_type from oa_car where companyid="&session("companyid")
		set rs=conn.execute(sql)
		do while not rs.eof
	  %>
      <option value="car_tongji.asp?car_num=<%=rs("car_num")%>"><%=rs("car_type")%></option>
      <%
	  rs.movenext
	  loop
	  rs.close
	  set rs=nothing
	  %>
    </select></td>
    </tr>
  <tr bgcolor="#CC6633">
    <td width="6%" height="25" align="center"><input type=checkbox onclick=sel('blogid')></td>
    <td width="20%" height="25" align="center"><span class="style3">用车时间</span></td>
    <td align="center"><span class="style3"> 车牌号</span></td>
    <td width="14%" align="center"> <span class="style3"> 用车人 </span></td>
    <td width="12%" align="center"><span class="style1"><strong> 驾驶员 </strong></span></td>
    <td width="34%" align="center"><span class="style3">用车原因</span></td>
  </tr>
    <tr >
    <td height="5" colspan="6" bgcolor="#666666"></td>
    </tr>
  <%
				Sql="select id,car_num,car_username,car_time1,car_time2,car_txt,car_pname,car_time3,car_driver from oa_car_usecar where companyid="&session("companyid")&""
				if car_num<>"" then Sql=Sql & " and car_num='"&car_num&"'"
				Sql=Sql & " order by id desc"
		 		Call GetCurrentPageIndex()  '取得当前页码
				set my_rs=server.CreateObject("adodb.recordset")
				my_rs.open Sql,conn,1,3
				my_rs.PageSize=iMaxPageCount
				my_rs.CacheSize =iMaxPageCount
				if my_rs.recordCount <>   0   then   my_rs.Absolutepage=iCurrentPageIndex
				iRecordCount=my_rs.RecordCount  '所有查询出来的记录数
				iPageCount=my_rs.PageCount  '最终多少页
				if iCurrentPageIndex>iPageCount then iCurrentPageIndex=iPageCount  '控制当前页不得超出范围
				sPageNavigate=GetNavigate("car_tongji.asp?car_num="&car_num&"",iRecordCount,iMaxPageCount,iCurrentPageIndex,true,true,"项")  '取得分页表格
				if Not my_rs.Eof then
				For i = 1 to iMaxPageCount '利用for next 循环依次读出当前页的记录 
			  if my_rs.EOF then  Exit For
					bgColor="#F8F8F8"
				if i mod 2=0 then bgColor="#DFEFFF"
	%>
  <tr bgcolor="<%=bgColor%>">
    <td height="25" align="center"><input type="checkbox" name="blogid" value="<%=my_rs(0)%>">      </td>
    <td height="25" align="center"><%=my_rs(3)%><br>
      -<br>      <%=my_rs(4)%></td>
    <td width="14%" align="center"><%=my_rs(1)%></td>
    <td align="center"><%=my_rs(2)%></td>
    <td align="center"><%=my_rs(8)%></td>
    <td align="center"><%=my_rs(5)%></td>
  </tr>
              <%
						my_rs.MoveNext()
				       Next
                     End if
                  my_rs.close
                 set my_rs=nothing
				%>
</table>
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="20">&nbsp;</td>
  </tr>
  <tr>
    <td height="20"><%=sPageNavigate%></td>
  </tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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