<?php

/**
 * @package eggblog
 * @author eggblog.net, tenfourzero@users.sourceforge.net
 * @version $Id: global.php,v 4.0.0RC1 2007/12/03 10:26:12 tenfourzero Exp $
 * @copyright Copyright (c) 2005, http://www.eggblog.net
 * @license http://www.gnu.org/licenses/gpl.html GNU Lesser General Public License
 */

/**
 * require lib files
 */
require_once "_lib/global.php";

if($config['photos']!=1) header("Location: index.php");
eb_pre();
if(!empty($_GET['photo']) && !empty($_GET['album'])) {
	settype($_GET['photo'],"integer");
	settype($_GET['album'],"integer");
	eb_head(eb_textpreview(str_replace("\r\n"," ",eb_photo_description($_GET['photo'])),50));
	echo eb_photo($_GET['photo'],$_GET['album']);
}
elseif(!empty($_GET['album'])) {
	settype($_GET['album'],"integer");
	eb_head(eb_album_title($_GET['album']));
	echo eb_album($_GET['album']);
}
else {
	eb_head('');
	echo "\t\t<h3>".ucwords($lang['photos'])."</h3>\r\n";
	echo eb_albums();
}
eb_foot();
?>




