<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>Admin Web</title>

		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

		<!-- bootstrap & fontawesome -->
		<link rel="stylesheet" href="view/assets/assets/css/bootstrap.min.css" />
		<link rel="stylesheet" href="view/assets/assets/font-awesome/4.5.0/css/font-awesome.min.css" />

		<!-- Form Css -->
		<link rel="stylesheet" href="view/assets/assets/css/jquery-ui.custom.min.css" />
		<link rel="stylesheet" href="view/assets/assets/css/chosen.min.css" />
		<link rel="stylesheet" href="view/assets/assets/css/bootstrap-datepicker3.min.css" />
		<link rel="stylesheet" href="view/assets/assets/css/bootstrap-timepicker.min.css" />
		<link rel="stylesheet" href="view/assets/assets/css/daterangepicker.min.css" />
		<link rel="stylesheet" href="view/assets/assets/css/bootstrap-datetimepicker.min.css" />
		<link rel="stylesheet" href="view/assets/assets/css/bootstrap-colorpicker.min.css" />

		<!-- text fonts -->
		<link rel="stylesheet" href="view/assets/assets/css/fonts.googleapis.com.css" />

		<!-- ace styles -->
		<link rel="stylesheet" href="view/assets/assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />

		<!--[if lte IE 9]>
			<link rel="stylesheet" href="assets/css/ace-part2.min.css" class="ace-main-stylesheet" />
		<![endif]-->
		<link rel="stylesheet" href="view/assets/assets/css/ace-skins.min.css" />
		<link rel="stylesheet" href="view/assets/assets/css/ace-rtl.min.css" />

		<!--[if lte IE 9]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->
		<script src="view/assets/assets/js/ace-extra.min.js"></script>

		<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

		<!--[if lte IE 8]>
		<script src="assets/js/html5shiv.min.js"></script>
		<script src="assets/js/respond.min.js"></script>
		<![endif]-->
	</head>

	<body class="no-skin">
                <?php
                        $db = new database();
                        $db->dbsql();
                        
                        $user = new viewuser();
                        $user->id = $_SESSION[id];
                        $u = $user->user();
                ?>
		<div id="navbar" class="navbar navbar-default          ace-save-state">
			<div class="navbar-container ace-save-state" id="navbar-container">
				<button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler" data-target="#sidebar">
					<span class="sr-only">Toggle sidebar</span>

					<span class="icon-bar"></span>

					<span class="icon-bar"></span>

					<span class="icon-bar"></span>
				</button>

				<div class="navbar-header pull-left">
					<a href="index.html" class="navbar-brand">
						<small>
							Rumah Sakit Wiyung Sejahtera
						</small>
					</a>
				</div>

				<div class="navbar-buttons navbar-header pull-right" role="navigation">
					<ul class="nav ace-nav">
						

						

						

						<li class="light-blue dropdown-modal">
							<a data-toggle="dropdown" href="#" class="dropdown-toggle">
								<span class="user-info">
									<small>Selamat Datang</small>
								</span>

								<i class="ace-icon fa fa-caret-down"></i>
							</a>

							<ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
								<li>
									<a href="view/view/modul/mod_aksi/aksi.php?aksi=logout">
										<i class="ace-icon fa fa-power-off"></i>
										Logout
									</a>
								</li>
							</ul>
						</li>
					</ul>
				</div>
			</div><!-- /.navbar-container -->
		</div>

		<div class="main-container ace-save-state" id="main-container">
			<script type="text/javascript">
				try{ace.settings.loadState('main-container')}catch(e){}
			</script>

			<div id="sidebar" class="sidebar                  responsive                    ace-save-state">
				<script type="text/javascript">
					try{ace.settings.loadState('sidebar')}catch(e){}
				</script>


				<ul class="nav nav-list">
                                        <?php
                                            $menu = new viewmenu();
                                            $m = $menu->menu($_SESSION[status],$_SESSION[level],$_SESSION[username]);

                                            while($i<count($m)){
                                        ?>
                                                <li class="">
                                                        <a href="#" class="dropdown-toggle">
                                                                <i class="menu-icon fa fa-tachometer"></i>
                                                                <span class="menu-text"> <?php echo"".$m[$i][nama].""; ?> </span>
                                                                
                                                                <b class="arrow fa fa-angle-down"></b>
                                                        </a>

                                                        <b class="arrow"></b>

                                                        <ul class="submenu">
                                                            <?php
                                                                $s = $menu->submenu($m[$i][id],$_SESSION[level],$_SESSION[username],$_SESSION[status]);

                                                                while($n<count($s)){
                                                            ?>
                                                                <li class="">
                                                                        <a href="<?php echo"".$s[$n][link].""; ?>">
                                                                                <i class="menu-icon fa fa-caret-right"></i>
                                                                                <?php echo"".$s[$n][nama].""; ?>
                                                                        </a>

                                                                        <b class="arrow"></b>
                                                                </li>
                                                            <?php
                                                                $n++; 
                                                            }
                                                            unset($n);
                                                            ?>  	
                                                        </ul>
                                                </li>
                                        <?php
                                        $i++;
                                        }
                                        ?>
				</ul><!-- /.nav-list -->

				<div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
					<i id="sidebar-toggle-icon" class="ace-icon fa fa-angle-double-left ace-save-state" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
				</div>
			</div>

			<div class="main-content">
				<div class="main-content-inner">
					<div class="breadcrumbs ace-save-state" id="breadcrumbs">
						<div class="nav-search" id="nav-search">
							<form class="form-search">
								<span class="input-icon">
									<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
									<i class="ace-icon fa fa-search nav-search-icon"></i>
								</span>
							</form>
						</div><!-- /.nav-search -->
					</div>