Ejemplo n.º 1
0
 function update()
 {
     global $db;
     foreach ($this->options as $opt) {
         if ($this->title == 'Fonts' || $this->title == 'General') {
             $optval = $_POST[$opt->name];
             $search_pattern = array('/script/i', '/;/', '/%/');
             $replace_pattern = array('', '', '');
             $optval = preg_replace($search_pattern, $replace_pattern, $optval);
         } else {
             $optval = valid_request($_POST[$opt->name], 0);
         }
         $result = $db->query("\r\n\t\t\t\t\tSELECT\r\n\t\t\t\t\t\tvalue\r\n\t\t\t\t\tFROM\r\n\t\t\t\t\t\thlstats_Options\r\n\t\t\t\t\tWHERE\r\n\t\t\t\t\t\tkeyname='{$opt->name}'\r\n\t\t\t\t");
         if ($db->num_rows($result) == 1) {
             $result = $db->query("\r\n\t\t\t\t\t\tUPDATE\r\n\t\t\t\t\t\t\thlstats_Options\r\n\t\t\t\t\t\tSET\r\n\t\t\t\t\t\t\tvalue='{$optval}'\r\n\t\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t\tkeyname='{$opt->name}'\r\n\t\t\t\t\t");
         } else {
             $result = $db->query("\r\n\t\t\t\t\t\tINSERT INTO\r\n\t\t\t\t\t\t\thlstats_Options\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\tkeyname,\r\n\t\t\t\t\t\t\t\tvalue\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\tVALUES\r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t'{$opt->name}',\r\n\t\t\t\t\t\t\t'{$optval}'\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t");
         }
     }
 }
Ejemplo n.º 2
0
function complete_login()
{
    if (valid_request(array(isset($_POST['login']), isset($_POST['password'])))) {
        global $db;
        global $smarty;
        //getting the name parts
        if (!preg_match('/^[a-zA-Z\\x80-\\xFF]+\\.{1}[a-zA-Z\\x80-\\xFF]+$/', $_POST['login'])) {
            $smarty->assign('message', 'Ihr Login musst das Format \'Vorname.Nachname\' haben (z.B. Hans.Meier).');
            $smarty->display('login.tpl');
            return true;
        }
        $point_pos = strpos($_POST['login'], ".");
        $first_name = substr($_POST['login'], 0, $point_pos);
        $last_name = substr($_POST['login'], $point_pos + 1);
        //see if we hit the right firstname.lastname - password pair
        $sql = "get_customer_login_data('" . $first_name . "', '" . $last_name . "', '" . $_POST['password'] . "')";
        $db->run($sql);
        if (!$db->empty_result) {
            //store the user informations for further actions
            $row = $db->get_result_row();
            $_SESSION['customer_id'] = $row['customer_id'];
            $_SESSION['form_of_address'] = $row['form_of_address'];
            $_SESSION['first_name'] = $first_name;
            $_SESSION['last_name'] = $last_name;
            if ($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.1') {
                if (php_sapi_name() == 'cgi') {
                    header('Status: 303 See Other ');
                } else {
                    header('HTTP/1.1 303 See Other ');
                }
                header('Location: index.php?site=jobs');
            }
        } else {
            $smarty->assign('message', 'Ihr Login und ihr Passwort passen nicht zusammen.');
            $smarty->display('login.tpl');
            return true;
        }
    }
    return true;
}
Ejemplo n.º 3
0
 function Table($columns, $keycol, $sort_default, $sort_default2, $showranking = false, $numperpage = 50, $var_page = 'page', $var_sort = 'sort', $var_sortorder = 'sortorder', $sorthash = '', $sort_default_order = 'desc', $ajax = false)
 {
     global $g_options;
     $this->columns = $columns;
     $this->keycol = $keycol;
     $this->showranking = $showranking;
     $this->numperpage = $numperpage;
     $this->var_page = $var_page;
     $this->var_sort = $var_sort;
     $this->var_sortorder = $var_sortorder;
     $this->sorthash = $sorthash;
     $this->sort_default_order = $sort_default_order;
     $this->ajax = $g_options['playerinfo_tabs'] ? $ajax : false;
     $this->page = valid_request(intval($_GET[$var_page]), 1);
     $this->sort = valid_request($_GET[$var_sort], 0);
     $this->sortorder = valid_request($_GET[$var_sortorder], 0);
     if ($this->page < 1) {
         $this->page = 1;
     }
     $this->startitem = ($this->page - 1) * $this->numperpage;
     foreach ($columns as $col) {
         if ($col->sort != 'no') {
             $this->columnlist[] = $col->name;
         }
     }
     if (!is_array($this->columnlist) || !in_array($this->sort, $this->columnlist)) {
         $this->sort = $sort_default;
     }
     if ($this->sortorder != 'asc' && $this->sortorder != 'desc') {
         $this->sortorder = $this->sort_default_order;
     }
     if ($this->sort == $sort_default2) {
         $this->sort2 = $sort_default;
     } else {
         $this->sort2 = $sort_default2;
     }
 }
