<?
require_once('../include/user.php');
?>
<!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">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
        <!--JQUERY-->
        <link type="text/css" rel="stylesheet" href="../styles/smoothness/jquery.ui.css"/>
        <script type="text/javascript" src="../scripts/jquery.js"></script>
        <script type="text/javascript" src="../scripts/jquery.ui.js"></script>
        <!--/JQUERY-->
        <!--/MD5-->
        <script type="text/javascript" src="../scripts/md5.js"></script>
        <!--/MD5-->
        <!--CUSTOM-->
        <script type="text/javascript" src="../scripts/custom.js"></script>
        <script type="text/javascript">

            $(document).ready(function() {

                fieldHint('#username');

            });

            function login() {
                $.ajax({
                    type	: "GET",
                    url		: "login.php",
                    data	: "md5=" + md5($("#username").val() + $("#password").val()) + '&username=' + $("#username").val() + '&password=' + $("#password").val() + "&key=" + key(10000),
                    success	: function(html){
                        $("#login_link").empty();
                        $("#login_link").append(html);
                    }
                });
            }

        </script>
        <!--/CUSTOM-->
        <style type="text/css">
            body {
                background-color: #CCCCCC;
                margin: 0px;
                padding: 0px;
                font-family: Arial, Helvetica, sans-serif;
                font-size: 12px;
            }
            p {
                margin: 0px;
                padding: 5px;
                text-align: center;
            }
            #username {
                width: 150px;
                text-align: center;
                font-size: 14px;
                padding: 3px;

            }
            #password {
                width: 150px;
                text-align: center;
                font-size: 14px;
                padding: 3px;
            }
        </style>
    </head>
    <body>
        <div id="login_area">
            <p style="padding:10px;"><strong>Control Panel <? print $version; ?></strong></p>
            <p><input type="text" name="username" id="username" value="username" /></p>
            <p><input type="password" name="password" id="password" /></p>
            <p style="padding:10px;" id="login_link"><a href="javascript:login();"><img src="../styles/default/login.png" border="0" alt="" /></a></p>
        </div>
    </body>
</html>
