<?php
if ( !defined( 'SMARTY_DIR' ) ) {

	include_once( '../init.php' );
}
include ( 'sessioninc.php' );

define( 'PAGE_ID', 'banner_mgt' );

if ( !checkAdminPermission( PAGE_ID ) ) {

	header( 'location: not_authorize.php' );
	exit;
}

if ($_GET['errid'] != '') {
	$t->assign("error_message", get_lang('banner_error_msgs',$_GET['errid']) );
}
if (!$_SESSION['newBanner']) {
	$t->assign('end_date', strtotime('+365 day',time()));
} else {
	$t->assign('end_date', $_SESSION['newBanner']['txtend']);
}
$t->assign('rendered_page', $t->fetch('admin/addbanner.tpl'));
$t->display( 'admin/index.tpl' );

exit;

?>