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
error_reporting(E_ALL);
ini_set("display_errors", 1);
require ("inc/db/db.html");
$site = "tabs.html";
/* Built the menu */
// Set ABC in Array for the menu
$abc = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
// Give out the menu
echo "<ul class=\"lexikon_menu\">\n";
foreach($abc as $menu)
{
echo "<li><a href=\"".$site."?list=".$menu."#index\">".strtoupper($menu)."</a></li>\n";
}
echo "</ul>\n";
/* Menu is build */
/* Load the entrys from database as index */
// Build the statement for Database with PDO
$query = $db->prepare("SELECT id, erster, title, beschreibung FROM `glossar` ORDER BY erster");
if (!$query)
{
die("Execute query error, because: " . $db->errorInfo());
}
$query->execute();
// Give out the Index of Table
while ($row = $query->fetch(PDO :: FETCH_ASSOC))
{
echo "<ul>\n";
echo "<li>".htmlspecialchars($row['title'])."</li>\n";
echo "<li>".htmlspecialchars($row['beschreibung'])."</li>\n";
echo "</ul>\n";
}
/* Index is loaded */
/* Load the Entys for activated character */
$list = (isset($_GET['list']))
? $_GET['list']
: '';
// hier prüfst du auf $list weil du $_GET['list'] bereits "darein" geschrieben hast :D
if(!empty($list) && $list != '')
{
print_r($_GET);
// Database Statement and handle the connection
$query = $db->query("SELECT id, erster, title, beschreibung FROM `glossar` WHERE erster='".addslashes($list)."'");
if (!$query)
{
die("Execute query error, because: " . $db->errorInfo());
}
$query->execute();
/* den teil hier hab ich mal vorrübergehend rausgenommen
// Give out the Database Entrys
while($row = $query->fetch(PDO :: FETCH_ASSOC))
{
echo "<ul>\n";
echo "<li>".htmlspecialchars($row['title'])."</li>\n";
echo "<li>".htmlspecialchars($row['beschreibung'])."</li>\n";
echo "</ul>\n";
}
*/
echo '<pre>$query->fetch(PDO :: FETCH_ASSOC) = <br>';
var_dump($query->fetch(PDO :: FETCH_ASSOC));
echo '</pre>';
}
/* The character Entrys from database is loaded */
/* At end we close active connections */
$row = null;
$query = null;
$db = null;
?>
110609 15:02:40 153 Connect root@localhost on fundi
153 Query SELECT id, erster, title, beschreibung FROM `glossar` ORDER BY erster
153 Query SELECT id, erster, title, beschreibung FROM `glossar` WHERE erster='e'
153 Query SELECT id, erster, title, beschreibung FROM `glossar` WHERE erster='e'
153 Quit
110609 15:02:41 154 Connect root@localhost on fundi
154 Query SELECT id, erster, title, beschreibung FROM `glossar` ORDER BY erster
154 Query SELECT id, erster, title, beschreibung FROM `glossar` WHERE erster='p'
154 Query SELECT id, erster, title, beschreibung FROM `glossar` WHERE erster='p'
154 Quit
SELECT id, erster, title, Beschreibung FROM `glossar` WHERE erster='e'
SELECT id, erster, title, Beschreibung FROM `glossar` WHERE LOWER(erster)='e'
Array ( [list] => i )
$query->fetch(PDO :: FETCH_ASSOC) =
array(4) {
["id"]=>
string(2) "12"
["erster"]=>
string(1) "i"
["title"]=>
string(20) "Investiertes Kapital"
["beschreibung"]=>
string(125) "Tatsächliche verzinste und kostenverursache Kapital des Unternehmens (Eigenkapital + Langfristige Rückstellungen + Kredite)"
}
Array ( [list] => e )
$query->fetch(PDO :: FETCH_ASSOC) =
array(4) {
["id"]=>
string(1) "1"
["erster"]=>
string(1) "e"
["title"]=>
string(4) "EBIT"
["beschreibung"]=>
string(31) "Ergebnis vor Zinsen und Steuern"
}
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
require ("inc/db/db.html");
$site = "tabs.html";
/* Built the menu */
// Set ABC in Array for the menu
$abc = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
// Give out the menu
echo "<ul class=\"lexikon_menu\">\n";
foreach($abc as $menu)
{
echo "<li><a href=\"".$site."?list=".$menu."#index\">".strtoupper($menu)."</a></li>\n";
}
echo "</ul>\n";
/* Menu is build */
/* Load the entrys from database as index // WARUM ? versteh ich nicht , ich denk das soll nur für den ausgesuchten buchstaben passieren
// Build the statement for Database with PDO
$query = $db->prepare("SELECT id, erster, title, beschreibung FROM `glossar` ORDER BY erster");
if (!$query)
{
die("Execute query error, because: " . $db->errorInfo());
}
$query->execute();
// Give out the Index of Table
while ($row = $query->fetch(PDO :: FETCH_ASSOC))
{
echo "<ul>\n";
echo "<li>".htmlspecialchars($row['title'])."</li>\n";
echo "<li>".htmlspecialchars($row['beschreibung'])."</li>\n";
echo "</ul>\n";
}
*/
/* Index is loaded */
/* Load the Entys for activated character */
$list = (isset($_GET['list']))
? $_GET['list']
: '';
// hier prüfst du auf $list weil du $_GET['list'] bereits "darein" geschrieben hast :D
if(!empty($list) && $list != '')
{
print_r($_GET);
// Database Statement and handle the connection
$query = $db->query("SELECT id, erster, title, beschreibung FROM `glossar` WHERE erster='".addslashes($list)."'");
if (!$query)
{
die("Execute query error, because: " . $db->errorInfo());
}
$query->execute();
// Give out the Database Entrys
while($row = $query->fetch(PDO :: FETCH_ASSOC))
{
echo "<ul>\n";
echo "<li>".htmlspecialchars($row['title'])."</li>\n";
echo "<li>".htmlspecialchars($row['beschreibung'])."</li>\n";
echo "</ul>\n";
}
// echo '<pre>$query->fetch(PDO :: FETCH_ASSOC) = <br>';
// var_dump($query->fetch(PDO :: FETCH_ASSOC));
// echo '</pre>';
}
/* The character Entrys from database is loaded */
/* At end we close active connections */
$row = null;
$query = null;
$db = null;
?>