<h1><?php echo l('Edit Player or Clan Details'); ?> </h1> <?php if (!empty($return)) { if ($return['status'] === "1") { echo '<div class="error">', $return['msg'], '</div>'; } elseif ($return['status'] === "2") { echo '<div class="success">', $return['msg'], '</div>'; } } if ($editMode === "player") { ?> <h2><?php echo l('Player'), ': ', $playerObj->getParam('name'); ?> </h2> <form method="post" action=""> <div style="float: left; margin-right: 20px;"> <label><?php echo l('Real Name'); ?> :</label> <input type="text" name="details[fullName]" value="<?php echo $playerObj->getParam('fullName'); ?> " /> <label><?php echo l('E-mail Address'); ?>
} else { $playerObj->setOption("sort", 'eventTime'); } $newSort = "ASC"; if (isset($_GET["sortorder"])) { $check = validateInput($_GET['sortorder'], 'nospace'); if ($check === true) { $playerObj->setOption("sortorder", $_GET['sortorder']); } if ($_GET["sortorder"] == "ASC") { $newSort = "DESC"; } } else { $playerObj->setOption("sortorder", 'DESC'); } $gamename = getGameName($playerObj->getParam("game")); $pl_name = makeSavePlayerName($playerObj->getParam('name')); pageHeader(array($gamename, l("Chat History"), $pl_name), array($gamename => "index.php?game=" . $playerObj->getParam('game'), l("Player Rankings") => "index.php?mode=players&game=" . $playerObj->getParam('game'), l("Player Details") => "index.php?mode=playerinfo&player={$player}", l("Chat History") => ""), $pl_name); ?> <div id="sidebar"> <h1><?php echo l('Options'); ?> </h1> <div class="left-box"> <ul class="sidemenu"> <li> <a href="index.php?mode=playerchathistory&player=<?php echo $player; ?>
//} $playerdata = mysql_fetch_assoc($queryPlayer); mysql_free_result($queryPlayer); */ /* $pl_name = $playerdata["lastName"]; if (strlen($pl_name) > 10) { $pl_shortname = substr($pl_name, 0, 8) . "..."; } else { $pl_shortname = $pl_name; } */ //$pl_name = ereg_replace(" ", " ", htmlspecialchars($playerObj->getParam('name'))); $pl_name = makeSavePlayerName($playerObj->getParam('name')); $pl_urlname = urlencode($playerObj->getParam('lastName')); // get the game name // if it fails we use the game code which is stored in the player table $game = $playerObj->getParam("game"); $query = mysql_query("SELECT name FROM " . DB_PREFIX . "_Games WHERE code='" . mysql_escape_string($game) . "'"); if (mysql_num_rows($query) != 1) { $gamename = ucfirst($game); } else { $result = mysql_fetch_assoc($query); $gamename = $result['name']; } mysql_free_result($query); // show header pageHeader(array($gamename, l("Player Details"), $pl_name), array($gamename => "index.php?game={$game}", l("Player Rankings") => "index.php?mode=players&game={$game}", l("Player Details") => ""), $pl_name); $rcol = "row-dark";
$mode = true; } } if (!empty($_GET['killLimit'])) { if (validateInput($_GET['killLimit'], 'digit') === true) { $killLimit = $_GET['killLimit']; } } require 'class/player.class.php'; $playerObj = new Player($player, $mode, $game); if ($playerObj === false) { die('No such player'); } $playerObj->setOption('killLimit', $killLimit); $playerObj->loadFullInformation(); $pl_name = makeSavePlayerName($playerObj->getParam('name')); $pl_urlname = urlencode($playerObj->getParam('lastName')); // get the game name // if it fails we use the game code which is stored in the player table $game = $playerObj->getParam("game"); $query = $DB->query("SELECT name FROM `" . DB_PREFIX . "_Games`\n\t\t\t\t\tWHERE code = '" . $DB->real_escape_string($game) . "'"); if (SHOW_DEBUG && $DB->error) { var_dump($DB->error); } if ($query->num_rows != 1) { $gamename = ucfirst($game); } else { $result = $query->fetch_assoc(); $gamename = $result['name']; } $query->free();