Ejemplo n.º 4
0
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.');
}
// Action Statistics
$player = valid_request(intval($_GET['player']), 1);
$uniqueid = valid_request(strval($_GET['uniqueid']), 0);
$db->query("SELECT name FROM hlstats_Games WHERE code='{$game}'");
if ($db->num_rows() < 1) {
    error("No such game '{$game}'.");
}
list($gamename) = $db->fetch_row();
$db->free_result();
$tblPlayerActions = new Table(array(new TableColumn('description', 'Action', 'width=45&link=' . urlencode("mode=actioninfo&amp;action=%k&amp;game={$game}")), new TableColumn('obj_count', 'Achieved', 'width=25&align=right&append=+times'), new TableColumn('obj_bonus', 'Skill Bonus', 'width=25&align=right')), 'code', 'obj_count', 'description', true, 9999, 'obj_page', 'obj_sort', 'obj_sortorder');
$db->query("\n\t\tSELECT\n\t\t\tSUM(count)\n\t\tFROM\n\t\t\thlstats_Actions\n\t\tWHERE\n\t\t\thlstats_Actions.game='{$game}'\n\t");
list($totalactions) = $db->fetch_row();
$result = $db->query("\n\t\tSELECT\n\t\t\tcode,\n\t\t\tdescription,\n\t\t\tcount AS obj_count,\n\t\t\treward_player AS obj_bonus\n\t\tFROM\n\t\t\thlstats_Actions\n\t\tWHERE\n\t\t\thlstats_Actions.game='{$game}'\n\t\t\tAND count > 0\n\t\tGROUP BY\n\t\t\thlstats_Actions.id\n\t\tORDER BY\n\t\t\t{$tblPlayerActions->sort} {$tblPlayerActions->sortorder},\n\t\t\t{$tblPlayerActions->sort2} {$tblPlayerActions->sortorder}\n\t");
?>

<?php 
$tblPlayerActions->draw($result, $db->num_rows($result), 100);
Ejemplo n.º 5
0
 function update()
 {
     global $db;
     $setstrings = array();
     foreach ($this->propertygroups as $group) {
         foreach ($group->properties as $prop) {
             if ($prop->name == 'name') {
                 $value = $_POST[$prop->name];
                 $search_pattern = array('/script/i', '/;/', '/%/');
                 $replace_pattern = array('', '', '');
                 $value = preg_replace($search_pattern, $replace_pattern, $value);
                 $setstrings[] = $prop->name . "='" . $value . "'";
             } else {
                 $setstrings[] = $prop->name . "='" . valid_request($_POST[$prop->name], 0) . "'";
             }
         }
     }
     $db->query("\r\n\t\t\t\tUPDATE\r\n\t\t\t\t\t" . $this->table . "\r\n\t\t\t\tSET\r\n\t\t\t\t\t" . implode(",\n", $setstrings) . "\r\n\t\t\t\tWHERE\r\n\t\t\t\t\t" . $this->keycol . "='" . mysql_real_escape_string($this->keyval) . "'\r\n\t\t\t");
 }
