public function create()
 {
     $template = 'create.php';
     //estas tres primeros instancias son utlizadas por el formulario para los <select> en los fomrulario de creacion
     //y actualizacion de  la tabla,
     $args['rh'] = modelClass::getRh();
     $args['ciudad'] = modelClass::getCiudad();
     $args['tipoid'] = modelClass::getTipoid();
     if ($_SERVER['REQUEST_METHOD'] === 'POST') {
         //metodo por el cual acceden los etiquetas de entrada
         $rsp = modelClass::putNewUser($_POST['txtid'], $_POST['txtapre'], $_POST['txtape'], $_POST['txttel'], $_POST['txtciudad'], $_POST['txttipo'], $_POST['txttipoid'], $_POST['txtgenero'], $_POST['txtedad']);
         if ($rsp === true) {
             $args['success'] = 'El registro fue realizado exitosamente';
             $this->index($args);
         } else {
             $args['error'] = $rsp->getMessage();
             $args['formAction'] = 'index.php?action=create';
             $args = array_merge($args, $_POST);
             viewClass::renderHTML($template, $args);
         }
     } else {
         $args['formAction'] = 'index.php?action=create';
         viewClass::renderHTML($template, $args);
     }
 }
 public function create()
 {
     $template = 'create.php';
     if ($_SERVER['REQUEST_METHOD'] === 'POST') {
         if ($_POST['txtPassword1'] === $_POST['txtPassword2']) {
             $activate = $_POST['rdoActivado'] === 'true' ? 1 : 0;
             $rsp = modelClass::putNewUser($_POST['txtUsuario'], $_POST['txtPassword1'], $activate);
             if ($rsp === true) {
                 $args['success'] = 'El registro fue realizado exitosamente';
                 $this->index($args);
             } else {
                 $args['error'] = $rsp->getMessage();
                 $args['formAction'] = 'index.php?action=create';
                 $args = array_merge($args, $_POST);
                 viewClass::renderHTML($template, $args);
             }
         } else {
             $args['error'] = 'Las contraseñas no son iguales';
             $args['formAction'] = 'index.php?action=create';
             $args = array_merge($args, $_POST);
             viewClass::renderHTML($template, $args);
         }
     } else {
         $args['formAction'] = 'index.php?action=create';
         viewClass::renderHTML($template, $args);
     }
 }
 public function create()
 {
     $template = 'create.php';
     if ($_SERVER['REQUEST_METHOD'] === 'POST') {
         $rsp = modelClass::putNewUser($_POST['txtid'], $_POST['txtapre'], $_POST['txttest']);
         if ($rsp === true) {
             $args['success'] = 'El registro fue realizado exitosamente';
             $this->index($args);
         } else {
             $args['error'] = $rsp->getMessage();
             $args['formAction'] = 'index.php?action=create';
             $args = array_merge($args, $_POST);
             viewClass::renderHTML($template, $args);
         }
     } else {
         $args['formAction'] = 'index.php?action=create';
         viewClass::renderHTML($template, $args);
     }
 }