<?php
//+-----------------------------------------------+//
//+ Copyright Floopo.com
//+ pages.php
//+ Display generic pages (about us, terms etc)
//+ You can add more pages in here
//+-----------------------------------------------+//

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

$load = Sanatize($_GET['load']);


//________Switch through the pages______________________________
switch($load) {

    case '1':
    case '2':
        $inner_template = TEMPLATES.'tpl_generic.htm';
        $pages = $dbase->SelectRecord("SELECT *
                                  		FROM web_pages
								  		WHERE page_ref = $load"); 
		$page_content = $pages['page_content'];								         
        break;

    //This is also the **404** main handler for whole site
    case 'notfound':
	$display_message = $lang['invalid_member'];
    $inner_template = TEMPLATES.'tpl_notification.htm'; 
    break;
    
    //This is also the **404** main handler for whole site
    case '404':
	$display_message = $lang['404'];
    $inner_template = TEMPLATES.'tpl_notification.htm';
	break;    
	
    default:
	$display_message = $lang['404'];
    $inner_template = TEMPLATES.'tpl_notification.htm';
	break;   

}


//____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();
?>