* @link http://www.orfeolibre.org * @version SVN: $Id$ * @since */ /*---------------------------------------------------------+ | INCLUDES | +---------------------------------------------------------*/ /*---------------------------------------------------------+ | DEFINICIONES | +---------------------------------------------------------*/ /*---------------------------------------------------------+ | MAIN | +---------------------------------------------------------*/ /********************************************************************************* * Filename: pedidos.php * Generated with CodeCharge 2.0.5 * PHP 4.0 build 11/30/2001 *********************************************************************************/ //------------------------------- // pedidos CustomIncludes begin session_start(); include ("./common.php"); include ("./encabezado.php"); // pedidos CustomIncludes end //------------------------------- //=============================== // Save Page and File Name available into variables //------------------------------- $sFileName = "pedidos.php"; //=============================== //$db->conn->debug=true; //=============================== // pedidos PageSecurity begin check_security(); // pedidos PageSecurity end //=============================== //=============================== // pedidos Open Event begin // pedidos Open Event end //=============================== //=============================== // pedidos OpenAnyPage Event start // pedidos OpenAnyPage Event end //=============================== //=============================== //Save the name of the form and type of action into the variables //------------------------------- $sAction = get_param("FormAction"); $sForm = get_param("FormName"); //=============================== // pedidos Show begin //=============================== // Display page //=============================== // HTML Page layout //------------------------------- ?> Archivo - Manejo de prestamos y devoluciones
Radicado
Login Usuario
Dependencia
conn->numToString("P.RADI_NUME_RADI"); $sSQL = "select P.DEPE_CODI as P_DEPE_CODI, " . "P.PRES_DESC as P_PRES_DESC, " . "P.PRES_ESTADO as P_PRES_ESTADO, " . "P.PRES_FECH_DEVO as P_PRES_FECH_DEVO, " . "P.PRES_FECH_PEDI as P_PRES_FECH_PEDI, " . "P.PRES_FECH_PRES as P_PRES_FECH_PRES, " . "P.PRES_ID as P_PRES_ID, " . "P.PRES_REQUERIMIENTO as P_PRES_REQUERIMIENTO, " . "$radiATexto as P_RADI_NUME_RADI, " . "P.USUA_LOGIN_ACTU as P_USUA_LOGIN_ACTU, " . "P.USUA_LOGIN_PRES as P_USUA_LOGIN_PRES, " . "U.USUA_LOGIN as U_USUA_LOGIN, " . "U.USUA_NOMB as U_USUA_NOMB, " . "D.DEPE_CODI as D_DEPE_CODI, " . "D.DEPE_NOMB as D_DEPE_NOMB " . " from PRESTAMO P, USUARIO U, DEPENDENCIA D" . " where U.USUA_LOGIN=P.USUA_LOGIN_ACTU and D.DEPE_CODI=P.DEPE_CODI "; //------------------------------- //------------------------------- // Pedidos Open Event begin $depe=get_session("Dependencia"); $sWhere .= " AND P.PRES_ESTADO = 1 AND PRES_DEPE_ARCH=".$depe; // Pedidos Open Event end //------------------------------- //------------------------------- // Assemble full SQL statement //------------------------------- $sSQL .= $sWhere . $sOrder; if($sCountSQL == "") { $iTmpI = strpos(strtolower($sSQL), "select"); $iTmpJ = strpos(strtolower($sSQL), "from") - 1; $sCountSQL = str_replace(substr($sSQL, $iTmpI + 6, $iTmpJ - $iTmpI - 6), " count(*) ", $sSQL); $iTmpI = strpos(strtolower($sCountSQL), "order by"); if($iTmpI > 1) $sCountSQL = substr($sCountSQL, 0, $iTmpI - 1); } //------------------------------- //------------------------------- // Execute SQL statement //------------------------------- //$db->conn->debug=true; $db->conn->SetFetchMode(ADODB_FETCH_ASSOC); $rs=$db->query($sSQL); $db->conn->SetFetchMode(ADODB_FETCH_NUM); //------------------------------- // Process empty recordset //------------------------------- if(!$rs || $rs->EOF) { ?>
Radicado Usuario Dependencia Fecha Solicitud Requerimiento
No hay Registros
MoveNext(); } while ($iCounter < ($iPage - 1) * $iRecordsPerPage && !$rs->EOF); } $iCounter = 0; //------------------------------- //------------------------------- // Display grid based on recordset //------------------------------- while( $rs && !$rs->EOF && $iCounter < $iRecordsPerPage) { //------------------------------- // Create field variables based on database fields //------------------------------- $fldDEPE_CODI =$rs->fields["D_DEPE_NOMB"]; $fldPRES_DESC =$rs->fields["P_PRES_DESC"]; $fldPRES_FECH_PEDI =$rs->fields["P_PRES_FECH_PEDI"]; $fldPRES_ID =$rs->fields["P_PRES_ID"]; $fldPRES_REQUERIMIENTO =$rs->fields["P_PRES_REQUERIMIENTO"]; $fldRADI_NUME_RADI_URLLink = "prestar.php"; $fldRADI_NUME_RADI_PRES_ID =$rs->fields["P_PRES_ID"]; $fldRADI_NUME_RADI =$rs->fields["P_RADI_NUME_RADI"]; $fldUSUA_LOGIN_ACTU =$rs->fields["U_USUA_NOMB"]; $rs->MoveNext(); //------------------------------- // Pedidos Show begin //------------------------------- //------------------------------- // Pedidos Show Event begin // Pedidos Show Event end //------------------------------- //------------------------------- // Process the HTML controls //------------------------------- ?>           EOF ) || $iPage != 1) { $iCounter = 1; $iHasPages = $iPage; $sPages = ""; $iDisplayPages = 0; $iNumberOfPages = 10; while(($rs || !$rs->EOF ) && $iHasPages < $iPage + $iNumberOfPages) { if($iCounter == $iRecordsPerPage) { $iCounter = 0; $iHasPages = $iHasPages + 1; } $iCounter++; $rs->MoveNext(); } if($rs->EOF && $iCounter > 1) $iHasPages++; if (($iHasPages - $iPage) < intval($iNumberOfPages / 2)) $iStartPage = $iHasPages - $iNumberOfPages; else $iStartPage = $iPage - $iNumberOfPages + intval($iNumberOfPages / 2); if($iStartPage < 0) $iStartPage = 0; for($iPageCount = $iStartPage + 1; $iPageCount <= $iPage - 1; $iPageCount++) { $sPages .= "" . $iPageCount . " "; $iDisplayPages++; } $sPages .= "" . $iPage . " "; $iDisplayPages++; $iPageCount = $iPage + 1; while ($iDisplayPages < $iNumberOfPages && $iStartPage + $iDisplayPages < $iHasPages) { $sPages .= "" . $iPageCount . " "; $iDisplayPages++; $iPageCount++; } if ($iPage == 1) { ?> Primero Anterior Primero Anterior EOF) { ?> Siguiente Ultimo Siguiente Ultimo