Ejemplo n.º 6
0
require INCLUDE_PATH . '/pChart/pData.class';
require INCLUDE_PATH . '/pChart/pChart.class';
$db_classname = 'DB_' . DB_TYPE;
if (class_exists($db_classname)) {
    $db = new $db_classname(DB_ADDR, DB_USER, DB_PASS, DB_NAME, DB_PCONNECT);
} else {
    error('Database class does not exist.  Please check your config.php file for DB_TYPE');
}
$g_options = getOptions();
$bg_color = array('red' => 90, 'green' => 90, 'blue' => 90);
if (isset($_GET['bgcolor']) && is_string($_GET['bgcolor'])) {
    $bg_color = hex2rgb(valid_request($_GET['bgcolor'], 0));
}
$color = array('red' => 213, 'green' => 217, 'blue' => 221);
if (isset($_GET['color']) && is_string($_GET['color'])) {
    $color = hex2rgb(valid_request($_GET['color'], 0));
}
if (isset($_GET['player'])) {
    $player = (int) $_GET['player'];
}
if (!$player) {
    exit;
}
$res = $db->query("SELECT UNIX_TIMESTAMP(eventTime) AS ts, skill, skill_change FROM hlstats_Players_History WHERE playerId = '{$player}' ORDER BY eventTime DESC LIMIT 30");
$skill = array();
$skill_change = array();
$date = array();
$rowcnt = $db->num_rows();
$last_time = 0;
for ($i = 1; $i <= $rowcnt; $i++) {
    $row = $db->fetch_array($res);
Ejemplo n.º 7
0
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.');
}
// Clan Details
$clan = valid_request(intval($_GET['clan']), 1) or error('No clan ID specified.');
$db->query("\r\n\t\tSELECT\r\n\t\t\thlstats_Clans.tag,\r\n\t\t\thlstats_Clans.name,\r\n\t\t\thlstats_Clans.homepage,\r\n\t\t\thlstats_Clans.game,\r\n\t\t\tSUM(hlstats_Players.kills) AS kills,\r\n\t\t\tSUM(hlstats_Players.deaths) AS deaths,\r\n\t\t\tSUM(hlstats_Players.connection_time) AS connection_time,\r\n\t\t\tCOUNT(hlstats_Players.playerId) AS nummembers,\r\n\t\t\tROUND(AVG(hlstats_Players.skill)) AS avgskill,\r\n\t\t\tTRUNCATE(AVG(activity),2) as activity\r\n\t\tFROM\r\n\t\t\thlstats_Clans\r\n\t\tLEFT JOIN hlstats_Players ON\r\n\t\t\thlstats_Players.clan = hlstats_Clans.clanId\r\n\t\tWHERE\r\n\t\t\thlstats_Clans.clanId={$clan}\r\n\t\t\tAND hlstats_Players.hideranking = 0\r\n\t\tGROUP BY\r\n\t\t\thlstats_Clans.clanId\r\n\t");
if ($db->num_rows() != 1) {
    error("No such clan '{$clan}'.");
}
$clandata = $db->fetch_array();
$db->free_result();
$cl_name = preg_replace(' ', '&nbsp;', htmlspecialchars($clandata['name']));
$cl_tag = preg_replace(' ', '&nbsp;', htmlspecialchars($clandata['tag']));
$cl_full = "{$cl_tag} {$cl_name}";
$game = $clandata['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();
Ejemplo n.º 8
0
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.');
}
// Global Server Chat History
$showserver = 0;
if (isset($_GET['server_id'])) {
    $showserver = valid_request(strval($_GET['server_id']), true);
}
if ($showserver == 0) {
    $whereclause = "hlstats_Servers.game='{$game}'";
} else {
    $whereclause = "hlstats_Servers.game='{$game}' AND hlstats_Events_Chat.serverId={$showserver}";
}
$db->query("\r\n\t\tSELECT\r\n\t\t\thlstats_Games.name\r\n\t\tFROM\r\n\t\t\thlstats_Games\r\n\t\tWHERE\r\n\t\t\thlstats_Games.code = '{$game}'\r\n\t");
if ($db->num_rows() < 1) {
    error("No such game '{$game}'.");
}
list($gamename) = $db->fetch_row();
$db->free_result();
pageHeader(array($gamename, 'Server Chat Statistics'), array($gamename => "%s?game={$game}", 'Server Chat Statistics' => ''));
flush();
$servername = "(All Servers)";
Ejemplo n.º 9
0
  */
 $payload = $_POST["data"];
 $request = json_decode($payload, True);
 if (json_last_error() !== JSON_ERROR_NONE) {
     http_response_code(400);
     trigger_json_response(400, "Bad Request");
     die;
 }
 /*	
  *	As is good practice, never trust that the input
  *	supplied by the user is valid - we must verify it
  *	ourselves. If the provided JSON encoding is invalid,
  *	return a Bad Request error and status code.
  *	
  */
 if (!valid_request($request)) {
     http_response_code(400);
     trigger_json_response(400, "Bad Request");
     die;
 }
 /*	
  *	Once the request has been determined to be valid, we
  *	can handle the request and return a JSON encoding of
  *	the rendered automata diagram.
  *	
  */
 $message = handle_render_request($request);
 /*	
  *	Just to be safe, we encode the response JSON message
  *	and verify that no errors occurred during its encoding.
  *	
Ejemplo n.º 10
0
}
$show_map_wins = '1';
if (isset($_GET['show_map_wins']) && is_numeric($_GET['show_map_wins'])) {
    $show_map_wins = valid_request($_GET['show_map_wins'], 1);
}
$top_players = '10';
if (isset($_GET['top_players']) && is_numeric($_GET['top_players'])) {
    $top_players = valid_request($_GET['top_players'], 1);
}
$players_images = '1';
if (isset($_GET['players_images']) && is_numeric($_GET['players_images'])) {
    $players_images = valid_request($_GET['players_images'], 1);
}
$show_password = '';
if (isset($_GET['show_password']) && is_string($_GET['show_password'])) {
    $show_password = valid_request($_GET['show_password'], 1);
}
//// Entries
$result = $db->query("\r\n\tSELECT\r\n\t\tIF(publicaddress != '', publicaddress, concat(address, ':', port)) AS addr,\r\n\t\tname, \r\n\t\tpublicaddress, \r\n\t\tact_map, \r\n\t\tplayers, \r\n\t\tkills, \r\n\t\theadshots, \r\n\t\tmap_started, \r\n\t\tact_players, \r\n\t\tmax_players, \r\n\t\tmap_ct_wins, \r\n\t\tmap_ts_wins\r\n\tFROM \r\n\t\thlstats_Servers\r\n\tWHERE \r\n\t\tserverId={$server_id}");
$server_data = $db->fetch_array($result);
if ($small_fonts == 1) {
    $fsize = 'fSmall';
} else {
    $fsize = 'fNormal';
}
if ($server_data['addr'] != '') {
    echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
    echo '<html>';
    echo '<head>';
    echo '<title>' . $g_options["sitename"] . '</title>';
    echo '<style type="text/css">{margin:0px;padding:0px;}</style>';
Ejemplo n.º 11
0
http://sourceforge.net/projects/hlstats/
Copyright (C) 2001  Simon Garner
            
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
*/
global $game;
// Search
require PAGE_PATH . '/search-class.php';
pageHeader(array('Search'), array('Search' => ''));
$sr_query = $_GET['q'];
$sr_type = valid_request(strval($_GET['st']), 0) or 'player';
$sr_game = valid_request(strval(isset($_GET['game']) ? $_GET['game'] : $game), 0);
$search = new Search($sr_query, $sr_type, $sr_game);
$search->drawForm(array('mode' => 'search'));
if ($sr_query || $sr_query == '0') {
    $search->drawResults();
}
Ejemplo n.º 12
0
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.');
}
// Map Details
$map = valid_request($_GET['map'], 0) or error('No map specified.');
$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&amp;player=%k')), new TableColumn('frags', 'Kills on $map', 'width=15&align=right'), new TableColumn('headshots', 'Headshots', 'width=15&align=right'), new TableColumn('hpk', 'Hpk', 'width=5&align=right')), 'killerId', 'frags', 'killerName', true, 50);
$result = $db->query("\n\t\tSELECT\n\t\t\thlstats_Events_Frags.killerId,\n\t\t\thlstats_Players.lastName AS killerName,\n\t\t\thlstats_Players.flag as flag,\n\t\t\tCOUNT(hlstats_Events_Frags.map) 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.map), '-') AS hpk\n\t\tFROM\n\t\t\thlstats_Events_Frags,\n\t\t\thlstats_Players\t\t\n\t\tWHERE\n\t\t\thlstats_Players.playerId = hlstats_Events_Frags.killerId\n\t\t\tAND hlstats_Events_Frags.map='{$map}'\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");
$resultCount = $db->query("\n\t\tSELECT\n\t\t\tCOUNT(DISTINCT hlstats_Events_Frags.killerId),\n\t\t\tSUM(hlstats_Events_Frags.map='{$map}')\n\t\tFROM\n\t\t\thlstats_Events_Frags,\n\t\t\thlstats_Servers\n\t\tWHERE\n\t\t\thlstats_Servers.serverId = hlstats_Events_Frags.serverId\n\t\t\tAND hlstats_Events_Frags.map='{$map}'\n\t\t\tAND hlstats_Servers.game='{$game}'\n\t");
list($numitems, $totalkills) = $db->fetch_row($resultCount);
?>


