Location: PHPKode > projects > Ads Exchange Server > estigi_0.1.1_RC2/header.inc.php
<?php

/***************************************************************************
 *                             header.inc.php
 *                            -------------------
 *   begin                : mier, mayo 2, 2007
 *   copyright            : (C)
 *   email                : hide@address.com
 *   Desc                 : Overall header
 *
 *
 ***************************************************************************/

if ( !defined('IN_ADSERVER') ) {
		die("Hacking attempt");
	}

if(checkLogin("") == 1){
	$logOut = "<a href='login.php?logout=1'>".$_lang['header_LogOut']."</a>";
	$userName = $_lang['header_Welcome'] . $session['user_Name'];
}
	else {
		$userName = "";
		$logOut = "<a href='login.php'>".$_lang['header_Login']."</a> / <a href='register.php'>".$_lang['header_Register']."</a>";
	}

/* Declare the Tpl */
$header_Tpl = new tpl($s_path_Tpl . "/header.tpl");

/* Main Template variables*/
$a_Header = array(
	"{HEADER_TITLE}" => $main_title,
	"{HEADER_TPL}" => $s_path_Tpl,
	"{HEADER_TITLE_2}" => $main_title,
	"{HEADER_TIME}" => date("Y-M-d H:i:s", time()),
	"{HEADER_USER_NAME}" => $userName,
	"{HEADER_LOGOUT_LOGIN}" => $logOut
);

	/* Regular User Menu*/
if($session['id_User'] > 0){

	$a_Menu_User = array(
		"{HEADER_HOME}" => $_lang['header_Home'],
		"{HEADER_PROFILE}" => $_lang['header_My_Acc'],
		"{HEADER_MY_SITES}" => $_lang['header_My_Sites'],
		"{HEADER_NEW_AD}" => $_lang['header_New_Ad'],
		"{HEADER_VIEW_ADS}" => $_lang['header_View_Ads'],
		"{HEADER_PICKUP}" => $_lang['header_Get_Code'],
		"{HEADER_HELP}" => $_lang['header_Help']
	);

	$header_Tpl->rBlock($a_Menu_User, "MENU_GENERAL");

}
	else{
		$header_Tpl->hideBlock("MENU_GENERAL");
	}

/* Admin User Menu*/
if($session['id_User'] == 1){
	$a_Menu_Admin = array(
		"{HEADER_REPORTS}"     => $_lang['header_Reports'],
		"{HEADER_CATS}"        => $_lang['header_Cats'],
		"{HEADER_ZONES}"       => $_lang['header_Zones'],
		"{HEADER_GROUPS}"      => $_lang['header_Groups'],
		"{HEADER_USERS}"       => $_lang['header_Users'],
		"{HEADER_PENDING_ADS}" => $_lang['header_Pending_Ads']
	);

	$header_Tpl->rBlock($a_Menu_Admin, "MENU_ADMIN");
}
	else{
	$header_Tpl->hideBlock("MENU_ADMIN");
	}


/* Warnings */
if($s_Warning != ""){
	$a_Warnings = array("{HEADER_WARNINGS}" => $s_Warning);
	$header_Tpl->rBlock($a_Warnings, "WARNINGS");
}
	else{
	$header_Tpl->hideBlock("WARNINGS");
}

// Replace main TPL
$header_Tpl->parse_Tpl($a_Header, "", $_lang);

//$header_Tpl->localize_It($_lang);
/* Finally print the tpl */
//$header_Tpl->print_Tpl();

?>
Return current item: Ads Exchange Server