home.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: home.php 32932 2013-03-25 06:53:01Z zhangguosheng $
  7. */
  8. define('APPTYPEID', 1);
  9. define('CURSCRIPT', 'home');
  10. if(!empty($_GET['mod']) && ($_GET['mod'] == 'misc' || $_GET['mod'] == 'invite')) {
  11. define('ALLOWGUEST', 1);
  12. }
  13. require_once './source/class/class_core.php';
  14. require_once './source/function/function_home.php';
  15. $discuz = C::app();
  16. $cachelist = array('magic','userapp','usergroups', 'diytemplatenamehome');
  17. $discuz->cachelist = $cachelist;
  18. $discuz->init();
  19. $space = array();
  20. $mod = getgpc('mod');
  21. if(!in_array($mod, array('space', 'spacecp', 'misc', 'magic', 'editor', 'invite', 'task', 'medal', 'rss', 'follow'))) {
  22. $mod = 'space';
  23. $_GET['do'] = 'home';
  24. }
  25. if($mod == 'space' && ((empty($_GET['do']) || $_GET['do'] == 'index') && ($_G['inajax']))) {
  26. $_GET['do'] = 'profile';
  27. }
  28. $curmod = !empty($_G['setting']['followstatus']) && (empty($_GET['diy']) && empty($_GET['do']) && $mod == 'space' || $_GET['do'] == 'follow') ? 'follow' : $mod;
  29. define('CURMODULE', $curmod);
  30. runhooks($_GET['do'] == 'profile' && $_G['inajax'] ? 'card' : $_GET['do']);
  31. require_once libfile('home/'.$mod, 'module');
  32. ?>