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

📄 staticspaint.php

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

include_once( "inc/utility_all.php" );
$CUR_DATE = date( "Y-m-d", time( ) );
$CUR_DATE = date( "Y-m-d", time( ) );
$query = "SELECT * from SCORE_DATE where FLOW_ID='".$FLOW_ID."' group by PARTICIPANT";
$cursor = exequery( $connection, $query );
$VOTE_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	$USER_ID[$VOTE_COUNT] = $ROW['PARTICIPANT'];
	$query1 = "SELECT `USER_ID` , `USER_NAME` , PRIV_NAME, DEPT_NAME FROM `USER` a LEFT OUTER JOIN DEPARTMENT b ON a.DEPT_ID = b.DEPT_ID LEFT OUTER JOIN USER_PRIV c ON a.USER_PRIV = c.USER_PRIV where a.USER_ID='".$USER_ID[$VOTE_COUNT]."'";
	$cursor1 = exequery( $connection, $query1 );
	if ( $ROW = mysql_fetch_array( $cursor1 ) )
	{
		$USER_NAME[$VOTE_COUNT] = $ROW['USER_NAME'];
	}
	$USER_PRIV[$VOTE_COUNT] = $ROW['PRIV_NAME'];
	$USER_DEPT[$VOTE_COUNT] = $ROW['DEPT_NAME'];
	++$VOTE_COUNT;
}
$query = "SELECT * from SCORE_ITEM where GROUP_ID='".$GROUP_ID."'";
$cursor = exequery( $connection, $query );
$VOTE_COUNT = 0;
$TOTAL_SAM = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	$ITEM_NAME[$VOTE_COUNT] = $ROW['ITEM_NAME'];
	$TOTAL_SAM += $ROW['MAX'];
	++$VOTE_COUNT;
}
$ARRAY_COUNT = sizeof( $USER_ID );
$I = 0;
for ( ;	$I < $ARRAY_COUNT;	++$I	)
{
	$query1 = "select SCORE from SCORE_DATE  where PARTICIPANT='".$USER_ID[$I]."' and FLOW_ID='{$FLOW_ID}'";
	$cursor1 = exequery( $connection, $query1 );
	$COUNT = 0;
	while ( $ROW = mysql_fetch_array( $cursor1 ) )
	{
		$SCORE = $ROW['SCORE'];
		$MY_SCORE[$I][$COUNT] = explode( ",", $SCORE );
		++$COUNT;
	}
}
$USER_COUNT = sizeof( $USER_ID );
$field_count = sizeof( $MY_SCORE[0][0] );
$count = 0;
for ( ;	$count < $field_count;	++$count	)
{
	$I = 0;
	for ( ;	$I < $USER_COUNT;	++$I	)
	{
		$RECORD_COUNT = sizeof( $MY_SCORE[$I] );
		$field = 0;
		for ( ;	$field < $RECORD_COUNT;	++$field	)
		{
			$MY_SCORESAM[$I][$count] = $MY_SCORESAM[$I][$count] + $MY_SCORE[$I][$field][$count];
			if ( $MY_SCORE[$I][$field][$count] != 0 )
			{
				$MY_SCORECOUNT[$I][$count] = $MY_SCORECOUNT[$I][$count] + 1;
			}
		}
	}
}
$ARRAY_COUNT = sizeof( $USER_NAME );
$I = 0;
for ( ;	$I < $ARRAY_COUNT;	++$I	)
{
	$ARRAY_COUNT1 = sizeof( $MY_SCORESAM[$I] );
	$count = 0;
	for ( ;	$count < $ARRAY_COUNT1 - 1;	++$count	)
	{
		if ( $MY_SCORECOUNT[$I][$count] == "" )
		{
			$MY_AVE[$I][$count] = 0;
		}
		else
		{
			$MY_AVE[$I][$count] = round( $MY_SCORESAM[$I][$count] / $MY_SCORECOUNT[$I][$count], 2 );
		}
	}
}
$ARRAY_COUNT = sizeof( $USER_NAME );
$I = 0;
for ( ;	$I < $ARRAY_COUNT;	++$I	)
{
	$TOTAL = 0;
	$ARRAY_COUNT1 = sizeof( $MY_AVE[$I] );
	$count = 0;
	for ( ;	$count < $ARRAY_COUNT1;	++$count	)
	{
		$TOTAL += $MY_AVE[$I][$count];
	}
	$USER_SAM[$I] = $TOTAL;
}
$ARRAY_STATIS = explode( ",", $STATICS );
$ARRAY_COUNT = sizeof( $ARRAY_STATIS );
$USER_SAM_COUNT = sizeof( $USER_SAM );
$temp = 0;
$a = 0;
$i = 0;
for ( ;	$i < $ARRAY_COUNT;	$i += 2	)
{
	if ( $i + 1 < $ARRAY_COUNT )
	{
		$ARRAY_FIELD[$temp] = $ARRAY_STATIS[$i]."-".$ARRAY_STATIS[$i + 1];
		$FIELD_VALUE = 0;
		$count = 0;
		for ( ;	$count < $USER_SAM_COUNT;	++$count	)
		{
			if ( !( $USER_SAM[$count] <= $ARRAY_STATIS[$i] ) && !( $ARRAY_STATIS[$i + 1] <= $USER_SAM[$count] ) )
			{
				++$FIELD_VALUE;
				$USER_COUNTNAME[$temp][$a] = $USER_ID[$count];
				$a += 1;
			}
		}
		$graphValues[$temp] = $FIELD_VALUE;
	}
	else
	{
		$ARRAY_FIELD[$temp] = $ARRAY_STATIS[$i]."-0";
		$FIELD_VALUE = 0;
		$count = 0;
		for ( ;	$count < $USER_SAM_COUNT;	++$count	)
		{
			if ( !( $USER_SAM[$count] <= $ARRAY_STATIS[$i] ) && !( 0 <= $USER_SAM[$count] ) )
			{
				++$FIELD_VALUE;
				$USER_COUNTNAME[$temp][$a] = $USER_ID[$count];
				$a += 1;
			}
		}
		$graphValues[$temp] = $FIELD_VALUE;
	}
	++$temp;
	$a = 0;
}
$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;
}
$TOTAL = 20;
$imgWidth = sizeof( $ARRAY_FIELD ) * 50 + 20 + 2;
$imgHeight = 525;
$fieldcount = sizeof( $ARRAY_FIELD );
header( "Content-type: image/png" );
$aveWidth = 50;
$aveHeight = 25;
$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, 20, 0, 20, $aveHeight * $TOTAL, $colorGrey );
imageline( $image, 20, 0, $fieldcount * $aveWidth + 20, 0, $colorGrey );
imageline( $image, $fieldcount * $aveWidth + 20, 0, $fieldcount * $aveWidth + 20, $aveHeight * $TOTAL, $colorGrey );
imageline( $image, 20, $aveHeight * $TOTAL, $fieldcount * $aveWidth + 20, $aveHeight * $TOTAL, $colorGrey );
$i = 1;
for ( ;	$i < sizeof( $ARRAY_FIELD );	++$i	)
{
	imageline( $image, $i * $aveWidth + 20, 0, $i * $aveWidth + 20, $aveHeight * $TOTAL, $colorGrey );
}
$i = 1;
for ( ;	$i < 20;	++$i	)
{
	imageline( $image, 20, $i * $aveHeight, $fieldcount * $aveWidth + 20, $i * $aveHeight, $colorGrey );
	imagestring( $image, 3, 0, ( $i - 1 ) * $aveHeight, $field1[$i - 1], $colorDarkBlue );
}
imagestring( $image, 3, 0, ( $i - 1 ) * $aveHeight, $field1[19], $colorDarkBlue );
$i = 0;
for ( ;	$i < 10;	++$i	)
{
	imagefilledrectangle( $image, $i * $aveWidth + 20, $aveHeight * $TOTAL - $graphValues[$i] / $PERT * $aveHeight, ( $i + 1 ) * $aveWidth + 20, $aveHeight * $TOTAL, $colorDarkBlue );
	imagefilledrectangle( $image, $i * $aveWidth + 1 + 20, $aveHeight * $TOTAL - $graphValues[$i] / $PERT * $aveHeight + 1, ( $i + 1 ) * $aveWidth - 5 + 20, $aveHeight * $TOTAL - 2, $colorLightBlue );
	imagestring( $image, 3, $i * $aveWidth + 15 + 20, $aveHeight * $TOTAL - $graphValues[$i] / $PERT * $aveHeight - 15, $graphValues[$i], $colorDarkBlue );
	imagestring( $image, 3, $i * $aveWidth + 20, $imgHeight - 15, $ARRAY_FIELD[$i], $colorDarkBlue );
}
imagepng( $image );
imagedestroy( $image );
echo "\r\n";
?>

⌨️ 快捷键说明

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