function ErrorMsg() { $this->_errorMsg = @ora_error($this->_curs); if (!$this->_errorMsg) { $this->_errorMsg = @ora_error($this->_connectionID); } return $this->_errorMsg; }
function db_oracle($host, $user, $passwd, $db = null) { $this->db_name = $db; $this->db_user = $user; $this->db_passwd = $passwd; $this->db_host = $host; $this->db_link_ptr = ora_logon("{$user}@{$host}", $passwd) or $this->error("", ora_error(), ora_errcode()); $this->dbhandler = @ora_select_db($db); }
function mostrar_select($val_tabla, $val_select, $cursor, $campo_valor, $campo_descript, $camp_valor_selected = 0) { $isql = "select {$campo_valor},{$campo_descript} from {$val_tabla} "; $resultado = ora_parse($cursor, $isql) or die("<center><b>No se han encontrado registros con numero de radicado <font color=blue>{$nurad}</font> <br> Revise el radicado escrito, solo pueden ser numeros de 14 digitos <br><p><hr><a href='edtradicado.php?fechaf={$fechaf}&krd={$krd}&drde={$drde}'><font color=red>Intente de Nuevo</a><p><hr></font><p><p><p><p><p><p><p> Dato enviado por Oracle <br><font color=blue>" . ora_error($cursor) . " -- "); $resultado = ora_exec($cursor) or die("<center><b>No se han encontrado registros con numero de radicado <font color=blue>{$nurad} </font> <p><br> Revise el radicado escrito, solo pueden ser numeros de 14 digitos <br><hr><a href='edtradicado.php?fechaf={$fechaf}&krd={$krd}&drde={$drde}'><font color=red>Intente de Nuevo</a><p><hr></font><p><p><p><p><p><p><p> Dato enviado por Oracle<br><font color=blue> " . ora_error($cursor) . " -- "); //ora_fetch_into($cursor,$this->row, ORA_FETCHINTO_NULLS|ORA_FETCHINTO_ASSOC); ?> <select name='<?php echo $val_tabla; ?> '> <?php while (ora_fetch_into($cursor, $this->row, ORA_FETCHINTO_NULLS | ORA_FETCHINTO_ASSOC)) { if ($campo_val_selected == $this->row[$campo_valor]) { $datoss = " Selected "; } else { $datoss = " "; } echo "\n\t\t <option value=" . $this->row[$campo_valor] . " '{$datoss}'>" . $this->row[$campo_descript] . "</option>"; } ?> </select> <?php }
function _query($sql, $inputarr = false) { // <G. Giunta 2003/03/03/> Reset error messages before executing $this->_errorMsg = false; $this->_errorCode = false; $curs = ora_open($this->_connectionID); if ($curs === false) { return false; } $this->_curs = $curs; if (!ora_parse($curs, $sql)) { return false; } if (ora_exec($curs)) { return $curs; } // <G. Giunta 2004/03/03> before we close the cursor, we have to store the error message // that we can obtain ONLY from the cursor (and not from the connection) $this->_errorCode = @ora_errorcode($curs); $this->_errorMsg = @ora_error($curs); // </G. Giunta 2004/03/03> @ora_close($curs); return false; }
if ($reg_envio) { error_reporting(7); $radicado_grupo = ""; $no_digitos = 14; $radi_nume_grupo = substr($radicados_sel[0], 0, $no_digitos); if ($i != 0) { $valor_unit = 0; } $verrad_sal = $radicados_sel[$i]; $verrad_sal = substr($verrad_sal, 0, $no_digitos); include_once "{$ruta_raiz}/config.php"; $isql = "select RADI_NUME_RADI FROM RADICADO WHERE RADI_NUME_RADI like '{$verrad_sal}'"; ora_commiton($handle); $cursor = ora_open($handle); ora_parse($cursor, $isql) or $error_db = ora_error(); ora_exec($cursor) or $error_db = ora_error(); $encontrados = ora_numrows($cursor); $resultado = ora_fetch_into($cursor, $row2, ORA_FETCHINTO_NULLS | ORA_FETCHINTO_ASSOC); $encontrado_radi = $row2["RADI_NUME_RADI"]; $dep_radicado = substr($verrad_sal, 4, 3); $carp_codi = substr($dep_radicado, 0, 2); $dir_tipo = 1; $nombre_us = substr(trim($nombre_us), 0, 29); $verrad_sal = substr($verrad_sal, 0, $no_digitos); if ($renv_codigo) { $isql = "UPDATE SGD_RENV_REGENVIO\n\t\t\t\t\t SET\n\t\t\t\t\t\tUSUA_DOC='{$usua_doc}',\n\t\t\t\t\t\tSGD_FENV_CODIGO='{$empresa_envio}',\n\t\t\t\t\t\tSGD_RENV_DESTINO= '{$destino}',\n\t\t\t\t\t\tSGD_RENV_TELEFONO='{$telefono}',\n\t\t\t\t\t\tSGD_RENV_MAIL='{$mail}',\n\t\t\t\t\t\tSGD_RENV_PESO='{$envio_peso}',\n\t\t\t\t\t\tSGD_RENV_VALOR='{$valor_unit}',\n\t\t\t\t\t\tSGD_RENV_CERTIFICADO='0',\n\t\t\t\t\t\tSGD_RENV_ESTADO='1',\n\t\t\t\t\t\tSGD_RENV_NOMBRE='{$nombre_us}',\n\t\t\t\t\t\tDEPE_CODI='{$dependencia}',\n\t\t\t\t\t\tSGD_DIR_TIPO='{$dir_tipo}',\n\t\t\t\t\t\tRADI_NUME_GRUPO='{$radi_nume_grupo}',\n\t\t\t\t\t\tSGD_RENV_PLANILLA='{$planilla}',\n\t\t\t\t\t\tSGD_RENV_DIR='{$direccion_us}',\n\t\t\t\t\t\tSGD_RENV_DEPTO='{$departamento_us}',\n \t\t\tSGD_RENV_OBSERVA='{$observaciones}',\n\t\t\t\t\t\tSGD_RENV_MPIO='{$destino}' \n\t\t\t\t\twhere \n\t\t\t\t\tRADI_NUME_SAL={$radicados} and sgd_renv_codigo='{$renv_codigo}'\n\t\t\t"; Ora_commiton($handle); $cursor = ora_open($handle); ora_parse($cursor, $isql); ora_exec($cursor); echo "<span class=etexto>Se actualizo el radicado {$verrad_sal} en la planilla {$planilla} </span>";
$tip_rem = $row["TRTE_CODI"] + 1; $tdoc = $row["TDOC_CODI"]; $med = $row["MREC_CODI"]; $cod = $row["MUNI_CODI"]; $coddepe = $row["RADI_DEPE_ACTU"]; $espcodi = $row["EESP_CODI"]; $coddepe = $row["RADI_DEPE_ACTU"]; $fechproc12 = $row["DOCDIA"]; $fechproc22 = $row["DOCMES"]; $fechproc32 = $row["DOCANO"]; $ruta_raiz = ".."; $no_tipo = "true"; include "busca_direcciones.php"; } else { echo "<center><font color=red><b>No se ha podido Modificar el registro Revise los datos <br> </center> {$error} <br></font>"; echo ora_error($cursor) . "<br>"; } } // Fin de Busqueda del Radicado paara editar if ($radicadopadre and !$radicadopadreseg and (!$Submit3 and !$Submit4)) { $cursor = ora_open($handle); $isql = "select a.*, TO_CHAR(a.RADI_FECH_OFIC,'DD') AS DOCDIA,TO_CHAR(a.RADI_FECH_OFIC,'MM') AS DOCMES,TO_CHAR(a.RADI_FECH_OFIC,'YYYY') AS DOCANO,a.EESP_CODI from radicado a where a.radi_nume_radi='{$radicadopadre}'"; $resultado = ora_parse($cursor, $isql); $resultado = ora_exec($cursor); $row = array(); ora_fetch_into($cursor, $row, ORA_FETCHINTO_NULLS | ORA_FETCHINTO_ASSOC); if (!$Buscar and !$Submit4) { $cuentaii = $row["RADI_CUENTAI"]; if ($cuentaii) { $cuentai = $cuentaii; }