Example #1
0
                $redirect .= "/" . $pathSplit[$i];
            }
        }
        if (array_key_exists("HTTPS", $_SERVER) && $_SERVER['HTTPS'] == "on") {
            $protocol = "https://";
        } else {
            $protocol = "http://";
        }
        $redirect = $protocol . $_SERVER["HTTP_HOST"] . $redirect . "/";
        redirect($redirect);
        exit;
    } else {
        $error = __("There was a problem logging you in.");
    }
}
startOutput();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en">
	<head>
		<title>SQL Buddy</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
		<link type="text/css" rel="stylesheet" href="<?php 
echo smartCaching("css/common.css");
?>
" />
		<link type="text/css" rel="stylesheet" href="<?php 
echo smartCaching("css/navigation.css");
?>
Example #2
0
function loginCheck($validateReq = true)
{
    if (!isset($_SESSION['SB_LOGIN'])) {
        if (isset($_GET['ajaxRequest'])) {
            redirect("login.php?timeout=1");
        } else {
            redirect("login.php");
        }
        exit;
    }
    if ($validateReq) {
        if (!validateRequest()) {
            exit;
        }
    }
    startOutput();
}