<?php
if($this->session->userdata('is_logged_in')===FALSE){
			redirect('login');
}

header("Content-type: application/vnd.ms-word");
header("Content-Disposition: attachment;Filename=Rencana_Sidang.doc");
?>
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">
<style type="text/css">
	.satu {
	   font-size: 12px;
	   }
	   .dua {
	   font-size: 20px;
	   }
	   .tiga {
	   font-size: 8px;
	   }
	hr.onepixel {
	    border-top: 1px solid #afbcc6;
	    border-bottom: 1px solid #eff2f6;
	    height: 0px;
	    margin-bottom: 10px;
	}
	@page {
		size:8.5in 11.0in; 
		margin:0.5in 0.31in 0.05in 0.25in;} 
		div.Section1{
			page:Section1;
	}
</style>
<head>
<xml><w:WordDocument><w:View>Print</w:View><w:Zoom>100</w:Zoom></w:WordDocument></xml>
</head>
<body>
	<div class="Section1">
		<center><p class="satu"><b>RENCANA JADWAL SIDANG PERKARA <?php echo $alur_perkara_id<100?'PERDATA':'PIDANA'; ?> </b></p></center></br>
		<table>
			<tr>
				<td width="20%"><b>Nomor Perkara</b></td>
				<td>: <b><?php echo $nomor_perkara; ?></b></td>
			</tr>
			<tr>
				<td width="20%"><b>Nama Pihak</b></td>
				<td><b><?php echo $pihak1_text; ?><br><?php echo $pihak2_text; ?></b></td>
			</tr>
		</table>		
		<hr class="onepixel">
		<br>
		<table align="center">
			<tr>
				<td align="center" bgcolor="#c7f7bf" width="3%">No</td>
				<td align="center" bgcolor="#c7f7bf" width="18%">Hari / Tgl Sidang</td>
				<td align="center" bgcolor="#c7f7bf" width="30%">Acara Sidang</td>
				<td align="center" bgcolor="#c7f7bf" width="20%">Keterangan</td>
			</tr>						
		<?php
		$warna ="#f9f8f8";
		if($detil_cc->num_rows>0){			
			$con = 1;			
			foreach ($detil_cc->result() as $row) {
				$rencana_tanggal = $this->tanggalhelper->convertDate($row->rencana_tanggal);
				$hari = $this->templatehelper->getHari($row->rencana_tanggal);
				$acara_sidang = $row->rencana_agenda;												
	            echo "<tr>";
				echo '<td align="center" bgcolor='.$warna.'>'.$con.'</td>';
				echo '<td bgcolor='.$warna.'>'.$hari.', '.$rencana_tanggal.'</td>';
				echo '<td bgcolor='.$warna.'>'.$row->rencana_agenda.'</td>';				
				echo '<td bgcolor='.$warna.'>'.$row->keterangan.'</td>';
			    echo "</tr>";
			    $con++;
       		}			
		}else{
			echo "<tr><td colspan='4' align='center' bgcolor='#f58484'>Data Tidak diTemukan</td></tr>";
		}
		?>
		</table>
		<br>
		<table>			
			<tr>
				<td width="10%">Catatan : </td>
				<td>1.</td>
				<td align="justify">Sidang dimulai paling lambat pada pukul ....</td>
			</tr>
			<tr>
				<td></td>
				<td valign="top">2.</td>
				<td style="text-align:justify">Apabila para pihak tidak hadir (tanpa ada pemberitahuan) sidang dilanjutkan sesuai jadwal sidang tersebut diatas</td>
			</tr>
			<tr>
				<td></td>
				<td valign="top">3.</td>
				<td style="text-align:justify">Jadwal sidang diatas dapat berubah disesuaikan dengan situasi dan kondisi di persidangan</td>
			</tr>
		</table>
		<br><br>
		<table>
			<tr>
				<td><?php echo $alur_perkara_id<100?$kuasa_p.' Penggugat':'Penuntut'; ?></td>
				<td><?php echo $alur_perkara_id<100?$kuasa_t.' Tergugat':'Terdakwa'; ?></td>
				<td>Ketua Majelis</td>
			</tr>
			<tr>
				<td><br><br>
				<?php
					if(!empty($pengacara_pihak1)) {			
						$con_p1 = 1;
						if($pengacara1->num_rows>1){
							$enter = '<br><br><br>';
						}else{
							$enter = '';
						}			
						foreach ($pengacara1->result() as $row) {																
							echo $this->templatehelper->standradnaming($row->nama).''.$enter;
						    $con_p1++;
			       		}			
					}else{
						$con_p = 1;
						if($pihak1->num_rows>1){
							$enter = '<br><br><br>';
						}else{
							$enter = '';
						}			
						foreach ($pihak1->result() as $row) {																
							echo $this->templatehelper->standradnaming($row->nama).''.$enter;
						    $con_p++;
			       		}
					}
				?>	
				</td>
				<td><br><br>
				<?php
					if(!empty($pengacara_pihak2)) {			
						$con_t1 = 1;
						if($pengacara2->num_rows>1){
							$enter = '<br><br><br>';
						}else{
							$enter = '';
						}			
						foreach ($pengacara2->result() as $row) {																
							echo $this->templatehelper->standradnaming($row->nama).''.$enter;
						    $con_t1++;
			       		}			
					}else{
						$con_t = 1;
						if($pihak2->num_rows>1){
							$enter = '<br><br><br>';
						}else{
							$enter = '';
						}			
						foreach ($pihak2->result() as $row) {																
							echo $this->templatehelper->standradnaming($row->nama).''.$enter;
						    $con_t++;
			       		}
					}
				?>
				</td>
				<td>
				<?php 
					if($hakim->num_rows>0){
						$h=1;
						foreach ($hakim->result() as $row) {
							if($row->jabatan_hakim_id==1){								
								echo '<br><br>'.$row->hakim_nama;
								echo '<br>Hakim-Hakim Anggota';
							}else{																						
								echo '<br><br>'.$row->hakim_nama;
							}
							$h++;
						}
					}
				?>
				</td>
			</tr>
			<tr>
				<td colspan="3" align="center">Panitera Pengganti</td>				
			</tr>
			<tr>
				<td colspan="3" align="center"><br><br><?php echo $panitera_pengganti; ?></td>
			</tr>
		</table>
	</div>
</body>
</html>