<?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 INDUK PERKARA PIDANA BIASA ANAK</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;">Nomor Perkara</th>
			        		<th style="vertical-align:text-top; text-align: left; width: 300px;">Nama Anak, tempat lahir, umur/tanggal lahir, jenis kelamin, kebangsaan, tempat tinggal, agama, pekerjaan, pendidikan</th>
				        	<th style="vertical-align:text-top; text-align: left; width: 300px;">Nama Hakim dan Panitera Pengganti</th>
				        	<th style="vertical-align:text-top; text-align: left; width: 150px">Tanggal Putusan PN</th>
				        	<th style="vertical-align:text-top; text-align: left; width: 150px;">Tanggal Penyelesaian Perkara (minutasi)</th>
				        	<th style="vertical-align:text-top; text-align: left; width: 300px;">Pemohon Banding</th>
				        	<th style="vertical-align:text-top;  text-align: left; width: 150px;">
				        		Tanggal: 
					            a. Permohonan<br />
					            b. Pemberitahuan<br />
					            c. Penerimaan Memori<br />
					            d. Penyerahan Memori
				        	</th>
				        	<th style="vertical-align:text-top;  text-align: left; width: 150px;">
				        		Tanggal: 
					            a. Penerimaan Kontra Memori<br />
					            b. Penyerahan Kontra Memori
				        	</th>
				        	<th style="vertical-align:text-top;  text-align: left; width: 150px;">
				        		Tanggal Pemberitahuan memeriksa berkas (inzage) kepada: 
					            a. Pembanding<br />
					            b. Terbanding
				        	</th>
				        	<th style="vertical-align:text-top; text-align: left; width: 150px;">Tanggal dan nomor surat pengiriman berkas ke PT</th>
			        		<th style="vertical-align:text-top; text-align: left; width: 500px;">
					            a. Tanggal dan Nomor Putusan<br />
					            b. Amar Putusan
				        	</th>
				        	<th style="vertical-align:text-top; text-align: left; width: 150px;">
					            Tanggal pemberitahuan putusan kepada: <br />
					            a. Pembanding<br />
					            b. Terbanding <br/>
					            b. PK Bapas <br/>
				        	</th>
				        	<th style="vertical-align:text-top; text-align: left; width: 150px;">Keterangan</th>
				</tr>
				<tr>
					<?php 
					$i=1;
					for ($i=1; $i <= 14; $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->kolom2; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->kolom3; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->kolom4; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->kolom5; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->kolom6; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->kolom7; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->kolom8; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->kolom9; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->kolom10; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->kolom11; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->kolom12; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->kolom13; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;"><?php echo $row->kolom14; ?></div></td>
				</tr>
				<?php } ?>
			</table>
			</div>
		
	</div>
	</div>
	</div>
</div>