Player Info"; $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 "

Error

No such user.

\n"; else { $class=htmlentities($class); /* if we htmlentities($user), then we cannot use links with it. */ echo "

User: ".htmlentities($user)."
\n". " Class: $class
\n". " Admin?: ".($isadmin?"Yes":"No")."
\n". " Level: $level
\n". " Next level: ".duration($secs)."
\n". " Status: O".($online?"n":"ff")."line
\n". " Host: ".($uhost?$uhost:"Unknown")."
\n". " Account Created: ".date("D M j H:i:s Y",$created)."
\n". " Last login: ".date("D M j H:i:s Y",$lastlogin)."
\n". " Total time idled: ".duration($idled)."
\n". " Current position: [$x,$y]
\n". " Alignment: ".($alignment=='e'?"Evil":($alignment=='n'?"Neutral":"Good"))."
\n". " XML: [link]

\n". "

Map

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

Show map

\n\n")."". "

Items

\n

"; ksort($item); $sum = 0; foreach ($item as $key => $val) { $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 " $key: $val
\n"; $sum += $val; } echo "
\n sum: $sum
\n". "

". "

Penalties

\n". "

\n"; ksort($pen); $sum = 0; foreach ($pen as $key => $val) { echo " $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?"Recent ":""; echo('Character Modifiers

'); 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) { ?>
[View all Character Modifiers ()]