<?php 
if($xls==1){
	header('Content-type: application/word');
  	header('Content-Disposition: attachment; filename='.$nama_file);

  	$data = '<html xmlns:x="urn:schemas-microsoft-com:office:excel">
          	<head>
              	<!--[if gte mso 9]>
              	<xml>
                  <x:ExcelWorkbook>
                      <x:ExcelWorksheets>
                          <x:ExcelWorksheet>
                              <x:Name>Sheet 1</x:Name>
                              <x:WorksheetOptions>
                                  <x:Print>
                                      <x:ValidPrinterInfo/>
                                  </x:Print>
                              </x:WorksheetOptions>
                          </x:ExcelWorksheet>
                      </x:ExcelWorksheets>
                  </x:ExcelWorkbook>
              </xml>
              <![endif]-->
          </head>' ; 
}else if($xls==2){
	header('Content-type: application/word');
  	header('Content-Disposition: attachment; filename='.$nama_file);

  	$data = '<html xmlns:x="urn:schemas-microsoft-com:office:excel">
          	<head>
              <!--[if gte mso 9]>
              <xml>
                  <x:ExcelWorkbook>
                      <x:ExcelWorksheets>
                          <x:ExcelWorksheet>
                              <x:Name>Sheet 1</x:Name>
                              <x:WorksheetOptions>
                                  <x:Print>
                                      <x:ValidPrinterInfo/>
                                  </x:Print>
                              </x:WorksheetOptions>
                          </x:ExcelWorksheet>
                      </x:ExcelWorksheets>
                  </x:ExcelWorkbook>
              </xml>
              <![endif]-->
          </head>' ; 
}
?>
<style type='text/css'>
	table td {word-wrap:break-word;white-space: pre-line;}  
</style>



<div id="reg_med" >
	<div style="width:2788;text-align:center;" >
  		<div class="title">REGISTER KESEPAKATAN DIVERSI</div>
  		<div class="subtitle">Bulan : <?php echo $nama_bulan." ".$tahun;?></div>
	</div>
	<table class="register" width="2788" border="1" cellspacing="0" cellpadding="4">
			<thead>
				<tr>
				        	<th style="vertical-align:text-top; text-align: left; width: 38px;">Nomor Urut</th>
				        	<th style="vertical-align:text-top; text-align: left;  width: 150px;">Tanggal Diterima Permohonan</th>
			        		<th style="vertical-align:text-top; text-align: left; width: 200px;">
					            a. Nomor Register Penyidik<br />
					            b. Nomor Register PU<br />
					            b. Nomor Perkara PN<br />
				        	<th style="vertical-align:text-top;  text-align: left; width: 300px;">
					            a. Nama Penyidik<br />
					            b. Nama PU<br />
					            b. Nama Hakim<br />
					</th>
				        	<th style="vertical-align:text-top;  text-align: left; width: 500px;">
				        		a. Nama Anak, tempat lahir, umur/tanggal lahir, jenis kelamin, kebangsaan, tempat tinggal, agama, pekerjaan, pendidikan<br />
					            	b. Nama Orang Tua/ Wali<br />
					            	c. Nama Penasihat Hukum<br />
					            	d.  Nama PK Bapas
					</th>
				        	<th style="vertical-align:text-top;  text-align: left; width: 500px;">
				        		a. Nama Korban, tempat lahir, umur/tanggal lahir, jenis kelamin, kebangsaan, tempat tinggal, agama, pekerjaan, pendidikan<br />
					            	b. Nama Orang Tua/ Wali<br />
					       
				        	</th>
				        	<th style="vertical-align:text-top;  text-align: left; width: 300px;"> Pasal yang disangkakan/didakwakan</th>
				        	<th style="vertical-align:text-top;  text-align: left; width: 500px;">
				        		a. Tanggal Kesepakatan<br />
					            	b. Isi Kesepakatan<br/>
					</th>
				        	<th style="vertical-align:text-top;  text-align: left; width: 500px;">
				        		Penetapan KPN:<br/>
				        		a. Nomor dan Tanggal<br />
					            	b. Amar<br/>
					            	b. Tanggal Pengiriman<br/>
				        	</th>
				   
			        		<th style="vertical-align:text-top; text-align: left; width: 150px;">
					        Tanggal pelaksanaan kesepakatan diversi
				        	</th>
				    
				        	<th style="vertical-align:text-top; text-align: left; width: 150px;">Keterangan</th>
				</tr>
				<tr>
					<?php 
					$i=1;
					for ($i=1; $i <= 11; $i++) { 
						echo "<th><div align='center'>".$i."</div></th>";
				 	}
					?>
				</tr>
				</thead>
				<?php
				$no = 0;
				foreach ($queryRegister->result() as $row) { $no++;
				?>
				<tr>
					<td style="vertical-align:text-top;  text-align: center;"><?php echo $no; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->tgl_permohonan_diversi; ?></td>
					<td style="vertical-align:text-top;  text-align: left;">
						<p>a.<?php echo $row->no_reg_penyidik; ?></p>
						<p>b.<?php echo $row->no_reg_penuntut_umum; ?></p>
						<p>c.<?php echo $row->no_perkara; ?></p>
					</td>
					<td style="vertical-align:text-top;  text-align: left;">
						<p>a.<br/><?php echo $row->penyidik; ?></p>
						<p>b.<br/><?php echo $row->penuntut; ?></p>
						<p>c.<br/><?php echo $row->majelis_hakim_text; ?></p>
					</td>
					<td style="vertical-align:text-top;  text-align: left;">
						<p>a.<br/><?php echo $row->terdakwa; ?></p>
						<p>b.<br/><?php echo $row->orang_tua_terdakwa; ?></p>
						<p>c.<br/><?php echo $row->pengacara_terdakwa; ?></p>
						<p>c.<br/><?php echo $row->pk_bapas; ?></p>
					</td>
					<td style="vertical-align:text-top;  text-align: left;">
						<p>a.<br/><?php echo $row->korban; ?></p>
						<p>b.<br/><?php echo $row->orang_tua_korban; ?></p>
					</td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->pasal_sangkaan_dakwaan; ?></td>
					<td style="vertical-align:text-top;  text-align: left;">
						<p>a.<br/><?php echo $row->tgl_kesepakatan_diversi; ?></p>
						<p>b.<br/><?php echo $row->isi_kesepakatan_diversi; ?></p>
					</td>
					<td style="vertical-align:text-top;  text-align: left;">
						<p>a.<br/><?php echo $row->no_diversi; ?><br/><?php echo $row->tgl_kesepakatan_diversi; ?></p>
						<p>b.<br/><?php echo $row->isi_kesepakatan_diversi; ?></p>
						<p>c.<br/><?php echo $row->tgl_pengiriman_penetapan_kpn; ?></p>
					</td>
					<td style="vertical-align:text-top;  text-align: left;">
						<p><?php echo $row->tgl_pelaksanaan_isi_diversi; ?></p>
					</td>
					<td style="vertical-align:text-top;  text-align: left;">	</td>
				</tr>
				<?php } ?>
			</table>
			</div>
	</div>
	</div>
	</div>
</div>