Esempio n. 1
0
}
if (tool::securePost('action') == "update") {
    $recordType = "edit";
    $accessInst->fill(tool::securePostAll());
    if (!DEMO_MODE) {
        if ($accessInst->update()) {
            $accessInst->clear();
            $recordType = "new";
        }
    } else {
        $toolInst->errorStatus("not allowed in this demo. Sorry ;)");
    }
}
if (tool::securePost('action') == "new") {
    $accessInst->fill(tool::securePostAll());
    if ($accessInst->insert()) {
        $accessInst->clear();
        $recordType = "new";
    } else {
        $recordType = "edit";
    }
}
if (tool::securePost('action') == "delete") {
    $accessInst->id = tool::securePost('id');
    if (!DEMO_MODE) {
        $accessInst->delete();
    } else {
        $toolInst->errorStatus("not allowed in this demo. Sorry ;)");
    }
}
if (tool::securePost('action') == "edit") {