home_spacecp.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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_spacecp.php 33660 2013-07-29 07:51:05Z nemohou $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. require_once libfile('function/spacecp');
  12. require_once libfile('function/magic');
  13. $acs = array('space', 'doing', 'upload', 'comment', 'blog', 'album', 'relatekw', 'common', 'class',
  14. 'swfupload', 'poke', 'friend', 'eccredit', 'favorite', 'follow',
  15. 'avatar', 'profile', 'theme', 'feed', 'privacy', 'pm', 'share', 'invite','sendmail',
  16. 'credit', 'usergroup', 'domain', 'click','magic', 'top', 'videophoto', 'index', 'plugin', 'search', 'promotion');
  17. $_GET['ac'] = $ac = (empty($_GET['ac']) || !in_array($_GET['ac'], $acs))?'profile':$_GET['ac'];
  18. $op = empty($_GET['op'])?'':$_GET['op'];
  19. if(!in_array($ac, array('doing', 'upload', 'blog', 'album'))) {
  20. $_G['mnid'] = 'mn_common';
  21. }
  22. if($ac != 'comment' || !$_G['group']['allowcomment']) {
  23. if(empty($_G['uid'])) {
  24. if($_SERVER['REQUEST_METHOD'] == 'GET') {
  25. dsetcookie('_refer', rawurlencode($_SERVER['REQUEST_URI']));
  26. } else {
  27. dsetcookie('_refer', rawurlencode('home.php?mod=spacecp&ac='.$ac));
  28. }
  29. showmessage('to_login', '', array(), array('showmsg' => true, 'login' => 1));
  30. }
  31. $space = getuserbyuid($_G['uid']);
  32. if(empty($space)) {
  33. showmessage('space_does_not_exist');
  34. }
  35. space_merge($space, 'field_home');
  36. if(($space['status'] == -1 || in_array($space['groupid'], array(4, 5, 6))) && $ac != 'usergroup') {
  37. showmessage('space_has_been_locked');
  38. }
  39. }
  40. $actives = array($ac => ' class="a"');
  41. list($seccodecheck, $secqaacheck) = seccheck('publish');
  42. $navtitle = lang('core', 'title_setup');
  43. if(lang('core', 'title_memcp_'.$ac)) {
  44. $navtitle = lang('core', 'title_memcp_'.$ac);
  45. }
  46. $_G['disabledwidthauto'] = 0;
  47. require_once libfile('spacecp/'.$ac, 'include');
  48. ?>