public function joinMaestroView($attempt = 0)
 {
     $attempt = strip_tags(htmlspecialchars($attempt));
     $attempt = filter_var($attempt, FILTER_SANITIZE_NUMBER_INT);
     $attempt = filter_var($attempt, FILTER_VALIDATE_INT);
     $attempt = intval($attempt);
     $this->view = new JoinView($this->app->urlFor('admin-maestro-post'), Utilities::createToken(), $attempt);
     $this->view->display();
 }
 public function loginView($params)
 {
     $attempt = strip_tags(htmlspecialchars($params['attempt']));
     $attempt = filter_var($attempt, FILTER_SANITIZE_STRING);
     $attempt = filter_var($attempt, FILTER_VALIDATE_INT);
     $attempt = intval($attempt);
     $join = $this->app->urlFor('join');
     $action = $this->app->urlFor('loginPost');
     /*if ( $params['admin'] )
     			$action 	=	$this->app->urlFor('admin-login-post');
     		else
     			$action 	=	$this->app->urlFor('loginPost');*/
     $this->view = new LoginView($action, Utilities::createToken(), $join, $attempt);
     $this->view->display();
     //Utilities::printData( $params );
     //var_dump($_SESSION['proceso']);
 }
 public function cambiarFotoView($params)
 {
     $usuario_id = strip_tags(htmlspecialchars($params['usuario']));
     $usuario_id = intval($usuario_id);
     $usuario_id = filter_var($usuario_id, FILTER_VALIDATE_INT);
     $error = 0;
     if (!$usuario_id || $usuario_id == 0) {
         $error = 1;
     }
     $usuario = Perfil::find($usuario_id);
     if (count($usuario) == 0) {
         $error = 2;
     }
     $action = '/usuario/' . $usuario_id . '/foto/';
     $session = Utilities::getSession();
     $links = Utilities::getMenu($session);
     $this->view = new FotoView($action, Utilities::createToken(), $usuario, $links, $error);
     $this->view->display();
 }
 public function loginView($attempt = 0)
 {
     $attempt = strip_tags(htmlspecialchars($attempt));
     $attempt = filter_var($attempt, FILTER_SANITIZE_STRING);
     $attempt = intval($attempt);
     $attempt = filter_var($attempt, FILTER_VALIDATE_INT);
     $action = $this->app->urlFor('maestro-login-post');
     $join = $this->app->urlFor('join');
     $this->view = new LoginView($action, Utilities::createToken(), $join, $attempt);
     $this->view->display();
 }
 public function addFileLeccion($params)
 {
     $attempt = 0;
     $leccion_id = strip_tags(htmlspecialchars($params['leccion']));
     $leccion_id = intval($leccion_id);
     if (!$leccion_id) {
         $this->app->redirect($this->app->urlFor('Index'));
     }
     $action = '/curso/leccion/' . $leccion_id . '/file';
     if (array_key_exists('get', $params)) {
         $attempt = strip_tags(htmlspecialchars($params['get']));
     }
     if (isset($_SESSION['upload'])) {
         if ($_SESSION['upload'] == 1) {
             unset($_SESSION['upload']);
             $attempt = 5;
         }
     }
     $this->view = new LeccionFileView($action, Utilities::createToken(), $attempt);
     $this->view->display();
 }