function __construct() { global $GET, $db; date_default_timezone_set(\query\main::get_option('timezone')); $db->query("SET time_zone='" . date('P') . "'"); $GLOBALS['siteURL'] = \site\utils::site_url(); $GLOBALS['me'] = \user\main::is_logged(); $this->template = \query\main::get_option('theme'); $this->language = $this->language(); $this->ap_language = $this->admin_panel_language(); if (isset($GET['loc'])) { $this->page_type = $GET['loc']; } else { $this->page_type = 'index'; } $this->id = isset($GET['id']) ? $GET['id'] : ''; }