Primer commit del sistema avantika sin cambios
This commit is contained in:
39
modules/usuarios-detalles.php
Executable file
39
modules/usuarios-detalles.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
$empresa->AuthUser();
|
||||
|
||||
if($Usr['type'] != 'admin' && $Usr['type'] != 'direccion' && $Usr['type'] != 'gerente'){
|
||||
header('Location: '.WEB_ROOT);
|
||||
exit;
|
||||
}
|
||||
|
||||
$usuarioId = intval($_GET['id']);
|
||||
|
||||
$usuario->setUsuarioId($usuarioId);
|
||||
$info = $usuario->Info();
|
||||
|
||||
$info['type'] = $util->GetNameUsrType($info['type']);
|
||||
|
||||
if($info['sucursalId']){
|
||||
$sucursal->setSucursalId($info['sucursalId'] );
|
||||
$nomSucursal = $sucursal->GetNameById();
|
||||
$info['sucursal'] = strtoupper(utf8_decode(urldecode($nomSucursal)));
|
||||
}
|
||||
|
||||
$resSuc = $sucursal->GetSucursalesByEmpresaId();
|
||||
|
||||
$sucursales = array();
|
||||
foreach($resSuc as $res){
|
||||
$res['nombre'] = utf8_decode(urldecode($res['nombre']));
|
||||
|
||||
$usuario->setUsuarioId($usuarioId);
|
||||
$usuario->setSucursalId($res['sucursalId']);
|
||||
$res['checked'] = $usuario->IsSucChecked();
|
||||
|
||||
$sucursales[] = $res;
|
||||
}
|
||||
|
||||
$smarty->assign('info', $info);
|
||||
$smarty->assign('sucursales', $sucursales);
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user