<?php include "../../includes/start_ajax.php";

?>

<?php
echo "<div style='width:100%;height:60px;margin:0px;background:#1fbad6;border-bottom:5px solid #c0c0c8;'>";
	
	
	
	
	echo "<div style='float:left;height:50px;margin:20px;font-size:20px;color:#fff;border:0px solid #ff0000;'>";
		echo "Welcome ".$CurrentUserFullName."!";
	echo "</div>";

	
	echo "<div style='float:right;height:50px;width:50%;margin:20px;border:0px solid #ff0000;overflow:hidden;'>";
		
		/*	
		$query_user="select * from t_".$key_table_prefix."_user 
				where not usr_last_login_date is null
				order by usr_last_login_date desc ";
		$result_user = mysqli_query($dbconn,$query_user);
		while($line_user = mysqli_fetch_array($result_user,MYSQLI_ASSOC))			
		{
			  
			  echo "<div style='float:left; width:100px;height:40px;text-align:center;'>";
					  echo "<span class='fa fa-user fa-2x' style=''></span> ";
			   
					   
					  
					  echo "<br>";
					  echo "<font size=1><b>".$line_user["usr_full_name"]."</b></font>";
					  echo "<br><font size=1 color=#95A5A6 >".$line_user["usr_last_login_date"]."</font><br>";
			echo "</div>";
			  
		}
		*/
		
	echo "</div>";
	
	
	
echo "</div>";

echo "<div style='width:100%;height:100%;margin:0px;'>";

	echo "<div style='width:80px;margin:0px;background:#222233;float:left;min-height:1000px;height:100%;position:absolute;'>";
		
		if($_REQUEST["homemenu"]!="")
		{
			$_SESSION["homemenu"] = $_REQUEST["homemenu"];
		}
		if($_SESSION["homemenu"]=="")
		{
			$_SESSION["homemenu"]="DASHBOARD";
			
		}
		
		
		$dashboard_menu["DASHBOARD"]="Dashboard";
		$dashboard_menu["TREND"]="Trend";
		$dashboard_menu["RANK"]="Rank";
		$dashboard_menu["MAP"]="Map";
		//$dashboard_menu["DEVICE"]="Devices";
		
		$dashboard_icon["DASHBOARD"]="fa-pie-chart";
		$dashboard_icon["TREND"]="fa-line-chart";
		$dashboard_icon["RANK"]="fa-sort-amount-desc";
		$dashboard_icon["MAP"]="fa-map";
		//$dashboard_icon["DEVICE"]="fa-mobile";
		
		
		foreach($dashboard_menu as $menu_key => $menu_value)
		{
			echo "<div style='background:#09091a;width:60px;height:60px;margin:2px;padding:8px;cursor:pointer;' onclick=\"mon_send_get('mod/welcome/index.php','?homemenu=".$menu_key."','div_main')\">";
				echo "<br><span class='fa ".$dashboard_icon[$menu_key]." fa-2x' style='color:#fff;margin:5px;'></span><br>";
				echo "<font color=#fff >".$menu_value."</font>";
			echo "</div>";	
			
		}
		
		
		
				

	echo "</div>";


	echo "<div style='width:100%;height:100%;min-height:1000px;border:0px solid #ff0000;'>";
		
		if($_SESSION["homemenu"]=="DASHBOARD")
		{
			
			echo "<div style='float:right;width:calc(100% - 80px);height:100%;'>";
				include "menu_dashboard.php";
			echo "<div>";
		}
		
		if($_SESSION["homemenu"]=="TREND")
		{
			
			echo "<div style='float:right;width:calc(100% - 80px);height:100%;'>";
				include "menu_trend.php";
			echo "<div>";
		}
		
		if($_SESSION["homemenu"]=="RANK")
		{
			
			echo "<div style='float:right;width:calc(100% - 80px);height:100%;'>";
				include "menu_rank.php";
			echo "<div>";
		}
		
		
		
		if($_SESSION["homemenu"]=="MAP")
		{
			echo "<iframe src='map.php' frameborder=0 style='float:right;width:calc(100% - 80px);height:100%;'>";
			echo "</iframe>";
		}
		
		
		
		if($_SESSION["homemenu"]=="DEVICE")
		{
			echo "<div style='float:right;width:calc(100% - 80px);height:100%;'>";
				include "menu_device.php";
			echo "<div>";
		}
		
	
		
	echo "</div>";
	
	
echo "</div>";





?>
	
<?php include "../../includes/end_ajax.php";

?>