예제 #1
0
 public function __construct()
 {
     //SINGLETON------------------------------------
     $this->msgs = messages::getInstance();
     //---------------------------------------------
     $this->connectDB();
 }
예제 #2
0
 public function __construct()
 {
     //SINGLETON------------------------------------
     $this->msgs = messages::getInstance();
     $this->db = Database::getInstance();
     //---------------------------------------------
 }
예제 #3
0
파일: ctrl.php 프로젝트: hera04/fonelo
<?php

require_once dirname(__FILE__) . '/../config.php';
require_once $conf->root_path . '/libs/messages.class.php';
$msgs = messages::getInstance();
require_once $conf->root_path . '/app/Database.class.php';
$db = Database::getInstance();
$action = $_REQUEST['action'];
switch ($action) {
    default:
        if (!$conf->is_session_started()) {
            session_start();
        }
        if (!isset($_SESSION['logged'])) {
            include_once $conf->root_path . '/app/loginCtrl.class.php';
            $tmp = new loginCtrl();
            $tmp->generateView();
            exit;
        } else {
            require_once $conf->root_path . '/app/mainPageCtrl.class.php';
            $tmp = new mainPageCtrl();
            $tmp->generateView();
            //header("Location: ".$conf->app_url);
            //die();
        }
        break;
    case 'zaloguj':
        require_once $conf->root_path . '/app/loginCtrl.class.php';
        $tmp = new loginCtrl();
        $tmp->doLogin();
        break;