Fix systematic errors in pagination, sucursal warnings, and fatal count() errors across multiple modules
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
ini_set('display_errors', 'Off'); // Suppress errors in AJAX response
|
||||
session_start();
|
||||
require_once '../init.php';
|
||||
require_once '../config.php';
|
||||
@@ -16,15 +17,27 @@
|
||||
|
||||
$empresa->setEmail($email);
|
||||
$empresa->setPassword($password);
|
||||
$empresa->setEmpresaId(15);
|
||||
$empresa->setEmpresaId("15");
|
||||
|
||||
// Check for validation errors set by setEmail, setPassword, setEmpresaId
|
||||
if($empresa->Util()->GetError())
|
||||
{
|
||||
$empresa->Util()->PrintErrors();
|
||||
echo 'fail[#]';
|
||||
exit;
|
||||
}
|
||||
|
||||
if(!$empresa->DoLogin())
|
||||
{
|
||||
// If DoLogin itself sets errors (e.g., incorrect credentials), print them here
|
||||
if($empresa->Util()->GetError()){
|
||||
$empresa->Util()->PrintErrors();
|
||||
}
|
||||
echo 'fail[#]';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'ok[#]';
|
||||
echo 'ok[#]ok';
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user