connectMySQL(); $refer = getenv("HTTP_REFERER"); if($_GET[mode]=="logout"){ session_unregister("rString"); $url = "http://".$_SERVER["HTTP_HOST"]; $db->jump2($url); } elseif(!$_POST[submit]){ $db->cacheHeader(); if($_GET[error]=="login"){ $errors[0] = "You Must Login To Use That Feature"; session_unregister("rString"); } $title = "Retailer Sign In"; include("$db->newTemplatePath/common.header2.tem.php"); include("$db->newTemplatePath/retailers/loginCMS.form.tem.php"); include("$db->newTemplatePath/common.footer2.tem.php"); } elseif($errors = $ret->validateLogin($_POST)){ $db->cacheHeader(); $detail = $_POST; $title = "Retailer Sign In"; include("$db->newTemplatePath/common.header2.tem.php"); include("$db->newTemplatePath/retailers/loginCMS.form.tem.php"); include("$db->newTemplatePath/common.footer2.tem.php"); } else { $db->cacheHeader(); $_SESSION[rString] = $ret->getRetailerLoginString($_POST[rUser], $_POST[rPass]); $rString = $_SESSION[rString]; session_register("rString"); $url = "/_retailers/private/indexCMS.php"; $db->jump2($url); } $db->disconnectMySQL(); ?>