1
0
forked from qwerty/milfs

restricciones por IP

This commit is contained in:
humano 2018-12-07 11:38:40 -05:00
parent 3faef0cc5d
commit 63f72f1853

View File

@ -19208,6 +19208,71 @@ return "$resultado";
}
$xajax->registerFunction("sucursales");
function ipes($id_usuario,$accion){
$respuesta = new xajaxResponse('utf-8');
$real_ip = getRealIP();
if($accion ==""){
$resultado ="
<li class='list-group-item '>
<div class=''>IPs Permitidas</div>
<div class='btn-group'>
<div class='btn btn-success disabled'>Internet</div>
<div class='btn btn-primary'>Local</div>
<div class='btn btn-primary'>Definir IPs</div>
$real_ip
</div>
$sucursales_permitidas
</li>
";
}
elseif($accion =="ipes"){
}
else{}
return "$resultado";
}
$xajax->registerFunction("sucursales");
function getRealIP()
{
if (isset($_SERVER["HTTP_CLIENT_IP"]))
{
return $_SERVER["HTTP_CLIENT_IP"];
}
elseif (isset($_SERVER["HTTP_X_FORWARDED_FOR"]))
{
return $_SERVER["HTTP_X_FORWARDED_FOR"];
}
elseif (isset($_SERVER["HTTP_X_FORWARDED"]))
{
return $_SERVER["HTTP_X_FORWARDED"];
}
elseif (isset($_SERVER["HTTP_FORWARDED_FOR"]))
{
return $_SERVER["HTTP_FORWARDED_FOR"];
}
elseif (isset($_SERVER["HTTP_FORWARDED"]))
{
return $_SERVER["HTTP_FORWARDED"];
}
else
{
return $_SERVER["REMOTE_ADDR"];
}
}
function sucursales_permitidas($id_sucursal,$id_usuario,$onchange,$accion){
$respuesta = new xajaxResponse('utf-8');
@ -19405,6 +19470,7 @@ $consulta= "SELECT *, usuarios_grupo.id AS id_grupo , $tabla_autenticacion.id AS
//$ = editar_campo("$tabla_autenticacion",$row['id_usuario'],"","","","");
$listado_formularios = formulario_permisos_usuario("","$id",'');
$listado_sucursales = sucursales("$id",'');
$listado_ipes = ipes("$id",'');
$subir_imagen = subir_imagen("","imagen","milfs");
$subir_firma = subir_imagen("","firma","milfs");
$resultado .= "
@ -19457,8 +19523,9 @@ $consulta= "SELECT *, usuarios_grupo.id AS id_grupo , $tabla_autenticacion.id AS
<div class='col-xs-6'>$equipo</div>
</div>
</li>
<li class='list-group-item '><div class=''> $listado_formularios</div></li>
<li class='list-group-item ' id='li_listado_formularios_permitidos'><div class=''> $listado_formularios</div></li>
$listado_sucursales
$listado_ipes
<li class='list-group-item '>
<h3>Firma escaneada</h3>
<div class='img-rounded img-responsive ' id='banner_firma' style='