<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>
		<?php
		$login = $this->login;
		if(!empty($login['user'])){
			echo $login['user'].' | ';
		}
		$menu = new Menu;
		echo $menu->setTitileMenu($this->getParameter['modul'], $this->getParameter['asliGetCotroller']);
		?> 
	</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <link href="<?php echo $this->baseUrl ?>assets/thema/2019/bootstrap/css/bootstrap.css?ver=<?php echo date("ymdhis") ?>" rel="stylesheet" type="text/css" />    
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo $this->baseUrl ?>assets/thema/2019/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
    <link href="<?php echo $this->baseUrl ?>assets/thema/2019/dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" />
	
		<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>assets/css/jquery.apank.autocomplete.css">
		<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>assets/css/jquery.apank.popUp.css">
		<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>assets/css/jquery.apank.postForm.css">
		<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>assets/css/apank.css">
		<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>assets/css/newTab.css">
		<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>assets/css/flexigrid/flexigrid.css?ver=<?php echo date("ymdHis") ?>">
		<link type="text/css" rel="stylesheet" href="<?php echo $this->baseUrl ?>assets/css/jquery.apank.displayNone.css" />
		<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>assets/thema/2019/css/mobile-theme-2019.css">
		<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $this->baseUrl ?>assets/thema/2019/css/mobile-rasio-form.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" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/jquery.shortcuts.min.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/apank.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/fungsi.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/md5.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/jquery.apank.autocomplete.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/jquery.apank.popUp.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/jquery.apank.PostForm.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/jquery.apank.displayNone.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/ddaccordion.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/jquery.meio.mask.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/flexigrid.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/accounting.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/apank.grid.js" type="text/javascript"></script>
		<script src="<?php echo $this->baseUrl ?>assets/js/fileuploader.js" type="text/javascript"></script>

  </head>
