optimizer_aggid.php 998 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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: optimizer_aggid.php 33867 2013-08-23 06:12:21Z jeffjzhang $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. class optimizer_aggid {
  12. public function __construct() {
  13. }
  14. public function check() {
  15. $flag = true;
  16. $aggid = C::t('common_usergroup_field')->fetch_all(array(1, 2, 3));
  17. foreach($aggid as $group) {
  18. if($group['forcelogin'] != 1) {
  19. $flag = false;
  20. break;
  21. }
  22. }
  23. if(!$flag) {
  24. $return = array('status' => 1, 'type' =>'header', 'lang' => lang('optimizer', 'optimizer_aggid_need'));
  25. } else {
  26. $return = array('status' => 0, 'type' =>'none', 'lang' => lang('optimizer', 'optimizer_aggid_no_need'));
  27. }
  28. return $return;
  29. }
  30. public function optimizer() {
  31. $adminfile = defined(ADMINSCRIPT) ? ADMINSCRIPT : 'admin.php';
  32. dheader('Location: '.$_G['siteurl'].$adminfile.'?action=setting&operation=accountguard');
  33. }
  34. }
  35. ?>