<?php
//+-----------------------------------------------------+//
//+ Copyright Floopo.com
//+ Index.php
//+ Home Page Loader
//+-----------------------------------------------------+//


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

//____Mysql: Connect to dbase______________________
$dbase = new QuickMysql($config['db_name'], $config['db_user'], $config['db_pass'],
    $config['db_host']);

//____Confirm Email_________________________________
if ($_GET['type'] == 1 && $_GET['activation_code'] != '') {
    $activation_code = Sanatize($_GET['activation_code']);
    //check if user is valid
    if ($dbase->RecordExists("SELECT user_id FROM member_profile WHERE activation_code = '$activation_code' AND account_status = 'new'")) {
        //set user active
        if ($dbase->UpdateRecord("UPDATE member_profile SET account_status = 'active' WHERE activation_code = '$activation_code'")) {
            $display_message = 'Registration complete - You can now login';
        }
    }else{
            $display_message = 'Registration complete - You can now login';
    }


}




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

/*-----------------------------------------------------

Types
-----
1 = activation of new user





-------------------------------------------------------*/
?>