Ejemplo n.º 1
0
if (isset($_REQUEST['action'])) {
    switch ($_REQUEST['action']) {
        case 'actualizar':
            $rsp->__SET('intidrespuesta', $_REQUEST['intidrespuesta']);
            $rsp->__SET('intidpregunta', $_REQUEST['intidpregunta']);
            $rsp->__SET('nvchrespuesta', $_REQUEST['nvchrespuesta']);
            $rsp->__SET('chrvf', $_REQUEST['chrvf']);
            $model->Actualizar($rsp);
            header('Location: respuesta.php');
            break;
        case 'registrar':
            //$preg->__SET('intidpregunta',$_REQUEST['intidpregunta']);
            $rsp->__SET('intidpregunta', $_REQUEST['intidpregunta']);
            $rsp->__SET('nvchrespuesta', $_REQUEST['nvchrespuesta']);
            $rsp->__SET('chrvf', $_REQUEST['chrvf']);
            $model->Registrar($rsp);
            header('Location: respuesta.php');
            break;
        case 'eliminar':
            $model->Eliminar($_REQUEST['intidrespuesta']);
            header('Location: respuesta.php');
            break;
        case 'editar':
            $rsp = $model->Obtener($_REQUEST['intidrespuesta']);
            break;
    }
}
?>

<div class="main-panel">
    <nav class="navbar navbar-default navbar-fixed">