Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- while($donnees = mysql_fetch_array($retour)){
- if($donnees['existe']=="non"){
- if($donnees['sexe']=="M"){
- $sexe = "<font color='blue'>Garçon</font>";
- } else {
- $sexe = "<font color='deeppink'>Fille</font>";
- }
- }
- if(getNbPhoto($donnees['pseudo'])=="1"){
- $phrase = "Voir sa photo";
- } else {
- $phrase = "Voir ses ".getNbPhoto($donnees['pseudo'])." photos";
- }
- $dom = new DomDocument;
- $dom->load('http://forum.transformice.com/miceinfo.xml?n='.$donnees['pseudo'].'&l=fr');
- $micetitlelabel = $dom->getElementsByTagName('micetitlelabel');
- foreach($micetitlelabel as $titre)
- $affich_titre = UCWORDS($titre->firstChild->nodeValue);
- $tribe = $dom->getElementsByTagName('tribe');
- foreach($tribe as $tribu)
- $affich_tribu = UCWORDS($tribu->firstChild->nodeValue);
- $rounds = $dom->getElementsByTagName('rounds');
- foreach($rounds as $parties)
- $affich_parties = $parties->firstChild->nodeValue;
- $cheese = $dom->getElementsByTagName('cheese');
- foreach($cheese as $fromage)
- $affich_fromage = $fromage->firstChild->nodeValue;
- $chamansave = $dom->getElementsByTagName('chamansave');
- foreach($chamansave as $sauver)
- $affich_sauver = $sauver->firstChild->nodeValue;
- $first = $dom->getElementsByTagName('first');
- foreach($first as $premier)
- $affich_premier = $premier->firstChild->nodeValue;
- $micetitle = $dom->getElementsByTagName('micetitle');
- foreach($micetitle as $nombre_titre)
- $affich_nombre_titre = $nombre_titre->firstChild->nodeValue;
- $cent = '100';
- $calcul_first = $affich_premier / $affich_parties * $cent;
- $pourcentage_first = number_format($calcul_first , 2 );
- $calcul_fromage = $affich_fromage / $affich_parties * $cent;
- $pourcentage_fromage = number_format($calcul_fromage , 2 );
- $tg = str_replace("é","é",$affich_tribu);
- $tg = str_replace("è","è",$tg);
- $tg = str_replace("Ã","à",$tg);
- $tg = str_replace("ô","ô",$tg);
- $tg = str_replace("â","a",$tg);
- $tg = str_replace("î","î",$tg);
- $tg = str_replace("à«","ë",$tg);
- $tg = str_replace("à‰","É",$tg);
- $tg = str_replace("àª","ê",$tg);
- $tg = str_replace("©","©",$tg);
- if($tg == ""){
- $titre_verif = "<font color='dimgray'><i>Aucune</i></font>";
- } else {
- $titre_verif = $tg;
- }
- $tb = str_replace("é","é",$affich_titre);
- $tb = str_replace("è","è",$tb);
- $tb = str_replace("Ã","à",$tb);
- $tb = str_replace("ô","ô",$tb);
- $tb = str_replace("â","a",$tb);
- $tb = str_replace("î","î",$tb);
- $tb = str_replace("à«","ë",$tb);
- $tb = str_replace("à‰","É",$tb);
- $tb = str_replace("àª","ê",$tb);
- $tb = str_replace("©","©",$tb);
- if($donnees['existe']=="non"){
- echo ' <tr>
- <td class="td-pseudo">
- <b>'.$donnees['pseudo'].'</b>
- </td>
- <td class="td-photo">
- '.getNbPhoto($donnees['pseudo']).'
- </td>
- <td class="td-pseudo">
- '.$affich_parties.'
- </td>
- <td class="td-photo">
- '.$affich_fromage.'
- </td>
- <td class="td-pseudo">
- '.$affich_premier.'
- </td>
- <td class="td-photo">
- '.$affich_sauver.'
- </td>
- <td class="td-pseudo">
- N°'.$affich_nombre_titre.'
- </td>
- <td class="td-photo">
- '.$tb.'
- </td>
- <td class="td-pseudo">
- '.$titre_verif.'
- </td>
- <td class="td-photo">
- '.$pourcentage_fromage.' %
- </td>
- <td class="td-pseudo">
- '.$pourcentage_first.' %
- </td>
- <td class="td-photo">
- <a href="./photo.php?pseudo='.$donnees['pseudo'].'">'.$phrase.'</a>
- </td>
- <td class="td-pseudo">
- '.$sexe.'
- </td>
- </tr>
- ';
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment