index.php 600 B

1234567891011121314151617
  1. <?php
  2. require './framework/bootstrap.inc.php';
  3. $host = $_SERVER['HTTP_HOST'];
  4. if (!empty($host)) {
  5. $bindhost = pdo_fetch("SELECT * FROM ".tablename('site_multi')." WHERE bindhost = :bindhost", array(':bindhost' => $host));
  6. if (!empty($bindhost)) {
  7. header("Location: ". $_W['siteroot'] . 'app/index.php?i='.$bindhost['uniacid'].'&t='.$bindhost['id']);
  8. exit;
  9. }
  10. }
  11. if($_W['os'] == 'mobile' && (!empty($_GPC['i']) || !empty($_SERVER['QUERY_STRING']))) {
  12. header('Location: ./app/index.php?' . $_SERVER['QUERY_STRING']);
  13. } else {
  14. header('Location: ./web/index.php?' . $_SERVER['QUERY_STRING']);
  15. }