public function __construct()
{
// sanitize all $_GET
$_GET['forum_id'] = isset($_GET['forum_id']) && isnum($_GET['forum_id']) ? $_GET['forum_id'] : 0;
$_GET['forum_cat'] = isset($_GET['forum_cat']) && isnum($_GET['forum_cat']) ? $_GET['forum_cat'] : 0;
$_GET['forum_branch'] = isset($_GET['forum_branch']) && isnum($_GET['forum_branch']) ? $_GET['forum_branch'] : 0;
$_GET['parent_id'] = isset($_GET['parent_id']) && isnum($_GET['parent_id']) ? $_GET['parent_id'] : 0;
$_GET['action'] = isset($_GET['action']) && $_GET['action'] ? $_GET['action'] : '';
$_GET['status'] = isset($_GET['status']) && $_GET['status'] ? $_GET['status'] : '';
$this->ext = isset($_GET['parent_id']) && isnum($_GET['parent_id']) ? "&parent_id=" . $_GET['parent_id'] : '';
$this->ext .= isset($_GET['branch']) && isnum($_GET['branch']) ? "&branch=" . $_GET['branch'] : '';
// indexing hierarchy data
$this->forum_index = self::get_forum_index();
if (!empty($this->forum_index)) {
$this->level = self::make_forum_breadcrumbs();
}
/**
* List of actions available in this admin
*/
self::forum_jump();
self::set_forumDB();
/**
* Ordering actions
*/
switch ($_GET['action']) {
case 'mu':
self::move_up();
break;
case 'md':
self::move_down();
break;
case 'delete':
self::validate_forum_removal();
break;
case 'prune':
self::prune_forum_view();
break;
case 'edit':
$this->data = self::get_forum($_GET['forum_id']);
break;
case 'p_edit':
$this->data = self::get_forum($_GET['forum_id']);
break;
}
}