<?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:1788;text-align:center;" >
  		<div class="title">REGISTER ANAK BELUM BERUMUR DUA BELAS TAHUN</div>
  		<div class="subtitle">Bulan : <?php echo $nama_bulan." ".$tahun;?></div>
	</div>
	<table class="register" width="1788" 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;">
					            a. Tanggal Permohonan<br />
					            b. Nomor Permohonan<br />
				
				     	</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<br />
					    
					</th>
					<th style="vertical-align:text-top;  text-align: left; width: 150px;">
				        		a. Tanggal laporan PK Bapas<br />
					            	b. Nomor laporan PK Bapas<br/>
					 
					</th>
					<th style="vertical-align:text-top;  text-align: left; width: 500px;">
				        		
					            	a. Tanggal keputusan Penyidik<br/>
					            	b. Nomor keputusan Penyidik<br/>
					            	c. Isi keputusan Penyidik<br/>
					</th>
					<th style="vertical-align:text-top;  text-align: left; width: 500px;">
						a. Tanggal tindak pidana<br />
					            	b. Uraian Tindak Pidana<br/>
					</th>
				        	<th style="vertical-align:text-top;  text-align: left; width: 150px;">
				        		Penetapan KPN:<br/>
				        		a. Tanggal<br />
					            	b. Nomor<br/>
				        	</th>
				   
			  
				    
				        	<th style="vertical-align:text-top; text-align: left; width: 150px;">Keterangan</th>
				</tr>
				<tr>
					<?php 
					$i=1;
					for ($i=1; $i <=8; $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 $$row->no_urut; ?></div></td>
					<td style="vertical-align:text-top;  text-align: left;">
						<p>a.<?php echo $row->tgl_permohonan; ?></p>
						<p>b.<?php echo $row->nomor_permohonan; ?></p>
					</td>
					<td style="vertical-align:text-top;  text-align: left;">
						<p><?php echo $row->anak; ?></p>
					</td>
					<td style="vertical-align:text-top;  text-align: left;">
						<p>a.<br/><?php echo $row->tgl_lap_kemasyarakatan; ?></p>
						<p>b.<br/><?php echo $row->nomor_lap_kemasyarakatan; ?></p>
					</td>
					<td style="vertical-align:text-top;  text-align: left;">
						<p>a.<br/><?php echo $row->tgl_kep_penyidik; ?></p>
						<p>b.<br/><?php echo $row->nomor_kep_penyidik; ?></p>
						<p>c.<br/><?php echo $row->isi_kep_penyidik; ?></p>
					</td>

					<td style="vertical-align:text-top;  text-align: left;">
						<p>a.<br/><?php echo $row->tgl_tindak_pidana; ?></p>
						<p>b.<br/><?php echo $row->uraian_tindak_pidana; ?></p>
					</td>
					<td style="vertical-align:text-top;  text-align: left;">
						<p>a.<br/><?php echo $row->tgl_penetapan; ?></p>
						<p>b.<br/><?php echo $row->nomor_penetapan; ?></p>
					</td>
					<td style="vertical-align:text-top;  text-align: left;">	</td>
				</tr>
				<?php } ?>
			</table>
			</div>
	</div>
	</div>
	</div>
</div>