人人商城

home.ctrl.php 1.0KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. load()->model('xzapp');
  7. load()->model('account');
  8. $do = safe_gpc_belong($do, array('display'), 'display');
  9. if ($do == 'display') {
  10. $last_uniacid = uni_account_last_switch();
  11. if (empty($last_uniacid)) {
  12. itoast('', url('account/display', array('type' => XZAPP_TYPE_SIGN)), 'info');
  13. }
  14. if (!empty($last_uniacid) && $last_uniacid != $_W['uniacid']) {
  15. uni_account_switch($last_uniacid, url('xzapp/home'), XZAPP_TYPE_SIGN);
  16. }
  17. $account = uni_fetch($last_uniacid);
  18. $modulelist = uni_modules(false);
  19. if (!empty($modulelist)) {
  20. foreach ($modulelist as $name => &$row) {
  21. if (!empty($row['issystem']) || $row['xzapp_support'] != 2 || (!empty($_GPC['keyword']) && !strexists($row['title'], $_GPC['keyword'])) || (!empty($_GPC['letter']) && $row['title_initial'] != $_GPC['letter'])) {
  22. unset($modulelist[$name]);
  23. continue;
  24. }
  25. }
  26. $modules = $modulelist;
  27. }
  28. template('xzapp/home');
  29. }