Ejemplo n.º 1
0
    $_REQUEST['action'] = '';
}
switch ($_REQUEST['action']) {
    case 'save':
        form_save();
        break;
    case 'actions':
        form_actions();
        break;
    case 'field_remove':
        field_remove();
        header('Location: data_input.php?action=edit&id=' . $_REQUEST['data_input_id']);
        break;
    case 'field_edit':
        top_header();
        field_edit();
        bottom_footer();
        break;
    case 'edit':
        top_header();
        data_edit();
        bottom_footer();
        break;
    default:
        top_header();
        data();
        bottom_footer();
        break;
}
/* --------------------------
    The Save Function
Ejemplo n.º 2
0
    $quest_obj = new $type_class($id_common);
    $quest_obj->setUrl('index.php?modname=field&op=manage&fo=special');
    $quest_obj->specialop($back);
}
// XXX: switch
$fo = importVar('fo');
switch ($fo) {
    case "create":
        $back = urldecode(importVar('back'));
        $type_field = importVar('type_field');
        field_create($type_field, $back);
        break;
    case "edit":
        $back = urldecode(importVar('back'));
        $id_common = importVar('id_common', true, 0);
        $type_field = importVar('type_field');
        field_edit($type_field, $id_common, $back);
        break;
    case "del":
        $back = urldecode(importVar('back'));
        $id_common = importVar('id_common', true, 0);
        $type_field = importVar('type_field');
        field_del($type_field, $id_common, $back);
        break;
    case "special":
        $back = urldecode(importVar('back'));
        $id_common = importVar('id_common', true, 0);
        $type_field = importVar('type_field');
        field_specialop($type_field, $id_common, $back);
        break;
}