cache_grouplevels.php 656 B

123456789101112131415161718192021222324252627
  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: cache_grouplevels.php 24623 2011-09-28 06:54:39Z liulanbo $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. function build_cache_grouplevels() {
  12. $data = array();
  13. $query = C::t('forum_grouplevel')->range();
  14. foreach($query as $level) {
  15. $level['creditspolicy'] = unserialize($level['creditspolicy']);
  16. $level['postpolicy'] = unserialize($level['postpolicy']);
  17. $level['specialswitch'] = unserialize($level['specialswitch']);
  18. $data[$level['levelid']] = $level;
  19. }
  20. savecache('grouplevels', $data);
  21. }
  22. ?>