<?php 
$table->draw($result, $numitems, 100, 'center');
Ejemplo n.º 13
0
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.');
}
// Player Chat History
$player = valid_request(intval($_GET['player']), 1) or error('No player ID specified.');
$db->query("\r\n\t\tSELECT\r\n\t\t\tunhex(replace(hex(hlstats_Players.lastName), 'E280AE', '')) as lastName,\r\n\t\t\thlstats_Players.game\r\n\t\tFROM\r\n\t\t\thlstats_Players\r\n\t\tWHERE\r\n\t\t\thlstats_Players.playerId = {$player}\r\n\t");
if ($db->num_rows() != 1) {
    error("No such player '{$player}'.");
}
$playerdata = $db->fetch_array();
$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);
$game = $playerdata['game'];
$db->query("\r\n\t\tSELECT\r\n\t\t\thlstats_Games.name\r\n\t\tFROM\r\n\t\t\thlstats_Games\r\n\t\tWHERE\r\n\t\t\thlstats_Games.code = '{$game}'\r\n\t");
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.');
}
if ($auth->userdata["acclevel"] < 80) {
    die("Access denied!");
}
$id = -1;
if (isset($_GET['id']) && is_numeric($_GET['id'])) {
    $id = valid_request($_GET['id'], 1);
}
?>

&nbsp;&nbsp;&nbsp;&nbsp;<img src="<?php 
echo IMAGE_PATH;
?>
/downarrow.gif" width="9" height="6" class="imageformat" alt="" /><b>&nbsp;<a href="<?php 
echo $g_options['scripturl'];
?>
?mode=admin&amp;task=tools_editdetails">Edit Player or Clan Details</a></b><br />

