This commit is contained in:
Adrien MALINGREY 2025-05-05 23:18:26 +02:00
parent c09ed80a52
commit 4b92464c94
11 changed files with 26 additions and 36 deletions

0
400.php Normal file → Executable file
View File

0
classes.php Normal file → Executable file
View File

0
favicon.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 542 B

0
head.php Normal file → Executable file
View File

0
index.php Normal file → Executable file
View File

0
manifest.php Normal file → Executable file
View File

0
service-worker.js Normal file → Executable file
View File

0
style.css Normal file → Executable file
View File

View File

@ -36,47 +36,37 @@
<form id='sudokuForm' class='needs-validation' novalidate> <form id='sudokuForm' class='needs-validation' novalidate>
<table id='grid' class='table mb-2'> <table id='grid' class='table mb-2'>
<tbody> <tbody>
<?php <?php for ($row = 0; $row < 81; $row += 9): ?>
for ($row = 0; $row < 81; $row += 9) {
?>
<tr class="input-group d-inline-block w-auto"> <tr class="input-group d-inline-block w-auto">
<?php <?php for ($column = 0; $column < 9; $column++): $value = $currentGrid[$row+$column]; ?>
for ($column = 0; $column < 9; $column++) { <?php if ($value == UNKNOWN): ?>
$value = $currentGrid[$row+$column];
if ($value == UNKNOWN) {
?>
<td><input type='number' min='1' max='9' step='1' value='' class='form-control' /></td> <td><input type='number' min='1' max='9' step='1' value='' class='form-control' /></td>
<?php <?php else: ?>
} else {
?>
<td><input type='number' min='1' max='9' step='1' value='<?=$value?>' class='form-control' disabled /></td> <td><input type='number' min='1' max='9' step='1' value='<?=$value?>' class='form-control' disabled /></td>
<?php <?php endif ?>
} <?php endfor?>
} </tr>
?> <?php endfor?>
</tr> </tbody>
<?php </table>
} </form>
?> <div class='d-flex mb-4'>
</tbody> <div id='insertRadioGroup' class='radioGroup btn-group flex-fill'>
</table> <input type='radio' class='btn-check' id='insertRadio0' value='' name='insertRadioGroup' onclick='insert(this)' accesskey='0' checked /><label for='insertRadio0' class='btn btn-primary' title='Clavier'><i class="ri-input-cursor-move"></i></label>
</form> <?php for($value=1; $value<=9; $value++): ?>
<div class='d-flex mb-4'> <input type='radio' class='btn-check' id='insertRadio<?=$value?>' value='<?=$value?>' name='insertRadioGroup' onclick='insert(this)' accesskey='<?=$value?>' disabled />
<div id='insertRadioGroup' class='radioGroup btn-group flex-fill'> <label for='insertRadio<?=$value?>' class='btn btn-primary' title='Insérer un <?=$value?>'><?=$value?></label>
<input type='radio' class='btn-check' id='insertRadio0' value='' name='insertRadioGroup' onclick='insert(this)' accesskey='0' checked /><label for='insertRadio0' class='btn btn-primary' title='Clavier'><i class="ri-input-cursor-move"></i></label> <?php endfor ?>
<?php </div>
for($value=1; $value<=9; $value++) { </div>
echo " <input type='radio' class='btn-check' id='insertRadio$value' value='$value' name='insertRadioGroup' onclick='insert(this)' accesskey='$value' disabled /><label for='insertRadio$value' class='btn btn-primary' title='Insérer un $value'>$value</label>\n"; <div class='mb-3'>
} <?php if (isset($warning)): ?>
?> <strong>⚠️ <?=$warning?> ⚠️</strong><br/>
<?php else: ?>
Remplissez la grille de sorte que chaque ligne, colonne et région (carré de 3×3 cases) contienne tous les chiffres de 1 à 9.
<?php endif?>
</div> </div>
</div> </div>
<div class='mb-3'><?php
if (isset($warning))
echo("<strong>⚠️ $warning ⚠️</strong><br/>");
else
echo("Remplissez la grille de sorte que chaque ligne, colonne et région (carré de 3×3 cases) contienne tous les chiffres de 1 à 9.")
?></div>
</main> </main>
<aside class="col-md-3 text-center text-md-start"> <aside class="col-md-3 text-center text-md-start">
<div class="d-flex flex-column flex-shrink-0 p-3"> <div class="d-flex flex-column flex-shrink-0 p-3">

0
thumbnail.php Normal file → Executable file
View File

0
thumbnail.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB