Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("lib/ZerController.php");
- //include("lib/ZerDB.php");
- class MainController extends ZerController{
- private $user;
- public function MainController(){
- $this->init();
- }
- public function page(){
- $vars = Array();
- $vars['valor'] = $this->getView("prueba");
- $this->printView("page", $vars);
- }
- public function home(){
- session_start();
- $this->printView("home", $_SESSION["home_vars"]);
- }
- public function index(){
- $this->goToPage("login2");
- }
- public function login2(){
- $this->printView("login");
- $user = $this->getReqParam("user");
- $pass = $this->getReqParam("pass");
- if($user == "user" && $pass == "pass"){
- session_start();
- $_SESSION["home_vars"] = array(
- "colegio"=>"Nombre Del Colegio",
- "usuario"=>"usuario"
- );
- $this->redirect("home");
- }
- }
- }
- ?>
Add Comment
Please, Sign In to add comment