case "fields": unset($_SESSION['searchForm']['fields']); $_SESSION['searchForm']['allFields'] = true; break; } $mediaPages->setCurrentPage(1); unset($_SESSION['searchForm']['resultsArray']); // Clear previous resultsArray } if ($page) { $mediaPages->setCurrentPage($page); } else { $mediaPages->setCurrentPage($_SESSION['searchCurrentPage']); } // Use session current page $mediaStartRecord = $mediaPages->getStartRecord(); // Get the record the db should start at //echo "{$mediaStartRecord},{$mediaPerPage} - ".$_SESSION['mediaCurrentPage']; //$mediaStartRecord = 0; if ($_REQUEST['searchSortBy']) { $_SESSION['searchForm']['searchSortBy'] = $_REQUEST['searchSortBy']; } if ($_REQUEST['searchSortType']) { $_SESSION['searchForm']['searchSortType'] = $_REQUEST['searchSortType']; } if (!$_SESSION['searchForm']['searchSortBy']) { $_SESSION['searchForm']['searchSortBy'] = 'date_added'; } if (!$_SESSION['searchForm']['searchSortType']) { switch ($_SESSION['searchForm']['searchSortType']) { default:
} else { $mediaPages->setCurrentPage($_SESSION['mediaCurrentPage']); } // Use session current page if ($gpage) { if (!is_numeric($gpage)) { header("location: error.php?eType=invalidQuery"); exit; } $galleryPages->setCurrentPage($gpage); // Set new current gallery page } else { $galleryPages->setCurrentPage($_SESSION['galleryCurrentPage']); } // Use session current page $galleryStartRecord = $galleryPages->getStartRecord(); // Get the record the db should start at $mediaStartRecord = $mediaPages->getStartRecord(); // Get the record the db should start at $smarty->assign('galleryMode', $_SESSION['currentMode']); // Assign the gallery mode to smarty switch ($_SESSION['currentMode']) { default: $templateFile = 'noaccess.tpl'; // No permissions - send to noaccess page break; /* * Gallery */ /* * Gallery