<?php
defined('APK') or exit('Anda tidak dizinkan mengakses langsung script ini!');
?>
<?php

if($menu['aplikasi']=='0'){{$apk="ADMINISTRASI SEKOLAH";}}elseif($menu['aplikasi']=='1'){{$apk="UNTUK UJIAN BERSAMA";}}


?>
<?php if ($ac == '') { ?>
  <div class="row">
     <div class="col-md-12">
		<div class="card">
             <div class="card-header">									
                  <h5 class="card-title">Pengaturan Aplikasi</h5>
					</div>
                      <div class="card-body">
                             
                               <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
                                      <li class="nav-item" role="presentation">
                                        <button class="nav-link active" id="pills-home-tab" data-bs-toggle="pill" data-bs-target="#pills-home" type="button" role="tab" aria-controls="pills-home" aria-selected="true">Setting Aplikasi</button>
                                            </li>
                                        
                                                </ul>
                                                <div class="tab-content" id="pills-tabContent">
                                            <div class="tab-pane fade active show" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
                                            <div class="card" >                                           
											 <div class="box-body">
											<div class="example-container">
                                            <div class="example-content">
											<div class="alert alert-custom" role="alert">
                                                    <div class="custom-alert-icon icon-dark"><img src="<?= $homeurl ?>/dist/img/logohome.png"></i></div>
                                                    <div class="alert-content">
                                                        <span class="alert-text" style="text-align:justify"> Mode ini untuk memilih model Aplikasi dan Pendaftaran Sekolah yang tergabung. Jika pilih MANUAL maka diinput pada Menu Users - Akun Proktor Sekolah</span>
                                                    </div>
                                                </div>
                                               <form id="formujian">
                                                  
													  <div class="row mb-2">
													<label  class="col-md-4 col-form-label bold">Model Registrasi</label>
													<div class="col-md-8">
                                                       <select class="form-select" name="apk" required="true">
														<option value="<?= $menu['aplikasi'] ?>"><?= $apk ?></option>
														<option value="">Pilih Model Aplikasi</option>
														<option value="0">ADMINISTRASI SEKOLAH</option>
														<option value="1">UNTUK UJIAN BERSAMA</option>
													</select>
                                                    </div>
													</div>
													
													<p>
													<div class="right">
													
                                                   <button type="submit" class="btn btn-outline-primary"><i class="fa fa-check-circle"></i>Simpan</button>
													
                                                    </div>
													<br><br>
                                            </div>
                                          </form >
                                        </div>
                                         </div>
										   
											  <script>
										$('#formujian').submit(function(e){
										e.preventDefault();
										var data = new FormData(this);
										$.ajax(
										{
											type: 'POST',
											url: 'sandik_ujian/crud.php?pg=edit_aplikasi',
											enctype: 'multipart/form-data',
											data: data,
											cache: false,
											contentType: false,
											processData: false,
											success: function(data){   		
												iziToast.info(
												{
													title: 'Sukses!',
													message: 'Data berhasil disimpan',
													titleColor: '#FFFF00',
													messageColor: '#fff',
													backgroundColor: 'rgba(0, 0, 0, 0.5)',
													 progressBarColor: '#FFFF00',
													  position: 'topRight'
												});
												setTimeout(function()
												{
													window.location.reload();
												}, 2000);
											  
											}
										});
										return false;
									});
									</script>	
													 
                                  
									<?php } ?>