|
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/ |
Upload File : |
<?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_once('./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;\">Invalid User</div>";
}else{
$seleccion = (array_key_exists('seleccion', $_REQUEST)) ? $_REQUEST['seleccion']: NULL;
$usuarioW = new UsuarioWeb();
$usuarioW->setFiles(2);
$panel->reactivarDB();
$user = $usuarioW->getUsuario("id",$seleccion);
$estadoAplicacion = $panel->aplicativo->getEstadoUsuario($seleccion);
$user['estado']=$estadoAplicacion;
if(!$user){
$panel->mostrarMensaje($usuarioW->salida['msg']);
}
$userModificar = "";
$userEliminar = "";
$userAdicionar = "";
if($panel->usuario->tipo==3 && $panel->usuario->vinculo->modificar=="NO" && $panel->usuario->vinculo->administrador=="NO"){
$userModificar = "disabled";
}
if($panel->usuario->tipo==3 && $panel->usuario->vinculo->eliminar=="NO" && $panel->usuario->vinculo->administrador=="NO"){
$userEliminar= "disabled";
}
if($panel->usuario->tipo==3 && $panel->usuario->vinculo->adicionar=="NO" && $panel->usuario->vinculo->administrador=="NO"){
$userAdicionar= "disabled";
}
if($panel->usuario->tipo==3 && $panel->usuario->vinculo->administrador=="NO"){
$userAdministrar= "disabled";
}
?>
<html>
<head>
<link href="css/panel2.css" rel="stylesheet" type="text/css">
<link href="css/panel2Contenido.css" rel="stylesheet" type="text/css">
<link href="css/scrollbar.css" rel="stylesheet" type="text/css">
<link href="css/scrollbar2.css" rel="stylesheet" type="text/css">
<script src="js/validaciones.js"></script>
<script>
if (history.forward(1)){location.replace(history.forward(1))}
</script>
<script>
function restringir(evt, ascii) //event
{
var nav4 = window.Event ? true : false;
var key = nav4 ? evt.which : evt.keyCode;
return (key!=ascii);
}
function habilitar(){
document.getElementById("apli").style.display = "inline";
document.getElementById("apli").style.visibility = "visible";
}
function deshabilitar(){
document.getElementById("apli").style.visibility = "hidden";
document.getElementById("apli").style.display = "none";
}
function todos(ind,est){
eval("document.frm.admin_"+ind+".checked="+est);
eval("document.frm.adicionar_"+ind+".checked="+est);
eval("document.frm.consultar_"+ind+".checked="+est);
eval("document.frm.modificar_"+ind+".checked="+est);
eval("document.frm.eliminar_"+ind+".checked="+est);
}
function selecciono(){
var tipe = document.frm.tipo.options[document.frm.tipo.selectedIndex].value;
if(tipe=="3"){
apl = document.frm.cantidad.value;
sal = 0;
for(i=0;i<apl;i++){
val1 = eval("document.frm.admin_"+i+".checked");
val2 = eval("document.frm.adicionar_"+i+".checked");
val3 = eval("document.frm.consultar_"+i+".checked");
val4 = eval("document.frm.modificar_"+i+".checked");
val5 = eval("document.frm.eliminar_"+i+".checked");
if(val1||val2||val3||val4||val5){
sal++;
}
}
if( (sal>0&&document.frm.tipo.options[document.frm.tipo.selectedIndex].value==3) || (document.frm.tipo.options[document.frm.tipo.selectedIndex].value==2) ) {
if(fncCheckFormRegistro(document.frm,0,1,2,3,5,6)){
document.frm.submit();
}
}else{
alert("Debe seleciconar por lo menos una aplicaci�n para disposicion de este usuario, dando un perfil de trabajo para el mismo!");
return false;
}
}else{
if(fncCheckFormRegistro(document.frm,0,1,2,3,5,6)){
document.frm.submit();
}
}
}
function valores(obj){
var val = obj.options[obj.selectedIndex].value;
if( val == 2){
deshabilitar();
return;
}
if( val == 3){
habilitar();
return;
}
}
function fncCheckFormSearch(form) {
var busc = form.buscar.value;
if(busc == '')
{
alert('The search field can not be empty');
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;
}
function reLoad(obj){
var ind = obj.selectedIndex;
var est = obj.options[ind].value;
document.location.href= 'l_productos.php?seleccion=<?=$seleccion?>&estado='+est;
}
</script>
</head>
<body>
<table width="610" border="0" align="left" cellpadding="2" cellspacing="2" class="toexto1">
<tr bgcolor="#cccccc">
<td colspan="4" align="left"><div align="lleft" 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 id="migaindexss" href="listUsuarios.php" class="migas" onMouseOver="javascript: mgOver(this);" onMouseOut="javascript: mgOut(this);"> Usuarios </a>
</div></td>
</tr>
<tr><td>
<table width="610" border="0" align="left" cellpadding="2" cellspacing="2">
<tr>
<td height="14" colspan="4" valign="top"> <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= 'valores_config/index.php'" value="Parameters" <?=$userAdministrar?>>
</tr>
</table>
</td></tr>
<form action="fnc/main.php?tarea=modUsuariowebEstado" method="post" id="frm" name="frm" target="_blank">
<tr>
<td colspan="4" align="left" class="texto1"><div align="left">(*) fields are mandatory.</div></td>
</tr>
<tr class="texto1">
<td colspan="4" bgcolor="#000099">
<table width="100%" cellspacing="0" border="0" bgcolor="#FFFFFF">
<tr valign="top" bgcolor="#000099" class="texto1">
<td width="79"><span class="titular1"><a onClick="javascript: document.location.href= 'listUsuarios.php'" title="Volver" style="cursor:hand; width:40"><img src="img/atras.gif" style="cursor:hand "></a></span></td>
<td colspan="3"><span class="titular1"><strong>Data of the user:</strong></span></td>
</tr>
<tr valign="top" class="texto1">
<td width="79"><div align="left">
<label for="nombre">Nombres </label>
:</div></td>
<td colspan="3"><div align="left"><?=ucfirst(strtolower($user['nombres']))?>
<input name="apellidos" type="hidden" id="apellidos" value="<?=ucfirst(strtolower($user['nombres']))?>" size="65" maxlength="100">
</div></td>
</tr>
<tr valign="top" class="texto1">
<td width="79"><div align="left">
<label for="nombre">Last name </label>
:</div></td>
<td colspan="3"><div align="left"><?=ucfirst(strtolower($user['apellidos']))?>
<input name="apellidos" type="hidden" id="apellidos" value="<?=ucfirst(strtolower($user['apellidos']))?>" size="65" maxlength="100">
</div></td>
</tr>
<tr valign="top" class="texto1">
<td width="79"><div align="left">
<label for="nombre">Correo Electrónico </label>
:</div></td>
<td colspan="3" valign="bottom"><?=strtolower($user['email'])?>
<input name="email" type="hidden" id="email" onKeyDown="return restringir(event, 32);" value="<?=strtolower($user['email'])?>" size="65" maxlength="50"></td>
</tr>
<tr valign="top" class="texto1">
<td><div align="left">
<label for="label">Login</label>
:
<label for="aplicacion"></label>
</div></td>
<td><div align="left"><?=$user['login']?>
<input name="login" type="hidden" id="login" onKeyDown="return restringir(event, 32);" value="<?=$user['login']?>" maxlength="50">
</div></td>
<td><label for="tipo">Status:</label> </td>
<td><select name="estado" style="width:133" disabled>
<option value="activo" <? if($user['estado']=="activo"){echo "selected";}?>>ACTIVE</option>
<option value="bloqueado" <? if($user['estado']=="bloqueado"){echo "selected";}?>>DISABLED</option>
</select></td>
</tr>
<tr valign="top" class="texto1">
<td><div align="left">
<label for="pwd1">Password</label>
:</div></td>
<td width="161"><div align="left"><?=$user['password']?>
<input name="password" type="hidden" id="password" onKeyDown="return restringir(event, 32);" value="<?=$user['password']?>" maxlength="50">
</div></td>
<td width="97"> </td>
<td width="182"><div align="left"><input name="password_" type="hidden" id="password_" onKeyDown="return restringir(event, 32);" value="<?=$user['password']?>" maxlength="50">
</div></td>
</tr>
<tr class="texto1">
<td valign="top"><div align="left">
<label for="pwd1">Sexo</label>
:</div></td>
<td><?=$user['sexo']?></td>
<td valign="top"> </td>
<td> </td>
</tr>
<tr class="texto1">
<td valign="top"><label>Ciudad</label></td>
<td> <?=$user['ciudad']?>
<input name="ciudad" type="hidden" id="ciudad" onKeyDown="return restringir(event, 32);" value="<?=$user['ciudad']?>" maxlength="40"></td>
<td valign="top"><label>Teléfono Fijo </label></td>
<td> <?=$user['telefono_fijo']?><input name="telefono_fijo" type="hidden" id="telefono_fijo" onKeyDown="return restringir(event, 32);" value="<?=$user['telefono_fijo']?>" maxlength="10"></td>
</tr>
<tr class="texto1">
<td valign="top"><label>Pais</label></td>
<td> <?=$user['pais']?>
<input name="pais" type="hidden" id="pais" onKeyDown="return restringir(event, 32);" value="<?=$user['pais']?>" maxlength="40"></td>
<td valign="top"><label>Teléfono Movil </label></td>
<td> <?=$user['telefono_movil']?><input name="telefono_movil" type="hidden" id="telefono_movil" onKeyDown="return restringir(event, 32);" value="<?=$user['telefono_movil']?>" maxlength="12"></td>
</tr>
<tr class="texto1">
<td valign="top"> </td>
<td colspan="3"><input type="hidden" name="seleccion" value="<?=$user['id']?>"></td>
</tr>
<tr class="texto1">
<td colspan="4" valign="top"><div align="center">
</div></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><div align="center">
<input name="Submit" type="button" class="boton1" onClick="javascript:document.location.href = 'listUsuarios.php'" value="Aceptar" <?=$userModificar?>>
</div></td>
</tr>
</form>
</table>
</body>
</html>
<? }?>