<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

include_once ("model/view.php");

class Controller {
    
    public function control() {
        
        if (!isset($_REQUEST["do"])) {
            $accion = "showMain";
        } else {
            $accion = htmlspecialchars($_REQUEST["do"]);
        }
        
        switch ($accion) {
            case "showMain":
                View::show("home");
                break;
            case "showIntro":
                View::show("intro");
                break;
            case "showDom":
                View::show("dom");
                break;
            case "showSelectors":
                View::show("selectores");
                break;
            case "showEvents":
                View::show("events");
                break;
            case "showEffects":
                View::show("effects");
                break;
            case "showUI":
                View::show("jqueryui");
                break;
            case "showCheat":
                View::show("cheatsheet");
                break;
            case "showCheat":
                View::show("cheatsheet");
                break;
        }
        
    }
    
}