2 require_once("../lib/authClient.php");
4 $myAC = new GAAuthClient();
10 if(isset($_SESSION["loggedin"])) if($_SESSION["loggedin"]) {
16 if(isset($_REQUEST["action"])) {
17 error_log("action set: ".$_REQUEST["action"]);
18 switch($_REQUEST["action"]) {
20 error_log("being login");
21 $username = $_REQUEST["username"];
22 $token = $_REQUEST["tokencode"];
24 if($myAC->authUserToken($username, $token)) {
26 $_SESSION["loggedin"] = true;
27 $_SESSION["username"] = $username;
28 header("Location: index.php");
30 error_log("login failed, $username, $token");
31 header("Location: index.php?message=loginfail");