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

📄 new.php

📁 通达OA2007SE源代码 非常好的
💻 PHP
字号:
<?
  include_once 'inc/auth.php';
  include_once 'inc/utility_all.php';
  echo '
<html>
<head>
<title>添加车辆信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
  echo '<s';
  echo 'cript 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+"';
  echo 'px");
}
function CheckForm()
{
   if(document.form1.V_NUM.value=="")
   {
   	alert("车牌号不能为空!");
   	return false;
   }
   if (document.form1.ATTACHMENT.value!="")
   {
     var file_temp=document.form1.ATTACHMENT.value,file_name;
     var Pos;
     Pos=file_temp.lastIndexOf("\\\\");
     file_name=file_temp.substring(Pos+1,file_temp.length);
     document.form1.ATTACHM';
  echo 'ENT_NAME.value=file_name;
   }
  form1.submit();
}
</script>
</head>
<body class="bodycolor" topmargin="5">
';
  if (($V_ID != ''))
  {
    $query = ((''.'SELECT * from VEHICLE where V_ID=').$V_ID);
    $cursor = exequery ($connection, $query);
    if ($ROW = mysql_fetch_array ($cursor))
    {
      $V_MODEL = $ROW['V_MODEL'];
      $V_NUM = $ROW['V_NUM'];
      $V_DRIVER = $ROW['V_DRIVER'];
      $V_TYPE = $ROW['V_TYPE'];
      $V_DATE = $ROW['V_DATE'];
      $V_PRICE = $ROW['V_PRICE'];
      $V_ENGINE_NUM = $ROW['V_ENGINE_NUM'];
      $V_STATUS = $ROW['V_STATUS'];
      $V_REMARK = $ROW['V_REMARK'];
      $ATTACHMENT_ID = $ROW['ATTACHMENT_ID'];
      $ATTACHMENT_NAME = $ROW['ATTACHMENT_NAME'];
      if (($V_DATE == '0000-00-00'))
      {
        $V_DATE = '';
      }
    }
  }
  echo '
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/notify_new.gif" HEIGHT="20">';
  echo '<s';
  echo 'pan class="big3"> 车辆信息</span>
    </td>
  </tr>
</table>
<table align="center" border="0" width="70%" 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">
        <input type="text" name';
  echo '="V_NUM" size="20" maxlength="100" class="BigInput" value="';
  echo $V_NUM;
  echo '">
      </td>
      <td class="TableData" width="250" rowspan="6">
';
  if (($ATTACHMENT_NAME == ''))
  {
    echo '<center>暂无照片</center>';
  }
  else
  {
    echo (((((((('<a href="/inc/attach.php?ATTACHMENT_ID='.(($ATTACHMENT_ID * 3) + 2)).'&ATTACHMENT_NAME=').urlencode ($ATTACHMENT_NAME)).'" title="点击查看放大图片"><img src=\'/inc/attach.php?ATTACHMENT_ID=').(($ATTACHMENT_ID * 3) + 2)).'&ATTACHMENT_NAME=').urlencode ($ATTACHMENT_NAME)).'\' width=\'250\' border=1>');
  }
  echo '      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 厂牌型号:</td>
      <td class="TableData">
        <input type="text" name="V_MODEL" size="20" maxlength="100" class="BigInput" value="';
  echo $V_MODEL;
  echo '">
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 发动机号:</td>
      <td class="TableData">
        <input type="text" name="V_ENGINE_NUM" size="20" maxlength="100" class="BigInput" value="';
  echo $V_ENGINE_NUM;
  echo '">
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 车辆类型:</td>
      <td class="TableData">        
        ';
  echo '<s';
  echo 'elect name="V_TYPE" class="BigSelect">
          <option value=""></option>
          ';
  echo code_list ('VEHICLE_TYPE', $V_TYPE);
  echo '        </select>&nbsp;车辆类型可在<br>“系统管理”->“系统代码设<br>置”模块设置
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 司机:</td>
      <td class="TableData">
        <input type="text" name="V_DRIVER" size="12" maxlength="100" class="BigInput" value="';
  echo $V_DRIVER;
  echo '">
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 购买价格:</td>
      <td class="TableData">
        <input type="text" name="V_PRICE" size="12" maxlength="25" class="BigInput" value="';
  echo $V_PRICE;
  echo '">
      </td>
    </tr>
';
  if (($ATTACHMENT_NAME == ''))
  {
    $PHOTO_STR = '车辆照片上传:';
  }
  else
  {
    $PHOTO_STR = '车辆照片更改:';
  }
  echo '    <tr>
      <td nowrap class="TableContent"> ';
  echo $PHOTO_STR;
  echo '</td>
      <td class="TableData" colspan="2">
        <input type="file" name="ATTACHMENT" size="40" class="BigInput" title="选择附件文件">
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 购买日期:</td>
      <td class="TableData" colspan="2">
        <input type="text" name="V_DATE" size="12" maxlength="10" class="BigInput" value="';
  echo $V_DATE;
  echo '">
        <img src="/images/menu/calendar.gif" border="0" align="absMiddle" style="cursor:hand" onclick="td_calendar(\'form1.V_DATE\');">
        日期格式形如 1999-1-2
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 当前状态:</td>
      <td class="TableData" colspan="2">
        ';
  echo '<s';
  echo 'elect name="V_STATUS" class="BigSelect">
          <option value="0" ';
  if (($V_STATUS == '0'))
  {
    echo 'selected';
  }
  echo '>可用</option>
          <option value="1" ';
  if (($V_STATUS == '1'))
  {
    echo 'selected';
  }
  echo '>损坏</option>
          <option value="2" ';
  if (($V_STATUS == '2'))
  {
    echo 'selected';
  }
  echo '>维修中</option>
          <option value="2" ';
  if (($V_STATUS == '3'))
  {
    echo 'selected';
  }
  echo '>报废</option>
        </select>
      </td>
    </tr>
    <tr>
      <td nowrap class="TableContent"> 备注:</td>
      <td class="TableData" colspan="2">
        <textarea name="V_REMARK" class="BigInput" cols="57" rows="3">';
  echo $V_REMARK;
  echo '</textarea>
      </td>
    </tr>
    <tr class="TableControl">
      <td nowrap colspan="3" align="center">
        <input type="hidden" value="';
  echo $V_ID;
  echo '" name="V_ID">
        <input type="hidden" value="" name="ATTACHMENT_NAME">
        <input type="hidden" value="';
  echo $ATTACHMENT_ID;
  echo '" name="ATTACHMENT_ID_OLD">
        <input type="hidden" value="';
  echo $ATTACHMENT_NAME;
  echo '" name="ATTACHMENT_NAME_OLD">
        <input type="button" value="保存" class="BigButton" onclick="CheckForm();">&nbsp;&nbsp;
        <input type="reset" value="重填" class="BigButton">&nbsp;&nbsp;
';
  if (($V_ID != ''))
  {
    echo '        <input type="button" value="返回" class="BigButton" onclick="location=\'manage.php\'">
';
  }
  echo '      </td>
    </tr>
    </table>
</form>
</body>
</html>';
?>

⌨️ 快捷键说明

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