<div id="bgaccmenu" class="clearfix">	
	<div id="roaccmenu">
		<button class="accordion">
			<span class="accmenutit">Pengaturan</span>
		</button>
		<div class="panel">
			<span class="accmenudes">
				<ul>
					<a href="?m=metadata_index"><li>Metadata</li></a>
					<a href="?m=logo_index"><li>Logo</li></a>
				</ul>
			</span>
		</div>
	</div>
	<div id="roaccmenu">
		<button class="accordion">
			<span class="accmenutit">User</span>
		</button>
		<div class="panel">
			<span class="accmenudes">
				<ul>
					<a href="?m=admin_index"><li>Admin</li></a>
					<a href="?m=admincat_index"><li>Admin Level</li></a>
				</ul>
			</span>
		</div>
	</div>
	<div id="roaccmenu">
		<button class="accordion">
			<span class="accmenutit">Menus</span>
		</button>
		<div class="panel">
			<span class="accmenudes">
				<ul>
					<a href="?m=menu_index"><li>Menu</li></a>
					<a href="?m=menucat_index"><li>Menu Kategori</li></a>
				</ul>
			</span>
		</div>
	</div>
	<div id="roaccmenu">
		<button class="accordion">
			<span class="accmenutit">Modules</span>
		</button>
		<div class="panel">
			<span class="accmenudes">
				<ul>
					<a href="?m=slideshow_index"><li>Slideshow</li></a>
					<a href="?m=banner_index"><li>Banner</li></a>
					<a href="?m=bannerkat_index"><li>Banner Kategori</li></a>
				</ul>
			</span>
		</div>
	</div>
	<div id="roaccmenu">
		<button class="accordion">
			<span class="accmenutit">Konten</span>
		</button>
		<div class="panel">
			<span class="accmenudes">
				<ul>
					<a href="?m=kontenkat_index"><li>Konten Kategori</li></a>
					<?php
						$kdb = mysqli_query($koneksi, "SELECT * FROM cmas_kontenkat WHERE kontenkat_status='Aktif' ORDER BY kontenkat_id ASC");
						while($kdt  = mysqli_fetch_array($kdb)) {
					?>
						<a href="?m=konten_indexkat&id=<?php echo $kdt['kontenkat_id']; ?>"><li><?php echo $kdt['kontenkat_judul']; ?></li></a>
					<?php } ?>
				</ul>
			</span>
		</div>
	</div>
	<div id="roaccmenu">
		<button class="accordion">
			<span class="accmenutit">Paket</span>
		</button>
		<div class="panel">
			<span class="accmenudes">
				<ul>
					<a href="?m=paket_index"><li>Paket</li></a>
					<a href="?m=paketkat_index"><li>Paket Kategori</li></a>
				</ul>
			</span>
		</div>
	</div>
	<div id="roaccmenu">
		<button class="accordion">
			<span class="accmenutit">Inbox</span>
		</button>
		<div class="panel">
			<span class="accmenudes">
				<ul>
					<a href="?m=pesan_index">
						<li>
							Inbox
							<?php
								$mdb = mysqli_query($koneksi, "SELECT COUNT(pesan_id) AS NewMail FROM cmas_pesan WHERE pesan_status='1'");
								$mdt = mysqli_fetch_array($mdb);
								echo "(".$mdt['NewMail'].")";
							?>
						</li>
					</a>
				</ul>
			</span>
		</div>
	</div>
	<div id="roaccmenu">
		<button class="accordion">
			<span class="accmenutit">History</span>
		</button>
		<div class="panel">
			<span class="accmenudes">
				<ul>
					<a href="?m=notification_index">
						<li>
							Notifications
							<?php
								$ndb = mysqli_query($koneksi, "SELECT COUNT(notification_id) AS Unread FROM cmas_notification WHERE notification_read='1'");
								$ndt = mysqli_fetch_array($ndb);
								echo "(".$ndt['Unread'].")";
							?>
						</li>
					</a>
					<a href="?m=visitor_index">
						<li>
							Visitor
							<?php
								$vdb = mysqli_query($koneksi, "SELECT COUNT(visitor_id) AS NewVisitor FROM cmas_visitor WHERE visitor_status='1'");
								$vdt = mysqli_fetch_array($vdb);
								echo "(".$vdt['NewVisitor'].")";
							?>
						</li>
					</a>
				</ul>
			</span>
		</div>
	</div>
	<script>
		var acc = document.getElementsByClassName("accordion");
		var i;

		for (i = 0; i < acc.length; i++) {
		  acc[i].addEventListener("click", function() {
			this.classList.toggle("active");
			var panel = this.nextElementSibling;
			if (panel.style.display === "block") {
			  panel.style.display = "none";
			} else {
			  panel.style.display = "block";
			}
		  });
		}
	</script>
</div>