📄 11.php
字号:
<?php
function is_priview11( $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=\"imgarrow11\" title=\"展开/收缩\" >";
$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=\"imgarrow11\" title=\"展开/收缩\" >";
$td04width = "19";
$tdbgcolor = "#ABABAB";
$fontstyle = "b";
$jscontrolu = "/theme/1/black_up_arrow.gif";
$jscontrold = "/theme/1/black_down_arrow.gif";
}
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";
echo "<S";
echo "CRIPT language=javascript>\r\n<!--\r\nfunction left_menu11(meval)\r\n{\r\n var left_n=eval(meval);\r\n if (left_n.style.display==\"none\")\r\n { eval(meval+\".style.display='';\");\r\n imgarrow11.src = '";
echo $jscontrolu;
echo "';\r\n }\r\n else\r\n { eval(meval+\".style.display='none';\"); \r\n imgarrow11.src = '";
echo $jscontrold;
echo "';\r\n }\r\n}\r\n//document.all.left_sys.style.display='';\r\n//document.all.left_bm.style.display='none'\r\n-->\r\n</SCRIPT>\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=\"88\" ";
echo $imgurl01;
echo "><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_priview11( "46,", $u_priv ) )
{
echo "<span style=\"font:bold;\">最新产品</span>";
}
else
{
echo "<a href=\"/general/sale/product/query/list.php\" 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 "><a href=\"#\" onclick=\"javascript:left_menu11('left_11');\" onFocus=\"this.blur()\">\r\n ";
echo $strimg;
echo " </a></td>\r\n </tr>\r\n</table>\r\n<div class=\"small\">\r\n <table width=\"100%\" id=\"left_11\" style=\"DISPLAY: \" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"darkbord\">\r\n ";
if ( !is_priview11( "46,", $u_priv ) )
{
echo " <tr>\r\n <td>";
message( "", "无权查看此栏目!" );
echo "</td>\r\n </tr>\r\n <tr>\r\n <td bgcolor=\"";
echo $tdbgcolor;
echo "\" height=\"1\"></td>\r\n </tr>\r\n ";
}
else
{
$connection = openconnection( );
$query = "SELECT PRODUCT_ID,PRODUCT_NAME,STANDARD_PRICE FROM product ORDER BY PRODUCT_ID DESC LIMIT 0,5 ";
$cursor = exequery( $connection, $query );
$ADD_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
++$ADD_COUNT;
$pro_id = $ROW['PRODUCT_ID'];
$pro_name = $ROW['PRODUCT_NAME'];
$pro_price = $ROW['STANDARD_PRICE'];
echo " <tr height=\"20\">\r\n <td width=\"2%\"></td>\r\n <td><a href=\"javascript:detail('";
echo $pro_id;
echo "');\">产品名称:\r\n ";
echo $pro_name;
echo " / 出售价:\r\n ";
echo $pro_price;
echo " <br>\r\n </A></td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"2\" bgcolor=\"";
echo $tdbgcolor;
echo "\" height=\"1\"></td>\r\n </tr>\r\n ";
}
if ( $ADD_COUNT < 1 )
{
echo " <tr>\r\n <td width=\"2%\"> </td>\r\n <td>没有产品</td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"2\" bgcolor=\"";
echo $tdbgcolor;
echo "\" height=\"1\"></td>\r\n </tr>\r\n ";
}
}
echo " </table>\r\n</div>\r\n<br>\r\n";
echo "<s";
echo "cript>\r\nfunction detail(PRODUCT_ID)\r\n{\r\n URL=\"/general/sale/product/query/detail.php?PRODUCT_ID=\"+PRODUCT_ID;\r\n myleft=(screen.availWidth-500)/2;\r\n window.open(URL,\"read_notify\",\"height=240,width=500,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left=\"+myleft+\",resizable=yes\");\r\n}\r\n</script>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -