📄 flow_report_img_year_pie.php
字号:
<?php
header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
header( "Cache-Control: no-cache, must-revalidate" );
header( "Pragma: no-cache" );
include_once( "inc/img_pie.inc.php" );
include_once( "inc/auth_nohtml.php" );
$sql = "SELECT * FROM flow_report WHERE REPORT_ID=".$_REQUEST['REPORT_ID']."";
$rs = exequery( $connection, $sql );
$row = mysql_fetch_array( $rs );
$reportname = $row['REPORT_NAME'];
$sql = "SELECT ft.FLOW_NAME FROM flow_type ft,flow_report fr WHERE ft.FLOW_ID=fr.FLOW_ID AND fr.REPORT_ID=".$_REQUEST['REPORT_ID'];
$rs = exequery( $connection, $sql );
$row = mysql_fetch_array( $rs );
$flowname = $row['FLOW_NAME'];
$sql = "SELECT * FROM flow_report_field WHERE FIELD_IMG=1 AND REPORT_ID=".$_REQUEST['REPORT_ID'];
$rs = exequery( $connection, $sql );
while ( $row = mysql_fetch_array( $rs ) )
{
$fdarray[] = $row['FIELD_NAME'];
}
$randyear = rand( 1996, 2010 );
$n = rand( 0, 2 );
$m = pow( 10, $n );
$i = 1;
for ( ; $i <= count( $fdarray ); ++$i )
{
$array[$i]['x'] = $fdarray[$i - 1];
$min = 5 * $m;
$xx_i = 5 < $i ? 5 : $i;
$max = $xx_i * 10 * 2 * $m;
$array[$i]['y'] = rand( $min, $max );
}
$charhead = $reportname."(".$randyear."年".")";
$today = date( "Y-m-d H:i" );
$bottomnote = "报表生成日期时间".$today;
$subhead = $flowname." -- ".rand( 1, 15000 )." 条数据";
$cx = rand( 1, 2 );
$xtotal = count( $array );
$relp = new reportpieimg( );
$relp->definepic( "png", 700, 300 );
$relp->definepictinct( "gray02", "gray00", "gray01", "black" );
$relp->definecdpar( $xtotal, 1, "", 100 * $m, 10 * $m * $cx, "数值" );
$relp->definelppar( true, true, 0.6, 100 );
$relp->decorateimg( $charhead = $charhead, $subhead = $subhead, $bottomnote = $bottomnote, $leftnote = "", $picname = "" );
$relp->drawbasiccoordinate( $array );
$relp->drawreportpie( $array );
$relp->outimg( );
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -