示例#1
0
        showmessage('do_success', "portal.php?mod=portalcp&ac=block&op=itemdata&bid={$bid}&page={$page}");
    }
    $count = C::t('common_block_item_data')->count_by_bid($bid);
    $multi = '';
    $datalist = array();
    if ($count) {
        $datalist = C::t('common_block_item_data')->fetch_all_by_bid($bid, 1, $start, $perpage);
        $multi = multi($count, $perpage, $page, "portal.php?mod=portalcp&ac=block&bid={$bid}&op=itemdata");
    }
} elseif ($op == 'setting') {
    if ($bid && !$allowmanage) {
        showmessage('block_edit_nopermission');
    }
    $settings = array();
    if ($theclass['script'][$_GET['script']]) {
        $settings = block_setting($_GET['classname'], $_GET['script'], $block['param']);
    }
    $block['script'] = isset($block['script']) ? $block['script'] : $_GET['script'];
    $scriptarr = array($block['script'] => ' selected');
    $stylearr = array($_GET['styleid'] => ' selected');
    $block = block_checkdefault($block);
    $cachetimearr = array($block['cachetime'] => ' selected="selected"');
    $block['cachetime_min'] = intval($block['cachetime'] / 60);
    $targetarr[$block['target']] = ' selected';
} elseif ($op == 'thumbsetting') {
    if ($bid && !$allowmanage) {
        showmessage('block_edit_nopermission');
    }
    $block = block_checkdefault($block);
    $cachetimearr = array($block['cachetime'] => ' selected="selected"');
    $block['cachetime_min'] = intval($block['cachetime'] / 60);
示例#2
0
        }
        ksort($itemlist);
    }
    $showhtmltip = $bid && $_GET['tab'] == 'data' && $is_htmlblock ? true : false;
    $tab = $bid && $_GET['tab'] != 'setting' && !$is_htmlblock ? 'data' : 'setting';
    $block['summary'] = htmlspecialchars($block['summary']);
    $block['param']['bannedids'] = !empty($block['param']['bannedids']) ? stripslashes($block['param']['bannedids']) : '';
} elseif ($op == 'setting') {
    if ($bid && !$allowmanage || !$bid && !$allowadd) {
        showmessage('block_edit_nopermission');
    }
    if ($theclass['script'][$_GET['script']]) {
        $settings = block_setting($_GET['script'], $block['param']);
    }
    $block['script'] = isset($block['script']) ? $block['script'] : $_GET['script'];
    $settings = block_setting($block['script'], $block['param']);
    $scriptarr = array($block['script'] => ' selected');
    $stylearr = array($_GET['styleid'] => ' selected');
    $block = block_checkdefault($block);
    $cachetimearr = array($block['cachetime'] => ' selected="selected"');
    $targetarr[$block['target']] = ' selected';
} elseif ($op == 'thumbsetting') {
    if ($bid && !$allowmanage || !$bid && !$allowadd) {
        showmessage('block_edit_nopermission');
    }
    $block = block_checkdefault($block);
    $cachetimearr = array($block['cachetime'] => ' selected="selected"');
    $targetarr[$block['target']] = ' selected';
} elseif ($op == 'remove') {
    if (!$bid || !$allowmanage) {
        showmessage('block_edit_nopermission');