|
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/noticias/tb_parametrica/ |
Upload File : |
<?
include("../../generales/config_panel.php");
include("../../generales/config_permisos.php");
include("../../generales/operabd.php");
include("met_parametrica.php");
if (isset($identificador)) list($parametrica_grupo, $parametrica_id)= explode(';',$identificador);
if(isset($modparametro)){
if($modparametro==1){
if (!isset($parametrica_valor))
mod_pardescripcion($parametrica_grupo, $parametrica_id, $parametrica_descripcion);
else{
if($parametrica_grupo=='nt_maxnot'){
$resvalidacion=validaparametro($parametrica_id, $parametrica_valor);
if($resvalidacion) mod_parvalor($parametrica_grupo, $parametrica_id, $parametrica_valor);
else echo "<script> alert ('Valor de par�metro errado');</script>";
}else mod_parvalor($parametrica_grupo, $parametrica_id, $parametrica_valor);
}
}
}else{
$parametrica_descripcion=retdescripcion($parametrica_id);
if($parametrica_descripcion==NULL) $parametrica_valor=retvalor($parametrica_grupo,$parametrica_id);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>modificar Parametros</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../../css/panel2.css" rel="stylesheet" type="text/css">
<link href="../../css/panel2Contenido.css" rel="stylesheet" type="text/css">
<link href="../../css/scrollbar2.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="610" border="0" align="left" cellpadding="0" cellspacing="0">
<tr valign="top" bgcolor="#FFFFFF">
<td width="100%" height="20" bgcolor="#CCCCCC" class="migasactivo">
<a id="iniMenu" class="migas" href="../../contenido.php" style="cursor:hand; " onMouseOver="javascript: mgOver(this);" onMouseOut="javascript: mgOut(this);" title="Indice de Aplicaciones">Beginning</a>
<span class="migas">/</span>
<a id="op1Menu" class="migas" href="../menu.php" style="cursor:hand; " onMouseover="javascript: mgOver(this);" onMouseOut="javascript: mgOut(this);;" title="Men� de Noticias">Menu</a>
<span class="migas">/</span>
<a id="op2Menu" class="migas" href="parametros.php" style="cursor:hand; " onMouseover="javascript: mgOver(this);" onMouseOut="javascript: mgOut(this);;" title="Men� de Noticias">Par�metros</a>
<span class="migas">/</span>Modificar Temas
</td>
</tr>
<tr>
<td height="30" colspan="4"><? btn_aplnoticias($apl_permisos);?></td>
</tr>
<tr>
<th scope="row">
<table width="100%" cellpadding="0" cellspacing="1" bordercolor="#0000FF" bgcolor="#000099">
<tr>
<td align="left" bgcolor="#000099" class="nombreColum"><span class="filatitulo"><a onClick="javascript: document.location.href= 'parametros.php'" title="Volver" style="cursor:hand; width:40"><img src="../../img/atras.gif" style="cursor:hand "></a> </span><span class="titular1">Datos del par�metro</span></td>
</tr>
<tr>
<td bgcolor="#000099"><table width="100%" border="0" cellpadding="0" cellspacing="0" align="left" bgcolor="#ffffff">
<form method="post" enctype="multipart/form-data" name="form1">
<tr>
<td width="200" height="19" valign="top"> </td>
<td width="370"> </td>
</tr>
<tr>
<td width="200" height="19" valign="top"><div align="center" class="texto1"><strong>Código</strong></div></td>
<td width="370"><div align="center" class="texto1"><strong>
<? if (!isset($parametrica_valor)) echo 'Descripci�n';
else echo 'valor'?>
</strong></div></td>
</tr>
<tr>
<td height="19" valign="top"><div align="center">
<input name="parametrica_id" type="text" disabled class="listado" id="parametrica_id" value="<? echo $parametrica_id ?>" size="10" maxlength="10">
<input name="parametrica_grupo" type="hidden" id="parametrica_grupo" size="10" maxlength="10" value="<? echo $parametrica_grupo ?>" disabled>
</div></td>
<td><div align="center">
<? if (!isset($parametrica_valor)){ ?>
<input name="parametrica_descripcion" type="text" class="listado" id="parametrica_descripcion" onChange="valvalor(1);" value="<? echo $parametrica_descripcion ?>" size="50" maxlength="100">
<? }else{ ?>
<input name="parametrica_valor" type="text" class="listado" id="parametrica_valor" onChange="valvalor(2);" value="<? echo $parametrica_valor ?>" size="10" maxlength="10">
<? } ?>
</div></td>
</tr>
<tr>
<td height="19" valign="top"> </td>
<td> <input name="modparametro" type="hidden" id="modparametro" value="0"></td>
</tr>
<tr align="center">
<td colspan="3"><font size="3" face="Arial, Helvetica, sans-serif">
<input type="button" onClick = envia_datos() name="modificar" value="Modificar" class="boton1">
<input type="button" onClick = "javascript: document.location.href ='parametros.php'" name="cancel" value="Cancelar" class="boton1">
</font></td>
</tr>
<tr align="center">
<td colspan="3"> </td>
</tr>
</form>
</table> </td>
</tr>
</table>
�</th>
</tr>
</table>
</body>
<script src="../../generales/genjavascript.js" language="javascript"></script>
<script>
function contespacios(cadena){
contador=0;
for (i = 0; i < cadena.length; i++)
if (cadena.charAt(i) == ' ') contador++;
if(contador < cadena.length ) return false;
else return true;
}
function valvalor(opcion){
if(opcion==2){//valida valores
valor=document.form1.parametrica_valor.value;
val=fncvalidarcampo(valor,"number");
if(val==1 || val == 0){
alert("El valor no es valido");
document.form1.parametrica_valor.value=0;
document.form1.parametrica_valor.focus();
}
}
else{//valida descripcion
valor=document.form1.parametrica_descripcion.value;
val=fncvalidarcampo(valor,"alfanum");
if(val==1){
alert("La descripci�n contiene caracteres no v�lidos");
}
else if(val==0){
alert('Debe digitar una descripci�n');
}
if(val==1 || val == 0){
document.form1.parametrica_descripcion.value='';
document.form1.parametrica_descripcion.focus();
}
else if(contespacios(document.form1.parametrica_descripcion.value)){
alert('Debe digitar una descripci�n');
document.form1.parametrica_descripcion.value='';
document.form1.parametrica_descripcion.focus();
}
}
}
function envia_datos()
{
document.form1.modparametro.value = '1';
document.form1.submit();
}
</script>
</html>