Пример #1
0
    }
    if ($list->getCount() > 0) {
        $html .= "</table><br />";
    }
    if ($list->getCount() > 10) {
        $html .= '[<a href="' . edkuri::build(array('op', 'add', false)) . '">Add</a>]';
    }
}
// delete
if (edkURI::getArg('op') == "del") {
    if ($_GET['confirm']) {
        $contract = new Contract($ctrID);
        if (!$contract->validate()) {
            exit;
        }
        $contract->remove();
        Header("Location: " . htmlspecialchars_decode(edkuri::build(array('op', 'view', false))));
    } else {
        $page->setTitle("Administration - Delete Campaign");
        $html .= "Confirm deletion:&nbsp;";
        $html .= '<button onclick="window.location.href="' . edkuri::build(array(array('ctr_id', $ctrID, false), array('op', 'del', false)), array('confirm', 'yes', false)) . '">Yes</button>&nbsp;&nbsp;&nbsp;';
        $html .= "<button onclick=\"window.history.back();\">No</button>";
    }
}
// edit
if (edkURI::getArg('op') == "edit") {
    $contract = new Contract($ctrID);
    if (!$contract->validate()) {
        exit;
    }
    if ($_POST['detail_submit']) {