123
This commit is contained in:
parent
d8e46675be
commit
7dc21c2972
BIN
assets/pasted-20251118-104242-29c69e9a.png
Normal file
BIN
assets/pasted-20251118-104242-29c69e9a.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 197 KiB |
23
index.php
23
index.php
@ -1,4 +1,19 @@
|
||||
<?php require_once 'partials/header.php'; ?>
|
||||
<?php
|
||||
if (session_status() == PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Burnout Survey</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container mt-4">
|
||||
|
||||
<main class="container my-5">
|
||||
<div class="row justify-content-center">
|
||||
@ -23,4 +38,8 @@
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php require_once 'partials/footer.php'; ?>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
session_start();
|
||||
if (session_status() == PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
74
results.php
74
results.php
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
require_once 'partials/header.php';
|
||||
if (session_status() == PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
if (!isset($_SESSION['results'])) {
|
||||
// Redirect to the main page if no results are available
|
||||
@ -19,17 +21,30 @@ unset($_SESSION['question_index']);
|
||||
unset($_SESSION['results']);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Your Burnout Analysis</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container mt-4">
|
||||
<div class="card">
|
||||
<div class="card-header text-center">
|
||||
<h1>Your Burnout Analysis</h1>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<?php if (!empty($analysis['overallSummary'])): ?>
|
||||
<?php if (!empty($analysis['overallSummary'])):
|
||||
?>
|
||||
<div class="alert alert-light" role="alert">
|
||||
<h4 class="alert-heading">Overall Summary</h4>
|
||||
<p><?php echo htmlspecialchars($analysis['overallSummary']); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@ -38,27 +53,35 @@ unset($_SESSION['results']);
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h2>Analysis</h2>
|
||||
<?php if (!empty($analysis['exhaustionSummary'])): ?>
|
||||
<?php if (!empty($analysis['exhaustionSummary'])):
|
||||
?>
|
||||
<h5>Exhaustion</h5>
|
||||
<p><?php echo htmlspecialchars($analysis['exhaustionSummary']); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($analysis['cynicismSummary'])): ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php if (!empty($analysis['cynicismSummary'])):
|
||||
?>
|
||||
<h5>Cynicism</h5>
|
||||
<p><?php echo htmlspecialchars($analysis['cynicismSummary']); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($analysis['inefficacySummary'])): ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
<?php if (!empty($analysis['inefficacySummary'])):
|
||||
?>
|
||||
<h5>Inefficacy</h5>
|
||||
<p><?php echo htmlspecialchars($analysis['inefficacySummary']); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="my-4">
|
||||
|
||||
<h2>Recommendations</h2>
|
||||
<?php if (!empty($recommendations)): ?>
|
||||
<?php if (!empty($recommendations)):
|
||||
?>
|
||||
<div class="accordion" id="recommendationsAccordion">
|
||||
<?php foreach ($recommendations as $index => $rec): ?>
|
||||
<?php foreach ($recommendations as $index => $rec):
|
||||
?>
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="heading<?php echo $index; ?>">
|
||||
<button class="accordion-button <?php echo $index > 0 ? 'collapsed' : ''; ?>" type="button" data-bs-toggle="collapse" data-bs-target="#collapse<?php echo $index; ?>" aria-expanded="<?php echo $index === 0 ? 'true' : 'false'; ?>" aria-controls="collapse<?php echo $index; ?>">
|
||||
@ -71,30 +94,40 @@ unset($_SESSION['results']);
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<?php else:
|
||||
?>
|
||||
<p>No specific recommendations available at this time.</p>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
<hr class="my-4">
|
||||
|
||||
<h2>Next Steps</h2>
|
||||
<?php if (!empty($nextSteps)): ?>
|
||||
<?php if (!empty($nextSteps)):
|
||||
?>
|
||||
<ul>
|
||||
<?php foreach ($nextSteps as $step): ?>
|
||||
<?php foreach ($nextSteps as $step):
|
||||
?>
|
||||
<li><?php echo htmlspecialchars($step); ?></li>
|
||||
<?php endforeach; ?>
|
||||
<?php
|
||||
endforeach; ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<?php else:
|
||||
?>
|
||||
<p>No specific next steps available at this time.</p>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
endif; ?>
|
||||
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
<a href="index.php" class="btn btn-primary">Take the Survey Again</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<script>
|
||||
const scores = <?php echo json_encode($scores); ?>;
|
||||
@ -124,4 +157,5 @@ unset($_SESSION['results']);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php require_once 'partials/footer.php'; ?>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user