One Hat Cyber Team
Your IP :
216.73.216.36
Server IP :
162.240.179.46
Server :
Linux vps-14493116.nutrivittasaude.com.br 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
Server Software :
Apache
PHP Version :
8.2.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
lifeprimeti
/
meta.lifeprimeti.com.br
/
api
/
View File Name :
busca_fornecedores.php
<?php require_once __DIR__ . '/../config/database.php'; requireAdmin(); $q = trim($_GET['q'] ?? ''); $empresaId = (int)($_GET['empresa_id'] ?? getEmpresaId()); if (strlen($q) < 3) { header('Content-Type: application/json'); echo json_encode([]); exit; } $stmt = $pdo->prepare("SELECT id, nome_fantasia, razao_social, cpf_cnpj FROM fornecedores WHERE empresa_id = ? AND ativo = 1 AND (nome_fantasia LIKE ? OR razao_social LIKE ? OR cpf_cnpj LIKE ?) ORDER BY nome_fantasia LIMIT 20"); $like = "%{$q}%"; $stmt->execute([$empresaId, $like, $like, $like]); $results = $stmt->fetchAll(); header('Content-Type: application/json'); echo json_encode($results);