public function __construct(Application $app, $module, $action)
 {
     parent::__construct($app, $module, $action);
     $this->authenticationRedirection();
     $this->init();
     $this->displayInfoMessage();
 }
Пример #2
0
 public function init()
 {
     if (!Yii::app()->userBack->checkAccess('adminSections')) {
         Yii::app()->user->loginRequired();
     }
     return parent::init();
 }
Пример #3
0
 public function init()
 {
     if (!Yii::app()->userBack->checkAccess('adminSettings')) {
         Yii::app()->user->loginRequired();
     }
     $this->sectionLabel = Yii::t('admin', 'Settings');
     return parent::init();
 }
Пример #4
0
 public function init()
 {
     if (!Yii::app()->userBack->checkAccess('adminUsers')) {
         Yii::app()->user->loginRequired();
     }
     $this->sectionLabel = 'Administrateur';
     return parent::init();
 }
 public function beforeRender($action)
 {
     if ($action == 'update') {
         $id = (int) $_GET['id'];
         $this->tabs = array(array('label' => 'Général', 'url' => array('admin/update', 'id' => $id), 'controller' => 'admin'), array('label' => 'Description', 'url' => array('adminintroduction/update', 'id' => $id), 'controller' => 'adminintroduction'), array('label' => 'Formulaire', 'url' => array('adminform/update', 'id' => $id), 'controller' => 'adminform'), array('label' => 'Page confirmation', 'url' => array('adminconfirmation/update', 'id' => $id), 'controller' => 'adminconfirmation'), array('label' => 'Page conclusion', 'url' => array('adminconclusion/update', 'id' => $id), 'controller' => 'adminconclusion'), array('label' => 'Résultats', 'url' => array('adminresults/admin', 'id' => $id), 'controller' => 'adminresults'));
     }
     return parent::beforeRender($action);
 }
 public function init()
 {
     $admin = User::model()->findByPk((int) Yii::app()->user->id);
     if ($admin === null) {
         $this->redirect(Yii::app()->homeUrl);
     }
     return parent::init();
 }
 /**
  * Initializes the controller.
  */
 public function init()
 {
     $this->_authorizer = $this->module->getAuthorizer();
     $this->layout = $this->module->layout;
     $this->defaultAction = 'view';
     // Register the scripts
     $this->module->registerScripts();
     parent::init();
 }
 public function execute()
 {
     try {
         $result = parent::execute();
     } catch (\Exception $e) {
         if ($this->app->httpResponse()->responseCode() == 200) {
             $this->app->httpResponse()->addHeader('HTTP/1.0 500 Internal Server Error');
         }
         $this->app->httpResponse()->addHeader('Content-Type: text/plain');
         $this->responseContent()->setValue($e->getMessage());
         return;
     }
     return $result;
 }
 public function __construct(Application $app, $module, $action)
 {
     parent::__construct($app, $module, $action);
     $this->init();
 }
Пример #10
0
 public function init()
 {
     $this->sectionLabel = 'Message';
     return parent::init();
 }
Пример #11
0
<?php

session_start();
?>

	<?php 
//carga todas las clases
require_once "config/core.php";
//detecta url
$uri = $_SERVER['REQUEST_URI'];
$parte = explode('/', $uri);
$i = $parte[1];
//echo $i;
$BackController = new BackController();
$FrontController = new FrontController();
switch ($i) {
    case "":
        $FrontController->home();
        break;
    case "home":
        $FrontController->home();
        break;
    case "noticias":
        $FrontController->home();
        break;
    case "noticia":
        $FrontController->noticia();
        break;
    case "categorias":
        $FrontController->listadoCategoria();
        break;
Пример #12
0
 public function init()
 {
     $this->sectionLabel = Yii::t('bannerModule.admin', 'Bannière');
     return parent::init();
 }
Пример #13
0
 public function init()
 {
     $this->sectionLabel = 'Tags';
     return parent::init();
 }
 public function __construct(Api $app, $module, $action)
 {
     parent::__construct($app, $module, $action);
     $this->responseContent = new ApiResponse();
     $this->guardian = new ApiGuardian($app);
 }
Пример #15
0
 public function init()
 {
     $this->sectionLabel = 'Catégories';
     return parent::init();
 }
 /**
  * Initialize the back controller.
  * @param Application $app    The application.
  * @param string      $module The module.
  * @param string      $action The action.
  */
 public function __construct(Application $app, $module, $action)
 {
     parent::__construct($app, $module, $action);
     $this->app()->httpResponse()->addHeader('Content-Type: application/json');
     $this->responseContent = new ApiResponse($app, $module, $action);
 }
Пример #17
0
 public function init()
 {
     $this->sectionLabel = Yii::t('eventModule.admin', 'Events');
     return parent::init();
 }
Пример #18
0
 public function init()
 {
     $this->sectionLabel = Yii::t('newsModule.admin', 'News');
     return parent::init();
 }
<?php

namespace registroEstudiantil;

session_start();
require_once 'BackController.php';
//crea un nuevo objeto back
$back = new BackController();
//lee la accion solicitada
$action = $_GET['action'];
/**Para el estudiante
 */
switch ($action) {
    case 'validarCI':
        //Valida la cedula
        $cedulaEstudiante = $_POST['clave'];
        $back->ctrlValidarCIEstudiante($cedulaEstudiante);
        break;
    case 'admEstudiante':
        //Administrar estudiante
        $cedulaEstudiante = $_GET['cedula'];
        $back->ctrlAdministrarEstudiante($cedulaEstudiante);
        break;
    case 'cargarDatos':
        //Datos del formulario
        $cedulaEstudiante = $_POST['cedula'];
        $nombre = $_POST['nombre'];
        $apellido = $_POST['apellido'];
        $direccion = $_POST['direccion'];
        $telefono = $_POST['telefono'];
        $email = $_POST['email'];
Пример #20
0
 public function init()
 {
     return parent::init();
 }
Пример #21
0
 public function init()
 {
     $this->sectionLabel = Yii::t('jobModule.admin', 'CV');
     $this->sectionParentLabel = Yii::t('jobModule.admin', 'Emploi');
     return parent::init();
 }
Пример #22
0
 public function init()
 {
     $this->sectionLabel = Yii::t('newsletterModule.admin', 'Subscriptions');
     $this->modelName = 'NewsletterSubscription';
     return parent::init();
 }