begin.php
1.6 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
if(isset($_GET['deleteID']) && $_GET['deleteID']>0){
$objForum->delete($_GET['deleteID']);
header("location:" . URL . "{$rule['action']}/");
}
if(isset($_GET['commentDeleteID']) && $_GET['commentDeleteID']>0){
$objForum->deleteComment($_GET['commentDeleteID']);
}
if(isset($_GET['topicID']) && $_GET['topicID']>0){
$objForum->Click($_GET['topicID']);
$treeId = $objForum->viewTopic($_GET['topicID'],$row);
  $setup->meta = array("title"=>$row['meta_title'],
                        "keywords"=>$row['meta_keywords'],
                        "description"=>$row['meta_description'],
                        "about"=>$row['meta_about']);
$objForum->viewComments($treeId);
$objForum->viewUser($UserIdForum);
$objForum->displayTopic();
}
else{
if(isset($_POST['forum_login'],$_POST['forum_psw'])){
 if($objForum->isUser($_POST['forum_login'],$_POST['forum_psw'])){
  $_SESSION['forum']['login'] = $_POST['forum_login'];
  $_SESSION['forum']['psw'] = $_POST['forum_psw'];
  header("location:" . URL . "{$rule['action']}/");
 }
}elseif(isset($_POST['exit'])){
 unset($_SESSION['forum']);
 header("location:" . URL . "{$rule['action']}/");
}
if(isset($_POST['save_topic'])){
 $objForum->trim($_POST);
 if(!$objForum->valid($_POST)){
  $data = array('parent_table'=>"topic",'parent_table_id'=>0,'data'=>$_POST);
  $objForum->SaveTopic($data,$_FILES);
  header("location:" . URL . "{$rule['action']}/");
 }
}elseif(isset($_GET['editID']) && $_GET['editID']>0){
$objForum->viewTopic($_GET['editID'],$row);
}
$objForum->viewUser($UserIdForum);
$objForum->last_comment();
$objForum->viewTopics($_GET);
$objForum->displayForum();
}
?>
