__init.php 952 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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('module');
  8. if (empty($action)) {
  9. $action = 'site';
  10. }
  11. $eid = intval($_GPC['eid']);
  12. if(!empty($eid)) {
  13. $entry = module_entry($eid);
  14. } else {
  15. $entry = array(
  16. 'module' => $_GPC['m'],
  17. 'do' => $_GPC['do'],
  18. 'state' => $_GPC['state'],
  19. 'direct' => 0,
  20. );
  21. }
  22. $modules = uni_modules();
  23. if (empty($modules[$entry['module']])) {
  24. message('您访问的功能模块不存在,请重新进入');
  25. }
  26. if(empty($entry) || empty($entry['do'])) {
  27. message('非法访问.');
  28. }
  29. $_GPC['__entry'] = $entry['title'];
  30. $_GPC['__state'] = $entry['state'];
  31. $_GPC['state'] = $entry['state'];
  32. $_GPC['m'] = $entry['module'];
  33. $_GPC['do'] = $entry['do'];
  34. $_W['current_module'] = $modules[$entry['module']];
  35. define('IN_MODULE', $entry['module']);