error_reporting(15);
include("chunkcommon.php");
if(!isset($page))
$page = 0;
grabFormat();
$chunkDataUnculled = getChunkData();
//here's where we exclude whatever chunks have been picked
//up from the directory list.
//we go through and select each element of chunkDataUnculled
//and if it's what we want, we'll add it to the good list
//called chunkData
for($x = 0; $x < count($chunkDataUnculled); $x++)
{
$curChunkData = $chunkDataUnculled[$x]; //here we grab out the current chunkData
//now come the conditions
if(
(
// $curChunkData["dateFields"]["year"] >= 2001 //if the year is 2003 or later
// and $curChunkData["dateFields"]["month"] == 10 //AND if the month is october
strtolower($curChunkData["sec"]) == $sec or $parental == 1
)
and
(
strtolower($curChunkData["cat"]) == $cat
)
)
{
$chunkData[] = $curChunkData; //then add it to the list of chunks to show
}
}
$numPages = ceil(sizeof($chunkData) / $chunksPerPage);
//print "";
//print makePageSelector($numPages, $page);
//print " |
";
$firstChunkIndex = $page * $chunksPerPage;
$lastChunkIndex = $firstChunkIndex + $chunksPerPage - 1;
if($lastChunkIndex > sizeof($chunkData) - 1)
$lastChunkIndex = sizeof($chunkData) - 1;
for($x = $firstChunkIndex; $x <= $lastChunkIndex; $x++)
print formatChunkData($chunkData[$x])."\n\n\n";
?>