📄 submit_paper.php
字号:
<?php
include_once( "inc/auth.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 \r\n <br>\r\n <div align=\"center\">\r\n <input type=\"button\" value=\"返回\" class=\"BigButton\" name=\"button\" onClick=\"location='";
echo $URL;
echo "'\">\r\n </div>\r\n\r\n";
if ( $ACTION != "REVIEW" )
{
$query1 = "SELECT * from EXAM_DATA where PARTICIPANT='".$LOGIN_USER_ID."' and FLOW_ID={$FLOW_ID}";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$ANSWER = $ROW['ANSWER'];
$SCORE = $ROW['SCORE'];
$ANSWER_ARRAY = explode( ",", $ANSWER );
$SCORE_ARRAY = explode( ",", $SCORE );
}
$QUESTIONS_ARRAY = explode( ",", $QUESTIONS_PAGE );
$QUESTIONS_TYPE_ARRAY = explode( ",", $QUESTIONS_TYPE_LIST );
$count = count( $QUESTIONS_ARRAY );
$index = 0;
$START = ( $CUR_PAGE - 1 ) * $PER_PAGE;
$i = $START;
for ( ; $i < $START + $count; ++$i )
{
$QUESTIONS_ID = $QUESTIONS_ARRAY[$index];
$DATA_NAME_A = "ANSWER_A".$QUESTIONS_ID;
$DATA_NAME_B = "ANSWER_B".$QUESTIONS_ID;
$DATA_NAME_C = "ANSWER_C".$QUESTIONS_ID;
$DATA_NAME_D = "ANSWER_D".$QUESTIONS_ID;
$DATA_NAME_E = "ANSWER_E".$QUESTIONS_ID;
$DATA_NAME = "ANSWER".$QUESTIONS_ID;
if ( $QUESTIONS_TYPE_ARRAY[$index] == "0" )
{
$DATA_VALUE = $$DATA_NAME;
}
else if ( $QUESTIONS_TYPE_ARRAY[$index] == "1" )
{
$DATA_VALUE = $$DATA_NAME_A.$$DATA_NAME_B.$$DATA_NAME_C.$$DATA_NAME_D.$$DATA_NAME_E;
}
$ANSWER_ARRAY[$i] = $DATA_VALUE;
$query2 = "SELECT ANSWERS from EXAM_QUIZ where QUESTIONS_ID=".$QUESTIONS_ID;
$cursor2 = exequery( $connection, $query2 );
if ( $ROW2 = mysql_fetch_array( $cursor2 ) )
{
$ANSWERS = $ROW2['ANSWERS'];
}
if ( $DATA_VALUE == $ANSWERS )
{
$SCORE_ARRAY[$i] = 1;
}
else
{
$SCORE_ARRAY[$i] = 0;
}
++$index;
}
$ANSWER = implode( ",", $ANSWER_ARRAY );
$SCORE = implode( ",", $SCORE_ARRAY );
$query = "update EXAM_DATA set SCORE='".$SCORE."',ANSWER='{$ANSWER}' where FLOW_ID={$FLOW_ID} and PARTICIPANT='{$LOGIN_USER_ID}'";
exequery( $connection, $query );
message( "提示", $LOGIN_USER_ID." 的考试数据保存" );
}
echo "\r\n<br>\r\n</body>\r\n</html>\r\n<script>\r\n //URL=\"user_list.php?FLOW_ID=\"+'";
echo $FLOW_ID;
echo "';\r\n //parent.frames[\"user_list\"].location=URL;\r\n</script>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -