<head>
	<title><?php echo $this->data->kode ?></title>
</head>

<script src="<?php echo $this->baseUrl ?>/assets/js/jquery-1.7.2.min.js" type="text/javascript"></script>
		

<div style="text-align: center">
	<select id="rangkap">
		<?php for($i = 1; $i <= 5; $i++){ 
			if($_GET['rangkap'] == $i){
				$cek = "selected";
			}else{
				$cek = '';
			}
		?>
			<option value="<?php echo $i ?>" <?php echo $cek ?>>Rangkap <?php echo $i ?>
		<?php } ?>
	</select>
</div>

<?php
if(empty($_GET['rangkap'])){
	$_GET['rangkap'] = 1;
}

$page = 'cetak';
if(!empty($this->data->pageR)){
	$page = $this->data->pageR;
}

if(empty($this->data->pdf)){
	$this->data->pdf = 'pdf';
}

?>

<div style="width: 800px; margin: 0px auto">
	<iframe width="100%" height="100%" src="<?php echo $this->baseUrl.$this->getParameter['controller'].'/'.$this->data->pdf.'/&nojnl='.$this->data->nojnl.'&rangkap='.$_GET['rangkap'] ?>"></iframe> 
</div>


<script type="text/javascript">
$(document).ready(function(){
	$('#rangkap').change(function(){
		window.location = "<?php echo $this->baseUrl.$this->getParameter['controller'].'/'.$page.'/&nojnl='.$this->data->nojnl ?>&rangkap="+$('#rangkap').val();
	})
})
</script>