MANAGE PROJECT
Selections
No Selections Created Yet
Create a selection to define a subset of panel members based on specific criteria for your project.
| Name | Sample Size | Assigned | Filters | Created | Actions |
|---|---|---|---|---|---|
|
|
isLoggedIn()) { redirectTo('login.php'); } $currentUser = $auth->getCurrentUser(); $db = Database::getInstance(); $error = ''; $success = ''; // Get project ID from URL $project_id = isset($_GET['id']) ? (int)$_GET['id'] : 0; if (!$project_id) { redirectTo('projects.php'); } // Get project details $stmt = $db->prepare("SELECT * FROM projects WHERE id = ? AND created_by = ?"); $stmt->bind_param('ii', $project_id, $_SESSION['user_id']); $stmt->execute(); $project = $stmt->get_result()->fetch_assoc(); if (!$project) { // Project not found or user doesn't have access redirectTo('projects.php'); } // Check for success or error messages in session if (isset($_SESSION['success_message'])) { $success = $_SESSION['success_message']; unset($_SESSION['success_message']); } if (isset($_SESSION['error_message'])) { $error = $_SESSION['error_message']; unset($_SESSION['error_message']); } // Get connected survey $survey_query = $db->query(" SELECT s.* FROM project_surveys ps JOIN surveys s ON ps.survey_id = s.id WHERE ps.project_id = " . $project_id . " LIMIT 1 "); $connected_survey = $survey_query->fetch_assoc(); // Get existing selections for this project $stmt = $db->prepare(" SELECT s.*, COUNT(m.id) as assigned_count, DATE_FORMAT(s.created_at, '%b %d, %Y %H:%i') as formatted_date FROM selections s LEFT JOIN selection_members m ON s.id = m.selection_id WHERE s.project_id = ? GROUP BY s.id ORDER BY s.created_at DESC "); $stmt->bind_param('i', $project_id); $stmt->execute(); $selections_result = $stmt->get_result(); $selections = []; while ($row = $selections_result->fetch_assoc()) { $selections[] = $row; } ?>
Create a selection to define a subset of panel members based on specific criteria for your project.
| Name | Sample Size | Assigned | Filters | Created | Actions |
|---|---|---|---|---|---|
|
|