startTimer(); echo $maintitle; //exit(); //echo "Should not get here..."; if (isset($_GET['page'])) $page_id = $_GET['page']; /* Find out how to proceed */ switch ($page_id) { /* Show album index page case "index": echo $panediv; require_once ('album.php'); $album = new Album(); $album->createIndexHeader(); $album->createThumbTable(); break; */ /* Show full whatsnew page */ case "whatsnew": echo ""; //echo $panediv; whatsnew(); break; /* Show full whatsnew page */ case "comments": echo ""; //echo $panediv; echo ""; // comment rows echo ""; echo "

Laatste Reacties op Foto's

"; require ('bbcode.php'); showLastComments(-1); echo "
"; break; case "guestbook": echo ""; //echo $panediv; echo ""; // comment rows echo ""; echo "

Gastenboek

"; require ('bbcode.php'); echo "Klik hier om een reactie toe te voegen,"; showLastGuestbookEntries(-1,false,true); echo "Klik hier om een reactie toe te voegen,"; echo "
"; break; /* Invalid, or no action shows titlepage */ case "": default: //echo $panediv; main(); break; } echo $pagefooter; $Debug->endTimer(); /****************************************************************************/ function main() { global $pagetitle; require ('bbcode.php'); echo $pagetitle; echo ""; echo "
"; echo ""; echo ""; echo "
"; echo ""; ///// Info getRandomPic(); // kludge, use this function just to select db... echo ""; echo ""; // Calender // weg met de kalender, it sucks ! echo ""; echo ""; // echo ""; echo "

\n"; echo "

Info

"; echo "Samuel L. Jackson Filmography

\n"; echo "

\n"; echo "Totaal : ".getNumPics()." Foto's in ".getNumAlbums()." Albums.

"; echo "Email de Webmaster: \n"; echo "

\n"; echo "

\n"; echo "Meld je aan voor de mailing list, en ik laat je voortaan weten als\n"; echo "er nieuwe foto's bijkomen.
\n"; echo "\n"; echo "\n"; echo "

\n"; echo "
\n"; echo "
"; //include ('cal_mini.inc.php'); //echo "Voeg evenement toe
\n"; echo "Klik hier om een reactie toe te voegen,"; echo "en hier om alle gastenboek berichten te zien."; showLastGuestbookEntries(5,true,false); echo "Klik hier om een reactie toe te voegen,"; echo "en hier om alle gastenboek berichten te zien."; echo "

Laatste Forum Posts

"; // showLastForumPosts(); // echo "
"; echo "
"; echo ""; // comment rows echo ""; echo "
"; whatsnew(4); echo "

Laatste Reacties op Foto's

"; showLastComments(5,true); echo "
\n"; echo "Bekijk commentaar van alle foto's......

\n"; echo "
"; echo "
"; echo ""; $picid=getRandomPic(); if ($picid != -1) { echo ""; echo ""; } echo ""; echo ""; echo ""; echo ""; echo "
"; echo "

Random Foto

"; echo ""; echo ""; echo ""; echo "
".getNumHitsMonth($picid)." Hits deze maand
".getNumHitsTotal($picid)." Hits totaal"; getNumComments($picid); echo "
"; echo "

Foto v/d Maand

"; $picid=getPicOfMonth(); if ($picid == -1) { echo "Geen foto's bekeken deze maand !"; } else { echo ""; echo ""; echo ""; echo "
".getNumHitsMonth($picid)." Hits deze maand
".getNumHitsTotal($picid)." Hits totaal"; getNumComments($picid); } echo "
"; echo "

Foto Aller Tijden

"; $picid=getPicOfAllTimes(); echo ""; echo ""; echo ""; echo "
".getNumHitsMonth($picid)." Hits deze maand
".getNumHitsTotal($picid)." Hits totaal"; getNumComments($picid); echo "
"; echo "
"; } function getPicOfMonth($rankId=1) { global $db,$dbname; /* Connect to the database */ mysql_select_db($dbname,$db) or die("Can't select database1"); $rankId-=1;// sql wants zero indexed $cmd="select * from hist_hits where month(date) = month(curdate()) AND year( date ) = year( curdate( ) ) order by hits DESC limit ".$rankId.",1"; $result = mysql_query ($cmd,$db); $pic_obj =mysql_fetch_object($result); if ($pic_obj) return $pic_obj->pic_id; else return -1; } function getPicOfAllTimes($rankId=1) { global $db,$dbname; /* Connect to the database */ mysql_select_db($dbname,$db) or die("Can't select database2"); $rankId-=1;// sql wants zero indexed $cmd="select * from pics order by hits DESC limit ".$rankId.",1"; $result = mysql_query ($cmd,$db); $pic_obj =mysql_fetch_object($result); if ($pic_obj) return $pic_obj->id; else return -1; } function getRandomPic() { global $db,$dbname; /* Connect to the database */ mysql_select_db($dbname,$db) or die("Can't select database3"); $cmd="select * from pics order by rand() limit 1"; $result = mysql_query ($cmd,$db); $pic_obj =mysql_fetch_object($result); if ($pic_obj) return $pic_obj->id; else return -1; } function getNumHitsTotal($id) { global $db,$dbname; /* Connect to the database */ mysql_select_db($dbname,$db) or die("Can't select database4"); $cmd="select * from pics where id=".$id; $result = mysql_query ($cmd,$db); $pic_obj =mysql_fetch_object($result); return $pic_obj->hits; } function getNumHitsMonth($id) { global $db,$dbname; /* Connect to the database */ mysql_select_db($dbname,$db) or die("Can't select database5"); $cmd="SELECT * FROM hist_hits WHERE month(date) = month(curdate()) AND year( date ) = year( curdate( ) ) AND pic_id = '$id'"; $result = mysql_query ($cmd,$db); $hist_object =mysql_fetch_object($result); if ($hist_object) return $hist_object->hits; else return 0; } ?>