Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
<?php
// Session starten
session_start();
$sname = session_name();
$sessid = session_id();
?>
<?php
// DB connect **********************************************************************************************************
error_reporting(E_ALL);
// Database Connection
include "inc/db_config.inc.php";
$db_link = @mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS) OR die(mysql_error());
mysql_select_db(MYSQL_DATABASE) OR die(mysql_error());
if ($_POST){
// Sessionvariablen erstellen und registrieren
$_SESSION['bundesland'] = $_POST['bundesland'];
$_SESSION['landkreis'] = $_POST['landkreis'];
$_SESSION['stadt'] = $_POST['stadt'];
$_SESSION['arbeitsbereich'] = $_POST['arbeitsbereich'];
}
/*Headpart */
@include "inc/headpart.inc.php";
?>
<?php
/*suchformular */
@include "inc/suchformular.inc.php";
?>
</td></tr>
<tr><td>
<?php
// If current page number, use it
// if not, set one!
if(!isset($_GET['page'])){
$page = 1;
} else {
$page = $_GET['page'];
}
// Define the number of results per page
$max_results = 10;
// Figure out the limit for the query based
// on the current page number.
$from = (($page * $max_results) - $max_results);
// Perform MySQL query on only the current page number's results
$sDetails[] = "BD_bundesland";
$sDetails[] = "BD_landkreis";
$sDetails[] = "BD_ort";
$sDetails[] = "BD_type";
$suchwert[] = $_SESSION['bundesland'];
$suchwert[] = $_SESSION['landkreis'];
$suchwert[] = $_SESSION['stadt'];
$suchwert[] = $_SESSION['arbeitsbereich'];
//echo $suchwert[0].",".$suchwert[1].",".$suchwert[2].",".$suchwert[3];
$items = mysql_result(mysql_query("SELECT COUNT(BD_Datum)as Num FROM bauherren_daten WHERE ".$sDetails[1]."
LIKE '".$suchwert[1]."%' "),0);
//$sql = "SELECT * FROM benutzer WHERE (id LIKE '%".mysql_real_escape_string($_POST['suche'])."%') OR (benutzername LIKE '%".mysql_real_escape_string($_POST['suche'])."%') OR (email LIKE '%".mysql_real_escape_string($_POST['suche'])."%')";
$i = 1;
$bgcolor = " ";
$scountP = 0;
$CP = 1;
echo "<br>";
echo("<table align=\"center\" width=\"610\" border=\"0\" cellspacing=\"1\">");
//foreach($sDetails as $value){
//$sql = 'SELECT BD_text, BD_Datum FROM `bauherren_daten` WHERE (BD_bundesland LIKE \'Hessen%\' )
// AND (BD_landkreis LIKE \'Barnim [Eberswalde]%\' ) AND (BD_type LIKE \'Gas- und Wasserinstallationen%\' )
//ORDER BY `BD_ID` DESC LIMIT 0, 7';
$sql = "SELECT BD_text, BD_Datum FROM bauherren_daten WHERE (BD_bundesland LIKE '%".mysql_real_escape_string($suchwert[0])."%' )
AND (BD_landkreis LIKE '%".mysql_real_escape_string($suchwert[1])."%' ) AND (BD_type LIKE '%".mysql_real_escape_string($suchwert[3])."%' )
ORDER BY BD_ID DESC LIMIT $from, $max_results";
// $sql = "SELECT BD_text, BD_Datum FROM `bauherren_daten` WHERE (BD_bundesland LIKE \'$suchwert[0]%\' )
// AND (BD_landkreis LIKE \'$suchwert[1]%\' ) AND (BD_type LIKE \'$suchwert[3]%\' )
//ORDER BY `BD_ID` DESC LIMIT $from,$max_results ";
// $sql = "SELECT BD_text, BD_Datum FROM `bauherren_daten` WHERE (BD_bundesland LIKE '".$suchwert[0]."%' )
// AND (BD_landkreis LIKE '".$suchwert[1]."%' ) AND (BD_type LIKE '".$suchwert[3]."%' )
// ORDER BY `BD_ID` DESC LIMIT ".$from.",".$max_results."";
//$sql = "SELECT BD_text, BD_Datum FROM `bauherren_daten` WHERE ".$sDetails[$scountP]."
//= '".$suchwert[$scountP]."' ORDER BY `BD_ID` DESC LIMIT $from, $max_results ";
$result = mysql_query($sql);
echo "".mysql_error($sql)." ,".mysql_error($result);
while ($row = mysql_fetch_array($result)) {
if ($bgcolor == "#DBDEB1"){
$bgcolor = "#FFFFFF";
}else{
$bgcolor = "#F0F3C4";
}
$datumP = $row['BD_Datum'];
$textP = $row['BD_text'];
$datenP[$CP] = $datumP;
$datenTP[$CP] = $textP;
echo "<tr bgcolor=".$bgcolor.">";
echo "<td width=\"100\" class=\"Stil1\" scope=\"col\"><div align=\"left\">Angebot ".$CP.":</div></td>";
echo "<td width=\"110\" scope=\"col\"><div align=\"left\"> ".$datenP[$CP]."</div></td>";
echo "<td width=\"400\" scope=\"col\"><div align=\"left\">".$datenTP[$CP]."</div></td>";
echo "<td ><a href=\"login.php\">Interessiert ? </a> </td>";
echo "</tr>";
$CP++;
}
$scountP++;
$i++;
//}
if(empty($items)){echo "Es konnten leider keine Einträge die Ihren Wünschen entsprechen, gefunden werden!";}
echo("</table>");
// Figure out the total number of results in DB:
$total_results = $items;
// Figure out the total number of pages. Always round up using ceil()
$total_pages = ceil($total_results / $max_results);
?>
</td></tr>
<tr><td bgcolor="#DBDEB1" scope="col"><span class="Stil8">
<?php
// Build Page Number Hyperlinks
echo "<center><br>";
// Build Previous Link
if($page > 1){
$prev = ($page - 1);
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev&$sname=$sessid\"><< Zurueck</a> ";
}
for($i = 1; $i <= $total_pages; $i++){
if(($page) == $i){
echo "$i ";
} else {
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$i&$sname=$sessid\">$i</a> ";
}
}
// Build Next Link
if($page < $total_pages){
$next = ($page + 1);
echo " <a href=\"".$_SERVER['PHP_SELF']."?page=$next&$sname=$sessid\">Weiter>></a>";
}
echo "</center>";
?>
</span>
<?php
/* Footpart */
@include "inc/footpart.inc.php";
?>
$items = mysql_result(mysql_query("SELECT COUNT(BD_Datum)as Num FROM bauherren_daten WHERE ".$sDetails[1]." LIKE '".$suchwert[1]."%' "),0);