Freeradius users script added
[ga4php.git] / authserver / www / index.php
index a893e2c..723163a 100644 (file)
@@ -1,15 +1,34 @@
+<?php 
+
+require_once("user_actions.php");
+
+?>
+<html>
+<h1>Welcome to the GAAS User Self Admin Site</h1>
+<?php
+if(isset($_REQUEST["message"])) {
+       echo "<font color=\"red\"><i>Login Failure</i></font>";
+} 
+
+if(!$loggedin) {
+?>
+<form method="post" action="?action=login">
+Username: <input type="text" name="username"><br>
+Token Code: <input type="text" name="tokencode"><br>
+<input type="submit" value="Login">
+</form>
+</html>
 <?php
-/*
- * This is the web component of the GA4PHP radius server. This web app should be able to configure freeradius and itself.
- * 
- * This app will try to do the following:
- * 1) initialise tokens
- * 2) pull accounts from some backend (such as AD)
- * 3) allow users to self-enroll.
- * 
- * I wonder if we can store data in the backend database itself? that would be interesting
- * then user admin would be less disconnected. I.e. if a user was deleted from AD, their token
- * data should disappear with them.
- */
-
-?>
\ No newline at end of file
+       exit(0); 
+} else {
+?>
+
+Hi user
+</html>
+
+<hr><a href="?action=logout">Logout</a>
+
+<?php 
+}
+?>
+