exec('SET search_path TO admin'); $_sf_total=(int)$_db->query("SELECT COUNT(*) FROM scrapping_results")->fetchColumn(); $_sf_valid=(int)$_db->query("SELECT COUNT(*) FROM scrapping_results WHERE is_verified=true")->fetchColumn(); $_sf_enriched=(int)$_db->query("SELECT COUNT(*) FROM scrapping_results WHERE full_name IS NOT NULL AND full_name!='' AND full_name LIKE '% %'")->fetchColumn(); $_sf_withCompany=(int)$_db->query("SELECT COUNT(*) FROM scrapping_results WHERE company IS NOT NULL AND company!=''")->fetchColumn(); $_sf_withLoc=(int)$_db->query("SELECT COUNT(*) FROM scrapping_results WHERE location IS NOT NULL AND location!=''")->fetchColumn(); $_sf_inCRM=(int)$_db->query("SELECT COUNT(*) FROM scrapping_results sr WHERE EXISTS (SELECT 1 FROM leads l WHERE l.email=sr.email)")->fetchColumn(); $_sf_jobs=(int)$_db->query("SELECT COUNT(*) FROM dark_scraper_jobs")->fetchColumn(); $_sf_targets=(int)$_db->query("SELECT COUNT(*) FROM scraping_targets WHERE status='active'")->fetchColumn(); $_sf_linkedin=(int)$_db->query("SELECT COUNT(*) FROM scrapping_results WHERE source_url LIKE '%linkedin%'")->fetchColumn(); $_isps=$_db->query("SELECT COALESCE(revenue_range,'Other') as isp, COUNT(*) as c FROM scrapping_results GROUP BY revenue_range ORDER BY c DESC LIMIT 10")->fetchAll(PDO::FETCH_ASSOC); $_countries=$_db->query("SELECT COALESCE(location,'Unknown') as country, COUNT(*) as c FROM scrapping_results WHERE location IS NOT NULL AND location!='' GROUP BY location ORDER BY c DESC LIMIT 8")->fetchAll(PDO::FETCH_ASSOC); $_contacts=$_db->query("SELECT COUNT(*) FROM send_contacts WHERE status='active'")->fetchColumn(); ?>
| Metric | Value | Coverage |
|---|---|---|
| Total Contacts | =number_format($_sf_total)?> | 100% |
| Verified Emails | =number_format($_sf_valid)?> | =round($_sf_valid/max($_sf_total,1)*100)?>% |
| Full Names | =number_format($_sf_enriched)?> | =round($_sf_enriched/max($_sf_total,1)*100)?>% |
| Companies | =number_format($_sf_withCompany)?> | =round($_sf_withCompany/max($_sf_total,1)*100)?>% |
| Locations | =number_format($_sf_withLoc)?> | =round($_sf_withLoc/max($_sf_total,1)*100)?>% |
| LinkedIn Sources | =number_format($_sf_linkedin)?> | =round($_sf_linkedin/max($_sf_total,1)*100)?>% |
| Synced to CRM | =number_format($_sf_inCRM)?> | =$_sf_inCRM>0?'SYNCED':'PENDING'?> |
| ISP/Provider | Count | % |
|---|---|---|
| =htmlspecialchars($i['isp'])?> | =number_format($i['c'])?> | =$pct?>% |
| Country | Count | % |
|---|---|---|
| =htmlspecialchars($c['country'])?> | =number_format($c['c'])?> | =$pct?>% |
Push all verified+enriched contacts to CRM and Send pipeline.