www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 465e1ff669eb1bc22dec4462b9103b5102f97768
parent 72d979d98d23b90d502c6d55a6039c903e964a18
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date:   Fri,  4 Mar 2011 17:05:58 +0100

Petites corrections sur le commit précédent.

Diffstat:
Mcode/serveur/php/pticlic.php | 23-----------------------
Mcode/serveur/php/server.php | 22++++++++++++++++++++++
Mcode/serveur/php/showGame.php | 23++++++++++++++++-------
3 files changed, 38 insertions(+), 30 deletions(-)

diff --git a/code/serveur/php/pticlic.php b/code/serveur/php/pticlic.php @@ -6,29 +6,6 @@ function checkLogin($db, $user, $passwd) { return $loginIsOk; } -/** Ecrit un rapport d'erreur dans un fichier. -* @param errNum : Numéro de l'erreur. -* @param msg : Description de l'erreur. -* @param [other] : (Optionnel) Complément d'information. -*/ -function logError($errNum, $msg, $other="") -{ - $file = fopen("./log.txt","a+"); - - // Met en forme la chaine contenant les paramètres de la requête. - $dumpParameters = str_replace("(\n","",print_r($_GET,true)); - $dumpParameters = str_replace(")\n","",$dumpParameters); - - fwrite($file,"\nErreur n° ".$errNum); - fwrite($file," : ".$msg); - if(!empty($other)) - fwrite($file,"\n ".$other); - fwrite($file,"\n ".$dumpParameters); - - fclose($file); -} - - /** Selectionne aléatoirement un noeud. */ function randomCenterNode($db) diff --git a/code/serveur/php/server.php b/code/serveur/php/server.php @@ -3,6 +3,28 @@ require_once("pticlic.php"); require_once("db.php"); +/** Ecrit un rapport d'erreur dans un fichier. +* @param errNum : Numéro de l'erreur. +* @param msg : Description de l'erreur. +* @param [other] : (Optionnel) Complément d'information. +*/ +function logError($errNum, $msg, $other="") +{ + $file = fopen("./log.txt","a+"); + + // Met en forme la chaine contenant les paramètres de la requête. + $dumpParameters = str_replace("(\n","",print_r($_GET,true)); + $dumpParameters = str_replace(")\n","",$dumpParameters); + + fwrite($file,"\nErreur n° ".$errNum); + fwrite($file," : ".$msg); + if(!empty($other)) + fwrite($file,"\n ".$other); + fwrite($file,"\n ".$dumpParameters); + + fclose($file); +} + /** La fonction principale. * @param action : Un identifiant d'action. */ diff --git a/code/serveur/php/showGame.php b/code/serveur/php/showGame.php @@ -1,7 +1,6 @@ <?php session_start(); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <title>PtiClic sous Android™ - Version Alpha - Accueil</title> @@ -14,19 +13,29 @@ <?php include("ressources/showmsg.inc"); ?> <h2>PtiClic : Affichage de parties</h2> <?php - date_default_timezone_set('Europe/Paris'); - $SQL_DBNAME = (dirname(__FILE__) . "/db"); - + $r1 = 23; + $r2 = 15; + $textR1 = "Relation1"; + $textR2 = "Relation2"; ?> - <table> + <table class="show-game"> + <caption>Mot central</caption> <thead> <tr> <th>Mot</th> - <th><?php echo $r1 . " (" . $r1 . ")"; ?></th> - <th><?php echo $r2 . " (" . $r2 . ")"; ?></th> + <th><?php echo $textR1 . " (" . $r1 . ")"; ?></th> + <th><?php echo $textR2 . " (" . $r2 . ")"; ?></th> <th>Idée associée (0)</th> <th>Poubelle (-1)</th> </tr> + </thead> + <tbody> + <th>Foo</th> + <td>0.8</td> + <td>0.05</td> + <td>0.1</td> + <td>0.05</td> + </tbody> </table> </div> <?php include("ressources/footer.inc"); ?>