fix nb mots
This commit is contained in:
		
							
								
								
									
										4
									
								
								dico.php
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								dico.php
									
									
									
									
									
								
							| @ -32,7 +32,9 @@ function dico($longueur_max) { | |||||||
|                 $mots = explode(CASE_NOIRE, $mot); |                 $mots = explode(CASE_NOIRE, $mot); | ||||||
|                 $nb_mots = count($mots); |                 $nb_mots = count($mots); | ||||||
|                 $mot = implode("", $mots); |                 $mot = implode("", $mots); | ||||||
|                 $definition .= "#$nb_mots"; |                 foreach($definitions as $i => $definition) { | ||||||
|  |                     $definitions[$i] = "$definition#$nb_mots"; | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             $dico[strlen($mot)][$mot] = $definitions; |             $dico[strlen($mot)][$mot] = $definitions; | ||||||
|  | |||||||
							
								
								
									
										18
									
								
								index.php
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								index.php
									
									
									
									
									
								
							| @ -53,11 +53,15 @@ if ($grille_valide) { | |||||||
|                 $definition = $definitions[mt_rand(0, count($definitions) - 1)]; |                 $definition = $definitions[mt_rand(0, count($definitions) - 1)]; | ||||||
|                 if (strpos($definition, "#") !== false) { |                 if (strpos($definition, "#") !== false) { | ||||||
|                     [$definition, $nb_mots] = explode("#", $definition); |                     [$definition, $nb_mots] = explode("#", $definition); | ||||||
|                     $definition .= " <small>($nb_mots mots)</small>"; |                     $nb_mots = " <small>($nb_mots mots)</small>"; | ||||||
|  |                 } else { | ||||||
|  |                     $nb_mots = ""; | ||||||
|                 } |                 } | ||||||
|                 if (strpos($definition, "@") !== false) { |                 if (strpos($definition, "@") !== false) { | ||||||
|                     [$definition, $auteur] = explode("@", $definition); |                     [$definition, $auteur] = explode("@", $definition); | ||||||
|                     $definition .= " <small><em>$auteur</em></small>"; |                     $auteur = " <small><em>$auteur</em></small>"; | ||||||
|  |                 } else { | ||||||
|  |                     $auteur = ""; | ||||||
|                 } |                 } | ||||||
|                 $definitions_horizontales[$y][] = $definition; |                 $definitions_horizontales[$y][] = $definition; | ||||||
|             } |             } | ||||||
| @ -72,13 +76,17 @@ if ($grille_valide) { | |||||||
|                 $definition = $definitions[mt_rand(0, count($definitions) - 1)]; |                 $definition = $definitions[mt_rand(0, count($definitions) - 1)]; | ||||||
|                 if (strpos($definition, "#") !== false) { |                 if (strpos($definition, "#") !== false) { | ||||||
|                     [$definition, $nb_mots] = explode("#", $definition); |                     [$definition, $nb_mots] = explode("#", $definition); | ||||||
|                     $definition .= " <small>($nb_mots mots)</small>"; |                     $nb_mots = " <small>($nb_mots mots)</small>"; | ||||||
|  |                 } else { | ||||||
|  |                     $nb_mots = ""; | ||||||
|                 } |                 } | ||||||
|                 if (strpos($definition, "@") !== false) { |                 if (strpos($definition, "@") !== false) { | ||||||
|                     [$definition, $auteur] = explode("@", $definition); |                     [$definition, $auteur] = explode("@", $definition); | ||||||
|                     $definition .= " <small><em>$auteur</em></small>"; |                     $auteur = " <small><em>$auteur</em></small>"; | ||||||
|  |                 } else { | ||||||
|  |                     $auteur = ""; | ||||||
|                 } |                 } | ||||||
|                 $definitions_verticales[$x][] = $definition; |                 $definitions_verticales[$x][] = $definition . $nb_mots . $auteur; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user