cache_medals.php 551 B

1234567891011121314151617181920212223
  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_medals.php 29236 2012-03-30 05:34:47Z chenmengshu $
  7. */
  8. if(!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. function build_cache_medals() {
  12. $data = array();
  13. foreach(C::t('forum_medal')->fetch_all_data(1) as $medal) {
  14. $data[$medal['medalid']] = array('name' => $medal['name'], 'image' => $medal['image'], 'description' => dhtmlspecialchars($medal['description']));
  15. }
  16. savecache('medals', $data);
  17. }
  18. ?>