* @link http://www.orfeolibre.org
* @version SVN: $Id$
* @since
*/
/*---------------------------------------------------------+
| INCLUDES |
+---------------------------------------------------------*/
/*---------------------------------------------------------+
| DEFINICIONES |
+---------------------------------------------------------*/
/*---------------------------------------------------------+
| MAIN |
+---------------------------------------------------------*/
/*********************************************************************************
* Filename: busquedas.php
* Generated with CodeCharge 2.0.5
* PHP 4.0 build 11/30/2001
*********************************************************************************/
//-------------------------------
// busquedas CustomIncludes begin
session_start();
include_once ("./common.php");
include_once ("./encabezado.php");
//$db->conn->debug=true;
// busquedas CustomIncludes end
//-------------------------------
//===============================
// Save Page and File Name available into variables
//-------------------------------
$sFileName = "busquedas.php";
//===============================
//===============================
// busquedas PageSecurity begin
check_security();
// busquedas PageSecurity end
//===============================
//===============================
// busquedas Open Event begin
// busquedas Open Event end
//===============================
//===============================
// busquedas OpenAnyPage Event start
// busquedas OpenAnyPage Event end
//===============================
//===============================
//Save the name of the form and type of action into the variables
//-------------------------------
$sAction = get_param("FormAction");
$sForm = get_param("FormName");
//===============================
// busquedas Show begin
//===============================
// Display page
//===============================
// HTML Page layout
//-------------------------------
?>
//-------------------------------
// Search Show end
//-------------------------------
//-------------------------------
// Search Close Event begin
// Search Close Event end
//-------------------------------
//===============================
}
//===============================
// Display Grid Form
//-------------------------------
function PRESTADOS_show()
{
//-------------------------------
// Initialize variables
//-------------------------------
global $db;
global $sPRESTADOSErr;
global $sFileName;
global $styles;
$sWhere = "";
$sOrder = "";
$sSQL = "";
$sFormTitle = "Documentos Prestados";
$HasParam = false;
$iRecordsPerPage = 100;
$iCounter = 0;
$iPage = 0;
$bEof = false;
$iSort = "";
$iSorted = "";
$sDirection = "";
$sSortParams = "";
$iTmpI = 0;
$iTmpJ = 0;
$sCountSQL = "";
$transit_params = "";
$form_params = "s_DEPE_CODI=" . tourl(get_param("s_DEPE_CODI")) . "&s_PRES_DESC=" . tourl(get_param("s_PRES_DESC")) . "&s_PRES_ESTADO=" . tourl(get_param("s_PRES_ESTADO")) . "&s_PRES_REQUERIMIENTO=" . tourl(get_param("s_PRES_REQUERIMIENTO")) . "&s_RADI_NUME_RADI=" . tourl(get_param("s_RADI_NUME_RADI")) . "&s_USUA_LOGIN_ACTU=" . tourl(get_param("s_USUA_LOGIN_ACTU")) . "&s_USUA_LOGIN_PRES=" . tourl(get_param("s_USUA_LOGIN_PRES")) . "&s_desde_dia=" . tourl(get_param("s_desde_dia")) . "&s_desde_mes=" . tourl(get_param("s_desde_mes")) . "&s_desde_ano=" . tourl(get_param("s_desde_ano")) . "&s_hasta_dia=" . tourl(get_param("s_hasta_dia")) . "&s_hasta_mes=" . tourl(get_param("s_hasta_mes")) . "&s_hasta_ano=" . tourl(get_param("s_hasta_ano")) . "&s_solo_nomb=" . tourl(get_param("s_solo_nomb")) . "&";
//-------------------------------
// Build ORDER BY statement
//-------------------------------
$iSort = get_param("FormPRESTADOS_Sorting");
$iSorted = get_param("FormPRESTADOS_Sorted");
if(!$iSort)
{
$form_sorting = "";
$sOrder = " order by P.PRES_FECH_PEDI DESC";
}
else
{
if($iSort == $iSorted)
{
$form_sorting = "";
$sDirection = " DESC";
$sSortParams = "FormPRESTADOS_Sorting=" . $iSort . "&FormPRESTADOS_Sorted=" . $iSort . "&";
}
else
{
$form_sorting = $iSort;
$sDirection = " ASC";
$sSortParams = "FormPRESTADOS_Sorting=" . $iSort . "&FormPRESTADOS_Sorted=" . "&";
}
if ($iSort == 1) $sOrder = " order by P.RADI_NUME_RADI" . $sDirection;
if ($iSort == 2) $sOrder = " order by P.USUA_LOGIN_ACTU" . $sDirection;
if ($iSort == 3) $sOrder = " order by D.DEPE_NOMB" . $sDirection;
if ($iSort == 4) $sOrder = " order by P.PRES_FECH_PEDI" . $sDirection;
if ($iSort == 5) $sOrder = " order by P.PRES_REQUERIMIENTO" . $sDirection;
if ($iSort == 6) $sOrder = " order by P.PRES_FECH_PRES" . $sDirection;
if ($iSort == 7) $sOrder = " order by P.PRES_DESC" . $sDirection;
if ($iSort == 8) $sOrder = " order by P.PRES_FECH_DEVO" . $sDirection;
if ($iSort == 9) $sOrder = " order by P.USUA_LOGIN_PRES" . $sDirection;
if ($iSort == 10) $sOrder = " order by P.PRES_ESTADO" . $sDirection;
}
//-------------------------------
// HTML column headers
//-------------------------------
?>
//-------------------------------
// PRESTADOS Show end
//-------------------------------
//-------------------------------
// Move to the next record and increase record counter
//-------------------------------
$iCounter++;
}
// print (" $iCounter");
//-------------------------------
// Grid. The insert link and record navigator.
//-------------------------------
?>
//-------------------------------
// PRESTADOS Close Event begin
// PRESTADOS Close Event end
//-------------------------------
}
//===============================
?>