本文整理汇总了PHP中forum::cache方法的典型用法代码示例。如果您正苦于以下问题:PHP forum::cache方法的具体用法?PHP forum::cache怎么用?PHP forum::cache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类forum
的用法示例。
在下文中一共展示了forum::cache方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doUpdate
function doUpdate()
{
include_once iPATH . 'include/forum.class.php';
if ($_POST['forum']) {
$forum = new forum();
$forum->cache();
}
if ($_POST['adm']) {
include_once iPATH . 'admin/advertise.mo.php';
$rs = iCMS_DB::getArray("SELECT * FROM `#iCMS@__advertise`", OBJECT);
$_count = count($rs);
for ($i = 0; $i < $_count; $i++) {
adm($rs[$i]);
}
}
$_POST['tpl'] && $this->iCMS->clear_compiled_tpl();
$_POST['iCMS_list'] && FS::rmdir(iPATH . 'cache/list');
$_POST['iCMS_forum'] && FS::rmdir(iPATH . 'cache/forum');
$_POST['iCMS_tag'] && FS::rmdir(iPATH . 'cache/tags');
if ($_POST['iCMS_ALL']) {
FS::rmdir(iPATH . 'cache/list');
FS::rmdir(iPATH . 'cache/forum');
FS::rmdir(iPATH . 'cache/tags');
}
$_POST['keywords'] && keywords_cache();
$_POST['tags'] && tags_cache();
if ($_POST['model']) {
include iPATH . 'include/model.class.php';
model::cache();
}
$_POST['field'] && field_cache();
$_POST['config'] && CreateConfigFile();
if ($_POST['Re-Article-Count']) {
$rs = iCMS_DB::getArray("SELECT fid FROM `#iCMS@__forum`");
$_count = count($rs);
for ($i = 0; $i < $_count; $i++) {
$c = iCMS_DB::getValue("SELECT count(*) FROM #iCMS@__article where `fid`='" . $rs[$i]['fid'] . "' LIMIT 1 ");
iCMS_DB::query("UPDATE `#iCMS@__forum` SET `count` ='{$c}' WHERE `fid` ='" . $rs[$i]['fid'] . "' LIMIT 1 ");
}
}
if ($_POST['Re-Tag-Count']) {
include_once iPATH . 'include/forum.class.php';
$rs = iCMS_DB::getArray("SELECT id FROM `#iCMS@__tags`");
$_count = count($rs);
for ($i = 0; $i < $_count; $i++) {
$_count = iCMS_DB::getValue("SELECT count(*) FROM `#iCMS@__taglist` WHERE `tid`='" . $rs[$i]['id'] . "'");
iCMS_DB::query("UPDATE `#iCMS@__tags` SET `count` = '{$_count}' WHERE `id` ='" . $rs[$i]['id'] . "'");
tags_cache($rs[$i]['id']);
}
}
javascript::dialog("执行完毕!", 'url:1');
}
示例2: doDel
function doDel()
{
$fid = (int) $_GET['fid'];
Admin::CP($fid, 'Permission_Denied', __SELF__ . '?mo=forums');
$forum = new forum();
$msg = '请选择要删除的栏目!';
if (empty($forum->_array[$id])) {
iCMS_DB::query("DELETE FROM `#iCMS@__forum` WHERE `fid` = '{$fid}'");
$this->iCMS->iCache->delete('system/forum/' . $fid);
$art = iCMS_DB::getArray("SELECT id FROM `#iCMS@__article` WHERE `fid` = '{$fid}'");
foreach ((array) $art as $a) {
delArticle($a['fid']);
}
$forum = new forum();
$forum->cache();
$msg = '删除成功!';
} else {
$msg = '请先删除本栏目下的子栏目!';
}
javascript::dialog($msg, 'url:' . __SELF__ . '?mo=forums');
}