Blame view

modules/admin/news.php 830 Bytes
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
  <?php
  if(isset($_GET['save'])){
  
   if(isset($_POST['save'])){
    $objNews->trim($_POST);
    if(!$objNews->valid($_POST,$_FILES)){
     $saveId = $objNews->SaveNews($_POST,$_FILES);
     if(!$_POST['update_id']){
      $data = array('parent_table'=>"news",'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){
    $objNews->admin_infoEditNewsOne($_GET['editID']);
   }
     $objCatalogs->viewRubricsAll(0);
   $objNews->displayNewsSave();
  }
  elseif(isset($_GET['deleteID']) && $_GET['deleteID']>0){
    $objNews->admin_deleteNewsOne($_GET['deleteID']);
     header("location:" . URL . "admin.php?action={$rule['action']}");
  }
  else{
   $objNews->viewAllNews();
   $objNews->displayNews();
  }
  ?>