Blame view

main.php 1.41 KB
cf76164e6   Ting Chan   20190709
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
  <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>