Fiche de personnage"; $file = fopen($irpg_db,"r"); fgets($file,1024); // skip top comment $found=0; while ($line=fgets($file,1024)) { if (substr($line,0,strlen($_GET['player'])+1) == $_GET['player']."\t") { list($user,,$isadmin,$level,$class,$secs,,$uhost,$online,$idled, $x,$y, $pen['mesg'], $pen['nick'], $pen['part'], $pen['kick'], $pen['quit'], $pen['quest'], $pen['logout'], $created, $lastlogin, $item['amulet'], $item['charm'], $item['helm'], $item['boots'], $item['gloves'], $item['ring'], $item['leggings'], $item['shield'], $item['tunic'], $item['weapon'], $alignment, ) = explode("\t",trim($line)); $found=1; break; } } if (!$found) echo "
Utilisateur inconnu.
\n"; else { $class=htmlentities($class); /* if we htmlentities($user), then we cannot use links with it. */ echo "Pseudo : ".htmlentities($user)."
\n".
             "      Profession : $class
\n".
             "      Admin ? : ".($isadmin?"Oui":"Non")."
\n".
             "      Niveau : $level
\n".
             "      Prochain niveau : ".duration($secs)."
\n".
             "      Statut : ".($online?"C":"Déc")."onnecté
\n".
             "      Host : ".($uhost?$uhost:"Unknown")."
\n".
             "      Date de création : ".strftime($dateformat,$created)."
\n".
             "      Derniè connexion : ".strftime($dateformat,$lastlogin)."
\n".
             "      Temps d'inactivé total: ".duration($idled)."
\n".
             "      Position : [$x,$y]
\n".
             "      Coté : ".($alignment=='e'?"Sadique":($alignment=='n'?"Nain-déci":"Brave"))."
\n".
             "      XML : [link]
";
        ksort($item);
        $sum = 0;
        foreach ($item_order as $key) {
        		$val = $item[$key];
            $uniquecolor="#be9256";
            if ($key == "helm" && substr($val,-1,1) == "a") {
                $val = intval($val)." [Mattt's Omniscience Grand Crown]";
            }
            if ($key == "tunic" && substr($val,-1,1) == "b") {
                $val = intval($val)." [Res0's Protectorate Plate Mail]";
            }
            if ($key == "amulet" && substr($val,-1,1) == "c") {
                $val = intval($val)." [Dwyn's Storm Magic Amulet]";
            }
            if ($key == "weapon" && substr($val,-1,1) == "d") {
                $val = intval($val)." [Jotun's Fury Colossal Sword]";
            }
            if ($key == "weapon" && substr($val,-1,1) == "e") {
                $val = intval($val)." [Drdink's Cane of Blind Rage]";
            }
            if ($key == "boots" && substr($val,-1,1) == "f") {
                $val = intval($val)." [Mrquick's Magical Boots of Swiftness]";
            }
            if ($key == "weapon" && substr($val,-1,1) == "g") {
                $val = intval($val)." [Jeff's Cluehammer of Doom]";
            }
            if ($key == "ring" && substr($val,-1,1) == "h") {
                $val = intval($val)." [Juliet's Glorious Ring of Sparkliness]";
            }
            echo "      ".htmlentities(ucfirst(gettext($key)))." : $val
\n";
            $sum += $val;
        }
        echo "      
\n      Somme : $sum
\n".
             "    
\n";
        ksort($pen);
        $sum = 0;
        foreach ($pen as $key => $val) {
            echo "      ".ucfirst($key)." : ".duration($val)."
\n";
            $sum += $val;
        }
        echo "      
\n      Total : ".duration($sum)."
');
            if ($_GET['allmods'] == 1 || count($temp) < 6) {
                foreach ($temp as $line) {
                    $line=htmlentities(trim($line));
                    echo "      $line
\n";
                }
                echo "      
\n";
            }
            else {
                end($temp);
                for ($i=0;$i<4;++$i) prev($temp);
                for ($line=trim(current($temp));$line;$line=trim(next($temp))) {
                    $line=htmlentities(trim($line));
                    echo "      $line
\n";
                }
            }
        }
        if ($_GET['allmods'] != 1 && count($temp) > 5) {
?>
      
      [&allmods=1">Voir toutes les modifications (=count($temp)?>)]