Blame view

modules/admin/questioning.php 1.13 KB
42868d70   andryeyev   Создал GIT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  <?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();
  ?>