commit 1a10cfe8514325d15cf0a1fc55da602a3d9ecef4
parent e39c56da1b43a7269a120cd211984f203201c764
Author: Yoann Bonavero <yoann.b87@voila.fr>
Date: Fri, 25 Feb 2011 12:23:41 +0100
Quelques petites améliorations dans la feuille de style.
Diffstat:
2 files changed, 50 insertions(+), 14 deletions(-)
diff --git a/code/serveur/php/createGame.php b/code/serveur/php/createGame.php
@@ -33,21 +33,44 @@ $state = 0;
<?php include("ressources/menu.html"); ?>
</div>
<div class="content">
- <form action="createGame.php" method="POST">
<?php
- if(!isset($_POST["nbcloudwords"])) {
- echo '<input type="text" name="nbcloudwords" />';
- echo '<input type="submit" value="suivant" />';
- }
- else {
- echo '<input type="text" name="centralword" />';
+ if(isset($_POST['nbcloudwords']) && $_POST['nbcloudwords'] > 0)
+ echo '<p>Remplissez le mot central ainsi que les différents mots du nuage pour réaliser un partie personalisée.<br />
+ Une fois satisfait de votre partie cliquez sur "Enregistrer la partie"';
+ else
+ echo '<p>Cette page vous permet de créer des parties personalisées en indiquant les mots qui seront affiché pour un mot central.<br /><br />
+ Veuillez entrer le nombre de mots composant le nuage dans le formulaire ci-dessous avant de continuer.</p>';
+ ?>
+ <form action="createGame.php" method="POST">
+ <table class="creategametbl">
+ <?php
+ if(!isset($_POST["nbcloudwords"])) {
+ echo '<tr><td><label for="nbcloudwords"> Nombre de mots du nuage : </label></td>';
+ echo '<td><input type="text" name="nbcloudwords" /></td></tr>';
+ echo '<tr><td id="td2"></td><td><input type="submit" value="suivant" /></td></tr>';
+ }
+ else {
+ echo '<tr><td colspan="2"><label for="centralword">Mot central : </label><br /><br /></td>';
+ echo '<td colspan="2" id="td2"><input type="text" name="centralword" /><br /><br /></td>';
- for($i = 0; $i < $_POST['nbcloudwords']; $i++)
- echo '<input type="text" name="word'.$i.'" />';
+ for($i = 0; $i < $_POST['nbcloudwords']; $i++) {
+ if($i % 2 == 0) {
+ echo '</tr><tr><td><label for="word'.$i.'">Mot '.($i+1).' : </label></td>';
+ echo '<td id="td2"><input type="text" name="word'.$i.'" /></td>';
+ }
+ else {
+ echo '<td><label for="word'.$i.'">Mot '.($i+1).' : </label></td>';
+ echo '<td id="td2"><input type="text" name="word'.$i.'" /></td>';
+ }
+ }
- echo '<input type="submit" value="Enregistrer la partie" />';
- }
- ?>
+ if($_POST['nbcloudwords'] % 2 != 0)
+ echo '<td></td>';
+
+ echo '</tr><tr><td colspan="2"></td><td colspan="2" id="td2"><input type="submit" value="Enregistrer la partie" /></td></tr>';
+ }
+ ?>
+ </table>
</form>
</div>
diff --git a/code/serveur/php/ressources/simple.css b/code/serveur/php/ressources/simple.css
@@ -44,19 +44,32 @@
margin-left : 2%;
}
-.logintbl, .contacttbl, .signuptbl {
+.logintbl, .contacttbl, .signuptbl, .creategametbl {
margin-left : 4%;
}
.logintbl td, .contactbl td, .signuptbl td {
+ width : 50%;
text-align : right;
padding-left : 5px;
padding-right : 5px;
}
-.logintbl input[type=submit], .contacttbl input[type=submit], .signuptbl input[type=submit] {
+.creategametbl td {
+ width : 25%;
+ text-align : right;
+ padding-left : 5px;
+ padding-right : 5px;
+}
+
+.logintbl #td2, .contactbl #td2, .signuptbl #td2, .creategametbl #td2 {
+ text-align : left;
+}
+
+.logintbl input[type=submit], .contacttbl input[type=submit], .signuptbl input[type=submit], .creategametbl input[type=submit] {
display : block;
margin-left : 0px;
+ margin-top : 2em;
}
.contacttbl textarea {