-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathindex.php
37 lines (32 loc) · 1.03 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
<?php
if (version_compare(PHP_VERSION, '7.4.0', '<')) {
die('require PHP >= 7.4 !');
}
include("./includes/common.php");
if(isset($_GET['doc'])){
$doc = trim($_GET['doc']);
if(!$conf['apiurl'])$conf['apiurl'] = $siteurl;
$loadfile = \lib\Template::loadDoc($doc);
include $loadfile;
exit;
}
$mod = isset($_GET['mod'])?$_GET['mod']:'index';
if(isset($_GET['invite'])){
$invite_code = trim($_GET['invite']);
$uid = get_invite_uid($invite_code);
if($uid && is_numeric($uid)){
$_SESSION['invite_uid'] = intval($uid);
}
}
if($mod=='index'){
if($conf['homepage']==2){
echo '<html><frameset framespacing="0" border="0" rows="0" frameborder="0">
<frame name="main" src="'.$conf['homepage_url'].'" scrolling="auto" noresize>
</frameset></html>';
exit;
}elseif($conf['homepage']==1){
exit("<script language='javascript'>window.location.href='/user/';</script>");
}
}
$loadfile = \lib\Template::load($mod);
include $loadfile;