function markers_player($res, $world) { global $security; $markers = array(); foreach ($res as $row) { $Worldspace = str_replace("[", "", $row['Worldspace']); $Worldspace = str_replace("]", "", $Worldspace); $Worldspace = explode(",", $Worldspace); $x = 0; if (array_key_exists(1, $Worldspace)) { $x = $Worldspace[1]; } $y = 0; if (array_key_exists(2, $Worldspace)) { $y = $Worldspace[2]; } $state = str_replace("[", "", $row['currentState']); $state = str_replace("]", "", $state); $state = str_replace('"', "", $state); $state = explode(",", $state); if (is_array($state) && $state[0] != "") { $wpnstr = $state[0]; } else { $wpnstr = ""; } require_once 'modules/calc.php'; $description = "<strong><a href=\"" . $security . ".php?view=info&show=1&CharacterID=" . $row['CharacterID'] . "\">" . htmlspecialchars($row['playerName'], ENT_QUOTES) . " (" . $row['CharacterID'] . ")</a> - " . $wpnstr . "</strong><br><table> <tr> <td><img style=\"width: 100px;\" src=\"images/models/" . str_replace('"', '', $row['Model']) . ".png\"></td> <td> </td> <td style=\"vertical-align:top; \"> <strong>PlayerUID:</strong> " . $row['PlayerUID'] . "<br> <strong>CharacterID:</strong> " . $row['CharacterID'] . "<br> <strong>Zed Kills:</strong> " . $row['KillsZ'] . "<br> <strong>Bandit Kills:</strong> " . $row['KillsB'] . "<br> <strong>Alive Duration:</strong> " . survivalTimeToString($row['duration']) . "<br><strong>Survival Attempts:</strong> " . $row['Generation'] . "<br><strong>Position:</strong> " . sprintf("%03d%03d", round(world_x($x, $world)), round(world_y($y, $world))) . "<br><strong>Humanity:</strong> " . $row['Humanity'] . "</td></tr></table>"; $tmp = array(); $tmp["id"] = $row['CharacterID']; $tmp["lat"] = world_y($y, $world) / 10; $tmp["lng"] = world_x($x, $world) / 10; $tmp["icon"] = "Player" . ($row['Alive'] ? "" : "Dead"); $tmp["title"] = htmlspecialchars($row['playerName'], ENT_QUOTES) . " (" . $row['CharacterID'] . ")"; $tmp["description"] = $description; $tmp["zIndexOffset"] = 21000; $markers[] = $tmp; } return $markers; }
?> </td> </tr> <tr> <td><img src="images/icons/statspage/playerdeaths1.png" width="24" height="36" /></td> <td><strong>Survival Attempts:</strong></td> <td align="right"><?php echo $row['Generation']; ?> </td> </tr> <tr> <td><img src="images/icons/statspage/totalplayerin24h.png" width="36" height="36" /></td> <td><strong>Survival Time:</strong></td> <td align="right" width="120px"><?php echo survivalTimeToString($row['duration']); ?> </td> </tr> <tr> <td><img src="images/icons/statspage/banditskilled1.png" width="36" height="36" /></td> <td><strong>Bandit Kills:</strong></td> <td align="right"><?php echo $row['KillsB']; ?> </td> </tr> <tr> <td><img src="images/icons/statspage/infectedkilled1.png" width="36" height="36" /></td> <td><strong>Zombie Kills:</strong></td> <td align="right"><?php
} $Medical = $row['Medical']; $Medical = str_replace("|", ",", $Medical); $Medical = json_decode($Medical); $currentState = $row['currentState']; $currentState = str_replace("|", ",", $currentState); $currentState = json_decode($currentState); $binocular = array(); $rifle = ""; $carry = ""; $pistol = ""; $heavyammo = array(); $heavyammoslots = 0; $smallammo = array(); $usableitems = array(); $survival_time = survivalTimeToString($row['duration']); $xml = file_get_contents('items.xml', true); require_once 'modules/xml2array.php'; $items_xml = XML2Array::createArray($xml); if (isset($Inventory[2]) && $Inventory[2] != '') { $InvCarry = array($Inventory[2]); } else { $InvCarry = array(); } $weaponinhand = ""; if (isset($Inventory[0][0])) { $weaponinhand = $Inventory[0][0]; } $Inventory = array_merge($Inventory[0], $Inventory[1], $InvCarry); for ($i = 0; $i < count($Inventory); $i++) { if (array_key_exists($i, $Inventory)) {
<th class="custom-th"><img src="images/icons/statspage/infectedheadshots1.png" width="25px" height="25px" class="table-img"></img><br> Headshots</th> <th class="custom-th"><img src="images/icons/statspage/totalplayers1.png" width="25px" height="25px" class="table-img"></img><br> Humanity</th> <th class="custom-th"><img src="images/icons/statspage/playerdeaths1.png" width="25px" height="25px" class="table-img"></img><br> Deaths</th> <th class="custom-th"><img src="images/icons/statspage/totalplayers1.png" width="25px" height="25px" class="table-img"></img><br> Traveled</th> <th class="custom-th"><img src="images/icons/statspage/totalplayers1.png" width="25px" height="25px" class="table-img"></img><br> Duration</th> <th class="custom-th"><img src="images/icons/statspage/totalplayers1.png" width="25px" height="25px" class="table-img"></img><br> Points</th> </thead> <tbody> <?php $result = $db->GetAll($leaderboard_query . " ORDER BY {$sortby} {$sorttype} LIMIT {$limit}"); $rank = 1; if (sizeof($result) != 0) { foreach ($result as $rowl) { $deaths = $rowl['Generation'] - 1; $points = $rowl['KillsZ'] + $rowl['KillsB'] - $rowl['KillsH'] - ($rowl['Generation'] - $deaths - 1); echo "<tr>\n\t\t\t\t\t\t\t <td>{$rank}</td>\n\t\t\t\t\t\t\t <td><a href=\"info.php?view=info&show=1&CharacterID={$rowl['CharacterID']}\">{$rowl['playerName']}</a></td>\n\t\t\t\t\t\t\t <td>{$rowl['KillsZ']}</td>\n\t\t\t\t\t\t\t <td>{$rowl['KillsH']}</td>\n\t\t\t\t\t\t\t <td>{$rowl['KillsB']}</td>\n\t\t\t\t\t\t\t <td>{$rowl['HeadshotsZ']}</td>\n\t\t\t\t\t\t\t <td>{$rowl['Humanity']}</td>\n\t\t\t\t\t\t\t <td>{$deaths}</td>\n\t\t\t\t\t\t\t <td>{$rowl['distanceFoot']}m</td>\n\t\t\t\t\t\t\t <td>" . survivalTimeToString($rowl['duration']) . "</td>\n\t\t\t\t\t\t\t <td>{$points}</td>\n\t\t\t\t\t\t\t </tr>"; $rank++; } } ?> </tbody> </table> <select class="form-control pull-left" style="width:100px; margin-top: 20px; margin-bottom: 20px;" name="limit" onChange='window.location="index.php?leaderboard<?php if (isset($_GET['sortby'])) { echo '&sortby=' . $_GET['sortby']; } if (isset($_GET['sorttype'])) { echo '&sorttype=' . $_GET['sorttype']; } ?> &limit=" + this.value;'>