📄 query.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
echo "\r\n<html>\r\n<head>\r\n<title>考核数据</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n</head>\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n";
$CUR_DATE = date( "Y-m-d", time( ) );
$query = "SELECT * from SCORE_ITEM where GROUP_ID='".$GROUP_ID."'";
$cursor = exequery( $connection, $query );
$VOTE_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$ITEM_NAME[$VOTE_COUNT] = $ROW['ITEM_NAME'];
$POWER[$VOTE_COUNT] = $ROW['POWER'];
++$VOTE_COUNT;
}
$query1 = "select MEMO,SCORE,`USER_NAME` , PRIV_NAME, DEPT_NAME FROM SCORE_DATE a LEFT OUTER JOIN USER b ON a.RANKMAN = b.USER_ID LEFT OUTER JOIN USER_PRIV c ON b.USER_PRIV = c.USER_PRIV LEFT OUTER JOIN DEPARTMENT d ON d.DEPT_ID = b.DEPT_ID where PARTICIPANT='".$LOGIN_USER_ID."' and FLOW_ID='{$FLOW_ID}'";
$cursor1 = exequery( $connection, $query1 );
$COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$SCORE = $ROW['SCORE'];
$MEMO = $ROW['MEMO'];
$MY_SCORE[$COUNT] = explode( ",", $SCORE );
if ( $VIEW_TYPE == 0 )
{
$J = 0;
for ( ; $J < count( $POWER ); ++$J )
{
if ( $POWER[$J] != 0 )
{
$MY_SCORE[$COUNT][$J] *= $POWER[$J];
}
}
}
$MY_MEMO[$COUNT] = explode( ",", $MEMO );
if ( $ANONYMITY == "0" )
{
$RANK_NAME[$COUNT] = $ROW['USER_NAME'];
$RANK_PRIV[$COUNT] = $ROW['PRIV_NAME'];
$RANK_DEPT[$COUNT] = $ROW['DEPT_NAME'];
}
else
{
$RANK_NAME[$COUNT] = "****";
$RANK_PRIV[$COUNT] = "****";
$RANK_DEPT[$COUNT] = "****";
}
++$COUNT;
}
$field_count = sizeof( $MY_SCORE[0] );
$count = 0;
for ( ; $count < $field_count; ++$count )
{
$RECORD_COUNT = sizeof( $MY_SCORE );
$field = 0;
for ( ; $field < $RECORD_COUNT; ++$field )
{
$MY_SCORESAM[$count] = $MY_SCORESAM[$count] + $MY_SCORE[$field][$count];
if ( $MY_SCORE[$field][$count] != 0 )
{
$MY_SCORECOUNT[$count] = $MY_SCORECOUNT[$count] + 1;
}
}
}
$ARRAY_COUNT1 = sizeof( $MY_SCORESAM );
$count = 0;
for ( ; $count < $ARRAY_COUNT1 - 1; ++$count )
{
if ( $MY_SCORECOUNT[$count] == "" )
{
$MY_AVE[$count] = 0;
}
else
{
$MY_AVE[$count] = round( $MY_SCORESAM[$count] / $MY_SCORECOUNT[$count], 2 );
}
}
echo "\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td class=\"Big\"><img src=\"/images/notify_open.gif\" align=\"absmiddle\"><span class=\"big3\"> 考核数据查询</span>\r\n <input type=\"button\" value=\"关闭\" class=\"SmallButton\" onclick=\"window.close();\">\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"3\" bgcolor=\"#000000\" class=\"small\">\r\n <thead class=\"TableHeader\">\r\n \t <td nowrap align=\"center\">部门</td>\r\n \t <td nowrap align=\"center\">评分人姓名</td>\r\n \t <td nowrap align=\"center\">角色</td>\r\n";
$ARRAY_COUNT2 = sizeof( $ITEM_NAME );
$I2 = 0;
for ( ; $I2 < $ARRAY_COUNT2; ++$I2 )
{
echo " <td nowrap align=\"center\">";
echo $ITEM_NAME[$I2];
echo "</td>\r\n\r\n";
}
echo " \t <td nowrap align=\"center\">总计</td>\r\n\r\n </thead>\r\n";
$SON_COUNT = sizeof( $RANK_NAME );
$SON_I = 0;
for ( ; $SON_I < $SON_COUNT; ++$SON_I )
{
$SON_TOTAL = 0;
echo " <tr class=\"TableData\" >\r\n \t <td align=\"center\">";
echo $RANK_DEPT[$SON_I];
echo "</td>\r\n \t<td align=\"center\">";
echo $RANK_NAME[$SON_I];
echo "</td>\r\n \t <td align=\"center\">";
echo $RANK_PRIV[$SON_I];
echo "</td>\r\n";
$SON_COUNT1 = sizeof( $MY_SCORE[$SON_I] );
$soncount = 0;
for ( ; $soncount < $SON_COUNT1 - 1; ++$soncount )
{
if ( $MY_SCORE[$SON_I][$soncount] == "" )
{
$SON_TOTAL += 0;
}
else
{
$SON_TOTAL += $MY_SCORE[$SON_I][$soncount];
}
echo " <td align=\"center\" nowrap>";
echo $MY_SCORE[$SON_I][$soncount];
echo "<br>\r\n";
if ( $MY_MEMO[$SON_I][$soncount] != "" )
{
echo " <span class=\"big4\">(批注:";
echo $MY_MEMO[$SON_I][$soncount];
echo ")</span>\r\n";
}
echo " \r\n \r\n </td>\r\n\r\n";
}
echo " \t <td nowrap align=\"center\">";
echo $SON_TOTAL;
echo "</td>\r\n\r\n </tr>\r\n";
}
if ( $SON_COUNT != 0 )
{
echo " <tr class=\"TableLine1\" style=\"cursor:hand\">\r\n \t<td align=\"center\">平均分:</td>\r\n \t<td align=\"center\" colspan=2></td>\r\n";
$ARRAY_COUNT1 = sizeof( $MY_AVE );
$colnumber = $ARRAY_COUNT1 + 4;
$count = 0;
for ( ; $count < $ARRAY_COUNT1; ++$count )
{
$TOTAL += $MY_AVE[$count];
echo " <td align=\"center\">";
echo $MY_AVE[$count];
echo "</td>\r\n\r\n";
}
echo " <td nowrap align=\"center\">";
echo $TOTAL;
echo "</td>\r\n </tr>\r\n";
}
echo "\r\n</table>\r\n</body>\r\n</html>\r\n<script Language=\"JavaScript\">\r\n\r\n function td_detail(I)\r\n{\r\n if(document.all(I).style.display==\"none\")\r\n {document.all(I).style.display=\"\";\r\n document.all(I).style.cursor=\"hand\";\r\n \t}\r\n else\r\n \tdocument.all(I).style.display=\"none\";\r\n\r\n}\r\n\r\n function td_close(I)\r\n{\r\n\r\n \tdocument.all(I).style.display=\"none\";\r\n\r\n}\r\n</script>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -