Location: PHPKode > projects > Gallereazy > gallereazy/windex.php
<? 
require PATH_TO_APP . 'MainPage.class.php';
require PATH_TO_APP . 'theme.inc.php';

############# THIS HANDLES RSS REQUESTS ###########################
if(isset($_GET['RSS']))
{
	require PATH_TO_APP . 'RSS.php';
	exit;
}
####################################################################

// Create a new MainPage object.  Everything but the RSS feed uses it
$oMainPage = new MainPage();

############# THIS IS THE WINDOW THE LATEST COMMENT SELECTIONS POP UP IN ###########################
if(isset($_GET['URL']))
{
	require PATH_TO_APP . 'pop_up.php';
	exit;
}
############# THIS HANDLES AJAX REQUESTS ###########################
if(isset($_GET['ajax']))
{
    require PATH_TO_APP . 'ajax.php';
    exit;
}
####################################################################################

if(isset($_GET['album']))
	$iAlbum = $_GET['album'];
else
	$iAlbum = null;
	
if(isset($_GET['category']))
	$iCategory = $_GET['category'];
else
	$iCategory = null;

$oMainPage->populateCategoryArray($iCategory, $iAlbum);
	
// set which categories are to be displayed based on
// what year the user is currently viewing
$oMainPage->setAlbumDisplayValue($oMainPage->_iCurrentCategory);

if(isset($oMainPage->_arCategories[$oMainPage->_iCurrentCategory][$oMainPage->_iCurrentAlbum]['description']))
	$oMainPage->_stCurrentAlbumDescription = $oMainPage->_arCategories[$oMainPage->_iCurrentCategory][$oMainPage->_iCurrentAlbum]['description'];
#########################################################


######### GET PICTURES, CAPTIONS AND COMMENTS FOR THIS ALBUM ##########
$oMainPage->populateFileArray();

################ LATEST COMMENTS ###############
if(ALLOW_COMMENTS && SHOW_LATEST_COMMENTS)
	$oMainPage->populateLatestTenComments();
######################################



if(defined('HEADING'))
{
	$oMainPage->_stHeading = HEADING;
}
else
{
	$newuser = ucwords(str_replace("_", " ", USER));
	$oMainPage->_stHeading = '<h1 align="center">'.$newuser.'\'s Pictures</h1>';
}
?>

<? require theme("MainPage.tpl.php"); ?>
Return current item: Gallereazy