<?php 
    // continue the session
    session_start();
    
    include_once dirname(__FILE__) . '/php_only_scripts/global_after_session.php';
    include_once dirname(__FILE__) . '/php_only_scripts/global_functions.php';
    
    $_SESSION['DebugLevel']='OFF';
    $_SESSION['formSubmitted']='FALSE';
    
    $loginErrorString='';
    
    // now determine if it was posted via get.  That will override it.
    if (isset($_GET['errorCode']) ||
        (isset($_SESSION['failedLogin']) && $_SESSION['failedLogin']=='TRUE')){
        // Determine what the code is
        if ($_GET['errorCode']==1){
            // Let them know to ensure they get password correct
            $loginErrorString='<br><FONT COLOR="#FF0000">Invalid login credentials.  Please retry.</FONT><br>';
        }
        else if ($_GET['errorCode']==2){
            // Let them know to ensure they check boxes
            $loginErrorString='<br><FONT COLOR="#FF0000">Recaptcha Error.  Please verify with recaptcha.</FONT><br>';
        }
        else if (isset($_SESSION['failedLogin']) && $_SESSION['failedLogin']=='TRUE'){
            // Assume they got password correct
            $loginErrorString='<br><FONT COLOR="#FF0000">Invalid login credentials.  Please retry.</FONT><br>';
        }
    }

    
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>Task Management System</title>

    <meta name="keywords" content="GIS,data,testing,IT" />
    <meta name="description" content="EES Divisions." />

    <script src="./SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script src="https://www.google.com/recaptcha/api.js" type="text/javascript"></script>
    
    <link rel="icon" href="https://www.eestms.com/images/ees_ico.ico"/> 
    <link href="./SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <link href="./SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
    <link rel = "stylesheet" type="text/css" href="./css/contentpage.css" >
</head>

<body class="thrColElsHdr">

<div id="container">
  
<!-- start of banner wrap --->

<div id="topContent">
  
<div>
   <div class="MenuBarHorizontal" id="navBar">  <ul id="TopNav" class="MenuBarHorizontal">

    <script type="text/javascript">
    <!--
    var MenuBar2 = new Spry.Widget.MenuBar("TopNav", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>

    </div>
  </div>
</div>
<!-- end of banner wrap --->

  <!-- end #header -->
  <br class="clearfloat" />
  
  <!-- start #mainContent -->
  <div id="mainContent">
    <div class="maintitle">Task Management System</div>
    <div class="breadcrumb"> <a href="./"> Home </a> > <a href="index.html"> Task Management System </a> </div>

    <?php
        echo $loginErrorString;
    ?>
    
    <br>
    <form action="redirectors/log_check.php" method="post" enctype="multipart/form-data">  
        <div>
            <label for="login_id">Login ID:  
                <input type="text" maxlength="50" name="login_id" id="login_id"/>
            </label>  
        </div>  
        <br>
        <div>
            <label for="password">Password:  
                <input type="password" name="password" id="password"/>
            </label>
        </div>  
        <br>
        <div>
            <input type="submit" name="submit" id="submit" value="Login"/>
            <br><br>
            <div class="g-recaptcha" data-sitekey="6Ld1HOIcAAAAAIv5DXQSO77yidIz5D3fBHzwh4OW"></div>
        </div>  
        <br>
    </form>
        
  <!-- end #mainContent -->
  
  <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
  <br class="clearfloat" />
  
  <!-- start #footer --></div>
   <div id="footer">
    <p>© 2018 Evolve Engineering and Software. EES, Evolve Engineering and Software, EES Logo are registered marks of Evolve Engineering and Software.</p>
  <!-- end #footer -->
   </div>
<!-- end #container -->
</div>

</body>

</html>
