Exemplo n.º 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();
        }
    }
}
Exemplo n.º 2
0
 function _initAllCache()
 {
     $this->_initAllOpenManualMedals();
     $this->_initAllOpenMedals();
     $this->_initAllOpenAutoMedals();
     require_once R_P . 'admin/cache.php';
     updatecache_mddb();
 }
Exemplo n.º 3
0
    }
} elseif ($action == 'add') {
    if (!$_POST['step']) {
        require_once PrintHack('admin');
    } elseif ($_POST['step'] == '2') {
        InitGP(array('newname', 'newintro', 'newpicurl'), 'P', 1);
        $db->update("INSERT INTO pw_medalinfo" . " SET " . pwSqlSingle(array('name' => $newname, 'intro' => $newintro, 'picurl' => $newpicurl)));
        $basename = "{$admin_file}?adminjob=hack&hackset=medal&action=edit";
        updatecache_mddb();
        adminmsg('operate_success');
    }
} elseif ($action == 'del') {
    InitGP(array('id'));
    $db->update("DELETE FROM pw_medalinfo WHERE id=" . pwEscape($id));
    $basename = "{$admin_file}?adminjob=hack&hackset=medal&action=edit";
    updatecache_mddb();
    adminmsg('operate_success');
} elseif ($action == 'selectimg') {
    require_once D_P . 'data/bbscache/medaldb.php';
    InitGP(array('thisid'));
    $medalimgdir = H_P . "/image/";
    $medalimgs = $haveused = array();
    foreach ($_MEDALDB as $value) {
        $haveused[] = $value['picurl'];
    }
    $d = opendir($medalimgdir);
    while ($filename = readdir($d)) {
        if ($filename == '.' || $filename == '..') {
            continue;
        }
        $fileext = end(explode('.', $filename));