<?php 
	$set 		= $this->db->query("SELECT * FROM pengaturan WHERE id='2' ")->row();
	$nik_data 	= $this->session->userdata('nik');
	$nama_data 	= $this->session->userdata('nama');
	$jk_data 	= $this->session->userdata('jk');
	if($jk_data == 'L'){
		$yth = ' Bapak ';
		}else if($jk_data == 'P'){
		$yth = ' Ibu ';
		}else{
		$yth = '';
	}
	
	$link_ptsp = $this->uri->segment('2');
	
?>
<style type="text/css">
	h1{
	text-align: center;
	}
	
	p{
	text-align: center;
	}
	
	a{
	color: #232323;
	text-decoration: none;
	font-weight: 500;
	}
	
	a:hover{
	text-decoration: underline;
	}
	
	.zoom-effect {  
	position: relative;
	width: 100%;
	height: 330px;
	margin: 0 auto;
	overflow: hidden;  
	}
	
	.kotak {
	position: absolute;
	top: 0;
	left: 0;
	
	}
	
	.kotak img {
	-webkit-transition: 0.4s ease;
	transition: 0.4s ease;
	}
	
	.zoom-effect:hover .kotak img {
	-webkit-transform: scale(1.3);
	transform: scale(1.3);
	}	
</style>
<!-- Outer Row -->
<div class="row justify-content-center" style="margin-top:50px">
	<div class="col-md-1"></div>
	<div class="col-md-10 background-batik shadow-lg p-3 mb-5 rounded" style="min-height:550px;">
		<div class="row">
			<div class="col-md-3"></div>
			<div class="col-md-6">
				<div class="card o-hidden border-0 my-5">
					<div class="card-body p-8 background-ptsp-hijau shadow-lg" style="border:2px solid green;border-radius:5px;">
						<!-- Nested Row within Card Body -->
						<div class="row">
							<div class="col-lg-12">
								<div class="p-1">
									<div class="text-center">
										<!-- <h1 class="h1 text-gray-900">Login</h1> -->
										<p class="login-box-msg">
											<?php if ($this->session->flashdata('message') == '') {
												echo '<b style="color:white;">Silahkan Pilih Jenis Layanan '.$jenis_layanan->nama_jenis_layanan.'</b>';
												} else {
												echo $this->session->flashdata('message');
											} ?>
										</p>
									</div>
									<?php $no=0;foreach($data_layanan as $dl){ ?>								
										<a href="#" data-toggle="modal" data-target="#layanan<?=$no++;?>" class="btn btn-success btn-user btn-block" style="border-radius:30px;"><?=$dl->layanan;?></a>
									<?php } ?>
									<table class="table">
										<tr>
											<td>
											<hr/>
											<a href="<?=base_url('home');?>" class="btn btn-warning btn-user" style="border-radius:30px;"><i class="fa fa-arrow-left"></i></a></td>
											<td>
												
											</td>
											<!-- td>
												<?php if($link_ptsp=='kepaniteraan'){ ?>
													<a href="<?=base_url('home/kesekretariatan');?>" class="btn btn-info btn-user btn-block" style="border-radius:30px;">Kesekretariatan</a>
													<?php }else{ ?>
													<a href="<?=base_url('home/kepaniteraan');?>" class="btn btn-info btn-user btn-block" style="border-radius:30px;">Kepaniteraan</a>
												<?php } ?>
											</td -->	
										</tr>	
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>	
			</div>
			<div class="col-md-3"></div>
			</div>					
			
											</div>
											<div class="col-md-1"></div>
</div>
<!-- Outer Row -->

<?php $modal=0;foreach($data_layanan as $dl){ ?>
	<div class="modal fade" id="layanan<?=$modal++;?>" tabindex="999999999" role="dialog" 
	aria-hidden="true">
		<div class="modal-dialog" role="document">
			<form method="post" action="<?=base_url('home/proses');?>">
				<div class="modal-content background-ptsp-hijau" style="color:black;">
					<div class="modal-header">
						<h5 class="modal-title">LAYANAN <?=strtoupper($jenis_layanan->nama_jenis_layanan)?></h5>
						<button class="close" type="button" data-dismiss="modal" aria-label="Close">
							<span aria-hidden="true">×</span>
						</button>
					</div>
					<div class="modal-body" style="text-align:justify;">Selamat <?=$salam.''.$yth.'<b>'.$nama_data.'</b>';?>,<br/>anda memilih Layanan "<b><?=$dl->layanan;?></b>".
						Mohon beritahu kami apa yang bisa kami bantu perihal tersebut, dengan mengisi kolom dibawah ini kemudian klik lanjutkan
						<textarea class="form-control" required="required" rows="5" placeholder="jelaskan secara singkat perihal yang bisa kami bantu" name="catatan"></textarea>
						<input type="hidden" name="p_id" value="<?=$user->id;?>">
						<input type="hidden" name="p_nik" value="<?=$user->nik;?>">
						<input type="hidden" name="p_hp" value="<?=$user->hp;?>">
						<input type="hidden" name="p_nama" value="<?=$user->nama;?>">
						<input type="hidden" name="p_email" value="<?=$user->email;?>">
						<input type="hidden" name="p_tgllahir" value="<?=$user->tgllahir;?>">
						<input type="hidden" name="p_jk" value="<?=$user->jk;?>">
						<input type="hidden" name="p_pekerjaan" value="<?=$user->pekerjaan;?>">
						<input type="hidden" name="l_id" value="<?=$dl->id;?>">
						<input type="hidden" name="l_layanan" value="<?=$dl->layanan;?>">
						<input type="hidden" name="l_id_jenis_layanan" value="<?=$dl->id_jenis_layanan;?>">
						<input type="hidden" name="l_nama_jenis_layanan" value="<?=$dl->nama_jenis_layanan;?>">
					</div>
					<div class="modal-header">
						<button class="btn btn-warning" type="button" data-dismiss="modal">Batalkan</button>
						<button class="btn btn-secondary btn-primary" type="submit">Lanjutkan</button>
					</div>
				</div>
			</form>
		</div>
	</div>
<?php } ?>
