public function index()
 {
     parent::loadHeader();
     $data['ruser'] = User::getRandomUsers(4);
     $this->load->view('about/index', $data);
     parent::loadFooter();
 }
Exemple #2
0
                if (empty($action)) {
                    $cont->indexAction();
                }
            } else {
                if (strcmp($controller, "cours") == 0) {
                    $cont = new CoursController();
                    if (empty($action)) {
                        $cont->indexAction();
                    }
                } else {
                    if (strcmp($controller, "evaluations") == 0) {
                        $cont = new EvaluationsController();
                        if (empty($action)) {
                            $cont->indexAction();
                        }
                    } else {
                        if (strcmp($controller, "exercices") == 0) {
                            $cont = new ExercicesController();
                            if (empty($action)) {
                                $cont->indexAction();
                            }
                        } elseif (strcmp($controller, "guest") == 0) {
                            $cont = new GuestController();
                            $cont->indexAction();
                        }
                    }
                }
            }
        }
    }
}
 public function error403()
 {
     parent::loadHeader();
     $this->load->view('error/error403');
     parent::loadFooter();
 }
Exemple #4
0
})->name('leccion-file-view');
//Guardar archivos de la leccion
$app->post('/curso/leccion/:leccion_id/file', function ($leccion_id) use($app) {
    $controller = new CursoController($app);
    $controller->callAction('lPost', $leccion_id);
})->name('leccion-file-post');
//Formulario de autentificacion para el nivel de administracion ( escolare, maestros, admin)
$app->get('/admin/login', 'userLogged', function () use($app) {
    $params = array();
    $params['admin'] = true;
    if ($app->request->get('attempt')) {
        $params['attempt'] = $app->request->get('attempt');
    } else {
        $params['attempt'] = 0;
    }
    $controller = new GuestController($app);
    $controller->callAction('lView', $params);
})->name("admin-login");
//autentificacion para el nivel de administracion ( escolare, maestros, admin)
$app->post('/admin/login', 'isValidateToken', function () use($app) {
    $controller = new EscolaresController($app);
    $controller->callAction('login', $app->request->post());
})->name("admin-login-post");
//Index de un usuario administrador
$app->get('/admin/:username', 'conectado', function ($username) use($app) {
    $session = Utilities::getSession();
    if ($session['level'] == 100) {
        $controller = new MaestroController($app);
    } elseif ($session['level'] == 1000) {
        $controller = new EscolaresController($app);
    } elseif ($session['level'] == 10000) {
Exemple #5
0
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/stdf.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/yii/tinyyii.php';
require_once __DIR__ . '/controllers/GuestController.php';
session_start();
$js_file[] = 'Guest/Guest.js';
$action = __paramInit('string', 'action', 'action', 'index');
$module = new CModule('guest');
$module->setBasePath(dirname(__FILE__));
$controller = new GuestController('guest', $module);
$controller->init($action);
// инициализация контролера
$controller->run($action);
//@todo: Отключает лишнюю обертку в template3
$stretch_page = true;
$hide_banner_top = true;
$content = 'tpl.index.php';
include $_SERVER['DOCUMENT_ROOT'] . '/template3.php';
 /**
  * Page d'accueil
  */
 public function index()
 {
     parent::loadHeader();
     $this->load->view('notification_zone');
     $data['ruser'] = User::getRandomUsers(4);
     $this->load->view('home/index', $data);
     parent::loadFooter();
 }