forked from shidec/line_bot_framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
47 lines (41 loc) · 1.09 KB
/
page.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
<?php
if(!file_exists('includes/config.php')){
header('Location: install.php');
exit;
}
session_start();
if(!isset($_SESSION['logged']) || !$_SESSION['logged']){
header('Location: index.php');
}
$p = isset($_GET['p']) ? $_GET['p'] : 'followers';
$pages = array('followers', 'editor', 'emulator','setting');
require_once 'includes/config.php';
require_once 'includes/helper.php';
require_once 'classes/Database.php';
require_once 'classes/Option.php';
?>
<html>
<head>
<title>Bot Framework - <?php echo ucfirst($p); ?></title>
<link rel="stylesheet" href="assets/css/style.css">
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
</head>
<body>
<div id="nav">
<?php
foreach($pages as $pg){
if($p == $pg){
echo ucfirst($pg) . ' | ';
}else{
echo '<a href="page.php?p=' . $pg . '">' . ucfirst($pg) . '</a> | ';
}
}
?>
<a href="command.php?a=logout">Logout</a>
</div>
<div id="content"><br/>
<?php include_once 'pages/' . $p . '.php'; ?>
</div>
</body>
</html>