controller.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. include_once ("model/view.php");
  8. class Controller {
  9. public function control() {
  10. if (!isset($_REQUEST["do"])) {
  11. $accion = "showMain";
  12. } else {
  13. $accion = htmlspecialchars($_REQUEST["do"]);
  14. }
  15. switch ($accion) {
  16. case "showMain":
  17. View::show("home");
  18. break;
  19. case "showIntro":
  20. View::show("intro");
  21. break;
  22. case "showDom":
  23. View::show("dom");
  24. break;
  25. case "showSelectors":
  26. View::show("selectores");
  27. break;
  28. case "showEvents":
  29. View::show("events");
  30. break;
  31. case "showEffects":
  32. View::show("effects");
  33. break;
  34. case "showUI":
  35. View::show("jqueryui");
  36. break;
  37. case "showCheat":
  38. View::show("cheatsheet");
  39. break;
  40. case "showCheat":
  41. View::show("cheatsheet");
  42. break;
  43. }
  44. }
  45. }