mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-25 02:20:32 +02:00
Redesign du site
This commit is contained in:
@ -1,47 +1,34 @@
|
||||
<?php
|
||||
require_once "header.php";
|
||||
|
||||
if ($has_error) {
|
||||
echo "<h2>Erreur : " . $error_message . "</h2>";
|
||||
} elseif (isset($save_solution)) {
|
||||
echo "<h2>Le fichier a été correctement envoyé !</h2>";
|
||||
}
|
||||
?>
|
||||
if (!$has_error && isset($save_solution)) { ?>
|
||||
<div class="alert alert-success">
|
||||
Le fichier a été correctement envoyé !
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?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">
|
||||
<?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>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="problem">Problème :</label>
|
||||
<select class="custom-select" id="problem" name="problem">
|
||||
<?php
|
||||
for ($i = 1; $i <= 9; ++$i) {
|
||||
echo "<option value=\"$i\">$i</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="file">Fichier :</label>
|
||||
<input class="form-control" type="file" id="file" name="solution"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input class="btn btn-lg btn-primary btn-block" type="submit" name="send_solution" value="Envoyer" />
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
@ -55,7 +42,7 @@ foreach ($solutions as $sol) {
|
||||
$file_id = $sol->getFileId();
|
||||
$problem = $sol->getProblem();
|
||||
$version = $sol->getVersion();
|
||||
echo "Problème $problem (Version $version) : <a href=\"/file/$file_id\">Télécharger</a><br />";
|
||||
echo "<div class=\"alert alert-info\"><strong>Problème $problem</strong> (Version $version) : <a href=\"/file/$file_id\">Télécharger</a></div>\n";
|
||||
}
|
||||
|
||||
if ($team->isSelectedForFinal()) { ?>
|
||||
@ -68,7 +55,7 @@ if ($team->isSelectedForFinal()) { ?>
|
||||
$file_id = $sol->getFileId();
|
||||
$problem = $sol->getProblem();
|
||||
$version = $sol->getVersion();
|
||||
echo "Problème $problem (Version $version) : <a href=\"/file/$file_id\">Télécharger</a><br />";
|
||||
echo "<div class=\"alert alert-info\"><strong>Problème $problem</strong> (Version $version) : <a href=\"/file/$file_id\">Télécharger</a></div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user