-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
136 lines (105 loc) · 3.9 KB
/
index.php
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
// require "login/loginheader.php";
// require "config/db_config.php";
// require "config/global_config.php";
session_start();
if (isset($_SESSION['login']))
{
// logged_in_msg($username);
}
else {
header('Location: login.php');
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ServerMail</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- <script src="config/config.js"></script>
<script src="vmmain.js"></script> -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<style type="text/css">
.header-bar {}
</style>
</head>
<body>
<div class="container">
<div class="page-header">
<h1><span class="text-success">ServerMail</span></h1>
</div>
<div class="content">
<div class="row header-bar">
<div class="col-sm-9"></div>
<div class="col-sm-2"><a href="login.php?logout=1" class="btn btn-info btn-block">Logout</a></div>
<div class="col-sm-1"></div>
</div>
<!-- end title and log out -->
<div class="row"> <!-- page start -->
<div class="col-sm-3"> <!-- navigation bar -->
<div class="list-group btn-lg" style="padding : 10% 0 0 0;">
<a id="mail-page-nav-btn" href="#" class="nav-btn list-group-item">Password and Emails</a>
<a id="alias-page-nav-btn" href="#" class="nav-btn list-group-item">Alias</a>
<a id="domain-page-nav-btn" href="#" class="nav-btn list-group-item">Domain</a>
<!-- <a id="domain-page-nav-btn" href="#" class="nav-btn list-group-item">domain</a> -->
</div> <!--end naviation -->
</div> <!-- end left column -->
<div class="col-sm-9"> <!-- start right column -->
<div id="right-area">
</div>
</div> <!-- end right column -->
</div> <!-- page end -->
</div> <!-- end container -->
</div>
</body>
</html>
<script>
// var loading_div = $("#loading-div");
// var building_div = $("#building-div");
// loading_div.hide();
// building_div.hide();
$("#mail-page-nav-btn").click(function(){
var me = $(this);
$(".list-group-item").removeClass("active");
me.addClass("active");
var url = "mail.php";
nav_item_click(me, url);
});
$("#alias-page-nav-btn").click(function(){
var me = $(this);
$(".list-group-item").removeClass("active");
me.addClass("active");
var url = "alias.php";
nav_item_click(me, url);
});
$("#domain-page-nav-btn").click(function(){
var me = $(this);
$(".list-group-item").removeClass("active");
me.addClass("active");
var url = "domain.php";
nav_item_click(me, url);
});
var right_area = $("#right-area");
function nav_item_click(obj,url)
{
$.ajax({
url: url,
type: "get",
success: function(data){
right_area.html(data);
}
});
}
$.ajax({
url: "mail.php",
type: "get",
success: function(data){
right_area.html(data);
}
});
</script>