<?php
/*
Example - basic entry page for twzAuth (simple mode)
----------------------------------------------------
Only valid, authenticated users can view this page.
*/
// clumsy "logout" (for testing only)..
if(isset($_POST['logout']))
{ unset($_SERVER['PHP_AUTH_USER']); }
require 'simple-include.php';
?><!DOCTYPE HTML>
<html lang="en">
<head>
<title>twzAuth (simple mode)</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<style> form { display:inline; } </style>
</head>
<body>
<h2>Welcome <?php echo $Username; ?></h2>
<p>If you can see this page, you have authenticated successfully in <b>simple mode</b>.</p>
<p> </p><p> </p><p> </p>
<div>There is no "logout" facility with HTTP authentication (except <br />
by restarting the browser). For testing purposes you can <br />
click <form method="post"><input type="submit" name="logout" value=""logout"" /></form>,
and then cancel the subsequent dialog.</div>
<p><a href="./">home</a></p>
</body>
</html>
|