%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php /* * @Author: Sharda Tech * Website: http://www.shardatech.org */ if (!defined('BASEPATH')) { exit('No direct script access allowed'); } class ADMIN_Controller extends MX_Controller { protected $username; protected $activePages; protected $allowed_img_types; protected $history; public function __construct() { parent::__construct(); $this->load->library(array('form_validation')); $this->username = $this->session->userdata('userName'); $this->history = $this->config->item('admin_history'); $this->activePages = $vars['activePages'] = $this->getActivePages(); $this->allowed_img_types = $this->config->item('allowed_img_types'); $vars['textualPages'] = getTextualPages($this->activePages); $vars['nonDynPages'] = (array)$this->config->item('no_dynamic_pages'); $vars['warnings'] = $this->warningChecker(); $this->load->vars($vars); } protected function login_check() { if (!$this->session->userdata('sgi_admin_logged_in')) { redirect('admin'); } //$this->username = $this->session->userdata('userName'); } protected function saveHistory($activity) { if ($this->history === true) { $this->load->model('History_model'); $usr = $this->username; $this->History_model->setHistory($activity, $usr); } } public function getActivePages() { $this->load->model('Pages_model'); return $this->Pages_model->getPages(true, false); } private function warningChecker() { $errors = array(); // Check application/language folder is writable if (!is_writable('.' . DIRECTORY_SEPARATOR . 'application' . DIRECTORY_SEPARATOR . 'language')) { $errors[] = 'Language folder is not writable!'; } // Check application/logs folder is writable if (!is_writable('.' . DIRECTORY_SEPARATOR . 'application' . DIRECTORY_SEPARATOR . 'logs')) { $errors[] = 'Logs folder is not writable!'; } // Check attachments folder is writable if (!is_writable('.' . DIRECTORY_SEPARATOR . 'attachments')) { $errors[] = 'Attachments folder is not writable!'; } else { /* * Check attachment directories exsists.. * ..and create him if no exsists */ if (!file_exists('.' . DIRECTORY_SEPARATOR . 'attachments' . DIRECTORY_SEPARATOR . 'blog_images')) { $old = umask(0); mkdir('.' . DIRECTORY_SEPARATOR . 'attachments' . DIRECTORY_SEPARATOR . 'blog_images', 0777, true); umask($old); } if (!file_exists('.' . DIRECTORY_SEPARATOR . 'attachments' . DIRECTORY_SEPARATOR . 'lang_flags')) { $old = umask(0); mkdir('.' . DIRECTORY_SEPARATOR . 'attachments' . DIRECTORY_SEPARATOR . 'lang_flags', 0777, true); umask($old); } if (!file_exists('.' . DIRECTORY_SEPARATOR . 'attachments' . DIRECTORY_SEPARATOR . 'shop_images')) { $old = umask(0); mkdir('.' . DIRECTORY_SEPARATOR . 'attachments' . DIRECTORY_SEPARATOR . 'shop_images', 0777, true); umask($old); } if (!file_exists('.' . DIRECTORY_SEPARATOR . 'attachments' . DIRECTORY_SEPARATOR . 'site_logo')) { $old = umask(0); mkdir('.' . DIRECTORY_SEPARATOR . 'attachments' . DIRECTORY_SEPARATOR . 'site_logo', 0777, true); umask($old); } } return $errors; } }