1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-25 01:40:30 +02:00

Améliorations du code

This commit is contained in:
Yohann
2019-09-08 01:35:05 +02:00
committed by galaxyoyo
parent 3cc66ef783
commit a25ec69ae9
23 changed files with 558 additions and 457 deletions

View File

@ -7,56 +7,70 @@ if (isset($error_message)) {
} else {
echo "<h2>Le fichier a été correctement envoyé !</h2>";
}
}?>
} ?>
<?php if (date("yyyy-mm-dd") < $tournament->getSolutionsDate()) { ?>
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="5000000" />
<table style="width: 100%;">
<tbody>
<tr>
<td>
<label for="problem">Problème :</label>
</td>
<td>
<select style="width: 100%;" id="problem" name="problem">
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="5000000"/>
<table style="width: 100%;">
<tbody>
<tr>
<td>
<label for="problem">Problème :</label>
</td>
<td>
<select style="width: 100%;" id="problem" name="problem">
<?php
for ($i = 1; $i <= 9; ++$i) {
echo "<option value=\"$i\">$i</option>\n";
}
?>
</select>
</td>
</tr>
<tr>
<td>
<label for="file">Fichier :</label>
</td>
<td>
<input type="file" id="file" name="solution" />
</td>
</tr>
<tr>
<td colspan="2">
<input style="width: 100%;" type="submit" name="send_solution" value="Envoyer" />
</td>
</tr>
</tbody>
</table>
</form>
</select>
</td>
</tr>
<tr>
<td>
<label for="file">Fichier :</label>
</td>
<td>
<input type="file" id="file" name="solution"/>
</td>
</tr>
<tr>
<td colspan="2">
<input style="width: 100%;" type="submit" name="send_solution" value="Envoyer"/>
</td>
</tr>
</tbody>
</table>
</form>
<?php } ?>
<hr />
<hr/>
<h2>Solutions soumises :</h2>
<h2>Solutions soumises :</h2>
<?php
while (($data = $solutions_req->fetch()) !== false) {
$file_id = $data["file_id"];
$problem = $data["problem"];
$version = $data["version"];
/** @var Solution $sol */
foreach ($solutions as $sol) {
$file_id = $sol->getFileId();
$problem = $sol->getProblem();
$version = $sol->getVersion();
echo "Problème $problem (Version $version) : <a href=\"$URL_BASE/file/$file_id\">Télécharger</a><br />";
}
if ($team->isSelectedForFinal()) { ?>
<hr/>
<h2>Solutions soumises pour la finale :</h2>
<?php
/** @var Solution $sol */
foreach ($solutions_final as $sol) {
$file_id = $sol->getFileId();
$problem = $sol->getProblem();
$version = $sol->getVersion();
echo "Problème $problem (Version $version) : <a href=\"$URL_BASE/file/$file_id\">Télécharger</a><br />";
}
}
require_once "footer.php";