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 "

Erreur

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ère connexion : ".strftime($dateformat,$lastlogin)."
\n". " Temps d'inactivité total: ".duration($idled)."
\n". " Position : [$x,$y]
\n". " Coté : ".($alignment=='e'?"Sadique":($alignment=='n'?"Nain-déci":"Brave"))."
\n". " XML : [link]

\n". "

Carte

\n". " ".($showmap?"
\n\n":"

Voir la carte

\n\n")."". "

Equipement

\n

"; 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)." [".htmlentities(ucfirst(gettext("Mattt's Omniscience Grand Crown")))."]"; } if ($key == "tunic" && substr($val,-1,1) == "b") { $val = intval($val)." [".htmlentities(ucfirst(gettext(Res0's Protectorate Plate Mail")))."]"; } if ($key == "amulet" && substr($val,-1,1) == "c") { $val = intval($val)." [".htmlentities(ucfirst(gettext(Dwyn's Storm Magic Amulet")))."]"; } if ($key == "weapon" && substr($val,-1,1) == "d") { $val = intval($val)." [".htmlentities(ucfirst(gettext(Jotun's Fury Colossal Sword")))."]"; } if ($key == "weapon" && substr($val,-1,1) == "e") { $val = intval($val)." [".htmlentities(ucfirst(gettext(Drdink's Cane of Blind Rage")))."]"; } if ($key == "boots" && substr($val,-1,1) == "f") { $val = intval($val)." [".htmlentities(ucfirst(gettext(Mrquick's Magical Boots of Swiftness")))."]"; } if ($key == "weapon" && substr($val,-1,1) == "g") { $val = intval($val)." [".htmlentities(ucfirst(gettext(Jeff's Cluehammer of Doom")))."]"; } if ($key == "ring" && substr($val,-1,1) == "h") { $val = intval($val)." [".htmlentities(ucfirst(gettext(Juliet's Glorious Ring of Sparkliness")))."]"; } echo " ".htmlentities(ucfirst(gettext($key)))." : $val
\n"; $sum += $val; } echo "
\n Somme : $sum
\n". "

". "

Pénalités

\n". "

\n"; ksort($pen); $sum = 0; foreach ($pen as $key => $val) { echo " ".ucfirst($key)." : ".duration($val)."
\n"; $sum += $val; } echo "
\n Total : ".duration($sum)."

\n"; $file = fopen($irpg_mod,"r"); $temp = array(); while ($line=fgets($file,1024)) { if (strstr($line," ".$_GET['player']." ") || strstr($line," ".$_GET['player'].", ") || substr($line,0,strlen($_GET['player'])+1) == $_GET['player']." " || substr($line,0,strlen($_GET['player'])+3) == $_GET['player']."'s ") { array_push($temp,$line); } } fclose($file); if (!is_null($temp) && count($temp)) { echo('

'); echo $_GET['allmods']!=1?"Dernières ":""; echo('Modifications d\'Horlorge

'); 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) { ?>
[Voir toutes les modifications ()]