📄 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\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n";
$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;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$ITEM_NAME[$VOTE_COUNT] = $ROW['ITEM_NAME'];
++$VOTE_COUNT;
}
$ARRAY_COUNT = sizeof( $USER_ID );
$I = 0;
for ( ; $I < $ARRAY_COUNT; ++$I )
{
$query1 = "select MEMO,a.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='".$USER_ID[$I]."' 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[$I][$COUNT] = explode( ",", $SCORE );
$MY_MEMO[$I][$COUNT] = explode( ",", $MEMO );
if ( $ANONYMITY == "0" )
{
$RANK_NAME[$I][$COUNT] = $ROW['USER_NAME'];
$RANK_PRIV[$I][$COUNT] = $ROW['PRIV_NAME'];
$RANK_DEPT[$I][$COUNT] = $ROW['DEPT_NAME'];
}
else
{
$RANK_NAME[$I][$COUNT] = "****";
$RANK_PRIV[$I][$COUNT] = "****";
$RANK_DEPT[$I][$COUNT] = "****";
}
++$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 );
}
}
}
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 <td class=\"Small\"><b>点击条目显示详细打分情况</b></td>\r\n </tr>\r\n</table>\r\n\r\n\r\n<table width=\"100%\" class=\"TableList\">\r\n\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_COUNT = sizeof( $ITEM_NAME );
$I = 0;
for ( ; $I < $ARRAY_COUNT; ++$I )
{
echo " <td nowrap align=\"center\">";
echo $ITEM_NAME[$I];
echo "</td>\r\n\r\n";
}
echo " <td nowrap align=\"center\">总计</td>\r\n </thead>\r\n";
$ARRAY_COUNT = sizeof( $USER_NAME );
$I = 0;
for ( ; $I < $ARRAY_COUNT; ++$I )
{
$TOTAL = 0;
echo " <tr class=\"TableLine1\" style=\"cursor:hand\" onClick=\"td_detail('";
echo $I;
echo "');\" title=\"单击查看评分明细\">\r\n \t<td align=\"center\">";
echo $USER_DEPT[$I];
echo "</td>\r\n \t<td align=\"center\">";
echo $USER_NAME[$I];
echo "</td>\r\n \t<td align=\"center\">";
echo $USER_PRIV[$I];
echo "</td>\r\n";
$ARRAY_COUNT1 = sizeof( $MY_AVE[$I] );
$colnumber = $ARRAY_COUNT1 + 4;
$count = 0;
for ( ; $count < $ARRAY_COUNT1; ++$count )
{
$TOTAL += $MY_AVE[$I][$count];
echo " <td align=\"center\">";
echo $MY_AVE[$I][$count];
echo "</td>\r\n\r\n";
}
echo " <td nowrap align=\"center\">";
echo $TOTAL;
echo "</td>\r\n </tr>\r\n <tr class=\"TableData\" id=";
echo $I;
echo " style=\"display:none\" onDblClick=\"td_close('";
echo $I;
echo "');\" title=\"双击关闭子窗口\">\r\n\r\n <td align=\"left\" colspan=";
echo $colnumber;
echo ">\r\n \t<br>\r\n \t<table border=\"0\" width=\"60%\" cellspacing=\"1\" cellpadding=\"3\" bgcolor=\"#000000\" class=\"small\">\r\n\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 "\r\n </thead>\r\n";
$SON_COUNT = sizeof( $RANK_NAME[$I] );
$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[$I][$SON_I];
echo "</td>\r\n \t<td align=\"center\">";
echo $RANK_NAME[$I][$SON_I];
echo "</td>\r\n \t <td align=\"center\">";
echo $RANK_PRIV[$I][$SON_I];
echo "</td>\r\n";
$SON_COUNT1 = sizeof( $MY_SCORE[$I][$SON_I] );
$soncount = 0;
for ( ; $soncount < $SON_COUNT1 - 1; ++$soncount )
{
if ( $MY_SCORE[$I][$SON_I][$soncount] == "" )
{
$SON_TOTAL += 0;
}
else
{
$SON_TOTAL += $MY_SCORE[$I][$SON_I][$soncount];
}
echo " <td align=\"center\" nowrap>";
echo $MY_SCORE[$I][$SON_I][$soncount];
echo "<br>\r\n";
if ( $MY_MEMO[$I][$SON_I][$soncount] != "" )
{
echo " <span class=\"big4\">(批注:";
echo $MY_MEMO[$I][$SON_I][$soncount];
echo ")</span>\r\n";
}
echo " \r\n \r\n </td>\r\n\r\n";
}
echo "\r\n </tr>\r\n";
}
echo " </table>\r\n <br>\r\n </td>\r\n </tr>\r\n";
}
echo "\r\n\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 + -