?? new.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\r\n<script Language=\"JavaScript\">\r\nfunction CheckForm()\r\n{\r\n if(document.form1.PAPER_DESC.value==\"\")\r\n { alert(\"試卷說明不能為空!\");\r\n return (false);\r\n }\r\n document.form1.submit();\r\n}\r\n\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n";
if ( $PAPER_ID != "" )
{
$query = "SELECT * from TRAIN_TEST_PAPER where PAPER_ID=".$PAPER_ID;
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$PAPER_DESC = $ROW['PAPER_DESC'];
$PAPER_GRADE = $ROW['PAPER_GRADE'];
$QUESTIONS_COUNT = $ROW['QUESTIONS_COUNT'];
$PAPER_TIMES = $ROW['PAPER_TIMES'];
$BEGIN_DATE = $ROW['BEGIN_DATE'];
$END_DATE = $ROW['END_DATE'];
$ROOM_ID = $ROW['ROOM_ID'];
$QUESTIONS_TYPE = $ROW['QUESTIONS_TYPE'];
$QUESTIONS_RANK = $ROW['QUESTIONS_RANK'];
if ( $BEGIN_DATE == "0000-00-00" )
{
$BEGIN_DATE = "";
}
if ( $END_DATE == "0000-00-00" )
{
$END_DATE = "";
}
}
if ( $ROOM_ID != 0 )
{
$str = " and ROOM_ID=".$ROOM_ID;
}
if ( $QUESTIONS_TYPE != "" )
{
$str .= " and QUESTIONS_TYPE=".$QUESTIONS_TYPE;
}
if ( $QUESTIONS_RANK != "" )
{
$str .= " and QUESTIONS_RANK=".$QUESTIONS_RANK;
}
$query = "SELECT count(*) from TRAIN_TEST_QUESTIONS where 1=1 ".$str;
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$QUESTIONS_COUNT0 = $ROW[0];
}
}
echo "<table border=\"0\" width=\"90%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td class=\"Big\"><img src=\"/images/notify_new.gif\" align=\"absmiddle\"><span class=\"big3\"> ";
if ( $PAPER_ID != "" )
{
echo "修改";
}
else
{
echo "新建";
}
echo "試卷</span>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<table class=\"TableList\" width=\"70%\" align=\"center\">\r\n <form enctype=\"multipart/form-data\" action=\"add.php\" method=\"post\" name=\"form1\">\r\n <tr class=\"TableHeader\">\r\n <td colspan=\"4\" nowrap>\r\n\t 基本信息\r\n </td>\r\n\t</tr>\r\n\t<tr>\r\n <td nowrap class=\"TableData\">總分:</td>\r\n <td class=\"TableData\">\r\n <input type=text name=\"PAPER_GRADE\" class=\"BigInput\" size=10 maxlength=\"100\" value=";
echo $PAPER_GRADE;
echo ">\r\n </td>\r\n <td nowrap class=\"TableData\">試題數量:</td>\r\n <td class=\"TableData\">\r\n <input type=text name=\"QUESTIONS_COUNT\" class=\"BigInput\" size=10 maxlength=\"100\" value=";
echo $QUESTIONS_COUNT;
echo ">\r\n </td>\r\n </tr>\r\n\t<tr>\r\n <td nowrap class=\"TableData\">考試時長:</td>\r\n <td class=\"TableData\">\r\n <input type=text name=\"PAPER_TIMES\" class=\"BigInput\" size=10 maxlength=\"100\" value=";
echo $PAPER_TIMES;
echo "> 分鐘\r\n </td>\r\n <td nowrap class=\"TableData\">有效期:</td>\r\n <td class=\"TableData\">\r\n 生效日期:<input type=\"text\" name=\"BEGIN_DATE\" size=\"10\" maxlength=\"10\" class=\"BigInput\" value=\"";
echo $BEGIN_DATE;
echo "\">\r\n <img src=\"/images/menu/calendar.gif\" align=\"absMiddle\" border=\"0\" style=\"cursor:hand\" onclick=\"td_calendar('form1.BEGIN_DATE');\">\r\n 為空為立即生效<br>\r\n 終止日期:<input type=\"text\" name=\"END_DATE\" size=\"10\" maxlength=\"10\" class=\"BigInput\" value=\"";
echo $END_DATE;
echo "\">\r\n <img src=\"/images/menu/calendar.gif\" align=\"absMiddle\" border=\"0\" style=\"cursor:hand\" onclick=\"td_calendar('form1.END_DATE');\">\r\n 為空為手動終止\r\n </td>\r\n </tr>\r\n\t<tr>\r\n <td nowrap class=\"TableData\">試卷說明:</td>\r\n <td class=\"TableData\" colspan=\"3\">\r\n <textarea name=\"PAPER_DESC\" class=\"BigInput\" cols=\"50\" rows=\"3\">";
echo $PAPER_DESC;
echo "</textarea>\r\n </td>\r\n </tr>\r\n <tr class=\"TableHeader\">\r\n <td colspan=\"4\" nowrap>\r\n\t 題目篩選\r\n </td>\r\n\t</tr>\r\n <tr>\r\n <td nowrap class=\"TableData\"> 所屬題庫:</td>\r\n <td class=\"TableData\">\r\n <select name=\"ROOM_ID\" class=\"BigSelect\">\r\n\t<option value=\"0\" ";
if ( 0 == $ROOM_ID )
{
echo "selected";
}
echo ">全部</option>\r\n";
$query1 = "SELECT * from TRAIN_TEST_ROOM";
$cursor1 = exequery( $connection, $query1 );
while ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$ROOM_ID1 = $ROW['ROOM_ID'];
$ROOM_NAME = $ROW['ROOM_NAME'];
echo "\t<option value=\"";
echo $ROOM_ID1;
echo "\" ";
if ( $ROOM_ID1 == $ROOM_ID )
{
echo "selected";
}
echo ">";
echo $ROOM_NAME;
echo "</option>\r\n";
}
echo " </select>\r\n </td>\r\n <td nowrap class=\"TableData\"> 題型:</td>\r\n <td class=\"TableData\">\r\n <select name=\"QUESTIONS_TYPE\" class=\"BigSelect\">\r\n\t<option value=\"\" ";
if ( "" == $QUESTIONS_TYPE )
{
echo "selected";
}
echo ">全部</option>\r\n\t<option value=\"0\" ";
if ( $QUESTIONS_TYPE == "0" )
{
echo "selected";
}
echo ">單選</option>\r\n\t<option value=\"1\" ";
if ( $QUESTIONS_TYPE == "1" )
{
echo "selected";
}
echo ">多選</option>\r\n </select>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td nowrap class=\"TableData\"> 難度:</td>\r\n <td class=\"TableData\">\r\n <select name=\"QUESTIONS_RANK\" class=\"BigSelect\">\r\n\t<option value=\"\" ";
if ( "" == $QUESTIONS_RANK )
{
echo "selected";
}
echo ">全部</option>\r\n\t<option value=\"0\" ";
if ( $QUESTIONS_RANK == "0" )
{
echo "selected";
}
echo ">低</option>\r\n\t<option value=\"1\" ";
if ( $QUESTIONS_RANK == "1" )
{
echo "selected";
}
echo ">中</option>\r\n\t<option value=\"2\" ";
if ( $QUESTIONS_RANK == "2" )
{
echo "selected";
}
echo ">高</option>\r\n </select>\r\n </td>\r\n <td nowrap class=\"TableData\"> 題數:</td>\r\n <td class=\"TableData\">\r\n";
echo $QUESTIONS_COUNT0;
echo "</td>\r\n </tr>\r\n <tr align=\"center\" class=\"TableControl\">\r\n <td colspan=\"4\" nowrap>\r\n <input type=\"hidden\" name=\"PAPER_ID\" value=\"";
echo $PAPER_ID;
echo "\">\r\n <input type=\"hidden\" name=\"CUR_PAGE\" value=\"";
echo $CUR_PAGE;
echo "\">\r\n <input type=\"button\" value=\"保存\" class=\"BigButton\" onclick=\"CheckForm();\"> \r\n <input type=\"reset\" value=\"重填\" class=\"BigButton\"> \r\n";
if ( $PAPER_ID != "" )
{
echo " <input type=\"button\" value=\"返回\" class=\"BigButton\" onclick=\"location='index1.php?CUR_PAGE=\$CUR_PAGE'\">\r\n";
}
echo " </td>\r\n </tr>\r\n </table>\r\n</form>\r\n\r\n</body>\r\n</html>";
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -