mirror of
https://github.com/DzzXH/DzzOffice.git
synced 2026-01-23 19:15:18 +08:00
更新至v1.87.3,更新内容在Dzzoffice笔记中查看
This commit is contained in:
21
core/function/cache/cache_smileycodes.php
vendored
Normal file
21
core/function/cache/cache_smileycodes.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
|
||||
if(!defined('IN_DZZ')) {
|
||||
exit('Access Denied');
|
||||
}
|
||||
|
||||
function build_cache_smileycodes() {
|
||||
$data = array();
|
||||
foreach(C::t('imagetype')->fetch_all_by_type('smiley', 1) as $type) {
|
||||
foreach(C::t('smiley')->fetch_all_by_type_code_typeid('smiley', $type['typeid']) as $smiley) {
|
||||
if($size = @getimagesize('./static/image/smiley/'.$type['directory'].'/'.$smiley['url'])) {
|
||||
$data[$smiley['id']] = $smiley['code'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
savecache('smileycodes', $data);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user