/** * Creates a new OracleSelectQueryResult object. * Creates a new OracleSelectQueryResult object. * @access public * @param integer $resourceId The resource id for this SELECT query. * @param integer $linkId The link identifier for the database connection. * @return object OracleSelectQueryResult A new OracleSelectQueryResult object. */ function OracleSelectQueryResult($resourceId, $linkId) { // ** parameter validation $resourceRule = ResourceValidatorRule::getRule(); ArgumentValidator::validate($resourceId, $resourceRule, true); ArgumentValidator::validate($linkId, $resourceRule, true); // ** end of parameter validation $this->_resourceId = $resourceId; $this->_linkId = $linkId; $this->_currentRowIndex = 0; $this->_currentRow = array(); $this->_currentRow[BOTH] = array(); $this->_currentRow[NUMERIC] = array(); $this->_currentRow[ASSOC] = array(); $this->_numRows = ocifetchstatement($this->_resourceId); ociexecute($this->_resourceId); // if we have at least one row in the result, fetch its array if ($this->hasMoreRows()) { ocifetchinto($this->_resourceId, $this->_currentRow[BOTH], OCI_ASSOC + OCI_NUM + OCI_RETURN_LOBS); foreach ($this->_currentRow[BOTH] as $key => $value) { if (is_int($key)) { $this->_currentRow[NUMERIC][$key] = $value; } else { $this->_currentRow[ASSOC][$key] = $value; } } } }
function numRows() { if ($tmpdb = ocinlogon($this->DBUser, $this->DBPassword, $this->DBHost)) { $res = ociparse($tmpdb, $this->lastQuery); ociexecute($res); $cnt = ocifetchstatement($res, $temp); ocilogoff($tmpdb); } else { $cnt = FALSE; } return $cnt; }
} function saca_iva($can, $por) { $cant = $can; $can = $can / 100 * $por; $can += $cant; return $can; } //****************************Cierro funciones************************************ //********************************VERIFICA EL ULTIMO MOVIMIENTO******************* //********traigo centro de costos y libro********* //$cmdstr1 = "select * from MATEO.CONT_FOLIO where LOGIN = '******' "; $cmdstr1 = "select * from MATEO.CONT_FOLIO where LOGIN = '******' \r\nAND ID_EJERCICIO='" . $ID_EJERCICIOM . "'\r\nAND\r\nID_LIBRO='" . $ID_LIBROM . "'\r\n"; $parsed1 = ociparse($db_conn, $cmdstr1); ociexecute($parsed1); $nrows1 = ocifetchstatement($parsed1, $results1); for ($i = 0; $i < $nrows1; $i++) { $ID_LIBRO = $results1['ID_LIBRO'][$i]; $ID_EJERCICIO = $results1['ID_EJERCICIO'][$i]; } //*********************************************************************************** //*****************************Verificando caja abierta************************** $sSQLC = "Select * From aperturaCaja "; $resultC = mysql_db_query($basedatos, $sSQLC); $myrowC = mysql_fetch_array($resultC); if ($poliza = $myrowC['numeroPoliza']) { //*******************Comienzo la validaci�n***************** //********************Llenado de datos $sSQL3 = "Select * From clientesInternos WHERE keyClientesInternos = '" . $numeroCuenta . "' "; $result3 = mysql_db_query($basedatos, $sSQL3); $myrow3 = mysql_fetch_array($result3);
$ID_CCOSTOM = '4.01'; //********************COMIENZAN VALIDACIONES*********************************** if (!$usuario and !isset($_POST['username']) and !isset($_POST['password']) and !isset($_POST['ingresar'])) { echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=' . CONSTANT_PATH_SIMA_RAIZ . '/index.php">'; exit; } if (!$usuario) { //encriptar $crypt = $_POST['password']; $_POST['password'] = md5($_POST['password']); if (isset($_POST['username']) and isset($_POST['password']) and isset($_POST['ingresar'])) { $cmdstr3 = "select * from PEDRO.USUARIO WHERE LOGIN = '******'username'] . "' AND PASSWORD1 = '" . $_POST['password'] . "'\r\nAND STATUS='A'\r\n"; $parsed3 = ociparse($db_conn, $cmdstr3); ociexecute($parsed3); $nrows3 = ocifetchstatement($parsed3, $resulta3); for ($i = 0; $i < $nrows3; $i++) { $user = $resulta3['LOGIN'][$i]; $passwd = $resulta3['PASSWORD1'][$i]; } if ($user == $_POST['username'] and $passwd == $_POST['password']) { //agregar sesiones session_destroy(); session_start(); $llave = session_id(); $agregaIP = "INSERT INTO sesiones ( \r\nusuario,ip,llave\r\n) values ('" . $user . "','" . $ip . "','" . $llave . "')"; mysql_db_query($basedatos, $agregaIP); echo mysql_error(); echo '<META HTTP-EQUIV="Refresh" CONTENT="0; URL=">'; exit;
/** * Executes given SQL statement. This is an overloaded method. * * @param string $sql SQL statement * @return resource Result resource identifier or null * @access protected */ function _execute($sql) { $this->_statementId = @ociparse($this->connection, $sql); if (!$this->_statementId) { $this->_setError($this->connection); return false; } if ($this->__transactionStarted) { $mode = OCI_DEFAULT; } else { $mode = OCI_COMMIT_ON_SUCCESS; } if (!@ociexecute($this->_statementId, $mode)) { $this->_setError($this->_statementId); return false; } $this->_setError(null, true); switch (ocistatementtype($this->_statementId)) { case 'DESCRIBE': case 'SELECT': $this->_scrapeSQL($sql); break; default: return $this->_statementId; break; } if ($this->_limit >= 1) { ocisetprefetch($this->_statementId, $this->_limit); } else { ocisetprefetch($this->_statementId, 3000); } $this->_numRows = ocifetchstatement($this->_statementId, $this->_results, $this->_offset, $this->_limit, OCI_NUM | OCI_FETCHSTATEMENT_BY_ROW); $this->_currentRow = 0; $this->limit(); return $this->_statementId; }
// fetch data from cursor ocifreestatement($mycursor); // close procedure call ocifreestatement($outrefc); // close cursor $outrefc = ocinewcursor($conn); //Declare cursor variable $mycursor = ociparse($conn, "begin getPotisions(:curs,'{$alin2}'); end;"); // prepare procedure call ocibindbyname($mycursor, ':curs', $outrefc, -1, OCI_B_CURSOR); // bind procedure parameters $ret = ociexecute($mycursor); // Execute function $ret = ociexecute($outrefc); // Execute cursor $nrows = ocifetchstatement($outrefc, $pos2); // fetch data from cursor ocifreestatement($mycursor); // close procedure call ocifreestatement($outrefc); // close cursor for ($p = 0; $p < count($pos2["POSICION"]); $p++) { $posicion1 = $pos1["POSICION"][$p]; $nombre1 = $pos1["NOMBRE"][$p]; $posicion2 = $pos2["POSICION"][$p]; $nombre2 = $pos2["NOMBRE"][$p]; echo "<div class='Align_Row'>\n <div class='Player_Photo'>.</div>\n <div class='Player_Info_Box'>\n <div class='Player_Name'> {$nombre1} </div>\n <div class='Player_Position'> {$posicion1}</div>\n </div>\n </div> "; } echo "</div>\n <div id='ColumTeamB' class='Column'>"; for ($p = 0; $p < count($pos2["POSICION"]); $p++) { $posicion1 = $pos1["POSICION"][$p];
</div> <input type="button" onclick="crearEvento()" value="Crear evento"></input> </div> </body> <?php include "conexion.php"; $conn = OCILogon($user, $pass, $db); $outrefc = ocinewcursor($conn); //Declare cursor variable $mycursor = ociparse($conn, "begin get_AllTeams(:curs); end;"); // prepare procedure call ocibindbyname($mycursor, ':curs', $outrefc, -1, OCI_B_CURSOR); // bind procedure parameters $ret = ociexecute($mycursor); // Execute function $ret = ociexecute($outrefc); // Execute cursor $nrows = ocifetchstatement($outrefc, $data); // fetch data from cursor ocifreestatement($mycursor); // close procedure call ocifreestatement($outrefc); // close cursor //var_dump($data); echo " <div id ='subStadiumBox'class='subStadiumBox'>"; for ($p = 0; $p < count($data["NAME_TEAM"]); $p++) { $nombre = $data["NAME_TEAM"][$p]; echo "<script type='text/javascript'>anadirEquipo('{$nombre}');</script>"; } OCILogoff($conn);
</div> <div class="Evento_Seg_Titulo">MUJERES</div> <div id="Eventos_Mujeres" class="ContenerdorEventos"> <?php $conn = OCILogon($user, $pass, $db); $outrefc = ocinewcursor($conn); //Declare cursor variable $mycursor = ociparse($conn, "begin getInfoEvents(:curs,1); end;"); // prepare procedure call ocibindbyname($mycursor, ':curs', $outrefc, -1, OCI_B_CURSOR); // bind procedure parameters $ret = ociexecute($mycursor); // Execute function $ret = ociexecute($outrefc); // Execute cursor $nrows = ocifetchstatement($outrefc, $listaEventos); // fetch data from cursor ocifreestatement($mycursor); // close procedure call ocifreestatement($outrefc); // close cursor for ($p = 0; $p < count($listaEventos["NAME_EVENT"]); $p++) { $nombreEvento = $listaEventos["NAME_EVENT"][$p]; $fechaInicio = $listaEventos["START_DATE"][$p]; $fechaFin = $listaEventos["END_DATE"][$p]; echo "<div class='Evento'> \n <div class='Evento_Info_Box'>\n <a href='#''>\n <div class='Evento_fecha'> {$fechaInicio} -- {$fechaFin} </div>\n <div class='Evento_Nombre'> {$nombreEvento} </div>\n </a>\n <div class='Evento_Premios'>\n <a href='#'>\n <table>\n <caption>Premios</caption>\n <tr>\n <td>,</td>\n <td>,</td>\n <td>,</td>\n </tr>\n </table>\n </a>\n </div>\n </div>\n </div>"; } ?> </div> </body>
// --> </script> </head> <body onLoad="window.defaultStatus = document.title;"> <script language="php"> set_time_limit(0); $svr = (empty($_GET['svr'])? "cms_orcoff_prod": strtolower($_GET['svr'])); $svrlog = (in_array(strtolower($_GET['svrlog']), array("int9r", "cms_orcoff_int", ""))? "int9r": "int2r"); $apl = "popcon"; require(($path = "../private/")."support.inc"); print("<p class=\"aq\">\n $title\n</p>\n\n"); if($conn = @ocilogon($usr, $pwd, $tns)) { ociexecute($stmt = ociparse($conn, "select filename, 86400000 * (cast(sys_extract_utc(crontime) as date) - to_date('01-01-1970','DD-MM-YYYY')) as crontime, short_tail, long_tail from $usr.logtails order by crontime desc")); if(($nrows = ocifetchstatement($stmt, $results)) > 0) { print("<table class=\"p2k\">\n"); print(" <tr>\n"); print(" <th class=\"pl\" align=\"right\">\n id\n </th>\n"); print(" <th class=\"pl\" align=\"left\">\n file name + timestamp + tail\n </th>\n"); print(" </tr>\n"); for($i = 0; $i < $nrows; $i++) { print(" <tr valign=\"center\">\n"); print(" <td class=\"p2k\" rowspan=\"3\" align=\"right\">\n ".($i + 1).".\n </td>\n"); print(" <td class=\"p2k\">\n <b>\n ".$results['FILENAME'][$i]."\n </b>\n </td>\n"); print(" </tr>\n <tr>\n"); print(" <td class=\"p2k\">\n <script language=\"JavaScript\">\n <!--\n document.write(convert(".$results['CRONTIME'][$i]."));\n // -->\n </script>\n </td>\n"); print(" </tr>\n <tr>\n"); print(" <td class=\"p2k\">\n <div id=\"stail".str_pad($i + 1, 3, "0", STR_PAD_LEFT)."\"".($flag = ($_GET['mask']{$i} == "1")? " class=\"inv\"": "").">\n <pre>".$results['SHORT_TAIL'][$i]."</pre>\n <button onClick=\"expand(this.parentNode);\">\n expand ".($i + 1)."\n </button>\n </div>\n"); print(" <div id=\"ltail".str_pad($i + 1, 3, "0", STR_PAD_LEFT)."\"".(!$flag? " class=\"inv\"": "").">\n <textarea readonly=\"readonly\" wrap=\"off\">".$results['LONG_TAIL'][$i]."</textarea>\n <br>\n <br>\n <button onClick=\"shrink(this.parentNode);\">\n shrink ".($i + 1)."\n </button>\n </div>\n </td>\n"); print(" </tr>\n");
/** * Return number of rows * Not used within core code */ function sql_numrows($query_id = false) { if (!$query_id) { $query_id = $this->query_result; } $result = @ocifetchstatement($query_id, $this->rowset); // OCIFetchStatment kills our query result so we have to execute the statment again // if we ever want to use the query_id again. @ociexecute($query_id, OCI_DEFAULT); return $result; }
} else { $nombre = ""; } include "conexion.php"; $conn = OCILogon($user, $pass, $db); $outrefc = ocinewcursor($conn); //Declare cursor variable $mycursor = ociparse($conn, "begin get_TeamsFiltro(:curs, '{$nombre}'); end;"); // prepare procedure call ocibindbyname($mycursor, ':curs', $outrefc, -1, OCI_B_CURSOR); // bind procedure parameters $ret = ociexecute($mycursor); // Execute function $ret = ociexecute($outrefc); // Execute cursor $nrows = ocifetchstatement($outrefc, $listaEquipos); // fetch data from cursor ocifreestatement($mycursor); // close procedure call ocifreestatement($outrefc); // close cursor ?> <head> <title>Fafi Futball y Nachos</title> <title>Jugadores</title> <meta charset = "utf-8"/> <link rel="stylesheet" type="text/css" href="css/input-Style.css"/> <link rel="stylesheet" type="text/css" href="css/select-Style.css">
<?php #PutEnv("ORACLE_SID=DBS2"); #PutEnv("TNS_ADMIN=/u01/app/oracle/product/10.2.0/db_1/network/admin"); #PutEnv("LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib"); #PutEnv("ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1"); $db_conn = oci_connect("PAYTV", "Pu42ex", "(DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=10.15.193.233) (PORT=1521) ) (CONNECT_DATA= (SERVER=dedicated) (SERVICE_NAME=tsprod) ) )"); $cmdstr = "select * from P_BRANCH_SUPERVISOR"; $parsed = ociparse($db_conn, $cmdstr); ociexecute($parsed); $nrows = ocifetchstatement($parsed, $results); echo "Found: {$nrows} results<br><br>\n"; /* echo "<table border=1 cellspacing='0' width='50%'>\n"; echo "<tr>\n"; echo "<td><b>Name</b></td>\n"; echo "<td><b>Salary</b></td>\n"; echo "</tr>\n"; for ($i = 0; $i < $nrows; $i++ ) { echo "<tr>\n"; echo "<td>" . $results["ENAME"][$i] . "</td>"; echo "<td>$ " . number_format($results["SAL"][$i], 2). "</td>"; echo "</tr>\n"; } echo "</table>\n";*/ ?>
</div> <div class="GrupalPhoto"> <?php echo "<img class='resizesable' src= {$sourceEquipo}>\n </div>\n <div id ='Players' class='Players'></div>\n <div id ='Premios'class='Premios_Box'>\n "; $conn = OCILogon($user, $pass, $db); $outrefc = ocinewcursor($conn); //Declare cursor variable $mycursor = ociparse($conn, "begin getAwardsbyTeam(:curs, {$idEquipo}); end;"); // prepare procedure call ocibindbyname($mycursor, ':curs', $outrefc, -1, OCI_B_CURSOR); // bind procedure parameters $ret = ociexecute($mycursor); // Execute function $ret = ociexecute($outrefc); // Execute cursor $nrows = ocifetchstatement($outrefc, $listaPremios); // fetch data from cursor ocifreestatement($mycursor); // close procedure call ocifreestatement($outrefc); // close cursor echo " <div><h1>PREMIOS</h1></div>"; for ($i = 0; $i < count($listaPremios["NAME_AWARD"]); $i++) { $nombrePremio = $listaPremios["NAME_AWARD"][$i]; echo " <div><h2>{$nombrePremio}</h2></div>"; } $link = "Players.php?N=&ap=&nk=&gn=A&eq={$nombre}&nf=&bAva=1"; echo " <div><a href='{$link}'><h1>Ver jugadores</h1></a></div>"; ?>
</head> <body onLoad="window.defaultStatus = document.title;"> <script language="php"> set_time_limit(0); print("<p>\n Executing SQL statements...\n</p>\n"); $conn = ocilogon($usr, $pwd, $svr); require("geoip.inc"); $gi = geoip_open("geoip.dat", GEOIP_STANDARD); ociexecute(ociparse($conn, "insert into $usr.mon_log (domain, ip, country, browser, kind) values ('".strtolower(gethostbyaddr("$REMOTE_ADDR"))."', '$REMOTE_ADDR', '".geoip_country_name_by_addr($gi, $REMOTE_ADDR)."', '$HTTP_USER_AGENT', 'U')")); ocicommit($conn); geoip_close($gi); ociexecute(ociparse($conn, "begin $usr.gen_pwd; end;")); ociexecute($stmt = ociparse($conn, "select * from $usr.cms_cond_logins")); $nrows = ocifetchstatement($stmt, $results); ocifreestatement($stmt); ocilogoff($conn); print("<p>\n Writing XML file...\n</p>\n"); $xmlfiles = array("r" => array("int2r" => "readOnlyPrep.xml", "int9r" => "readOnlyInt.xml"), "w" => array("int2r" => "readWritePrep.xml", "int9r" => "readWriteInt.xml")); $svrnames = array("int2r" => "cms_orcoff_prep", "int9r" => "cms_orcoff_int"); $myf = array("r" => ($mys = "<?xml version=\"1.0\" ?>\n<connectionlist>\n"), "w" => $mys); for($i = 0; $i < $nrows; $i++) { $key = (preg_match($ptrn = "/_R$/", $results['USERNAME'][$i]) == 1 ? "r": "w"); $myf[$key] .= "<connection name=\"oracle://$svrnames[$svr]/".preg_replace($ptrn, "", $results['USERNAME'][$i])."\">\n"; $myf[$key] .= " <parameter name=\"user\" value=\"".strtolower($results['USERNAME'][$i])."\" />\n"; $myf[$key] .= " <parameter name=\"password\" value=\"".$results['PASSWORD'][$i]."\" />\n"; $myf[$key] .= "</connection>\n"; } foreach($xmlfiles as $key => $xmlfile) { if(file_exists(($path = "/afs/cern.ch/user/p/p2k/xml/").$xmlfile[$svr])) {
clientesAmbulatorios.poliza ='".$polizaActual."' AND clientesAmbulatorios.numeroE=cargosAmbulatoriosP.numeroE "; $result201=mysql_db_query($basedatos,$sSQL201); while($myrow201 = mysql_fetch_array($result201)){ $ctaMayor=$myrow201['ctaMayor']; //************************SACO CTA MAYOR Y DESCRIPCION $cmdstr5 = "select * from MATEO.CONT_CTAMAYOR WHERE ID_EJERCICIO = '".$ID_EJERCICIOM."' AND ID_CTAMAYOR ='".$ctaMayor."' AND TIPO_CUENTA='R' ORDER BY NOMBRE ASC"; $parsed5 = ociparse($db_conn, $cmdstr5); ociexecute($parsed5); $nrows5 = ocifetchstatement($parsed5,$resulta5); for ($ir = 0; $ir < $nrows5; $ir++ ){ $ID_CTAMAYOR = $resulta5['ID_CTAMAYOR'][$ir]; $DESCRIBE=$resulta5['NOMBRE'][$ir]; //echo $ID_CTAMAYOR." ".$DESCRIBE.'<br>'; } //*/**************************CIERRO********************** $ID_CCOSTO=$myrow201['ID_CCOSTO']; if($myrow201['ID_CCOSTO']){ $inserta = "insert into mateo.cont_movimiento (id_ejercicio, id_libro, id_ccosto, folio, nummovto, fecha, descripcion, importe, naturaleza, referencia, referencia2, id_Ctamayorm, id_ccostom, id_auxiliarm, status, id_ejerciciom, id_ejerciciom2, id_ejerciciom3, tipo_cuenta, id_ejercicio2) values
ocicollsize(); ocicolltrim(); ocicolumnisnull(); ocicolumnname(); ocicolumnprecision(); ocicolumnscale(); ocicolumnsize(); ocicolumntype(); ocicolumntyperaw(); ocicommit(); ocidefinebyname(); ocierror(); ociexecute(); ocifetch(); ocifetchinto(); ocifetchstatement(); ocifreecollection(); ocifreecursor(); ocifreedesc(); ocifreestatement(); ociinternaldebug(); ociloadlob(); ocilogoff(); ocilogon(); ocinewcollection(); ocinewcursor(); ocinewdescriptor(); ocinlogon(); ocinumcols(); ociparse(); ociplogon();