portal_portalcp.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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: portal_portalcp.php 28492 2012-03-01 10:05:07Z zhangguosheng $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. $_G['disabledwidthauto'] = 0;
  12. $ac = in_array($_GET['ac'], array('comment', 'article', 'related', 'block', 'portalblock', 'blockdata', 'topic', 'diy', 'upload', 'category', 'plugin', 'logout'))?$_GET['ac']:'index';
  13. $admincp2 = getstatus($_G['member']['allowadmincp'], 2);
  14. $admincp3 = getstatus($_G['member']['allowadmincp'], 3);
  15. $admincp4 = getstatus($_G['member']['allowadmincp'], 4);
  16. $admincp5 = getstatus($_G['member']['allowadmincp'], 5);
  17. $admincp6 = getstatus($_G['member']['allowadmincp'], 6);
  18. if (!$_G['inajax'] && in_array($ac, array('index', 'portalblock', 'blockdata', 'category', 'plugin')) && ($_G['group']['allowdiy'] || $_G['group']['allowmanagearticle'] || $admincp2 || $admincp3 || $admincp4 || $admincp6)) {
  19. $modsession = new discuz_panel(PORTALCP_PANEL);
  20. if(getgpc('login_panel') && getgpc('cppwd') && submitcheck('submit')) {
  21. $modsession->dologin($_G[uid], getgpc('cppwd'), true);
  22. }
  23. if(!$modsession->islogin) {
  24. include template('portal/portalcp_login');
  25. dexit();
  26. }
  27. }
  28. if($ac == 'logout') {
  29. $modsession = new discuz_panel(PORTALCP_PANEL);
  30. $modsession->dologout();
  31. showmessage('modcp_logout_succeed', 'index.php');
  32. }
  33. $navtitle = lang('core', 'title_'.$ac.'_management').' - '.lang('core', 'title_portal_management');
  34. require_once libfile('function/portalcp');
  35. require_once libfile('portalcp/'.$ac, 'include');
  36. ?>