Blame Scripts/Php/Webenv/admin/login.php

878a2b
878a2b
/***
878a2b
 * Login page
878a2b
 *
878a2b
 */
878a2b
878a2b
require_once('../config.php');
878a2b
require_once('../includes/translations/' . LANGUAGE . '.php');
878a2b
require_once('includes/functions/auth.php');
878a2b
878a2b
// If session is active redirect back to baseurl. 
878a2b
if (isset($_SESSION['employeetype']))
878a2b
{
878a2b
    header('Location: ' . BASEURL );
878a2b
}
878a2b
878a2b
878a2b
/* Check Login */
878a2b
$message = '';
878a2b
if (isset($_POST['username']) && isset($_POST['password']) && !isset($_SESSION['employeetype']))
878a2b
{
878a2b
    $message = login();
878a2b
878a2b
    if ($message <> 0)
878a2b
    {
878a2b
        $message = '
' . ucfirst(translate($message)) . '
';
878a2b
    }
878a2b
    else
878a2b
    {
878a2b
        header('Location: index.php');
878a2b
    }
878a2b
}
878a2b
?>
878a2b
878a2b
<html>
878a2b
<head>
878a2b
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
878a2b
    <title>Admin :: </title>
878a2b
    <link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="style.css">
878a2b
    <script type="text/javascript">
878a2b
        function focusit() {
878a2b
            document.getElementById('username').focus();
878a2b
        }
878a2b
         window.onload = focusit;
878a2b
    </script>
878a2b
878a2b
</head>
878a2b
878a2b
<body>
878a2b
878a2b
    
878a2b
    
878a2b
878a2b
        
878a2b
878a2b
        
878a2b
        
878a2b
878a2b
        
878a2b
878a2b
    
878a2b
    
878a2b
878a2b
    
878a2b
878a2b
    
878a2b
        
878a2b
        

878a2b
878a2b
         '') {; echo $message; } ?>
878a2b
878a2b
        <form name="login" method="post" action="">
878a2b
        
878a2b
        
878a2b
            :
878a2b
                <input id="username" type="text" name="username" size="30"> (. john@example.com)
878a2b
        
878a2b
        
878a2b
                :
878a2b
            <input type="password" name="password" size="30">
878a2b
        
878a2b
            
878a2b
            
878a2b
            <input type="submit" name="submit" value="<?php echo ucfirst(translate('login')) ?>">
878a2b
        
878a2b
        
878a2b
        </form>
878a2b
878a2b
        
878a2b
    
878a2b
878a2b
878a2b
    
878a2b
878a2b
        
878a2b
        
878a2b
878a2b
            

878a2b
878a2b
            

878a2b
878a2b
        
878a2b
878a2b
    
878a2b
878a2b
<body>
878a2b
</html>