Files
ventas_php/modules/user.php

32 lines
618 B
PHP
Executable File

<?php
$tipoUsr = $_SESSION['tipoUsr'] ?? '';
if($tipoUsr == 'Cliente'){
$Usr['type'] = 'cliente';
}else{
$Usr = $user->Info();
if(!is_array($Usr)) {
$Usr = array();
$Usr['type'] = '';
$Usr['nombre'] = 'Visitante';
$Usr['sucursal'] = '';
}
if( isset($Usr['type']) && ($Usr['type'] == 'gerente' ||
$Usr['type'] == 'facturacion' ||
$Usr['type'] == 'vendedor' ||
$Usr['type'] == 'cajero')
){
$sucursal->setSucursalId($_SESSION['idSuc']);
$Usr['sucursal'] = utf8_decode(urldecode($sucursal->GetNameById()));
}
}//else
$smarty->assign('Usr', $Usr);
?>