<?php
    require_once('libs/Ultraviolet.php');
	require_once('libs/Database.php');
	require('libs/FormKey.php');

	$database =& DatabaseConnect::getInstance();
	$database->query("SET CHARACTER SET utf8");

	$formkey = new FormKey();
	$formkey_error = 'No error';


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="language" content="en" />
		<meta name="description" content="" />
		<meta name="keywords" content="" />
		<title>Popular Administracija</title>
    <link href="css/home.css" rel="stylesheet" type="text/css" media="screen" />
    <link rel="icon" type="image/png" href="./images/ikonica.png">
	</head>

	<body>
        <div id="homepage">
        	<div id="login">

                <form id="loginform" method="post" action="libs/Authenticate.php" class="login-form">
                    <fieldset>
                    	<input id="username" type="text" name="username" value="user" class="field"/>
                        <input id="fakepass" type="text" name="fakepass" value="pass" class="field" />
                    	<input id="password" type="password" name="password" value="" class="field"/>
                    	<input type="submit" value="" class="submit" />
                    	<input type="hidden" value="login" name="login"/>
                        <?php $formkey->outputKey(); ?>
                    </fieldset>
                </form>
            </div>
            <?php if(isset($_GET['error'])): ?>
            <div id="login_error"><?=$_GET['error']?></div>
            <?php endif; ?>
        </div>
        <div id="footer"></div>
        <script type="text/javascript" src="javascript/jquery-1.3.2.min.js"></script>
        <script type="text/javascript" src="javascript/login.js"></script>
	</body>
</html>
