X-Git-Url: http://git.pjr.cc/?p=ga4php.git;a=blobdiff_plain;f=example%2Fprovisioning%2Finput.php;fp=example%2Fprovisioning%2Finput.php;h=11ab6b758381100df72e00a079df8347f69d652d;hp=0000000000000000000000000000000000000000;hb=ddd5c8118fb9ad4f6e8f4ea7371f189e1b152064;hpb=195c42d5711d000a987ed3a0a376ac09b98867fc diff --git a/example/provisioning/input.php b/example/provisioning/input.php new file mode 100644 index 0000000..11ab6b7 --- /dev/null +++ b/example/provisioning/input.php @@ -0,0 +1,40 @@ +query($sql); + closeDatabase($db); + + header("Location: index.php?success=created"); + break; + case "provision": + $username = $_REQUEST["user"]; + $tokentype = $_REQUEST["tokentype"]; + $myga->setUser($username, $tokentype); + + header("Location: index.php?success=Provisioned"); + break; + case "auth": + $username = $_REQUEST["user"]; + $tokencode = $_REQUEST["tokencode"]; + + if($myga->authenticateUser($username, $tokencode)) { + header("Location: index.php?success=Passed"); + } else { + header("Location: index.php?failure=wrongcode"); + } + break; + } + } +} +?> \ No newline at end of file