__init.php 1.2 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. if (in_array($action, array('post', 'manage'))) {
  8. define('FRAME', '');
  9. } else {
  10. if (!empty($_GPC['uniacid']) && intval($_GPC['uniacid']) != $_W['uniacid']) {
  11. $params = array('uniacid' => intval($_GPC['uniacid']), 'version_id' => intval($_GPC['version_id']));
  12. if ($action == 'version' && $do == 'display') {
  13. $params['miniapp_version_referer'] = 1;
  14. }
  15. itoast('', url('account/display/switch', $params));
  16. }
  17. $account_api = WeAccount::createByUniacid();
  18. if (is_error($account_api)) {
  19. itoast('', url('account/display'));
  20. }
  21. $check_manange = $account_api->checkIntoManage();
  22. if (is_error($check_manange)) {
  23. itoast('', $account_api->displayUrl);
  24. }
  25. $account_type = $account_api->menuFrame;
  26. if ($action == 'version' && $do == 'display') {
  27. define('FRAME', '');
  28. } else {
  29. define('FRAME', $account_type);
  30. }
  31. define('ACCOUNT_TYPE', $account_api->type);
  32. define('TYPE_SIGN', $account_api->typeSign);
  33. define('ACCOUNT_TYPE_NAME', $account_api->typeName);
  34. }
  35. $account_all_type = uni_account_type();