| [1451] | 1 | <?php | 
|---|
|  | 2 |  | 
|---|
|  | 3 | include("config.php"); | 
|---|
|  | 4 |  | 
|---|
|  | 5 | $irpg_page_title = "Liste des joueurs"; | 
|---|
|  | 6 |  | 
|---|
|  | 7 | include("header.php"); | 
|---|
|  | 8 |  | 
|---|
|  | 9 | include("commonfunctions.php"); | 
|---|
|  | 10 |  | 
|---|
|  | 11 | $file = file($irpg_db); | 
|---|
|  | 12 | unset($file[0]); | 
|---|
|  | 13 | if (!$_GET['sort'] || | 
|---|
|  | 14 | (($_GET['sort'] != "cmp_level_asc") && | 
|---|
|  | 15 | ($_GET['sort'] != "cmp_level_desc") && | 
|---|
|  | 16 | ($_GET['sort'] != "cmp_isadmin_asc") && | 
|---|
|  | 17 | ($_GET['sort'] != "cmp_isadmin_desc") && | 
|---|
|  | 18 | ($_GET['sort'] != "cmp_alignment_asc") && | 
|---|
|  | 19 | ($_GET['sort'] != "cmp_alignment_desc") && | 
|---|
|  | 20 | ($_GET['sort'] != "cmp_ttl_asc") && | 
|---|
|  | 21 | ($_GET['sort'] != "cmp_ttl_desc") && | 
|---|
|  | 22 | ($_GET['sort'] != "cmp_pen_asc") && | 
|---|
|  | 23 | ($_GET['sort'] != "cmp_pen_desc") && | 
|---|
|  | 24 | ($_GET['sort'] != "cmp_lastlogin_asc") && | 
|---|
|  | 25 | ($_GET['sort'] != "cmp_lastlogin_desc") && | 
|---|
|  | 26 | ($_GET['sort'] != "cmp_created_asc") && | 
|---|
|  | 27 | ($_GET['sort'] != "cmp_created_desc") && | 
|---|
|  | 28 | ($_GET['sort'] != "cmp_idled_asc") && | 
|---|
|  | 29 | ($_GET['sort'] != "cmp_idled_desc") && | 
|---|
|  | 30 | ($_GET['sort'] != "cmp_user_asc") && | 
|---|
|  | 31 | ($_GET['sort'] != "cmp_user_desc") && | 
|---|
|  | 32 | ($_GET['sort'] != "cmp_online_asc") && | 
|---|
|  | 33 | ($_GET['sort'] != "cmp_online_desc") && | 
|---|
|  | 34 | ($_GET['sort'] != "cmp_uhost_asc") && | 
|---|
|  | 35 | ($_GET['sort'] != "cmp_uhost_desc") && | 
|---|
|  | 36 | ($_GET['sort'] != "cmp_sum_asc") && | 
|---|
|  | 37 | ($_GET['sort'] != "cmp_sum_desc"))) $_GET['sort'] = "cmp_level_desc"; | 
|---|
|  | 38 | usort($file,$_GET['sort']); | 
|---|
|  | 39 | ?> | 
|---|
|  | 40 | <table border=1 cellpadding=2 cellspacing=2 cols="32" rows="<?php print count($file); ?>"> | 
|---|
|  | 41 | <tr> | 
|---|
|  | 42 | <th NOWRAP> | 
|---|
|  | 43 | Pseudo | 
|---|
|  | 44 | (<a href="db.php?sort=cmp_user_asc"> | 
|---|
|  | 45 | <img src="up.png" border="0"> | 
|---|
|  | 46 | </a> | 
|---|
|  | 47 | / | 
|---|
|  | 48 | <a href="db.php?sort=cmp_user_desc"> | 
|---|
|  | 49 | <img src="down.png" border="0"> | 
|---|
|  | 50 | </a>) | 
|---|
|  | 51 | </th> | 
|---|
|  | 52 | <th NOWRAP> | 
|---|
|  | 53 | Niveau | 
|---|
|  | 54 | (<a href="db.php?sort=cmp_level_asc"> | 
|---|
|  | 55 | <img src="up.png" border="0"> | 
|---|
|  | 56 | </a> | 
|---|
|  | 57 | / | 
|---|
|  | 58 | <a href="db.php?sort=cmp_level_desc"> | 
|---|
|  | 59 | <img src="down.png" border="0"> | 
|---|
|  | 60 | </a>) | 
|---|
|  | 61 | </th> | 
|---|
|  | 62 | <th NOWRAP> | 
|---|
|  | 63 | Admin | 
|---|
|  | 64 | (<a href="db.php?sort=cmp_isadmin_asc"> | 
|---|
|  | 65 | <img src="up.png" border="0"> | 
|---|
|  | 66 | </a> | 
|---|
|  | 67 | / | 
|---|
|  | 68 | <a href="db.php?sort=cmp_isadmin_desc"> | 
|---|
|  | 69 | <img src="down.png" border="0"> | 
|---|
|  | 70 | </a>) | 
|---|
|  | 71 | </th> | 
|---|
|  | 72 | <th NOWRAP>Profession</th> | 
|---|
|  | 73 | <th NOWRAP> | 
|---|
|  | 74 | Prochain Niv. | 
|---|
|  | 75 | (<a href="db.php?sort=cmp_ttl_asc"> | 
|---|
|  | 76 | <img src="up.png" border="0"> | 
|---|
|  | 77 | </a> | 
|---|
|  | 78 | / | 
|---|
|  | 79 | <a href="db.php?sort=cmp_ttl_desc"> | 
|---|
|  | 80 | <img src="down.png" border="0"> | 
|---|
|  | 81 | </a>) | 
|---|
|  | 82 | </th> | 
|---|
|  | 83 | <th NOWRAP> | 
|---|
|  | 84 | Nick!User@Host | 
|---|
|  | 85 | (<a href="db.php?sort=cmp_uhost_asc"> | 
|---|
|  | 86 | <img src="up.png" border="0"> | 
|---|
|  | 87 | </a> | 
|---|
|  | 88 | / | 
|---|
|  | 89 | <a href="db.php?sort=cmp_uhost_desc"> | 
|---|
|  | 90 | <img src="down.png" border="0"> | 
|---|
|  | 91 | </a>) | 
|---|
|  | 92 | </th> | 
|---|
|  | 93 | <th NOWRAP> | 
|---|
|  | 94 | En ligne | 
|---|
|  | 95 | (<a href="db.php?sort=cmp_online_asc"> | 
|---|
|  | 96 | <img src="up.png" border="0"> | 
|---|
|  | 97 | </a> | 
|---|
|  | 98 | / | 
|---|
|  | 99 | <a href="db.php?sort=cmp_online_desc"> | 
|---|
|  | 100 | <img src="down.png" border="0"> | 
|---|
|  | 101 | </a>) | 
|---|
|  | 102 | </th> | 
|---|
|  | 103 | <th NOWRAP> | 
|---|
|  | 104 | Temps d'inactivé total | 
|---|
|  | 105 | (<a href="db.php?sort=cmp_idled_asc"> | 
|---|
|  | 106 | <img src="up.png" border="0"> | 
|---|
|  | 107 | </a> | 
|---|
|  | 108 | / | 
|---|
|  | 109 | <a href="db.php?sort=cmp_idled_desc"> | 
|---|
|  | 110 | <img src="down.png" border="0"> | 
|---|
|  | 111 | </a>) | 
|---|
|  | 112 | </th> | 
|---|
|  | 113 | <th NOWRAP>X Pos</th> | 
|---|
|  | 114 | <th NOWRAP>Y Pos</th> | 
|---|
|  | 115 | <th NOWRAP>Pén. Mesg</th> | 
|---|
|  | 116 | <th NOWRAP>Pén. Nick</th> | 
|---|
|  | 117 | <th NOWRAP>Pén. Part</th> | 
|---|
|  | 118 | <th NOWRAP>Pén. Kick</th> | 
|---|
|  | 119 | <th NOWRAP>Pén. Quit</th> | 
|---|
|  | 120 | <th NOWRAP>Pén. Quête</th> | 
|---|
|  | 121 | <th NOWRAP>Pén. Logout</th> | 
|---|
|  | 122 | <th NOWRAP> | 
|---|
|  | 123 | Total Pen. | 
|---|
|  | 124 | (<a href="db.php?sort=cmp_pen_asc"> | 
|---|
|  | 125 | <img src="up.png" border="0"> | 
|---|
|  | 126 | </a> | 
|---|
|  | 127 | / | 
|---|
|  | 128 | <a href="db.php?sort=cmp_pen_desc"> | 
|---|
|  | 129 | <img src="down.png" border="0"> | 
|---|
|  | 130 | </a>) | 
|---|
|  | 131 | </th> | 
|---|
|  | 132 | <th NOWRAP> | 
|---|
|  | 133 | Date Création | 
|---|
|  | 134 | (<a href="db.php?sort=cmp_created_asc"> | 
|---|
|  | 135 | <img src="up.png" border="0"> | 
|---|
|  | 136 | </a> | 
|---|
|  | 137 | / | 
|---|
|  | 138 | <a href="db.php?sort=cmp_created_desc"> | 
|---|
|  | 139 | <img src="down.png" border="0"> | 
|---|
|  | 140 | </a>) | 
|---|
|  | 141 | </th> | 
|---|
|  | 142 | <th NOWRAP> | 
|---|
|  | 143 | Dernière connex. | 
|---|
|  | 144 | (<a href="db.php?sort=cmp_lastlogin_asc"> | 
|---|
|  | 145 | <img src="up.png" border="0"> | 
|---|
|  | 146 | </a> | 
|---|
|  | 147 | / | 
|---|
|  | 148 | <a href="db.php?sort=cmp_lastlogin_desc"> | 
|---|
|  | 149 | <img src="down.png" border="0"> | 
|---|
|  | 150 | </a>) | 
|---|
|  | 151 | </th> | 
|---|
|  | 152 | <th NOWRAP>Arme bourrin</th> | 
|---|
|  | 153 | <th NOWRAP>Arme sniper</th> | 
|---|
|  | 154 | <th NOWRAP>Rune Vie</th> | 
|---|
|  | 155 | <th NOWRAP>Rune For</th> | 
|---|
|  | 156 | <th NOWRAP>Rune Pre</th> | 
|---|
|  | 157 | <th NOWRAP>Rune Int</th> | 
|---|
|  | 158 | <th NOWRAP>Véhicule</th> | 
|---|
|  | 159 | <th NOWRAP>Bouffe</th> | 
|---|
|  | 160 | <th NOWRAP>Inutile</th> | 
|---|
|  | 161 | <th NOWRAP>Jouet</th> | 
|---|
|  | 162 | <th NOWRAP> | 
|---|
|  | 163 | Total | 
|---|
|  | 164 | (<a href="db.php?sort=cmp_sum_asc"> | 
|---|
|  | 165 | <img src="up.png" border="0"> | 
|---|
|  | 166 | </a> | 
|---|
|  | 167 | / | 
|---|
|  | 168 | <a href="db.php?sort=cmp_sum_desc"> | 
|---|
|  | 169 | <img src="down.png" border="0"> | 
|---|
|  | 170 | </a>) | 
|---|
|  | 171 | </th> | 
|---|
|  | 172 | <th NOWRAP> | 
|---|
|  | 173 | Coté | 
|---|
|  | 174 | (<a href="db.php?sort=cmp_alignment_asc"> | 
|---|
|  | 175 | <img src="up.png" border="0"> | 
|---|
|  | 176 | </a> | 
|---|
|  | 177 | / | 
|---|
|  | 178 | <a href="db.php?sort=cmp_alignment_desc"> | 
|---|
|  | 179 | <img src="down.png" border="0"> | 
|---|
|  | 180 | </a>) | 
|---|
|  | 181 | </th> | 
|---|
|  | 182 | </tr> | 
|---|
|  | 183 | <?php | 
|---|
|  | 184 | foreach ($file as $line) { | 
|---|
|  | 185 | list($user,,$isadmin,$level,$class,$secs,,$uhost,$online,$idled,$x,$y, | 
|---|
|  | 186 | $pen['mesg'], | 
|---|
|  | 187 | $pen['nick'], | 
|---|
|  | 188 | $pen['part'], | 
|---|
|  | 189 | $pen['kick'], | 
|---|
|  | 190 | $pen['quit'], | 
|---|
|  | 191 | $pen['quest'], | 
|---|
|  | 192 | $pen['logout'], | 
|---|
|  | 193 | $created, | 
|---|
|  | 194 | $lastlogin, | 
|---|
|  | 195 | $item['amulet'], | 
|---|
|  | 196 | $item['charm'], | 
|---|
|  | 197 | $item['helm'], | 
|---|
|  | 198 | $item['boots'], | 
|---|
|  | 199 | $item['gloves'], | 
|---|
|  | 200 | $item['ring'], | 
|---|
|  | 201 | $item['leggings'], | 
|---|
|  | 202 | $item['shield'], | 
|---|
|  | 203 | $item['tunic'], | 
|---|
|  | 204 | $item['weapon'], | 
|---|
|  | 205 | $alignment, | 
|---|
|  | 206 | ) = explode("\t",trim($line)); | 
|---|
|  | 207 | $class = str_replace("<","<",$class); | 
|---|
|  | 208 | $user = str_replace("<","<",$user); | 
|---|
|  | 209 | $class = str_replace(">",">",$class); | 
|---|
|  | 210 | $user = str_replace(">",">",$user); | 
|---|
|  | 211 | $sum = 0; | 
|---|
|  | 212 | foreach ($item as $k => $v) $sum += $v; | 
|---|
|  | 213 | $pentot = 0; | 
|---|
|  | 214 | foreach ($pen as $k => $v) $pentot += $v; | 
|---|
|  | 215 | echo "      <tr>\n". | 
|---|
|  | 216 | "        <td nowrap>$user</td>\n". | 
|---|
|  | 217 | "        <td>$level</td>\n". | 
|---|
|  | 218 | "        <td>".($isadmin?"Oui":"Non")."</td>\n". | 
|---|
|  | 219 | "        <td nowrap>$class</td>\n". | 
|---|
|  | 220 | "        <td nowrap>".duration($secs)."</td>\n". | 
|---|
|  | 221 | "        <td nowrap>$uhost</td>\n". | 
|---|
|  | 222 | "        <td>".(($online == 1) ? "Oui" : "Non")."</td>\n". | 
|---|
|  | 223 | "        <td nowrap>".duration($idled)."</td>\n". | 
|---|
|  | 224 | "        <td nowrap>$x</td>\n". | 
|---|
|  | 225 | "        <td nowrap>$y</td>\n". | 
|---|
|  | 226 | "        <td nowrap>".duration($pen['mesg'])."</td>\n". | 
|---|
|  | 227 | "        <td nowrap>".duration($pen['nick'])."</td>\n". | 
|---|
|  | 228 | "        <td nowrap>".duration($pen['part'])."</td>\n". | 
|---|
|  | 229 | "        <td nowrap>".duration($pen['kick'])."</td>\n". | 
|---|
|  | 230 | "        <td nowrap>".duration($pen['quit'])."</td>\n". | 
|---|
|  | 231 | "        <td nowrap>".duration($pen['quest'])."</td>\n". | 
|---|
|  | 232 | "        <td nowrap>".duration($pen['logout'])."</td>\n". | 
|---|
|  | 233 | "        <td nowrap>".duration($pentot)."</td>\n". | 
|---|
|  | 234 | "        <td nowrap>".strftime($dateformat,$created)."</td>\n". | 
|---|
|  | 235 | "        <td nowrap>".strftime($dateformat,$lastlogin)."</td>\n". | 
|---|
|  | 236 | "        <td>".$item['gloves']."</td>\n". | 
|---|
|  | 237 | "        <td>".$item['weapon']."</td>\n". | 
|---|
|  | 238 | "        <td>".$item['tunic']."</td>\n". | 
|---|
|  | 239 | "        <td>".$item['leggings']."</td>\n". | 
|---|
|  | 240 | "        <td>".$item['shield']."</td>\n". | 
|---|
|  | 241 | "        <td>".$item['helm']."</td>\n". | 
|---|
|  | 242 | "        <td>".$item['boots']."</td>\n". | 
|---|
|  | 243 | "        <td>".$item['charm']."</td>\n". | 
|---|
|  | 244 | "        <td>".$item['ring']."</td>\n". | 
|---|
|  | 245 | "        <td>".$item['amulet']."</td>\n". | 
|---|
|  | 246 | "        <td>$sum</td>\n". | 
|---|
|  | 247 | "        <td>".($alignment=='e'?"Sadique":($alignment=='n'?"Nain-déci":"Brave"))."</td>\n". | 
|---|
|  | 248 | "      </tr>\n"; | 
|---|
|  | 249 | } | 
|---|
|  | 250 |  | 
|---|
|  | 251 | echo(' | 
|---|
|  | 252 | </table> | 
|---|
|  | 253 | '); | 
|---|
|  | 254 | include("footer.php"); | 
|---|
|  | 255 | ?> | 
|---|