8 Star 9 Fork 16

微擎 / 微擎单公众号版

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
index.php 1.33 KB
Copy Edit Web IDE Raw Blame History
brjun authored 2019-06-11 15:02 . 更新 index.php
<?php
/**
* [WeEngine System] Copyright (c) 2013 WE7.CC
* $sn: pro/index.php : v 815cdc81ea88 : 2015/08/29 09:40:39 : RenChao $
*/
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: ./app/index.php?' . $_SERVER['QUERY_STRING']);
} else {
header('Location: ./web/index.php?' . $_SERVER['QUERY_STRING']);
}

Comment ( 0 )

Sign in for post a comment

PHP
1
https://gitee.com/we7coreteam/prol.git
git@gitee.com:we7coreteam/prol.git
we7coreteam
prol
微擎单公众号版
master

Search