<img src="<?php 
echo IMAGE_PATH;
?>
/spacer.gif" width="1" height="8" border="0" alt=""><br />
Ejemplo n.º 15
0
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.');
}
// Contents
$resultGames = $db->query("\r\n\t\tSELECT\r\n\t\t\tcode,\r\n\t\t\tname\r\n\t\tFROM\r\n\t\t\thlstats_Games\r\n\t\tWHERE\r\n\t\t\thidden='0'\r\n\t\tORDER BY\r\n\t\t\trealgame, name ASC\r\n\t");
$num_games = $db->num_rows($resultGames);
$redirect_to_game = 0;
if ($num_games == 1 || ($game = valid_request($_GET['game'], 0))) {
    $redirect_to_game++;
    if ($num_games == 1) {
        list($game) = $db->fetch_row($resultGames);
    }
    include PAGE_PATH . '/game.php';
} else {
    unset($_SESSION['game']);
    pageHeader(array('Contents'), array('Contents' => ''));
    include PAGE_PATH . '/voicecomm_serverlist.php';
    printSectionTitle('Games');
    ?>

		<div class="subblock">
		
			<table class="data-table">
 $game2 = '';
 if (isset($_POST['game2'])) {
     if ($_POST['game2'] != '') {
         $game2 = $_POST['game2'];
     }
 }
 $game2name = '';
 if (isset($_POST['game2name'])) {
     if ($_POST['game2name'] != '') {
         $game2name = $_POST['game2name'];
     }
 }
 echo '<ul><br />';
 check_writable();
 $game2 = valid_request($game2, 0);
 $game2name = valid_request($game2name, 0);
 echo '<li>hlstats_Games ...';
 $db->query("SELECT code FROM hlstats_Games WHERE code='{$game2}' LIMIT 1;");
 if ($db->num_rows() != 0) {
     echo '</ul><br /><br /><br />';
     echo '<b>Target gametype exists, nothing done!</b><br /><br />';
 } else {
     $db->query("INSERT INTO hlstats_Games (code,name,hidden,realgame) SELECT '{$game2}', '{$game2name}', '0', realgame FROM hlstats_Games WHERE code='{$game1}'");
     echo 'OK</li>';
     $dbtables = array();
     array_push($dbtables, 'hlstats_Actions', 'hlstats_Awards', 'hlstats_Ribbons', 'hlstats_Ranks', 'hlstats_Roles', 'hlstats_Teams', 'hlstats_Weapons');
     foreach ($dbtables as $dbt) {
         echo "<li>{$dbt} ... ";
         echo copySettings($dbt, $game1, $game2);
     }
     echo '</ul><br /><br /><br />';
Ejemplo n.º 17
0
<?php

define('IN_HLSTATS', true);
// Load required files
require 'config.php';
require INCLUDE_PATH . '/class_db.php';
require INCLUDE_PATH . '/functions.php';
$db_classname = 'DB_' . DB_TYPE;
if (class_exists($db_classname)) {
    $db = new $db_classname(DB_ADDR, DB_USER, DB_PASS, DB_NAME, DB_PCONNECT);
} else {
    error('Database class does not exist.  Please check your config.php file for DB_TYPE');
}
$game = valid_request($_GET['game']);
$search = valid_request($_POST['value']);
$game_escaped = $db->escape($game);
$search_escaped = $db->escape($search);
if (is_string($search) && strlen($search) >= 3 && strlen($search) < 64) {
    // Building the query
    $sql = "SELECT hlstats_PlayerNames.name FROM hlstats_PlayerNames INNER JOIN hlstats_Players ON hlstats_PlayerNames.playerId = hlstats_Players.playerId WHERE game = '{$game_escaped}' AND name LIKE '{$search_escaped}%'";
    $result = $db->query($sql);
    while ($row = $db->fetch_row($result)) {
        print "<li class=\"playersearch\">" . $row[0] . "</li>\n";
    }
}
Ejemplo n.º 18
0
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.');
}
// Ribbon Statistics
$ribbon = valid_request($_GET['ribbon'], true) or error('No ribbon ID specified.');
$db->query("\r\n\t\tSELECT\r\n\t\t\tribbonName,\r\n\t\t\timage,\r\n\t\t\tawardCode,\r\n\t\t\tawardCount\r\n\t\tFROM\r\n\t\t\thlstats_Ribbons\r\n\t\tWHERE\r\n\t\t\thlstats_Ribbons.ribbonId={$ribbon}\r\n\t");
$actiondata = $db->fetch_array();
$db->free_result();
$act_name = $actiondata['ribbonName'];
$awardmin = $actiondata['awardCount'];
$awardcode = $actiondata['awardCode'];
$image = $actiondata['image'];
$db->query("SELECT name FROM hlstats_Games WHERE code='{$game}'");
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&amp;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);
Ejemplo n.º 19
0
/**
 * Checks a registration request for invalid inputs
 *
 * @access public
 * @return true
 */
function complete_upload_match_media()
{
    if (valid_request(array(isset($_GET['match_id']), isset($_FILES['match_media']), isset($_POST['description'])))) {
        require CLASS_PATH . 'class.upload.php';
        global $db;
        global $smarty;
        if (strlen($_POST['description']) < 2 || strlen($_POST['description']) > 20) {
            display_errors(751);
            return true;
        }
        $upload = new Upload($_FILES['match_media']);
        if ($upload->uploaded) {
            //getting the internal file name out of the current time
            $name = microtime();
            $name = substr($name, 2, 8) . substr($name, 11);
            $upload->file_new_name_body = $name;
            $upload->allowed = array('application/zip', 'image/*');
            $upload->process(MATCH_MEDIA_PATH);
            if ($upload->processed) {
                $sql = "add_match_media(" . $_GET['match_id'] . ",\n                                            " . $_SESSION['user_id'] . ",\n                                            '" . $_POST['description'] . "',\n                                            '" . $upload->file_dst_name . "', \n                                            " . filesize($upload->file_dst_pathname) . ")";
                $db->run($sql);
                if ($db->error_result) {
                    display_errors(750);
                } else {
                    display_success("upload_match_media");
                    $smarty->assign('content', $smarty->fetch("succes.tpl"));
                }
            } else {
                display_errors(750);
            }
            $upload->clean();
        } else {
            display_errors(750);
            return true;
        }
    }
    return true;
}
Ejemplo n.º 20
0
function display_cash_print()
{
    if (valid_request(array(isset($_GET['date_start']), isset($_GET['date_limit'])))) {
        global $smarty;
        assign_cash_print($_GET['date_start'], $_GET['date_limit']);
        assign_cash_print_info($_GET['date_start'], $_GET['date_limit']);
    }
    return true;
}
Ejemplo n.º 21
0
<?php

