Beispiel #1
0
     }
     $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);
     }
     if (empty($BTopic->topic_id)) {
         redirect_header('index.php?op=topicsmanager', 1, _TAKINGBACK);
     }
     // Get the all subtopics
     $topic_arr = $BTopic->getAllChildTopics();
     // Leave an article topic
     //ver3.0
     if (!is_array($_POST['topics'])) {
         redirect_header('index.php?op=topicsmanager', 1, _TAKINGBACK);
     } else {
         $move_topics = array_map('intval', $_POST['topics']);
     }
     $gperm =& BulletinGP::getInstance($mydirname);
     array_push($topic_arr, $BTopic);
     foreach ($topic_arr as $eachtopic) {
         if ($move_topics[$eachtopic->topic_id()] == 0) {
             // Gets all articles
             $story_arr = Bulletin::getAllByTopic($mydirname, $eachtopic->topic_id());
             foreach ($story_arr as $eachstory) {
                 if (false != $eachstory->delete()) {