DiscuzX/upload/source/function/cache/cache_click.php

26 lines
635 B
PHP
Raw Normal View History

2016-12-15 08:20:54 -05:00
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: cache_click.php 24403 2011-09-16 12:32:45Z zhengqingpeng $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
function build_cache_click() {
$data = $keys = array();
foreach(C::t('home_click')->fetch_all_by_available() as $value) {
if(count($data[$value['idtype']]) < 8) {
$keys[$value['idtype']] = $keys[$value['idtype']] ? ++$keys[$value['idtype']] : 1;
$data[$value['idtype']][$keys[$value['idtype']]] = $value;
}
}
savecache('click', $data);
}
?>