alert('$msg');";
}
}
$janW = '500';
$janH = '400';
$compl = '';
if (isset($_GET['pesquisa']) && $_GET['pesquisa']) {
$compl = PreparaLike($filtro, true);
$compl = sprintf("and (a.nome ilike %s or a.razao_social ilike %s)", $compl, $compl);
}
$query = "SELECT id, nome, razao_social FROM pbx_empresa a where 1=1 $compl order by id asc";
$params = "&pbxRequest=1&numRamal=$filtro";
$links = PaginaDados($idProg, $query, $params, $regPagina, $offSet, $pagMostra, true);
$query .= " limit $regPagina offset $offSet";
$result = pg_query($dbcon, $query);
?>