-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
39 lines (21 loc) · 908 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
<?php
/**
* [yushunbox System] Copyright (c) 2014 yushunbox.com
* yushunbox is NOT a free software, it under the license terms, visited http://www.yushunbox.com/ for more details.
*/
require './framework/bootstrap.inc.php';
$host = $_SERVER['HTTP_HOST'];
if (!empty($host)) {
$bindhost = pdo_fetch("SELECT * FROM ".tablename('site_multi')." WHERE bindhost = :bindhost", array(':bindhost' => $host));
if (!empty($bindhost)) {
header("Location: ". $_W['siteroot'] . 'app/index.php?i='.$bindhost['uniacid'].'&t='.$bindhost['id']);
exit;
}
}
if($_W['os'] == 'mobile' && (!empty($_GPC['i']) || !empty($_SERVER['QUERY_STRING']))) {
//header('Location: ./app/index.php?' . $_SERVER['QUERY_STRING']);
header('Location: ./web/index.php?c=user&a=login&');
} else {
//header('Location: ./web/index.php?' . $_SERVER['QUERY_STRING']);
header('Location: ./web/index.php?c=user&a=login&');
}