예제 #1
0
}
if (!defined('IN_DISCUZ')) {
    exit('Access Denied');
}
global $info_config, $_lang;
require_once DISCUZ_ROOT . './source/plugin/info/include/config.inc.php';
require_once DISCUZ_ROOT . './source/plugin/info/include/function.class.php';
$mod = "admin_cat";
$url = $_SERVER["REQUEST_URI"];
$self_url = 'plugins&operation=config&identifier=info&pmod=' . $mod;
$cp_url = 'action=' . $self_url;
$cat_pid = !empty($_GET['cat_pid']) ? intval($_GET['cat_pid']) : 0;
$now_url = ADMINSCRIPT . "?" . $cp_url;
if (submitcheck("editsubmit")) {
    $cat_array = gpc("cat_");
    $cat_array = sortgpc($cat_array, 'cat_id');
    foreach ($cat_array as $ck => $ca) {
        foreach ($ca as $_k => $_c) {
            DB::update("info_cat", array($_k => $_c), "cat_id='{$ck}'");
        }
    }
    if (is_array($_GET['newcat'])) {
        $newcat = addgpc($_GET['newcat']);
        foreach ($newcat as $name) {
            if (empty($name)) {
                continue;
            }
            $insert_array = array();
            foreach ($name as $k => $n) {
                $insert_array[$k] = $n;
            }
예제 #2
0
ini_set("display_errors","on");
set_time_limit(0);
error_reporting(E_ALL ^ E_NOTICE);
*/
global $info_config, $_lang;
require_once DISCUZ_ROOT . './source/plugin/info/include/config.inc.php';
require_once DISCUZ_ROOT . './source/plugin/info/include/function.class.php';
$mod = "admin_area";
$url = $_SERVER["REQUEST_URI"];
$self_url = 'plugins&operation=config&identifier=info&pmod=' . $mod;
$cp_url = 'action=' . $self_url;
$area_pid = !empty($_GET['area_pid']) ? intval($_GET['area_pid']) : 0;
$now_url = ADMINSCRIPT . "?" . $cp_url;
if (submitcheck("editsubmit")) {
    $area_array = gpc("area_");
    $area_array = sortgpc($area_array, 'area_id');
    foreach ($area_array as $ck => $ca) {
        foreach ($ca as $_k => $_c) {
            DB::update("info_area", array($_k => $_c), "area_id='{$ck}'");
        }
    }
    if (is_array($_GET['newarea'])) {
        $newarea = addgpc($_GET['newarea']);
        foreach ($newarea as $name) {
            if (empty($name)) {
                continue;
            }
            $insert_array = array();
            foreach ($name as $k => $n) {
                $insert_array[$k] = $n;
            }