Guest User

Untitled

a guest
Oct 6th, 2018
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.74 KB | None | 0 0
  1. <?php
  2.         include("lib/ZerController.php");
  3.     //include("lib/ZerDB.php");
  4.  
  5.     class MainController extends ZerController{
  6.             private $user;
  7.  
  8.         public function MainController(){
  9.             $this->init();
  10.         }
  11.  
  12.         public function home(){
  13.             session_start();
  14.             $this->printView("home", $_SESSION["home_vars"]);
  15.         }
  16.  
  17.         public function index(){
  18.             $this->goToPage("login2");
  19.         }
  20.  
  21.         public function login2(){
  22.             $this->printView("login");
  23.             $user = $this->getReqParam("user");
  24.             $pass = $this->getReqParam("pass");
  25.  
  26.             if($user == "user" && $pass == "pass"){
  27.                 session_start();
  28.                 $_SESSION["home_vars"] = array(
  29.                     "colegio"=>"Nombre Del Colegio",
  30.                     "usuario"=>"usuario"
  31.                 );
  32.                 $this->redirect("home");
  33.             }
  34.         }
  35.     }
  36. ?>
Add Comment
Please, Sign In to add comment