require_once('/home/neofil/interl/defs.inc'); require_once(SCRIPT_FOLDER . 'dbdefs.inc'); require_once(SCRIPT_FOLDER . 'gallery.inc'); // must be called last because it calls session_start() // all classes must be included before session_start() is called) require_once(SCRIPT_FOLDER . 'session.inc'); // TODO: update to check for user sessions as well // pull existing gallery from session or create new gallery if (isset($_SESSION['gallery'])) { // gallery from session already has a copy of the database $gallery = $_SESSION['gallery']; } else { connect_db(); $gallery = new Gallery($DATABASE, PHOTOS_PER_PAGE); } // check for post data (may contain filters) // check for page number if (isset($_GET['page'])) { $gallery->pageIndex = $_GET['page']; } if (isset($_GET['tags'])) { $gallery->tags = $_GET['tags']; } // get a list of all tags (function in gallery.inc) ?>
$page = $gallery->pageIndex;
$last = $gallery->pageCount - 1;
if ($page == 0) {
echo <<
Ĝisdatigita 2012.02.21