true]); } else { echo json_encode(['success' => false, 'message' => 'Invalid Admin ID or Password!']); } exit; } if ($_GET['action'] === 'logout') { session_destroy(); header('Location: index.php'); exit; } if ($_GET['action'] === 'download_sample_csv') { header('Content-Type: text/csv; charset=utf-8'); header('Content-Disposition: attachment; filename=sample_client_outreach.csv'); $output = fopen('php://output', 'w'); fputcsv($output, ['Business Name', 'Mobile Number', 'Category', 'Address']); fputcsv($output, ['Shreeji Multispeciality Clinic', '9825101122', 'Doctor', 'Naranpura Ahmedabad']); fputcsv($output, ['Apex Pathology Lab', '9898234561', 'Pathology', 'Navrangpura Ahmedabad']); fputcsv($output, ['Soni & Soni Tax Advisors', '9426012345', 'CA / Tax', 'Ashram Road Ahmedabad']); fclose($output); exit; } if ($_GET['action'] === 'export_excel') { header('Content-Type: application/vnd.ms-excel; charset=utf-8'); header('Content-Disposition: attachment; filename=Raudra_Map_Leads_Export.xls'); $pdo = new PDO('sqlite:' . DB_FILE); $st = $pdo->query("SELECT business_name, mobile, email, address, category, status, created_at FROM campaign_outreach_logs WHERE source_type = 'MAP' ORDER BY id DESC"); $rows = $st->fetchAll(PDO::FETCH_ASSOC); echo "
| Company Name | Mobile No | Email Id | Address | Category | Status | Date |
|---|---|---|---|---|---|---|
| " . htmlspecialchars($row['business_name'] ?? '') . " | "; echo "" . htmlspecialchars($row['mobile'] ?? '') . " | "; echo "" . htmlspecialchars($row['email'] ?? '') . " | "; echo "" . htmlspecialchars($row['address'] ?? '') . " | "; echo "" . htmlspecialchars($row['category'] ?? '') . " | "; echo "" . htmlspecialchars($row['status'] ?? '') . " | "; echo "" . htmlspecialchars($row['created_at'] ?? '') . " | "; echo "
| No map leads found in database. | ||||||
5000+ Lead Fetcher & WhatsApp Dispatcher
Authorized Admin Login Required
Part 1: CSV Upload | Part 2: Map 5000+ Auto-Fetcher & XLS Export
Independent CSV Dispatcher
Name, Mobile, Category, Address
Test format
Fetch up to 5,000 leads & Export to XLS
| Source | Company Name | Category | Mobile No | Email Id | Address | Status | Instant Action |
|---|