<?php
if (isset($_POST['plz']) && file_exists($_POST['plz'] .".php")) {
header("Location:" .$_POST['plz'] .".php");
} else if (isset($_POST['plz']) && !file_exists($_POST['plz'] .".php")) {
echo "Falsche oder fehlende Eingabe!";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1" />
<meta name="robots" content="INDEX,FOLLOW" />
<meta name="keywords"
content="homepage,dokument,webpage,page,web,netz,homepage dokument webpage page web netz" />
<meta name="description"
content="homepage, dokument, webpage, page, web, netz" />
<title>ResBar</title>
<link rel="stylesheet" href="CSS/format.css" type="text/css" />
<link rel="stylesheet" href="CSS/menue.css" type="text/css" />
<link href="CSS/Tabelle.css" rel="stylesheet" type="text/css">
</head>
<form name="form1" action="unbenannt.php" method="post">
<input name="plz" type="text" size="6" maxlength="6" value="" />
<input type="submit" name="sub" value="suchen" />
</form>
<?php
exit();
?>
<body>
<!-- Ändern der Tabellenfarbe jeder 2 Zeile -->
<script type="text/javascript">
function altRows(id){
if(document.getElementsByTagName){
var table = document.getElementById(id);
var rows = table.getElementsByTagName("tr");
for(i = 0; i < rows.length; i++){
if(i % 2 == 0){
rows[i].className = "evenrowcolor";
}else{
rows[i].className = "oddrowcolor";
}
}
}
}
window.onload=function(){
altRows('alternatecolor');
}
</script>
<table align="center" id="breite" cellspacing="0" cellpadding="0" border="0" >
<tr>
<!--ende aussentab-->
<td align="center" width="100%" >
<!--schatten um die seite oben -->
<table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="s1"><img src="images/1.jpg" width="22" height="22" border="0" alt="" /></td>
<td id="s2"><img src="images/2.jpg" width="22" height="22" border="0" alt="" /></td>
<td id="s3"><img src="images/3.jpg" width="22" height="22" border="0" alt="" /></td>
</tr>
<tr>
<td id="s4"><img src="images/4.jpg" width="22" height="22" border="0" alt="" /></td>
<td >
<!--ende schatten um die seite oben -->
<!--kopf-->
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td id="top1" ><span id="name">Restaurants und Bars</span></td>
</tr>
<tr>
<td id="top2" >
<table height="100%" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="logo" width="66%">
</td>
<td width="34%" id="nav" >
<!-- menü rechts oben 1-->
<div id="menu2">
<b style="font-size:20px; color:#996633; background-color:#EBC09A; padding-left:6px; padding-right:6px; background-image:url(images/leiste-schatten-unten-braun.gif); border:solid 1px black; background-repeat:repeat-x; background-position: 50% 100%; padding-bottom:3px">»</b>
<span style="font-size: 16px;font-family: arial,tahoma,verdana,helvetica, sans-serif;color:#e6e6e6;">Navigation. First.</span>
<ul >
<li><a href="*.*" >Link 1</a></li>
<li><a href="*.*" >Link 2</a></li>
<li><a href="*.*" >Link 3</a></li>
<li><a href="*.*" >Link 4</a></li>
<li><a href="*.*" >Link 5</a></li>
<li><a href="*.*" >Link 6</a></li>
</ul>
</div>
<!-- ende menü rechts oben 1-->
<!-- menü rechts oben 2-->
<div id="menu2b">
<b style="font-size:20px; color:#996633; background-color:#EBC09A; padding-left:6px; padding-right:6px; background-image:url(images/leiste-schatten-unten-braun.gif); border:solid 1px black; background-repeat:repeat-x; background-position: 50% 100%; padding-bottom:3px">»</b>
<span style="font-size: 16px;font-family: arial,tahoma,verdana,helvetica, sans-serif;color:#e6e6e6">Navigation. Second.</span>
<ul >
<li><a href="*.*" >Partner 1</a></li>
<li><a href="*.*" >Partner 2</a></li>
<li><a href="*.*" >Partner 3</a></li>
<li><a href="*.*" >Sponsor 1</a></li>
<li><a href="*.*" >Sponsor 2</a></li>
<li><a href="*.*" >Weitere Links</a></li>
</ul>
</div>
<!-- ende menü rechts oben 2-->
</td>
</tr>
</table>
</td>
</tr><tr>
<td id="top3" ><table width="100%" align="center" id="menu1" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td align="center" width="20%" ><a href="index.php" >Home</a></td>
<td class="trenn"><img src="images/pixelspace.gif" width="1" height="1" border="0" alt="" /></td><td class="trenn2"><img src="images/pixelspace.gif" width="1" height="1" border="0" alt="" /></td>
<td width="20%" align="center"><a href="index.php">Service</a></td>
<td class="trenn"><img src="images/pixelspace.gif" width="1" height="1" border="0" alt="" /></td> <td class="trenn2"><img src="images/pixelspace.gif" width="1" height="1" border="0" alt="" /></td>
<td width="20%" align="center"><a href="Ausgabe.php">Ausgabe</a></td>
<td class="trenn"><img src="images/pixelspace.gif" width="1" height="1" border="0" alt="" /></td><td class="trenn2"><img src="images/pixelspace.gif" width="1" height="1" border="0" alt="" /></td>
<td width="20%" align="center"><a href="Eingabe.php">Eingabe</a></td>
<td class="trenn"><img src="images/pixelspace.gif" width="1" height="1" border="0" alt="" /></td><td class="trenn2"><img src="images/pixelspace.gif" width="1" height="1" border="0" alt="" /></td>
<td width="20%" align="center"><a href="index.php" >Impressum</a></td>
</tr>
</table>
<!-- ende menü oben--></td>
</tr>
</table>
<!--ende oben-->
<!-- inhalt-->
<table align="center" width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td valign="top" id="textbox">
<h2>Hier können Sie die Suche Starten nach Ihren Wünschen</h2>
<p> </p>
<!--Anfang Testseite -->
<form name="form1" action="unbenannt.php" method="post">
<fieldset><legend><span class="Stil1">Suchkriterien</span></legend>
<table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#2F2F2F"><tr><td colspan="3" ><table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#EBC09A">
<tr>
<th colspan="5" scope="col"><img src="images/leiste-schatten-oben-braun.gif" width="100%" height="24" /></th>
</tr>
<tr>
<td width="1%"> </td>
<td width="25%"><span class="Stil3">Plz. mind. 3 Stellen</span></td>
<td width="26%"><span class="Stil3">Ort</span></td>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td>
<input name="plz" type="text" size="6" maxlength="6" value="" /> </td>
<td colspan="3">
<input name="ort" type="text" size="40" maxlength="38" /> </td>
</tr>
<tr>
<td><span class="Stil2"></span></td>
<td width="25%"><span class="Stil3">Art der Küche</span></td>
<td width="25%"><span class="Stil3">Garten</span></td>
<td width="25%"><span class="Stil3">Behinderten gerecht</span></td>
<td width="25%"><span class="Stil3">Übernachtung möglich</span></td>
</tr>
<tr>
<td> </td>
<td>
<select name="kueche" id="kueche" size="1" maxlength="30" >
<option> </option>
<option>fränkisch</option>
<option>deutsch</option>
<option>italienisch</option>
</select> </td>
<td>
<select name="garten" id="garten" size="1" maxlength="5" >
<option> </option>
<option>ja</option>
<option>nein</option>
</select> </td>
<td>
<select name="behindert" id="behindert" size="1" maxlength="5" >
<option> </option>
<option>ja</option>
<option>nein</option>
</select> </td>
<td>
<select name="nacht" id="nacht" size="1" maxlength="5" >
<option> </option>
<option>ja</option>
<option>nein</option>
</select> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="5" >
<input type="submit" name="sub" value="suchen" />
<input type="reset" value="Löschen" onClick="return confirm('Wirklich Eingaben verwerfen?')" /></td>
</tr>
<tr>
<td colspan="5">
<img src="images/leiste-schatten-unten-braun.gif" width="100%" height="24" /> </td>
</tr>
</table></td>
</tr>
</table>
</fieldset>
</form>
<br />
<br /><br />
<fieldset><legend><span class="Stil1">Gefunden</span></legend>
<p>
<?php
require_once ('konfiguration-ResBar.php');
$garten = $_POST['garten'];
$kueche = $_POST['kueche'];
$plz = $_POST['plz'];
$ort = $_POST['ort'];
$behindert = $_POST['behindert'];
$nacht = $_POST['nacht'];
if (isset($_POST["submit"]))
{ // if Klammer auf und ganz am Schluß Klammer zu
$query = sprintf(
"SELECT * FROM ResBar WHERE garten='%s' OR kueche='%s' OR plz='%s' OR ort='%s' OR behindert='%s' OR nacht='%s' ",
mysqli_real_escape_string($db_link, $garten),
mysqli_real_escape_string($db_link, $kueche),
mysqli_real_escape_string($db_link, $plz),
mysqli_real_escape_string($db_link, $ort),
mysqli_real_escape_string($db_link, $behindert),
mysqli_real_escape_string($db_link, $nacht)
);
$db_erg = mysqli_query( $db_link, $query );
if ( ! $db_erg )
{
die('Ungültige Abfrage: ' . mysqli_error());
}
}// Klammer von submit
echo "<table width='100%' class='altrowstable' id='alternatecolor' >
<tbody>
<td background='images/leiste-schatten-ausgabetabelle.gif' width='5%' > Bild </td>
<td background='images/leiste-schatten-ausgabetabelle.gif'> Lokalname </td>
<td background='images/leiste-schatten-ausgabetabelle.gif'> Küche </td>
<td background='images/leiste-schatten-ausgabetabelle.gif'> Garten </td>
<td background='images/leiste-schatten-ausgabetabelle.gif'> Ruhetage </td>
<td background='images/leiste-schatten-ausgabetabelle.gif'> Über- <br>nachtung </td>
<td background='images/leiste-schatten-ausgabetabelle.gif'> Behinderten- <br>freundlich </td>
<td background='images/leiste-schatten-ausgabetabelle.gif'> Telefon </td>
<td background='images/leiste-schatten-ausgabetabelle.gif'> Postleitzahl </td>
<td background='images/leiste-schatten-ausgabetabelle.gif'> Ort </td>
<td background='images/leiste-schatten-ausgabetabelle.gif'> Straße </td>
<td background='images/leiste-schatten-ausgabetabelle.gif'> Homepage </td>
";
while ($zeile = mysqli_fetch_array( $db_erg, MYSQL_ASSOC))
{
echo "<tr>";
echo "<td>". $zeile['bild'] . "</td>";
echo "<td>". $zeile['restaurantname'] . "</td>";
echo "<td>". $zeile['kueche'] . "</td>";
echo "<td>". $zeile['garten'] . "</td>";
echo "<td>". $zeile['montag'] .' '. $zeile['dienstag'] .' '. $zeile['mittwoch'] . ' '. $zeile['donnerstag'] . ' '. $zeile['freitag'] .' ' . $zeile['samstag'] . ' '. $zeile['sonntag'] . "</td>";
echo "<td>". $zeile['nacht'] . "</td>";
echo "<td>". $zeile['behindert'] . "</td>";
echo "<td>". $zeile['telefon'] . "</td>";
echo "<td>". $zeile['plz'] . "</td>";
echo "<td>". $zeile['ort'] . "</td>";
echo "<td>". $zeile['strasse'] . "</td>";
// Escaping für Kontextwechsel nach HTML
$e = function ($s) { return htmlspecialchars($s, ENT_QUOTES, 'UTF-8'); };
//homepage Anzeige als Link
echo '<td><a href="' . $zeile['homepage'] . '">' . $zeile['homepage'] . '</a></td>';
echo "</tr>";
}
mysqli_free_result( $db_erg );
echo "</tbody></table>";
?>
<!--
<a class="mitte">
<img src="Bilder/Hans.jpg" width="50" height="50" align="middle" style="" /> <br />
<span class="mitte_mitte">
<img src="Bilder/Hans.jpg" alt="" style="z-index:20" /></span></a>
<br />
-->
</fieldset>
<!-- Ende Testseite --></td></tr>
<tr>
<td valign="top" id="textbox4">
</td></tr>
<tr>
<td valign="top" id="textbox3">
</td></tr>
<tr>
<td valign="top" id="textbox2">
</td></tr>
</table>
<!-- ende inhalt-->
<!-- fuss-->
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td id="fuss" ><a href="http://resbar.de/">ResBar.de</a><br />
</td>
</tr>
</table>
</td>
<!-- schatten um die seite unten -->
<td id="s6"><img src="images/6.jpg" width="22" height="22" border="0" alt="" /></td>
</tr>
<tr>
<td id="s7"><img src="images/7.jpg" width="22" height="22" border="0" alt="" /></td>
<td id="s8"><img src="images/8.jpg" width="202" height="22" border="0" alt="" /></td>
<td id="s9"><img src="images/9.jpg" width="22" height="22" border="0" alt="" /></td>
</tr>
</table>
<!--ende schatten um die seite unten -->
</td>
</tr>
</table>
</body></html>