31 lines
998 B
PHP
31 lines
998 B
PHP
<?php
|
|
include_once('init.php');
|
|
include_once('config.php');
|
|
include_once(DOC_ROOT.'/libraries.php');
|
|
|
|
$empresa = new Empresa;
|
|
$empresa->AuthUser();
|
|
|
|
// $user->setUsuarioId($_SESSION["User"]["usuarioId"]); // Not needed, uses loginKey from session
|
|
$usrInfo = $user->Info();
|
|
|
|
echo "<h1>Debug Layout</h1>";
|
|
echo "WEB_ROOT constant: " . WEB_ROOT . "<br>";
|
|
echo "ENV WEB_ROOT: " . $_ENV['WEB_ROOT'] . "<br>";
|
|
echo "User Type in Session: " . $usrInfo['type'] . "<br>";
|
|
echo "<hr>";
|
|
echo "<h3>CSS Links generated:</h3>";
|
|
echo '<link href="'.WEB_ROOT.'/css/blue.css" rel="stylesheet" type="text/css" />';
|
|
echo "<br>(Check source code or network tab for 404s)";
|
|
|
|
echo "<hr>";
|
|
echo "<h3>Checking User Permissions for Menu:</h3>";
|
|
$type = $usrInfo['type'];
|
|
echo "Type: $type <br>";
|
|
if ($type == "admin" || $type == "direccion" || $type == "compras" || $type == "almacen" || $type == "gerente" || $type == "centralizador") {
|
|
echo "Show Catalogos: YES<br>";
|
|
} else {
|
|
echo "Show Catalogos: NO<br>";
|
|
}
|
|
?>
|