-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexport_interview_data.php
More file actions
32 lines (32 loc) · 941 Bytes
/
Copy pathexport_interview_data.php
File metadata and controls
32 lines (32 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
require_once APP_PATH_DOCROOT . 'ProjectGeneral/header.php';
?>
<p>Raw JSON:</p>
<textarea style='min-width: 600px; min-height: 300px; width:85%;'>
<?php
$interviews = [];
$result = $module->queryLogs("SELECT interview WHERE message = ?", ['catmh_interview']);
while ($row = db_fetch_assoc($result)) {
$interview = json_decode($row['interview']);
unset($interview->jsessionid);
unset($interview->awselb);
$interviews[] = $interview;
echo htmlspecialchars(json_encode($interview), ENT_QUOTES);
}
?>
</textarea>
<br>
<p>Human Readable Text:</p>
<textarea style='min-width: 600px; height: 100%; width:85%;'>
<?php
foreach ($interviews as $interview) {
$interviewOutput = [];
foreach ($interview as $index => $value) {
$interviewOutput[$index] = $value;
}
echo htmlspecialchars(json_encode($interviewOutput, JSON_PRETTY_PRINT), ENT_QUOTES);
}
?>
</textarea>
<?php
// require_once APP_PATH_DOCROOT . 'ProjectGeneral/footer.php';