__init.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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', 'manage-account', 'welcome', 'link-account', 'shortcut', 'plugin'))) {
  8. $referer = (url_params(referer()));
  9. if (empty($_GPC['version_id']) && intval($referer['version_id']) > 0 && !$_W['isajax']) {
  10. itoast('', $_W['siteurl'] . '&version_id=' . $referer['version_id']);
  11. }
  12. $account_api = WeAccount::createByUniacid();
  13. if (is_error($account_api)) {
  14. itoast('', url('module/display'));
  15. }
  16. $check_manange = $account_api->checkIntoManage();
  17. define('FRAME', 'account');
  18. if (is_error($check_manange)) {
  19. itoast('', $account_api->displayUrl);
  20. }
  21. }
  22. if (in_array($action, array('manage-system'))) {
  23. if (!empty($_GPC['support']) && $_GPC['support'] == 'welcome_support') {
  24. define('FRAME', 'system');
  25. } else {
  26. define('FRAME', 'module_manage');
  27. }
  28. }
  29. if (in_array($action, array('group'))) {
  30. define('FRAME', 'permission');
  31. }
  32. if (in_array($action, array('display', 'link'))) {
  33. define('FRAME', 'module');
  34. }
  35. if (in_array($action, array('link', 'link-account', 'permission', 'plugin', 'shortcut', 'welcome'))) {
  36. define('IN_MODULE', trim($_GPC['m']));
  37. }
  38. $account_all_type = uni_account_type();
  39. $account_all_type_sign = array_keys(uni_account_type_sign());
  40. $module_all_support = module_support_type();
  41. $module_support_name = safe_gpc_string($_GPC['support']);
  42. $module_support = !empty($module_all_support[$module_support_name]) ? $module_all_support[$module_support_name]['type'] : 'all';