예제 #1
0
function html_lock_start()
{
    global $AdminScript;
    return '<form method="post" action="' . $AdminScript . "\">\n" . '<div class="form">' . "\n" . '<input type="hidden" name="locking" value="1" />' . "\n" . html_bold_start() . lang('Locked') . html_bold_end() . html_newline();
}
예제 #2
0
            } else {
                if ($pg->exists && !$pg->mutable && !$lock) {
                    $pg->mutable = 1;
                    $pg->write();
                }
            }
        }
        $pagestore->unlock();
        header('Location: ' . $AdminScript);
    }
} else {
    if ($blocking) {
        if (empty($Block) && empty($Unblock)) {
            $html = '';
            if ($RatePeriod == 0) {
                $html = $html . html_bold_start() . ACTION_RateControlIpBlocking . html_bold_end() . html_newline();
            }
            $html = $html . html_rate_start();
            $blocklist = rateBlockList($pagestore->dbh);
            foreach ($blocklist as $block) {
                $html = $html . html_rate_entry($block);
            }
            $html = $html . html_rate_end();
            template_admin(array('html' => $html));
        } else {
            if (!empty($Block)) {
                rateBlockAdd($pagestore->dbh, $address);
            } else {
                if (!empty($Unblock)) {
                    rateBlockRemove($pagestore->dbh, $address);
                }
예제 #3
0
                if ($pg->exists && !$pg->mutable && !$lock) {
                    $pg->mutable = 1;
                    $pg->write();
                }
            }
        }
        $pagestore->unlock();
        header('Location: ' . $AdminScript);
    }
} else {
    if ($blocking) {
        if (empty($Block) && empty($Unblock)) {
            $GLOBALS['phpgw']->common->phpgw_header();
            $html = '';
            if ($RatePeriod == 0) {
                $html = $html . html_bold_start() . lang('Rate control / IP blocking disabled') . html_bold_end() . html_newline();
            }
            $html = $html . html_rate_start();
            $blocklist = $pagestore->rateBlockList();
            foreach ($blocklist as $block) {
                $html = $html . html_rate_entry($block);
            }
            $html = $html . html_rate_end();
            template_admin(array('html' => $html));
        } else {
            if (!empty($Block)) {
                $pagestore->rateBlockAdd($address);
            } else {
                if (!empty($Unblock)) {
                    $pagestore->rateBlockRemove($address);
                }