Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class SmerovacKontroler extends Kontroler
- {
- protected $kontroler;
- public function nactiStranku()
- {
- require_once("./pohledy/index2.phtml");
- }
- public function routing()
- {
- $stranka = $_GET["p"];
- $neregistrovany = $_GET["ner"];
- $registrovany = $_GET["reg"];
- $inzerce = $_GET["sort"];
- if(!(strlen($stranka) < 20) OR !(strlen($neregistrovany) < 20) OR !(strlen($registrovany) < 20) OR !(strlen($inzerce) < 20))
- {
- die("<br>Tvoje IP byla nahlášena jako podezřelá k nelegálním činnostem.");
- }
- if($_GET["ner"])
- {
- $this->routing2($neregistrovany);
- }
- if($_GET["reg"])
- {
- $this->routing3($registrovany);
- }
- if($_GET["sort"])
- {
- $this->routing4($inzerce);
- }
- else{
- $this->routing1($stranka);
- }
- }
- public function routing1($stranka)
- {
- $FormKontroler = new FormKontroler();
- switch($stranka)
- {
- case 'novinky':
- echo "novinky";
- break;
- case 'novy_inzerat':
- echo "inzeraty";
- break;
- case 'prihlasit':
- require_once("./pohledy/prihlaseni.phtml");
- $FormKontroler->formPrihlaseni();
- break;
- case 'registrovat':
- require_once("./pohledy/registrace.phtml");
- $FormKontroler->formRegistrace();
- break;
- case 'muj_inzerat':
- echo "muj_inzerat";
- break;
- case 'kontakt':
- echo "kontakt";
- break;
- case 'informace':
- echo "informace";
- break;
- default:
- require_once("./pohledy/polozky.phtml");
- break;
- }
- }
- public function routing2()
- {
- echo "2";
- }
- public function routing3()
- {
- echo "3";
- }
- public function routing4()
- {
- echo "4";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement