Пример #1
0
 function index()
 {
     $msg_id = $this->validate->get->getInt('id');
     $authorizer = check_model::getInstance();
     if (!$authorizer->is_msg_id($msg_id)) {
         cpg_die(ERROR, Lang::item('error.wrong_msg_id'), __FILE__, __LINE__);
     }
     $msg = $this->forum->get_message_data($msg_id, 'topic_id');
     $total_msg = $this->forum->get_message_count($msg['topic_id']);
     $current = $this->forum->get_message_pos($msg['topic_id'], $msg_id);
     $start = floor(($current - 1) / Config::item('fr_msg_per_page')) * Config::item('fr_msg_per_page');
     $superCage = Inspekt::makeSuperCage();
     if ($CONFIG['display_redirection_page'] == 0 && $superCage->get->keyExists('message_id')) {
         forum::redirect('forum.php?c=topic&id=' . $msg['topic_id'] . '&start=' . $start . '&message_id=' . $superCage->get->getAlNum('message_id') . '#cpgMessageBlock');
     } else {
         forum::redirect('forum.php?c=topic&id=' . $msg['topic_id'] . '&start=' . $start . '#' . $msg_id);
     }
 }
Пример #2
0
 /**
  * ****************************************************
  * DELETE BOARD
  * ****************************************************
  */
 function moveboard()
 {
     $data1 = array('board' => $this->validate->get->getInt('board1'), 'order' => $this->validate->get->getInt('order1'));
     $data2 = array('board' => $this->validate->get->getInt('board2'), 'order' => $this->validate->get->getInt('order2'));
     $to_cat = $this->validate->get->getInt('to_cat');
     $to_board = $this->validate->get->getInt('to_board');
     $board = $this->validate->get->getInt('board');
     $this->forum->move_board($data1, $data2, $board, $to_cat, $to_board);
     //forum::message(Lang::item('admin.move_board'), Lang::item('admin.move_board_success'), 'forum.php?c=admin', 3);
     forum::redirect('forum.php?c=admin');
 }
Пример #3
0
 function unnotify()
 {
     $vars = array();
     $errors = array();
     $vars['topic_id'] = $this->validate->get->getInt('id');
     $this->forum->unnotify_topic($vars['topic_id']);
     forum::redirect(forum::link('topic', '', $vars['topic_id']));
 }
Пример #4
0
 function remove_avatar()
 {
     $authorizer = check_model::getInstance();
     // user or not
     if (!$authorizer->is_user()) {
         cpg_die(ERROR, Lang::item('error.perm_denied'), __FILE__, __LINE__);
     }
     $data['fr_avatar'] = '';
     $this->forum->edit_profile(USER_ID, $data);
     forum::redirect('forum.php?c=profile');
 }
Пример #5
0
 /** Forumtråden ble slettet */
 protected function delete_complete()
 {
     \ess::$b->page->add_message("Forumtråden ble slettet.");
     $this->forum->redirect();
 }