Exemple #1
0
 if (empty($_POST['ok'])) {
     xoops_cp_header();
     include dirname(__FILE__) . '/mymenu.php';
     $template = 'bulletin_deltopic.html';
     $BTopic = new BulletinTopic($mydirname, $_GET['topic_id']);
     //ver3.0
     if (empty($BTopic)) {
         redirect_header('index.php?op=topicsmanager', 1, _TAKINGBACK);
     }
     if (empty($BTopic->topic_id)) {
         redirect_header('index.php?op=topicsmanager', 1, _TAKINGBACK);
     }
     // Get the all subtopics
     $topic_arr = $BTopic->getAllChildTopics();
     // Get the topic remains
     $remain_topics = $BTopic->getTopicsList();
     array_push($topic_arr, $BTopic);
     foreach ($topic_arr as $eachtopic) {
         $topics[] = array('title' => $eachtopic->topic_title(), 'id' => $eachtopic->topic_id());
         unset($remain_topics[$eachtopic->topic_id()]);
     }
     $asssigns = array('gticket_hidden' => $xoopsGTicket->getTicketHtml(__LINE__, 1800, 'bulletin_admin'), 'topics' => $topics, 'remain_topics' => $remain_topics, 'topicid' => intval($_GET['topic_id']));
 } else {
     //ver3.0
     if (!$xoopsGTicket->check(true, 'bulletin_admin')) {
         redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
     }
     $BTopic = new BulletinTopic($mydirname, intval($_POST['topic_id']));
     if (empty($BTopic)) {
         redirect_header('index.php?op=topicsmanager', 1, _TAKINGBACK);
     }