<?php
//+------------------------------------------------------------------------------+//
//+ Copyright Floopo.com
//+ notice.php
//+ Displays error messages in generic layout
//+ More can be added here: expected url format e.g: http://domain.com/notice/4
//
//  Usage: In calling file add following example
//	$_SESSION["notice"] = 3; //set in com_notice
//  @header('Location: '.$env_base_url.'/notice');
//
//--------------------------------------------------------------------------------

defined('BASEPATH') or die('You can not directly access this file');//check its within this framework

//____DEFAULT TEMPLATE_____
$inner_template = TEMPLATES.'/tpl_notification.htm';


//_____load correct message_____________________
switch($_SESSION["notice"]){ //message stored in session

case 1:
$display_message = $lang['incomplete_registration']; //registration
break;

case 2:
$display_message = $lang['invalid_login']; //login
break;

case 3:
$display_message = $lang['fill_in_all']; //login
break;

case 4:
$display_message = 'This is a private network'; //login
break;

case 5:
$display_message = $lang['account_suspended'];
break;

case 6:
$display_message = $lang['private_timeline'];
$show_follow = 1;
break;

default:
$display_message = $lang['generic_error'];//generic error
break;

}

//reset notice session
$_SESSION["notice"] = '';

//____Display any output_________________________
$TBS = new clsTinyButStrong;
$TBS->NoErr = true;
$TBS->LoadTemplate(TPL_WRAPPER);
$TBS->MergeField('config',$config);
$TBS->MergeField('lang',$lang);
$TBS->Render = TBS_OUTPUT;
$TBS->Show();
@mysql_close(); 

?>