<style type="text/css">
.label{
	width: 15px;
	height: 15px;
}
#_rasioForm {
    height: 450px;
    -webkit-border-radius: 0px 6px 6px 6px;
    -moz-border-radius: 0px 0px 6px 6px;
    -khtml-border-radius: 0px 0px 6px 6px;
    border-radius: 0px 0px 6px 6px;
    border-left: 2px double #fff;
    border-right: 2px double #fff;
    border-bottom: 2px double #fff;
    padding: 25px;
}
#_titleTop{
    -webkit-border-radius: 6px 6px 0px 0px;
    -moz-border-radius: 6px 6px 0px 0px;
    -khtml-border-radius: 6px 6px 0px 0px;
    border-radius: 6px 6px 0px 0px;
    border-top: 2px double #f5cbe8;
    border-left: 2px double #f5cbe8;
    border-right: 2px double #f5cbe8;
    border-bottom: 1px dashed #f5cbe8;
	padding-top: 5px;
	padding-left: 5px;
	font-weight: bold; 
	font-size: 14px; 
	background-color: #f7f7f7;
}
[readonly]{
	background-color: #e8fdff;
}
[disabled]{
	background-color: #e8fdff;
}
._rasioDet{

}
._gridDetail_xx{
	border: 1px dashed #cfcfcf;
}
._gridDetail_xx tr td{
	border: 1px dashed #cfcfcf;
}
._gridDetail_xx{
	border: none;
	padding: 2px;
}
._gridDetail_xx{
	border: none;
	padding: 2px;
	border: 1px dashed #cfcfcf;
}
._detTdItem{
	padding: 0px;
}
._detTd{
	margin-top: -6px;
	margin-bottom: -6px;
	margin-left: -5px;
	border: none;
	height: 26px;
	border-bottom: 1px solid #cfcfcf;
}
._det2View{
	margin-top: -6px;
	margin-bottom: -6px;
	margin-left: -5px;
	border: none;
	height: 26px;
	border-bottom: 1px solid #cfcfcf;
}
.inputButton{
	width: 40px;
	background-color: #cfcfcf;
	text-align: center;
}
.apankFormDefDisplay{
	position: fixed;
	top: 0px;
}
#apankTema2019Title{
	margin-bottom: 5px;
}
.qq-upload-button{
	border: 1px solid #cfcfcf;
	width: 80px;
	padding: 3px;
}
</style>
 
			<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'] ?>">
			<input type="hidden" id="tempGridFocus" value="_noGrid_0">
			<div id="apankForm"></div>
			<div id="divAjax"></div>
			
  <body class="skin-blue">
    <div class="wrapper">
      
      <header class="main-header">
        <!-- Logo -->
		
		<a href="#" class="logo">
			<img src="<?php echo $this->baseUrl ?>assets/images/rasio.gif" style="width: 70px">
		</a>
		
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top" role="navigation">
          <!-- Sidebar toggle button-->
          <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
            <span class="sr-only">Toggle navigation</span>
        	<span class="_headerPt" style='font-family: Arial, Helvetica, sans-serif'><?php echo $this->login['pt'] ?></span>
          </a>
          <!--<img src="<?php echo $this->baseUrl ?>assets/images/rasio.gif" style="width: 80px; margin: 5px;">-->
          <div class="navbar-custom-menu">
            <ul class="nav navbar-nav">
              <!-- Notifications: style can be found in dropdown.less -->
              <li class="dropdown notifications-menu">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                  <i class="fa fa-bell-o"></i>
                  <!--<span class="label label-warning">2</span>-->
                </a>
              </li>

              <li class="dropdown">
				<input type="text" readonly id="tglDefault" style="background-color: #3c8dbc; border:none; width: 80px; color: #fff; margin-top: 15px; margin-left: 10px;" class="_nonDesign" value="<?php echo date("d/m/Y", strtotime($this->login['date'])) ?>">
              </li>
			  
              <!-- User Account: style can be found in dropdown.less -->
              <li class="dropdown user user-menu">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                  <img src="<?php echo $this->baseUrl ?>assets/thema/2019/dist/img/no-image.png" class="user-image" alt="User Image"/>
                  <span class="hidden-xs"><?php echo $this->login['nm_user'] ?></span>
                </a>
                <ul class="dropdown-menu">
                  <!-- User image -->
                  <li class="user-header">
                    <img src="<?php echo $this->baseUrl ?>assets/thema/2019/dist/img/no-image.png" class="img-circle" alt="User Image" />
                    <p>
                      <?php echo $this->login['nm_user'] ?>
                      <small>Administrator</small>
                    </p>
                  </li>
                  <!-- Menu Footer-->
                  <li class="user-footer">
                    <div class="pull-left">
                      <a href="#" class="btn btn-default btn-flat">Setting</a>
                    </div>
                    <div class="pull-right">
                      <a href="#" class="btn btn-default btn-flat">Sign out</a>
                    </div>
                  </li>
                </ul>
              </li>
            </ul>
          </div>
        </nav>
      </header>
      <!-- Left side column. contains the logo and sidebar -->
      <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
          <!-- sidebar menu: : style can be found in sidebar.less -->
		  
		<?php include "tree.phtml" ?>		  
		  
        </section>
        <!-- /.sidebar -->
      </aside>

      <!-- Right side column. Contains the navbar and content of the page -->
      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <!-- Main content -->
        <section class="content">

			<!-- Main row -->
          <div class="row">
            <!-- Left col -->
				<div id="_contentBox" style="background-color: #fff; margin-left: 20px; margin-right: 20px; padding: 20px;">
					<div id="_titleTop">
						<div id="apankTema2019Title">
							<?php 
							$menu = new Menu;			
							echo $menu->setTitile($this->getParameter['modul'], $this->getParameter['asliGetCotroller'], $this->baseUrl); 
							?>
						</div>
					</div>
					<div>
						<?php include $this->basePath.'assets/view/'.$this->view; ?>
					</div>
				</div>
			
          </div><!-- /.row (main row) -->

        </section><!-- /.content -->
      </div><!-- /.content-wrapper -->
      <footer class="main-footer">
      </footer>
    </div><!-- ./wrapper -->

  </body>
</html>

<script type="text/javascript">

var makeDatePicker = function() {
	// $(".tanggal").datepicker({
		// changeMonth: true,
		// changeYear: true,
		// dateFormat: 'dd/mm/yy', 
		// yearRange: '1900:<?php echo ( date("Y") + 5)  ?>',
	// });
	$('.ui-widget-content').css('display', 'none');
	$('.meioMask').setMask();
};

$(document).ajaxComplete(function() {
	makeDatePicker();
});
	
<?php if($this->disCK == true){ ?>
	function clickIE4(){
		if (event.button==2){
			return false;
		}
	}

	function clickNS4(e){
		if (document.layers||document.getElementById&&!document.all){
			if (e.which==2||e.which==3){
				return false;
			}
		}
	}

	if (document.layers){
		document.captureEvents(Event.MOUSEDOWN);
		document.onmousedown=clickNS4;
	}

	else if (document.all&&!document.getElementById){
		document.onmousedown=clickIE4;
	}

	document.oncontextmenu=new Function("return false")
<?php } ?>

function createUploader(_file, _loc, _funcSucces){            
	var uploader = new qq.FileUploader({
		element: document.getElementById(_file),
		listElement: document.getElementById('separate-list'),
		multiple: false,
		onComplete: function(id, fileName, responseJSON){
			$('.qq-upload-success').remove();
			$('#'+_loc).val(responseJSON['fileName']).focus();
			if(_funcSucces != false){
				makeFunctionModul(_funcSucces, '');
			}
		},
		action: '<?php echo $this->baseUrl ?>upload/file/'
	});           
}        

$(document).ready(function(){
	makeManualGridSetting = function(){
		cekTextPlus = function(_no){
			_cek = parseInt($('#_nom_'+_no).val());
			if(_cek > 0){
				return _no;
			}else{
				_max = parseInt($("#_maxNo").val());
				if(_max > _no){
					_no = _no + 1;
					return cekTextPlus(_no);
				}
			}
			return false;
		}

		setManualGridFocus = function(_no){
			$('.barisManualGrid').removeAttr("style");
			if(_no === 'null'){
				$('#_filterManualGrid_0').focus();
			}else{
				$('#_nom_'+_no).focus();
				$('#barisManualGrid_'+_no).css("background-color", "yellow");
			}
		}
		
		$('._filterManualGrid').live("keyup",(function(e){
			_kode = parseInt(e.which);
			if(_kode === 40){
				_no = parseInt($(this).attr("_no"));
				if(_kode === 40){
					_no = _no + 1; 
				}
				_cek = cekTextPlus(_no);
				if(_cek != false){
					setManualGridFocus(_cek);
				}
			}
		}))
		$('._recManualGrid').live("keyup", (function(e){
			_kode = parseInt(e.which);
			if(_kode === 38 || _kode === 40){
				_no = parseInt($(this).attr("_no"));
				_noA = _no;
				if(_kode === 38){
					_no = _no - 1; 
					_cek = _no;

					_nom = $('#_nom_'+_no).val();
					if(_nom === undefined & _no > 0){
						_cek = false;
						$('#_loadManualGridTop').html("Loading.....");
						loadManualGrid(_noA, 'back');
					}
					
				}
				if(_kode === 40){
					_no = _no + 1; 
					_cek = _no;
					_nom = $('#_nom_'+_no).val();
					if(_nom === undefined){
						_cek = false;
						$('#_loadManualGridBottom').html("Loading.....");
						loadManualGrid(_noA, 'next');
					}
				}
				if(_cek != false){
					setManualGridFocus(_cek);
				}
			}
			if(_kode === 13){
				_pk = $(this).attr("_pk");
				_pilihManualGrid(_pk);
			}
			if(_kode === 27){
				makeTimeFocus();
				$('#apankFormPopUp').empty();
			}
		}))
		_loadPilih = false;
		_pilihManualGrid = function(_pk){
			_md = $('#_typeBrowse').val();
			$('#apankFormPopUp').empty();
			if(_md === 'browse'){
				$('#apankForm').empty();
				if(_loadPilih != false){
					_loadPilih.abort();
				}
				$('#apankFormLoadingProgres').removeAttr("style");
				_pkN = str_ireplace("/", "__--__", _pk);
				_loadPilih = $.ajax({
				type: "GET",
					url: "<?php echo $this->baseUrl ?>Basic/pilih/&modul="+$('#_cls').val()+'&id='+_pkN,
					data: $(this).serialize(),
					success: function(data) {
						$("#errorDisplay").html(data);
						$('#apankFormLoadingProgres').css("display", "none");
					}
				})
			}
			if(_md === 'popUp'){
				_idAktP = $('#_urutPopUp').val();
				_lastNo = parseInt($('#_urutPopUp').val());
				_urut = $('.urut_'+_lastNo).attr('no');
				$('.urut_'+_lastNo).val(_pk);
				$('#apankForm').empty();

				if(_urut != undefined){
					var _urutNoLast = _urut
					function showDiv() {
						makeCekNotNull(_urutNoLast);
						clearInterval(timer);
					}
					var timer = setInterval( showDiv, 100);
				}
				
				_disPopUp = $('.urut_'+_lastNo).attr('display');
				_idDisPopUp = $('.urut_'+_lastNo).attr('id');
				
				_disPopUp2 = $('.urut_'+_lastNo).attr('displayClick');
				if(_disPopUp2 != undefined){
					_disPopUp = _disPopUp2;
				}
				
				if(_disPopUp === undefined){
					_lastNo = $('#_urutPopUp').val();
					_disPopUp = $('#'+_lastNo).attr('display');
					_idDisPopUp = _lastNo;
					$('#'+_lastNo).val(_pk).focus().select();
				}

				display(_disPopUp, _idDisPopUp);
			}
		}
		$('.barisManualGrid').live("click", (function(){
			_no = parseInt($(this).attr("_no"));
			setManualGridFocus(_no);
		}))
		$('.barisManualGrid').live("dblclick", (function(){
			_pk = $(this).attr("_pk");
			_pilihManualGrid(_pk);
		}))
		$('#browse_grid tr td ._app').live("click", (function(){
			_pk = $(this).attr("_pk");
			_pilihManualGrid(_pk);
		}))
		$('#popUp_grid tr td ._app').live("click", (function(){
			_pk = $(this).attr("_pk");
			_pilihManualGrid(_pk);
		}))
		
		_loadManualGrid = false;
		loadManualGrid = function(_no, _type){
			_pk  = $('#barisManualGrid_'+_no).attr("_pk");
			_fil = makeFilterManualGrid();
			
			if(_loadManualGrid != false){
				_loadManualGrid.abort();
			}
			
			_loadManualGrid = $.ajax({
			type: "GET",
				url: "<?php echo $this->baseUrl ?>Basic/loadDataManualGrid/&_ctrl="+$('#_cls').val()+'&Lno='+_no+'&type='+_type+'&pk='+_pk+_fil,
				data: $(this).serialize(),
				success: function(data) {
					$("#_loadManualGridTop").html('');
					$("#_loadManualGridBottom").html('');
					$("#_loadManualGrid").html(data);
				}
			})
		}
	}
	makeManualGridSetting();
	
	_loadMenuTema2016 = false;
	makeLoadMenu = function(_menu){
		if(_loadMenuTema2016 != false){
			_loadMenuTema2016.abort();
		}
		_loadMenuTema2016 = $.ajax({
		type: "GET",
			url: "<?php echo $this->baseUrl ?>application/loadMenu/&app=<?php echo $this->getParameter['param'][0] ?>&menu="+_menu,
			data: $(this).serialize(),
			success: function(data) {
				$("#apankMenu2016Display").html(data);
				$("#displayMenu2016Tree").css("display", "none");
			}
		})
	}
	$('#_menuTema2016').keyup(function(){
		_menu = $(this).val();
		if(_menu.length > 0){
			makeLoadMenu($(this).val());
		}else{
			_loadMenuTema2016.abort();
			$("#apankMenu2016Display").removeAttr("class").html('');
			$("#displayMenu2016Tree").removeAttr("style");
		}
	})
	
	$('._hideMenu').click(function(e){
		e.preventDefault();
		
		_hide = $('#apankTema2016Left').attr('hide');
		if(_hide === 'true'){
			$('#apankTema2016Left').removeAttr("hide");
			$('#apankTema2016Left').removeAttr("class");
			$('#apankTema2016Right').removeAttr("style");
			$('._hideMenu').html("<b>&laquo;</b>");
		}else{
			$('#apankTema2016Left').attr('hide', "true");
			$('#apankTema2016Left').addClass("displayNone");
			$('#apankTema2016Right').css("margin-left", "0px");
			$('._hideMenu').html("<b>&raquo;</b>");
		}
		
	})
	$('._menuIcon').css("width", "100px");
	$('._menuIcon').css("height", "100px");
})
</script>
<script src="<?php echo $this->baseUrl ?>assets/thema/2019/dist/js/app.js" type="text/javascript"></script>
