function __construct()
 {
     parent::model();
     $this->load->helper('crosswords');
     $this->load->model('comments_model');
     $this->load->model('businesscards_model');
     // Snippets of useful sql
     $this->overdue_sql = '((`crossword_deadline` IS NOT NULL ' . '	AND `crossword_deadline`    <= NOW()) ' . 'OR (`crossword_publication` IS NOT NULL ' . '	AND `crossword_publication` <= NOW() ' . '	AND `crossword_completeness` != 100))';
     $this->published_sql = '(`crossword_publication` IS NOT NULL ' . 'AND `crossword_publication` <= NOW() ' . 'AND `crossword_completeness` = 100)';
     $this->scheduled_sql = '(`crossword_publication` IS NOT NULL ' . 'AND NOT ' . $this->published_sql . ')';
     $this->winner_count_sql = '(SELECT COUNT(*) ' . 'FROM `crossword_winners` ' . 'WHERE `crossword_winner_crossword_id` = `crossword_id`)';
     $this->expired_sql = '((`crossword_expiry` IS NOT NULL AND `crossword_expiry` <= NOW()) ' . 'OR	' . $this->winner_count_sql . ' >= `crossword_winners`)';
 }
 public function __construct()
 {
     parent::model();
     session_start();
     $this->load->model('organisation_model');
     // Check if we already have login details
     if (isset($_SESSION['ua_loggedin'])) {
         $this->isLoggedIn = $_SESSION['ua_loggedin'];
         $this->username = $_SESSION['ua_username'];
         $this->isUni = $_SESSION['ua_username'];
         $this->entityId = $_SESSION['ua_entityId'];
         $this->isUser = $_SESSION['ua_isuser'];
         if (array_key_exists('ua_timeformat', $_SESSION)) {
             $this->timeFormat = $_SESSION['ua_timeformat'];
         }
         $this->officeLogin = $_SESSION['ua_hasoffice'];
         $this->officeType = $_SESSION['ua_officetype'];
         $this->officeInterface = $_SESSION['ua_officeinterface'];
         $this->firstname = $_SESSION['ua_firstname'];
         $this->surname = $_SESSION['ua_surname'];
         $this->permissions = $_SESSION['ua_permissions'];
         $this->organisationLogin = $_SESSION['ua_organisation'];
         $this->organisationName = $_SESSION['ua_organisationname'];
         $this->organisationShortName = $_SESSION['ua_organisationshortname'];
         $this->allTeams = $_SESSION['ua_allteams'];
         $this->salt = $_SESSION['ua_salt'];
     }
     if (!$this->isLoggedIn && isset($_COOKIE['SavedLogin'])) {
         // Try to perform the login from a cookie
         try {
             $details = explode(':$:', $_COOKIE['SavedLogin']);
             if (count($details) == 2) {
                 // We have a username and has, login
                 $this->loginByHash($details[0], $details[1], true);
             } elseif (count($details) == 1) {
                 // We just have the username
                 $this->username = $details[0];
             }
         } catch (Exception $e) {
             // Failing is fine
         }
     }
 }
 function __construct()
 {
     parent::model();
     $this->load->library('academic_calendar');
 }
 function __construct()
 {
     parent::model();
 }
 /**
  * @param $Structure array URI processing structure.
  */
 function __construct($Structure)
 {
     parent::model();
     // Initialise
     $this->mStructure = $Structure;
 }
 function __construct()
 {
     parent::model();
     $this->load->model('organisation_model');
 }
 function __construct()
 {
     parent::model();
     $this->load->helper('uri_tail');
 }
 function __construct()
 {
     parent::model();
     $this->load->helper('uri_tail');
     $this->load->model('calendar/calendar_actions');
 }