1 Star 4 Fork 1

白菜酱 / BigView

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.php 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
白菜酱 提交于 2014-08-22 16:41 . open to public
<?php
define("IN_ACE", true);
require_once "includes/init.inc.php";
function is_mobile() {
$regex_match="/(nokia|iphone|ipad|android|motorola|^mot\-|softbank|foma|docomo|kddi|up\.browser|up\.link|"
. "htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|"
. "blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam\-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|"
. "symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte\-|longcos|pantech|gionee|^sie\-|portalmmm|"
. "jig\s browser|hiptop|^ucweb|^benq|haier|^lct|opera\s*mobi|opera\*mini|320x320|240x320|176x220"
. ")/i";
return isset($_SERVER['HTTP_X_WAP_PROFILE']) || isset($_SERVER['HTTP_PROFILE']) || preg_match($regex_match, strtolower($_SERVER['HTTP_USER_AGENT']));
}
if (is_mobile()) {
header("Location: ./mobile/index.php");
}
function alertAndBack($content) {
echo "<script>alert('" . $content . "');window.top.history.go(-1);</script>";
die();
}
$page = isset($_GET['page']) ? $_GET['page'] : "entrance";
$pages = array("admin", "ajax", "delfile", "logout", "manchart", "manfile", "run", "transfer", "upload", "users");
if (
(in_array($page, $pages) && $aceman->is_login()) ||
($page == "entrance" || $page =="login")
)
require_once $page . ".php";
else
echo "Forbidden.";
?>
PHP
1
https://gitee.com/xm1994/BigView.git
git@gitee.com:xm1994/BigView.git
xm1994
BigView
BigView
master

搜索帮助