a | b | |
---|
| 0 | + | <?php |
---|
| 0 | + | // include guards |
---|
| 0 | + | if (!$INCLUDED_SIGN_IN_PHP): |
---|
| 0 | + | $INCLUDED_SIGN_IN_PHP = 1; |
---|
| 0 | + | |
---|
| 0 | + | // |
---|
| 0 | + | // Function that returns the HTML FORM that is |
---|
| 0 | + | // used to collect the username and password |
---|
| 0 | + | // |
---|
| 0 | + | function outputSignInPage($sessionMessage) |
---|
| 0 | + | { |
---|
| 0 | + | global $pathToRoot; |
---|
| 0 | + | global $URLToRoot; |
---|
| 0 | + | global $queryVars; |
---|
| 0 | + | |
---|
| 0 | + | ?> |
---|
| 0 | + | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
---|
| 0 | + | "http://www.w3.org/TR/html4/loose.dtd"> |
---|
| 0 | + | <html> |
---|
| 0 | + | <head> |
---|
| 0 | + | <?php include($pathToRoot."includes/htmlheader.php"); ?> |
---|
| 0 | + | <title>Sign In</title> |
---|
| 0 | + | </head> |
---|
| 0 | + | <body> |
---|
| 0 | + | <?php include($pathToRoot."includes/banner.php"); ?> |
---|
| 0 | + | <table width=<?php echo "\"".getPageWidth()."\"" ?> border="0"> |
---|
| 0 | + | <tr> |
---|
| 0 | + | <?php if (!(int)$queryVars['isPrintable']) include($pathToRoot."includes/navigation.php"); ?> |
---|
| 0 | + | <td valign="top"><div class="headerImageText">Sign In</div> |
---|
| 0 | + | <?php |
---|
| 0 | + | // Include the formatted sign in message |
---|
| 0 | + | if (isset($sessionMessage)) |
---|
| 0 | + | echo "<p class=\"sessionMessage\">".$sessionMessage."</p>"; |
---|
| 0 | + | |
---|
| 0 | + | // Deduce the URL to go to after authentication. If we aren't told, |
---|
| 0 | + | // just go to the main page |
---|
| 0 | + | if (!array_key_exists('fromURL', $queryVars)) |
---|
| 0 | + | $queryVars['fromURL'] = $URLToRoot; |
---|
| 0 | + | ?> |
---|
| 0 | + | <form method="POST" action=<?php echo "\"".$URLToRoot."authentication.php?fromURL=".urlencode($queryVars['fromURL'])."\""?>> |
---|
| 0 | + | <table align="center"> |
---|
| 0 | + | <tr> |
---|
| 0 | + | <td colspan="2"><h3>Sign In</h3></td> |
---|
| 0 | + | </tr> |
---|
| 0 | + | <tr><td colspan="2"> </td></tr> |
---|
| 0 | + | <tr><td>Username:</td> |
---|
| 0 | + | <td><input type="text" size=15 |
---|
| 0 | + | maxlength=25 |
---|
| 0 | + | name="formUsername"></td></tr> |
---|
| 0 | + | <tr><td>Password:</td> |
---|
| 0 | + | <td><input type="password" size=15 |
---|
| 0 | + | maxlength=25 |
---|
| 0 | + | name="formPassword"></td></tr> |
---|
| 0 | + | <tr><td colspan="2"> </td></tr> |
---|
| 0 | + | <tr><td colspan="2" align="right"><input type="submit" value="Sign in"></td></tr> |
---|
| 0 | + | </table> |
---|
| 0 | + | </form> |
---|
| 0 | + | </td> |
---|
| 0 | + | </tr> |
---|
| 0 | + | </table> |
---|
| 0 | + | <?php include($pathToRoot."includes/info.php"); ?> |
---|
| 0 | + | </body> |
---|
| 0 | + | </html> |
---|
| 0 | + | <?php |
---|
| 0 | + | } |
---|
| 0 | + | |
---|
| 0 | + | // |
---|
| 0 | + | // Function that returns HTML page showing that |
---|
| 0 | + | // the user with the $currentSignInName is signed on |
---|
| 0 | + | // |
---|
| 0 | + | function outputSignedOnPage($currentSignInName) |
---|
| 0 | + | { |
---|
| 0 | + | global $pathToRoot; |
---|
| 0 | + | global $URLToRoot; |
---|
| 0 | + | global $queryVars; |
---|
| 0 | + | ?> |
---|
| 0 | + | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
---|
| 0 | + | "http://www.w3.org/TR/html4/loose.dtd"> |
---|
| 0 | + | <html> |
---|
| 0 | + | <head> |
---|
| 0 | + | <?php include($pathToRoot."includes/htmlheader.php"); ?> |
---|
| 0 | + | <title>Sign In</title> |
---|
| 0 | + | </head> |
---|
| 0 | + | <body> |
---|
| 0 | + | <?php include($pathToRoot."includes/banner.php"); ?> |
---|
| 0 | + | <table width=<?php echo "\"".getPageWidth()."\"" ?> border="0"> |
---|
| 0 | + | <tr> |
---|
| 0 | + | <?php if (!(int)$queryVars['isPrintable']) include($pathToRoot."includes/navigation.php"); ?> |
---|
| 0 | + | <td valign="top"><div class="headerImageText">Sign In</div> |
---|
| 0 | + | <p class="sessionMessage">You are currently signed in as <?php echo "\"".$currentSignInName."\".</p>"; ?> |
---|
| 0 | + | <p align="center"><a href=<?php echo "\"".$URLToRoot."signout.php\""?>>Sign Out</a></p> |
---|
| 0 | + | </td> |
---|
| 0 | + | </tr> |
---|
| 0 | + | </table> |
---|
| 0 | + | <?php include($pathToRoot."includes/info.php"); ?> |
---|
| 0 | + | </body> |
---|
| 0 | + | </html> |
---|
| 0 | + | <?php |
---|
| 0 | + | } |
---|
| 0 | + | |
---|
| 0 | + | endif; // $INCLUDED_SIGN_IN_PHP |
---|
| 0 | + | ?> |
---|
... | |
---|