📄 car_zhuce.asp
字号:
<!--#include file="data.asp"-->
<!--#include file="html.asp"-->
<!--#INCLUDE FILE="mouse.js" -->
<%
Set myrs= Server.CreateObject("ADODB.Recordset")
strSql="select * from bumen"
myrs.open strSql,Conn,1,1
Set yours= Server.CreateObject("ADODB.Recordset")
strSql="select * from user"
yours.open strSql,Conn,1,1
car_code=htmlencode2(request("car_code"))
car_type=request("car_type")
car_buytime=htmlencode2(request("car_buytime"))
car_buyprice=htmlencode2(request("car_buyprice"))
car_detail=htmlencode2(request("car_detail"))
car_company=request("car_company")
car_user=request("car_user")
car_usermobile=request("car_usermobile")
car_usertel=request("car_usertel")
car_money=htmlencode2(request("car_money"))
car_fixlog=htmlencode2(request("car_fixlog"))
ip= Request.ServerVariables("REMOTE_ADDR")
nowtime=now()
sj=cstr(year(nowtime))+"-"+cstr(month(nowtime))+"-"+cstr(day(nowtime))+" "+cstr(hour(nowtime))+":"+right("0"+cstr(minute(nowtime)),2)+":"+right("0"+cstr(second(nowtime)),2)
set rs=server.createobject("ADODB.recordset")
rs.open "select * from car where car_code='"& car_code &"' order by id",conn,3,3
if rs.eof or rs.bof then
else if car_code=rs("car_code") then
%>
<link rel="stylesheet" href="oa.css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="1" cellpadding="2"> <tr > <td class="heading">
<div align="center"> <center> <table width="81%" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" bordercolorlight="#000000">
<tr> <td width="2%" align="right"></td><td align="left" height="25"> <p align="center"><font color="#FFFFFF"><b>您已经成功登记车辆</b></font></p></td><td width="3%"></td></tr>
</table></center></div></td></tr> </table><div align="center"> <form method="post" action="saveedit1.asp?id=<%=id%>" name="myform" onsubmit="return validate()">
<table width="80%" border="1" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" bordercolor="#FFFFFF" bordercolorlight="#000000">
<tr>
<td> <font COLOR="red">车辆号码已经存在</font> </td>
</tr> </table></div><div align="center"><a href="javascript:history.back(1)"><img border="0" src="images/previous.gif"></a>
<a href="javaScript:window.close()"><img border="0" src="images/close_1.gif"></a>
</div></form> <%
response.end
end if
end if
rs.close
set rs=server.createobject("ADODB.recordset")
rs.Open "SELECT * FROM car Where ID is null",conn,1,3
rs.addnew
rs("car_code")=car_code
rs("car_type")=car_type
rs("car_buytime")=car_buytime
rs("car_buyprice")=car_buyprice
rs("car_detail")=car_detail
rs("car_company")=car_company
rs("car_user")=car_user
rs("car_usermobile")=car_usermobile
rs("car_usertel")=car_usertel
rs("car_money")=car_money
rs("car_fixlog")=car_fixlog
rs("time")=sj
rs("IP")=ip
rs.update
id=rs("id")
%> <title>您已经成功登录车辆</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script Language="javaScript">
function validate()
{
if (document.myform.car_code.value=="")
{
alert("车辆号码不能为空");
document.myform.car_code.focus();
return false ;
}
if (document.myform.car_type.value=="")
{
alert("车辆类型不能为空");
document.myform.car_type.focus();
return false ;
}
if (document.myform.car_buytime.value=="")
{
alert("购买日期不能为空");
document.myform.car_buytime.focus();
return false ;
}
if (document.myform.car_buyprice.value=="")
{
alert("购买价格不能为空");
document.myform.car_buyprice.focus();
return false ;
}
if (document.myform.car_money.value=="")
{
alert("运营费用不能为空");
document.myform.car_money.focus();
return false ;
}
return true;
}
</script>
<link rel="stylesheet" href="oa.css">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr > <td class="heading"> <div align="center"> <center> <table width="81%" border="0" cellspacing="0" cellpadding="0" bgcolor="#000000" bordercolorlight="#000000">
<tr> <td width="2%" align="right"></td>
<td align="left" height="25"> <p align="center"><font color="#FFFFFF"><b>您已经成功登记车辆</b></font></p></td><td width="3%"></td></tr>
</table></center></div></td></tr> </table><div align="center">
<form method="post" action="car_saveedit1.asp?id=<%=id%>" name="myform" onsubmit="return validate()" >
<table width="80%" border="1" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" bordercolor="#FFFFFF" bordercolorlight="#000000">
<tr>
<td width="17%" valign="top"> <p align="right">车辆号码:</p></td><td width="83%">
<input name="car_code" type="text" class="form" id="car_code" value="<%=rs("car_code")%>" size="24"> </td></tr>
<tr>
<td width="17%" valign="top" height="6"> <p align="right"><font size="2">车辆类型:</font></p></td>
<td width="83%" height="6">
<input name="car_type" type="text" class="form" id="car_type" value="<%=rs("car_type")%>" size="24">
</td></tr> <tr>
<td width="17%" valign="top" height="16"> <p align="right"><font size="2">购买日期:</font></p></td><td width="83%" height="16">
<input name="car_buytime" type="text" class="form" id="car_buytime" value="<%=rs("car_buytime")%>" size="24">
</td></tr> <tr>
<td width="17%" valign="top" height="16"> <p align="right"><font size="2">购买价格:</font></p></td><td width="83%" height="16">
<input name="car_buyprice" type="text" class="form" id="car_buyprice" value="<%=rs("car_buyprice")%>" size="24">
</td></tr> <tr>
<td width="17%" valign="top" height="16"> <p align="right"><font size="2">简单说明:</font></p></td><td width="83%" height="16">
<input name="car_detail" type="text" class="form" id="car_detail" value="<%=rs("car_detail")%>" size="24">
</td></tr> <tr>
<td width="17%" valign="top"> <p align="right"><font size="2">所属部门:</font>
</td><td width="83%"> <select NAME="car_company" id="car_company">
<option value="<%=rs("car_company")%>" selected><%=rs("car_company")%></option>
<option value="公用车" > 公用车</option>
<%if myrs.eof and myrs.bof then
response.write "<font color='red'>还没有任何部门</font>"
else
do while not (myrs.eof or myrs.bof)
%> <option VALUE="<%=myrs("type")%>"><%=myrs("type")%></option>
<%myrs.movenext
loop
end if%> </select>
</td></tr>
<tr>
<td width="17%" valign="top"> <p align="right"><font size="2">所属司机:</font>
</td><td width="83%"> <select NAME="car_user">
<option value="<%=rs("car_user")%>" selected><%=rs("car_user")%></option>
<option value="任意人" >任意人</option>
<%if yours.eof and yours.bof then
response.write "<font color='red'>还没有任何人员</font>"
else
do while not (yours.eof or yours.bof)
%>
<option value="<%=yours("username")%>"><%=yours("name")%></option>
<%yours.movenext
loop
end if%>
</select>
</td></tr>
<tr>
<td width="17%" valign="top"> <p align="right"><font size="2">司机手机:</font></p></td><td width="83%">
<input name="car_usermobile" type="text" class="form" id="car_usermobile" value="<%=rs("car_usermobile")%>" size="24"> </td></tr>
<tr>
<td width="17%" valign="top"> <p align="right"><font size="2">司机电话:</font></p></td><td width="83%">
<input name="car_usertel" type="text" class="form" id="car_usertel" value="<%=rs("car_usertel")%>" size="24">
</td></tr>
<%if session("id")<>"" then %>
<tr>
<td WIDTH="17%" VALIGN="top"> <p ALIGN="right">运营费用:</p></td>
<td WIDTH="83%"> <p><textarea name="car_money" cols="43" rows="5" class="smallarea" id="car_money"><%=rs("car_money")%></textarea></p></td></tr>
<tr>
<td width="17%" valign="top"> <p align="right">维修记录:</p></td><td width="83%"><textarea name="car_fixlog" cols="43" rows="7" class="smallarea" id="car_fixlog"><%=rs("car_fixlog")%></textarea>
</td>
</tr>
<%end if%>
</table></div><div align="center"><input type=image src="images/modify_off.gif">
<a href="javaScript:window.close()"><img border="0" src="images/close_1.gif"></a>
</div></form>
</body>
</html>
<%rs.close
set rs=nothing
myrs.close
set myrs=nothing
yours.close
set yours=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -