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/catalogo/valores_config/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/logicswapweb/aplicaciones/admon/catalogo/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/utileria.php');
include('./../../usuariosWeb/fnc/usuarioWeb.php');
include('./../fnc/Producto.php');
include('./../fnc/Categoria.php');
include('./../fnc/Catalogo.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;\">Usuario Invalido</div>";
}else{

$panel->reactivarDB();

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

$parametros_catalogo = $panel->aplicativo->parametro->getParametros($panel->aplicativo->id,$panel->aplicativo->nombre);

$max_pro = $panel->aplicativo->numeroMaximoDeProductosPorCategoriaCreado();
$max_cate = $panel->aplicativo->numeroSubCategoriasCategoria();
$max_sub = $panel->aplicativo->numeroMaximoDeSubcategoriasCreado(true);
//$parametros_catalogo = $panel->aplicativo->parametro->getParametros($panel->aplicativo->id,$panel->aplicativo->nombre);

?>

<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 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 validacionesCatalogo()
{
	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_categoria")
			{
				//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 categor�as debe ser mayor a 0");
					return false;
				}
				if( b < <? echo $max_cate;?>)
				{
				alert("El n�mero de categor�as 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_subcategoria")
			{
				var b = document.frm.elements['valor'+ a.substring(6,a.length)].value;

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

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

				if( b < <? echo $max_pro;?>)
				{
				alert("El n�mero de productos existentes por categor�a("+<? echo $max_pro;?>+") es mayor al especificado. Por favor ingrese otro valor.");
									return false;
				}
				if( b == 0)
				{
				alert("El n�mero de productos debe ser al menos 1.");
									return false;
				}
			}

			if(document.frm.elements[i].value == "num_ancho")
			{
				//alert('valor'+ a.substring(6,a.length));
				var b = document.frm.elements['valor'+ a.substring(6,a.length)].value;
				//alert(b);
				if(b <= 0)
				{
					alert("El ancho debe ser mayor a 0.");
					return false;
				}
				
			}
			if(document.frm.elements[i].value == "num_alto")
			{
				//alert('valor'+ a.substring(6,a.length));
				var b = document.frm.elements['valor'+ a.substring(6,a.length)].value;
				//alert(b);
				if(b <= 0)
				{
					alert("El alto debe ser mayor a 0.");
					return false;
				}
				
			}
		
		}
	}
	return true;

}

function validar(user){
	if(validacionesCatalogo() == 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;
			}
		}	
	}
	
}
function reLoad(obj){
	var ind = obj.selectedIndex;
	var est = obj.options[ind].value;
	document.location.href= '../l_productos.php?seleccion=<?=$seleccion?>&estado='+est;
}
function fncCheckFormSearch(form) {

	var busc = form.buscar.value;
	if(busc == '')
	{
		alert('El campo de busqueda no puede estar vacio');
		return false;
	}
	if ( !lengSpaceNess(busc) || specialChar(busc,true,true,true)) {
				alert("El campo buscar no debe de empezar o terminar con espacios en blanco, o contener caracteres diferentes a los imprimibles directamente por el teclado!");
				return false;
	}

	return true;
} 
</script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</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);">start</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 par&aacute;meters</span>
		</td>
    </tr>
    <tr>
      <td ><img src="img/menu.gif" width="49" height="22" align="top">
        <input name="tem2" type="button" class="boton1" style="width:55 "onClick="javascript: document.location.href= '../index.php'" value="Catalog">

		<input name="tem222" type="button" class="boton1" style="width:90 " onClick="javascript: document.location.href= 'index.php'" value="Parameters" <?=$userAdministrar?>></td>
    </tr>

    <tr>
      <td align="left">
		<form name="frm" target="_fra_user" action="../fnc/main.php?tarea=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>
                <td colspan="2" valign="top" bgcolor=#ffffff><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