| a | b | |
|---|
| 0 | + | --- the signin php main page -- |
|---|
| 0 | + | |
|---|
| 0 | + | <?php $pathToRoot=dirname($_SERVER['SCRIPT_FILENAME'])."/"; ?> |
|---|
| 0 | + | <?php include($pathToRoot."includes/phpheader.php"); ?> |
|---|
| 0 | + | <?php include($pathToRoot."includes/httpheader.php"); ?> |
|---|
| 0 | + | <?php include($pathToRoot."includes/signin.php"); ?> |
|---|
| 0 | + | <?php |
|---|
| 0 | + | |
|---|
| 0 | + | // Check if we have established a session |
|---|
| 0 | + | if (isUserSignedIn()) |
|---|
| 0 | + | { |
|---|
| 0 | + | // There is a user logged on |
|---|
| 0 | + | outputSignedOnPage($_SESSION["authenticatedUser"]); |
|---|
| 0 | + | } |
|---|
| 0 | + | else |
|---|
| 0 | + | { |
|---|
| 0 | + | // No session established, no POST variables |
|---|
| 0 | + | // display the sign-in form + any message |
|---|
| 0 | + | outputSignInPage($_SESSION["sessionMessage"]); |
|---|
| 0 | + | |
|---|
| 0 | + | session_destroy(); |
|---|
| 0 | + | } |
|---|
| 0 | + | |
|---|
| 0 | + | ?> |
|---|
| 0 | + | |
|---|
| 0 | + | |
|---|
| 0 | + | --- the signin.php include is listed below --- |
|---|
| 0 | + | |
|---|
| ... | |
|---|
| 0 | 0 | | <?php |
|---|
| 1 | 1 | | // include guards |
|---|
| 2 | 2 | | if (!$INCLUDED_SIGN_IN_PHP): |
|---|
| ... | |
|---|