Er der mulighed for count og side skift?
Hej eksperterKan i se om det er muligt i dette script:
<?php
if ($slet) {
unlink("$slet");
$id = $_GET['id'];
header("Location: slet_gal_enkelt.php?id=$id");
exit;
}
require "db.php";
$id = $_GET['id'];
$query = mysql_query ("SELECT * FROM mini_galleri WHERE id='$id'");
while ($row = mysql_fetch_array($query)) {
$sti = $row['sti'];
$mappe = "/djmini";
$sti_hel = $sti;
$imagedir = "$sti_hel";
}
if ($dh = opendir($imagedir)) {
while ($file = readdir($dh)) {
if ($file == "." || $file == ".." || is_dir($file)) continue;
if (eregi("(jpg|png|bmp|gif)", $file)) {
$size = getimagesize("$imagedir/$file");
$str = number_format((filesize("$imagedir/$file") / 1024), 2);
?>
<?php
?>
<tr>
<td style="border-bottom-width: 1px;border-bottom-style: solid;"><a href="?id=<?php echo "$_GET[id]";?>&slet=<?php echo "$sti/$file";?>"><img src="../pics/deleted.gif" border="0" alt="Slet billede '<?php echo $file; ?>'"></a></td>
<td style="border-bottom-width: 1px;border-bottom-style: solid;"><a href="<?php echo "$sti/$file";?>" target="_blank" class="menu"><img src="../pics/zoom.gif" border="0" alt="Se billede '<?php echo $file; ?>'"></a> <?php echo $file;?> </td>
<td align="right" style="border-bottom-width: 1px;border-bottom-style: solid;"><?php echo $str;?> Kb. </td>
<td align="right" style="border-bottom-width: 1px;border-bottom-style: solid;"><?php echo $size[0];?> x <?php echo $size[1];?> px. </td>
</tr>
<?php
}
}
}
?>
At lave så den viser de første 10 linjer på side 1 og hvis der er mere end 10 billeder i mappen så kan man klikke "næste" så kommer man til de næste 10 billeder.. osv osv.. er det muligt?
