-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.php
executable file
·47 lines (37 loc) · 870 Bytes
/
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
<?php
//MarkNote 轻量级云记事本系统
error_reporting(E_ALL);
ini_set('display_errors', '1');
if( !file_exists('config.php') ){
header("Location: include/install.php");
exit();
}
require 'include/user.php';
if( isset($_GET['type']) ){
$type = $_GET['type'];
}else{
$type = 'home';
}
// echo 'index.php<br/>type='.$type.'<br/>';
if( $type == 'user' ){
// echo 'load '.$type.' page ---> ';
require 'user.php';
}
if( $type == 'notebook' ){
// echo 'load '.$type.' page ---> ';
require 'notebook.php';
}
if( $type == 'note' ){
// echo 'load '.$type.' page ---> ';
require 'note.php';
}
if( $type == 'home' ){
if(hasLogin()){
// echo 'load '.$type.' page ---> ';
require 'edit.php';
}
else{
// echo 'load '.$type.' page ---> ';
require 'login.php';
}
}