Advertisement
Guest User

Header.php

a guest
Dec 1st, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.16 KB | None | 0 0
  1. <?php // header.php
  2.  
  3.  session_start(); // Session starten
  4.  
  5.  include('config.inc.php');     // DB-Verbindung einbinden
  6.  
  7.  ob_start();    // startet den Ausgabepuffer
  8.  
  9.  $pfad = $_SERVER['SCRIPT_NAME'];   // aktuellen Dateipfad ermitteln
  10.  
  11.  if(!isset($_SESSION['login']) AND (basename($pfad) != 'admin.php')){ // Sofern NICHT eingeloggt
  12.  
  13.     header("Location: admin.php"); // Weiterleitung
  14.  
  15.  }
  16. ?>
  17. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  18. <html xmlns="http://www.w3.org/1999/xhtml">
  19.  
  20. <head>
  21.     <title>GrafixxNews</title>
  22.  
  23.     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  24.     <meta http-equiv="imagetoolbar" content="no" />
  25.     <meta http-equiv="Content-Language" content="de" />
  26.  
  27.     <link rel="stylesheet" href="style.css" type="text/css" />
  28. </head>
  29. <body>
  30.  
  31. <div id="ram">
  32.    
  33.     <div id="header">
  34.        
  35.         <ul id="navi">
  36.                 <li><a href="admin.php">Home</a></li>
  37.                 <li><a href="admin.php">News</a></li>
  38.                 <li><a href="cats.php">Kategorien</a></li>
  39.                 <li><a href="show_comments.php">Kommentare</a></li>
  40.         </ul>
  41.  
  42.         <h1>GrafixxNews</h1>
  43.     </div>
  44.    
  45.        
  46.     <div id="content">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement