Hallo,
Ik wil graag bij mijn onderstaande script een functie bouwen die iedere keer maar 5 images laat zien met een volgende en vorige button.
Ik heb alleen geen idee hoe ik dit moet doen.
----------------
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2005 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (!defined('MODULE_FILE')) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include("header.php");
OpenTable();
$photodir = "photos/";
$dir = "/home/cootje/domains/streetracingoutlaw.com/public_html/photos"; // de directory die hij uit moet lezen
$exten = 'jpg'; // de extensie die hij weer moet geven
if ($handle = @opendir($dir))
{
while (false !== ($file = @readdir($handle))) {
$bestand = $dir ."/". $file ;
$ext = pathinfo($bestand);
if($ext['extension'] == $exten)
{
OpenTable();
echo "<a href='modules.php?name=Foto_Album&photoid=". basename($file, ".jpg") ."'><img src=".$photodir."".$file." width='140' height='100'></a> " ;
CloseTable();
}
}
@closedir($handle);
}
echo'<br><br><br>';
//Kijken of er een fotoID is meegegeven in de url.
if(isset($_GET['photoid'])){
//Laat dit zien als er een photoID is aangetroffen.
OpenTable();
echo'
<table width="480" height="360" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="http://streetracingoutlaw.com/photos/'.$photoid.'.jpg" height="360" width="480"></td>
</tr>
</table>';
CloseTable();
}
echo'<div align="center">Copyright <a href=mailto:[email protected]>Marco Jansen</a> & <a href=mailto:[email protected]>Robin Peters</a>, © 2006</div>';
CloseTable();
include("footer.php");
?>
170 views