Example #1
0
<?php

include_once "include/db.php";
include_once "include/func_category.php";
$conn_ategory = new Category();
//print_r($_POST);exit;
if ($_POST["submitType"] == "editQuestion") {
    $page_title = "修改題目";
    $question_id = $_POST["postQ"];
    $question_result = $conn_ategory->getQuestionList($question_id, '', '', '', '', '', '', '');
    $exam_id = $question_result[0]["exam_id"];
    $q_item_id = $question_result[0]["item_id"];
    //print_r($question_result);exit;
    $question_item_result = $conn_ategory->getItemList($q_item_id);
    $question_subject_result = $conn_ategory->getSubjectList($question_item_result[0]["subject_id"], $question_item_result[0]["sub_id"]);
    $q_category_id = $question_subject_result[0]["category_id"];
    $q_subject_id = $question_item_result[0]["subject_id"] . "-" . $question_item_result[0]["sub_id"];
    $q_chapter_id = $question_item_result[0]["chapter_id"];
    $q_section_id = $question_item_result[0]["section_id"];
    $q_part_id = $question_item_result[0]["part_id"];
    //$exam_result = $conn_ategory->getExamList($exam_id);
    //$question_exam_result = $conn_ategory->getExamList('');
}
$result = $conn_ategory->getCategoryList('');
$subject_result = $conn_ategory->getSubjectList('', '');
$chapter_result = $conn_ategory->getChapterList('');
$section_result = $conn_ategory->getSectionList('');
$part_result = $conn_ategory->getPartList('');
$item_result = $conn_ategory->getItemList('');
$exam_result = $conn_ategory->getExamList('');
//print_r($part_result);
Example #2
0
include_once "include/db.php";
include_once "include/func_category.php";
$conn_ategory = new Category();
//print_r($_POST);
//exit;
$postCategory = $_POST["jcategory"];
$postSubject = $_POST["jsubject"];
$postChapter = $_POST["jchapter"];
$postSection = $_POST["jsection"];
$postPart = $_POST["jpart"];
$postItem = $_POST["jitem"];
$postExam = $_POST["jexam"];
$submitType = $_POST["submitType"];
if (!empty($postItem) || !empty($postExam)) {
    $search_result = $conn_ategory->getQuestionList('', '', '', '', '', $postExam, '', $postItem);
} else {
    $return_mesg = "資料不齊全!";
}
include_once "include/header.php";
?>
<!-- container -->
<div class="container">
	<!-- widget -->
	<div class="widget customer">
		<div class="hd">
			<h2>題目列表</h2>
		</div>
		<div class="body">
			<!-- content -->
			<div class="content">