<?php
defined('APK') or exit('Anda tidak dizinkan mengakses langsung script ini!');
$akm = mysqli_num_rows(mysqli_query($koneksi, "SELECT * FROM banksoal WHERE model='1'"));
$cbt = mysqli_num_rows(mysqli_query($koneksi, "SELECT * FROM banksoal WHERE model='0'"));
$jsis = mysqli_num_rows(mysqli_query($koneksi, "SELECT * FROM siswa WHERE no_peserta<>''"));
$jlaki = mysqli_num_rows(mysqli_query($koneksi, "SELECT * FROM siswa WHERE jk='Laki-laki' AND no_peserta<>''"));
$jper = mysqli_num_rows(mysqli_query($koneksi, "SELECT * FROM siswa WHERE jk='Perempuan' AND no_peserta<>''"));
$jwa = mysqli_num_rows(mysqli_query($koneksi, "SELECT * FROM siswa WHERE nowa<>'' AND no_peserta<>''"));
?>

					 <div class="row">
							 <div class="col-md-4">
                               <div class="x_panel">
								<div class="x_title">
									<h2>SOAL AKM </h2>
									<?php if($akm==0): ?>
									 <a href="#" class="btn btn-sm btn-secondary pull-right" data-toggle="tooltip" data-placement="top" title="Soal Kosong" disabled><i class="fa fa-check"></i> Pilih</a>
									<?php else: ?>
									 <a href="?pg=nakm" class="btn btn-sm btn-primary pull-right"><i class="fa fa-check"></i> Pilih</a>
									<?php endif; ?>
									<div class="clearfix"></div>
										</div>
											<div class="x_content"> 
												<div class="flex">
												  <ul class="list-inline widget_profile_box">
													<li>
													  <a>
														<i class="fa fa-edit"></i>
													  </a>
													</li>
													<li>
													  <img src="images/buku.png" alt="..." class="img-circle profile_img">
													</li>
													<li>
													  
													</li>
												  </ul>
												</div>
			                                    <br>
												<h2 class="text-center">NILAI AKM<br><small>JADWAL UJIAN <?= $akm ?>  </small></h2>   
               
									</div>
								</div>
							</div>
							<div class="col-md-5">
                               <div class="x_panel">
								<div class="x_title">
									<h2>SOAL NON AKM </h2>
									<?php if($cbt==0): ?>
									 <a href="#" class="btn btn-sm btn-secondary pull-right" data-toggle="tooltip" data-placement="top" title="Soal Kosong" disabled><i class="fa fa-check"></i> Pilih</a>
									<?php else: ?>
									 <a href="?pg=ncbt" class="btn btn-sm btn-primary pull-right"><i class="fa fa-check"></i> Pilih</a>
									 <?php endif; ?>
									<div class="clearfix"></div>
										</div>
											<div class="x_content"> 
												<div class="flex">
												  <ul class="list-inline widget_profile_box">
													<li>
													  <a>
														<i class="fa fa-edit"></i>
													  </a>
													</li>
													<li>
													  <img src="images/buku.png" alt="..." class="img-circle profile_img">
													</li>
													<li>
													  
													</li>
												  </ul>
												</div>
			                                    <br>
												<h2 class="text-center">NILAI NON AKM<br><small>JADWAL UJIAN <?= $cbt ?>  </small></h2>   
               
									</div>
								</div>
							</div>
							<div class="col-md-3   widget widget_tally_box">
                        <div class="x_panel fixed_height_390">
                          <div class="x_title">
                            <h2>Peserta Ujian</h2>
                            
                            <div class="clearfix"></div>
                          </div>
                          <div class="x_content">

                            <div style="text-align: center; margin-bottom: 17px">
                              <ul class="verticle_bars list-inline" style="display: flex;">
                                <li>
                                  <div class="progress vertical progress_wide bottom">
                                    <div class="progress-bar progress-bar-dark" role="progressbar" data-transitiongoal="<?= $jlaki ?>"></div>
                                  </div>
                                </li>
                                <li>
                                  <div class="progress vertical progress_wide bottom">
                                    <div class="progress-bar progress-bar-gray" role="progressbar" data-transitiongoal="<?= $jper  ?>"></div>
                                  </div>
                                </li>
                                <li>
                                  <div class="progress vertical progress_wide bottom">
                                    <div class="progress-bar progress-bar-info" role="progressbar" data-transitiongoal="<?= $jwa ?>"></div>
                                  </div>
                                </li>
                                <li>
                                  <div class="progress vertical progress_wide bottom">
                                    <div class="progress-bar progress-bar-success" role="progressbar" data-transitiongoal="<?= $jsis ?>"></div>
                                  </div>
                                </li>
                              </ul>
                            </div>
                            <div class="divider"></div>

                            <ul class="legend list-unstyled">
                              <li>
                                <p>
                                  <span class="icon"><i class="fa fa-square dark"></i></span> <span class="name">Laki-laki</span>
                                </p>
								<span class="pull-right"><?= $jlaki ?></span>
                              </li>
                              <li>
                                <p>
                                  <span class="icon"><i class="fa fa-square grey"></i></span> <span class="name">Perempuan</span>
                                </p>
								<span class="pull-right"><?= $jper ?></span>
                              </li>
                              <li>
                                <p>
                                  <span class="icon"><i class="fa fa-square blue"></i></span> <span class="name">Pengguna Whatapps</span>
                                </p>
								<span class="pull-right"><?= $jwa ?></span>
                              </li>
                              <li>
                                <p>
                                  <span class="icon"><i class="fa fa-square green"></i></span> <span class="name">Total Siswa</span>
                                </p>
								<span class="pull-right"><?= $jsis ?></span>
                              </li>
                            </ul>

                          </div>
                        </div>
                      </div>
			            </div>

							
