Пример #1
0
function ProduceOutput($ec_output, $reservas)
{
    global $msgstr, $arrHttp, $signatura, $msg_1, $cont, $institution_name, $db_path, $lang_db, $copies_title;
    include "../common/header.php";
    echo "<body>";
    include "../common/institutional_info.php";
    ?>
<script  src="../dataentry/js/lr_trim.js"></script>
<script>
document.onkeypress =
  function (evt) {
    var c = document.layers ? evt.which
            : document.all ? event.keyCode
            : evt.keyCode;
	if (c==13)
		self.location.href='prestar.php?encabezado=s<?php 
    echo $link_u;
    ?>
'
    return true;
  };

function DevolverRenovar(Proceso) {
	if (Proceso=="D"){
		document.devolver.action="devolver_ex.php"
	}else{
		if (Vigencia=="N"){
			alert("<?php 
    echo $msgstr["norenew"];
    ?>
");
			return
		}
		document.devolver.action="renovar_ex.php"
	}
	marca="N"
	switch (np){     // número de préstamos del usuario
		case 1:
			if (document.ecta.chkPr.checked){
				document.devolver.searchExpr.value=document.ecta.chkPr.id
				atraso=document.ecta.chkPr.value
				politica=document.ecta.politica.value
				marca="S"
			}
			break
		default:
			for (i=0;i<document.ecta.chkPr.length;i++){
				if (document.ecta.chkPr[i].checked){
					marca="S"
					document.devolver.searchExpr.value=document.ecta.chkPr[i].id
					atraso=document.ecta.chkPr[i].value
					politica=document.ecta.politica[i].value
					break
				}
			}
	}
	fecha_d="<?php 
    echo date("Ymd");
    ?>
"
	if (marca=="S"){
		p=politica.split('|')
		if (Proceso=="R"){    // si es una renovación
			if (p[6]==0){     // the object does not accept renovations\
				alert("<?php 
    echo $msgstr["noitrenew"];
    ?>
")
				return
			}
			if (atraso!=0){
				if (p[13]!="Y"){
					alert("<?php 
    echo $msgstr["loanoverdued"];
    ?>
")
					return
				}
			}
			if (Trim(p[15])!=""){
				if (fecha_d>p[15]){
					alert("<?php 
    echo $msgstr["limituserdate"];
    ?>
"+": "+p[15])
					return
				}
			}
			if (Trim(p[16])!=""){
				if (fecha_d>p[16]){
					alert("<?php 
    echo $msgstr["limitobjectdate"];
    ?>
"+": "+p[16])
					return
				}
			}

			if (nMultas!=0){
				alert("<?php 
    echo $msgstr["norenew"];
    ?>
")
				return
			}
		}
		document.devolver.submit()
	}else{
		alert("<?php 
    echo $msgstr["markloan"];
    ?>
")
	}
}

function PagarMultas(){
	Mfn=""
	switch (nMultas){
		case 1:
			if (document.ecta.pay.checked){
            	Mfn=document.ecta.pay.value
			}
			break
		default:
			for (i=0;i<nMultas;i++){
				if (document.ecta.pay[i].checked){
					Mfn+=document.ecta.pay[i].value+"|"
				}
			}
			break
	}
	if (Mfn==""){
		alert("<?php 
    echo $msgstr["selfine"];
    ?>
")
		return
	}
	document.multas.Mfn.value=Mfn
	document.multas.submit()
}

function DeleteSuspentions(){
	Mfn=""
	switch (nSusp){
		case 1:
			if (document.ecta.susp.checked){
            	Mfn=document.ecta.susp.value
			}
			break
		default:
			for (i=0;i<nSusp;i++){
				if (document.ecta.susp[i].checked){
					Mfn+=document.ecta.susp[i].value+"|"
				}
			}
			break
	}
	if (Mfn==""){
		alert("<?php 
    echo $msgstr["selsusp"];
    ?>
")
		return
	}
	document.multas.Mfn.value=Mfn
	document.multas.submit()
}
</script>
<body>
<div class="sectionInfo">
	<div class="breadcrumb">
		<?php 
    echo $msgstr["statment"];
    ?>
	</div>
	<div class="actions">
		<?php 
    include "submenu_prestamo.php";
    ?>
	</div>
	<div class="spacer">&#160;</div>
</div>
<div class="helper">
<?php 
    echo "<a href=../documentacion/ayuda.php?help=" . $_SESSION["lang"] . "/circulation/loan.html target=_blank>" . $msgstr["help"] . "</a>&nbsp &nbsp;";
    if (isset($_SESSION["permiso"]["CENTRAL_EDHLPSYS"])) {
        echo "<a href=../documentacion/edit.php?archivo=" . $_SESSION["lang"] . "/circulation/loan.html target=_blank>" . $msgstr["edhlp"] . "</a>";
    }
    echo "<font color=white>&nbsp; &nbsp; Script: usuarios_prestamos_presentar.php </font>\r\n\t</div>";
    // prestar, reservar o renovar
    ?>
<div class="middle form">
	<div class="formContent">
<form name=ecta>
<?php 
    echo $ec_output;
    if ($reservas != "") {
        echo "<P><font color=red><strong>" . $msgstr["total_copies"] . ": " . count($copies_title) . ". " . $msgstr["item_reserved"] . "</strong></font><br>";
        echo $reservas;
    }
    ?>
</div></div>
<?php 
    include "../common/footer.php";
    ?>
</body>
</html>

<?php 
    if (isset($arrHttp["recibo"])) {
        ImprimirRecibo($arrHttp["recibo"]);
    }
    if (isset($arrHttp["error"])) {
        echo "<script>\r\n\t\t\t\talert('" . $arrHttp["error"] . "')\r\n\t\t\t\t</script>\r\n\t\t";
    }
Пример #2
0
		<input type="button" name="list" value="<?php 
echo $msgstr["list"];
?>
" class="submit" onclick="javascript:AbrirIndiceAlfabetico();return false"/>
		<input type="submit" name="reservar" value="<?php 
echo $msgstr["return"];
?>
" xclass="submitAdvanced" onclick="javascript:EnviarForma()"/>
		</td></table>
		<?php 
echo $msgstr["clic_en"] . " <i>[" . $msgstr["return"] . "]</i> " . $msgstr["para_c"];
?>
	</form>
	</div>
<?php 
if (isset($arrHttp["usuario"])) {
    include "ec_include.php";
    echo "<div class=formContent>{$ec_output}</div>";
}
?>

</div>
<?php 
include "../common/footer.php";
echo "</body></html>";
if (isset($arrHttp["recibo"])) {
    ImprimirRecibo($arrHttp["recibo"]);
}
if (isset($arrHttp["error"])) {
    echo "<script>\r\n\t\t\talert('" . $arrHttp["error"] . "')\r\n\t\t\t</script>\r\n\t";
}