Exemplo n.º 1
0
function randomtext_options()
{
    if ($_POST) {
        // process the posted data and display summary page - not pretty :(
        randomtext_save($_POST);
    }
    $action = isset($_GET['action']) ? $_GET['action'] : false;
    switch ($action) {
        case 'new':
            randomtext_edit();
            break;
        case 'edit':
            $id = intval($_GET['id']);
            randomtext_edit($id);
            break;
        case 'delete':
            $id = intval($_GET['id']);
            check_admin_referer('randomtext_delete' . $id);
            randomtext_delete($id);
            // now display summary page
            randomtext_list();
            break;
        default:
            randomtext_list();
    }
}
function randomtext_options()
{
    $action = isset($_GET['action']) ? $_GET['action'] : false;
    switch ($action) {
        case 'new':
            randomtext_edit();
            break;
        case 'edit':
            $id = intval($_GET['id']);
            randomtext_edit($id);
            break;
        case 'delete':
            $id = intval($_GET['id']);
            check_admin_referer('randomtext_delete' . $id);
            randomtext_delete($id);
            // now display summary page
            randomtext_list();
            break;
        default:
            randomtext_list();
    }
}