isLoggedIn()) { redirectTo('login.php'); } $surveyId = isset($_GET['id']) ? (int)$_GET['id'] : null; if (!$surveyId) { redirectTo('surveys.php'); } // Get survey details $surveyManager = SurveyManager::getInstance(); $survey = $surveyManager->getSurveyDetails($surveyId, $_SESSION['user_id']); if (!$survey) { redirectTo('surveys.php'); } // Get survey questions $questions = $surveyManager->getSurveyQuestions($surveyId); ?>
| "; foreach ($columns as $column) { $html .= " | " . htmlspecialchars($column) . " | "; } $html .= "
|---|---|
| " . htmlspecialchars($row) . " | "; foreach ($columns as $colIndex => $column) { $name = $type === 'radio' ? "q_{$questionId}_{$rowIndex}" : "q_{$questionId}_{$rowIndex}[]"; $html .= ""; } $html .= " |
" . htmlspecialchars($question['help_text']) . "
"; } $html .= "