1 Star 0 Fork 10

cty901 / 人人商城_3.28

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.php 1.56 KB
一键复制 编辑 原始数据 按行查看 历史
冷月 提交于 2021-04-01 15:56 . .
<?php
/**
* [WeEngine System] Copyright (c) 2014 WE7.CC
* WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ 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;
}
$pc_bind = pdo_get('uni_settings', array('bind_domain IN ' => array('http://' . $host, 'https://' . $host), 'default_module <>' => ''), array('uniacid', 'default_module', 'bind_domain'));
if (!empty($pc_bind)) {
$account_type = pdo_getcolumn('account', array('uniacid' => $pc_bind['uniacid']), 'type');
if ($account_type == ACCOUNT_TYPE_WEBAPP_NORMAL) {
$_W['uniacid'] = $pc_bind['uniacid'];
$_W['account'] = array('type' => $account_type);
$url = module_app_entries($pc_bind['default_module'], array('cover'));
header('Location: ' . $pc_bind['bind_domain'] . '/app/' . $url['cover'][0]['url']);
exit;
}
}
}
if($_W['os'] == 'mobile' && (!empty($_GPC['i']) || !empty($_SERVER['QUERY_STRING']))) {
header('Location: ' . $_W['siteroot'] . 'app/index.php?' . $_SERVER['QUERY_STRING']);
} else {
if (!empty($_SERVER['QUERY_STRING'])) {
header('Location: ' . $_W['siteroot'] . 'web/index.php?' . $_SERVER['QUERY_STRING']);
} else {
header('Location: ' . $_W['siteroot'] . 'web/home.php');
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/cty901/ewei_shop_328.git
git@gitee.com:cty901/ewei_shop_328.git
cty901
ewei_shop_328
人人商城_3.28
master

搜索帮助