forked from science-ation/science-ation
Add session variables and date list by conference to API test page
This commit is contained in:
parent
146f557759
commit
a5f309c022
26
testapi.php
26
testapi.php
@ -1,27 +1,42 @@
|
||||
<?
|
||||
include "common.inc.php";
|
||||
?>
|
||||
<html><body>
|
||||
|
||||
<h1>General Commands</h1>
|
||||
|
||||
Login Check
|
||||
Login
|
||||
<form method="post" action="api/auth/login">
|
||||
<input type="text" name="username">
|
||||
<input type="password" name="password">
|
||||
<input type="submit" value="Login">
|
||||
</form>
|
||||
|
||||
Logout Check
|
||||
Logout
|
||||
<form method="post" action="api/auth/logout">
|
||||
<input type="submit" value="Logout">
|
||||
</form>
|
||||
|
||||
<a href="api/conferences">Conference List</a><br />
|
||||
Switch Conference Check
|
||||
Switch Conference
|
||||
<form method="post" action="api/conferences/switch">
|
||||
<input type="text" size=2 name="conferences_id">
|
||||
<input type="submit" value="Switch Conference">
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function dateListForConference() {
|
||||
var o=document.getElementById('conferences_id');
|
||||
window.location.href='api/dates/'+o.value;
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<a href="api/dates">Dates List (current conference)</a><br />
|
||||
<form method="post" onsubmit="return dateListForConference()">
|
||||
Date List
|
||||
<input type="text" size=2 id="conferences_id" name="conferences_id">
|
||||
<input type="submit" value="Conference Date List">
|
||||
</form>
|
||||
|
||||
<h1>Teacher Specific Commands</h1>
|
||||
<a href="api/scienceolympics/teams/list">Science Olympic Teams List</a><br />
|
||||
@ -42,6 +57,11 @@ Switch Conference Check
|
||||
<input type="submit" value="Edit Team">
|
||||
</form>
|
||||
|
||||
<h1>Session Variables</h1>
|
||||
<?
|
||||
echo json_encode($_SESSION);
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user