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

📄 staticspaint.php

📁 通达网络办公 - Office Anywhere 2008 增强版100%源码(3.4.081216) 内含 通达OA2008增強版接近完美破解补丁20081216集 及 最新通达OA2008ADV(
💻 PHP
字号:
<?php

include_once( "inc/utility_all.php" );
include( "inc/jpgraph/jpgraph.php" );
include( "inc/jpgraph/jpgraph_pie.php" );
include( "inc/jpgraph/jpgraph_pie3d.php" );
include( "inc/jpgraph/jpgraph_gb2312.php" );
$CUR_DATE = date( "Y-m-d", time( ) );
$ARRAY_FIELD = explode( ",", $ARRAY_FIELD1 );
$GRAPHVALUES = explode( ",", $GRAPHVALUES1 );
$ARRAY_COUNT = sizeof( $GRAPHVALUES );
$MAX_Values = $GRAPHVALUES[0];
$I = 1;
for ( ;	$I < $ARRAY_COUNT;	++$I	)
{
	if ( $MAX_Values < $GRAPHVALUES[$I] )
	{
		$MAX_Values = $GRAPHVALUES[$I];
	}
}
$TOTAL = ceil( $MAX_Values / 20 ) * 20;
if ( $TOTAL == 0 )
{
	$TOTAL = 20;
}
$PERT = $TOTAL / 20;
$field1[0] = $TOTAL;
$temp = 1;
while ( 0 < $TOTAL )
{
	$TOTAL -= $PERT;
	$field1[$temp] = $TOTAL;
	$temp += 1;
}
( );
$g2312 = new GB2312toUTF8( );
$TOTAL = 20;
$aveWidth = 35;
$aveHeight = 15;
$imgWidth = sizeof( $ARRAY_FIELD ) * $aveWidth + 20 + 40;
$imgHeight = $aveHeight * 20 + 35 + 50;
$fieldcount = sizeof( $ARRAY_FIELD );
( );
$test = new TTF( );
$font = $test->File( FF_SIMSUN, FS_BOLD );
header( "Content-type: image/png" );
$image = imagecreate( $imgWidth, $imgHeight );
$colorWhite = imagecolorallocate( $image, 255, 255, 255 );
$colorGrey = imagecolorallocate( $image, 192, 192, 192 );
$colorDarkBlue = imagecolorallocate( $image, 104, 157, 228 );
$colorLightBlue = imagecolorallocate( $image, 184, 212, 250 );
imageline( $image, 30, 20, 30, $aveHeight * $TOTAL + 20, $colorGrey );
imageline( $image, 30, 20, $fieldcount * $aveWidth + 20 + 10, 20, $colorGrey );
imageline( $image, $fieldcount * $aveWidth + 20 + 10, 20, $fieldcount * $aveWidth + 20 + 10, $aveHeight * $TOTAL + 20, $colorGrey );
imageline( $image, 30, $aveHeight * $TOTAL + 20, $fieldcount * $aveWidth + 20 + 10, $aveHeight * $TOTAL + 20, $colorGrey );
$i = 1;
for ( ;	$i < sizeof( $ARRAY_FIELD );	++$i	)
{
	imageline( $image, $i * $aveWidth + 20 + 10, 20, $i * $aveWidth + 20 + 10, $aveHeight * $TOTAL + 20, $colorGrey );
}
$i = 1;
for ( ;	$i < 20;	++$i	)
{
	imageline( $image, 30, $i * $aveHeight + 20, $fieldcount * $aveWidth + 20 + 10, $i * $aveHeight + 20, $colorGrey );
	imagestring( $image, 2, 12, ( $i - 1 ) * $aveHeight + 20, $field1[$i - 1], $colorDarkBlue );
}
imagestring( $image, 2, 12, ( $i - 1 ) * $aveHeight + 20, $field1[19], $colorDarkBlue );
$i = 0;
for ( ;	$i < sizeof( $ARRAY_FIELD );	++$i	)
{
	imagefilledrectangle( $image, $i * $aveWidth + 20 + 10, $aveHeight * $TOTAL - $GRAPHVALUES[$i] / $PERT * $aveHeight + 20, ( $i + 1 ) * $aveWidth + 20 + 10, $aveHeight * $TOTAL + 20, $colorDarkBlue );
	imagefilledrectangle( $image, $i * $aveWidth + 1 + 20 + 10, $aveHeight * $TOTAL - $GRAPHVALUES[$i] / $PERT * $aveHeight + 2 + 20, ( $i + 1 ) * $aveWidth - 7 + 20 + 10, $aveHeight * $TOTAL - 2 + 20, $colorLightBlue );
	imagestring( $image, 3, $i * $aveWidth + 23 + 10, $aveHeight * $TOTAL - $GRAPHVALUES[$i] / $PERT * $aveHeight - 15 + 20, $GRAPHVALUES[$i], $colorDarkBlue );
	$temptitle = $g2312->gb2utf8( $ARRAY_FIELD[$i] );
	imagettftext( $image, 10, 325, $i * $aveWidth + 32, $imgHeight - 125 + 70, $colorDarkBlue, $font, $temptitle );
}
imagepng( $image );
imagedestroy( $image );
echo "\r\n";
?>

⌨️ 快捷键说明

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