I am having trouble with my next and prev links can some one lend me a hand.
<?
//top of the file display. doesn;t really have to be echod.. heh. whatever
echo "<td valign=\"top\"><br><table border=\"1\">";
//this sets which directory to open.
$today = date("Ymd");
if ($handle = @opendir($contentdir)) {
//while their is content in the dir.
while ($file = readdir($handle))
{
//sets the file types that can be displayed
if ($file != "." && $file != ".." && preg_match(getMediaRegex(),$file) && (date("Ymd", filemtime($file)) == $today))
$retVal[count($retVal)] = $file;
}
//Clean up and sort
closedir($handle);
//if no files are available tell the user
if (count ($retVal)==0){
echo $fileMissingError;
}else {
//sorts the files in soem order ;)
sort($retVal);
// set the number of files in dir
$numitems = count($retVal);
//sets number of items in each row
$numinrow = round($numitems/$numrows);
//set up content dir
$sPath = $contentdir;
//$DEBUG=1; //debug info....
if ($DEBUG){
}
// this is getting ready for a paginated display
if ($beg =="")$beg=0;
if ($end =="")$end=$numitems;
for ($y=$beg;$y<=$end;$y++){
$filelistdata[$y]=$retVal[$y];
} //startsparsing through the file list
$x=0;
while (list($key, $val) = each($filelistdata))
{
// checks if it is a kosher file types
if ($val != "." && $val != ".." && preg_match(getMediaRegex(),$val))
{
$x++;
//make the path
$path = str_replace("//","/",$sPath.$val);
//set up the path the user sees
$disppath = preg_replace(getMediaRegex(),"",$val);
$disppath = str_replace(".","",$disppath);
//gets the file size
$size = filesize($sPath.$val);
//make it readable
$size = round($size/1024);
//change _ int space
$self = str_replace("index.php","",$PHP_SELF);
//$disppath = str_replace("-"," ",$disppath);
//truncate the display path to a set size
$disppath2 = truncate($disppath,$truncsize);
$getf = get_file_ext($path);
//set every other row a different color
if (($x%2)==0)$color="#FFFFFF"; else $color="#F6F6F6";
//more debug info
if ($DEBUG) $debugcount="#$x: ";
//out put the table section that has all the file info. Include a preview part
//and a display part. also include the link
if (($getf == "jpg") || ($getf == "png") || ($getf == "jpe") || ($getf == "jpeg")){
echo"This is where the files will be displayed";
}
//make columns
if ((($x%$numinrow)==0)&&($x <$numitems))
echo "</table></td><td valign=\"top\"><br><table border=\"1\">";
}
}
}
echo "</table>";
echo"This is where the i need the help. To echo the next and prev links.";
?>
I have to display $array_item[$x] - $array_item [$y] and then have the next page be something like <a href="page.php?listitem=2">next set</a>
but i can't get it down