<?php
//	if(empty($_SESSION[s_cd_dealerid]) && empty($_SESSION[s_nm_email])){
	if(empty($_SESSION['s_cd_dealerid']) && $_SESSION['s_cd_dealer_type'] == 'aap'){
		// print_r($_COOKIE["ESMotors"]);
		// exit;
		if( !empty($_COOKIE["ESMotorsAAP"])){

			$arrItem = explode("&", $_COOKIE["ESMotorsAAP"]);
			$arrUsr = explode("=", $arrItem[0]);
			$arrVal = explode("=", $arrItem[1]);

			$ar_usr = $arrUsr[1];
			$ar_val = $arrVal[1];
?>
<script type="text/javascript" charset="utf-8" src="/common/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
	$.post("/aap/login_proc.php", { mode:"loginAuto", al_usr: '<?= $ar_usr ?>', al_val: '<?= $ar_val ?>'},function(data) {
		// alert(data);
		if(data=="Y"){
//			location.href = "<?=$url?>";
			// location.href = "/ucaro/main.php";
		}else{
//			alert("Email 또는 비밀번호가 일치하지 않습니다.");
//			return;
		}
	});
</script>

<?
		}
	}
?>
