Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.74 KB | None | 0 0
  1. <?php
  2. // Server
  3. session_start();
  4. error_reporting(E_ALL);
  5. date_default_timezone_set('Europe/Berlin');
  6.  
  7. // Includes
  8. include $_SERVER['DOCUMENT_ROOT'].'/config.php';
  9. include $_SERVER['DOCUMENT_ROOT'].'/System/Database/Database.php';
  10. include $_SERVER['DOCUMENT_ROOT'].'/System/Classes/wordfilter.class.php';
  11. include $_SERVER['DOCUMENT_ROOT'].'/System/Classes/route.class.php';
  12. include $_SERVER['DOCUMENT_ROOT'].'/System/Classes/classes.class.php';
  13.  
  14. // Classes
  15. $classmanager = new Classes();
  16. $classmanager->init($config);
  17.  
  18. // ROUTING by Lazcano
  19. $routes = new routes();
  20. $routes->addRoute("index", "/index", $config['routing']['directory']."index.tpl", true, true);
  21. $routes->addRoute("register", "/registrieren", $config['routing']['directory']."register.tpl", true, true);
  22. $routes->addRoute("me", "/me", $config['routing']['directory']."me.tpl", true, true);
  23. $routes->addRoute("staff", "/staff", $config['routing']['directory']."staff.php", true, true);
  24.  
  25. // Content Manager
  26. if(!empty($_GET) && isset($_GET['page'])) {
  27.     trim('/', ($page = $_GET['page']));
  28.     $routes->proceed('/' . $page, $content_replace);
  29. } else {
  30.     die('No Param');
  31. }
  32.  
  33.  
  34. Wordfilter.class.php :
  35. <?php
  36. $content_replace = array(
  37.   '{name}'    => $config['hotel']['name'],
  38.   '{first}' => $config['kampagne']['first'],
  39.   '{firsttext}' => $config['kampagne']['firsttext'],
  40.   '{firstpic}' => $config['kampagne']['firstpic'],
  41.   '{second}' => $config['kampagne']['second'],
  42.   '{secondtext}' => $config['kampagne']['secondtext'],
  43.   '{secondpic}' => $config['kampagne']['secondpic'],
  44.   '{third}' => $config['kampagne']['third'],
  45.   '{thirdtext}' => $config['kampagne']['thirdtext'],
  46.   '{thirdpic}' => $config['kampagne']['thirdpic'],
  47.   '{:' => '?php',
  48.   ':}' => '?',
  49. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement