} } else { if ($_POST["submitType"] == "新增節") { $jsubject = $_POST["postSubject"]; $jchapter = $_POST["postChapter"]; $pieces = explode("-", $jsubject); $subject_id = $pieces[0]; $sub_id = $pieces[1]; //print_r($jsubject); if (empty($jchapter)) { $returnMesg = "請重新選擇章"; } else { if (empty($jsubject)) { $returnMesg = "資料不齊全"; } else { $conn_ategory->addSection($subject_id, $sub_id, $jchapter, $addData); $returnMesg = "節輸入成功"; } } } else { if ($_POST["submitType"] == "新增小節") { $jsubject = $_POST["postSubject"]; $jchapter = $_POST["postChapter"]; $jsection = $_POST["postSection"]; $pieces = explode("-", $jsubject); $subject_id = $pieces[0]; $sub_id = $pieces[1]; if (empty($jsection)) { $returnMesg = "請重新選擇節"; } else { if (empty($jchapter)) {