* @link http://www.orfeolibre.org * @version SVN: $Id$ * @since */ /*---------------------------------------------------------+ | INCLUDES | +---------------------------------------------------------*/ /*---------------------------------------------------------+ | DEFINICIONES | +---------------------------------------------------------*/ /*---------------------------------------------------------+ | MAIN | +---------------------------------------------------------*/ /********************************************************************************* * Filename: devolver.php * Generated with CodeCharge 2.0.5 * PHP 4.0 build 11/30/2001 *********************************************************************************/ //------------------------------- // devolver CustomIncludes begin session_start(); include ("./common.php"); include ("./encabezado.php"); // devolver CustomIncludes end //------------------------------- //=============================== // Save Page and File Name available into variables //------------------------------- $sFileName = "devolver.php"; //=============================== //=============================== // devolver PageSecurity begin check_security(); // devolver PageSecurity end //=============================== //=============================== // devolver Open Event begin // devolver Open Event end //=============================== //=============================== // devolver OpenAnyPage Event start // devolver OpenAnyPage Event end //=============================== //=============================== //Save the name of the form and type of action into the variables //------------------------------- $sAction = get_param("FormAction"); $sForm = get_param("FormName"); //=============================== // devolver Show begin //=============================== // Perform the form's action //------------------------------- // Initialize error variables //------------------------------- $sPRESTAMOErr = ""; //------------------------------- // Select the FormAction //------------------------------- switch ($sForm) { case "PRESTAMO": D_PRESTAMO_action($sAction); break; } //=============================== //=============================== // Display page //=============================== // HTML Page layout //------------------------------- ?>
"; //------------------------------- // PRESTAMO Check Event begin // PRESTAMO Check Event end //------------------------------- if(strlen($sPRESTAMOErr)) return; } //------------------------------- //------------------------------- // Create SQL statement //------------------------------- switch(strtolower($sAction)) { case "update": //------------------------------- // PRESTAMO Update Event begin $fldPRES_FECH_DEVO = "to_date('" .$fldPRES_FECH_DEVO . "','dd/mm/yyyy HH:MI')"; // PRESTAMO Update Event end //------------------------------- if($sSQL == "") { $sSQL = "update PRESTAMO set " . "PRES_FECH_DEVO=" . $fldPRES_FECH_DEVO . ",PRES_DESC=" . tosql($fldPRES_DESC, "Text") . ",PRES_ESTADO=" . tosql($fldPRES_ESTADO, "Number"); $sSQL .= " where " . $sWhere; } break; } //------------------------------- //------------------------------- // PRESTAMO BeforeExecute Event begin // PRESTAMO BeforeExecute Event end //------------------------------- //------------------------------- // Execute SQL statement //------------------------------- if(strlen($sPRESTAMOErr)) return; if($bExecSQL) $db->query($sSQL); // include_once($sActionFileName); //------------------------------- // PRESTAMO Action end //------------------------------- } //=============================== // Display Record Form //------------------------------- function D_PRESTAMO_show() { global $db; global $sAction; global $sForm; global $sFileName; global $sPRESTAMOErr; global $styles; $fldPRES_ID = ""; $fldPRES_FECH_DEVO = ""; $fldPRES_DESC = ""; $fldPRES_ESTADO = ""; //------------------------------- // PRESTAMO Show begin //------------------------------- $sFormTitle = "Devolucion"; $sWhere = ""; $bPK = true; ?> query($sSQL); $bIsUpdateMode = ($bPK && !($sAction == "insert" && $sForm == "PRESTAMO") && ($rs && !$rs->EOF) ); //------------------------------- //------------------------------- // Load all fields into variables from recordset or input parameters //------------------------------- if($bIsUpdateMode) { $fldPRES_ID =$rs->fields["PRES_ID"]; //------------------------------- // Load data from recordset when form displayed first time //------------------------------- if($sPRESTAMOErr == "") { $fldPRES_FECH_DEVO =$rs->fields["PRES_FECH_DEVO"]; $fldPRES_DESC =$rs->fields["PRES_DESC"]; $fldPRES_ESTADO =$rs->fields["PRES_ESTADO"]; } //------------------------------- // PRESTAMO ShowEdit Event begin // PRESTAMO ShowEdit Event end //------------------------------- } else { if($sPRESTAMOErr == "") { $fldPRES_ID = tohtml(get_param("PRES_ID")); $fldPRES_FECH_DEVO= Date ('d-M-y');; } //------------------------------- // PRESTAMO ShowInsert Event begin // PRESTAMO ShowInsert Event end //------------------------------- } if($sPRESTAMOErr == "") { //------------------------------- // PRESTAMO Show Event begin $fldPRES_FECH_DEVO = Date('d/m/Y h:i'); // PRESTAMO Show Event end //------------------------------- } //------------------------------- // Show form field //------------------------------- ?>
Fecha de devolución
Observaciones extras
Estado