<?php
// ini_set('display_errors',1);
// $menu = menu_apk();
?>


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>
		<?php echo $this->baseTitle ?>
	</title>
	<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>assets/thema/apk2020/css/style.css?ver=<?php echo date("ymdhis") ?>">
	
	<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl ?>assets/css/apkPopUp.css">
	<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl ?>assets/css/apank_apk.css?ref=<?php echo date("ymdHis") ?>">
	<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl ?>assets/css/flexigrid/flexigrid.css">
	
	<script src="<?php echo $this->baseUrl ?>assets/js/jquery-1.7.2.min.js" type="text/javascript"></script>
	<script src="<?php echo $this->baseUrl ?>assets/js/jquery-ui-1.8.19.custom.min.js"></script>
	<script src="<?php echo $this->baseUrl ?>assets/js/apank.js?ref=<?php echo date("ymdHis") ?>"></script>
	<script src="<?php echo $this->baseUrl ?>assets/js/jquery.meio.mask.js"></script>
	<script src="<?php echo $this->baseUrl ?>assets/js/accounting.js"></script>
	<script src="<?php echo $this->baseUrl ?>assets/js/flexigrid.js"></script>
	<script src="<?php echo $this->baseUrl ?>assets/js/apank_apk.js?ref=<?php echo date("ymdHis") ?>"></script>
	
<style type="text/css">
.menu_nav{
	padding-top: 10px;
	margin-left: -10px;
}
.menu_mm{
	font-family: arial;
	font-weight: 20px;
	color: #fff;
	font-size: 20px;
	margin-bottom: 5px;
}
.menu_mm a{
	text-decoration: none;
}
._divSubMenu{
	display: none;
	font-size: 18px;
}
._titleJudul a{
	color: #fff;
}
.apankForm{
	z-index: 9999;
}
._detIns{
	background-color: #fff;
}
._form{
	color: #fff;
}
</style>

</head>
<body>
<input type="hidden" id="_cls" value="">
<input type="hidden" id="defaultbaseUrl" value="<?php echo $this->baseUrl ?>">
<input type="hidden" id="defaultBaseUrl" value="<?php echo $this->baseUrl ?>">
<input type="hidden" id="defaultController" value="<?php echo $this->getParameter['controller'] ?>">
<input type="hidden" id="modulMenu" value="<?php echo $this->getParameter['modul'] ?>">
	<div class="_hedAtas">
		<img src="<?php echo $this->baseUrl ?>assets/thema/apk2020/images/login_bg.jpg" class="_logo1">
		<img src="<?php echo $this->baseUrl ?>assets/thema/apk2020/images/login_batas.png" class="_logo2">
		<a href="<?php echo $this->baseUrl ?>"><img src="<?php echo $this->baseUrl ?>assets/thema/apk2020/images/logo_jig.png" class="_logo3"></a>
		<div class="_logo4">
			<p><?php echo $this->login['kd_user'] ?></p>
			<p class="_tglHed"><?php echo date("l, d F Y - H:i") ?></p>
			<div class="title_menu">

			</div>
		</div>
		<div id="_menuRight" class="menu-button" mode="off" style="z-index: 99999">
			<div class="bar"></div>
			<div class="bar"></div>
			<div class="bar"></div>
		</div>
	</div>
	<div id="menu_div">
		<div class="_ptNama">BAGROUP</div>
		<div class="_line">
			<nav class="menu_nav">
				<ul class="menu_mm">
					<?php 
					$acl = new Acl_apk;
					echo $acl->menu2020($this->em, $this->login['kd_user'], $this->baseUrl);
					?>
					<li class="menu_mm"><a class="_noneLink" href="<?php echo $this->baseUrl.'login/logout_member' ?>">Logout</a></li>
				</ul>
			</nav>
		</div>
	</div>
	<div class="_content">
		<div style="margin-top: -100px;">
			<?php 
			if($this->data->notmenu != true){
				$apk = true;
				
				if($this->view == 'dashboard.phtml'){
					$this->view = 'dashboardApk.phtml';
				}
				
				echo '<div style="margin-top: 100px; margin-left: 20px; margin-right: 20px; margin-top: 100px">';
				// echo $this->basePath.'assets/view/'.$this->view;
				include $this->basePath.'assets/view/'.$this->view;
				echo '<p>&nbsp;</p>';
				echo '<p>&nbsp;</p>';
				echo '<div>';
			}else{
				echo '<div style="margin-top: 70px">';
				include "home2020.phtml"; 
				echo '<div>';
			}
			?>
		</div>
		<div>&nbsp;</div>
		<div>&nbsp;</div>
		<div>&nbsp;</div>
		<div>&nbsp;</div>
		<div>&nbsp;</div>
	</div>
	<div class="_footer">
		Design and Manage By Sarijaya Strategic &copy; <?php echo date("Y") ?> - Sj Ware System
	</div>
	
	<div id="apankForm"></div>
<div id="errorDisplay"></div>
</body>
<script type="text/javascript">
$(document).ready(function(){
	_height = screen.height;
	_height = parseInt(_height) - 100;
	$('._content').css("height", _height+'px');
	
	$('#_menuRight').click(function(){
		_mode = $(this).attr("mode");
		if(_mode === 'off'){
			$('#'+this.id).attr("mode", "on");
			$('#'+this.id).removeAttr("class");
			$('#'+this.id).addClass("menu-button cross");
			$('#menu_div').animate({width:'toggle'},350);
			// $('#menu_div').slideDown('slow');;
			// $(this).show("slide", { direction: "left" }, 1000);
		}else{
			$('#'+this.id).attr("mode", "off");
			$('#'+this.id).removeAttr("class");
			$('#'+this.id).addClass("menu-button");
			// $('#menu_div').slideUp('slow');;
			$('#menu_div').animate({width:'toggle'},350);
		}
	})
	$('._content').click(function(){
		_mode = $('#_menuRight').attr("mode");
		if(_mode === 'on'){
			$('#_menuRight').attr("mode", "off");
			$('#_menuRight').removeAttr("class");
			$('#_menuRight').addClass("menu-button");
			$('#menu_div').animate({width:'toggle'},350);
		}
	})
	
	alertApk = function(_mode, _kode, _pesan){
		
		width = 300;
		_content = '<p>'+_pesan+'</p>';
		_content+= '<p><input type="button" id="_apkOke" class="_apkAlertBtn" mode="'+_mode+'" kode="'+_kode+'" value="Oke"> <input type="button" id="_apkClose" class="_apkAlertBtn" value="Close"></p>';
		
		$('#apankForm').html('<div id="apankForm_1" style="width: '+width+'px;"></div>');
		$('#apankForm_1').html('<div id="apankForm_2" style="margin-top: '+top+'px"></div>');
		$('#apankForm_2').html('<div id="apankForm_3"></div>');
		$('#apankForm_3').html('<div id="apankForm_close"></div>');
		$('#apankForm_close').html('<div id="apankFormContent"></div>');
		$('#apankFormContent').html('<div id="apankFormContent"><div class="_apkAlertContent">'+_content+'</div></div>');
		
		$('#_apkClose').click(function(){
			$('#apankForm').html('');
		})
	}
	alertApk = function(_mode, _kode, _pesan){
		
		width = 300;
		_content = '<p>'+_pesan+'</p>';
		_content+= '<p><input type="button" id="_apkOke" class="_apkAlertBtn" mode="'+_mode+'" kode="'+_kode+'" value="Oke"> <input type="button" id="_apkClose" class="_apkAlertBtn" value="Close"></p>';
		
		$('#apankForm').html('<div id="apankForm_1" style="width: '+width+'px;"></div>');
		$('#apankForm_1').html('<div id="apankForm_2" style="margin-top: '+top+'px"></div>');
		$('#apankForm_2').html('<div id="apankForm_3"></div>');
		$('#apankForm_3').html('<div id="apankForm_close"></div>');
		$('#apankForm_close').html('<div id="apankFormContent"></div>');
		$('#apankFormContent').html('<div id="apankFormContent"><div class="_apkAlertContent">'+_content+'</div></div>');
		
		$('#_apkClose').click(function(){
			$('#apankForm').html('');
		})
	}
	
	alertApk2 = function(_id, _mode, _kode, _pesan, _url){
		
		_content = '';
		if(_mode === 'confirm'){
			_content+= '<p style="margin-bottom: 20px;">'+_pesan+'</p>';
			_content+= '<p>';
			if(_url != 'info' & _url != 'refresh'){
				_content+= '<input type="button" id="_apkOke" class="_apkAlertBtn" mode="'+_mode+'" kode="'+_kode+'" value="Oke"> ';
			}
			_content+= ' <input type="button" id="_apkClose" class="_apkAlertBtn" value="Close">';
			_content+= '</p>';
		}

		$('#apankForm').html('<div id="apankFormApk_1" style="width: '+300+'px; margin: 0px auto"></div>');
		$('#apankFormApk_1').html('<div id="apankFormApk_2" style="margin-top: '+200+'px"></div>');
		$('#apankFormApk_2').html('<div id="apankFormApk_3">'+_content+'</div>');
		
		if(_mode === 'confirm'){
			$('#_apkOke').focus();
		}
		
		_delPros = false;
		makeOkeConfirmApk = function(_url){
			if(_url != false){
				if(_delPros != false){
					_delPros.abort();
				}
				_delPros = $.ajax({
				type: 'POST',
					url: _url,
					data: $(this).serialize(),
					success: function(data) {
						$('#errorDisplay').html(data);
					}
				})
				$('#apankForm').html('');
			}else{
				$('#apankForm').html('');
			}
		}
		$('#_apkOke').keypress(function(e){
			if(e.which === 13){
				makeOkeConfirmApk(_url);
			}
		});
		$('#_apkOke').click(function(e){
			makeOkeConfirmApk(_url);
		});
		
		makeCloseConfirmApk = function(_url){
			if(_url === 'refresh'){
				window.location = '';
				return;
			}
			$('#apankForm').html("");
		}
		$('#_apkClose').keypress(function(e){
			if(e.which === 13){
				makeCloseConfirmApk(_url);
			}
		});
		$('#_apkClose').click(function(e){
			makeCloseConfirmApk(_url);
		});
	}
	
	
	$('._mainMenu').click(function(){
		_div = $(this).attr('div');
		$('._divSubMenu').slideUp();
		$('#'+_div).slideDown("slow");
	})
})
</script>