Advertisement
Guest User

index.php

a guest
Jan 11th, 2015
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <?php
  2. session_start();
  3.  
  4. error_reporting(E_ALL);
  5. ini_set('display_errors', 1);
  6.  
  7. $section = array();
  8. $section['logout'] = "logout.php";
  9. $section['register'] = 'register.php';
  10. $section['login'] = 'login.php';
  11. $section['index'] = 'index2.php';
  12. $section['news'] = 'news.php';
  13. $section['about'] = 'about.php';
  14. $section['404'] = '404.php';
  15.  
  16. include 'header.html'; // doctype, <html> und das komplette <head>-element
  17. echo " <body>\n";
  18.  
  19. if(!isset($_SESSION['loggedin']))
  20. {
  21. $_SESSION['loggedin'] = 1; // ausgeloggt
  22. }
  23.  
  24.  
  25.  
  26. if (isset($_GET['section'], $section[$_GET['section']])) {
  27. include $section[$_GET['section']];
  28. } else {
  29. include $section['news'];
  30. }
  31.  
  32. echo " </body>\n";
  33. echo "</html>\n";
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement