function updatecache($array = '') { if (empty($array) || !is_array($array)) { updatecache_i(1); if (R_P == D_P || !file_exists(D_P . 'data/bbscache/config.php') || !file_exists(D_P . 'data/bbscache/dbreg.php')) { updatecache_c(); } updatecache_p(1); updatecache_w(); updatecache_sy(); updatecache_g(); updatecache_bk(); updatecache_df(); updatecache_ol(); updatecache_mddb(1); updatecache_ml(); updatecache_f(1); updatecache_l(1); updatecache_gr(1); updatecache_inv(); updatecache_plan(); updatecache_ftp(); updatecache_field(1); updatecache_form(); updatecache_help(); cache_read(); updatecache_hotforum(); updatecache_openforum(); updatecache_topic(); updatecache_postcate(); updateCacheActivity(); updatecache_conf('nf', false, 'newinfo_config.php'); //updateStampCache(); //updateBlockCache(); } else { foreach ($array as $value) { $value(); } } }
/** * @desc 设置分类状态 * * @param int $class 分类id * @param int $state 状态 */ function setClassState($class, $state) { global $db; $sql = "UPDATE pw_filter_class SET state=" . S::sqlEscape($state) . " WHERE id=" . S::sqlEscape($class); $db->update($sql); //更新缓存 updatecache_w(); //设置字典文件 setAllDictionary(); }
foreach ($content as $key => $value) { if ($value['word']) { $id = $db->get_value("SELECT id FROM pw_wordfb WHERE word=" . pwEscape($value['word'])); if (empty($id)) { $sql = "INSERT INTO pw_wordfb (word,wordreplace,type,wordtime) VALUES (" . pwEscape($value['word']) . ", '*****', " . pwEscape($center_level[$value['level']]) . ", " . pwEscape($timestamp) . " )"; $db->update($sql); $list[] = array('word' => $value['word'], 'level' => $center_level[$value['level']]); $i++; } } } //更新ft_update_num; $sql = "REPLACE INTO pw_hack SET hk_name='ft_update_num',hk_value=0"; $db->update($sql); //更新缓存 updatecache_w(); updatecache_ft(); //设置字典文件 setDictionary(); if (!$i) { ajaxmsg('没有需要同步的敏感词(本地已有相同的敏感词)', "{$basename}&action=setting"); } include_once PrintEot('filterAjax'); ajax_footer(); } else { if ($content) { //重定向 ajaxmsg($content, "{$basename}&action=setting"); } else { //重定向 ajaxmsg('filtermsg_not_update', "{$basename}&action=setting");