| 1 | rodolico | 1 | <?php
 | 
        
           |  |  | 2 |    global $loggingIn;
 | 
        
           |  |  | 3 |    $loggingIn = true;
 | 
        
           |  |  | 4 |    include_once("header.php");
 | 
        
           |  |  | 5 |    if ( isset( $_REQUEST['login'] ) ) {
 | 
        
           |  |  | 6 |       $_SESSION["authorization information"] = new Auth( array(  'login page' => $_SERVER['PHP_SELF'] ) );
 | 
        
           |  |  | 7 |       if ( $_SESSION["authorization information"]->verifyLogin ( $_REQUEST['login'], $_REQUEST['pass'] ) ) {
 | 
        
           |  |  | 8 |          $logginIn = false;
 | 
        
           |  |  | 9 |          $_SESSION['file system root'] = dirname($_SERVER['SCRIPT_FILENAME']);
 | 
        
           |  |  | 10 |          $_SESSION['html root'] = dirname(parse_url($_SERVER['PHP_SELF'], PHP_URL_PATH));
 | 
        
           |  |  | 11 |          header ('Location: ' . $_SESSION['html root'] );
 | 
        
           |  |  | 12 |       } // if we logged in
 | 
        
           |  |  | 13 |    } // some username was entered
 | 
        
           |  |  | 14 | ?>
 | 
        
           |  |  | 15 |   | 
        
           |  |  | 16 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 | 
        
           |  |  | 17 | <html>
 | 
        
           |  |  | 18 |   | 
        
           |  |  | 19 | <head>
 | 
        
           |  |  | 20 |   <title>Computer Asset Manager - Login</title>
 | 
        
           |  |  | 21 |   <meta name="GENERATOR" content="Quanta Plus">
 | 
        
           |  |  | 22 |   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 | 
        
           |  |  | 23 |   <script language="javascript" type="text/javascript">
 | 
        
           |  |  | 24 |   // <!--
 | 
        
           |  |  | 25 |   | 
        
           |  |  | 26 |   // -->
 | 
        
           |  |  | 27 |   </script>
 | 
        
           |  |  | 28 | </head>
 | 
        
           |  |  | 29 | <body>
 | 
        
           |  |  | 30 |        <h1 align='center'>Computer Asset Manager</h1>
 | 
        
           |  |  | 31 |        <h4 align='center'>version <?php echo VERSION . '<BR>' . BUILD_DATE; ?></h4>
 | 
        
           |  |  | 32 |        <h3 align="center">Daily Data, Inc.</h2>
 | 
        
           |  |  | 33 |        <h2 align='center'>Log In</h2>
 | 
        
           |  |  | 34 |        <?php if (isset($_REQUEST['message'])) print '<h3  style="color : red; text-align : center;">' . $_REQUEST['message'] . '</h3>'; ?>
 | 
        
           |  |  | 35 | <h3 align='center'>Enter your username and password below</h3>
 | 
        
           |  |  | 36 | <FORM action="login.html" method="POST" enctype="multipart/form-data">
 | 
        
           |  |  | 37 |   <table border="1" cellpadding="2" align="center">
 | 
        
           |  |  | 38 |   <tbody>
 | 
        
           |  |  | 39 |     <tr>
 | 
        
           |  |  | 40 |       <td>User Name</td>
 | 
        
           |  |  | 41 |       <td><input type='text' name='login' size='10'></td>
 | 
        
           |  |  | 42 |     </tr>
 | 
        
           |  |  | 43 |     <tr>
 | 
        
           |  |  | 44 |       <td>Password</td>
 | 
        
           |  |  | 45 |       <td><input type='password' name='pass' size='10'></td>
 | 
        
           |  |  | 46 |     </tr>
 | 
        
           |  |  | 47 |     <tr><TD colspan="2" align="center"><INPUT type="submit" name="Login" value="Log In"></TD></tr>
 | 
        
           |  |  | 48 |   </tbody>
 | 
        
           |  |  | 49 | </table>
 | 
        
           |  |  | 50 | </FORM>
 | 
        
           |  |  | 51 | </body>
 | 
        
           |  |  | 52 | </html>
 |