/** * Default Function * * @access public * @param string */ public function index($view = null) { //load header $this->load->view('modules/header'); //load view switch ($view) { case 'check': $this->load->view('check', array('step' => 2)); break; case 'database': $this->load->view('database', array('step' => 3)); break; case 'setting': $this->load->view('setting', array('step' => 4)); break; case 'finish': $this->load->view('finish', array('step' => 5)); break; case 'licence': default: //Get GNU lisence $licence = file_get_contents('applications/language/' . lang_code() . '/license.txt'); //reder the view $this->load->view('licence', array('step' => 1, 'licence' => $licence)); } //load footer $this->load->view('modules/footer'); }
/** * Function: general_settings * General Settings page. */ public function general_settings() { if (!Visitor::current()->group->can("change_settings")) { show_403(__("Access Denied"), __("You do not have sufficient privileges to change settings.")); } $locales = array(); if ($open = opendir(INCLUDES_DIR . "/locale/")) { while (($folder = readdir($open)) !== false) { $split = explode(".", $folder); if (end($split) == "mo") { $locales[] = array("code" => $split[0], "name" => lang_code($split[0])); } } closedir($open); } if (empty($_POST)) { return $this->display("general_settings", array("locales" => $locales, "timezones" => timezones())); } if (!isset($_POST['hash']) or $_POST['hash'] != Config::current()->secure_hashkey) { show_403(__("Access Denied"), __("Invalid security key.")); } $config = Config::current(); $set = array($config->set("name", $_POST['name']), $config->set("description", $_POST['description']), $config->set("chyrp_url", rtrim($_POST['chyrp_url'], "/")), $config->set("url", rtrim(oneof($_POST['url'], $_POST['chyrp_url']), "/")), $config->set("email", $_POST['email']), $config->set("timezone", $_POST['timezone']), $config->set("locale", $_POST['locale'])); if (!in_array(false, $set)) { Flash::notice(__("Settings updated."), "/admin/?action=general_settings"); } }
<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?> /img/favicon.ico"> </head> <body> <?php if (is_single()) { ?> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/<?php echo lang_code(); ?> /sdk.js#xfbml=1&version=v2.5&appId=1693281130957312"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <?php } ?> <header class="head"> <div class="wrap"> <?php logo(); ?> <?php get_template_part('partial', 'social'); ?>