__init.php 1.1 KB

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. defined('IN_IA') or exit('Access Denied');
  7. load()->model('miniapp');
  8. $version_id = intval($_GPC['version_id']);
  9. if (!empty($version_id)) {
  10. $account = table('account')->getUniAccountByUniacid($_W['uniacid']);
  11. $version_info = miniapp_version($version_id);
  12. if ($version_info['uniacid'] != $_W['uniacid']) {
  13. itoast('', url('account/display/all'));
  14. }
  15. }
  16. if ($action == 'version' && $do == 'display') {
  17. define('FRAME', '');
  18. }
  19. if (in_array($action, array('manage', 'post'))) {
  20. define('FRAME', 'account_manage');
  21. }
  22. if (!in_array($action, array('post', 'manage', 'auth'))) {
  23. $account_api = WeAccount::createByUniacid();
  24. if (is_error($account_api)) {
  25. itoast('', url('account/display', array('type' => WXAPP_TYPE_SIGN)));
  26. }
  27. $check_manange = $account_api->checkIntoManage();
  28. if (is_error($check_manange)) {
  29. itoast('', $account_api->displayUrl);
  30. }
  31. $account_type = $account_api->menuFrame;
  32. define('FRAME', $account_type);
  33. }
  34. $account_all_type = uni_account_type();