questioning.php
1.13 KB
<?php
if(isset($_POST['save'])){
$objQuestioning->trim($_POST);
if(!$objQuestioning->valid($_POST)){
$saveId = $objQuestioning->SaveQuestioning($_POST);
if(!$_POST['update_id']){
$data = array('parent_table'=>"questioning",'parent_table_id'=>$saveId,'data'=>$_POST);
$objForum->SaveTopic($data,$_FILES);
}
header("location:" . URL . "admin.php?action={$rule['action']}");
}
}elseif(isset($_GET['editID']) && $_GET['editID']>0){
$objQuestioning->admin_infoEditQuestioningOne($_GET['editID']);
}elseif(isset($_GET['deleteID']) && $_GET['deleteID']>0){
$objQuestioning->deleteQuestioning($_GET['deleteID']);
header("location:" . URL . "admin.php?action={$rule['action']}");
}
if(isset($_POST['save_answer'])){
$objQuestioning->trim($_POST);
if(!$objQuestioning->valid($_POST)){
$objQuestioning->SaveAnswer($_POST);
header("location:" . URL . "admin.php?action={$rule['action']}");
}
}elseif(isset($_GET['answerEditID']) && $_GET['answerEditID']>0){
$objQuestioning->admin_infoEditAnswerOne($_GET['answerEditID']);
}
$objQuestioning->viewAllQuestioning();
$objQuestioning->displayQuestioning();
?>