prepare(" SELECT b.batch_number, b.total_urls, b.sent_count, b.upload_type, b.created_at, p.project_name, p.project_id as project_code, p.id as project_numeric_id FROM survey_url_batches b JOIN projects p ON b.project_id = p.project_id WHERE b.project_id = ? AND b.batch_number = ? AND p.client_id = ? "); $stmt->execute([$project_id, $batch_number, $client_id]); $batch = $stmt->fetch(PDO::FETCH_ASSOC); if (!$batch) { $_SESSION['error'] = "Batch not found"; header('Location: projects-list.php'); exit; } // Get pagination - ensure integers $page = isset($_GET['page']) ? max(1, (int)$_GET['page']) : 1; $per_page = 50; $offset = ($page - 1) * $per_page; // Get URLs with pagination $stmt = $pdo->prepare(" SELECT id, client_url, rr_proxy_url, unique_identifier, is_sent, status, sent_to_user_id, sent_at, created_at FROM survey_urls WHERE project_id = ? AND batch_number = ? ORDER BY id ASC LIMIT " . (int)$per_page . " OFFSET " . (int)$offset . " "); $stmt->execute([$project_id, $batch_number]); $urls = $stmt->fetchAll(PDO::FETCH_ASSOC); $total_pages = ceil($batch['total_urls'] / $per_page); } catch (Exception $e) { $error = "Error loading URLs: " . $e->getMessage(); $urls = []; $batch = null; } // Status badge configuration function getStatusBadge($status) { $badges = [ 'available' => ['class' => 'badge-secondary', 'text' => 'Available'], 'sent' => ['class' => 'badge-info', 'text' => 'Sent'], 'clicked' => ['class' => 'badge-clicked', 'text' => 'Clicked'], 'complete' => ['class' => 'badge-success', 'text' => 'Complete'], 'partial' => ['class' => 'badge-warning', 'text' => 'Partial'], 'earlyscreenout' => ['class' => 'badge-danger', 'text' => 'Early Screenout'], 'latescreenout' => ['class' => 'badge-danger', 'text' => 'Late Screenout'], 'quotafull' => ['class' => 'badge-secondary', 'text' => 'Quota Full'], 'timeout' => ['class' => 'badge-timeout', 'text' => 'Timeout'] ]; return $badges[$status] ?? ['class' => 'badge-secondary', 'text' => ucfirst($status)]; } include 'client-portal-header.php'; ?>

Batch # Survey URLs

← Back to Project
Total URLs
Available
Upload Type
Created
Unique ID Relevant Reflex URL Client Survey URL Status
>
1): ?>
📋

No URLs Found

This batch doesn't have any URLs yet.