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

📄 index.php

📁 极限网络智能办公系统—MYOA26—100%—源程序。
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/utility.php" );
echo "\r\n<html>\r\n<head>\r\n<title>车辆信息管理</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n\r\n";
echo "<s";
echo "cript>\r\nfunction delete_vehicle(V_ID)\r\n{\r\n msg='确认要删除该车辆么?';\r\n if(window.confirm(msg))\r\n {\r\n  URL=\"delete.php?V_ID=\" + V_ID;\r\n  window.location=URL;\r\n }\r\n}\r\n</script>\r\n\r\n</head>\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n  <tr>\r\n    <td class=\"Big\"><img src=\"/images/notify_new.gif\" align=\"absmiddle\">";
echo "<s";
echo "pan class=\"big3\"> 添加车辆</span><br>\r\n    </td>\r\n  </tr>\r\n</table>\r\n<hr width=\"95%\" height=\"1\" align=\"left\" class=\"big1\"><br>\r\n<div align=\"center\">\r\n  <input type=\"button\"  value=\"添加车辆\" class=\"BigButton\" onClick=\"location='/ikernel/?APP_ID=25&ID=LOGIN_USER_NAME&ID_VALUE=";
echo $LOGIN_USER_ID;
echo "';\" title=\"添加车辆\">\r\n</div>\r\n<br>\r\n";
$connection = openconnection( );
$V_STATUS = 0;
for ( ;	$V_STATUS < 4;	++$V_STATUS	)
{
	if ( $V_STATUS == 0 )
	{
		$V_STATUS_DESC = "可用";
	}
	else if ( $V_STATUS == 1 )
	{
		$V_STATUS_DESC = "损坏";
	}
	else if ( $V_STATUS == 2 )
	{
		$V_STATUS_DESC = "维修中";
	}
	else if ( $V_STATUS == 3 )
	{
		$V_STATUS_DESC = "报废";
	}
	$query = "SELECT count(*) from VEHICLE where V_STATUS='{$V_STATUS}'";
	$cursor = exequery( $connection, $query );
	$V_COUNT = 0;
	if ( $ROW = mysql_fetch_array( $cursor ) )
	{
		$V_COUNT = $ROW[0];
	}
	if ( $V_COUNT == 0 )
	{
		echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n  <tr>\r\n    <td class=\"Big\"><img src=\"/images/menu/vehicle.gif\" width=\"24\" height=\"24\">";
		echo "<s";
		echo "pan class=\"big3\"> ";
		echo $V_STATUS_DESC;
		echo "车辆</span><br>\r\n    </td>\r\n  </tr>\r\n</table>\r\n<hr width=\"95%\" height=\"1\" align=\"left\" class=\"big1\">\r\n<br>\r\n\r\n";
		message( "", "无".$V_STATUS_DESC."的车辆" );
		echo "<br><br>";
	}
	else
	{
		echo "\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n  <tr>\r\n    <td class=\"Big\"><img src=\"/images/menu/vehicle.gif\" width=\"24\" height=\"24\">";
		echo "<s";
		echo "pan class=\"big3\"> ";
		echo $V_STATUS_DESC;
		echo "车辆</span><br>\r\n    </td>\r\n\r\n    <td valign=\"bottom\">共";
		echo "<s";
		echo "pan class=\"big4\">&nbsp;";
		echo $V_COUNT;
		echo "</span>&nbsp;条车辆记录\r\n    </td>\r\n    </tr>\r\n</table>\r\n\r\n<hr width=\"95%\" height=\"1\" align=\"left\" class=\"big1\">\r\n\r\n<table border=\"0\" cellspacing=\"1\" width=\"95%\" class=\"small\" bgcolor=\"#000000\" cellpadding=\"3\">\r\n  <tr class=\"TableHeader\">\r\n      <td nowrap align=\"center\">厂牌型号</td>\r\n      <td nowrap align=\"center\">车牌号</td>\r\n      <td nowrap align=\"center\">驾驶员</td>\r\n      <td nowrap align=\"center\">类型</";
		echo "td>\r\n      <td nowrap align=\"center\">购置日期</td>\r\n      <td nowrap align=\"center\">备注</td>\r\n      <td nowrap align=\"center\">操作</td>\r\n    </tr>\r\n\r\n";
		$query = "SELECT * from VEHICLE where V_STATUS='{$V_STATUS}'";
		$cursor = exequery( $connection, $query );
		$V_COUNT = 0;
		while ( $ROW = mysql_fetch_array( $cursor ) )
		{
			++$V_COUNT;
			$V_ID = $ROW['V_ID'];
			$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'];
			if ( $V_TYPE == 0 )
			{
				$V_TYPE_DESC = "轿车";
			}
			else if ( $V_TYPE == 1 )
			{
				$V_TYPE_DESC = "面包车";
			}
			else if ( $V_TYPE == 2 )
			{
				$V_TYPE_DESC = "越野车";
			}
			else if ( $V_TYPE == 3 )
			{
				$V_TYPE_DESC = "吉普车";
			}
			else if ( $V_TYPE == 4 )
			{
				$V_TYPE_DESC = "巴士";
			}
			else if ( $V_TYPE == 5 )
			{
				$V_TYPE_DESC = "工具车";
			}
			if ( $V_COUNT % 2 == 1 )
			{
				$TableLine = "TableLine1";
			}
			else
			{
				$TableLine = "TableLine2";
			}
			echo "    <tr class=\"";
			echo $TableLine;
			echo "\">\r\n      <td nowrap align=\"center\">";
			echo $V_MODEL;
			echo "</td>\r\n      <td nowrap align=\"center\">";
			echo $V_NUM;
			echo "</td>\r\n      <td nowrap align=\"center\">";
			echo $V_DRIVER;
			echo "</td>\r\n      <td nowrap align=\"center\">";
			echo $V_TYPE_DESC;
			echo "</td>\r\n      <td nowrap align=\"center\">";
			echo $V_DATE;
			echo "</td>\r\n      <td nowrap align=\"center\">";
			echo $V_REMARK;
			echo "</td>\r\n      <td nowrap align=\"center\">\r\n      <a href=\"javascript:;\" onClick=\"window.open('../vehicle_detail.php?V_ID=";
			echo $V_ID;
			echo "','','height=290,width=500,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,resizable=yes');\">详细信息</a>&nbsp;&nbsp;&nbsp;\r\n      <a href=query.php?V_ID=";
			echo $V_ID;
			echo ">预定情况</a>&nbsp;&nbsp;&nbsp;\r\n      <a href=/ikernel/?APP_ID=26&ID=V_ID&ID_VALUE=";
			echo $V_ID;
			echo ">修改</a>&nbsp;&nbsp;&nbsp;\r\n      <a href=javascript:delete_vehicle('";
			echo $V_ID;
			echo "');>删除</a>\r\n      </td>\r\n    </tr>\r\n";
		}
		echo "</table>";
		echo "<br><br>";
	}
}
echo "\r\n\r\n</body>\r\n\r\n</html>\r\n";
?>

⌨️ 快捷键说明

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