public function altaGrupos() { Sessiones::autenticado(); $srcPhoto = PHOTOS . Sessiones::get_var('photo'); $this->_View->foto = $srcPhoto; $this->_View->matricula = Sessiones::get_var('matricula'); $this->_View->nick = Sessiones::get_var('name'); $this->_View->nombre = Sessiones::get_var('name') . ' ' . Sessiones::get_var('lastnameF') . ' ' . Sessiones::get_var('lastnameM'); $this->_View->rango = Sessiones::get_var('rango'); $this->_View->render('altaGrupos'); }
public static function accesso($rango) { if (!Sessiones::get_var('autenticado')) { header('Location:' . BASE_URL); exit; } if (self::get_var('rango') != self::rangos($rango)) { header('Location:' . BASE_URL . 'error' . DS . 'access' . DS . '404'); exit; } }
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/BitacorasExperiment/Modelo/Bo/Sessiones.php'; error_reporting(E_ALL); ini_set('display_errors', TRUE); Sessiones::construir_session(); echo Sessiones::get_var('usuario'); echo Sessiones::get_var('rol'); ?> <div class="wrapper"> <!-- comentando para --> <input type="text"> LE SUBI UN CAMBIO le subi otro cambio!!! XD le subi un tercer cambio !! xD un cambio extra </div>
public function verificarPass() { if (!isset($_POST['pass'])) { throw new Exception("Datos incorrectos"); exit; } if (!isset($_POST['Cpass'])) { throw new Exception("Datos incorrectos"); exit; } $pass = $this->euroval->run('Password', $_POST['pass'], array('required')); if (is_array($pass)) { foreach ($pass as $value) { throw new Exception($value); } exit; } $Cpass = $this->euroval->run('Confirmación', $_POST['Cpass'], array('required')); if (is_array($Cpass)) { foreach ($Cpass as $value) { throw new Exception($value); } exit; } if ($_POST['pass'] !== $_POST['Cpass']) { throw new Exception("La contraseña debe ser identica"); exit; } $usuario = Sessiones::get_var('id_user'); $matricula = Sessiones::get_var('matricula'); $data = array('pass' => $pass, 'Cpass' => $Cpass, 'user' => $usuario, 'matricula' => $matricula); $res = $this->model->cambiarPassword($data); if (!$res) { throw new Exception("Error inesperado contacte al administrador"); exit; } $status = array('status' => 'Se ha cambiado su contraseña'); echo json_encode($status); }