<?php 
$slide = mysqli_fetch_array(mysqli_query($koneksi, "SELECT * FROM menu  WHERE id='1'"));
if($menu['elearn']=='0'){{$learn="Non Aktif";}}elseif($menu['elearn']=='1'){{$learn="Aktif";}}
if($menu['daring']=='0'){{$daring="Manual";}}elseif($menu['daring']=='1'){{$daring="Photo";}}
 ?>
<div class='row'>
         <div class="col-xl-4">
                                <div class="card widget widget-info">
                                    <div class="card-body">
                                        <div class="widget-info-container">
                                            <div class="widget-info-image" style="background: url('../dist/img/logo65.png')"></div>
                                            <h6 class="widget-info-title">NEW SANDIK</h6>
                                            <p class="widget-info-text"><b>SISTEM APLIKASI PENDIDIK</b><br>Multi Jenjang REGULER & PKBM <small> Created By STBC</small></p>
                                            <br> <br> <br> <br> <br>
                                        </div>
                                    </div>
                                </div>
								 </div>
						   <div class="col-md-4">  
				            <div class="card widget widget-stats">
                                    <div class="card-body">
                                        <div class="widget-stats-container d-flex">
                                            <div class="widget-stats-icon widget-stats-icon-primary">
                                               <img src="../dist/img/guru.png" width="45" class="success" alt="">
                                            </div>
                                            <div class="widget-stats-content flex-fill">
                                                <span class="widget-stats-info">Kepala Sekolah</span>
                                                <span class="widget-stats-info"><?= $setting['kepsek']; ?></span>
                                        
                                            </div>
                                           
                                        </div>
                                    </div>
                                </div>
								</div>
				            <div class="col-md-4">  
				                   <div class="card widget widget-stats">
                                    <div class="card-body">
                                        <div class="widget-stats-container d-flex">
                                            <div class="widget-stats-icon widget-stats-icon-primary">
                                              <img src="../dist/img/telegram.png" width="45" alt="">
                                            </div>
                                            <div class="widget-stats-content flex-fill">
                                                <span class="widget-stats-info">Telegram</span>
                                                <span class="widget-stats-info"><a href="https://t.me/+s4E-i6jIbLQzNzFl" target="_blank" class="btn btn-sm btn-link"><b>Telegram Group</b></a></span>
                                        
                                            </div>
                                            </div>
                                        </div>
                                    </div>
									</div>
									<div class="col-md-4"></div>
                        <div class='col-md-8' style="margin-top:-280px">
						   <div class="card">
							 <div class="card-header">	
								  <h5 class='card-title'>
								  <i class="fas fa-trash"></i> Hapus Data SKL</h5></div>   
                                       <div class="card-body">         
												<div class='checkbox'>
												 <form id='formhapusdata' action='' method='post'>
                                                      <b>Pilih Data</b><br />
                                                    <label><input type='checkbox' name='data[]' value='nilai_skl' /> Nilai SKL</label><br />
													<label><input type='checkbox' name='data[]' value='nilai_sku' /> Nilai SKU</label><br />
													<label><input type='checkbox' name='data[]' value='mapel_ijazah' /> Mapel Ijazah</label><br />
													<label><input type='checkbox' name='data[]' value='m_produktif' /> Master SKU</label><br />
													
													
                                                </div>
                                            </div>
											<div class="card-body">  
                                            <div class="row mb-1">
													<label  class="col-md-4 col-form-label bold">Password Admin</label>
													<div class="col-sm-8">
													<div class="input-group">
                                                    <input type='password' name='password' class='form-control' required='true' />
                                                <span class="input-group-btn">
												 <button type='submit' name='submit3' class='btn btn-outline-danger'><i class='fa fa-trash'></i> Reset</button>
												</span>
												</div>
                                               </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                        
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
 
    $('#formhapusdata').submit(function(e) {
        e.preventDefault();
        $.ajax({
            type: 'POST',
            url: 'pengaturan/crud_setting.php?pg=setting_clear',
            data: $(this).serialize(),
            success: function(data) {
                console.log(data);
                if (data == "ok") {
                     iziToast.info(
            {
                title: 'Sukses!',
                message: 'Data berhasil dihapus',
				titleColor: '#FFFF00',
				messageColor: '#fff',
				backgroundColor: 'rgba(0, 0, 0, 0.5)',
				 progressBarColor: '#FFFF00',
                  position: 'topRight'
                    });
					setTimeout(function() {
                        window.location.reload();
                    }, 2000);
                } else {
                    iziToast.error({
                        title: 'Maaf!',
                        message: data,
                        position: 'topRight'
                    });
                }

            }
        });
        return false;
    });
	
</script>