Advertisement
molik

PHP | index.php

Sep 16th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.58 KB | None | 0 0
  1. <?php
  2.     ob_start();
  3.     function __autoload($className) {
  4.         include 'class/' . $className . '.class.php';
  5.     }
  6.     include 'config.php';
  7.  
  8.     if (!isset($_GET['site'])){
  9.         $url = "sites/start.php";
  10.         $pageTitle = "Strona główna - nie było znacznika site w pasku adresu.";
  11.     } else {
  12.         switch($_GET['site']) {
  13.             case 'start':
  14.                 $url = "sites/start.php";
  15.                 $pageTitle = "Strona główna - występuje znacznik site w pasku + start";
  16.                 $desc = "Opis strony głównej";
  17.             break;
  18.             case 'userLogin':
  19.                 $url = "sites/userLogin.php";
  20.                 $pageTitle = "Logowanie użytkownika";
  21.                 $desc = "Opis strony logowania użytkownika";
  22.             break;
  23.             case 'userRegister':
  24.                 $url = "sites/userRegister.php";
  25.                 $pageTitle = "Rejestracja użytkownika";
  26.                 $desc = "Opis strony rejestracji użytkownika";
  27.             break;
  28.             case 'createTables':
  29.                 $url = "install/db.php";
  30.                 $pageTitle = "Tworzenie tabel w bazie danych.";
  31.                 $desc = "Opis strony tworzenia tabel.";
  32.             break;
  33.             default:
  34.                 $url = "sites/start.php";
  35.                 $pageTitle = "Strona główna - występuje znacznik site w pasku + start";
  36.                 $desc = "Opis strony głównej";
  37.         }
  38.     }
  39.  
  40.     include_once 'layout/header.php';
  41.     include_once 'sites/nav.php';
  42.     include_once $url;
  43.     include_once 'layout/footer.php';
  44. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement