Hiho =)
Ich ahbe folgendes Problem:
Ich ahb ne kleine Image Gallery gecodet, die auch super funktioniert. Das einzige Problem ist, das ich eine Seitenaufteilung cmhen will, das aber nicht hinbekomme![Frown](https://www.php-resource.de/forum/core/images/smilies/frown.gif)
zBsp. Nach 10 Bildern auf einer Seirte soll dann eine neue angefangen werden. Unten drunter kommen dann die Links
"1 | 2 | 3" usw.
Kann mir da einer helfen ? =)
Mal ein Teil meines codes:
Das ist der Teild er die Bilder anzeigen lässt. $anz in die Anzahl der Bilder insgesamt. Eine Demo davon gibts hier, falls sich jemand das ganze anschauen möchte.
Danke im Vorraus
~ newhx
Ich ahbe folgendes Problem:
Ich ahb ne kleine Image Gallery gecodet, die auch super funktioniert. Das einzige Problem ist, das ich eine Seitenaufteilung cmhen will, das aber nicht hinbekomme
![Frown](https://www.php-resource.de/forum/core/images/smilies/frown.gif)
zBsp. Nach 10 Bildern auf einer Seirte soll dann eine neue angefangen werden. Unten drunter kommen dann die Links
"1 | 2 | 3" usw.
Kann mir da einer helfen ? =)
Mal ein Teil meines codes:
PHP-Code:
elseif($gal && !$ac) {
$handle = opendir($gal);
$ii=0;
$anz=0;
while($file = readdir($handle)) {
if($file == "." || $file == "..") {
} else {
$t=$gal."/".$file;
if(is_dir($gal."/".$file) && $t != $gal."/thumb") {
$subcat[$ii] = $file;
$ii++;
} elseif(!is_dir($gal."/".$file)) {
$bild[$ii] = $file;
$anz++;
$ii++;
}
}
}
if($subcat) {
echo "<table border=1 bordercolor=#000000 style=\"border-collapse: collapse;\" width=20%>
<tr><td bgcolor=#666696><font color=ffffff><b>» Unterkategorien || <a href=Javascript:history.go(-1)>
<font color=#ffffff>zurück</font></a></b></font></td></tr><tr><td>";
for($i1=0;$i1<sizeof($subcat);$i1++) {
$cats1[$i1] = eregi_replace(" ", "%20", $subcat[$i1]);
echo " <img src=folder.gif border=0> <a href=$PHP_SELF?gal=$gal/$cats1[$i1]>$subcat[$i1]</a><br>";
}
echo "</td></tr></table>";
} else {
$ga2l = explode("/", $gal);
echo "<table border=1 bordercolor=#000000 style=\"border-collapse: collapse;\" width=70%>
<tr><td bgcolor=#666696><font color=ffffff><b>» Bilder (Insg. $anz Bilder) ||
<a href=$PHP_SELF?gal=$ga2l[0]><font color=#ffffff>zurück</font></a></b></font></td></tr><tr><td>
<table border=0 width=100%>";
$s=0;
$is=1;
while ($s<sizeof($bild)) {
echo "<td><a href=$PHP_SELF?id=$s&p=$gal&ac=view><img src=$gal/thumb/$bild[$s] border=0></a>\n";
if ($is >= $col) { echo "</td></tr><tr>"; $s++; $is=1; }
else { echo "</td>"; $s++; $is++; }
}
echo "</table></td></tr></table>";
}
}
Danke im Vorraus
![dontknow](https://www.php-resource.de/forum/core/images/smilies/fragend013.gif)
~ newhx
Kommentar