📄 12.php
字号:
<?php
function is_priview8( $str, $priview )
{
$str_array = explode( ",", $str );
$priview = explode( ",", $priview );
$i = 0;
for ( ; $i < sizeof( $priview ); ++$i )
{
if ( in_array( $str_array[$i], $priview ) )
{
return true;
}
else
{
return false;
}
}
}
$strlink = $_SERVER['PHP_SELF'];
if ( strpos( $strlink, "block_02.php" ) === false )
{
$isimg = true;
}
$sql = "SELECT UP.FUNC_ID_STR FROM user AS U,user_priv AS UP WHERE U.USER_ID='".$_SESSION['LOGIN_USER_ID']."' AND U.USER_PRIV=UP.USER_PRIV";
$cursor = exequery( $connection, $sql );
if ( $row = mysql_fetch_array( $cursor ) )
{
$u_priv = $row['FUNC_ID_STR'];
}
if ( $isimg == true )
{
$imgurl01 = "background=\"/theme/4/bg_mt_line_.gif\"";
$imgurl02 = "background=\"/theme/1/newsbg.gif\"";
$imgurl04 = "";
$strimg = "<img src=\"/theme/1/gray_up_arrow.gif\" width=\"30\" height=\"22\" border=\"0\" id=\"imgarrow08\" title=\"展开/收缩\" onClick=\"ControlContent08();\" style=\"cursor:hand\">";
$td04width = "30";
$tdbgcolor = "#EBEBEB";
$fontstyle = "a";
$jscontrolu = "/theme/1/gray_up_arrow.gif";
$jscontrold = "/theme/1/gray_down_arrow.gif";
}
else
{
$imgurl01 = "background=\"/theme/1/darkheadleft.gif\"";
$imgurl02 = "background=\"/theme/1/darkheadbg.gif\"";
$imgurl04 = "/theme/1/darkheadbg.gif\"";
$strimg = "<img src=\"/theme/1/black_up_arrow.gif\" width=\"19\" height=\"28\" border=\"0\" id=\"imgarrow08\" title=\"展开/收缩\" onClick=\"ControlContent08();\" style=\"cursor:hand\">";
$td04width = "19";
$tdbgcolor = "#ABABAB";
$fontstyle = "b";
$jscontrolu = "/theme/1/black_up_arrow.gif";
$jscontrold = "/theme/1/black_down_arrow.gif";
}
echo "<s";
echo "cript>\r\nfunction ControlContent08(){\r\n if (contentid08.style.display == 'none'){\r\n\t contentid08.style.display = '';\r\n\t\timgarrow08.src = '";
echo $jscontrolu;
echo "';\r\n\t}\r\n else {\r\n\t contentid08.style.display = 'none';\r\n\t\timgarrow08.src = '";
echo $jscontrold;
echo "';\r\n\t}\t\r\n\r\n}\r\n</script>\r\n";
echo "<s";
echo "tyle type=\"text/css\">\r\n<!--\r\n.style2 {\r\n\tfont-size: 10px;\r\n\tfont-family: Arial, Helvetica, sans-serif;\r\n\tfont-style: italic;\r\n}\r\n.style5 {font-size: 12px;\r\nfont-style: italic;\r\n}\r\n.style7 {\r\n\tfont-size: 12px;\r\n\tcolor: #000000;\r\n}\r\n-->\r\n</style>\r\n\r\n<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"/theme/1/newsbg.gif\" align=\"center\">\r\n <tr>\r\n <td width=\"125\" ";
echo $imgurl01;
echo ">\r\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr>\r\n <td width=\"15%\"> </td>\r\n <td height=\"18\">";
if ( !is_priview8( "76,", $u_priv ) )
{
echo "<span style=\"font:bold;\">最近车辆维护记录</span>";
}
else
{
echo "<a href=\"/general/vehicle/maintenance/\" target=\"main\" class=\"".$fontstyle."\">最近车辆维护记录</a>";
}
echo "</td>\r\n </tr>\r\n </table></td>\r\n <td ";
echo $imgurl02;
echo "> </td>\r\n <td width=\"";
echo $td04width;
echo "\" align=\"right\" ";
echo $imgurl04;
echo ">";
echo $strimg;
echo "</td>\r\n </tr>\r\n</table>\r\n<div class=\"small\">\r\n<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"darkbord\" id=\"contentid08\">\r\n";
if ( !is_priview8( "76,", $u_priv ) )
{
echo "<tr><td>";
message( "", "无权查看此栏目!" );
echo "</td></tr>\r\n<tr><td bgcolor=\"";
echo $tdbgcolor;
echo "\" height=\"1\"></td></tr>\r\n";
}
else
{
$connection = openconnection( );
$query = "SELECT a.VM_REQUEST_DATE,a.VM_REASON,a.VM_FEE,a.VM_PERSON,a.VM_REMARK,b.V_NUM ";
$query .= " FROM vehicle_maintenance a, vehicle b WHERE a.V_ID = b.V_ID ORDER BY VM_ID DESC LIMIT 0,5";
$cursor = exequery( $connection, $query );
$VM_COUNT = 0;
$ADD_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
++$VM_COUNT;
++$ADD_COUNT;
$V_NUM = $ROW['V_NUM'];
$VM_REQUEST_DATE = $ROW['VM_REQUEST_DATE'];
$VM_REASON = $ROW['VM_REASON'];
$VM_FEE = $ROW['VM_FEE'];
$VM_PERSON = $ROW['VM_PERSON'];
$VM_REMARK = $ROW['VM_REMARK'];
echo " <tr>\r\n\t\t <td width=\"2%\"></td>\r\n <td><A href ='/general/vehicle/maintenance/' target=\"_parent\">车牌号:\r\n ";
echo $V_NUM;
echo " \r\n\t\t\t <br>维护日期:\t\t\t\r\n\t\t\t";
echo $VM_REQUEST_DATE;
echo "\t\t\t <br>维护费用:\r\n ";
echo $VM_FEE;
echo " </A> <A href ='/general/vehicle/maintenance/' target=\"_parent\">\r\n\t\t\t<br>维护原因:\r\n\t\t\t";
echo $VM_REASON;
echo " </A>\r\n </td>\r\n </tr>\r\n\t\t <tr><td colspan=\"2\" bgcolor=\"";
echo $tdbgcolor;
echo "\" height=\"1\"></td></tr>\r\n ";
}
if ( $ADD_COUNT < 1 )
{
echo " <tr>\r\n\t\t <td width=\"2%\"></td>\r\n <td>没有维护记录</td>\r\n </tr>\r\n\t\t <tr><td colspan=\"2\" bgcolor=\"";
echo $tdbgcolor;
echo "\" height=\"1\"></td></tr>\r\n ";
}
}
echo "</table>\r\n</div>\r\n<br>\r\n\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -