public function __construct()
 {
     parent::__construct();
     if (request::is_ajax()) {
         $this->template = new View('blank');
     }
 }
Example #2
0
 function __construct()
 {
     parent::__construct();
     $this->date = new DateTime();
     $this->breadcrumb[] = html::anchor('events', __('Events'));
     $this->tabs = array('upcoming' => array('link' => 'events/upcoming', 'text' => __('Upcoming events')), 'past' => array('link' => 'events/past', 'text' => __('Past events')), 'browse' => array('link' => 'events/calendar', 'text' => __('Browse calendar')));
 }
Example #3
0
 public function __construct()
 {
     parent::__construct();
     if (Simple_Auth::instance()->logged_in(NULL)) {
         $this->user = Simple_Auth::instance()->get_user();
     }
 }
Example #4
0
 public function __construct()
 {
     parent::__construct();
     if (Simple_Auth::instance()->logged_in(NULL)) {
         $this->user = Simple_Auth::instance()->get_user();
     }
     $this->template->controller = 'rubros';
 }
Example #5
0
File: forum.php Project: anqqa/Anqh
 /**
  * New forum controller
  */
 public function __construct()
 {
     parent::__construct();
     $this->config = Kohana::config('forum');
     $this->breadcrumb[] = html::anchor('forum', __('Forum'));
     $this->page_title = __('Forum');
     $this->tabs = array('active' => array('link' => 'forum', 'text' => __('New posts')), 'latest' => array('link' => 'forum/latest', 'text' => __('New topics')), 'areas' => array('link' => 'forum/areas', 'text' => __('Areas')));
     widget::add('head', html::script(array('js/jquery.markitup.pack.js', 'js/markitup.bbcode.js')));
 }
Example #6
0
File: roles.php Project: anqqa/Anqh
 /**
  * Page constructor to enable role check
  */
 public function __construct()
 {
     parent::__construct();
     // Allow only admin access
     if (!$this->visitor->logged_in('admin')) {
         url::back();
     }
     $this->breadcrumb[] = html::anchor('roles', __('Roles'));
 }
Example #7
0
 public function __construct()
 {
     parent::__construct();
     $this->head->link->append(url::current_site('feed'));
     if (config::get('blog.enable_tagcloud') === 'yes') {
         $tags = ORM::factory('blog_post')->tags();
         if (!empty($tags)) {
             Sidebar::instance()->add('Tagcloud', array('tags' => $tags));
         }
     }
 }
Example #8
0
 public function __construct()
 {
     parent::__construct();
     if (Simple_Auth::instance()->logged_in(NULL)) {
         $this->user = Simple_Auth::instance()->get_user();
     } else {
         $this->user = "******";
     }
     // if (!isset($_SESSION['cat'])) $_SESSION['cat'] = 0;
     if (isset($_GET['cat'])) {
         $_SESSION['cat'] = $_GET['cat'];
     }
     if (!isset($_SESSION['localidad'])) {
         $_SESSION['localidad'] = 0;
     }
     if (isset($_GET['localidad'])) {
         $_SESSION['localidad'] = $_GET['localidad'];
     }
     if ($_SESSION['localidad'] != 0) {
         $this->ciudad = array('localidad_id' => $_SESSION['localidad']);
     }
     if (!isset($_SESSION['orden']) or $_SESSION['orden'] == '') {
         $_SESSION['orden'] = 'fechamodificado';
     }
     if (isset($_GET['orden'])) {
         $_SESSION['orden'] = $_GET['orden'];
     }
     if ($_SESSION['orden'] == 'last') {
         $_SESSION['orden'] = 'fechamodificado';
     }
     switch ($_SESSION['orden']) {
         case 'calle':
             $this->orden = array($_SESSION['orden'] => 'ASC', 'nro' => 'ASC');
             break;
         case 'nombre':
             $this->orden = array($_SESSION['orden'] => 'ASC');
             break;
         default:
             $this->orden = array($_SESSION['orden'] => 'DESC');
             break;
     }
     /*if (isset($_SESSION['orden']) AND $_SESSION['orden']!='fechamodificado' ) {
           $this->orden = array($_SESSION['orden']=>'ASC');
       } else {
           $_SESSION['orden']  = 'fechamodificado';
           $this->orden = array($_SESSION['orden']=>'DESC');
       }*/
     $this->localidad = ORM::factory('localidad', $_SESSION['localidad']);
     $this->categoria = ORM::factory('categoria', $_SESSION['cat']);
     $this->template->controller = 'datos';
 }
Example #9
0
 public function __construct()
 {
     parent::__construct();
     $this->breadcrumb[] = html::anchor('members', __('Members'));
     $this->tabs = array();
     $this->tabs['profile'] = array('link' => '', 'text' => __('Profile'));
     if (isset($this->modules['blog'])) {
         $this->tabs['blog'] = array('link' => '/blog', 'text' => __('Blog'));
     }
     if ($this->user) {
         $this->tabs['friends'] = array('link' => '/friends', 'text' => __('Friends'));
     }
     $this->tabs['favorites'] = array('link' => '/favorites', 'text' => __('Favorites'));
     if ($this->user && FB::enabled()) {
         $this->tabs['facebook'] = array('link' => '/facebook', 'text' => __('Facebook'));
     }
 }
Example #10
0
 /**
  * Listados
  * Genera los primeros paráetros oara la cración de los listados y luego exportarlos
  */
 public function __construct()
 {
     parent::__construct();
     if (Simple_Auth::instance()->logged_in(NULL)) {
         $this->user = Simple_Auth::instance()->get_user();
     } else {
         $this->user = "******";
     }
     // if (!isset($_SESSION['cat'])) $_SESSION['cat'] = 0;
     if (isset($_GET['cat'])) {
         $_SESSION['cat'] = $_GET['cat'];
     }
     if (isset($_GET['localidad'])) {
         $_SESSION['localidad'] = $_GET['localidad'];
     }
     $this->localidad = ORM::factory('localidad', $_SESSION['localidad'])->select_list();
     $this->categoria = ORM::factory('categoria', $_SESSION['cat'])->select_list();
 }
Example #11
0
    function __construct()
    {
        parent::__construct();
        // Load sessions, to support logins
        $this->session = Session::instance();
        $this->template->template_head = '<script type="text/javascript" src="/files/jquery-1.3.2.min.js"> </script>
		<script type="text/javascript" src="/files/jqueryUI/jquery-ui-1.7.2.custom.min.js"> </script>
		<link href="/files/jqueryUI/css/cupertino/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="/files/jquery.jclock-1.2.0.js"> </script>
		<script type="text/javascript" src="/files/jquery.ajaxContent.js"> </script>';
        if (Auth::instance()->logged_in()) {
            // Set the current user
            $this->user = $_SESSION['auth_user'];
            $this->template->page_login = View::factory('home_loginbox')->bind('user', $this->user);
        } else {
            $this->template->page_login = View::factory('home_loginbox');
        }
        // Load the page head
        $this->template->page_head = "<img style=\"position:absolute; top: 5%; left: 0px; width:100px;\" src=\"/files/snippet-icon.png\" alt=\"lantern\" /><h1 style=\"padding-left: 70px;\">Snippetz</h1><span style=\"padding-left:50px;\">your personal code repository</span>";
    }
Example #12
0
File: blogs.php Project: anqqa/Anqh
 /**
  * New blog controller
  */
 public function __construct()
 {
     parent::__construct();
     $this->breadcrumb[] = html::anchor('blogs', __('Blogs'));
     $this->page_title = __('Blogs');
 }
Example #13
0
File: index.php Project: anqqa/Anqh
 /**
  * Index constructor
  */
 function __construct()
 {
     parent::__construct();
     $this->page_id = 'home';
 }
Example #14
0
 function __construct()
 {
     parent::__construct();
     $this->page_title = __('Members');
 }