Hi,
The project need to have the table filtered for 2 creteria.
I put the code below in the Before SQL query of list Page:
if (($_SESSION["Nivel"] !="A") and ($_SESSION["Nivel"] !="S"))
{
$strWhereClause = whereAdd('', 'id_empresa = '.$_SESSION["Empresa"].' and id_gerencia = '.$_SESSION["Gerencia"]);
}
else
{
if ($_SESSION["Nivel"] == "S")
{
$strWhereClause = whereAdd('', 'id_empresa = '.$_SESSION["Empresa"]);
}
}
It worked fine, but the advanced search always return all the records.
The search works fine if the filter above is deleted.
What I am doing wrong?
Att,
Almeida