📄 new.php
字号:
<?
include_once("inc/auth.php");
?>
<html>
<head>
<title>添加维护记录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script Language="JavaScript">
function td_calendar(fieldname)
{
myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;
mytop=document.body.scrollTop+event.clientY-event.offsetY+140;
window.showModalDialog("/inc/calendar.php?FIELDNAME="+fieldname,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:215px;dialogTop:"+mytop+"px;dialogLeft:"+myleft+"px");
}
</script>
</head>
<body class="bodycolor" topmargin="5">
<?
if($VM_ID!="")
{
$query = "SELECT * from VEHICLE_MAINTENANCE where VM_ID=$VM_ID";
$cursor= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
{
$V_ID=$ROW["V_ID"];
$VM_REQUEST_DATE=$ROW["VM_REQUEST_DATE"];
$VM_TYPE=$ROW["VM_TYPE"];
$VM_REASON=$ROW["VM_REASON"];
$VM_FEE=$ROW["VM_FEE"];
$VM_PERSON=$ROW["VM_PERSON"];
$VM_REMARK =$ROW["VM_REMARK"];
if($VM_REQUEST_DATE=="0000-00-00")
$VM_REQUEST_DATE="";
}
}
?>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/notify_new.gif" HEIGHT="20"><span class="big3"> 车辆维护记录</span>
</td>
</tr>
</table>
<table align="center" border="0" width="550" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
<form enctype="multipart/form-data" action="add.php" method="post" name="form1">
<tr>
<td nowrap class="TableContent" width="80"> 车 牌 号:</td>
<td class="TableData" colspan="3" width="470">
<select name="V_ID" class="BigSelect">
<?
$query = "SELECT * from VEHICLE order by V_NUM";
$cursor1= exequery($connection,$query);
while($ROW1=mysql_fetch_array($cursor1))
{
$V_ID1=$ROW1["V_ID"];
$V_NUM=$ROW1["V_NUM"];
?>
<option value="<?=$V_ID1?>" <? if($V_ID==$V_ID1) echo "selected";?>><?=$V_NUM?></option>
<?
}
?>
</select>
</td>
</tr> <tr>
<td nowrap class="TableContent" width="80"> 维护日期:</td>
<td class="TableData" width="260">
<input type="text" name="VM_REQUEST_DATE" size="12" maxlength="10" class="BigInput" value="<?=$VM_REQUEST_DATE?>">
<img src="/images/menu/calendar.gif" border="0" align="absMiddle" style="cursor:hand" onclick="td_calendar('form1.VM_REQUEST_DATE');">
</td>
<td nowrap class="TableContent" width="80"> 维护类型:</td>
<td class="TableData" width="130">
<SELECT name="VM_TYPE" class="BigSelect">
<option value="0" <? if($VM_TYPE==0) echo "selected";?>>维修</option>
<option value="1" <? if($VM_TYPE==1) echo "selected";?>>加油</option>
<option value="2" <? if($VM_TYPE==2) echo "selected";?>>洗车</option>
<option value="3" <? if($VM_TYPE==3) echo "selected";?>>年检</option>
<option value="4" <? if($VM_TYPE==4) echo "selected";?>>其它</option>
</SELECT>
</td>
</tr>
<tr>
<td nowrap class="TableContent" width="80"> 维护原因:</td>
<td class="TableData" colspan="3">
<textarea name="VM_REASON" class="BigInput" cols="60" rows="2"><?=$VM_REASON?></textarea>
</td>
</tr>
<tr>
<td nowrap class="TableContent" width="80"> 经 办 人:</td>
<td class="TableData">
<input type="text" name="VM_PERSON" size="12" maxlength="100" class="BigInput" value="<?=$VM_PERSON?>">
</td>
<td nowrap class="TableContent" width="80"> 维护费用:</td>
<td class="TableData" width="130">
<input type="text" name="VM_FEE" size="12" maxlength="25" class="BigInput" value="<?=$VM_FEE?>">
</td>
</tr>
<tr>
<td nowrap class="TableContent" width="80"> 备 注:</td>
<td class="TableData" colspan="3">
<textarea name="VM_REMARK" class="BigInput" cols="60" rows="2"><?=$VM_REMARK?></textarea>
</td>
</tr>
<tr class="TableControl">
<td nowrap colspan="4" align="center">
<input type="hidden" value="<?=$VM_ID?>" name="VM_ID">
<input type="submit" value="保存" class="BigButton">
<input type="reset" value="重填" class="BigButton">
<?
if($VM_ID!="")
{
?>
<input type="button" value="返回" class="BigButton" onclick="location='query.php'">
<?
}
?>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -