人人商城

display.ctrl.php 761B

1234567891011121314151617181920212223242526
  1. <?php
  2. defined('IN_IA') or exit('Access Denied');
  3. load()->model('phoneapp');
  4. load()->model('account');
  5. if ($do == 'home') {
  6. $last_uniacid = uni_account_last_switch();
  7. $url = url('account/display', array('type' => PHONEAPP_TYPE_SIGN));
  8. if (empty($last_uniacid)) {
  9. itoast('', $url, 'info');
  10. }
  11. if (!empty($last_uniacid) && $last_uniacid != $_W['uniacid']) {
  12. uni_account_switch($last_uniacid, '', PHONEAPP_TYPE_SIGN);
  13. }
  14. $permission = permission_account_user_role($_W['uid'], $last_uniacid);
  15. if (empty($permission)) {
  16. itoast('', $url, 'info');
  17. }
  18. $last_version = phoneapp_fetch($last_uniacid);
  19. if (!empty($last_version)) {
  20. $url = url('phoneapp/version/home', array('version_id' => $last_version['version']['id']));
  21. }
  22. itoast('', $url, 'info');
  23. }