<?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" style="color:black;">
											<?= 'Terimakasih '.$yth.'<b>'.$nama_data.'</b>';?><br/>
											<?php echo $this->session->flashdata('message');?>
											Jenis Layanan <?=$pengunjung->l_nama_jenis_layanan;?> yang anda perlukan berkaitan dengan layanan <b>"<?=$pengunjung->l_layanan;?>"</b><br/>
											<i style="color:black;">Isi pesan : <?=$pengunjung->catatan;?><hr/>
											<b>Saat ini anda berada pada antrian<br/>Ke - <?=$antrian;?></b><br/>
											satu langkah lagi, anda akan terhubung dengan Petugas Pelayanan Terpadu Satu Pintu, klik dibawah ini.</i>
										</p>	
									</div>
									<table class="table">
										<tr>
											<td align="center" colspan="2">
												<a href="#" class="btn btn-lg btn-success" data-toggle="modal" data-target="#layanan1" style="font-size:40px;border-radius:20px;"><i class="bi bi-whatsapp"> Klik Disini </i></a><br/>
											</td>	
										</tr>
										<tr>
											<td>
												<a href="<?=base_url('home');?>" class="btn btn-warning btn-user btn-block" style="border-radius:30px;"><i class="fa fa-arrow-left"></i><br/>Kembali</a>
											</td>	
											<td>
												<a href="<?=base_url('home/kesekretariatan');?>" class="btn btn-info btn-user btn-block" style="border-radius:30px;"><i class="bi bi-x-circle"></i><br/>Batalkan</a>
												</td>	
											</tr>	
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>	
			</div>
		</div>					
		<div class="col-md-3"></div>
		
	</div>
</div>
<div class="col-md-1"></div>
</div>
<!-- Outer Row -->


<div class="modal fade" id="layanan1" tabindex="999999999" role="dialog" 
aria-hidden="true" style="padding-top:150px;">
	<div class="modal-dialog" role="document">
		<form method="post" action="<?=base_url('home/hubungi');?>" target="_blank">
			<div class="modal-content background-ptsp-hijau" style="color:black;">
				<div class="modal-header">
					<h5 class="modal-title">LAYANAN CHAT & CALL</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;">Terimakasih<?=$yth.'<b>'.$nama_data.'</b>';?>,<br/>anda akan segera terhubung dengan layanan chat <b><?=$set->title;?></b>.
					untuk melanjutkan silahkan klik tombol dibawah ini<br/><br/>
					<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="id" value="<?=$pengunjung->id;?>">
					<input type="hidden" name="bantuan" value="1">
					<input type="hidden" name="status" value="1">
					<center><button type="submit" class="btn btn-lg btn-success"><i class="bi bi-whatsapp"> Hubungi Petugas <?=$set->title;?></i></button></center>
				</div>
				<div class="modal-footer"></div>
			</div>
		</form>
	</div>
</div>

<div class="modal fade" id="layanan2" tabindex="999999999" role="dialog" 
aria-hidden="true" style="padding-top:150px;">
	<div class="modal-dialog" role="document">
		<form method="post" action="<?=base_url('home/hubungi');?>" target="_blank">
			<div class="modal-content background-ptsp-hijau" style="color:black;">
				<div class="modal-header">
					<h5 class="modal-title">LAYANAN VOICE CALL</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;">Terimakasih<?=$yth.'<b>'.$nama_data.'</b>';?>,<br/>anda akan segera terhubung dengan layanan voice call <b><?=$set->title;?></b>.
					untuk melanjutkan silahkan klik tombol dibawah ini<br/><br/>
					<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="id" value="<?=$pengunjung->id;?>">
					<input type="hidden" name="bantuan" value="2">
					<input type="hidden" name="status" value="1">
					<center><button type="submit" class="btn btn-lg btn-danger"><i class="bi bi-telephone"> Voice Call dengan <?=$set->title;?></i></button></center>
				</div>
				<div class="modal-footer"></div>
			</div>
		</form>
	</div>
</div>

<div class="modal fade" id="layanan3" tabindex="999999999" role="dialog" 
aria-hidden="true" style="padding-top:150px;">
	<div class="modal-dialog" role="document">
		<form method="post" action="<?=base_url('home/hubungi');?>" target="_blank">
			<div class="modal-content background-ptsp-hijau" style="color:black;">
				<div class="modal-header">
					<h5 class="modal-title">LAYANAN VIDEO CALL</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;">Terimakasih<?=$yth.'<b>'.$nama_data.'</b>';?>,<br/>anda akan segera terhubung dengan layanan video call <b><?=$set->title;?></b>.
					untuk melanjutkan silahkan klik tombol dibawah ini<br/><br/>
					<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="id" value="<?=$pengunjung->id;?>">
					<input type="hidden" name="bantuan" value="3">
					<input type="hidden" name="status" value="1">
					<center><button type="submit" class="btn btn-lg btn-primary"><i class="bi bi-camera-video"> Video Call dengan <?=$set->title;?></i></button></center>
				</div>
				<div class="modal-footer"></div>
			</div>
		</form>
	</div>
</div>
