recreate project

This commit is contained in:
root
2026-02-10 22:11:06 -05:00
commit 663c0cdbda
10149 changed files with 1379710 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
<?= $this->extend('layout/management_layout') ?>
<?= $this->section('content') ?>
<div class="container mt-4">
<h3>Competition Winners</h3>
<p class="text-muted">Published competition winner announcements.</p>
<div class="list-group">
<?php foreach ($competitions as $c): ?>
<a class="list-group-item list-group-item-action"
href="/winners/competitions/<?= $c['id'] ?>">
<div class="d-flex justify-content-between">
<div>
<strong><?= esc($c['title']) ?></strong>
</div>
<small class="text-muted"><?= esc($c['published_at'] ?? '') ?></small>
</div>
</a>
<?php endforeach; ?>
<?php if (empty($competitions)): ?>
<div class="alert alert-info">No winners published yet.</div>
<?php endif; ?>
</div>
</div>
<?= $this->endSection() ?>
+43
View File
@@ -0,0 +1,43 @@
<?= $this->extend('layout/management_layout') ?>
<?= $this->section('content') ?>
<div class="container mt-4">
<a href="/winners/competitions" class="btn btn-outline-secondary btn-sm mb-3">&larr; Back</a>
<h3><?= esc($competition['title']) ?></h3>
<div class="text-muted mb-3">
Published: <?= esc($competition['published_at'] ?? '') ?>
</div>
<?php if (empty($winnersByClass)): ?>
<div class="alert alert-info">No winners found.</div>
<?php else: ?>
<?php foreach ($winnersByClass as $classId => $rows): ?>
<?php
$classLabel = $sectionMap[$classId] ?? ('Class ' . $classId);
$questions = $questionCounts[$classId] ?? null;
?>
<h5 class="mt-4"><?= esc($classLabel) ?></h5>
<?php if ($questions !== null): ?>
<div class="text-muted mb-2">Questions: <?= esc($questions) ?></div>
<?php endif; ?>
<table class="table table-bordered" data-no-mgmt-sticky>
<thead class="table-light">
<tr><th style="width:90px;">Rank</th><th>Student</th><th style="width:140px;">Score</th><th style="width:160px;">Prize</th></tr>
</thead>
<tbody>
<?php foreach ($rows as $w): ?>
<tr>
<td><?= esc($w['rank']) ?></td>
<td><?= esc($w['name']) ?></td>
<td><?= esc($w['score']) ?></td>
<td><?= esc(!empty($w['prize_amount']) ? $w['prize_amount'] : '-') ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endforeach; ?>
<?php endif; ?>
</div>
<?= $this->endSection() ?>