[1451] | 1 | <?php
|
---|
| 2 | // this file has been edited to produce its output in the same format as
|
---|
| 3 | // it has with previous versions, despite the new database format. coders
|
---|
| 4 | // should use the new xml.php to glean player info, which is much more
|
---|
| 5 | // suited to db changes.
|
---|
| 6 | header('Content-Type: text/plain');
|
---|
| 7 | include("commonfunctions.php");
|
---|
| 8 | include("config.php");
|
---|
| 9 | $file = file($irpg_db);
|
---|
| 10 | $header = explode("\t",$file[0]);
|
---|
| 11 | unset($header[1]); // password
|
---|
| 12 | unset($header[2]); // isadmin
|
---|
| 13 | unset($header[6]); // nickname
|
---|
| 14 | unset($header[10]); // x pos
|
---|
| 15 | unset($header[11]); // y pos
|
---|
| 16 | unset($header[31]); // alignment
|
---|
| 17 | echo join("\t",$header)."\n";
|
---|
| 18 | unset($file[0]);
|
---|
| 19 | /* specific character requested */
|
---|
| 20 | if ($_GET['player']) {
|
---|
| 21 | foreach ($file as $line) {
|
---|
| 22 | list($user) = explode("\t",trim($line));
|
---|
| 23 | if ($user == $_GET['player']) {
|
---|
| 24 | list($user,,,
|
---|
| 25 | $level,$class,$secs,,$uhost,$online,$idled,,,
|
---|
| 26 | $pen['mesg'],
|
---|
| 27 | $pen['nick'],
|
---|
| 28 | $pen['part'],
|
---|
| 29 | $pen['kick'],
|
---|
| 30 | $pen['quit'],
|
---|
| 31 | $pen['quest'],
|
---|
| 32 | $pen['logout'],
|
---|
| 33 | $created,
|
---|
| 34 | $lastlogin,
|
---|
| 35 | $item['amulet'],
|
---|
| 36 | $item['charm'],
|
---|
| 37 | $item['helm'],
|
---|
| 38 | $item['boots'],
|
---|
| 39 | $item['gloves'],
|
---|
| 40 | $item['ring'],
|
---|
| 41 | $item['leggings'],
|
---|
| 42 | $item['shield'],
|
---|
| 43 | $item['tunic'],
|
---|
| 44 | $item['weapon'],
|
---|
| 45 | ) = explode("\t",trim($line));
|
---|
| 46 | echo join("\t",
|
---|
| 47 | array($user,$level,$class,$secs,$uhost,$online,$idled,
|
---|
| 48 | $pen['mesg'],
|
---|
| 49 | $pen['nick'],
|
---|
| 50 | $pen['part'],
|
---|
| 51 | $pen['kick'],
|
---|
| 52 | $pen['quit'],
|
---|
| 53 | $pen['quest'],
|
---|
| 54 | $pen['logout'],
|
---|
| 55 | $created,
|
---|
| 56 | $lastlogin,
|
---|
| 57 | $item['amulet'],
|
---|
| 58 | $item['charm'],
|
---|
| 59 | $item['helm'],
|
---|
| 60 | $item['boots'],
|
---|
| 61 | $item['gloves'],
|
---|
| 62 | $item['ring'],
|
---|
| 63 | $item['leggings'],
|
---|
| 64 | $item['shield'],
|
---|
| 65 | $item['tunic'],
|
---|
| 66 | $item['weapon']))."\n";
|
---|
| 67 | }
|
---|
| 68 | }
|
---|
| 69 | exit(0);
|
---|
| 70 | }
|
---|
| 71 | /* no specific character requested; list all */
|
---|
| 72 | usort($file,"cmp_level_desc");
|
---|
| 73 | foreach ($file as $line) {
|
---|
| 74 | list($user,,,
|
---|
| 75 | $level,$class,$secs,,$uhost,$online,$idled,,,
|
---|
| 76 | $pen['mesg'],
|
---|
| 77 | $pen['nick'],
|
---|
| 78 | $pen['part'],
|
---|
| 79 | $pen['kick'],
|
---|
| 80 | $pen['quit'],
|
---|
| 81 | $pen['quest'],
|
---|
| 82 | $pen['logout'],
|
---|
| 83 | $created,
|
---|
| 84 | $lastlogin,
|
---|
| 85 | $item['amulet'],
|
---|
| 86 | $item['charm'],
|
---|
| 87 | $item['helm'],
|
---|
| 88 | $item['boots'],
|
---|
| 89 | $item['gloves'],
|
---|
| 90 | $item['ring'],
|
---|
| 91 | $item['leggings'],
|
---|
| 92 | $item['shield'],
|
---|
| 93 | $item['tunic'],
|
---|
| 94 | $item['weapon'],
|
---|
| 95 | ) = explode("\t",trim($line));
|
---|
| 96 | echo join("\t",
|
---|
| 97 | array($user,$level,$class,$secs,$uhost,$online,$idled,
|
---|
| 98 | $pen['mesg'],
|
---|
| 99 | $pen['nick'],
|
---|
| 100 | $pen['part'],
|
---|
| 101 | $pen['kick'],
|
---|
| 102 | $pen['quit'],
|
---|
| 103 | $pen['quest'],
|
---|
| 104 | $pen['logout'],
|
---|
| 105 | $created,
|
---|
| 106 | $lastlogin,
|
---|
| 107 | $item['amulet'],
|
---|
| 108 | $item['charm'],
|
---|
| 109 | $item['helm'],
|
---|
| 110 | $item['boots'],
|
---|
| 111 | $item['gloves'],
|
---|
| 112 | $item['ring'],
|
---|
| 113 | $item['leggings'],
|
---|
| 114 | $item['shield'],
|
---|
| 115 | $item['tunic'],
|
---|
| 116 | $item['weapon']))."\n";
|
---|
| 117 | }
|
---|
| 118 | ?>
|
---|