hi!
hab ein GB gebastelt und eine Anzeige der Seitenzahl hinzugefügt. Ich hätte gerne, das es die seitenzahlen so anzeigt: "Seite: 1 2 3"
leider funktioniert dies nicht, und es zeigt die Seite nicht an, auf welcher ich mich gerade befinde, also angezeigt wird z.B. "Seite: 2 3"
Vielleicht kennt sich damit jemand gut aus, ich bin noch ziemlich am Anfang meiner PHP-Kenntnisse
gruß
Lupidor
hab ein GB gebastelt und eine Anzeige der Seitenzahl hinzugefügt. Ich hätte gerne, das es die seitenzahlen so anzeigt: "Seite: 1 2 3"
leider funktioniert dies nicht, und es zeigt die Seite nicht an, auf welcher ich mich gerade befinde, also angezeigt wird z.B. "Seite: 2 3"
Vielleicht kennt sich damit jemand gut aus, ich bin noch ziemlich am Anfang meiner PHP-Kenntnisse
PHP:
if ($action != "Eintrag"){
$file = file("data/gbuch.txt");
$count = count($file);
if (empty($page)){
$page = "1";
}
$max = ($maxmes * $page);
$min = ($max - $maxmes);
if (empty($count)){
$count = "1";
}
if ($count > $maxmes and $action != "Eintrag"){
$totallite = ($count / $maxmes);
$totallite = ($totallite + "1");
print "<table width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td><div align=\"right\">Seite ";
for ($p = 1 ; $p <= $totallite ; $p++){
if ($p != $page){
print "<a href=\"index.php?seite=Gaestebuch&";
if ($user == $adminuser and $pass == $adminpass){
print "user=$user&pass=$pass&";
}
print "page=$p\">$p</a> ";
}
}
}
print "</div>
</td>
</tr>
</table>
gruß
Lupidor