$v) { $tmpArray[] = $v; } return array('Number' => $dirCounter, 'List' => $tmpArray); } // }}} // {{{ printSummary() /** * Print the summary table that displays all images of an album. * * @param string $album Name of the album tp print * the summary from. * @access public * @author Christian Machmeier */ function printSummary($album) { global $simpleViewer; if (empty($album)) { return false; } $i = 0; $xmlData = array(); $sourceData = parseXML($_SESSION['currentDir'] . 'imageData.xml'); foreach ($sourceData as $k => $v) { if ($v['tag'] == 'NAME') { $xmlData[$i]['name'] = $v['value']; } if ($v['tag'] == 'CAPTION') { $xmlData[$i]['caption'] = (!empty($v['value']) ? $v['value'] : ''); $i++; } } $numberOfImages = count($xmlData); echo "\n
This album contains no images. | '; } else { $cellCounter = 1; foreach ($xmlData as $k => $v) { echo "\n\n \n";
// Display the "backward" button for every image execpt the first.
if ($k != 0) {
echo "
";
}
// Display the "forward" button for every image execpt the last.
if ($k != $numberOfImages-1) {
echo "
";
}
echo "
|
";
if (($cellCounter % 5) == 0) {
echo "
\n"; } } } echo " |