本文整理汇总了PHP中Table::draw方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::draw方法的具体用法?PHP Table::draw怎么用?PHP Table::draw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table
的用法示例。
在下文中一共展示了Table::draw方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: error
if ($db->num_rows() < 1) {
error("No such game '{$game}'.");
}
list($gamename) = $db->fetch_row();
$db->free_result();
pageHeader(array($gamename, 'Ribbon Details', $act_name), array($gamename => $g_options['scripturl'] . "?game={$game}", 'Ribbons' => $g_options['scripturl'] . "mode=awards&game={$game}&tab=ribbons", 'Ribbon Details' => ''), $act_name);
$table = new Table(array(new TableColumn('playerName', 'Player', 'width=45&align=left&flag=1&link=' . urlencode('mode=playerinfo&player=%k')), new TableColumn('numawards', 'Daily awards', 'width=10&align=right&append=' . urlencode(' times')), new TableColumn('awardName', '', 'width=40&align=left')), 'playerId', 'numawards', 'playerName', true, 50);
$result = $db->query("\r\n\t\tSELECT\r\n\t\t\tflag,\r\n\t\t\tlastName AS playerName,\r\n\t\t\thlstats_Players.playerId,\r\n\t\t\thlstats_Awards.name as awardName,\r\n\t\t\tCOUNT(hlstats_Awards.name) AS numawards\r\n\t\tFROM\r\n\t\t\thlstats_Players\r\n\t\tINNER JOIN\r\n\t\t\thlstats_Players_Awards\r\n\t\t\tON (\r\n\t\t\t hlstats_Players_Awards.playerId=hlstats_Players.playerId AND\r\n\t\t\t hlstats_Players_Awards.game=hlstats_Players.game\t\t\t \r\n\t\t\t )\r\n\t\tINNER JOIN\r\n\t\t\thlstats_Awards \r\n\t\t\tON (\r\n\t\t\t hlstats_Players_Awards.awardId=hlstats_Awards.awardId AND\r\n\t\t\t hlstats_Players_Awards.game=hlstats_Awards.game\t\t\t \r\n\t\t\t )\r\n\t\tWHERE\r\n\t\t\thlstats_Awards.code = '{$awardcode}' AND\r\n\t\t\thlstats_Players.game = '{$game}' AND\r\n\t\t\thlstats_Players.hideranking<>'1'\r\n\t\tGROUP BY\r\n\t\t\tflag,\r\n\t\t\tlastName,\r\n\t\t\thlstats_Players.playerId\r\n\t\tHAVING\r\n\t\t\tCOUNT(hlstats_Awards.name) >= {$awardmin} \t\r\n\t\tORDER BY\r\n\t\t\t{$table->sort} {$table->sortorder},\r\n\t\t\t{$table->sort2} {$table->sortorder}\r\n\t\tLIMIT {$table->startitem},{$table->numperpage}\r\n\t");
$resultCount = $db->query("\r\n\t\tSELECT\r\n\t\t\tflag,\r\n\t\t\tlastName AS playerName,\r\n\t\t\thlstats_Players.playerId,\r\n\t\t\thlstats_Awards.name as awardName,\r\n\t\t\tCOUNT(hlstats_Awards.name) AS numawards\r\n\t\tFROM\r\n\t\t\thlstats_Players\r\n\t\tINNER JOIN\r\n\t\t\thlstats_Players_Awards\r\n\t\t\tON (\r\n\t\t\t hlstats_Players_Awards.playerId=hlstats_Players.playerId AND\r\n\t\t\t hlstats_Players_Awards.game=hlstats_Players.game\t\t\t \r\n\t\t\t )\r\n\t\tINNER JOIN\r\n\t\t\thlstats_Awards \r\n\t\t\tON (\r\n\t\t\t hlstats_Players_Awards.awardId=hlstats_Awards.awardId AND\r\n\t\t\t hlstats_Players_Awards.game=hlstats_Awards.game\t\t\t \r\n\t\t\t )\r\n\t\tWHERE\r\n\t\t\thlstats_Awards.code = '{$awardcode}' AND\r\n\t\t\thlstats_Players.game = '{$game}' AND\r\n\t\t\thlstats_Players.hideranking<>'1'\r\n\t\tGROUP BY\r\n\t\t\tflag,\r\n\t\t\tlastName,\r\n\t\t\thlstats_Players.playerId\r\n\t\tHAVING\r\n\t\t\tCOUNT(hlstats_Awards.name) >= {$awardmin} \t\r\n\t");
$numitems = mysql_num_rows($resultCount);
?>
<div class="block">
<?php
printSectionTitle('Ribbon Details');
?>
<div class="subblock">
<div style="float:right;">
Back to <a href="<?php
echo $g_options['scripturl'] . "?mode=awards&game={$game}&tab=ribbons";
?>
">Ribbons</a>
</div>
<div style="clear:both;"></div>
</div>
<br /><br />
<?php
echo '<img src="' . IMAGE_PATH . "/games/{$game}/ribbons/{$image}\" alt=\"\" /> <b>{$act_name}</b>";
$table->draw($result, $numitems, 95, 'center');
?>
</div>
示例2: Table
<span style="padding-left:35px;">Optimizing tables...</span></td>
</tr>
</table><br /><br />
<?php
flush();
$result = $db->query("SHOW TABLES");
while (list($table) = $db->fetch_row($result)) {
if ($dbtables) {
$dbtables .= ", ";
}
$dbtables .= $table;
}
$tableOptimize = new Table(array(new TableColumn("Table", "Table", "width=30&sort=no"), new TableColumn("Op", "Operation", "width=12&sort=no"), new TableColumn("Msg_type", "Msg. Type", "width=12&sort=no"), new TableColumn("Msg_text", "Message", "width=46&sort=no")), "Table", "Table", "Msg_type", false, 9999);
$result = $db->query("OPTIMIZE TABLE {$dbtables}");
$tableOptimize->draw($result, mysql_num_rows($result), 80);
?>
<br /><br />
<table style="width:90%;text-align:center;border:0" cellspacing="0" cellpadding="2">
<tr>
<td class="fNormal">Analyzing tables...</td>
</tr>
</table><br /><br />
<?php
$tableAnalyze = new Table(array(new TableColumn("Table", "Table", "width=30&sort=no"), new TableColumn("Op", "Operation", "width=12&sort=no"), new TableColumn("Msg_type", "Msg. Type", "width=12&sort=no"), new TableColumn("Msg_text", "Message", "width=46&sort=no")), "Table", "Table", "Msg_type", false, 9999);
$result = $db->query("ANALYZE TABLE {$dbtables}");
$tableAnalyze->draw($result, mysql_num_rows($result), 80);
示例3: die
die("No player exists with ID #{$id}");
}
$data = $db->fetch_array($result);
echo '<span class="fTitle">';
echo $data['lastName'];
echo '</span>';
echo '<span class="fNormal"> ' . '<a href="' . $g_options['scripturl'] . "?mode=playerinfo&player={$id}&" . strip_tags(SID) . '">' . '(View Player Details)</a></span>';
?>
<br /><br />
<table width="60%" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="fNormal"><?php
$proppage->draw($data);
?>
<center><input type="submit" value=" Apply " class="submit" /></center></td>
</tr>
</table>
</form>
<?php
$tblIps = new Table(array(new TableColumn('ipAddress', 'IP Address', 'width=40'), new TableColumn('eventTime', 'Last Used', 'width=60')), 'ipAddress', 'eventTime', 'eventTime');
$result = $db->query("\r\n\t\tSELECT\r\n\t\t\tipAddress,\r\n\t\t\teventTime\r\n\t\tFROM\r\n\t\t\thlstats_Events_Connects\r\n\t\tWHERE\r\n\t\t\tplayerId = {$playerId}\r\n\t\tGROUP BY\r\n\t\t\tipAddress\r\n\t\tORDER BY\r\n\t\t\teventTime DESC\r\n\t");
?>
<div class="block">
<?php
printSectionTitle('Player IP Addresses');
$tblIps->draw($result, 50, 50);
?>
</div><br /><br />
示例4: htmlspecialchars
">
<input type="hidden" name="mode" value="search" />
<input type="hidden" name="game" value="<?php
echo $game;
?>
" />
<input type="hidden" name="st" value="player" />
<strong>•</strong> Find a player:
<input type="text" name="q" size="20" maxlength="64" class="textbox" />
<input type="submit" value="Search" class="smallsubmit" />
</form>
</div>
</div><br /><br />
<div style="clear:both;padding-top:4px;"></div>
<?php
$table->draw($result, $numitems, 95);
?>
<br /><br />
<div class="subblock">
<div style="float:left;">
<form method="get" action="<?php
echo $g_options['scripturl'];
?>
">
<?php
foreach ($_GET as $k => $v) {
$v = valid_request($v, 0);
if ($k != "minkills") {
echo "<input type=\"hidden\" name=\"" . htmlspecialchars($k) . "\" value=\"" . htmlspecialchars($v) . "\" />\n";
}
}
示例5:
echo $g_options['graphtxt_load'];
?>
&numcolor_pct=#<?php
echo $g_options['graphtxt_load'];
?>
&linecolor=#<?php
echo $g_options['graphtxt_load'];
?>
&barcolor=#FFFFFF&barbackground=#000000&textcolor=#FFFFFF&captioncolor=#FFFFFF&textcolor_total=#FFFFFF');
}
}
}
/* ]]> */
</script>
<?php
$tblWeaponstats2->draw($result, $db->num_rows($result), 100);
$flashlink = IMAGE_PATH . '/hitbox.swf?wname=All+Weapons&head=' . $weapon_data['total']['head'] . '&rightarm=' . $weapon_data['total']['leftarm'] . '&leftarm=' . $weapon_data['total']['rightarm'] . '&chest=' . $weapon_data['total']['chest'] . '&stomach=' . $weapon_data['total']['stomach'] . '&rightleg=' . $weapon_data['total']['leftleg'] . '&leftleg=' . $weapon_data['total']['rightleg'] . '&model=' . $start_model . '&numcolor_num=#' . $g_options['graphtxt_load'] . '&numcolor_pct=#' . $g_options['graphtxt_load'] . '&linecolor=#' . $g_options['graphtxt_load'] . '&barcolor=#FFFFFF&barbackground=#000000&textcolor=#FFFFFF&captioncolor=#FFFFFF&textcolor_total=#FFFFFF';
?>
</div>
<div style="float:right;vertical-align:top;width:480px;">
<table class="data-table">
<tr class="data-table-head">
<td style="text-align:center;">Targets</td>
</tr>
<tr class="bg1">
<td style="text-align:center;">
<object width="470" height="360" align="middle" id="hitbox" data="<?php
echo $flashlink;
?>
" type="application/x-shockwave-flash">
<param name="movie" value="<?php
示例6: or
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
For support and installation notes visit http://www.hlxcommunity.com
*/
if (!defined('IN_HLSTATS')) {
die('Do not access this file directly.');
}
flush();
$tblMaps = new Table(array(new TableColumn('map', 'Map', 'width=22&align=left&link=' . urlencode("mode=mapinfo&map=%k&game={$game}")), new TableColumn('kills', 'Kills', 'width=7&align=right'), new TableColumn('kpercent', '%', 'width=6&sort=no&align=right&append=' . urlencode('%')), new TableColumn('kpercent', 'Ratio', 'width=8&sort=no&type=bargraph'), new TableColumn('deaths', 'Deaths', 'width=7&align=right'), new TableColumn('dpercent', '%', 'width=6&sort=no&align=right&append=' . urlencode('%')), new TableColumn('dpercent', 'Ratio', 'width=8&sort=no&type=bargraph'), new TableColumn('kpd', 'K:D', 'width=5&align=right'), new TableColumn('headshots', 'Headshots', 'width=7&align=right'), new TableColumn('hpercent', '%', 'width=6&sort=no&align=right&append=' . urlencode('%')), new TableColumn('hpercent', 'Ratio', 'width=8&sort=no&type=bargraph'), new TableColumn('hpk', 'HS:K', 'width=5&align=right')), 'map', 'kpd', 'kills', true, 9999, 'maps_page', 'maps_sort', 'maps_sortorder', 'tabmaps', 'desc', true);
$result = $db->query("\r\n\t\tSELECT\r\n\t\t\tIF(hlstats_Events_Frags.map='', '(Unaccounted)', hlstats_Events_Frags.map) AS map,\r\n\t\t\tSUM(hlstats_Events_Frags.killerId = {$player}) AS kills,\r\n\t\t\tSUM(hlstats_Events_Frags.victimId = {$player}) AS deaths,\r\n\t\t\tIFNULL(ROUND(SUM(hlstats_Events_Frags.killerId = {$player}) / IF(SUM(hlstats_Events_Frags.victimId = {$player}) = 0, 1, SUM(hlstats_Events_Frags.victimId = {$player})), 2), '-') AS kpd,\r\n\t\t\tROUND(CONCAT(SUM(hlstats_Events_Frags.killerId = {$player})) / {$realkills} * 100, 2) AS kpercent,\r\n\t\t\tROUND(CONCAT(SUM(hlstats_Events_Frags.victimId = {$player})) / {$realdeaths} * 100, 2) AS dpercent,\r\n\t\t\tSUM(hlstats_Events_Frags.killerId = {$player} AND hlstats_Events_Frags.headshot = 1) AS headshots,\r\n\t\t\tIFNULL(ROUND(SUM(hlstats_Events_Frags.killerId = {$player} AND hlstats_Events_Frags.headshot = 1) / SUM(hlstats_Events_Frags.killerId = {$player}), 2),'-') AS hpk,\r\n\t\t\tROUND(CONCAT(SUM(hlstats_Events_Frags.killerId = {$player} AND hlstats_Events_Frags.headshot = 1)) / {$realheadshots} * 100, 2) AS hpercent\r\n\t\tFROM\r\n\t\t\thlstats_Events_Frags\r\n\t\tWHERE\r\n\t\t\thlstats_Events_Frags.killerId = '{$player}'\r\n\t\t\tOR hlstats_Events_Frags.victimId = '{$player}'\r\n\t\tGROUP BY\r\n\t\t\thlstats_Events_Frags.map\r\n\t\tORDER BY\r\n\t\t\t{$tblMaps->sort} {$tblMaps->sortorder},\r\n\t\t\t{$tblMaps->sort2} {$tblMaps->sortorder}\r\n\t");
$numitems = $db->num_rows($result);
if ($numitems > 0) {
?>
<div style="clear:both;padding-top:20px;"></div>
<?php
printSectionTitle('Map Performance *');
$tblMaps->draw($result, $numitems, 95);
?>
<br /><br />
<?php
}
示例7: error
}
$db->query("\n\t\tSELECT\n\t\t\thlstats_Players.playerId,\n\t\t\thlstats_Players.lastName,\n\t\t\thlstats_Players.game\n\t\tFROM\n\t\t\thlstats_Players\n\t\tWHERE\n\t\t\tplayerId={$player}\n\t");
if ($db->num_rows() != 1) {
error("No such player '{$player}'.");
}
$playerdata = $db->fetch_array();
$db->free_result();
$pl_name = $playerdata['lastName'];
if (strlen($pl_name) > 10) {
$pl_shortname = substr($pl_name, 0, 8) . '...';
} else {
$pl_shortname = $pl_name;
}
$pl_name = htmlspecialchars($pl_name, ENT_COMPAT);
$pl_shortname = htmlspecialchars($pl_shortname, ENT_COMPAT);
$pl_urlname = urlencode($playerdata['lastName']);
$game = $playerdata['game'];
$db->query("SELECT name FROM hlstats_Games WHERE code='{$game}'");
if ($db->num_rows() != 1) {
$gamename = ucfirst($game);
} else {
list($gamename) = $db->fetch_row();
}
$tblWeapons = new Table(array(new TableColumn('weapon', 'Weapon', 'width=15&type=weaponimg&align=center&link=' . urlencode("mode=weaponinfo&weapon=%k&game={$game}")), new TableColumn('modifier', 'Modifier', 'width=10&align=right'), new TableColumn('kills', 'Kills', 'width=11&align=right'), new TableColumn('kpercent', 'Perc. Kills', 'width=18&sort=no&type=bargraph'), new TableColumn('kpercent', '%', 'width=5&sort=no&align=right&append=' . urlencode('%')), new TableColumn('headshots', 'Headshots', 'width=8&align=right'), new TableColumn('hpercent', 'Perc. Headshots', 'width=18&sort=no&type=bargraph'), new TableColumn('hpercent', '%', 'width=5&sort=no&align=right&append=' . urlencode('%')), new TableColumn('hpk', 'Hpk', 'width=5&align=right')), 'weapon', 'kills', 'weapon', true, 9999, 'weap_page', 'weap_sort', 'weap_sortorder', 'weapons');
$db->query("\n\t\t\tSELECT\n\t\t\t\tCOUNT(*)\n\t\t\tFROM\n\t\t\t\thlstats_Events_Frags\n\t\t\tLEFT JOIN hlstats_Servers ON\n\t\t\t\thlstats_Servers.serverId=hlstats_Events_Frags.serverId\n\t\t\tWHERE\n\t\t\t\thlstats_Servers.game='{$game}' AND killerId={$player}\n\t");
list($realkills) = $db->fetch_row();
$db->query("\n\t\t\tSELECT\n\t\t\t\tCOUNT(*)\n\t\t\tFROM\n\t\t\t\thlstats_Events_Frags\n\t\t\tLEFT JOIN hlstats_Servers ON\n\t\t\t\thlstats_Servers.serverId=hlstats_Events_Frags.serverId\n\t\t\tWHERE\n\t\t\t\thlstats_Servers.game='{$game}' AND killerId={$player}\n\t\t\t\tAND headshot=1 \n\t");
list($realheadshots) = $db->fetch_row();
$result = $db->query("\n\t\tSELECT\n\t\t\thlstats_Events_Frags.weapon,\n\t\t\tIFNULL(hlstats_Weapons.modifier, 1.00) AS modifier,\n\t\t\tCOUNT(hlstats_Events_Frags.weapon) AS kills,\n\t\t\tCOUNT(hlstats_Events_Frags.weapon) / {$realkills} * 100 AS kpercent,\n\t\t\tSUM(hlstats_Events_Frags.headshot=1) as headshots,\n\t\t\tSUM(hlstats_Events_Frags.headshot=1) / COUNT(hlstats_Events_Frags.weapon) AS hpk,\n\t\t\tSUM(hlstats_Events_Frags.headshot=1) / {$realheadshots} * 100 AS hpercent\n\t\tFROM\n\t\t\thlstats_Events_Frags\n\t\tLEFT JOIN hlstats_Weapons ON\n\t\t\thlstats_Weapons.code = hlstats_Events_Frags.weapon\n\t\tLEFT JOIN hlstats_Servers ON\n\t\t\thlstats_Servers.serverId=hlstats_Events_Frags.serverId\n\t\tWHERE\n\t\t\thlstats_Servers.game='{$game}' AND hlstats_Events_Frags.killerId={$player}\n\t\t\tAND (hlstats_Weapons.game='{$game}' OR hlstats_Weapons.weaponId IS NULL)\n\t\tGROUP BY\n\t\t\thlstats_Events_Frags.weapon\n\t\tORDER BY\n\t\t\t{$tblWeapons->sort} {$tblWeapons->sortorder},\n\t\t\t{$tblWeapons->sort2} {$tblWeapons->sortorder}\n\t");
$tblWeapons->draw($result, $db->num_rows($result), 100);
示例8: Table
<tr class="data-table-head">
<td colspan="3">Player Locations</td>
</tr>
<tr class="bg1">
<td>
<div id="map" style="margin:10px auto;width: 430px; height: 290px;"></div>
</td>
</tr>
</table>
</div>
</div><br />
<?php
flush();
$tblMembers = new Table(array(new TableColumn('lastName', 'Name', 'width=32&flag=1&link=' . urlencode('mode=playerinfo&player=%k')), new TableColumn('skill', 'Points', 'width=6&align=right'), new TableColumn('activity', 'Activity', 'width=10&sort=no&type=bargraph'), new TableColumn('connection_time', 'Time', 'width=13&align=right&type=timestamp'), new TableColumn('kills', 'Kills', 'width=6&align=right'), new TableColumn('percent', 'Clan Kills', 'width=10&sort=no&type=bargraph'), new TableColumn('percent', '%', 'width=6&sort=no&align=right&append=' . urlencode('%')), new TableColumn('deaths', 'Deaths', 'width=6&align=right'), new TableColumn('kpd', 'Kpd', 'width=6&align=right')), 'playerId', 'skill', 'kpd', true, 20, 'members_page', 'members_sort', 'members_sortorder', 'members', 'desc', true);
$result = $db->query("\r\n\t\tSELECT\r\n\t\t\thlstats_Players.playerId,\r\n\t\t\thlstats_Players.lastName,\r\n\t\t\thlstats_Players.country,\r\n\t\t\thlstats_Players.flag,\r\n\t\t\thlstats_Players.skill,\r\n\t\t\thlstats_Players.connection_time,\r\n\t\t\thlstats_Players.kills,\r\n\t\t\thlstats_Players.deaths,\r\n\t\t\tROUND(hlstats_Players.kills / IF(hlstats_Players.deaths = 0, 1, hlstats_Players.deaths), 2) AS kpd,\r\n\t\t\tROUND(hlstats_Players.kills / IF(" . $clandata['kills'] . " = 0, 1, " . $clandata['kills'] . ") * 100, 2) AS percent,\r\n\t\t\tactivity\r\n\t\tFROM\r\n\t\t\thlstats_Players\r\n\t\tWHERE\r\n\t\t\thlstats_Players.clan={$clan}\r\n\t\t\tAND hlstats_Players.hideranking = 0\r\n\t\tGROUP BY\r\n\t\t\thlstats_Players.playerId\r\n\t\tORDER BY\r\n\t\t\t{$tblMembers->sort} {$tblMembers->sortorder},\r\n\t\t\t{$tblMembers->sort2} {$tblMembers->sortorder},\r\n\t\t\thlstats_Players.skill DESC\r\n\t\tLIMIT {$tblMembers->startitem},{$tblMembers->numperpage}\r\n\t");
$resultCount = $db->query("\r\n\t\tSELECT\r\n\t\t\tCOUNT(*)\r\n\t\tFROM\r\n\t\t\thlstats_Players\r\n\t\tWHERE\r\n\t\t\thlstats_Players.clan={$clan}\r\n\t\t\tAND hlstats_Players.hideranking = 0\r\n\t");
list($numitems) = $db->fetch_row($resultCount);
?>
<div style="clear:both;padding-top:20px;"></div>
<?php
printSectionTitle('Members');
$tblMembers->draw($result, $numitems, 95);
?>
<br /><br />
<?php
if ($g_options['show_google_map'] == 1) {
include INCLUDE_PATH . '/google_maps.php';
printMap('clan');
}
示例9: htmlspecialchars
$tblTeams->draw($result, $numitems, 95);
?>
<br /><br />
<?php
}
flush();
$result = $db->query("\r\n\t\tSELECT\r\n\t\t\thlstats_Roles.code,\r\n\t\t\thlstats_Roles.name\r\n\t\tFROM\r\n\t\t\thlstats_Roles\r\n\t\tWHERE\r\n\t\t\thlstats_Roles.game = '{$game}'\r\n\t");
while ($rowdata = $db->fetch_row($result)) {
$code = preg_replace("/[ \r\n\t]+/", "", $rowdata[0]);
$fname[strToLower($code)] = htmlspecialchars($rowdata[1]);
}
$tblRoles = new Table(array(new TableColumn('code', 'Role', 'width=25&type=roleimg&align=left&link=' . urlencode("mode=rolesinfo&role=%k&game={$game}"), $fname), new TableColumn('rolecount', 'Joined', 'width=10&align=right&append=+times'), new TableColumn('percent', '%', 'width=10&sort=no&align=right&append=' . urlencode('%')), new TableColumn('percent', 'Ratio', 'width=20&sort=no&type=bargraph'), new TableColumn('killsTotal', 'Kills', 'width=10&align=right'), new TableColumn('deathsTotal', 'Deaths', 'width=10&align=right'), new TableColumn('kpd', 'K:D', 'width=10&align=right')), 'code', 'rolecount', 'name', true, 9999, 'roles_page', 'roles_sort', 'roles_sortorder', 'roles', 'desc', true);
$db->query("\r\n\t\tDROP TABLE IF EXISTS\r\n\t\t\thlstats_Frags_as\r\n\t");
$db->query("\r\n\t\tCREATE TEMPORARY TABLE\r\n\t\t\thlstats_Frags_as\r\n\t\t\t(\r\n\t\t\t\tplayerId INT(10),\r\n\t\t\t\tkills INT(10),\r\n\t\t\t\tdeaths INT(10),\r\n\t\t\t\trole varchar(128) NOT NULL default ''\r\n\t\t\t)\r\n\t");
$db->query("\r\n\t\tINSERT INTO\r\n\t\t\thlstats_Frags_as\r\n\t\t\t(\r\n\t\t\t\tplayerId,\r\n\t\t\t\tkills,\r\n\t\t\t\trole\r\n\t\t\t)\r\n\t\tSELECT\r\n\t\t\thlstats_Events_Frags.victimId,\r\n\t\t\thlstats_Events_Frags.killerId,\r\n\t\t\thlstats_Events_Frags.killerRole\r\n\t\tFROM\r\n\t\t\thlstats_Events_Frags\r\n\t\tWHERE \r\n\t\t\thlstats_Events_Frags.killerId = {$player}\r\n\t");
$db->query("\r\n\t\tINSERT INTO\r\n\t\t\thlstats_Frags_as\r\n\t\t\t(\r\n\t\t\t\tplayerId,\r\n\t\t\t\tdeaths,\r\n\t\t\t\trole\r\n\t\t\t)\r\n\t\tSELECT\r\n\t\t\thlstats_Events_Frags.killerId,\r\n\t\t\thlstats_Events_Frags.victimId,\r\n\t\t\thlstats_Events_Frags.victimRole\r\n\t\tFROM\r\n\t\t\thlstats_Events_Frags\r\n\t\tWHERE \r\n\t\t\thlstats_Events_Frags.victimId = {$player} \r\n\t");
$db->query("\r\n\t\tDROP TABLE IF EXISTS\r\n\t\t\thlstats_Frags_as_res\r\n\t");
$db->query("\r\n\t\tCREATE TEMPORARY TABLE\r\n\t\t\thlstats_Frags_as_res\r\n\t\t\t(\r\n\t\t\t\tkillsTotal INT(10),\r\n\t\t\t\tdeathsTotal INT(10),\r\n\t\t\t\trole varchar(128) NOT NULL default ''\r\n\t\t\t)\r\n\t");
$db->query("\r\n\t\tINSERT INTO\r\n\t\t\thlstats_Frags_as_res\r\n\t\t\t(\r\n\t\t\t\tkillsTotal,\r\n\t\t\t\tdeathsTotal,\r\n\t\t\t\trole\r\n\t\t\t)\r\n\t\tSELECT\r\n\t\t\tCOUNT(hlstats_Frags_as.kills) AS kills, \r\n\t\t\tCOUNT(hlstats_Frags_as.deaths) AS deaths,\r\n\t\t\thlstats_Frags_as.role\r\n\t\tFROM\r\n\t\t\thlstats_Frags_as\r\n\t\tGROUP BY\r\n\t\t\thlstats_Frags_as.role\r\n\t");
$db->query("\r\n\t\tSELECT\r\n\t\t\tCOUNT(*)\r\n\t\tFROM\r\n\t\t\thlstats_Events_ChangeRole\r\n\t\tWHERE\r\n\t\t\thlstats_Events_ChangeRole.playerId = {$player}\r\n\t");
list($numrolejoins) = $db->fetch_row();
$result = $db->query("\r\n\t\tSELECT\r\n\t\t\tIFNULL(hlstats_Roles.name, hlstats_Events_ChangeRole.role) AS name,\r\n\t\t\tIFNULL(hlstats_Roles.code, hlstats_Events_ChangeRole.role) AS code,\r\n\t\t\tCOUNT(hlstats_Events_ChangeRole.id) AS rolecount,\r\n\t\t\tROUND(COUNT(hlstats_Events_ChangeRole.id) / IF({$numrolejoins} = 0, 1, {$numrolejoins}) * 100, 2) AS percent,\r\n\t\t\thlstats_Frags_as_res.killsTotal,\r\n\t\t\thlstats_Frags_as_res.deathsTotal,\r\n\t\t\tROUND(hlstats_Frags_as_res.killsTotal / IF(hlstats_Frags_as_res.deathsTotal = 0, 1, hlstats_Frags_as_res.deathsTotal), 2) AS kpd\r\n\t\tFROM\r\n\t\t\thlstats_Events_ChangeRole\r\n\t\tLEFT JOIN\r\n\t\t\thlstats_Roles\r\n\t\tON\r\n\t\t\thlstats_Events_ChangeRole.role = hlstats_Roles.code\r\n\t\tLEFT JOIN\r\n\t\t\thlstats_Frags_as_res\r\n\t\tON\r\n\t\t\thlstats_Frags_as_res.role = hlstats_Events_ChangeRole.role\r\n\t\tWHERE\r\n\t\t\thlstats_Events_ChangeRole.playerId = {$player}\r\n\t\t\tAND\r\n\t\t\t(\r\n\t\t\t\thidden <> '1'\r\n\t\t\t\tOR hidden IS NULL\r\n\t\t\t)\r\n\t\t\tAND hlstats_Roles.game = '{$game}'\r\n\t\tGROUP BY\r\n\t\t\thlstats_Events_ChangeRole.role\r\n\t\tORDER BY\r\n\t\t\t{$tblRoles->sort} {$tblRoles->sortorder},\r\n\t\t\t{$tblRoles->sort2} {$tblRoles->sortorder}\r\n\t");
$numitems = $db->num_rows($result);
if ($numitems > 0) {
printSectionTitle('Role Selection *');
$tblRoles->draw($result, $numitems, 95);
?>
<br /><br />
<?php
}
示例10: die
die('Do not access this file directly.');
}
flush();
$tblPlayerActions = new Table(array(new TableColumn('description', 'Action', 'width=45&link=' . urlencode("mode=actioninfo&action=%k&game={$game}")), new TableColumn('obj_count', 'Earned', 'width=25&align=right&append=+times'), new TableColumn('obj_bonus', 'Accumulated Points', 'width=25&align=right')), 'code', 'obj_count', 'description', true, 9999, 'obj_page', 'obj_sort', 'obj_sortorder', 'tabteams', 'desc', true);
$result = $db->query("\r\n\t\t(\r\n\t\tSELECT\r\n\t\t\thlstats_Actions.code,\r\n\t\t\thlstats_Actions.description,\r\n\t\t\tCOUNT(hlstats_Events_PlayerActions.id) AS obj_count,\r\n\t\t\tSUM(hlstats_Events_PlayerActions.bonus) AS obj_bonus\r\n\t\tFROM\r\n\t\t\thlstats_Actions\r\n\t\tLEFT JOIN\r\n\t\t\thlstats_Events_PlayerActions\r\n\t\tON\r\n\t\t\thlstats_Events_PlayerActions.actionId = hlstats_Actions.id\r\n\t\tWHERE\r\n\t\t\thlstats_Events_PlayerActions.playerId = {$player}\r\n\t\tGROUP BY\r\n\t\t\thlstats_Actions.id\r\n\t\t)\r\n\t\tUNION ALL\r\n\t\t(\r\n\t\tSELECT\r\n\t\t\thlstats_Actions.code,\r\n\t\t\thlstats_Actions.description,\r\n\t\t\tCOUNT(hlstats_Events_PlayerPlayerActions.id) AS obj_count,\r\n\t\t\tSUM(hlstats_Events_PlayerPlayerActions.bonus) AS obj_bonus\r\n\t\tFROM\r\n\t\t\thlstats_Actions\r\n\t\tLEFT JOIN\r\n\t\t\thlstats_Events_PlayerPlayerActions\r\n\t\tON\r\n\t\t\thlstats_Events_PlayerPlayerActions.actionId = hlstats_Actions.id\r\n\t\tWHERE\r\n\t\t\thlstats_Events_PlayerPlayerActions.playerId = {$player}\r\n\t\tGROUP BY\r\n\t\t\thlstats_Actions.id\r\n\t\t)\r\n\t\tORDER BY\r\n\t\t\t{$tblPlayerActions->sort} {$tblPlayerActions->sortorder},\r\n\t\t\t{$tblPlayerActions->sort2} {$tblPlayerActions->sortorder}\r\n\t");
$numitems = $db->num_rows($result);
if ($numitems > 0) {
?>
<div style="clear:both;padding-top:20px;"></div>
<?php
printSectionTitle('Player Actions *');
$tblPlayerActions->draw($result, $numitems, 95);
?>
<br /><br />
<?php
}
$tblPlayerPlayerActionsV = new Table(array(new TableColumn('description', 'Action', 'width=45&link=' . urlencode("mode=actioninfo&action=%k&game={$game}#victims")), new TableColumn('obj_count', 'Earned Against', 'width=25&align=right&append=+times'), new TableColumn('obj_bonus', 'Accumulated Points', 'width=25&align=right')), 'code', 'obj_count', 'description', true, 9999, 'ppa_page', 'ppa_sort', 'ppa_sortorder', 'tabteams', 'desc', true);
$result = $db->query("\r\n\t\tSELECT\r\n\t\t\thlstats_Actions.code,\r\n\t\t\thlstats_Actions.description,\r\n\t\t\tCOUNT(hlstats_Events_PlayerPlayerActions.id) AS obj_count,\r\n\t\t\tSUM(hlstats_Events_PlayerPlayerActions.bonus) * -1 AS obj_bonus\r\n\t\tFROM\r\n\t\t\thlstats_Actions\r\n\t\tLEFT JOIN\r\n\t\t\thlstats_Events_PlayerPlayerActions\r\n\t\tON\r\n\t\t\thlstats_Events_PlayerPlayerActions.actionId = hlstats_Actions.id\r\n\t\tWHERE\r\n\t\t\thlstats_Events_PlayerPlayerActions.victimId = {$player}\r\n\t\tGROUP BY\r\n\t\t\thlstats_Actions.id\r\n\t\tORDER BY\r\n\t\t\t{$tblPlayerPlayerActionsV->sort} {$tblPlayerPlayerActionsV->sortorder},\r\n\t\t\t{$tblPlayerPlayerActionsV->sort2} {$tblPlayerPlayerActionsV->sortorder}\r\n\t");
$numitemsv = $db->num_rows($result);
if ($numitemsv > 0) {
if ($numitems == 0) {
?>
<div style="clear:both;padding-top:20px;"></div>
<?php
}
printSectionTitle('Victims of Player-Player Actions *');
$tblPlayerPlayerActionsV->draw($result, $numitems, 95);
?>
<br /><br />
<?php
}
示例11: timestamp_to_str
echo 'Kills per Death';
?>
:</td>
<td colspan="2" class="fSmall"><?php
if ($clandata['deaths'] != 0) {
printf('%0.2f', $clandata['kills'] / $clandata['deaths']);
} else {
echo '-';
}
?>
</td>
</tr>
<tr class="bg1">
<td class="fSmall"><?php
echo 'Total Connection Time';
?>
:</td>
<td colspan="2" class="fSmall"><?php
echo timestamp_to_str($clandata['connection_time']);
?>
</td>
</tr>
</table>
<?php
flush();
$tblMembers = new Table(array(new TableColumn('lastName', 'Name', 'width=32&flag=1&link=' . urlencode('mode=statsme&player=%k')), new TableColumn('skill', 'Points', 'width=7&align=right'), new TableColumn('activity', 'Activity', 'width=9&sort=no&type=bargraph'), new TableColumn('connection_time', 'Time', 'width=14&align=right&type=timestamp'), new TableColumn('kills', 'Kills', 'width=7&align=right'), new TableColumn('percent', 'Clan Kills', 'width=5&sort=no&type=bargraph'), new TableColumn('percent', '%', 'width=7&sort=no&align=right&append=' . urlencode('%')), new TableColumn('deaths', 'Deaths', 'width=7&align=right'), new TableColumn('kpd', 'KPD', 'width=7&align=right')), 'playerId', 'skill', 'kpd', true, 20, 'members_page', 'members_sort', 'members_sortorder', 'members');
$result = $db->query("\r\n\t\tSELECT\r\n\t\t\tplayerId,\r\n\t\t\tlastName,\r\n\t\t\tcountry,\r\n\t\t\tflag,\r\n\t\t\tskill,\r\n\t\t\tconnection_time,\r\n\t\t\tkills,\r\n\t\t\tdeaths,\r\n\t\t\tIFNULL(kills/deaths, '-') AS kpd,\r\n\t\t\t(kills/" . $clandata["kills"] . ") * 100 AS percent,\r\n\t\t\tactivity\r\n\t\tFROM\r\n\t\t\thlstats_Players\r\n\t\tWHERE\r\n\t\t\tclan={$clan}\r\n\t\t\tAND hlstats_Players.hideranking = 0\r\n\t\tORDER BY\r\n\t\t\t{$tblMembers->sort} {$tblMembers->sortorder},\r\n\t\t\t{$tblMembers->sort2} {$tblMembers->sortorder},\r\n\t\t\tlastName ASC\r\n\t\tLIMIT {$tblMembers->startitem},{$tblMembers->numperpage}\r\n\t");
$resultCount = $db->query("\r\n\t\tSELECT\r\n\t\t\tCOUNT(*)\r\n\t\tFROM\r\n\t\t\thlstats_Players\r\n\t\tWHERE\r\n\t\t\tclan={$clan}\r\n\t\t\tAND hlstats_Players.hideranking = 0\r\n\t");
list($numitems) = $db->fetch_row($resultCount);
$tblMembers->draw($result, $numitems, 100);
示例12: or
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
For support and installation notes visit http://www.hlxcommunity.com
*/
if (!defined('IN_HLSTATS')) {
die('Do not access this file directly.');
}
flush();
$tblServers = new Table(array(new TableColumn('server', 'Server', 'width=26&align=left'), new TableColumn('kills', 'Kills', 'width=6&align=right'), new TableColumn('kpercent', '%', 'width=5&sort=no&align=right&append=' . urlencode('%')), new TableColumn('kpercent', 'Ratio', 'width=15&sort=no&type=bargraph'), new TableColumn('deaths', 'Deaths', 'width=6&align=right'), new TableColumn('kpd', 'K:D', 'width=5&align=right'), new TableColumn('headshots', 'Headshots', 'width=6&align=right'), new TableColumn('hpercent', 'Percentage of Headshots', 'width=16&sort=no&type=bargraph'), new TableColumn('hpercent', '%', 'width=5&sort=no&align=right&append=' . urlencode('%')), new TableColumn('hpk', 'HS:K', 'width=5&align=right')), 'server', 'kills', 'kills', true, 9999, 'server_page', 'server_sort', 'server_sortorder', 'tabmaps', 'desc', true);
// leave the join on this one, we do groupings..
$result = $db->query("\r\n\t\tSELECT\r\n\t\t\thlstats_Servers.name AS server,\r\n\t\t\tSUM(hlstats_Events_Frags.killerId = {$player}) AS kills,\r\n\t\t\tSUM(hlstats_Events_Frags.victimId = {$player}) AS deaths,\r\n\t\t\tSUM(hlstats_Events_Frags.killerId = {$player}) / IF(SUM(hlstats_Events_Frags.victimId = {$player}) = 0, 1, SUM(hlstats_Events_Frags.victimId = {$player})) AS kpd,\r\n\t\t\tROUND(SUM(hlstats_Events_Frags.killerId = {$player}) / {$realkills} * 100, 2) AS kpercent,\r\n\t\t\tROUND(SUM(hlstats_Events_Frags.victimId = {$player}) / {$realdeaths} * 100, 2) AS dpercent,\r\n\t\t\tSUM(hlstats_Events_Frags.killerId = {$player} AND hlstats_Events_Frags.headshot = 1) AS headshots,\r\n\t\t\tIFNULL(SUM(hlstats_Events_Frags.killerId = {$player} AND hlstats_Events_Frags.headshot = 1) / SUM(hlstats_Events_Frags.killerId = {$player}), '-') AS hpk,\r\n\t\t\tROUND(SUM(hlstats_Events_Frags.killerId = {$player} AND hlstats_Events_Frags.headshot = 1) / {$realheadshots} * 100, 2) AS hpercent\r\n\t\tFROM\r\n\t\t\thlstats_Events_Frags\r\n\t\tLEFT JOIN\r\n\t\t\thlstats_Servers\r\n\t\tON\r\n\t\t\thlstats_Servers.serverId = hlstats_Events_Frags.serverId\r\n\t\tWHERE\r\n\t\t\thlstats_Servers.game = '{$game}'\r\n\t\t\tAND hlstats_Events_Frags.killerId = '{$player}'\r\n\t\t\tOR hlstats_Events_Frags.victimId = '{$player}'\r\n\t\tGROUP BY\r\n\t\t\thlstats_Servers.name\r\n\t\tORDER BY\r\n\t\t\t{$tblServers->sort} {$tblServers->sortorder},\r\n\t\t\t{$tblServers->sort2} {$tblServers->sortorder}\r\n\t");
$numitems = $db->num_rows($result);
if ($numitems > 0) {
printSectionTitle('Server Activity *');
$tblServers->draw($result, $numitems, 95);
?>
<br /><br />
<?php
}
示例13: Table
<?php
$tblActions = new Table(array(new TableColumn('gamename', 'Game', 'width=24&sort=no'), new TableColumn('for_PlayerActions', 'Player Action', 'width=4&sort=no&align=center'), new TableColumn('for_PlayerPlayerActions', 'PlyrPlyr Action', 'width=4&sort=no&align=center'), new TableColumn('for_TeamActions', 'Team Action', 'width=4&sort=no&align=center'), new TableColumn('for_WorldActions', 'World Action', 'width=4&sort=no&align=center'), new TableColumn('description', 'Action', 'width=33'), new TableColumn('s_reward_player', 'Player Reward', 'width=12'), new TableColumn('s_reward_team', 'Team Reward', 'width=15')), 'id', 'description', 's_reward_player', false, 9999, 'act_page', 'act_sort', 'act_sortorder', 'actions', 'asc');
$result = $db->query("\r\n\t\t\t\t\tSELECT\r\n\t\t\t\t\t\thlstats_Games.name AS gamename,\r\n\t\t\t\t\t\thlstats_Actions.description,\r\n\t\t\t\t\t\tIF(SIGN(hlstats_Actions.reward_player) > 0, CONCAT('+', hlstats_Actions.reward_player), hlstats_Actions.reward_player) AS s_reward_player,\r\n\t\t\t\t\t\tIF(hlstats_Actions.team != '' AND hlstats_Actions.reward_team != 0,\r\n\t\t\t\t\t\tIF(SIGN(hlstats_Actions.reward_team) >= 0, CONCAT(hlstats_Teams.name, ' +', hlstats_Actions.reward_team), CONCAT(hlstats_Teams.name, ' ', hlstats_Actions.reward_team)), '') AS s_reward_team,\r\n\t\t\t\t\t\tIF(for_PlayerActions='1', 'Yes', 'No') AS for_PlayerActions,\r\n\t\t\t\t\t\tIF(for_PlayerPlayerActions='1', 'Yes', 'No') AS for_PlayerPlayerActions,\r\n\t\t\t\t\t\tIF(for_TeamActions='1', 'Yes', 'No') AS for_TeamActions,\r\n\t\t\t\t\t\tIF(for_WorldActions='1', 'Yes', 'No') AS for_WorldActions\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\thlstats_Actions\r\n\t\t\t\t\tINNER JOIN\r\n\t\t\t\t\t\thlstats_Games\r\n\t\t\t\t\tON\r\n\t\t\t\t\t\thlstats_Games.code = hlstats_Actions.game\r\n\t\t\t\t\t\tAND hlstats_Games.hidden = '0'\r\n\t\t\t\t\tLEFT JOIN\r\n\t\t\t\t\t\thlstats_Teams\r\n\t\t\t\t\tON\r\n\t\t\t\t\t\thlstats_Teams.code = hlstats_Actions.team\r\n\t\t\t\t\t\tAND hlstats_Teams.game = hlstats_Actions.game\r\n\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\thlstats_Actions.game ASC,\r\n\t\t\t\t\t\t{$tblActions->sort} {$tblActions->sortorder},\r\n\t\t\t\t\t\t{$tblActions->sort2} {$tblActions->sortorder}\r\n\t\t\t\t");
$numitems = $db->num_rows($result);
$tblActions->draw($result, $numitems, 90, 'center');
?>
<br /><br />
<strong>Note:</strong> The player who triggers an action may receive both the player reward and the team reward.<br /><br />
<h1 class="fTitle" style="padding-top:10px;"><a name="weaponmods">3. What are all the weapon points modifiers?</a></h1><br /><br />
Weapon points modifiers are used to determine how many points you should gain or lose when you make a kill or are killed by another player. Higher modifiers indicate that more points will be gained when killing with that weapon (and similarly, more points will be lost when being killed <em>by</em> that weapon). Modifiers generally range from 0.00 to 2.00.<br /><br />
<a name="weapons"></a>
<?php
$tblWeapons = new Table(array(new TableColumn('gamename', 'Game', 'width=24&sort=no'), new TableColumn('code', 'Weapon', 'width=14'), new TableColumn('name', 'Name', 'width=50'), new TableColumn('modifier', 'Points Modifier', 'width=12')), 'weaponId', 'modifier', 'code', false, 9999, 'weap_page', 'weap_sort', 'weap_sortorder', 'weapons', 'desc');
$result = $db->query("\r\n\t\t\t\t\tSELECT\r\n\t\t\t\t\t\thlstats_Games.name AS gamename,\r\n\t\t\t\t\t\thlstats_Weapons.code,\r\n\t\t\t\t\t\thlstats_Weapons.name,\r\n\t\t\t\t\t\thlstats_Weapons.modifier\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\thlstats_Weapons\r\n\t\t\t\t\tINNER JOIN\r\n\t\t\t\t\t\thlstats_Games\r\n\t\t\t\t\tON\r\n\t\t\t\t\t\thlstats_Games.code = hlstats_Weapons.game\r\n\t\t\t\t\t\tAND hlstats_Games.hidden = '0'\r\n\t\t\t\t\tORDER BY\r\n\t\t\t\t\t\thlstats_Weapons.game ASC,\r\n\t\t\t\t\t\t{$tblWeapons->sort} {$tblWeapons->sortorder},\r\n\t\t\t\t\t\t{$tblWeapons->sort2} {$tblWeapons->sortorder}\r\n\t\t\t\t");
$numitems = $db->num_rows($result);
$tblWeapons->draw($result, $numitems, 90, "center");
?>
<br /><br />
<h1 class="fTitle" style="padding-top:10px;"><a name="set">4. How can I set my real name, e-mail address, and homepage?</a></h1><br /><br />
Player profile options can be configured by saying the appropriate <strong>HLX_SET</strong> command while you are playing on a participating game server. To say commands, push your chat key and type the command text.<br /><br />
Syntax: say <strong>/hlx_set option value</strong>.<br /><br />
Acceptable "options" are:
<ul>
<li><strong>realname</strong><br />
Sets your Real Name as shown in your profile.<br />
Example: <strong>/hlx_set realname Joe Bloggs</strong><br /><br />
</li>
<li><strong>email</strong><br />
Sets your E-mail Address as shown in your profile.<br />
Example: <strong>/hlx_set email joe@joebloggs.com</strong><br /><br />
示例14: getSelect
<form method="get" action="<?php
echo $g_options["scripturl"];
?>
">
<input type="hidden" name="mode" value="admin" />
<input type="hidden" name="task" value="<?php
echo $code;
?>
" />
<input type="hidden" name="sort" value="<?php
echo $sort;
?>
" />
<input type="hidden" name="sortorder" value="<?php
echo $sortorder;
?>
" />
<b style="padding-left:35px;">•</b> Show only events of type: <?php
$resultTypes = $db->query("\r\n\t\tSELECT\r\n\t\t\tDISTINCT eventType\r\n\t\tFROM\r\n\t\t\thlstats_AdminEventHistory\r\n\t\tORDER BY\r\n\t\t\teventType ASC\r\n\t");
$types[""] = "(All)";
while (list($k) = $db->fetch_row($resultTypes)) {
$types[$k] = $k;
}
echo getSelect("type", $types, $type);
?>
<input type="submit" value="Filter" class="smallsubmit" /><br /><br />
</form>
<?php
$table->draw($result, $numitems, 95, "center");
示例15: die
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
For support and installation notes visit http://www.hlxcommunity.com
*/
if (!defined('IN_HLSTATS')) {
die('Do not access this file directly.');
}
// Weapon Details
$weapon = valid_request($_GET['weapon'], 0) or error('No weapon ID specified.');
$db->query("\n\t\tSELECT\n\t\t\tname\n\t\tFROM\n\t\t\thlstats_Weapons\n\t\tWHERE\n\t\t\tcode='{$weapon}'\n\t\t\tAND game='{$game}'\n\t");
if ($db->num_rows() != 1) {
$wep_name = ucfirst($weapon);
} else {
$weapondata = $db->fetch_array();
$db->free_result();
$wep_name = $weapondata['name'];
}
$db->query("SELECT name FROM hlstats_Games WHERE code='{$game}'");
if ($db->num_rows() != 1) {
error('Invalid or no game specified.');
} else {
list($gamename) = $db->fetch_row();
}
$table = new Table(array(new TableColumn('killerName', 'Player', 'width=60&align=left&flag=1&link=' . urlencode('mode=statsme&player=%k')), new TableColumn('frags', ucfirst($weapon) . ' kills', 'width=15&align=right'), new TableColumn('headshots', 'Headshots', 'width=15&align=right'), new TableColumn('hpk', 'Hpk', 'width=5&align=right')), 'killerId', 'frags', 'killerName', true, 25);
$result = $db->query("\n\t\tSELECT\n\t\t\thlstats_Events_Frags.killerId,\n\t\t\thlstats_Players.country,\n\t\t\thlstats_Players.flag,\n\t\t\thlstats_Players.lastName AS killerName,\n\t\t\tCOUNT(hlstats_Events_Frags.weapon) AS frags,\n\t\t\tSUM(hlstats_Events_Frags.headshot=1) as headshots,\n\t\t\tIFNULL(SUM(hlstats_Events_Frags.headshot=1) / Count(hlstats_Events_Frags.weapon), '-') AS hpk\n\t\tFROM\n\t\t\thlstats_Events_Frags,\n\t\t\thlstats_Players\n\t\tWHERE\n\t\t\thlstats_Players.playerId = hlstats_Events_Frags.killerId\n\t\t\tAND hlstats_Events_Frags.weapon='{$weapon}'\n\t\t\tAND hlstats_Players.game='{$game}'\n\t\t\tAND hlstats_Players.hideranking<>'1'\n\t\tGROUP BY\n\t\t\thlstats_Events_Frags.killerId\n\t\tORDER BY\n\t\t\t{$table->sort} {$table->sortorder},\n\t\t\t{$table->sort2} {$table->sortorder}\n\t\tLIMIT {$table->startitem},{$table->numperpage}\n\t");
$table->draw($result, 25, 100);