Advertisement
Guest User

Untitled

a guest
Jun 24th, 2015
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. <?php
  2. class SmerovacKontroler extends Kontroler
  3. {
  4. protected $kontroler;
  5.  
  6. public function nactiStranku()
  7. {
  8. require_once("./pohledy/index2.phtml");
  9. }
  10.  
  11. public function routing()
  12. {
  13. $stranka = $_GET["p"];
  14. $neregistrovany = $_GET["ner"];
  15. $registrovany = $_GET["reg"];
  16. $inzerce = $_GET["sort"];
  17. if(!(strlen($stranka) < 20) OR !(strlen($neregistrovany) < 20) OR !(strlen($registrovany) < 20) OR !(strlen($inzerce) < 20))
  18. {
  19. die("<br>Tvoje IP byla nahlášena jako podezřelá k nelegálním činnostem.");
  20. }
  21.  
  22. if($_GET["ner"])
  23. {
  24. $this->routing2($neregistrovany);
  25. }
  26. if($_GET["reg"])
  27. {
  28. $this->routing3($registrovany);
  29. }
  30. if($_GET["sort"])
  31. {
  32. $this->routing4($inzerce);
  33. }
  34. else{
  35. $this->routing1($stranka);
  36. }
  37. }
  38.  
  39. public function routing1($stranka)
  40. {
  41. $FormKontroler = new FormKontroler();
  42.  
  43. switch($stranka)
  44. {
  45. case 'novinky':
  46. echo "novinky";
  47. break;
  48.  
  49. case 'novy_inzerat':
  50. echo "inzeraty";
  51. break;
  52.  
  53. case 'prihlasit':
  54. require_once("./pohledy/prihlaseni.phtml");
  55. $FormKontroler->formPrihlaseni();
  56. break;
  57.  
  58. case 'registrovat':
  59. require_once("./pohledy/registrace.phtml");
  60. $FormKontroler->formRegistrace();
  61. break;
  62.  
  63. case 'muj_inzerat':
  64. echo "muj_inzerat";
  65. break;
  66.  
  67. case 'kontakt':
  68. echo "kontakt";
  69. break;
  70.  
  71. case 'informace':
  72. echo "informace";
  73. break;
  74.  
  75. default:
  76. require_once("./pohledy/polozky.phtml");
  77. break;
  78.  
  79. }
  80. }
  81.  
  82. public function routing2()
  83. {
  84. echo "2";
  85. }
  86.  
  87. public function routing3()
  88. {
  89. echo "3";
  90. }
  91.  
  92. public function routing4()
  93. {
  94. echo "4";
  95. }
  96.  
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement