Пример #1
0
        $phpblockfn = $_POST['phpblockfn'];
    }
    $is_enabled = '';
    if (isset($_POST['is_enabled'])) {
        $is_enabled = $_POST['is_enabled'];
    }
    $allow_autotags = '';
    if (isset($_POST['allow_autotags'])) {
        $allow_autotags = $_POST['allow_autotags'];
    }
    $cache_time = $_CONF['default_cache_time_block'];
    if (isset($_POST['cache_time'])) {
        $cache_time = COM_applyFilter($_POST['cache_time'], true);
    }
    $display .= saveblock($bid, $name, $_POST['title'], $help, $_POST['type'], $blockorder, $content, $rdfurl, $rdfupdated, $rdflimit, $phpblockfn, $_POST['onleft'], COM_applyFilter($_POST['owner_id'], true), COM_applyFilter($_POST['group_id'], true), $_POST['perm_owner'], $_POST['perm_group'], $_POST['perm_members'], $_POST['perm_anon'], $is_enabled, $allow_autotags, $cache_time);
} elseif ($mode == 'edit') {
    $tmp = editblock($bid);
    $display = COM_createHTMLDocument($tmp, array('pagetitle' => $LANG21[3]));
} elseif ($mode == 'move') {
    if (SEC_checkToken()) {
        $display .= moveBlock();
    }
    $display .= listblocks();
    $display = COM_createHTMLDocument($display, array('pagetitle' => $LANG21[19]));
} else {
    // 'cancel' or no mode at all
    $display .= COM_showMessageFromParameter();
    $display .= listblocks();
    $display = COM_createHTMLDocument($display, array('pagetitle' => $LANG21[19]));
}
COM_output($display);
Пример #2
0
        $phpblockfn = $_POST['phpblockfn'];
    }
    $is_enabled = '';
    if (isset($_POST['is_enabled'])) {
        $is_enabled = $_POST['is_enabled'];
    }
    $allow_autotags = '';
    if (isset($_POST['allow_autotags'])) {
        $allow_autotags = $_POST['allow_autotags'];
    }
    $cache_time = $_CONF['default_cache_time_block'];
    if (isset($_POST['cache_time'])) {
        $cache_time = COM_applyFilter($_POST['cache_time'], true);
    }
    $display .= saveblock($bid, $name, $_POST['title'], $help, $_POST['type'], $blockorder, $device, $content, $rdfurl, $rdfupdated, $rdflimit, $phpblockfn, $_POST['onleft'], COM_applyFilter($_POST['owner_id'], true), COM_applyFilter($_POST['group_id'], true), $_POST['perm_owner'], $_POST['perm_group'], $_POST['perm_members'], $_POST['perm_anon'], $is_enabled, $allow_autotags, $cache_time);
} elseif ($mode == 'edit') {
    $tmp = editblock($bid);
    $display = COM_createHTMLDocument($tmp, array('pagetitle' => $LANG21[3]));
} elseif ($mode == 'move') {
    if (SEC_checkToken()) {
        $display .= moveBlock();
    }
    $display .= listblocks($position);
    $display = COM_createHTMLDocument($display, array('pagetitle' => $LANG21[19]));
} else {
    // 'cancel' or no mode at all
    $display .= COM_showMessageFromParameter();
    $display .= listblocks($position);
    $display = COM_createHTMLDocument($display, array('pagetitle' => $LANG21[19]));
}
COM_output($display);