index.php
<?php
require('functions.inc.php');
require('head.inc.php');
require('rahmen.inc.php');
require('kopf.inc.php');
require('menue.inc.php');
require('fuss.inc.php');
?>
head.inc.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>HorstSchulze.de</title>
<?php
if (!$ohnecss) {
?>
<link rel="stylesheet" href="../css3menu1/style.css" type="text/css" />
<link href="index.css" rel="stylesheet" type="text/css" media="screen, projection, tv" />
<?php
}
?>
</head>
<body>
kopf.inc.php
<div id="kopf">
<p>Horst Schulze</p>
<a href="source.php" target="_blank"> Quelltext im Extrafenster anzeigen</a>
<br />
<a href="source_inc.php" target="_blank"> Include Files im Extrafenster anzeigen</a>
<span class="stopFloat"> </span>
</div> <!-- ende kopf -->
rahmen.inc.php
<div id="rahmen">
menue.inc.php
fuss.inc.php
<span class="stopFloat"> </span>
</div> <!-- ende rahmen -->
</body>
</html>
functions.inc.php
<?php
# title Anweisung zusammenbauen
function umenue($arr) {
echo " title=\"";
foreach ($arr as $key => $value) {
#echo "Schlüssel: $key; Wert: $value <br>";
echo " $value
";
}
echo "\" ";
}
# Navigationszeile oder Zeilen ausgeben
function menue($arrNavigation,$woche) {
echo "<div class=\"menue\"><ul>\n";
$caller=$_SERVER["SCRIPT_NAME"];
foreach ($arrNavigation as $key => $value) {
#echo "Schlüssel:$key: Wert:$value: <br>";
echo "<li><a ";
if ($woche == $key) {
echo " class=\"aktiv\" ";
}
if ( is_array ($value) ) { # Untermenue vorhanden
umenue($value);
$wochetmp=str_replace(" ","%20",$key); # " " escapen für Fehlerfreies XHTML
echo " href=\"http:$caller?woche=$wochetmp\">$key</a></li>\n";
}
else echo " href=\"http:$value\">$key</a></li>\n"; # value direktes Link
}
echo "</ul></div> <!-- ende menue -->\n";
if ($woche) {
echo "<div class=\"menue\"><ul>\n";
$caller=$_SERVER["HTTP_REFERER"];
foreach ($arrNavigation[$woche] as $key => $value) {
#echo "Schlüssel: $key; Wert: $value <br>";
$wochetmp=str_replace(" ","%20",$woche); # " " escapen für Fehlerfreies XHTML
echo "<li><a ";
if (basename($_SERVER["PHP_SELF"]) == $key) {
echo " class=\"aktiv\" ";
}
echo " href=\"http:$key?woche=$wochetmp\" ";
echo ">$value</a></li>\n";
}
echo "</ul></div> <!-- ende menue -->\n";
}
}
// Prüft und entfernt HTML Tag's
// diese Routine wird gleich beim Aufruf angewendet
// z.B. $name = Text_sichern($_POST["name"]);
// darum sollten die htmlentities nicht gemacht werden, sondern erst bei der Ausgabe
// damit die Daten noch für die Sortierung in DB geeignet sind
function Text_sichern($text) {
$text = strip_tags($text);
$text = stripslashes($text);
#$text = htmlentities($text, ENT_QUOTES);# dies erst bei der Ausgabe machen
return $text;
}
function Formular($woche)
{
global $IhreNachricht;
#global $woche;
?>
<form action="<?php echo $_SERVER["PHP_SELF"];?>" method="post">
Ihr Name <input type="text" name="IhrName" />
<br />
IhreNachricht <textarea name="IhreNachricht"><?php echo $IhreNachricht ;?></textarea>
<br />
Stadt:
<select name="stadt">
<option value="1">Berlin</option>
<option value="2">Hamburg</option>
<option value="3">München</option>
</select>
<br />
Geben Sie Ihre Zahlungsweise an:<br />
<input type="radio" name="zahlung" value="Barzahlung"
<?php if ($_POST["zahlung"] == 'Barzahlung') print 'checked'; ?> />
Barzahlung<br />
<input type="radio" name="zahlung" value="Visa"
<?php if ($_POST["zahlung"] == 'Visa') print 'checked'; ?> />
Visa<br />
<input type="radio" name="zahlung" value="EC"
<?php if ($_POST["zahlung"] == 'EC') print 'checked'; ?> />
EC <br />
<input type="checkbox" name="pizza[]" value="Mista"
<?php if (isset($_POST) && @in_array('Mista',$_POST["pizza"]))
print 'checked';
?> />
Mista<br />
<input type="checkbox" name="pizza[]" value="Funghi"
<?php if (isset($_POST) && @in_array('Funghi',$_POST["pizza"]))
print 'checked';
?> />
Funghi<br />
<input type="checkbox" name="pizza[]" value="Hawaii"
<?php if (isset($_POST) && @in_array('Hawaii',$_POST["pizza"]))
print 'checked';
?> />
Hawaii<br />
<input type="hidden" name="woche" value="<?php echo $woche ?>" />
<input type="submit" name="send" value="Abschicken" />
</form>
<?php
}
function check_pw ($benutzer, $passwort)
{
if ($benutzer == 'BENUTZER' && $passwort == 'GEHEIM')
{
$_SESSION["logged"] = 1;
return true;
}
else
{
return false;
}
}
?>
index.css
/* Allgemeine Elementanweisungen */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
* { /* Universalselektor */
padding: 0;
margin: 0;
}
body {
color: #000;
background: #666;
font-family: verdana,arial,sans-serif;
font-size: 100.01%;
padding: 5px 0;
margin: 0;
text-align: center; /* Zentrierung fuer alte IEs */
}
a { text-decoration: underline;}
a:link { color: #234D60;}
a:visited { color: #628A9F;}
a:focus, a:hover, a:active { color: #BD1823;}
h1 {
color: #666666;
font-family: georgia,'times new roman',serif;
font-size: 1.9em;
font-weight: normal;
line-height: 1.6em;
margin: 0;
}
p {
font-size: 1.0em;
line-height: 1.0em;
margin: 1em 0;
}
img { border: 0; }
/* Allgemeine Klassen
/* * * * * * * * * * * * * * * * * * * * * * * * * * */
.stopFloat {
display: block;
float: none;
clear: both;
height: 1px;
font-size: 0px;
line-height: 0px;
}
/* Rahmen, Kopf
/* * * * * * * * * * * * * * * * * * * * * * * * * * */
#rahmen {
background: #FFF url(images/hintergrund.gif) repeat-y;
width: 760px; /* der Breite des Hintergrundbilds entsprechend */
border: 1px solid #FFF;
margin: 0 auto; /* Zentrierung fuer moderne Browser */
text-align: left; /* text-align:center (body) "neutralisieren" */
}
* html #rahmen { /* Box Model Hack - notwendig wegen border-Angabe */
width: 762px; /* fuer IE 5 und 5.5 */
wid\th: 760px; /* fuer IE 6 */
}
#kopf {
background: #FFF;
padding: 10px 20px;
}
#rahmen #kopf p {
float: left;
}
#rahmen #kopf a { /* Quelltext anzeigen */
float: right;
font-size: 70%;
padding: 5px 5px 0 0;
}
/* Rote Menueleiste
/* * * * * * * * * * * * * * * * * * * * * * * * * * */
.menue {
background: #BD1823;
border-bottom: 1px solid #FFF; /* weisse Trennlinie zw. Menue u. Inhalt */
}
.menue ul {
padding: 0 0 3px 0;
margin: 0 0 0 20px;
list-style: none;
}
.menue li {
display: inline; /* Listenpunkte nebeneinander stellen */
margin-right: 15px;
}
* html .menue li { /* Sternchen-Hack - sehen nur IEs */
height: 1em; /* damit margin-right auch im IE 5 beachtet wird */
}
.menue a {
font-size: 80%;
font-weight: bold;
text-transform: uppercase;
}
.menue .aktiv {
background-color: #FD5863;
}
.menue a:link, .menue a:visited {
color: #FFF;
text-decoration: none;
}
.menue a:focus, .menue a:hover, .menue a:active {
text-decoration: underline;
}
/* Spalte 1
/* * * * * * * * * * * * * * * * * * * * * * * * * * */
#spalte1 {
float: left;
background-color: #C9DEEA;
width: 199px; /* Breite ohne senkrechte weisse Linie */
padding: 1em 0;
}
#spalte1 ul{
list-style: none;
padding: 0;
margin: 0 10px 0 20px;
}
#spalte1 p {
font-size: 80%;
line-height: 150%;
margin: 1em 20px;
}
#spalte1 li {
margin: 0;
font-size: 70%;
line-height: 180%;
margin: 0;
}
#spalte1 a:link, #spalte1 a:visited {
color: #264F63;
font-weight: bold;
text-decoration: none;
}
#spalte1 a:focus, #spalte1 a:hover, #spalte1 a:active {
text-decoration: underline;
}
/* Spalte 2
/* * * * * * * * * * * * * * * * * * * * * * * * * * */
#spalte2 {
float:left;
width: 360px; /* Breite ohne senkrechte Linien */
background: #E4EEF3;
padding: 1em 0 10px 0;
border-right: 1px solid #FFF; /* Senkrechte Linie rechts */
border-left: 1px solid #FFF; /* Senkrechte Linie links */
}
* html #spalte2 { /* Box Model Hack - notwendig wegen border-Angabe */
width: 362px; /* Fuer IE 5 und 5.5 */
wid\th: 360px; /* Fuer IE 6 */
}
#spalte2 h1 {
color: #BD1823;
font-family: georgia,'times new roman',serif;
font-size: 120%;
line-height: 140%;
border-bottom: 1px solid #BD1823;
margin: 0 20px 1em 20px;
}
#spalte2 p {
font-size: 80%;
line-height: 150%;
margin: 1em 20px;
}
#spalte2 a:link, #spalte2 a:visited {
color: #BD1823;
font-weight: bold;
}
#spalte2 a:focus, #spalte2 a:hover, #spalte2 a:active {
color: #264F63;
}
.nachoben { text-align: right; }
/* Spalte 3
/* * * * * * * * * * * * * * * * * * * * * * * * * * */
#spalte3 {
float:left;
width: 199px; /* Breite ohne senkrechte weisse Linie */
background: #C9DEEA;
padding: 1em 0 10px 0;
}
#spalte3 h1 {
color: #2A5165;
font-size: 80%;
line-height: 160%;
margin: 0 20px;
}
#spalte3 p {
font-size: 70%;
line-height: 150%;
margin: 1em 20px;
}
#spalte3 img {
margin: 1em 10px;
}
/* Menue Galerie */
/* * * * * * * * * * * * * * * * * * * * * * * * * * */
ul.menue {
float: left;
background: #FFF;
width: 740px;
padding: 5px 0 5px 20px;
margin: 0px;
list-style: none;
}
ul.menue li {
float: left;
color: #CC0000;
font-size: 0.8em;
line-height: 1.2em;
padding: 0 10px;
border-right: 1px solid #EB9A97;
margin: 3px 0 1px 0;
}
ul.menue li.titel { padding-left: 0; }
ul.menue li.blaettern { border-right: 0; }
li.blaettern img {
position: relative;
top: 1px;
}
/* Galerie */
/* * * * * * * * * * * * * * * * * * * * * * * * * * */
#galerie {
background: #FFF;
}
#galerie a {
float: left;
height: 160px;
width: 160px;
padding: 4px;
margin: 0 20px 20px 0;
}
#galerie a:link,
#galerie a:visited {
border: 1px solid #CCCCCC;
}
#galerie a:hover,
#galerie a:focus,
#galerie a:active {
border: 1px solid #CC0000;
}
#galerie img {
vertical-align: center;
/* sonst Abstand in Firefox und Co. zur unteren Linie zu gross */
}
/* Tabellen */
/* * * * * * * * * * * * * * * * * * * * * * * * * * */
table {
/*border: 1px solid #628A9F;
border-collapse: collapse;*/
}
caption {
color: #BD1823;
font-family: georgia,'times new roman',serif;
font-size: 100%;
font-style: italic;
text-align: left;
padding: 5px;
}
td, th {
font-size: 55%;
padding: 3px 1px;
/*border: 1px solid #F9D976;*/
}
.getoent {
background-color: #FAE3B4;
}
th {
color: #222;
background-color: #F0D070;
/*background: url(images/th_hintergrund.gif) 1px 1px no-repeat;*/
text-align: left;
padding-top: 3px;
}
/* Kontakt
/* * * * * * * * * * * * * * * * * * * * * * * * * * */
#kontakt {
text-align: center;
}