__init.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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('permission', 'default-entry', 'manage-account'))) {
  8. define('FRAME', 'account');
  9. $referer = (url_params(referer()));
  10. if (empty($_GPC['version_id']) && intval($referer['version_id']) > 0) {
  11. itoast('', $_W['siteurl'] . '&version_id=' . $referer['version_id']);
  12. }
  13. $account_api = WeAccount::create();
  14. if (is_error($account_api)) {
  15. itoast('', url('module/display'));
  16. }
  17. $check_manange = $account_api->checkIntoManage();
  18. if (is_error($check_manange)) {
  19. $account_display_url = $account_api->accountDisplayUrl();
  20. itoast('', $account_display_url);
  21. }
  22. }
  23. if (in_array($action, array('group', 'manage-system'))) {
  24. define('FRAME', 'system');
  25. }
  26. $_GPC['account_type'] = !empty($_GPC['account_type']) || !empty($_GPC['system_welcome']) ? $_GPC['account_type'] : ACCOUNT_TYPE_OFFCIAL_NORMAL;
  27. if (!empty($_GPC['system_welcome'])) {
  28. define('ACCOUNT_TYPE_TEMPLATE', '-welcome');
  29. }
  30. $account_param = WeAccount::createByType($_GPC['account_type']);
  31. define('ACCOUNT_TYPE', $account_param->type);
  32. define('ACCOUNT_TYPE_TEMPLATE', $account_param->typeTempalte);