pageHeader(array('Teamspeak viewer'), array('Teamspeak viewer' => ''));
include_once PAGE_PATH . '/voicecomm_serverlist.php';
include_once PAGE_PATH . '/teamspeak_query.php';
include_once PAGE_PATH . '/teamspeak3_query.php';
$tsId = valid_request($_GET['tsId'], 1);
function show($tpl, $array)
{
    $template = PAGE_PATH . "/templates/teamspeak/{$tpl}";
    if ($fp = @fopen($template . "." . html, "r")) {
        $tpl = @fread($fp, filesize($template . "." . html));
    }
    foreach ($array as $value => $code) {
        $tpl = str_replace("[" . $value . "]", $code, $tpl);
    }
    return $tpl;
}
if (function_exists(fopen)) {
    $db->query("SELECT addr, queryPort, UDPPort, serverType FROM hlstats_Servers_VoiceComm WHERE serverId={$tsId}");
    $s = $db->fetch_array();
    $uip = $s['addr'];
    $tPort = $s['queryPort'];
    $port = $s['UDPPort'];
    $fp = fsockopen($uip, $tPort, $errno, $errstr, 2);
    if (!$fp) {
        $index = error("No teamspeak", 1);
    } else {
        $out = "";
        $fp = fsockopen($uip, $tPort, $errno, $errstr, 2);
        if ($fp) {
Ejemplo n.º 22
0
}
list($gamename) = $db->fetch_row();
$db->free_result();
$minkills = 1;
$minmembers = 3;
$players = 10;
if (isset($_GET['players']) && is_numeric($_GET['players'])) {
    $players = valid_request($_GET['players'], 1);
}
$clans = 3;
if (isset($_GET['clans']) && is_numeric($_GET['clans'])) {
    $clans = valid_request($_GET['clans'], 1);
}
$servers = 9001;
if (isset($_GET['servers']) && is_numeric($_GET['servers'])) {
    $servers = valid_request($_GET['servers'], 1);
}
//
// Top 10 Players
//
if ($players > 0) {
    $table_players = new Table(array(new TableColumn('lastName', 'Playername', 'width=50&flag=1&link=' . urlencode('mode=statsme&amp;player=%k')), new TableColumn('skill', 'Points', 'width=10&align=right'), new TableColumn('activity', 'Activity', 'width=10&sort=no&type=bargraph'), new TableColumn('connection_time', 'Time', 'width=15&align=right&type=timestamp'), new TableColumn('kpd', 'Kpd', 'width=10&align=right')), 'playerId', 'skill', 'kpd', true, 10);
    $result_players = $db->query("\n\t\t\tSELECT\n\t\t\t\tplayerId,\n\t\t\t\tlastName,\n\t\t\t\tconnection_time,\n\t\t\t\tskill,\n\t\t\t\tflag,\n\t\t\t\tcountry,\n\t\t\t\tIFNULL(kills/deaths, '-') AS kpd,\n\t\t\t\tIFNULL(headshots/kills, '-') AS hpk,\n\t\t\t\tactivity\n\t\t\tFROM\n\t\t\t\thlstats_Players\n\t\t\tWHERE\n\t\t\t\tgame='{$game}'\n\t\t\t\tAND hideranking=0\n\t\t\t\tAND kills >= {$minkills}\n\t\t\tORDER BY\n\t\t\t\t{$table_players->sort} {$table_players->sortorder}\n\t\t\tLIMIT 0,{$players}\n\t\t");
    $table_players->draw($result_players, 10, 100);
}
//
// Top 3 Clans
//
if ($clans > 0) {
    $table_clans = new Table(array(new TableColumn('name', 'Clanname', 'width=50&link=' . urlencode('mode=claninfo&amp;clan=%k')), new TableColumn('tag', 'Tag', 'width=25&align=center'), new TableColumn('skill', 'Points', 'width=10&align=right'), new TableColumn('nummembers', 'Members', 'width=10&align=right')), 'clanId', 'skill', 'kpd', true, 3);
    $result_clans = $db->query("\n\t\t\tSELECT\n\t\t\t\thlstats_Clans.clanId,\n\t\t\t\thlstats_Clans.name,\n\t\t\t\thlstats_Clans.tag,\n\t\t\t\tCOUNT(hlstats_Players.playerId) AS nummembers,\n\t\t\t\tROUND(AVG(hlstats_Players.skill)) AS skill,\n\t\t\t\tTRUNCATE(AVG(IF(" . $g_options['MinActivity'] . " > (UNIX_TIMESTAMP() - hlstats_Players.last_event), ((100/" . $g_options['MinActivity'] . ") * (" . $g_options['MinActivity'] . " - (UNIX_TIMESTAMP() - hlstats_Players.last_event))), -1)),2) as activity\n\t\t\tFROM\n\t\t\t\thlstats_Clans\n\t\t\tLEFT JOIN hlstats_Players ON\n\t\t\t\thlstats_Players.clan=hlstats_Clans.clanId\n\t\t\tWHERE\n\t\t\t\thlstats_Clans.game='{$game}'\n\t\t\t\tAND hlstats_Clans.hidden <> 1\n\t\t\t\tAND hlstats_Players.hideranking = 0\n\t\t\t\tAND IF(" . $g_options['MinActivity'] . " > (UNIX_TIMESTAMP() - hlstats_Players.last_event), ((100/" . $g_options['MinActivity'] . ") * (" . $g_options['MinActivity'] . " - (UNIX_TIMESTAMP() - hlstats_Players.last_event))), -1) >= 0\n\t\t\tGROUP BY\n\t\t\t\thlstats_Clans.clanId\n\t\t\tHAVING\n\t\t\t\tactivity >= 0 AND\n\t\t\t\tnummembers >= {$minmembers}\n\t\t\tORDER BY\n\t\t\t\t{$table_clans->sort} {$table_clans->sortorder}\n\t\t\tLIMIT 0,{$clans}\n\t\t");
Ejemplo n.º 23
0
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.');
}
require PAGE_PATH . '/livestats.php';
$server_id = 1;
if (isset($_GET['server_id']) && is_numeric($_GET['server_id'])) {
    $server_id = valid_request($_GET['server_id'], 1);
}
$query = "\r\n\t\t\tSELECT\r\n\t\t\t\tcount(*)\r\n\t\t\tFROM\r\n\t\t\t\thlstats_Players\r\n\t\t\tWHERE \r\n\t\t\t\tgame='{$game}'\r\n\t";
$result = $db->query($query);
list($total_players) = $db->fetch_row($result);
$query = "\r\n\t\t\tSELECT\r\n\t\t\t\tSUM(kills),\r\n\t\t\t\tSUM(headshots),\r\n\t\t\t\tcount(serverId)\t\t\r\n\t\t\tFROM\r\n\t\t\t\thlstats_Servers\r\n\t\t\tWHERE \r\n\t\t\t\tgame='{$game}'\r\n\t";
$result = $db->query($query);
list($total_kills, $total_headshots, $total_servers) = $db->fetch_row($result);
$query = "\r\n\t\t\tSELECT\r\n\t\t\t\tserverId,\r\n\t\t\t\tname,\r\n\t\t\t\tIF(publicaddress != '',\r\n\t\t\t\t\tpublicaddress,\r\n\t\t\t\t\tconcat(address, ':', port)\r\n\t\t\t\t) AS addr,\r\n\t\t\t\t" . "kills,\r\n\t\t\t\theadshots,\t\t\t\t\r\n\t\t\t\tact_players,\t\t\t\t\t\t\t\t\r\n\t\t\t\tmax_players,\r\n\t\t\t\tact_map,\r\n\t\t\t\tmap_started,\r\n\t\t\t\tmap_ct_wins,\r\n\t\t\t\tmap_ts_wins\t\t\t\t\t\r\n\t\t\tFROM\r\n\t\t\t\thlstats_Servers\r\n\t\t\tWHERE\r\n\t\t\t\tserverId='" . $server_id . "'\r\n\t\t\tORDER BY\r\n\t\t\t\tname ASC,\r\n\t\t\t\taddr ASC\r\n\t\t";
$db->query($query);
$servers = array();
while ($rowdata = $db->fetch_array()) {
    $servers[] = $rowdata;
}
$i = 0;
for ($i = 0; $i < count($servers); $i++) {
Ejemplo n.º 24
0
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.');
}
// Clan Rankings
$db->query("SELECT name FROM hlstats_Games WHERE code='{$game}'");
if ($db->num_rows() < 1) {
    error("No such game '{$game}'.");
}
list($gamename) = $db->fetch_row();
$db->free_result();
if (isset($_GET['minmembers'])) {
    $minmembers = valid_request(intval($_GET['minmembers']), 1);
} else {
    $minmembers = 3;
}
$table = new Table(array(new TableColumn('name', 'Clan', 'width=25&icon=clan&link=' . urlencode('mode=claninfo&amp;clan=%k')), new TableColumn('tag', 'Tag', 'width=15&align=center'), new TableColumn('skill', 'Avg. Points', 'width=8&align=right&skill_change=1'), new TableColumn('nummembers', 'Members', 'width=5&align=right'), new TableColumn('activity', 'Activity', 'width=8&type=bargraph'), new TableColumn('connection_time', 'Connection Time', 'width=13&align=right&type=timestamp'), new TableColumn('kills', 'Kills', 'width=7&align=right'), new TableColumn('deaths', 'Deaths', 'width=7&align=right'), new TableColumn('kpd', 'K:D', 'width=7&align=right')), 'clanId', 'skill', 'kpd', true);
$result = $db->query("\n\t\tSELECT\n\t\t\thlstats_Clans.clanId,\n\t\t\thlstats_Clans.name,\n\t\t\thlstats_Clans.tag,\n\t\t\tCOUNT(hlstats_Players.playerId) AS nummembers,\n\t\t\tSUM(hlstats_Players.kills) AS kills,\n\t\t\tSUM(hlstats_Players.deaths) AS deaths,\n\t\t\tSUM(hlstats_Players.connection_time) AS connection_time,\n\t\t\tROUND(AVG(hlstats_Players.skill)) AS skill,\n\t\t\tIFNULL(SUM(hlstats_Players.kills)/SUM(hlstats_Players.deaths), '-') AS kpd,\n\t\t\tTRUNCATE(AVG(activity),2) as activity\n\t\tFROM\n\t\t\thlstats_Clans,\n\t\t\thlstats_Players\n\t\tWHERE\n\t\t\thlstats_Clans.game = '{$game}'\n\t\t\tAND hlstats_Clans.hidden <> 1\n\t\t\tAND hlstats_Players.clan = hlstats_Clans.clanId\n\t\t\tAND hlstats_Players.hideranking = 0\n\t\tGROUP BY\n\t\t\thlstats_Clans.clanId\n\t\tHAVING\n\t\t\tactivity >= 0 AND\n\t\t\tnummembers >= {$minmembers}\n\t\tORDER BY\n\t\t\t{$table->sort} {$table->sortorder},\n\t\t\t{$table->sort2} {$table->sortorder},\n\t\t\tname ASC\n\t\tLIMIT\n\t\t\t{$table->startitem},{$table->numperpage}\n\t");
$resultCount = $db->query("\n\t\tSELECT\n\t\t\thlstats_Clans.clanId,\n\t\t\tSUM(activity) as activity\n\t\tFROM\n\t\t\thlstats_Clans\n\t\tLEFT JOIN\n\t\t\thlstats_Players\n\t\tON\n\t\t\thlstats_Players.clan = hlstats_Clans.clanId\n\t\tWHERE\n\t\t\thlstats_Clans.game = '{$game}'\n\t\t\tAND hlstats_Clans.hidden <> 1\n\t\t\tAND hlstats_Players.hideranking = 0\n\t\tGROUP BY\n\t\t\thlstats_Clans.clanId\n\t\tHAVING\n\t\t\tactivity >= 0 AND\n\t\t\tCOUNT(hlstats_Players.playerId) >= {$minmembers}\n\t");
$table->draw($result, $db->num_rows($resultCount), 100);
Ejemplo n.º 25
0
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.');
}
// 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&amp;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);
Ejemplo n.º 26
0
/**
 * makeQueryString()
 * 
 * @param mixed $key
 * @param mixed $value
 * @param mixed $notkeys
 * @return
 */
function makeQueryString($key, $value, $notkeys = array())
{
    if (!is_array($notkeys)) {
        $notkeys = array();
    }
    $querystring = '';
    foreach ($_GET as $k => $v) {
        $v = valid_request($v, 0);
        if ($k && $k != $key && !in_array($k, $notkeys)) {
            $querystring .= urlencode($k) . '=' . rawurlencode($v) . '&amp;';
        }
    }
    $querystring .= urlencode($key) . '=' . urlencode($value);
    return $querystring;
}
Ejemplo n.º 27
0
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.');
}
// Player Details
$player = valid_request(intval($_GET['player']), 1);
$uniqueid = valid_request(strval($_GET['uniqueid']), 0);
$game = valid_request(strval($_GET['game']), 0);
if (!$player && $uniqueid) {
    if (!$game) {
        header('Location: ' . $g_options['scripturl'] . "&mode=search&st=uniqueid&q={$uniqueid}");
        exit;
    }
    $db->query("\n\t\t\tSELECT\n\t\t\t\tplayerId\n\t\t\tFROM\n\t\t\t\thlstats_PlayerUniqueIds\n\t\t\tWHERE\n\t\t\t\tuniqueId='{$uniqueid}'\n\t\t\t\tAND game='{$game}'\n\t\t");
    if ($db->num_rows() > 1) {
        header('Location: ' . $g_options['scripturl'] . "&mode=search&st=uniqueid&q={$uniqueid}&game={$game}");
        exit;
    } elseif ($db->num_rows() < 1) {
        error("No players found matching uniqueId '{$uniqueid}'");
    } else {
        list($player) = $db->fetch_row();
        $player = intval($player);
    }
Ejemplo n.º 28
0
	var Tabs = new Tabs($('main_content'), $$('#main ul.subsection_tabs a'), {
		'mode': 'claninfo',
		'game': '<?php 
    echo $game;
    ?>
',
		'loadingImage': '<?php 
    echo IMAGE_PATH;
    ?>
/ajax.gif',
		'defaultTab': 'general',
		'extra': {'clan': '<?php 
    echo $clan;
    ?>
','members_page': '<?php 
    echo valid_request($_GET['members_page'], true);
    ?>
'}
	});
	</script>
<?php 
} else {
    echo "\n<div id=\"tabgeneral\">\n";
    require_once PAGE_PATH . '/claninfo_general.php';
    echo '</div>';
    echo "\n<div id=\"tabteams\">\n";
    require_once PAGE_PATH . '/claninfo_actions.php';
    require_once PAGE_PATH . '/claninfo_teams.php';
    echo '</div>';
    echo "\n<div id=\"tabweapons\">\n";
    require_once PAGE_PATH . '/claninfo_weapons.php';
Ejemplo n.º 29
0
			</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";
    }
}
?>
					<strong>&#8226;</strong> Show only players with
					<input type="text" name="minkills" size="4" maxlength="2" value="<?php 
echo $minkills;
?>
" class="textbox" /> or more kills from a total <strong><?php 
echo number_format($numitems);
?>
</strong> players
					<input type="submit" value="Apply" class="smallsubmit" />
				</form>
Ejemplo n.º 30
0
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.');
}
// Awards Info Page
$db->query("SELECT name FROM hlstats_Games WHERE code='{$game}'");
if ($db->num_rows() < 1) {
    error("No such game '{$game}'.");
}
list($gamename) = $db->fetch_row();
$db->free_result();
$type = valid_request($_GET['type']);
$tab = valid_request($_GET['tab']);
if ($type == 'ajax') {
    $tabs = explode('|', preg_replace('[^a-z]', '', $tab));
    foreach ($tabs as $tab) {
        if (file_exists(PAGE_PATH . '/awards_' . $tab . '.php')) {
            @(include PAGE_PATH . '/awards_' . $tab . '.php');
        }
    }
    exit;
}
pageHeader(array($gamename, 'Awards Info'), array($gamename => "%s?game={$game}", 'Awards Info' => ''));
?>

<?php 
if ($g_options['playerinfo_tabs'] == '1') {
    ?>