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_md(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_topic(); updatecache_postcate(); updatecache_conf('nf', false, 'newinfo_config.php'); //updateStampCache(); //updateBlockCache(); } else { foreach ($array as $value) { $value(); } } }
$config['md_groups'] = ''; } if (is_array($appgroups)) { $config['md_appgroups'] = ',' . implode(',', $appgroups) . ','; } else { $config['md_appgroups'] = ''; } foreach ($config as $key => $value) { $rt = $db->get_one("SELECT hk_name FROM pw_hack WHERE hk_name=" . pwEscape($key)); if ($rt) { $db->update("UPDATE pw_hack SET hk_value=" . pwEscape($value) . "WHERE hk_name=" . pwEscape($key)); } else { $db->update("INSERT INTO pw_hack SET hk_name=" . pwEscape($key) . ",hk_value=" . pwEscape($value)); } } updatecache_md(); adminmsg('operate_success'); } } elseif ($action == 'edit') { if (!$_POST['step']) { $query = $db->query("SELECT * FROM pw_medalinfo"); while ($rt = $db->fetch_array($query)) { $medaldb[] = $rt; } require_once PrintHack('admin'); } elseif ($_POST['step'] == '2') { InitGP(array('medal'), 'P'); foreach ($medal as $key => $value) { $value['name'] = Char_cv($value['name']); $value['intro'] = Char_cv($value['intro']); $value['picurl'] = Char_cv($value['picurl']);