<?php
	
	require_once("mysqlconnect.php");
	require_once("global/functions.php");
	session_start();
	
	if($_GET['action'] == 'login')
	{
		$u_added=md5($_POST['login']);
		if($u_added == $uhash)
		{
			session_register("mobile_admin_logged_in");	
			$_SESSION["mobile_admin_logged_in"]=true;
			$u=$u_added;
		}
	}
	
	if($_SESSION["mobile_admin_logged_in"]==true && $u==$uhash)
	{
		header("location: images_admin.php?".SID."&u=".$u);
	}
	else $action='form';
	
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><title>4mobile - backoffice</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<link rel="stylesheet" href="style.css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>
<body bgcolor="#000000">
	
	<?php
	
		if($action=='form') fnWriteLoginForm();
		
	?>

</body>
</html>
<?php
	mysql_close($link);
?>