public function __construct() { parent::__construct(); global $data, $system, $user, $upload_directory; //disable once done dev //$this->output->enable_profiler(TRUE); $data = array(); $data['page'] = "home"; $data['notes'] = array(); $finalpage = false; //CHECK CONFIG.PHP SETUP check_config_settings(); //Verify config.php setup //CHECK INSTALLATION check_installation(true); //Verify Nakid CMS is installed //GET SYSTEM INFO $system = $this->SystemModel->get_settings_array(); //Get array of system settings //CHECK LOGIN $user = $this->SystemModel->get_user($this->session->userdata('uid')); //check_login($this->session->userdata('uid')); if (!$user) { $nonauth = array("login", "forgot_password"); if (!in_array($this->uri->segment(2), $nonauth)) { redirect('system/login'); } } else { //KCFINDER OPTIONS (PUT THIS ELSEWHERE) //Find Nakid install path $paths = explode($_SERVER["SERVER_NAME"], base_url()); $nakid_install = $paths[1]; //Get Upload Directory $kc_directory = $nakid_install . "/uploads"; //$upload_directory = NAKID_ROOT."/uploads"; $upload_directory = "uploads"; chmod($upload_directory, 0775); //Set Session session_start(); $_SESSION['KCFINDER'] = array(); $_SESSION['KCFINDER']['disabled'] = false; //$_SESSION['KCFINDER']['uploadURL'] = $upload_directory; $_SESSION['KCFINDER']['uploadURL'] = $kc_directory; } //BUILD MENU $data['menu'] = build_menu($user); $dbdata = array('order' => 55); // if (!licensed()) { $data['notes'][] = array(base64_decode('PGRpdiBpZD0iaV9hbV9hX2Jyb2tlX2RldmVsb3BlciI+PHA+PGEgaHJlZj0iaHR0cDovL25ha2lkLm9yZy9kb25hdGUiIHRhcmdldD0iX2JsYW5rIj48c3Ryb25nPlRoaXMgdmVyc2lvbiBvZiBkb21haW4gaXMgY3VycmVudGx5IHVubGljZW5zZWQuPC9zdHJvbmc+IC0gSG93IG11Y2ggaXMgdGhpcyBwcm9ncmFtIHdvcnRoIHRvIHlvdT8gSWYgeW91IGxpa2UgTmFraWQsIHBsZWFzZSBkb25hdGUgdG8gc3VwcG9ydCBmdXR1cmUgdXBkYXRlcy4gQWZ0ZXIgZG9uYXRpbmcgdGhlIGFtb3VudCBvZiB5b3VyIGNob29zaW5nIHlvdSB3aWxsIHJlY2VpdmUgYSBkb21haW4gbGljZW5zZSBrZXkgc28geW91IGRvbid0IGhhdmUgdG8gc2VlIHRoaXMgbmFnIHNjcmVlbiBhbnltb3JlITwvYT48L3A+PC9kaXY+'), 'alert'); } }
public function __construct() { parent::__construct(); global $data, $system, $user; $user = false; $data = array(); $data['page'] = "install"; $data['notes'] = array(); check_config_settings(); //Verify config.php setup //CHECK INSTALLATION check_installation(false); //Verify Nakid CMS is installed //BUILD MENU $data['menu'] = build_menu($user); }