main.php 1.41 KB
<html>
<meta charset="UTF-8">
<?php
session_start();
if($_SESSION['languge'] != ""){
	include('lang/'.$_SESSION['languge'].".php");
}else{
	include('lang/en.php');
}
if($_SESSION['account'] != "" && $_SESSION['password'] != ""){
	include('view/header.html');
	
	switch($_GET['item']){
	
	case "config":
		if($_GET['lang'] != ""){
			$_SESSION['languge'] = $_GET['lang'];
			include('lang/'.$_SESSION['languge'].".php");
			echo "<script>location.href='main.php?item=config';</script>";
		}
		include('view/config.php');
	break;
	
	case "edit_passwd":
		include('view/edit_passwd.html');
	break;
	
	case "edit_ntp":
		include('view/edit_ntp.html');
	break;
	
	case "edit_network":
		include('view/edit_network.html');
	break;
	
	case "edit_dns":
		include('view/edit_dns.html');
	break;
	
	case "edit_status":
		include('view/edit_status.html');
	break;
	
	case "edit_information":
		include('view/edit_information.html');
	break;
	
	case "edit_mems":
		if($_SESSION['account'] == 'sanlien'){
			include('view/edit_mems.html');
		}
	break;
	
	case "file":
		include('view/edit_file.html');
	break;
	
	case "real_time":
		include('wave/socket_main.php');
	break;
	
        case "log":
                include('view/log.html');
        break;

        case "rec":
                include('view/rec.html');
        break;

	default:
		include('view/config.php');
	break;
	}
	
}else{
	echo "<script>location.href = 'index.php'</script>";
}
?>
</html>