<?php // this is plain text! header('Content-Type: text/plain'); require realpath('../CMS/siteinfo.php'); $site = new siteinfo(); $connection = $site->connect_to_db(); // display teams $query = 'SELECT `teams`.`id`,`teams`.`name` FROM `teams`,`teams_overview`' . ' WHERE `teams_overview`.`teamid`=`teams`.`id` AND `teams_overview`.`deleted`<>' . sqlSafeStringQuotes(2); if (!($result = @$site->execute_silent_query('teams,teams_overview', $query, $connection))) { $site->dieAndEndPage('It seems like the team profile can not be accessed for an unknown reason.'); } while ($row = mysql_fetch_array($result)) { echo 'TE: ' . $row['id'] . ', ' . htmlent_decode($row['name']) . "\n"; } mysql_free_result($result); $query = 'SELECT `id`,`teamid`,`name` FROM `users`' . ' WHERE `users`.`status`=' . sqlSafeStringQuotes('active'); if (!($result = @$site->execute_silent_query('users', $query, $connection))) { $site->dieAndEndPage('It seems like the player profile can not be accessed for an unknown reason.'); } while ($row = mysql_fetch_array($result)) { echo 'PL: ' . $row['teamid'] . ', ' . $row['id'] . ', ' . htmlent_decode($row['name']) . "\n"; } mysql_free_result($result); // done with outputting stats
ini_set('session.gc_maxlifetime', '7200'); @session_start(); $display_page_title = 'BBCode libary updater'; require_once dirname(dirname(__FILE__)) . '/web/CMS/index.inc'; if (!isset($site)) { require_once dirname(dirname(__FILE__)) . '/web/CMS/siteinfo.php'; $site = new siteinfo(); } if (!isset($connection)) { $connection = $site->connect_to_db(); } $randomkey_name = 'randomkey_user'; $viewerid = intval(getUserID()); if ($viewerid < 1) { echo '<p class="first_p">You need to be logged in to update the old bbcode entries.</p>'; $site->dieAndEndPage(); } if (!isset($_SESSION['IsAdmin']) || !$_SESSION['IsAdmin']) { $site->dieAndEndPage('User with id ' . sqlSafeStringQuotes($viewerid) . ' tried to run the bbcode library updater script without permissions.'); } $db_from = new db_import(); $db_to_be_imported = $db_from->db_import_name(); // this script will update all entries in the database that are including any fields that could be created by using a bbcode library // it does not detect if the old entries were created by using raw (X)HTML, instead it will just output these entries using the bbcode lib // the strong recommendation is to always use a bbcode library // players function update_players() { global $site; global $connection; $query = 'SELECT `id`, `raw_user_comment`, `raw_admin_comments` from `players_profile`';
<?php ini_set('session.use_trans_sid', 0); ini_set('session.name', 'SID'); ini_set('allow_url_fopen', 0); ini_set('session.gc_maxlifetime', '7200'); session_start(); require_once '../CMS/siteinfo.php'; $site = new siteinfo(); $display_page_title = 'Official match servers'; require '../CMS/index.inc'; echo '<div class="static_page_box">' . "\n"; if (!($logged_in && isset($_SESSION['allow_watch_servertracker']) && $_SESSION['allow_watch_servertracker'])) { echo '<p>You need to be logged in in order to view this page.</p>' . "\n"; $site->dieAndEndPage(); } $use_internal_db = true; require 'list.php'; $connection = $site->loudless_pconnect_to_db(); if (isset($_GET['server'])) { echo '<a class="button" href="./">overview</a>' . "\n"; $server = urldecode($_GET['server']); formatbzfquery_last($server, $connection); } else { formatbzfquery("bzbattleground.com:5157", $connection); formatbzfquery("bzbattleground.com:5158", $connection); formatbzfquery("bzf.guleague.org:5154", $connection); formatbzfquery("bzf.guleague.org:5155", $connection); formatbzfquery("bzf.guleague.org:5156", $connection); formatbzfquery("bzf.guleague.org:5160", $connection); formatbzfquery("bzf.guleague.org:5161", $connection);
ini_set('session.name', 'SID'); ini_set('session.gc_maxlifetime', '7200'); @session_start(); $display_page_title = 'Webleague DB importer'; require_once dirname(dirname(__FILE__)) . '/web/CMS/index.inc'; if (!isset($site)) { require_once dirname(dirname(__FILE__)) . '/web/CMS/siteinfo.php'; $site = new siteinfo(); } $connection = $site->connect_to_db(); $randomkey_name = 'randomkey_user'; $viewerid = (int) getUserID(); if ($viewerid < 1) { if (!(php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR']))) { echo '<p class="first_p">You need to be logged in to update the old bbcode entries.</p>'; $site->dieAndEndPage(); } } elseif (!isset($_SESSION['IsAdmin']) || !$_SESSION['IsAdmin']) { $site->dieAndEndPage('User with id ' . sqlSafeStringQuotes($viewerid) . ' tried to run the webleague importer script without permissions.'); } $db_from = new db_import(); $db_to_be_imported = $db_from->db_import_name(); // this code does not work because the order of statements in the dump // cause the relations in the final database being violated // $file = dirname(__FILE__) . '/ts-CMS_structure.sql'; // if (file_exists($file) && is_readable($file)) // { // $output_buffer = ''; // ob_start(); // // readfile($file);
} } $allow_add_admin_comments_to_user_profile = false; if (isset($_GET['profile']) || isset($_GET['edit'])) { if (isset($_SESSION['allow_add_admin_comments_to_user_profile'])) { if ($_SESSION['allow_add_admin_comments_to_user_profile'] === true) { $allow_add_admin_comments_to_user_profile = true; } } } if (isset($_GET['edit']) || isset($_GET['invite'])) { if ($viewerid < 1) { $profile = (int) $_GET['edit']; show_overview_and_profile_button(); echo '<p>You must login to change any player data.</p>' . "\n"; $site->dieAndEndPage(); } } // abort if user does not exist if (isset($_GET['profile']) || isset($_GET['edit']) || isset($_GET['ban'])) { // display profile page if (isset($_GET['profile'])) { $profile = (int) urldecode($_GET['profile']); } if (isset($_GET['edit'])) { $profile = (int) urldecode($_GET['edit']); } if (isset($_GET['ban'])) { $profile = (int) urldecode($_GET['ban']); } if ($profile === 0) {