示例#1
0
        catchsuccessandfetch($finishok2, $fetchURL);
    } else {
        catchsuccess($finishok2, $backtomodule);
    }
}
if ($job == 'moduledel') {
    if ($itemid === '') {
        catcherror($lna[126]);
    }
    $itemid = base64_decode($itemid);
    $try = $blog->getbyquery("SELECT * FROM `{$db_prefix}mods` WHERE `name`='{$itemid}'");
    if (!$try) {
        catcherror($lna[127]);
    }
    $blog->query("DELETE FROM `{$db_prefix}mods` WHERE `name`='{$itemid}'");
    mod_replace($itemid, '');
    if ($try['active'] == 1) {
        recache_mods();
    }
    if ($ajax == 'on') {
        $fetchURL = "admin.php?go=main_module&section={$try['position']}";
        catchsuccessandfetch($finishok2, $fetchURL);
    } else {
        catchsuccess($finishok2, $backtomodule);
    }
}
if ($job == 'automod') {
    acceptrequest('modpassword');
    $checkmodp = md5($modpassword);
    $checkmodp_try = array();
    $checkmodp_try = $blog->getbyquery("SELECT * FROM `{$db_prefix}user` WHERE `userid`='{$userdetail['userid']}' AND `userpsw`='{$checkmodp}'");
示例#2
0
        $itemid = floor($itemid);
        $blog->query("DELETE FROM `{$db_prefix}pages` WHERE `pageid`='{$itemid}'");
        $blog->query("DELETE FROM `{$db_prefix}mods` WHERE `name`='pageshortcut{$itemid}' AND `position`='header'");
        mod_replace('pageshortcut{$itemid}', '');
        recache_mods();
        if ($ajax == 'on') {
            catchsuccessandfetch($lna[1095], 'admin.php?go=entry_pagemanage');
        } else {
            catchsuccess($lna[1095], "{$lna[1057]}|admin.php?go=entry_pagemanage");
        }
    }
    if ($opt == 'del') {
        if ($selid == '') {
            catcherror($lna[337]);
        }
        $batch_id = makeaquery($selid, "`pageid`='%s'", 'OR');
        $batch_id2 = makeaquery($selid, "`name`='pageshortcut%s'", 'OR');
        $blog->query("DELETE FROM `{$db_prefix}pages` WHERE {$batch_id}");
        $blog->query("DELETE FROM `{$db_prefix}mods` WHERE {$batch_id2}");
        foreach ($selid as $singleid) {
            mod_replace('pageshortcut{$singleid}', '');
        }
        recache_mods();
        if ($ajax == 'on') {
            catchsuccessandfetch($lna[1095], 'admin.php?go=entry_pagemanage');
        } else {
            catchsuccess($lna[1095], "{$lna[1057]}|admin.php?go=entry_pagemanage");
        }
    }
    catcherror($lna[965]);
}
示例#3
0
function remove_module($modname)
{
    global $blog, $db_prefix;
    $blog->query("DELETE FROM `{$db_prefix}mods` WHERE `name`='{$modname}'");
    mod_replace($modname, '');
    recache_mods();
}