📄 stat_course.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/check_type.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";
$CONDITION_STR = "";
if ( $STAT_SHOU == 1 && $TO_ID != "" )
{
$CONDITION_STR .= " and find_in_set('".$TO_ID."',ATTEND_PERSONS)";
$DISC_STR = "已修课程 ";
}
if ( $STAT_SHOU == 2 && $TO_ID != "" )
{
$CONDITION_STR .= " and (find_in_set('".$TO_ID."',UNATTEND_PERSONS) or find_in_set('{$TO_ID}',NOTATTENDER))";
$DISC_STR = "未修课程 ";
}
if ( $TO_ID == "" )
{
$CONDITION_STR .= "1=2";
}
echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td class=\"Big\"><img src=\"/images/menu/statistic.gif\" width=\"22\" height=\"18\" align=\"absMiddle\"><span class=\"big3\"> 员工培训统计</span><br>\r\n </td>\r\n </tr>\r\n</table>\r\n<br>\r\n";
$query1 = "SELECT * from USER where USER_ID='".$TO_ID."'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW1 = mysql_fetch_array( $cursor1 ) )
{
$USER_NAME = $ROW1['USER_NAME'];
}
$query = "SELECT * from TRAIN_NEWCOURSE where 1=1";
$query .= $CONDITION_STR." order by TRAIN_ID desc";
$cursor = exequery( $connection, $query );
$COURSE_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
++$COURSE_COUNT;
$TRAINING_ID = $ROW['TRAINING_ID'];
$TRAIN_ID = $ROW['TRAIN_ID'];
$TCOURSE_ID = $ROW['TCOURSE_ID'];
$query1 = "SELECT * from TRAIN_COURSES where COURSE_ID='".$TCOURSE_ID."'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW1 = mysql_fetch_array( $cursor1 ) )
{
$COURSE_NAME = $ROW1['COURSE_NAME'];
}
if ( $COURSE_COUNT == 1 )
{
echo "<table class=\"TableList\" width=\"95%\" align=\"center\">\r\n <tr class=\"TableHeader\"> \t \r\n <td nowrap align=\"center\">培训课程编号</td>\r\n <td nowrap align=\"center\">课程名称</td>\r\n <td nowrap align=\"center\">员工姓名</td>\r\n <td nowrap align=\"center\">课程状态</td> \r\n </tr>\r\n";
}
if ( $COURSE_COUNT % 2 == 1 )
{
$TableLine = "TableLine1";
}
else
{
$TableLine = "TableLine2";
}
echo " <tr class=\"";
echo $TableLine;
echo "\">\r\n <td nowrap align=\"center\">";
echo $TRAIN_ID;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $COURSE_NAME;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $USER_NAME;
echo "</td>\r\n \t <td nowrap align=\"center\">";
echo $DISC_STR;
echo "</td>\r\n </tr>\r\n";
}
if ( $COURSE_COUNT == 0 )
{
message( "", "无符合条件的课程" );
button_back( );
exit( );
}
echo "</table>\r\n";
button_back( );
echo "</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -