Example #1
0
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();
        }
    }
}
Example #2
0
    ajax_footer();
} elseif ('delmodel' == $action) {
    //删除活动子分类
    define('AJAX', 1);
    $actid = $categoryService->getCateIdByModelId($actmid);
    if (!$actid) {
        echo 'the_model_not_exist';
        ajax_footer();
    }
    $count = $categoryService->countModelByCateId($actid);
    if ($count == 1) {
        echo 'model_mustone';
        ajax_footer();
    }
    deleteTopicAndModelDataByActmid($actmid);
    updateCacheActivity();
    echo "success\t";
    ajax_footer();
}
/**
 * 获取保存serialize的字段规则
 * @param string $fieldtype 字段类型
 * @param array $rules 规则
 * @return string
 */
function getFieldRules($fieldtype, $rules)
{
    $rules || ($rules = array());
    if ($fieldtype == 'select' || $fieldtype == 'radio' || $fieldtype == 'checkbox') {
        foreach (explode("\n", stripslashes($rules['selection'])) as $key => $rule) {
            if (strpos($rule, '=') == false) {