} else { if ($op == "registrar2") { include "../Models/class_denuncia_juridica.php"; include "../Models/class_denuncia_juridica_dao.php"; //Datos de la empresa $ids = dameId(); $fisc_empresa = $ids[0]['FISC_EMPRESA']; $id_empresa = htmlentities($_POST['npat']); $rif = htmlentities($_POST['rif']); $nombre_empresa = htmlentities($_POST['razon']); $direccion_empresa = htmlentities($_POST['direccion_empresa']); $punto_referencia = htmlentities($_POST['punto_emp']); $telefono_empresa = htmlentities($_POST['tel_emp']); $email_empresa = htmlentities($_POST['email_emp']); $empresa = new FiscEmpresa(); $empresa->__SET('fisc_empresa', $fisc_empresa); $empresa->__SET('id_empresa', $id_empresa); $empresa->__SET('rif', $rif); $empresa->__SET('nombre_empresa', $nombre_empresa); $empresa->__SET('direccion_empresa', $direccion_empresa); $empresa->__SET('punto_referencia', $punto_referencia); $empresa->__SET('telefono_empresa', $telefono_empresa); $empresa->__SET('email_empresa', $email_empresa); //Datos del representante de la empresa $id_representante = htmlentities($_POST['cedula_representante']); $nombre_representante = htmlentities($_POST['nombre_representante']); $apellido_representante = htmlentities($_POST['apellido_representante']); $telefono1_representante = htmlentities($_POST['tel_hab_rep']); $telefono2_representante = htmlentities($_POST['tel_mov_rep']); $email_representante = htmlentities($_POST['email_rep']); $direccion_representante = htmlentities($_POST['direccion_patrono']);
public function obtener($clave, $valor) { $this->conex = DataBase::getInstance(); $consulta = "SELECT *\n\t\tFROM FISC_EMPRESA \n\t\tWHERE " . strtoupper($clave) . "= :valor"; $stid = oci_parse($this->conex, $consulta); if (!$stid) { $e = oci_error($this->conex); trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); } // Realizar la lógica de la consulta oci_bind_by_name($stid, ':valor', $valor); $r = oci_execute($stid); if (!$r) { $e = oci_error($stid); trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); } // Obtener los resultados de la consulta $result = array(); while ($fila = oci_fetch_array($stid, OCI_ASSOC + OCI_RETURN_NULLS)) { $it = new ArrayIterator($fila); $alm = new FiscEmpresa(); while ($it->valid()) { $alm->__SET(strtolower($it->key()), $it->current()); $it->next(); } $result[] = $alm; } //Libera los recursos oci_free_statement($stid); // Cierra la conexión Oracle oci_close($this->conex); //retorna el resultado de la consulta return $result; }