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(); } } }
function saveGroup($gtype, $info) { if (in_array($gtype, array('member', 'system', 'special'))) { $pwSQL = array(); foreach ($info['title'] as $key => $value) { if (empty($value)) { continue; } $info['img'][$key] || ($info['img'][$key] = 6); if ($gtype == 'member') { $pwSQL[] = array($gtype, $value, $info['img'][$key], $info['num'][$key]); } else { $pwSQL[] = array($gtype, $value, $info['img'][$key], 0); } } if ($pwSQL) { $GLOBALS['db']->update('INSERT INTO pw_usergroups (gptype,grouptitle,groupimg,grouppost) VALUES' . S::sqlMulti($pwSQL)); $gid = $GLOBALS['db']->insert_id(); // 特殊组和系统组 if ($gtype != 'member') { for ($i = 0; $i < count($pwSQL); $i++) { $gids[] = $gid + $i; } updatecache_g($gids); } updatecache_l(); return $gid; } } return false; }