<?php
require("../config/koneksi.php");
require("../config/apk.php");
require("../config/function.php");
require("../config/crud.php");

(isset($_SESSION['id_user'])) ? $id_user = $_SESSION['id_user'] : $id_user = 0;
($id_user == 0) ? header('location:sign-in.php') : null;
$user = mysqli_fetch_array(mysqli_query($koneksi, "SELECT * FROM users  WHERE id_user='$id_user'"));
(isset($_GET['pg'])) ? $pg = $_GET['pg'] : $pg = '';
(isset($_GET['ac'])) ? $ac = $_GET['ac'] : $ac = '';
?>

<!DOCTYPE html>
<html lang="en">
<?php include"top.php"; ?>
<body>
<?php if ($pg == 'materi' OR $pg == 'tugas' OR $pg == 'nilaiakm') : ?>
  <div class="app menu-off-canvas align-content-stretch d-flex flex-wrap">
<?php else: ?>
    <div class="app align-content-stretch d-flex flex-wrap">
  <?php endif; ?>	     
	   <div class="app-sidebar" >

            <div class="logo">
                <a href="index.php" class="logo-icon">
				<img src="<?= $homeurl . '/' . $setting['logo'] ?>" height="30px">
				<span class="logo-text">SANDIK</span></a>
                <div class="sidebar-user-switcher user-activity-online">
                    <a href="#">
                         <?php if($user['foto']<>''){ ?>
									<img src="<?= $homeurl ?>/<?= $user['foto'] ?>" alt="" style="border-radius:50%"> 
									<?php }else{ ?>
									<img src="<?= $homeurl ?>/dist/img/guru.png" alt=""> 
									<?php } ?>
                        <span class="activity-indicator"></span>
                        <span class="user-info-text"><?= $user['nama'] ?><br><span class="user-state-info">Online</span></span>
                    </a>					
            </div>
		 </div>
            <?php include"sandik_rapor/menu.php"; ?>
			<?php include"navbar.php"; ?>
            <div class="app-content">
                <div class="content-wrapper">
                    <div class="container-fluid">
                      <?php include"sandik_rapor/pages.php"; ?>  
                       
                </div>
            </div>
        </div>
    </div>
<?php include"bottom.php"; ?>
 
</body>

</html>