include('global.php'); $sqlSubCats = "SELECT c2.catId, c2.catName, c2.catBelow FROM categories AS c1, categories AS c2 WHERE c1.catId = $_GET[catId] AND c2.catBelow = c1.catBelow ORDER BY c2.catOrder, c1.catName"; $rsSubCats = mysql_query($sqlSubCats, $conn) or die(mysql_error()); $rowSubCats = mysql_fetch_assoc($rsSubCats); $mainCat = $rowSubCats[catBelow]; include('navigation.php'); if ($login) $sqlExt = ", ROUND((photoClicks / (TO_DAYS(CURDATE()) - TO_DAYS(photoDateAdded))), 1) AS clicksPerDay"; $sqlThumbs = "SELECT photoId, photoTitle, photoClicks $sqlExt FROM photos WHERE photoCatId = $_GET[catId] ORDER BY photoOrder, photoId DESC"; $rsThumbs = mysql_query($sqlThumbs, $conn) or die(mysql_error()); $totalRecords = mysql_num_rows($rsThumbs); $totalRows = ceil($totalRecords / 5); $totalCells = $totalRows * 5; ?>
";
if ($photoId) {
echo "";
echo "![]() | \n";
if (!bcmod($cell, 5)) echo "\t