<?php if($this->session->userdata('level')=='1'){ ?>
	<div class="row">
		<div class="col-xl-12 col-lg-12">
			<?php echo $this->session->userdata('message') <> '' ? $this->session->userdata('message') : ''; ?>
		</div>
		<div class="col-md-12">
			<center>
				<h3>
					<?php if($this->uri->segment('2')=='kontak') {
						echo 'KONTAK LAYANAN KEPANITERAAN';
						}else{
						echo 'KONTAK LAYANAN KESEKRETARIATAN';
					}
					?>
				</h3>
			</center>
			<form method="post" class="table-responsive">
				<table class="table table-bordered table-lg table-hover" style="font-size:18px;">
					<thead>
						<tr style="text-align:center">
							<th>Jenis Layanan</th>	
							<th width="500px">Link Layanan</th>	
							<th>Cek</th>	
							<th>Action</th>	
						</tr>	
					</thead>
					<tbody>
						<?php foreach($kontak as $k){ 
							if($k->kode_layanan=='chat'){
								$link_akses = 'https://api.whatsapp.com/send/?phone='.$k->link_layanan.'&text=Layanan%20PTSP';
								}else{
								$link_akses = $k->link_layanan;
							}	
						?>
						<tr style="font-weight:bold;">
							<td><?=$k->nama_layanan;?></td>
							<td><input type="text" name="link_layanan<?=$k->id;?>" value="<?=$k->link_layanan;?>" class="form-control"></td>
							<td align="center"><a href="<?=$link_akses;?>" target="_blank" style="color:<?=$k->warna;?>" class="btn btn-default"><i class="<?=$k->icon;?>"></i></a></td>
							<td align="center">
								<input type="hidden" name="id<?=$k->id;?>" value="<?=$k->id;?>">
								<button type="submit" name="simpan" value="<?=$k->kode_layanan;?>" class="btn btn-success" onclick="javasciprt: return confirm('Jenis Layanan yang akan di perbaharui adalah <?=$k->keterangan;?>, Apakah ingin melanjutkan ?')">
									<i class="fa fa-save"></i>
								</button>
							</td>	
						</tr>
						<?php } ?>
					</tbody>
				</table>
			</form>
		</div>
	</div>
<?php } ?>							