diff --git a/README.md b/README.md
index e87de90..522c0ad 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,26 @@
-# lgsl
-Live Game Server List Richard Perry, tltneon version, for e107 CMS
+
+#e107 CMS version for LGSL - for PHP 7 + e107 CMS 2.3.0 only!
+
+
+Original author of LGSL - Richard Perry (www.greycube.com)
+
+Actual author of LGSL - tltneon
+
+
+##e107 functionality:
+
+- install LGSL via e107 plugin manager
+
+- include admin interface of LGSL inside e107 admin area - available for admins with access to this plugin
+
+- all configuration is done in Settings option (no need to change anything in lgsl_config file) - available only for main admins
+
+- LSGL part is fully manager by LGSL script, only different file is lgsl_config.php
+
+- unlimited zones and unlimites menu areas
+
+
+### Limitation
+
+You can't use e107 inside original files because file userbar.php (generating userbar), so SEF-URL is not possible for detail page. For now.
+
diff --git a/admin_config.php b/admin_config.php
new file mode 100644
index 0000000..b4b71df
--- /dev/null
+++ b/admin_config.php
@@ -0,0 +1,741 @@
+ array(
+ 'controller' => 'lgsl_ui',
+ 'path' => null,
+ 'ui' => 'lgsl_form_ui',
+ 'uipath' => null,
+ ),
+
+ );
+
+ protected $adminMenu = array(
+
+ // 'main/list' => array('caption'=> LAN_MANAGE, 'perm' => 'P'),
+
+ // 'main/div0' => array('divider'=> true),
+ 'main/custom' => array('caption' => 'Live Game Server List', 'perm' => 'P'),
+ 'main/prefs' => array('caption' => 'Settings', 'perm' => '0'),
+ 'main/links' => array('caption' => 'URL links', 'perm' => 'P'),
+
+ );
+
+ protected $adminMenuAliases = array(
+ 'main/edit' => 'main/list',
+ );
+
+ protected $menuTitle = 'LGSL e107 plugin';
+}
+
+class lgsl_ui extends e_admin_ui
+{
+
+ protected $pluginTitle = 'LGSL';
+ protected $pluginName = 'lgsl';
+ protected $preftabs = array('General Settings ', '[ ADVANCED SETTINGS ] ', '[ ZONE SIZING ]', '[ ZONE GRID ]', '[ ZONE PLAYERS]', '[ ZONE RANDOM ]', '[ ZONE OFFLINE]', '[ ZONE TIILES]', '[ HOSTING FIXES ]');
+
+ protected $prefs = array(
+
+ 'style' => array('title' => 'Select Frontend Style', 'tab' => 0, 'type' => 'dropdown', 'data' => 'string',
+ 'writeParms' => array('optArray' => array(
+ '' => 'not use (let it fully on e107 theme )',
+ 'breeze_style.css' => 'LGSL SA Breeze Style',
+ 'darken_style.css' => 'LGSL SA Darken Style',
+ 'classic_style.css' => 'LGSL SA Classic Style',
+ 'ogp_style.css' => 'LGSL SA OGP Style',
+ 'parallax_style.css' => 'LGSL SA Parallax Style',
+ 'disc_ff_style.css' => 'LGSL SA Disc FF Style',
+ 'wallpaper_style.css' => 'LGSL SA Wallpaper Style',
+ 'material_style.css' => 'LGSL SA Material Style',
+
+ ))),
+
+ 'sort_servers_by' => array('title' => 'Sort Servers by', 'tab' => 0, 'type' => 'dropdown', 'data' => 'string', 'help' => '[ SORTING OPTIONS ]',
+ 'writeParms' => array('optArray' => array(
+ 'id' => 'ID',
+ 'type' => 'Type',
+ 'zone' => 'Zone',
+ 'players' => 'Players',
+ 'status' => 'Status'))),
+
+ 'sort_players_by' => array('title' => 'Sort Players by', 'tab' => 0, 'type' => 'dropdown', 'data' => 'string', 'help' => '[ SORTING OPTIONS ]',
+ 'writeParms' => array('optArray' => array(
+ 'name' => 'Name',
+ 'score' => 'Score',
+ 'time' => 'Time'))),
+
+ 'image_mod' => array('title' => 'Enable image mod', 'tab' => 0, 'type' => 'boolean', 'data' => 'integer', 'help' => '[ SHOW TOTAL SERVERS AND PLAYERS AT BOTTOM OF LIST: 0=OFF 1=ON ]'),
+
+ 'list_totals' => array('title' => 'Display Totals', 'type' => 'boolean', 'data' => 'integer', 'tab' => 0, 'help' => '[ SHOW TOTAL SERVERS AND PLAYERS AT BOTTOM OF LIST: 0=OFF 1=ON ]'),
+
+ 'locations' => array('title' => 'Display Locations', 'type' => 'dropdown', 'data' => 'string', 'tab' => 0, 'help' => '[ SHOW LOCATION FLAGS: 0=OFF 1=GEO-IP "GB"=MANUALLY SET COUNTRY CODE FOR SPEED ]'),
+
+ 'bootstrap3_table' => array('title' => 'Activate boostrap 3 tables behaviour', 'tab' => 0, 'type' => 'boolean', 'data' => 'integer', 'help' => 'Makes responsive bootstrap3 table'),
+ 'bootstrap3_imagefix' => array('title' => 'Use quick image fix', 'type' => 'boolean', 'tab' => 0, 'data' => 'integer', 'help' => 'Your theme should fix this too'),
+
+ 'management' => array('title' => 'Advanced management by default', 'tab' => 1, 'type' => 'boolean', 'data' => 'integer', 'help' => '[ 1/ON =show advanced management in the admin by default ]'), 'writeParms' => array('default' => 0),
+ 'host_to_ip' => array('title' => 'Show server IP', 'tab' => 1, 'type' => 'boolean', 'data' => 'integer', 'help' => '[ 1/ON =show the servers ip instead of its hostname ]'), 'writeParms' => array('default' => 0),
+ 'timeout' => array('title' => 'Timeout', 'tab' => 1, 'type' => 'boolean', 'data' => 'integer', 'help' => '[ 1/ON =gives more time for servers to respond but adds loading delay ]'), 'writeParms' => array('default' => 0),
+ 'retry_offline' => array('title' => 'Retry Offline', 'tab' => 1, 'type' => 'boolean', 'data' => 'integer', 'help' => '[ 1/ON = repeats query when there is no response but adds loading delay ]'), 'writeParms' => array('default' => 0),
+
+ 'cache_time' => array('title' => 'Cache Time', 'tab' => 1, 'type' => 'number',
+ 'writeParms' => array('default' => '60'), 'data' => 'integer', 'help' => ' seconds=time before a server needs updating '),
+
+ 'live_time' => array('title' => 'Live Time', 'tab' => 1, 'type' => 'number',
+ 'writeParms' => array('default' => '3'), 'data' => 'integer', 'help' => ' seconds=time allowed for updating servers per page load'),
+
+ 'zone_width' => array('title' => 'Zone Width', 'tab' => 2, 'type' => 'number', 'data' => 'integer',
+ 'writeParms' => array('default' => '160'),
+ 'help' => 'in pixels - images will be cropped unless also resized to match'),
+
+ 'zone_line_size' => array('title' => 'Zone Line Size', 'tab' => 2, 'type' => 'number',
+ 'writeParms' => array('default' => '19'), 'data' => 'integer', 'help' => 'in pixels - player box height is this number multiplied by player names '),
+
+ 'zone_height' => array('title' => 'Zone Height', 'tab' => 2, 'type' => 'number', 'data' => 'integer',
+ 'writeParms' => array('default' => '100'), 'help' => 'in pixels - player box height limit'),
+
+ 'zone_numbers' => array('title' => 'Zone Numbers', 'tab' => 2, 'type' => 'number',
+ 'writeParms' => array('default' => '8'), 'data' => 'integer', 'help' => 'Change, save, then edit other settings'),
+
+ 'zone_grid' => array('title' => "ZONE GRID ",
+ 'tab' => 3, 'help' => 'ZONE GRID: NUMBER=WIDTH OF GRID - INCREASE FOR HORIZONTAL ZONE STACKING',
+ 'type' => 'method', 'data' => 'json',
+ 'writeParms' => array(),
+ ),
+
+ 'zone_players' => array('title' => "Show Player names ",
+ 'tab' => 4, 'help' => 'ZONE SHOWS PLAYER NAMES: 0/OFF=HIDE 1/ON=SHOW',
+ 'type' => 'method', 'data' => 'json',
+ 'writeParms' => array(),
+ ),
+
+ 'zone_random' => array('title' => "MAX RANDOM SERVERS ",
+ 'tab' => 5, 'help' => 'ZONE RANDOMISATION: NUMBER=MAX RANDOM SERVERS TO BE SHOWN',
+ 'type' => 'method', 'data' => 'json',
+ 'writeParms' => array(),
+ ),
+
+ 'zone_hide_offline' => array('title' => "HIDE OFFLINE SERVERS ",
+ 'tab' => 6, 'help' => ' HIDE OFFLINE SERVERS: 0/OFF=HIDE 1/ON=SHOW',
+ 'type' => 'method', 'data' => 'json',
+ 'writeParms' => array(),
+ ),
+
+ 'zone_title' => array('title' => "List View Title + Zone titles ",
+ 'tab' => 7, 'help' => 'Titles inside zone used for caption too (depends on theme) . Caption can be changed in menu manager.',
+ 'type' => 'method', 'data' => 'json',
+ 'writeParms' => array(),
+ ),
+
+ 'direct_index' => array('title' => 'Direct index ', 'tab' => 8, 'type' => 'boolean',
+ 'writeParms' => array('default' => 1), 'data' => 'integer', 'help' => '1/ON =link to index.php instead of the folder '),
+
+ 'no_realpath' => array('title' => 'No realpath', 'tab' => 8, 'type' => 'boolean',
+ 'writeParms' => array('default' => 0), 'data' => 'integer', 'help' => '1/ON = do not use the realpath function '),
+
+ 'url_path' => array('title' => 'No realpath', 'tab' => 8, 'type' => 'text',
+ 'writeParms' => array('default' => '', 'size' => 'block-level'), 'data' => 'string', 'help' => ' full url to /lgsl_files/ for when auto detection fails '),
+
+ );
+
+ public function init()
+ {
+
+ $location[0] = "Disabled";
+ $location[1] = "Auto-detect";
+ $location['AD'] = "AD";
+ $location['AE'] = "AE";
+ $location['AF'] = "AF";
+ $location['AG'] = "AG";
+ $location['AI'] = "AI";
+ $location['AL'] = "AL";
+ $location['AM'] = "AM";
+ $location['AN'] = "AN";
+ $location['AO'] = "AO";
+ $location['AR'] = "AR";
+ $location['AS'] = "AS";
+ $location['AT'] = "AT";
+ $location['AU'] = "AU";
+ $location['AW'] = "AW";
+ $location['AX'] = "AX";
+ $location['AZ'] = "AZ";
+ $location['BA'] = "BA";
+ $location['BB'] = "BB";
+ $location['BD'] = "BD";
+ $location['BE'] = "BE";
+ $location['BF'] = "BF";
+ $location['BG'] = "BG";
+ $location['BH'] = "BH";
+ $location['BI'] = "BI";
+ $location['BJ'] = "BJ";
+ $location['BM'] = "BM";
+ $location['BN'] = "BN";
+ $location['BO'] = "BO";
+ $location['BR'] = "BR";
+ $location['BS'] = "BS";
+ $location['BT'] = "BT";
+ $location['BV'] = "BV";
+ $location['BW'] = "BW";
+ $location['BY'] = "BY";
+ $location['BZ'] = "BZ";
+ $location['CA'] = "CA";
+ $location['CC'] = "CC";
+ $location['CD'] = "CD";
+ $location['CF'] = "CF";
+ $location['CG'] = "CG";
+ $location['CH'] = "CH";
+ $location['CI'] = "CI";
+ $location['CK'] = "CK";
+ $location['CL'] = "CL";
+ $location['CM'] = "CM";
+ $location['CN'] = "CN";
+ $location['CO'] = "CO";
+ $location['CR'] = "CR";
+ $location['CS'] = "CS";
+ $location['CU'] = "CU";
+ $location['CV'] = "CV";
+ $location['CX'] = "CX";
+ $location['CY'] = "CY";
+ $location['CZ'] = "CZ";
+ $location['DE'] = "DE";
+ $location['DJ'] = "DJ";
+ $location['DK'] = "DK";
+ $location['DM'] = "DM";
+ $location['DO'] = "DO";
+ $location['DZ'] = "DZ";
+ $location['EC'] = "EC";
+ $location['EE'] = "EE";
+ $location['EG'] = "EG";
+ $location['EH'] = "EH";
+ $location['ER'] = "ER";
+ $location['ES'] = "ES";
+ $location['ET'] = "ET";
+ $location['EU'] = "EU";
+ $location['FI'] = "FI";
+ $location['FJ'] = "FJ";
+ $location['FK'] = "FK";
+ $location['FM'] = "FM";
+ $location['FO'] = "FO";
+ $location['FR'] = "FR";
+ $location['GA'] = "GA";
+ $location['GB'] = "GB";
+ $location['GD'] = "GD";
+ $location['GE'] = "GE";
+ $location['GF'] = "GF";
+ $location['GH'] = "GH";
+ $location['GI'] = "GI";
+ $location['GL'] = "GL";
+ $location['GM'] = "GM";
+ $location['GN'] = "GN";
+ $location['GP'] = "GP";
+ $location['GQ'] = "GQ";
+ $location['GR'] = "GR";
+ $location['GS'] = "GS";
+ $location['GT'] = "GT";
+ $location['GU'] = "GU";
+ $location['GW'] = "GW";
+ $location['GY'] = "GY";
+ $location['HK'] = "HK";
+ $location['HM'] = "HM";
+ $location['HN'] = "HN";
+ $location['HR'] = "HR";
+ $location['HT'] = "HT";
+ $location['HU'] = "HU";
+ $location['ID'] = "ID";
+ $location['IE'] = "IE";
+ $location['IL'] = "IL";
+ $location['IN'] = "IN";
+ $location['IO'] = "IO";
+ $location['IQ'] = "IQ";
+ $location['IR'] = "IR";
+ $location['IS'] = "IS";
+ $location['IT'] = "IT";
+ $location['JM'] = "JM";
+ $location['JO'] = "JO";
+ $location['JP'] = "JP";
+ $location['KE'] = "KE";
+ $location['KG'] = "KG";
+ $location['KH'] = "KH";
+ $location['KI'] = "KI";
+ $location['KM'] = "KM";
+ $location['KN'] = "KN";
+ $location['KP'] = "KP";
+ $location['KR'] = "KR";
+ $location['KW'] = "KW";
+ $location['KY'] = "KY";
+ $location['KZ'] = "KZ";
+ $location['LA'] = "LA";
+ $location['LB'] = "LB";
+ $location['LC'] = "LC";
+ $location['LI'] = "LI";
+ $location['LK'] = "LK";
+ $location['LR'] = "LR";
+ $location['LS'] = "LS";
+ $location['LT'] = "LT";
+ $location['LU'] = "LU";
+ $location['LV'] = "LV";
+ $location['LY'] = "LY";
+ $location['MA'] = "MA";
+ $location['MC'] = "MC";
+ $location['MD'] = "MD";
+ $location['ME'] = "ME";
+ $location['MG'] = "MG";
+ $location['MH'] = "MH";
+ $location['MK'] = "MK";
+ $location['ML'] = "ML";
+ $location['MM'] = "MM";
+ $location['MN'] = "MN";
+ $location['MO'] = "MO";
+ $location['MP'] = "MP";
+ $location['MQ'] = "MQ";
+ $location['MR'] = "MR";
+ $location['MS'] = "MS";
+ $location['MT'] = "MT";
+ $location['MU'] = "MU";
+ $location['MV'] = "MV";
+ $location['MW'] = "MW";
+ $location['MX'] = "MX";
+ $location['MY'] = "MY";
+ $location['MZ'] = "MZ";
+ $location['NA'] = "NA";
+ $location['NC'] = "NC";
+ $location['NE'] = "NE";
+ $location['NF'] = "NF";
+ $location['NG'] = "NG";
+ $location['NI'] = "NI";
+ $location['NL'] = "NL";
+ $location['NO'] = "NO";
+ $location['NP'] = "NP";
+ $location['NR'] = "NR";
+ $location['NU'] = "NU";
+ $location['NZ'] = "NZ";
+ $location['OFF'] = "OFF";
+ $location['OM'] = "OM";
+ $location['PA'] = "PA";
+ $location['PE'] = "PE";
+ $location['PF'] = "PF";
+ $location['PG'] = "PG";
+ $location['PH'] = "PH";
+ $location['PK'] = "PK";
+ $location['PL'] = "PL";
+ $location['PM'] = "PM";
+ $location['PN'] = "PN";
+ $location['PR'] = "PR";
+ $location['PS'] = "PS";
+ $location['PT'] = "PT";
+ $location['PW'] = "PW";
+ $location['PY'] = "PY";
+ $location['QA'] = "QA";
+ $location['RE'] = "RE";
+ $location['RO'] = "RO";
+ $location['RS'] = "RS";
+ $location['RU'] = "RU";
+ $location['RW'] = "RW";
+ $location['SA'] = "SA";
+ $location['SB'] = "SB";
+ $location['SC'] = "SC";
+ $location['SD'] = "SD";
+ $location['SE'] = "SE";
+ $location['SG'] = "SG";
+ $location['SH'] = "SH";
+ $location['SI'] = "SI";
+ $location['SJ'] = "SJ";
+ $location['SK'] = "SK";
+ $location['SL'] = "SL";
+ $location['SM'] = "SM";
+ $location['SN'] = "SN";
+ $location['SO'] = "SO";
+ $location['SR'] = "SR";
+ $location['ST'] = "ST";
+ $location['SV'] = "SV";
+ $location['SY'] = "SY";
+ $location['SZ'] = "SZ";
+ $location['TC'] = "TC";
+ $location['TD'] = "TD";
+ $location['TF'] = "TF";
+ $location['TG'] = "TG";
+ $location['TH'] = "TH";
+ $location['TJ'] = "TJ";
+ $location['TK'] = "TK";
+ $location['TL'] = "TL";
+ $location['TM'] = "TM";
+ $location['TN'] = "TN";
+ $location['TO'] = "TO";
+ $location['TR'] = "TR";
+ $location['TT'] = "TT";
+ $location['TV'] = "TV";
+ $location['TW'] = "TW";
+ $location['TZ'] = "TZ";
+ $location['UA'] = "UA";
+ $location['UG'] = "UG";
+ $location['UM'] = "UM";
+ $location['US'] = "US";
+ $location['UY'] = "UY";
+ $location['UZ'] = "UZ";
+ $location['VA'] = "VA";
+ $location['VC'] = "VC";
+ $location['VE'] = "VE";
+ $location['VG'] = "VG";
+ $location['VI'] = "VI";
+ $location['VN'] = "VN";
+ $location['VU'] = "VU";
+ $location['WF'] = "WF";
+ $location['WS'] = "WS";
+ $location['YE'] = "YE";
+ $location['YT'] = "YT";
+ $location['ZA'] = "ZA";
+ $location['ZM'] = "ZM";
+ $location['ZW'] = "ZW";
+ $this->prefs['locations']['writeParms']['optArray'] = $location;
+ }
+
+ public function renderHelp()
+ {
+ $tp = e107::getParser();
+ $hide_help = e107::getPlugConfig('simplepage')->getPref('hide_help');
+ if ($hide_help)
+ {
+ return '';
+ }
+ $text =
+ '
+ LGSL
+ [ LGSL GITHUB ]
+ [ LGSL ONLINE WIKI ]
+ e107 LGSL Plugin
+ Live Game Server List for e107
+ [ e107 SUPPORT ]
+
+
+ Thank you '.e107::getParser()->toGlyph('fa-smile-o').'
+
+ ';
+
+ return array('caption' => "e107 LGSL plugin", 'text' => $text);
+ }
+
+ public function customPage()
+ {
+ define("LGSL_ADMIN", "1");
+ $output = "";
+ require "lgsl_files/lgsl_admin.php";
+ $output .= "
";
+ e107::getRender()->tablerender('', $output);
+ $output = "";
+
+ }
+
+ public function linksPage()
+ {
+
+ $output = "";
+ $output .= 'SITEURL:
' . SITEURL . ' ';
+ $link = e107::url('lgsl', 'index');
+ $output .= 'SEF URL (you can change alias/name in URL configuration):
' . $link . ' ';
+ $link = e_PLUGIN . "lgsl/index.php";
+ $output .= 'LEGACY URLs :
' . $link . ' ';
+ $link = e_PLUGIN_ABS . "lgsl/index.php";
+ $output .= 'LEGACY URLs :
' . $link . ' ';
+ $link = e107::url('lgsl', 'detail', array('query_path' => '?s=1'));
+ $output .= 'SEF URL DETAIL s=1:
' . $link . ' ';
+ $link = e_PLUGIN . "lgsl/index.php?s=1";
+ $output .= 'LEGACY URLs :
' . $link . ' ';
+
+ //result of lgsl_url_path()
+ $link = $this->lgsl_url_path();
+ $output .= 'LGSL URL PATH (simulated) :
' . $link . ' ';
+ $output .= "
";
+ e107::getRender()->tablerender('', $output);
+ $output = "";
+
+ }
+
+ //simulation, check lgsl_class.php
+ public function lgsl_url_path()
+ {
+ // CHECK IF PATH HAS BEEN SET IN CONFIG
+
+ $lgsl_config = e107::pref('lgsl');
+
+ if ($lgsl_config['url_path'])
+ {
+ return $lgsl_config['url_path'];
+ }
+
+ // USE FULL DOMAIN PATH TO AVOID ALIAS PROBLEMS
+
+ $host_path = (!isset($SERVER['HTTPS']) || strtolower($SERVER['HTTPS']) != "on") ? "http://" : "https://";
+ $host_path .= $SERVER['HTTP_HOST'];
+
+ // GET FULL PATHS ( EXTRA CODE FOR WINDOWS AND IIS - NO DOCUMENT_ROOT - BACKSLASHES - DOUBLESLASHES - ETC )
+
+ if ($SERVER['DOCUMENT_ROOT'])
+ {
+ $base_path = $this->lgsl_realpath($SERVER['DOCUMENT_ROOT']);
+ $base_path = str_replace("\\", "/", $base_path);
+ $base_path = str_replace("//", "/", $base_path);
+ }
+ else
+ {
+ $file_path = $SERVER['SCRIPT_NAME'];
+ $file_path = str_replace("\\", "/", $file_path);
+ $file_path = str_replace("//", "/", $file_path);
+
+ $base_path = $SERVER['PATH_TRANSLATED'];
+ $base_path = str_replace("\\", "/", $base_path);
+ $base_path = str_replace("//", "/", $base_path);
+ $base_path = substr($base_path, 0, -strlen($file_path));
+ }
+
+ $lgsl_path = dirname($this->lgsl_realpath(__FILE__));
+ $lgsl_path = str_replace("\\", "/", $lgsl_path);
+
+ // REMOVE ANY TRAILING SLASHES
+
+ if (substr($base_path, -1) == "/")
+ {
+ $base_path = substr($base_path, 0, -1);}
+ if (substr($lgsl_path, -1) == "/")
+ {
+ $lgsl_path = substr($lgsl_path, 0, -1);}
+
+ // USE THE DIFFERENCE BETWEEN PATHS
+
+ if (substr($lgsl_path, 0, strlen($base_path)) == $base_path)
+ {
+ $url_path = substr($lgsl_path, strlen($base_path));
+
+ return $host_path . $url_path . "/";
+ }
+
+ return "/#LGSL_PATH_PROBLEM#{$base_path}#{$lgsl_path}#/";
+ }
+
+ public function lgsl_realpath($path)
+ {
+ // WRAPPER SO IT CAN BE DISABLED
+ global $lgsl_config;
+ return $lgsl_config['no_realpath'] ? $path : realpath($path);
+ }
+}
+
+class lgsl_form_ui extends e_admin_form_ui
+{
+ public function zone_grid($curVal, $mode)
+ {
+
+ $value = array();
+ $text = '';
+
+ if (!empty($curVal))
+ {
+ $value = e107::unserialize($curVal);
+ }
+ $zone_number = e107::pref('lgsl', 'zone_numbers', 8);
+
+ $text = " ";
+
+ $nameitem = 'zone_grid';
+
+ for ($fieldkey = 1; $fieldkey <= $zone_number; $fieldkey++)
+ {
+ $field = array(
+ 'title' => 'Grid[' . $fieldkey . ']',
+ 'type' => 'number',
+ 'data' => 'int',
+ 'writeParms' => array('default' => 1),
+ );
+ $text .= "" . $field['title'] . ": ";
+ $text .= $this->renderElement($nameitem . '[' . $fieldkey . ']', $value[$fieldkey], $field);
+ $text .= " ";
+ }
+
+ $text .= "
";
+
+ return $text;
+
+ }
+
+ public function zone_players($curVal, $mode)
+ {
+
+ $value = array();
+ $text = '';
+
+ if (!empty($curVal))
+ {
+ $value = e107::unserialize($curVal);
+ }
+ $zone_number = e107::pref('lgsl', 'zone_numbers', 8);
+
+ $text = " ";
+
+ $nameitem = 'zone_players';
+
+ for ($fieldkey = 1; $fieldkey <= $zone_number; $fieldkey++)
+ {
+ $field = array(
+ 'title' => 'Players[' . $fieldkey . ']',
+ 'type' => 'boolean',
+ 'data' => 'int',
+ );
+ $text .= "" . $field['title'] . ": ";
+ $text .= $this->renderElement($nameitem . '[' . $fieldkey . ']', $value[$fieldkey], $field);
+ $text .= " ";
+ }
+
+ $text .= "
";
+
+ return $text;
+ }
+
+ public function zone_random($curVal, $mode)
+ {
+
+ $value = array();
+ $text = '';
+
+ if (!empty($curVal))
+ {
+ $value = e107::unserialize($curVal);
+ }
+ $zone_number = e107::pref('lgsl', 'zone_numbers', 8);
+
+ $text = " ";
+
+ $nameitem = 'zone_random';
+
+ for ($fieldkey = 1; $fieldkey <= $zone_number; $fieldkey++)
+ {
+ $field = array(
+ 'title' => 'Random[' . $fieldkey . ']',
+ 'type' => 'number',
+ 'data' => 'int',
+ 'writeParms' => array('default' => 0),
+ );
+ $text .= "" . $field['title'] . ": ";
+ $text .= $this->renderElement($nameitem . '[' . $fieldkey . ']', $value[$fieldkey], $field);
+ $text .= " ";
+ }
+
+ $text .= "
";
+
+ return $text;
+
+ }
+
+ public function zone_hide_offline($curVal, $mode)
+ {
+
+ $value = array();
+ $text = '';
+
+ if (!empty($curVal))
+ {
+ $value = e107::unserialize($curVal);
+ }
+ $zone_number = e107::pref('lgsl', 'zone_numbers', 8);
+
+ $text = " ";
+
+ $nameitem = 'zone_hide_offline';
+
+ for ($fieldkey = 1; $fieldkey <= $zone_number; $fieldkey++)
+ {
+ $field = array(
+ 'title' => 'Hide Offline[' . $fieldkey . ']',
+ 'type' => 'boolean',
+ 'data' => 'int',
+ );
+ $text .= "" . $field['title'] . ": ";
+ $text .= $this->renderElement($nameitem . '[' . $fieldkey . ']', $value[$fieldkey], $field);
+ $text .= " ";
+ }
+
+ $text .= "
";
+
+ return $text;
+ }
+
+ public function zone_title($curVal, $mode)
+ {
+
+ $value = array();
+ $text = '';
+
+ if (!empty($curVal))
+ {
+ $value = e107::unserialize($curVal);
+ }
+ $zone_number = e107::pref('lgsl', 'zone_numbers', 8);
+
+ $text = " ";
+
+ $nameitem = 'zone_title';
+
+ $fieldkey = 0;
+ $field = array(
+ 'title' => 'List View Title[' . $fieldkey . ']',
+ 'type' => 'text',
+ 'data' => 'string',
+ 'writeParms' => array('default' => 'Live Game Server List'),
+ );
+ $text .= "" . $field['title'] . ": ";
+ $text .= $this->renderElement($nameitem . '[' . $fieldkey . ']', $value[$fieldkey], $field);
+ $text .= " ";
+
+ for ($fieldkey = 1; $fieldkey <= $zone_number; $fieldkey++)
+ {
+ $field = array(
+ 'title' => 'Zone Titles[' . $fieldkey . ']',
+ 'type' => 'text',
+ 'data' => 'string',
+ 'writeParms' => array('default' => 'Game Server'),
+ );
+ $text .= "" . $field['title'] . ": ";
+ $text .= $this->renderElement($nameitem . '[' . $fieldkey . ']', $value[$fieldkey], $field);
+ $text .= " ";
+ }
+
+ $text .= "
";
+
+ return $text;
+ }
+}
+
+new lgsl_adminArea();
+
+require_once e_ADMIN . "auth.php";
+e107::getAdminUI()->runPage();
+
+require_once e_ADMIN . "footer.php";
+exit;
diff --git a/e_header.php b/e_header.php
new file mode 100644
index 0000000..8394c2d
--- /dev/null
+++ b/e_header.php
@@ -0,0 +1,65 @@
+div>table ').addClass('table table-striped table-5');
+ $('.lgsl>form>div>table td input:submit ').addClass('btn btn-primary');";
+
+ if (e107::getPref('admincss') == "css/kadmin.css")
+ {
+ $inline_script .= "
+ $('.lgsl table td ').addClass('tbox');
+ $('.lgsl table td input ').addClass('form-control');";
+ }
+ e107::css('inline', $css);
+ e107::js('inline', $start . $inline_script . $end);
+ }
+}
diff --git a/e_menu.php b/e_menu.php
new file mode 100644
index 0000000..770bf7c
--- /dev/null
+++ b/e_menu.php
@@ -0,0 +1,50 @@
+ "Caption", 'type'=>'text', 'multilan'=>true, 'writeParms'=>array('size'=>'xxlarge'));
+ $fields['lgsl_zone_number'] = array('title'=> "LGSL Zone Number", 'type'=>'dropdown', 'writeParms'=>array('optArray'=>$zone_list, 'default'=>'blank'), 'help'=>'');
+ $fields['lgsl_menu_style'] = array('title'=> "Style code [theme support]", 'type'=>'text', 'writeParms'=>array('size'=>'xxlarge' ));
+ $fields['lgsl_menu_tablestyle'] = array('title'=> "ID/Mode for tablestyle [theme support]", 'type'=>'text', 'writeParms'=>array('size'=>'xxlarge' ));
+ return $fields;
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/e_url.php b/e_url.php
new file mode 100644
index 0000000..658f0f9
--- /dev/null
+++ b/e_url.php
@@ -0,0 +1,45 @@
+ 'LGSL',
+ 'regex' => '^{alias}/\?(.*)$',
+ 'sef' => '{alias}/{query_path}',
+ 'redirect' => '{e_PLUGIN}lgsl/index.php?$1',
+ );
+
+ $config['index'] = array(
+ 'alias' => 'LGSL',
+ 'regex' => '^{alias}\/$',
+ 'sef' => '{alias}/',
+ 'redirect' => '{e_PLUGIN}lgsl/index.php',
+ );
+
+ return $config;
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..8827654
--- /dev/null
+++ b/index.php
@@ -0,0 +1,106 @@
+";
+
+ $('.details_icon').addClass('btn btn-primary');
+ $('.details_icon').html('".$detail_icon."');
+ */
+
+ /* fix for darken + LZ2 images
+ .game_icon {
+ position: absolute;
+ }
+ .details_cell > a { position: absolute;
+ }
+ .contry_icon {
+ position: absolute;
+ right: 0;
+ }
+*/
+ if($lgsl_prefs['bootstrap3_table']) {
+ $start = "$(document).ready(function() {";
+ $end = "}); ";
+
+ $inline_script .= "
+ $('#server_list_table').addClass('table table-striped');
+ $('#totals').addClass('row text-center');
+ $('#totals div').addClass('col-sm-4 col-xs-12');
+ ";
+ }
+ if($lgsl_prefs['bootstrap3_imagefix']) {
+ $css .= "
+ .game_icon {
+ position: absolute;
+ }
+ .details_cell > a { position: absolute;
+ }
+ .contry_icon {
+ position: absolute;
+ right: 0;
+ }
+ ";
+ }
+ e107::css('inline', $css);
+ e107::js('inline', $start.$inline_script.$end);
+ require_once HEADERF;
+
+ global $output, $lgsl_server_id;
+//------------------------------------------------------------------------------------------------------------+
+
+ $output = "";
+ $s = isset($_GET['s']) ? $_GET['s'] : "";
+
+ if (is_numeric($s)) { $lgsl_server_id = $s; require "lgsl_files/lgsl_details.php"; }
+ elseif ($s == "add") { require "lgsl_files/lgsl_add.php"; }
+ else { require "lgsl_files/lgsl_list.php"; }
+
+
+ $ns -> tablerender($lgsl_config['title'][0], $output);
+
+ unset($output);
+
+//------------------------------------------------------------------------------------------------------------+
+
+ require_once FOOTERF;
+
+//------------------------------------------------------------------------------------------------------------+
+
+?>
diff --git a/lgsl_files/icons/aarmy/aarmy.gif b/lgsl_files/icons/aarmy/aarmy.gif
new file mode 100644
index 0000000..daeaa4f
Binary files /dev/null and b/lgsl_files/icons/aarmy/aarmy.gif differ
diff --git a/lgsl_files/icons/aarmy/armygame.gif b/lgsl_files/icons/aarmy/armygame.gif
new file mode 100644
index 0000000..daeaa4f
Binary files /dev/null and b/lgsl_files/icons/aarmy/armygame.gif differ
diff --git a/lgsl_files/icons/aarmy3/aarmy3.gif b/lgsl_files/icons/aarmy3/aarmy3.gif
new file mode 100644
index 0000000..dfb93f1
Binary files /dev/null and b/lgsl_files/icons/aarmy3/aarmy3.gif differ
diff --git a/lgsl_files/icons/arcasimracing/arcasimracing.gif b/lgsl_files/icons/arcasimracing/arcasimracing.gif
new file mode 100644
index 0000000..f07c2e9
Binary files /dev/null and b/lgsl_files/icons/arcasimracing/arcasimracing.gif differ
diff --git a/lgsl_files/icons/arma/arma.gif b/lgsl_files/icons/arma/arma.gif
new file mode 100644
index 0000000..7bac33e
Binary files /dev/null and b/lgsl_files/icons/arma/arma.gif differ
diff --git a/lgsl_files/icons/arma2/arma2.gif b/lgsl_files/icons/arma2/arma2.gif
new file mode 100644
index 0000000..6e8eb47
Binary files /dev/null and b/lgsl_files/icons/arma2/arma2.gif differ
diff --git a/lgsl_files/icons/arma2/arma2pc.gif b/lgsl_files/icons/arma2/arma2pc.gif
new file mode 100644
index 0000000..6e8eb47
Binary files /dev/null and b/lgsl_files/icons/arma2/arma2pc.gif differ
diff --git a/lgsl_files/icons/arma3/arma3.gif b/lgsl_files/icons/arma3/arma3.gif
new file mode 100644
index 0000000..d3e72bc
Binary files /dev/null and b/lgsl_files/icons/arma3/arma3.gif differ
diff --git a/lgsl_files/icons/arma3/dayz.gif b/lgsl_files/icons/arma3/dayz.gif
new file mode 100644
index 0000000..0e7d7d0
Binary files /dev/null and b/lgsl_files/icons/arma3/dayz.gif differ
diff --git a/lgsl_files/icons/avp2/avp2.gif b/lgsl_files/icons/avp2/avp2.gif
new file mode 100644
index 0000000..95ac59b
Binary files /dev/null and b/lgsl_files/icons/avp2/avp2.gif differ
diff --git a/lgsl_files/icons/avp2010/avp2010.gif b/lgsl_files/icons/avp2010/avp2010.gif
new file mode 100644
index 0000000..0c1a095
Binary files /dev/null and b/lgsl_files/icons/avp2010/avp2010.gif differ
diff --git a/lgsl_files/icons/bf1942/bf1942.gif b/lgsl_files/icons/bf1942/bf1942.gif
new file mode 100644
index 0000000..92af044
Binary files /dev/null and b/lgsl_files/icons/bf1942/bf1942.gif differ
diff --git a/lgsl_files/icons/bf1942/bfield1942.gif b/lgsl_files/icons/bf1942/bfield1942.gif
new file mode 100644
index 0000000..92af044
Binary files /dev/null and b/lgsl_files/icons/bf1942/bfield1942.gif differ
diff --git a/lgsl_files/icons/bf1942/desertcombat.gif b/lgsl_files/icons/bf1942/desertcombat.gif
new file mode 100644
index 0000000..5da31bc
Binary files /dev/null and b/lgsl_files/icons/bf1942/desertcombat.gif differ
diff --git a/lgsl_files/icons/bf1942/interstate.gif b/lgsl_files/icons/bf1942/interstate.gif
new file mode 100644
index 0000000..d44ba51
Binary files /dev/null and b/lgsl_files/icons/bf1942/interstate.gif differ
diff --git a/lgsl_files/icons/bf2/battlefield2.gif b/lgsl_files/icons/bf2/battlefield2.gif
new file mode 100644
index 0000000..6f2695f
Binary files /dev/null and b/lgsl_files/icons/bf2/battlefield2.gif differ
diff --git a/lgsl_files/icons/bf2/bf2.gif b/lgsl_files/icons/bf2/bf2.gif
new file mode 100644
index 0000000..6f2695f
Binary files /dev/null and b/lgsl_files/icons/bf2/bf2.gif differ
diff --git a/lgsl_files/icons/bf2142/bf2142.gif b/lgsl_files/icons/bf2142/bf2142.gif
new file mode 100644
index 0000000..e8b9a4e
Binary files /dev/null and b/lgsl_files/icons/bf2142/bf2142.gif differ
diff --git a/lgsl_files/icons/bf2142/stella.gif b/lgsl_files/icons/bf2142/stella.gif
new file mode 100644
index 0000000..e8b9a4e
Binary files /dev/null and b/lgsl_files/icons/bf2142/stella.gif differ
diff --git a/lgsl_files/icons/bf3/bf3.gif b/lgsl_files/icons/bf3/bf3.gif
new file mode 100644
index 0000000..8850d2f
Binary files /dev/null and b/lgsl_files/icons/bf3/bf3.gif differ
diff --git a/lgsl_files/icons/bf4/bf4.gif b/lgsl_files/icons/bf4/bf4.gif
new file mode 100644
index 0000000..757fb18
Binary files /dev/null and b/lgsl_files/icons/bf4/bf4.gif differ
diff --git a/lgsl_files/icons/bfbc2/bfbc2.gif b/lgsl_files/icons/bfbc2/bfbc2.gif
new file mode 100644
index 0000000..06e346e
Binary files /dev/null and b/lgsl_files/icons/bfbc2/bfbc2.gif differ
diff --git a/lgsl_files/icons/bfvietnam/bfvietnam.gif b/lgsl_files/icons/bfvietnam/bfvietnam.gif
new file mode 100644
index 0000000..26682e5
Binary files /dev/null and b/lgsl_files/icons/bfvietnam/bfvietnam.gif differ
diff --git a/lgsl_files/icons/callofduty/callofduty.gif b/lgsl_files/icons/callofduty/callofduty.gif
new file mode 100644
index 0000000..b017b21
Binary files /dev/null and b/lgsl_files/icons/callofduty/callofduty.gif differ
diff --git a/lgsl_files/icons/callofduty2/callofduty2.gif b/lgsl_files/icons/callofduty2/callofduty2.gif
new file mode 100644
index 0000000..bbd0ce2
Binary files /dev/null and b/lgsl_files/icons/callofduty2/callofduty2.gif differ
diff --git a/lgsl_files/icons/callofduty4/callofduty4.gif b/lgsl_files/icons/callofduty4/callofduty4.gif
new file mode 100644
index 0000000..c8dbb31
Binary files /dev/null and b/lgsl_files/icons/callofduty4/callofduty4.gif differ
diff --git a/lgsl_files/icons/callofdutyuo/callofdutyuo.gif b/lgsl_files/icons/callofdutyuo/callofdutyuo.gif
new file mode 100644
index 0000000..08f6b60
Binary files /dev/null and b/lgsl_files/icons/callofdutyuo/callofdutyuo.gif differ
diff --git a/lgsl_files/icons/callofdutywaw/callofdutywaw.gif b/lgsl_files/icons/callofdutywaw/callofdutywaw.gif
new file mode 100644
index 0000000..6e3824e
Binary files /dev/null and b/lgsl_files/icons/callofdutywaw/callofdutywaw.gif differ
diff --git a/lgsl_files/icons/cncrenegade/cncrenegade.gif b/lgsl_files/icons/cncrenegade/cncrenegade.gif
new file mode 100644
index 0000000..e4bd4be
Binary files /dev/null and b/lgsl_files/icons/cncrenegade/cncrenegade.gif differ
diff --git a/lgsl_files/icons/conanexiles/conanexiles.gif b/lgsl_files/icons/conanexiles/conanexiles.gif
new file mode 100644
index 0000000..1c0c80d
Binary files /dev/null and b/lgsl_files/icons/conanexiles/conanexiles.gif differ
diff --git a/lgsl_files/icons/crysis/crysis.gif b/lgsl_files/icons/crysis/crysis.gif
new file mode 100644
index 0000000..e7550f4
Binary files /dev/null and b/lgsl_files/icons/crysis/crysis.gif differ
diff --git a/lgsl_files/icons/crysiswars/crysiswars.gif b/lgsl_files/icons/crysiswars/crysiswars.gif
new file mode 100644
index 0000000..48dc922
Binary files /dev/null and b/lgsl_files/icons/crysiswars/crysiswars.gif differ
diff --git a/lgsl_files/icons/cs2d/cs2d.gif b/lgsl_files/icons/cs2d/cs2d.gif
new file mode 100644
index 0000000..b8c1cd9
Binary files /dev/null and b/lgsl_files/icons/cs2d/cs2d.gif differ
diff --git a/lgsl_files/icons/cube/assaultcube.gif b/lgsl_files/icons/cube/assaultcube.gif
new file mode 100644
index 0000000..0b4beff
Binary files /dev/null and b/lgsl_files/icons/cube/assaultcube.gif differ
diff --git a/lgsl_files/icons/cube/blood_frontier.gif b/lgsl_files/icons/cube/blood_frontier.gif
new file mode 100644
index 0000000..160cf6a
Binary files /dev/null and b/lgsl_files/icons/cube/blood_frontier.gif differ
diff --git a/lgsl_files/icons/cube/bloodfrontier.gif b/lgsl_files/icons/cube/bloodfrontier.gif
new file mode 100644
index 0000000..160cf6a
Binary files /dev/null and b/lgsl_files/icons/cube/bloodfrontier.gif differ
diff --git a/lgsl_files/icons/cube/cube.gif b/lgsl_files/icons/cube/cube.gif
new file mode 100644
index 0000000..3f4cb5f
Binary files /dev/null and b/lgsl_files/icons/cube/cube.gif differ
diff --git a/lgsl_files/icons/cube/cube1.gif b/lgsl_files/icons/cube/cube1.gif
new file mode 100644
index 0000000..c5e8aea
Binary files /dev/null and b/lgsl_files/icons/cube/cube1.gif differ
diff --git a/lgsl_files/icons/cube/cube2.gif b/lgsl_files/icons/cube/cube2.gif
new file mode 100644
index 0000000..d36aab9
Binary files /dev/null and b/lgsl_files/icons/cube/cube2.gif differ
diff --git a/lgsl_files/icons/cube/sauerbraten.gif b/lgsl_files/icons/cube/sauerbraten.gif
new file mode 100644
index 0000000..3ac182e
Binary files /dev/null and b/lgsl_files/icons/cube/sauerbraten.gif differ
diff --git a/lgsl_files/icons/cube/saurbraton.gif b/lgsl_files/icons/cube/saurbraton.gif
new file mode 100644
index 0000000..521b206
Binary files /dev/null and b/lgsl_files/icons/cube/saurbraton.gif differ
diff --git a/lgsl_files/icons/dh2005/dh2005.gif b/lgsl_files/icons/dh2005/dh2005.gif
new file mode 100644
index 0000000..e5dd11d
Binary files /dev/null and b/lgsl_files/icons/dh2005/dh2005.gif differ
diff --git a/lgsl_files/icons/discord/discord.gif b/lgsl_files/icons/discord/discord.gif
new file mode 100644
index 0000000..3b1c26e
Binary files /dev/null and b/lgsl_files/icons/discord/discord.gif differ
diff --git a/lgsl_files/icons/doom3/basedoom-1.gif b/lgsl_files/icons/doom3/basedoom-1.gif
new file mode 100644
index 0000000..68cce5b
Binary files /dev/null and b/lgsl_files/icons/doom3/basedoom-1.gif differ
diff --git a/lgsl_files/icons/doom3/doom3.gif b/lgsl_files/icons/doom3/doom3.gif
new file mode 100644
index 0000000..68cce5b
Binary files /dev/null and b/lgsl_files/icons/doom3/doom3.gif differ
diff --git a/lgsl_files/icons/doomskulltag/doomskulltag.gif b/lgsl_files/icons/doomskulltag/doomskulltag.gif
new file mode 100644
index 0000000..ff69d85
Binary files /dev/null and b/lgsl_files/icons/doomskulltag/doomskulltag.gif differ
diff --git a/lgsl_files/icons/doomzdaemon/doomzdaemon.gif b/lgsl_files/icons/doomzdaemon/doomzdaemon.gif
new file mode 100644
index 0000000..46379a3
Binary files /dev/null and b/lgsl_files/icons/doomzdaemon/doomzdaemon.gif differ
diff --git a/lgsl_files/icons/f1c9902/f1c9902.gif b/lgsl_files/icons/f1c9902/f1c9902.gif
new file mode 100644
index 0000000..fe12447
Binary files /dev/null and b/lgsl_files/icons/f1c9902/f1c9902.gif differ
diff --git a/lgsl_files/icons/farcry/farcry.gif b/lgsl_files/icons/farcry/farcry.gif
new file mode 100644
index 0000000..5986bc5
Binary files /dev/null and b/lgsl_files/icons/farcry/farcry.gif differ
diff --git a/lgsl_files/icons/farcry/obsidianedge.gif b/lgsl_files/icons/farcry/obsidianedge.gif
new file mode 100644
index 0000000..5986bc5
Binary files /dev/null and b/lgsl_files/icons/farcry/obsidianedge.gif differ
diff --git a/lgsl_files/icons/fear/fear.gif b/lgsl_files/icons/fear/fear.gif
new file mode 100644
index 0000000..b050493
Binary files /dev/null and b/lgsl_files/icons/fear/fear.gif differ
diff --git a/lgsl_files/icons/fivem/fivem.gif b/lgsl_files/icons/fivem/fivem.gif
new file mode 100644
index 0000000..824a078
Binary files /dev/null and b/lgsl_files/icons/fivem/fivem.gif differ
diff --git a/lgsl_files/icons/flashpoint/flashpoint.gif b/lgsl_files/icons/flashpoint/flashpoint.gif
new file mode 100644
index 0000000..b7f61f6
Binary files /dev/null and b/lgsl_files/icons/flashpoint/flashpoint.gif differ
diff --git a/lgsl_files/icons/flashpoint/opflashr.gif b/lgsl_files/icons/flashpoint/opflashr.gif
new file mode 100644
index 0000000..b7f61f6
Binary files /dev/null and b/lgsl_files/icons/flashpoint/opflashr.gif differ
diff --git a/lgsl_files/icons/freelancer/freelancer.gif b/lgsl_files/icons/freelancer/freelancer.gif
new file mode 100644
index 0000000..c2636b0
Binary files /dev/null and b/lgsl_files/icons/freelancer/freelancer.gif differ
diff --git a/lgsl_files/icons/frontlines/frontlines.gif b/lgsl_files/icons/frontlines/frontlines.gif
new file mode 100644
index 0000000..3ab2d98
Binary files /dev/null and b/lgsl_files/icons/frontlines/frontlines.gif differ
diff --git a/lgsl_files/icons/gamespy1/gamespy1.gif b/lgsl_files/icons/gamespy1/gamespy1.gif
new file mode 100644
index 0000000..c78184d
Binary files /dev/null and b/lgsl_files/icons/gamespy1/gamespy1.gif differ
diff --git a/lgsl_files/icons/gamespy2/gamespy2.gif b/lgsl_files/icons/gamespy2/gamespy2.gif
new file mode 100644
index 0000000..c78184d
Binary files /dev/null and b/lgsl_files/icons/gamespy2/gamespy2.gif differ
diff --git a/lgsl_files/icons/gamespy3/gamespy3.gif b/lgsl_files/icons/gamespy3/gamespy3.gif
new file mode 100644
index 0000000..c78184d
Binary files /dev/null and b/lgsl_files/icons/gamespy3/gamespy3.gif differ
diff --git a/lgsl_files/icons/ghostrecon/ghostrecon.gif b/lgsl_files/icons/ghostrecon/ghostrecon.gif
new file mode 100644
index 0000000..bd0f99e
Binary files /dev/null and b/lgsl_files/icons/ghostrecon/ghostrecon.gif differ
diff --git a/lgsl_files/icons/graw/graw.gif b/lgsl_files/icons/graw/graw.gif
new file mode 100644
index 0000000..0715ba9
Binary files /dev/null and b/lgsl_files/icons/graw/graw.gif differ
diff --git a/lgsl_files/icons/graw2/graw2.gif b/lgsl_files/icons/graw2/graw2.gif
new file mode 100644
index 0000000..71899ac
Binary files /dev/null and b/lgsl_files/icons/graw2/graw2.gif differ
diff --git a/lgsl_files/icons/gtr2/gtr2.gif b/lgsl_files/icons/gtr2/gtr2.gif
new file mode 100644
index 0000000..caa4953
Binary files /dev/null and b/lgsl_files/icons/gtr2/gtr2.gif differ
diff --git a/lgsl_files/icons/had2/had2.gif b/lgsl_files/icons/had2/had2.gif
new file mode 100644
index 0000000..20dbac2
Binary files /dev/null and b/lgsl_files/icons/had2/had2.gif differ
diff --git a/lgsl_files/icons/halflife/cstrike.gif b/lgsl_files/icons/halflife/cstrike.gif
new file mode 100644
index 0000000..9541329
Binary files /dev/null and b/lgsl_files/icons/halflife/cstrike.gif differ
diff --git a/lgsl_files/icons/halflife/czero.gif b/lgsl_files/icons/halflife/czero.gif
new file mode 100644
index 0000000..8b3c74f
Binary files /dev/null and b/lgsl_files/icons/halflife/czero.gif differ
diff --git a/lgsl_files/icons/halflife/dod.gif b/lgsl_files/icons/halflife/dod.gif
new file mode 100644
index 0000000..7321618
Binary files /dev/null and b/lgsl_files/icons/halflife/dod.gif differ
diff --git a/lgsl_files/icons/halflife/frontline.gif b/lgsl_files/icons/halflife/frontline.gif
new file mode 100644
index 0000000..8bd081d
Binary files /dev/null and b/lgsl_files/icons/halflife/frontline.gif differ
diff --git a/lgsl_files/icons/halflife/halflife.gif b/lgsl_files/icons/halflife/halflife.gif
new file mode 100644
index 0000000..8a2b48b
Binary files /dev/null and b/lgsl_files/icons/halflife/halflife.gif differ
diff --git a/lgsl_files/icons/halflife/ns.gif b/lgsl_files/icons/halflife/ns.gif
new file mode 100644
index 0000000..5b77fd3
Binary files /dev/null and b/lgsl_files/icons/halflife/ns.gif differ
diff --git a/lgsl_files/icons/halflife/nsp.gif b/lgsl_files/icons/halflife/nsp.gif
new file mode 100644
index 0000000..5b77fd3
Binary files /dev/null and b/lgsl_files/icons/halflife/nsp.gif differ
diff --git a/lgsl_files/icons/halflife/ricochet.gif b/lgsl_files/icons/halflife/ricochet.gif
new file mode 100644
index 0000000..c4068c8
Binary files /dev/null and b/lgsl_files/icons/halflife/ricochet.gif differ
diff --git a/lgsl_files/icons/halflife/svencoop.gif b/lgsl_files/icons/halflife/svencoop.gif
new file mode 100644
index 0000000..1a2fa4e
Binary files /dev/null and b/lgsl_files/icons/halflife/svencoop.gif differ
diff --git a/lgsl_files/icons/halflife/tfc.gif b/lgsl_files/icons/halflife/tfc.gif
new file mode 100644
index 0000000..64c3b4a
Binary files /dev/null and b/lgsl_files/icons/halflife/tfc.gif differ
diff --git a/lgsl_files/icons/halflife/ts.gif b/lgsl_files/icons/halflife/ts.gif
new file mode 100644
index 0000000..f05432a
Binary files /dev/null and b/lgsl_files/icons/halflife/ts.gif differ
diff --git a/lgsl_files/icons/halflife/valve.gif b/lgsl_files/icons/halflife/valve.gif
new file mode 100644
index 0000000..b6e9456
Binary files /dev/null and b/lgsl_files/icons/halflife/valve.gif differ
diff --git a/lgsl_files/icons/halflifewon/cstrike.gif b/lgsl_files/icons/halflifewon/cstrike.gif
new file mode 100644
index 0000000..c3eba9f
Binary files /dev/null and b/lgsl_files/icons/halflifewon/cstrike.gif differ
diff --git a/lgsl_files/icons/halflifewon/halflifewon.gif b/lgsl_files/icons/halflifewon/halflifewon.gif
new file mode 100644
index 0000000..814b0b2
Binary files /dev/null and b/lgsl_files/icons/halflifewon/halflifewon.gif differ
diff --git a/lgsl_files/icons/halo/halo.gif b/lgsl_files/icons/halo/halo.gif
new file mode 100644
index 0000000..a1d5ac6
Binary files /dev/null and b/lgsl_files/icons/halo/halo.gif differ
diff --git a/lgsl_files/icons/il2/il2.gif b/lgsl_files/icons/il2/il2.gif
new file mode 100644
index 0000000..5180825
Binary files /dev/null and b/lgsl_files/icons/il2/il2.gif differ
diff --git a/lgsl_files/icons/jediknight2/basejk.gif b/lgsl_files/icons/jediknight2/basejk.gif
new file mode 100644
index 0000000..8d84e62
Binary files /dev/null and b/lgsl_files/icons/jediknight2/basejk.gif differ
diff --git a/lgsl_files/icons/jediknight2/jediknight2.gif b/lgsl_files/icons/jediknight2/jediknight2.gif
new file mode 100644
index 0000000..8d84e62
Binary files /dev/null and b/lgsl_files/icons/jediknight2/jediknight2.gif differ
diff --git a/lgsl_files/icons/jediknightja/jediknightja.gif b/lgsl_files/icons/jediknightja/jediknightja.gif
new file mode 100644
index 0000000..91b0117
Binary files /dev/null and b/lgsl_files/icons/jediknightja/jediknightja.gif differ
diff --git a/lgsl_files/icons/killingfloor/killing_floor.gif b/lgsl_files/icons/killingfloor/killing_floor.gif
new file mode 100644
index 0000000..52f8d7d
Binary files /dev/null and b/lgsl_files/icons/killingfloor/killing_floor.gif differ
diff --git a/lgsl_files/icons/killingfloor/killingfloor.gif b/lgsl_files/icons/killingfloor/killingfloor.gif
new file mode 100644
index 0000000..a8f1547
Binary files /dev/null and b/lgsl_files/icons/killingfloor/killingfloor.gif differ
diff --git a/lgsl_files/icons/kingpin/kingpin.gif b/lgsl_files/icons/kingpin/kingpin.gif
new file mode 100644
index 0000000..ca0a711
Binary files /dev/null and b/lgsl_files/icons/kingpin/kingpin.gif differ
diff --git a/lgsl_files/icons/minecraft/minecraft.gif b/lgsl_files/icons/minecraft/minecraft.gif
new file mode 100644
index 0000000..a502cfc
Binary files /dev/null and b/lgsl_files/icons/minecraft/minecraft.gif differ
diff --git a/lgsl_files/icons/mohaa/mohaa.gif b/lgsl_files/icons/mohaa/mohaa.gif
new file mode 100644
index 0000000..b9833c6
Binary files /dev/null and b/lgsl_files/icons/mohaa/mohaa.gif differ
diff --git a/lgsl_files/icons/mohaab/mohaab.gif b/lgsl_files/icons/mohaab/mohaab.gif
new file mode 100644
index 0000000..bdd3197
Binary files /dev/null and b/lgsl_files/icons/mohaab/mohaab.gif differ
diff --git a/lgsl_files/icons/mohaas/mohaas.gif b/lgsl_files/icons/mohaas/mohaas.gif
new file mode 100644
index 0000000..ddee824
Binary files /dev/null and b/lgsl_files/icons/mohaas/mohaas.gif differ
diff --git a/lgsl_files/icons/mohpa/mohpa.gif b/lgsl_files/icons/mohpa/mohpa.gif
new file mode 100644
index 0000000..1d7d84a
Binary files /dev/null and b/lgsl_files/icons/mohpa/mohpa.gif differ
diff --git a/lgsl_files/icons/mta/mta.gif b/lgsl_files/icons/mta/mta.gif
new file mode 100644
index 0000000..249532c
Binary files /dev/null and b/lgsl_files/icons/mta/mta.gif differ
diff --git a/lgsl_files/icons/nascar2004/nascar2004.gif b/lgsl_files/icons/nascar2004/nascar2004.gif
new file mode 100644
index 0000000..48c8b29
Binary files /dev/null and b/lgsl_files/icons/nascar2004/nascar2004.gif differ
diff --git a/lgsl_files/icons/neverwinter/neverwinter.gif b/lgsl_files/icons/neverwinter/neverwinter.gif
new file mode 100644
index 0000000..5f401f6
Binary files /dev/null and b/lgsl_files/icons/neverwinter/neverwinter.gif differ
diff --git a/lgsl_files/icons/neverwinter2/neverwinter2.gif b/lgsl_files/icons/neverwinter2/neverwinter2.gif
new file mode 100644
index 0000000..5f401f6
Binary files /dev/null and b/lgsl_files/icons/neverwinter2/neverwinter2.gif differ
diff --git a/lgsl_files/icons/nexuiz/nexuiz.gif b/lgsl_files/icons/nexuiz/nexuiz.gif
new file mode 100644
index 0000000..5fd2219
Binary files /dev/null and b/lgsl_files/icons/nexuiz/nexuiz.gif differ
diff --git a/lgsl_files/icons/openttd/openttd.gif b/lgsl_files/icons/openttd/openttd.gif
new file mode 100644
index 0000000..e43e050
Binary files /dev/null and b/lgsl_files/icons/openttd/openttd.gif differ
diff --git a/lgsl_files/icons/painkiller/painkiller.gif b/lgsl_files/icons/painkiller/painkiller.gif
new file mode 100644
index 0000000..7dba648
Binary files /dev/null and b/lgsl_files/icons/painkiller/painkiller.gif differ
diff --git a/lgsl_files/icons/plainsight/plainsight.gif b/lgsl_files/icons/plainsight/plainsight.gif
new file mode 100644
index 0000000..7b43f36
Binary files /dev/null and b/lgsl_files/icons/plainsight/plainsight.gif differ
diff --git a/lgsl_files/icons/prey/prey.gif b/lgsl_files/icons/prey/prey.gif
new file mode 100644
index 0000000..bc34aab
Binary files /dev/null and b/lgsl_files/icons/prey/prey.gif differ
diff --git a/lgsl_files/icons/quake2/quake2.gif b/lgsl_files/icons/quake2/quake2.gif
new file mode 100644
index 0000000..b4aebee
Binary files /dev/null and b/lgsl_files/icons/quake2/quake2.gif differ
diff --git a/lgsl_files/icons/quake3/quake3.gif b/lgsl_files/icons/quake3/quake3.gif
new file mode 100644
index 0000000..9190f52
Binary files /dev/null and b/lgsl_files/icons/quake3/quake3.gif differ
diff --git a/lgsl_files/icons/quake4/basequake4-1.gif b/lgsl_files/icons/quake4/basequake4-1.gif
new file mode 100644
index 0000000..7136139
Binary files /dev/null and b/lgsl_files/icons/quake4/basequake4-1.gif differ
diff --git a/lgsl_files/icons/quake4/quake4.gif b/lgsl_files/icons/quake4/quake4.gif
new file mode 100644
index 0000000..7136139
Binary files /dev/null and b/lgsl_files/icons/quake4/quake4.gif differ
diff --git a/lgsl_files/icons/quakewars/quakewars.gif b/lgsl_files/icons/quakewars/quakewars.gif
new file mode 100644
index 0000000..6d348e4
Binary files /dev/null and b/lgsl_files/icons/quakewars/quakewars.gif differ
diff --git a/lgsl_files/icons/quakeworld/fortress.gif b/lgsl_files/icons/quakeworld/fortress.gif
new file mode 100644
index 0000000..c2c3f68
Binary files /dev/null and b/lgsl_files/icons/quakeworld/fortress.gif differ
diff --git a/lgsl_files/icons/quakeworld/quakeworld.gif b/lgsl_files/icons/quakeworld/quakeworld.gif
new file mode 100644
index 0000000..c2c3f68
Binary files /dev/null and b/lgsl_files/icons/quakeworld/quakeworld.gif differ
diff --git a/lgsl_files/icons/quakeworld/qw.gif b/lgsl_files/icons/quakeworld/qw.gif
new file mode 100644
index 0000000..c2c3f68
Binary files /dev/null and b/lgsl_files/icons/quakeworld/qw.gif differ
diff --git a/lgsl_files/icons/ragemp/ragemp.gif b/lgsl_files/icons/ragemp/ragemp.gif
new file mode 100644
index 0000000..e03b780
Binary files /dev/null and b/lgsl_files/icons/ragemp/ragemp.gif differ
diff --git a/lgsl_files/icons/ravenshield/ravenshield.gif b/lgsl_files/icons/ravenshield/ravenshield.gif
new file mode 100644
index 0000000..5b54064
Binary files /dev/null and b/lgsl_files/icons/ravenshield/ravenshield.gif differ
diff --git a/lgsl_files/icons/redorchestra/red_orchestra.gif b/lgsl_files/icons/redorchestra/red_orchestra.gif
new file mode 100644
index 0000000..949fa66
Binary files /dev/null and b/lgsl_files/icons/redorchestra/red_orchestra.gif differ
diff --git a/lgsl_files/icons/redorchestra/redorchestra.gif b/lgsl_files/icons/redorchestra/redorchestra.gif
new file mode 100644
index 0000000..949fa66
Binary files /dev/null and b/lgsl_files/icons/redorchestra/redorchestra.gif differ
diff --git a/lgsl_files/icons/rfactor/rfactor.gif b/lgsl_files/icons/rfactor/rfactor.gif
new file mode 100644
index 0000000..8158ac7
Binary files /dev/null and b/lgsl_files/icons/rfactor/rfactor.gif differ
diff --git a/lgsl_files/icons/samp/samp.gif b/lgsl_files/icons/samp/samp.gif
new file mode 100644
index 0000000..a911d6c
Binary files /dev/null and b/lgsl_files/icons/samp/samp.gif differ
diff --git a/lgsl_files/icons/savage/savage.gif b/lgsl_files/icons/savage/savage.gif
new file mode 100644
index 0000000..61db507
Binary files /dev/null and b/lgsl_files/icons/savage/savage.gif differ
diff --git a/lgsl_files/icons/savage2/savage2.gif b/lgsl_files/icons/savage2/savage2.gif
new file mode 100644
index 0000000..c4110cd
Binary files /dev/null and b/lgsl_files/icons/savage2/savage2.gif differ
diff --git a/lgsl_files/icons/serioussam/serioussam.gif b/lgsl_files/icons/serioussam/serioussam.gif
new file mode 100644
index 0000000..b01c2d6
Binary files /dev/null and b/lgsl_files/icons/serioussam/serioussam.gif differ
diff --git a/lgsl_files/icons/serioussam2/serioussam2.gif b/lgsl_files/icons/serioussam2/serioussam2.gif
new file mode 100644
index 0000000..702fcdd
Binary files /dev/null and b/lgsl_files/icons/serioussam2/serioussam2.gif differ
diff --git a/lgsl_files/icons/shatteredh/shatteredh.gif b/lgsl_files/icons/shatteredh/shatteredh.gif
new file mode 100644
index 0000000..15ec54e
Binary files /dev/null and b/lgsl_files/icons/shatteredh/shatteredh.gif differ
diff --git a/lgsl_files/icons/sof2/sof2.gif b/lgsl_files/icons/sof2/sof2.gif
new file mode 100644
index 0000000..bfbba4e
Binary files /dev/null and b/lgsl_files/icons/sof2/sof2.gif differ
diff --git a/lgsl_files/icons/sof2/sof2mp.gif b/lgsl_files/icons/sof2/sof2mp.gif
new file mode 100644
index 0000000..bfbba4e
Binary files /dev/null and b/lgsl_files/icons/sof2/sof2mp.gif differ
diff --git a/lgsl_files/icons/soldat/soldat.gif b/lgsl_files/icons/soldat/soldat.gif
new file mode 100644
index 0000000..9c47836
Binary files /dev/null and b/lgsl_files/icons/soldat/soldat.gif differ
diff --git a/lgsl_files/icons/source/7DTD.gif b/lgsl_files/icons/source/7DTD.gif
new file mode 100644
index 0000000..f7ef96f
Binary files /dev/null and b/lgsl_files/icons/source/7DTD.gif differ
diff --git a/lgsl_files/icons/source/Space_Engineers.gif b/lgsl_files/icons/source/Space_Engineers.gif
new file mode 100644
index 0000000..d44ddba
Binary files /dev/null and b/lgsl_files/icons/source/Space_Engineers.gif differ
diff --git a/lgsl_files/icons/source/Unturned.gif b/lgsl_files/icons/source/Unturned.gif
new file mode 100644
index 0000000..5b14bc7
Binary files /dev/null and b/lgsl_files/icons/source/Unturned.gif differ
diff --git a/lgsl_files/icons/source/ageofchivalry.gif b/lgsl_files/icons/source/ageofchivalry.gif
new file mode 100644
index 0000000..c9c4a7a
Binary files /dev/null and b/lgsl_files/icons/source/ageofchivalry.gif differ
diff --git a/lgsl_files/icons/source/ark_survival_evolved.gif b/lgsl_files/icons/source/ark_survival_evolved.gif
new file mode 100644
index 0000000..15a0ec0
Binary files /dev/null and b/lgsl_files/icons/source/ark_survival_evolved.gif differ
diff --git a/lgsl_files/icons/source/basewf.gif b/lgsl_files/icons/source/basewf.gif
new file mode 100644
index 0000000..9627d34
Binary files /dev/null and b/lgsl_files/icons/source/basewf.gif differ
diff --git a/lgsl_files/icons/source/chivalrymedievalwarfare.gif b/lgsl_files/icons/source/chivalrymedievalwarfare.gif
new file mode 100644
index 0000000..117cfea
Binary files /dev/null and b/lgsl_files/icons/source/chivalrymedievalwarfare.gif differ
diff --git a/lgsl_files/icons/source/contagion.gif b/lgsl_files/icons/source/contagion.gif
new file mode 100644
index 0000000..39fa518
Binary files /dev/null and b/lgsl_files/icons/source/contagion.gif differ
diff --git a/lgsl_files/icons/source/csgo.gif b/lgsl_files/icons/source/csgo.gif
new file mode 100644
index 0000000..3a77370
Binary files /dev/null and b/lgsl_files/icons/source/csgo.gif differ
diff --git a/lgsl_files/icons/source/cstrike.gif b/lgsl_files/icons/source/cstrike.gif
new file mode 100644
index 0000000..6354571
Binary files /dev/null and b/lgsl_files/icons/source/cstrike.gif differ
diff --git a/lgsl_files/icons/source/dayz.gif b/lgsl_files/icons/source/dayz.gif
new file mode 100644
index 0000000..056ac55
Binary files /dev/null and b/lgsl_files/icons/source/dayz.gif differ
diff --git a/lgsl_files/icons/source/decadence.gif b/lgsl_files/icons/source/decadence.gif
new file mode 100644
index 0000000..449076d
Binary files /dev/null and b/lgsl_files/icons/source/decadence.gif differ
diff --git a/lgsl_files/icons/source/dod.gif b/lgsl_files/icons/source/dod.gif
new file mode 100644
index 0000000..5fd24de
Binary files /dev/null and b/lgsl_files/icons/source/dod.gif differ
diff --git a/lgsl_files/icons/source/dystopia.gif b/lgsl_files/icons/source/dystopia.gif
new file mode 100644
index 0000000..7f2a7fb
Binary files /dev/null and b/lgsl_files/icons/source/dystopia.gif differ
diff --git a/lgsl_files/icons/source/empires.gif b/lgsl_files/icons/source/empires.gif
new file mode 100644
index 0000000..488dc10
Binary files /dev/null and b/lgsl_files/icons/source/empires.gif differ
diff --git a/lgsl_files/icons/source/esmod.gif b/lgsl_files/icons/source/esmod.gif
new file mode 100644
index 0000000..d2c1197
Binary files /dev/null and b/lgsl_files/icons/source/esmod.gif differ
diff --git a/lgsl_files/icons/source/fof.gif b/lgsl_files/icons/source/fof.gif
new file mode 100644
index 0000000..50eec7a
Binary files /dev/null and b/lgsl_files/icons/source/fof.gif differ
diff --git a/lgsl_files/icons/source/garrysmod.gif b/lgsl_files/icons/source/garrysmod.gif
new file mode 100644
index 0000000..bef2eef
Binary files /dev/null and b/lgsl_files/icons/source/garrysmod.gif differ
diff --git a/lgsl_files/icons/source/hidden.gif b/lgsl_files/icons/source/hidden.gif
new file mode 100644
index 0000000..106b49c
Binary files /dev/null and b/lgsl_files/icons/source/hidden.gif differ
diff --git a/lgsl_files/icons/source/hl2mp.gif b/lgsl_files/icons/source/hl2mp.gif
new file mode 100644
index 0000000..ac254ed
Binary files /dev/null and b/lgsl_files/icons/source/hl2mp.gif differ
diff --git a/lgsl_files/icons/source/insurgency.gif b/lgsl_files/icons/source/insurgency.gif
new file mode 100644
index 0000000..cd7bcac
Binary files /dev/null and b/lgsl_files/icons/source/insurgency.gif differ
diff --git a/lgsl_files/icons/source/kf2.gif b/lgsl_files/icons/source/kf2.gif
new file mode 100644
index 0000000..14f9489
Binary files /dev/null and b/lgsl_files/icons/source/kf2.gif differ
diff --git a/lgsl_files/icons/source/left4dead.gif b/lgsl_files/icons/source/left4dead.gif
new file mode 100644
index 0000000..abe944a
Binary files /dev/null and b/lgsl_files/icons/source/left4dead.gif differ
diff --git a/lgsl_files/icons/source/left4dead2.gif b/lgsl_files/icons/source/left4dead2.gif
new file mode 100644
index 0000000..f7fe5aa
Binary files /dev/null and b/lgsl_files/icons/source/left4dead2.gif differ
diff --git a/lgsl_files/icons/source/mordhau.gif b/lgsl_files/icons/source/mordhau.gif
new file mode 100644
index 0000000..6c84f17
Binary files /dev/null and b/lgsl_files/icons/source/mordhau.gif differ
diff --git a/lgsl_files/icons/source/neotokyosource.gif b/lgsl_files/icons/source/neotokyosource.gif
new file mode 100644
index 0000000..e26f0d2
Binary files /dev/null and b/lgsl_files/icons/source/neotokyosource.gif differ
diff --git a/lgsl_files/icons/source/nmrih.gif b/lgsl_files/icons/source/nmrih.gif
new file mode 100644
index 0000000..75d46a3
Binary files /dev/null and b/lgsl_files/icons/source/nmrih.gif differ
diff --git a/lgsl_files/icons/source/obsidian.gif b/lgsl_files/icons/source/obsidian.gif
new file mode 100644
index 0000000..5526eb8
Binary files /dev/null and b/lgsl_files/icons/source/obsidian.gif differ
diff --git a/lgsl_files/icons/source/postscriptum.gif b/lgsl_files/icons/source/postscriptum.gif
new file mode 100644
index 0000000..9b64aaa
Binary files /dev/null and b/lgsl_files/icons/source/postscriptum.gif differ
diff --git a/lgsl_files/icons/source/pvkii.gif b/lgsl_files/icons/source/pvkii.gif
new file mode 100644
index 0000000..5cdcbbe
Binary files /dev/null and b/lgsl_files/icons/source/pvkii.gif differ
diff --git a/lgsl_files/icons/source/rust.gif b/lgsl_files/icons/source/rust.gif
new file mode 100644
index 0000000..86173ab
Binary files /dev/null and b/lgsl_files/icons/source/rust.gif differ
diff --git a/lgsl_files/icons/source/sandstorm.png b/lgsl_files/icons/source/sandstorm.png
new file mode 100644
index 0000000..97d0a6e
Binary files /dev/null and b/lgsl_files/icons/source/sandstorm.png differ
diff --git a/lgsl_files/icons/source/source.gif b/lgsl_files/icons/source/source.gif
new file mode 100644
index 0000000..8b689e7
Binary files /dev/null and b/lgsl_files/icons/source/source.gif differ
diff --git a/lgsl_files/icons/source/svencoop.gif b/lgsl_files/icons/source/svencoop.gif
new file mode 100644
index 0000000..1f4ba96
Binary files /dev/null and b/lgsl_files/icons/source/svencoop.gif differ
diff --git a/lgsl_files/icons/source/synergy.gif b/lgsl_files/icons/source/synergy.gif
new file mode 100644
index 0000000..65f5ef4
Binary files /dev/null and b/lgsl_files/icons/source/synergy.gif differ
diff --git a/lgsl_files/icons/source/tf.gif b/lgsl_files/icons/source/tf.gif
new file mode 100644
index 0000000..15ffdb8
Binary files /dev/null and b/lgsl_files/icons/source/tf.gif differ
diff --git a/lgsl_files/icons/source/zombie_master.gif b/lgsl_files/icons/source/zombie_master.gif
new file mode 100644
index 0000000..800400d
Binary files /dev/null and b/lgsl_files/icons/source/zombie_master.gif differ
diff --git a/lgsl_files/icons/source/zps.gif b/lgsl_files/icons/source/zps.gif
new file mode 100644
index 0000000..fc4bc1d
Binary files /dev/null and b/lgsl_files/icons/source/zps.gif differ
diff --git a/lgsl_files/icons/stalker/stalker.gif b/lgsl_files/icons/stalker/stalker.gif
new file mode 100644
index 0000000..7bbc745
Binary files /dev/null and b/lgsl_files/icons/stalker/stalker.gif differ
diff --git a/lgsl_files/icons/stalkercs/stalkercs.gif b/lgsl_files/icons/stalkercs/stalkercs.gif
new file mode 100644
index 0000000..3b8dd5e
Binary files /dev/null and b/lgsl_files/icons/stalkercs/stalkercs.gif differ
diff --git a/lgsl_files/icons/startrekef/startrekef.gif b/lgsl_files/icons/startrekef/startrekef.gif
new file mode 100644
index 0000000..a9d2da9
Binary files /dev/null and b/lgsl_files/icons/startrekef/startrekef.gif differ
diff --git a/lgsl_files/icons/starwarsbf/starwarsbf.gif b/lgsl_files/icons/starwarsbf/starwarsbf.gif
new file mode 100644
index 0000000..4887cd5
Binary files /dev/null and b/lgsl_files/icons/starwarsbf/starwarsbf.gif differ
diff --git a/lgsl_files/icons/starwarsbf2/starwarsbf2.gif b/lgsl_files/icons/starwarsbf2/starwarsbf2.gif
new file mode 100644
index 0000000..c0a0038
Binary files /dev/null and b/lgsl_files/icons/starwarsbf2/starwarsbf2.gif differ
diff --git a/lgsl_files/icons/starwarsrc/starwarsrc.gif b/lgsl_files/icons/starwarsrc/starwarsrc.gif
new file mode 100644
index 0000000..b3ead25
Binary files /dev/null and b/lgsl_files/icons/starwarsrc/starwarsrc.gif differ
diff --git a/lgsl_files/icons/swat4/swat4.gif b/lgsl_files/icons/swat4/swat4.gif
new file mode 100644
index 0000000..2db5099
Binary files /dev/null and b/lgsl_files/icons/swat4/swat4.gif differ
diff --git a/lgsl_files/icons/teeworlds/teeworlds.gif b/lgsl_files/icons/teeworlds/teeworlds.gif
new file mode 100644
index 0000000..fe0c47e
Binary files /dev/null and b/lgsl_files/icons/teeworlds/teeworlds.gif differ
diff --git a/lgsl_files/icons/tribes/tribes.gif b/lgsl_files/icons/tribes/tribes.gif
new file mode 100644
index 0000000..1aefe4f
Binary files /dev/null and b/lgsl_files/icons/tribes/tribes.gif differ
diff --git a/lgsl_files/icons/tribes2/tribes2.gif b/lgsl_files/icons/tribes2/tribes2.gif
new file mode 100644
index 0000000..58ec1fd
Binary files /dev/null and b/lgsl_files/icons/tribes2/tribes2.gif differ
diff --git a/lgsl_files/icons/tribesv/tribesv.gif b/lgsl_files/icons/tribesv/tribesv.gif
new file mode 100644
index 0000000..36549f9
Binary files /dev/null and b/lgsl_files/icons/tribesv/tribesv.gif differ
diff --git a/lgsl_files/icons/ts/ts.gif b/lgsl_files/icons/ts/ts.gif
new file mode 100644
index 0000000..dd43dbb
Binary files /dev/null and b/lgsl_files/icons/ts/ts.gif differ
diff --git a/lgsl_files/icons/ts3/ts3.gif b/lgsl_files/icons/ts3/ts3.gif
new file mode 100644
index 0000000..f42583d
Binary files /dev/null and b/lgsl_files/icons/ts3/ts3.gif differ
diff --git a/lgsl_files/icons/urbanterror/urbanterror.gif b/lgsl_files/icons/urbanterror/urbanterror.gif
new file mode 100644
index 0000000..5b9fade
Binary files /dev/null and b/lgsl_files/icons/urbanterror/urbanterror.gif differ
diff --git a/lgsl_files/icons/ut/ut.gif b/lgsl_files/icons/ut/ut.gif
new file mode 100644
index 0000000..a05f2e4
Binary files /dev/null and b/lgsl_files/icons/ut/ut.gif differ
diff --git a/lgsl_files/icons/ut2003/ut2003.gif b/lgsl_files/icons/ut2003/ut2003.gif
new file mode 100644
index 0000000..d9d50d9
Binary files /dev/null and b/lgsl_files/icons/ut2003/ut2003.gif differ
diff --git a/lgsl_files/icons/ut2004/killing_floor.gif b/lgsl_files/icons/ut2004/killing_floor.gif
new file mode 100644
index 0000000..52f8d7d
Binary files /dev/null and b/lgsl_files/icons/ut2004/killing_floor.gif differ
diff --git a/lgsl_files/icons/ut2004/red_orchestra.gif b/lgsl_files/icons/ut2004/red_orchestra.gif
new file mode 100644
index 0000000..949fa66
Binary files /dev/null and b/lgsl_files/icons/ut2004/red_orchestra.gif differ
diff --git a/lgsl_files/icons/ut2004/ut2004.gif b/lgsl_files/icons/ut2004/ut2004.gif
new file mode 100644
index 0000000..2ca0e26
Binary files /dev/null and b/lgsl_files/icons/ut2004/ut2004.gif differ
diff --git a/lgsl_files/icons/ut3/ut3.gif b/lgsl_files/icons/ut3/ut3.gif
new file mode 100644
index 0000000..afd3d3d
Binary files /dev/null and b/lgsl_files/icons/ut3/ut3.gif differ
diff --git a/lgsl_files/icons/vcmp/vcmp.gif b/lgsl_files/icons/vcmp/vcmp.gif
new file mode 100644
index 0000000..cee59ee
Binary files /dev/null and b/lgsl_files/icons/vcmp/vcmp.gif differ
diff --git a/lgsl_files/icons/vietcong/vietcong.gif b/lgsl_files/icons/vietcong/vietcong.gif
new file mode 100644
index 0000000..4ed35c2
Binary files /dev/null and b/lgsl_files/icons/vietcong/vietcong.gif differ
diff --git a/lgsl_files/icons/vietcong2/vietcong2.gif b/lgsl_files/icons/vietcong2/vietcong2.gif
new file mode 100644
index 0000000..eddf30e
Binary files /dev/null and b/lgsl_files/icons/vietcong2/vietcong2.gif differ
diff --git a/lgsl_files/icons/warsow/warsow.gif b/lgsl_files/icons/warsow/warsow.gif
new file mode 100644
index 0000000..6aba41b
Binary files /dev/null and b/lgsl_files/icons/warsow/warsow.gif differ
diff --git a/lgsl_files/icons/warsowold/warsowold.gif b/lgsl_files/icons/warsowold/warsowold.gif
new file mode 100644
index 0000000..6aba41b
Binary files /dev/null and b/lgsl_files/icons/warsowold/warsowold.gif differ
diff --git a/lgsl_files/icons/wolf2009/wolf2009.gif b/lgsl_files/icons/wolf2009/wolf2009.gif
new file mode 100644
index 0000000..e8ae7e6
Binary files /dev/null and b/lgsl_files/icons/wolf2009/wolf2009.gif differ
diff --git a/lgsl_files/icons/wolfet/wolfet.gif b/lgsl_files/icons/wolfet/wolfet.gif
new file mode 100644
index 0000000..98743ed
Binary files /dev/null and b/lgsl_files/icons/wolfet/wolfet.gif differ
diff --git a/lgsl_files/icons/wolfrtcw/wolfrtcw.gif b/lgsl_files/icons/wolfrtcw/wolfrtcw.gif
new file mode 100644
index 0000000..c658af0
Binary files /dev/null and b/lgsl_files/icons/wolfrtcw/wolfrtcw.gif differ
diff --git a/lgsl_files/languages/bulgarian.php b/lgsl_files/languages/bulgarian.php
new file mode 100644
index 0000000..b9ae5b2
--- /dev/null
+++ b/lgsl_files/languages/bulgarian.php
@@ -0,0 +1,60 @@
+ {$lgsl_config['text']['asd']} ";
+
+ return;
+ }
+
+//-----------------------------------------------------------------------------------------------------------+
+
+ $lgsl_type_list = lgsl_type_list();
+ unset($lgsl_type_list['test']);
+ asort($lgsl_type_list);
+
+ $type = empty($_POST['form_type']) ? "source" : trim($_POST['form_type']);
+ $ip = empty($_POST['form_ip']) ? "" : trim($_POST['form_ip']);
+ $c_port = empty($_POST['form_c_port']) ? 0 : intval(trim($_POST['form_c_port']));
+ $q_port = empty($_POST['form_q_port']) ? 0 : intval(trim($_POST['form_q_port']));
+ $s_port = 0;
+
+ if (preg_match("/(\[[0-9a-z\:]+\])/iU", $ip, $match)) { $ip = $match[1]; }
+ elseif (preg_match("/([0-9a-z\.\-]+)/i", $ip, $match)) { $ip = $match[1]; }
+ else { $ip = ""; }
+
+ if ($c_port > 65535 || $c_port < 1024) { $c_port = 0; }
+ if ($q_port > 65535 || $q_port < 1024) { $q_port = 0; }
+
+ list($c_port, $q_port, $s_port) = lgsl_port_conversion($type, $c_port, $q_port, $s_port);
+
+//-----------------------------------------------------------------------------------------------------------+
+
+ $output .= "
+ ";
+
+//-----------------------------------------------------------------------------------------------------------+
+
+ if (empty($_POST['lgsl_submit_test']) && empty($_POST['lgsl_submit_add'])) { return; }
+ if (!isset($lgsl_type_list[$type]) || !$ip || !$c_port || !$q_port) { return; }
+
+//-----------------------------------------------------------------------------------------------------------+
+
+ global $lgsl_database;
+ lgsl_database();
+
+ $ip = mysqli_real_escape_string($lgsl_database, $ip);
+ $q_port = mysqli_real_escape_string($lgsl_database, $q_port);
+ $c_port = mysqli_real_escape_string($lgsl_database, $c_port);
+ $s_port = mysqli_real_escape_string($lgsl_database, $s_port);
+ $type = mysqli_real_escape_string($lgsl_database, $type);
+
+//-----------------------------------------------------------------------------------------------------------+
+
+ $ip_check = gethostbyname($ip);
+ $mysql_result = mysqli_query($lgsl_database, "SELECT `ip`,`disabled` FROM `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` WHERE `type`='{$type}' AND `q_port`='{$q_port}'");
+
+ while ($mysql_row = mysqli_fetch_array($mysql_result, MYSQLI_ASSOC))
+ {
+ if ($ip_check == gethostbyname($mysql_row['ip']))
+ {
+ $output .= "
+ ";
+
+ if ($mysql_row['disabled'])
+ {
+ $output .= $lgsl_config['text']['aaa'];
+ }
+ else
+ {
+ $output .= $lgsl_config['text']['aan'];
+ }
+
+ $output .="
+
+
+
+
+
";
+
+ return;
+ }
+ }
+
+//-----------------------------------------------------------------------------------------------------------+
+
+ $server = lgsl_query_live($type, $ip, $c_port, $q_port, $s_port, "s");
+ $server = lgsl_server_html($server);
+
+ if (!$server['b']['status'])
+ {
+ $output .= "
+ {$lgsl_config['text']['anr']}
+
+
+
+
";
+
+ return;
+ }
+
+//-----------------------------------------------------------------------------------------------------------+
+
+ if (!empty($_POST['lgsl_submit_add']))
+ {
+ $disabled = ($lgsl_config['public_add'] == "2") ? "0" : "1";
+
+ $mysql_query = "INSERT INTO `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` (`type`,`ip`,`c_port`,`q_port`,`s_port`,`disabled`,`cache`,`cache_time`) VALUES ('{$type}','{$ip}','{$c_port}','{$q_port}','{$s_port}','{$disabled}','','')";
+ $mysql_result = mysqli_query($lgsl_database, $mysql_query) or die(mysqli_error($lgsl_database));
+
+ $output .= "
+ ";
+
+ if ($disabled)
+ {
+ $output .= $lgsl_config['text']['ada'];
+ }
+ else
+ {
+ $output .= $lgsl_config['text']['adn'];
+ }
+
+ $output .="
+
+
+
+
+
";
+
+ return;
+ }
+
+//-----------------------------------------------------------------------------------------------------------+
+
+ $output .= "
+ ";
+
+//------------------------------------------------------------------------------------------------------------+
diff --git a/lgsl_files/lgsl_admin.php b/lgsl_files/lgsl_admin.php
new file mode 100644
index 0000000..a2d5120
--- /dev/null
+++ b/lgsl_files/lgsl_admin.php
@@ -0,0 +1,520 @@
+FSOCKOPEN IS DISABLED - YOU MUST ENABLE THE FEED OPTION ".lgsl_help_info(); return;
+ }
+ else
+ {
+ $output = "FSOCKOPEN AND CURL ARE DISABLED - LGSL WILL NOT WORK ON THIS HOST
".lgsl_help_info(); return;
+ }
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ if ($_POST && get_magic_quotes_gpc()) { $_POST = lgsl_stripslashes_deep($_POST); }
+
+ if (function_exists("mysqli_set_charset"))
+ {
+ @mysqli_set_charset("utf8");
+ }
+ else
+ {
+ @mysqli_query($lgsl_database, "SET NAMES 'utf8'");
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ if (!empty($_POST['lgsl_save_1']) || !empty($_POST['lgsl_save_2']))
+ {
+ if (!empty($_POST['lgsl_save_1']))
+ {
+ // LOAD SERVER CACHE INTO MEMORY
+ $db = array();
+ $mysqli_result = mysqli_query($lgsl_database, "SELECT * FROM `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}`");
+ while($mysqli_row = mysqli_fetch_array($mysqli_result, MYSQLI_ASSOC))
+ {
+ $db["{$mysqli_row['type']}:{$mysqli_row['ip']}:{$mysqli_row['q_port']}"] = array($mysqli_row['status'], $mysqli_row['cache'], $mysqli_row['cache_time']);
+ }
+ }
+
+ // EMPTY SQL TABLE
+ $mysqli_result = mysqli_query($lgsl_database, "TRUNCATE `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}`") or die(mysqli_error($lgsl_database));
+
+ // CONVERT ADVANCED TO NORMAL DATA FORMAT
+ if (!empty($_POST['lgsl_management']))
+ {
+ $form_lines = explode("\r\n", trim($_POST['form_list']));
+
+ foreach ($form_lines as $form_key => $form_line)
+ {
+ list($_POST['form_type'] [$form_key],
+ $_POST['form_ip'] [$form_key],
+ $_POST['form_c_port'] [$form_key],
+ $_POST['form_q_port'] [$form_key],
+ $_POST['form_s_port'] [$form_key],
+ $_POST['form_zone'] [$form_key],
+ $_POST['form_disabled'][$form_key],
+ $_POST['form_comment'] [$form_key]) = explode(":", "{$form_line}:::::::");
+ }
+ }
+
+ foreach ($_POST['form_type'] as $form_key => $not_used)
+ {
+ // COMMENTS LEFT IN THEIR NATIVE ENCODING WITH JUST HTML SPECIAL CHARACTERS CONVERTED
+ $_POST['form_comment'][$form_key] = lgsl_htmlspecialchars($_POST['form_comment'][$form_key]);
+
+ $type = mysqli_real_escape_string($lgsl_database, strtolower(trim($_POST['form_type'] [$form_key])));
+ $ip = mysqli_real_escape_string($lgsl_database, trim($_POST['form_ip'] [$form_key]));
+ $c_port = mysqli_real_escape_string($lgsl_database, intval(trim($_POST['form_c_port'] [$form_key])));
+ $q_port = mysqli_real_escape_string($lgsl_database, intval(trim($_POST['form_q_port'] [$form_key])));
+ $s_port = mysqli_real_escape_string($lgsl_database, intval(trim($_POST['form_s_port'] [$form_key])));
+ $zone = mysqli_real_escape_string($lgsl_database, trim($_POST['form_zone'] [$form_key]));
+ $disabled = isset($_POST['form_disabled'][$form_key]) ? intval(trim($_POST['form_disabled'][$form_key])) : "0";
+ $comment = mysqli_real_escape_string($lgsl_database, trim($_POST['form_comment'] [$form_key]));
+
+ // CACHE INDEXED BY TYPE:IP:Q_PORT SO IF THEY CHANGE THE CACHE IS IGNORED
+ list($status, $cache, $cache_time) = isset($db["{$type}:{$ip}:{$q_port}"]) ? $db["{$type}:{$ip}:{$q_port}"] : array("0", "", "");
+
+ $status = mysqli_real_escape_string($lgsl_database, $status);
+ $cache = mysqli_real_escape_string($lgsl_database, $cache);
+ $cache_time = mysqli_real_escape_string($lgsl_database, $cache_time);
+
+ // THIS PREVENTS PORTS OR WHITESPACE BEING PUT IN THE IP WHILE ALLOWING IPv6
+ if (preg_match("/(\[[0-9a-z\:]+\])/iU", $ip, $match)) { $ip = $match[1]; }
+ elseif (preg_match("/([0-9a-z\.\-]+)/i", $ip, $match)) { $ip = $match[1]; }
+
+ list($c_port, $q_port, $s_port) = lgsl_port_conversion($type, $c_port, $q_port, $s_port);
+
+ // DISCARD SERVERS WITH AN EMPTY IP AND AUTO DISABLE SERVERS WITH SOMETHING WRONG
+ if (!$ip) { continue; }
+ elseif ($c_port < 1 || $c_port > 99999) { $disabled = 1; $c_port = 0; }
+ elseif ($q_port < 1 || $q_port > 99999) { $disabled = 1; $q_port = 0; }
+ elseif (!isset($lgsl_protocol_list[$type])) { $disabled = 1; }
+
+ $mysqli_query = "INSERT INTO `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` (`type`,`ip`,`c_port`,`q_port`,`s_port`,`zone`,`disabled`,`comment`,`status`,`cache`,`cache_time`) VALUES ('{$type}','{$ip}','{$c_port}','{$q_port}','{$s_port}','{$zone}','{$disabled}','{$comment}','{$status}','{$cache}','{$cache_time}')";
+ $mysqli_result = mysqli_query($lgsl_database, $mysqli_query) or die(mysqli_error($lgsl_database));
+ }
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ if (!empty($_POST['lgsl_check_updates']))
+ {
+
+ $context = stream_context_create(
+ array(
+ "http" => array(
+ "header" => "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"
+ )
+ )
+ );
+ $lgsl_fp = file_get_contents("https://api.github.com/repos/tltneon/lgsl/branches/master", false, $context);
+ $buffer1 = json_decode($lgsl_fp, true);
+
+ $lgsl_fp = file_get_contents("https://api.github.com/repos/tltneon/lgsl/releases/latest", false, $context);
+ $buffer2 = json_decode($lgsl_fp, true);
+
+ $output .= '
+
+
+
+
Latest commit (beta)
+
+
+
'.$buffer1["commit"]["commit"]["message"].'
+
'.date("Y-m-d H:i:s", strtotime($buffer1["commit"]["commit"]["author"]["date"])).'
+
+
+
+
+
+
Latest release (stable)
+
+
+
'.$buffer2["name"].'
+
'.date("Y-m-d H:i:s", strtotime($buffer2["published_at"])).'
+
+
+
+
+
+ ';
+
+ $output .= "
+ ";
+
+ return;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ if (!empty($_POST['lgsl_map_image_paths']))
+ {
+ $server_list = lgsl_query_cached_all("s");
+
+ foreach ($server_list as $server)
+ {
+ if (!$server['b']['status']) { continue; }
+
+ $image_map = lgsl_image_map($server['b']['status'], $server['b']['type'], $server['s']['game'], $server['s']['map'], FALSE);
+
+ $output .= "
+ ";
+ }
+
+ $output .= "
+ ";
+
+ return;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ if (!empty($_POST['lgsl_backup']))
+ {
+ $mysqli_result = mysqli_query($lgsl_database, "SELECT * FROM `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` ORDER BY `id` ASC");
+ $content = "";
+ while($mysqli_row = mysqli_fetch_array($mysqli_result, MYSQLI_ASSOC))
+ {
+ $content .= $mysqli_row['ip'] . ':' . $mysqli_row['c_port'] . "\r\n";
+ }
+ $fp = fopen("lgslBackup.txt", "wb");
+ fwrite($fp,$content);
+ fclose($fp);
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ if ((!empty($_POST['lgsl_management']) && empty($_POST['lgsl_switch'])) || (empty($_POST['lgsl_management']) && !empty($_POST['lgsl_switch'])) || (!isset($_POST['lgsl_management']) && $lgsl_config['management']))
+ {
+ $output .= "
+ ";
+
+ $output .= lgsl_help_info();
+
+ return $output;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ $output .= "
+
+
+ ";
+
+ $output .= lgsl_help_info();
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_help_info()
+ {
+ global $lgsl_config;
+ return "
+
+
+
[ LGSL ONLINE WIKI ] [ LGSL GITHUB ]
+ - To remove a server, delete the IP, then click Save.
+ - Leave the query port blank to have LGSL try to fill it in for you.
+ - Software port is only needed for a few games so it being set 0 is normal.
+ - Edit the lgsl_config.php to set the style and other options.
+
+
+ FSOCKOPEN
+ {$lgsl_config['text']['enb']}: ".(function_exists("fsockopen") ? $lgsl_config['text']['yes'] : $lgsl_config['text']['nno'])."
+ ( Required for direct querying of servers )
+
+
+ CURL
+ {$lgsl_config['text']['enb']}: ".((function_exists("curl_init") && function_exists("curl_setopt") && function_exists("curl_exec")) ? $lgsl_config['text']['yes'] : $lgsl_config['text']['nno'])."
+ ( Used for the feed when fsockopen is disabled )
+
+
+ MBSTRING
+ {$lgsl_config['text']['enb']}: ".(function_exists("mb_convert_encoding") ? $lgsl_config['text']['yes'] : $lgsl_config['text']['nno'])."
+ ( Used to show UTF-8 server and player names correctly )
+
+
+ BZIP2
+ {$lgsl_config['text']['enb']}: ".(function_exists("bzdecompress") ? $lgsl_config['text']['yes'] : $lgsl_config['text']['nno'])."
+ ( Used to show Source server settings over a certain size )
+
+
+ GD2
+ {$lgsl_config['text']['enb']}: ".(function_exists("gd2") ? $lgsl_config['text']['yes'] : $lgsl_config['text']['nno'])."
+ ( Required for Image Mod )
+
+
+ ZLIB
+ {$lgsl_config['text']['enb']}: ".(function_exists("gzuncompress") ? $lgsl_config['text']['yes'] : $lgsl_config['text']['nno'])."
+ ( Required for America's Army 3 )
+
+
+
+
+
";
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_stripslashes_deep($value)
+ {
+ $value = is_array($value) ? array_map('lgsl_stripslashes_deep', $value) : stripslashes($value);
+ return $value;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_htmlspecialchars($string)
+ {
+ // PHP4 COMPATIBLE WAY OF CONVERTING SPECIAL CHARACTERS WITHOUT DOUBLE ENCODING EXISTING ENTITIES
+ $string = str_replace("\x05\x06", "", $string);
+ $string = preg_replace("/&([a-z\d]{2,7}|#\d{2,5});/i", "\x05\x06$1", $string);
+ $string = htmlspecialchars($string, ENT_QUOTES);
+ $string = str_replace("\x05\x06", "&", $string);
+
+ return $string;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
diff --git a/lgsl_files/lgsl_class.php b/lgsl_files/lgsl_class.php
new file mode 100644
index 0000000..f00f17c
--- /dev/null
+++ b/lgsl_files/lgsl_class.php
@@ -0,0 +1,1074 @@
+"?s={$s}")) : e107::url('lgsl', 'index');
+ break;
+
+ case "joomla":
+ $link = $s ? JRoute::_("index.php?option=com_lgsl&s={$s}") : JRoute::_("index.php?option=com_lgsl");
+ break;
+
+ case "drupal":
+ $link = $s ? url("LGSL/{$s}") : url("LGSL");
+ break;
+
+ case "phpnuke":
+ $link = $s ? "modules.php?name=LGSL&s={$s}" : "modules.php?name=LGSL";
+ break;
+
+ default: // "sa"
+ $link = $s ? $lgsl_url_path."../{$index}?s={$s}" : $lgsl_url_path."../{$index}";
+ break;
+ }
+
+ return $link;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_database()
+ {
+ global $lgsl_database, $lgsl_config, $lgsl_file_path;
+
+ if (!isset($lgsl_config['db']['prefix']))
+ {
+ $lgsl_config['db']['prefix'] = "";
+ }
+
+ if (!$lgsl_config['db']['pass'])
+ {
+ switch($lgsl_config['cms'])
+ {
+ case "e107":
+ @include "{$lgsl_file_path}../../../e107_config.php";
+ $lgsl_config['db']['server'] = $mySQLserver;
+ $lgsl_config['db']['user'] = $mySQLuser;
+ $lgsl_config['db']['pass'] = $mySQLpassword;
+ $lgsl_config['db']['db'] = $mySQLdefaultdb;
+ $lgsl_config['db']['prefix'] = $mySQLprefix;
+ break;
+
+ case "joomla":
+ @include_once "{$lgsl_file_path}../../../configuration.php";
+ $joomla_config = new JConfig();
+ $lgsl_config['db']['server'] = $joomla_config->host;
+ $lgsl_config['db']['user'] = $joomla_config->user;
+ $lgsl_config['db']['pass'] = $joomla_config->password;
+ $lgsl_config['db']['db'] = $joomla_config->db;
+ $lgsl_config['db']['prefix'] = $joomla_config->dbprefix;
+ break;
+
+ case "drupal":
+ global $db_url, $db_prefix;
+ if (empty($db_url)) { @include "{$lgsl_file_path}../../../sites/default/settings.php"; }
+ $drupal_config = is_array($db_url) ? parse_url($db_url['default']) : parse_url($db_url);
+ $lgsl_config['db']['server'] = $drupal_config['host'];
+ $lgsl_config['db']['user'] = $drupal_config['user'];
+ $lgsl_config['db']['pass'] = isset($drupal_config['pass']) ? $drupal_config['pass'] : "";
+ $lgsl_config['db']['db'] = substr($drupal_config['path'], 1);
+ $lgsl_config['db']['prefix'] = isset($db_prefix['default']) ? $db_prefix['default'] : "";
+ break;
+
+ case "phpnuke":
+ @include "{$lgsl_file_path}../../../config.php";
+ @include "{$lgsl_file_path}../../../conf.inc.php";
+ @include "{$lgsl_file_path}../../../includes/config.php";
+ $lgsl_config['db']['server'] = $dbhost;
+ $lgsl_config['db']['user'] = $dbuname;
+ $lgsl_config['db']['pass'] = $dbpass;
+ $lgsl_config['db']['db'] = $dbname;
+ $lgsl_config['db']['prefix'] = $prefix."_";
+ break;
+ }
+ }
+
+ $lgsl_database = mysqli_connect($lgsl_config['db']['server'], $lgsl_config['db']['user'], $lgsl_config['db']['pass']) or die(mysqli_error($lgsl_database));
+ $lgsl_select_db = mysqli_select_db($lgsl_database, $lgsl_config['db']['db']) or die(mysqli_error($lgsl_database));
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_cached($type, $ip, $c_port, $q_port, $s_port, $request, $id = NULL)
+ {
+ global $lgsl_config, $lgsl_database;
+
+ lgsl_database();
+
+ // LOOKUP SERVER
+
+ if ($id != NULL)
+ {
+ $id = intval($id);
+ $mysqli_query = "SELECT * FROM `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` WHERE `id`='{$id}' LIMIT 1";
+ $mysqli_result = mysqli_query($lgsl_database, $mysqli_query) or die(mysqli_error($lgsl_database));
+ $mysqli_row = mysqli_fetch_array($mysqli_result, MYSQLI_ASSOC);
+ if (!$mysqli_row) { return FALSE; }
+ list($type, $ip, $c_port, $q_port, $s_port) = array($mysqli_row['type'], $mysqli_row['ip'], $mysqli_row['c_port'], $mysqli_row['q_port'], $mysqli_row['s_port']);
+ }
+ else
+ {
+ list($type, $ip, $c_port, $q_port, $s_port) = array(mysqli_real_escape_string($lgsl_database, $type), mysqli_real_escape_string($lgsl_database, $ip), intval($c_port), intval($q_port), intval($s_port));
+
+ if (!$type || !$ip || !$c_port || !$q_port) { exit("LGSL PROBLEM: INVALID SERVER '{$type} : {$ip} : {$c_port} : {$q_port} : {$s_port}'"); }
+ $mysqli_query = "SELECT * FROM `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` WHERE `type`='{$type}' AND `ip`='{$ip}' AND `q_port`='{$q_port}' LIMIT 1";
+ $mysqli_result = mysqli_query($lgsl_database, $mysqli_query) or die(mysqli_error($lgsl_database));
+ $mysqli_row = mysqli_fetch_array($mysqli_result, MYSQLI_ASSOC);
+
+ if (!$mysqli_row)
+ {
+ if (strpos($request, "a") === FALSE) { exit("LGSL PROBLEM: SERVER NOT IN DATABASE '{$type} : {$ip} : {$c_port} : {$q_port} : {$s_port}'"); }
+ $mysqli_query = "INSERT INTO `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` (`type`,`ip`,`c_port`,`q_port`,`s_port`,`cache`,`cache_time`) VALUES ('{$type}','{$ip}','{$c_port}','{$q_port}','{$s_port}','','')";
+ $mysqli_result = mysqli_query($lgsl_database, $mysqli_query) or die(mysqli_error($lgsl_database));
+ $mysqli_row = array("id"=>mysqli_insert_id(), "zone"=>"0", "comment"=>"");
+ }
+ }
+
+ // UNPACK CACHE AND CACHE TIMES
+
+ $cache = empty($mysqli_row['cache']) ? array() : unserialize(base64_decode($mysqli_row['cache']));
+ $cache_time = empty($mysqli_row['cache_time']) ? array(0,0,0) : explode("_", $mysqli_row['cache_time']);
+
+ // SET THE SERVER AS OFFLINE AND PENDING WHEN THERE IS NO CACHE
+
+ if (empty($cache['b']) || !is_array($cache))
+ {
+ $cache = array();
+ $cache['b'] = array();
+ $cache['b']['status'] = 0;
+ $cache['b']['pending'] = 1;
+ }
+
+ // CONVERT HOSTNAME TO IP WHEN NEEDED
+
+ if ($lgsl_config['host_to_ip'])
+ {
+ $ip = gethostbyname($ip);
+ }
+
+ // UPDATE CACHE WITH FIXED VALUES
+
+ $cache['b']['type'] = $type;
+ $cache['b']['ip'] = $ip;
+ $cache['b']['c_port'] = $c_port;
+ $cache['b']['q_port'] = $q_port;
+ $cache['b']['s_port'] = $s_port;
+ $cache['o']['request'] = $request;
+ $cache['o']['id'] = $mysqli_row['id'];
+ $cache['o']['zone'] = $mysqli_row['zone'];
+ $cache['o']['comment'] = $mysqli_row['comment'];
+
+ // UPDATE CACHE WITH LOCATION
+
+ if (empty($cache['o']['location']))
+ {
+ $cache['o']['location'] = $lgsl_config['locations'] ? lgsl_query_location($ip) : "";
+ }
+
+ // UPDATE CACHE WITH DEFAULT OFFLINE VALUES
+
+ if (!isset($cache['s']))
+ {
+ $cache['s'] = array();
+ $cache['s']['game'] = $type;
+ $cache['s']['name'] = $lgsl_config['text']['nnm'];
+ $cache['s']['map'] = $lgsl_config['text']['nmp'];
+ $cache['s']['players'] = 0;
+ $cache['s']['playersmax'] = 0;
+ $cache['s']['password'] = 0;
+ }
+
+ if (!isset($cache['e'])) { $cache['e'] = array(); }
+ if (!isset($cache['p'])) { $cache['p'] = array(); }
+
+ // CHECK AND GET THE NEEDED DATA
+
+ $needed = "";
+
+ if (strpos($request, "c") === FALSE) // CACHE ONLY REQUEST
+ {
+ if (strpos($request, "s") !== FALSE && time() > ($cache_time[0]+$lgsl_config['cache_time'])) { $needed .= "s"; }
+ if (strpos($request, "e") !== FALSE && time() > ($cache_time[1]+$lgsl_config['cache_time'])) { $needed .= "e"; }
+ if (strpos($request, "p") !== FALSE && time() > ($cache_time[2]+$lgsl_config['cache_time'])) { $needed .= "p"; }
+ }
+
+ if ($needed)
+ {
+ // UPDATE CACHE TIMES BEFORE QUERY - PREVENTS OTHER INSTANCES FROM QUERY FLOODING THE SAME SERVER
+
+ $packed_times = time() + $lgsl_config['cache_time'] + 10;
+ $packed_times = "{$packed_times}_{$packed_times}_{$packed_times}";
+ $mysqli_query = "UPDATE `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` SET `cache_time`='{$packed_times}' WHERE `id`='{$mysqli_row['id']}' LIMIT 1";
+ $mysqli_result = mysqli_query($lgsl_database, $mysqli_query) or die(mysqli_error($lgsl_database));
+
+ // GET WHAT IS NEEDED
+
+ $live = lgsl_query_live($type, $ip, $c_port, $q_port, $s_port, $needed);
+
+ if (!$live['b']['status'] && $lgsl_config['retry_offline'] && !$lgsl_config['feed']['method'])
+ {
+ $live = lgsl_query_live($type, $ip, $c_port, $q_port, $s_port, $needed);
+ }
+
+ // CHECK AND CONVERT TO UTF-8 WHERE NEEDED
+
+ $live = lgsl_charset_convert($live, lgsl_charset_detect($live));
+
+ // IF SERVER IS OFFLINE PRESERVE SOME OF THE CACHE AND CLEAR THE REST
+
+ if (!$live['b']['status'])
+ {
+ $live['s']['game'] = $cache['s']['game'];
+ $live['s']['name'] = $cache['s']['name'];
+ $live['s']['map'] = $cache['s']['map'];
+ $live['s']['password'] = $cache['s']['password'];
+ $live['s']['players'] = 0;
+ $live['s']['playersmax'] = $cache['s']['playersmax'];
+ $live['e'] = array();
+ $live['p'] = array();
+ }
+
+ // MERGE LIVE INTO CACHE
+
+ if (isset($live['b'])) { $cache['b'] = $live['b']; $cache['b']['pending'] = 0; }
+ if (isset($live['s'])) { $cache['s'] = $live['s']; $cache_time[0] = time(); }
+ if (isset($live['e'])) { $cache['e'] = $live['e']; $cache_time[1] = time(); }
+ if (isset($live['p'])) { $cache['p'] = $live['p']; $cache_time[2] = time(); }
+
+ // UPDATE CACHE
+
+ $packed_cache = mysqli_real_escape_string($lgsl_database, base64_encode(serialize($cache)));
+ $packed_times = mysqli_real_escape_string($lgsl_database, implode("_", $cache_time));
+ $mysqli_query = "UPDATE `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` SET `status`='{$cache['b']['status']}',`cache`='{$packed_cache}',`cache_time`='{$packed_times}' WHERE `id`='{$mysqli_row['id']}' LIMIT 1";
+ $mysqli_result = mysqli_query($lgsl_database, $mysqli_query) or die(mysqli_error($lgsl_database));
+ }
+
+ // RETURN ONLY THE REQUESTED
+
+ if (strpos($request, "s") === FALSE) { unset($cache['s']); }
+ if (strpos($request, "e") === FALSE) { unset($cache['e']); }
+ if (strpos($request, "p") === FALSE) { unset($cache['p']); }
+
+ return $cache;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//EXAMPLE USAGE: lgsl_query_group( array("request"=>"sep", "hide_offline"=>0, "random"=>0, "type"=>"source", "game"=>"cstrike") )
+
+ function lgsl_query_group($options = array())
+ {
+ if (!is_array($options)) { exit("LGSL PROBLEM: lgsl_query_group OPTIONS MUST BE ARRAY"); }
+
+ global $lgsl_config, $lgsl_database;
+
+ lgsl_database();
+
+ $request = isset($options['request']) ? $options['request'] : "s";
+ $zone = isset($options['zone']) ? intval($options['zone']) : 0;
+ $hide_offline = isset($options['hide_offline']) ? intval($options['hide_offline']) : intval($lgsl_config['hide_offline'][$zone]);
+ $random = isset($options['random']) ? intval($options['random']) : intval($lgsl_config['random'][$zone]);
+ $type = empty($options['type']) ? "" : preg_replace("/[^a-z0-9_]/", "_", strtolower($options['type']));
+ $game = empty($options['game']) ? "" : preg_replace("/[^a-z0-9_]/", "_", strtolower($options['game']));
+ $mysqli_order = empty($random) ? "`cache_time` ASC" : "rand()";
+ $server_limit = empty($random) ? 0 : $random;
+
+ $mysqli_where = array("`disabled`=0");
+ if ($zone != 0) { $mysqli_where[] = "FIND_IN_SET('{$zone}',`zone`)"; }
+ if ($type != "") { $mysqli_where[] = "`type`='{$type}'"; }
+
+ $mysqli_query = "SELECT `id` FROM `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` WHERE ".implode(" AND ", $mysqli_where)." ORDER BY {$mysqli_order}";
+ $mysqli_result = mysqli_query($lgsl_database, $mysqli_query) or die(mysqli_error($lgsl_database));
+ $server_list = array();
+
+ while ($mysqli_row = mysqli_fetch_array($mysqli_result, MYSQLI_ASSOC))
+ {
+ if (strpos($request, "c") === FALSE && lgsl_timer("check")) { $request .= "c"; }
+
+ $server = lgsl_query_cached("", "", "", "", "", $request, $mysqli_row['id']);
+
+ if ($hide_offline && empty($server['b']['status'])) { continue; }
+ if ($game && $game != preg_replace("/[^a-z0-9_]/", "_", strtolower($server['s']['game']))) { continue; }
+
+ $server_list[] = $server;
+
+ if ($server_limit && count($server_list) >= $server_limit) { break; }
+ }
+
+ return $server_list;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_group_totals($server_list = FALSE)
+ {
+ if (!is_array($server_list)) { $server_list = lgsl_query_group( array( "request"=>"sc" ) ); }
+
+ $total = array("players"=>0, "playersmax"=>0, "servers"=>0, "servers_online"=>0, "servers_offline"=>0);
+
+ foreach ($server_list as $server)
+ {
+ $total['players'] += $server['s']['players'];
+ $total['playersmax'] += $server['s']['playersmax'];
+
+ $total['servers'] ++;
+ if ($server['b']['status']) { $total['servers_online'] ++; }
+ else { $total['servers_offline'] ++; }
+ }
+
+ return $total;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_cached_all($request) // LEGACY - DO NOT USE
+ {
+ return lgsl_query_group( array( "request"=>$request ) );
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_cached_zone($request, $zone) // LEGACY - DO NOT USE
+ {
+ return lgsl_query_group( array( "request"=>$request, "zone"=>$zone ) );
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_cached_totals() // LEGACY - DO NOT USE
+ {
+ return lgsl_group_totals();
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_lookup_id($id) // LEGACY - DO NOT USE
+ {
+ global $lgsl_config, $lgsl_database;
+
+ lgsl_database();
+
+ $id = mysqli_real_escape_string($lgsl_database, intval($id));
+ $mysqli_query = "SELECT `type`,`ip`,`c_port`,`q_port`,`s_port` FROM `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` WHERE `id`='{$id}' LIMIT 1";
+ $mysqli_result = mysqli_query($lgsl_database, $mysqli_query) or die(mysqli_error($lgsl_database));
+ $mysqli_row = mysqli_fetch_array($mysqli_result, MYSQLI_ASSOC);
+
+ return $mysqli_row;
+ }
+
+ function lgsl_lookup_server($ip, $port) // LEGACY - DO NOT USE
+ {
+ global $lgsl_config, $lgsl_database;
+
+ lgsl_database();
+
+ $ip = mysqli_real_escape_string($lgsl_database, $ip);
+ $port = mysqli_real_escape_string($lgsl_database, intval($port));
+ $mysqli_query = "SELECT `id` FROM `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` WHERE `ip`='{$ip}' AND `c_port`='{$port}' LIMIT 1";
+ $mysqli_result = mysqli_query($lgsl_database, $mysqli_query) or die(mysqli_error($lgsl_database));
+ $mysqli_row = mysqli_fetch_array($mysqli_result, MYSQLI_ASSOC);
+
+ return $mysqli_row['id'];
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_timer($action)
+ {
+ global $lgsl_config;
+ global $lgsl_timer;
+
+ if (!$lgsl_timer)
+ {
+ $microtime = microtime();
+ $microtime = explode(' ', $microtime);
+ $microtime = $microtime[1] + $microtime[0];
+ $lgsl_timer = $microtime - 0.01;
+ }
+
+ $time_limit = intval($lgsl_config['live_time']);
+ $time_php = ini_get("max_execution_time");
+
+ if ($time_limit > $time_php)
+ {
+ @set_time_limit($time_limit + 5);
+
+ $time_php = ini_get("max_execution_time");
+
+ if ($time_limit > $time_php)
+ {
+ $time_limit = $time_php - 5;
+ }
+ }
+
+ if ($action == "limit")
+ {
+ return $time_limit;
+ }
+
+ $microtime = microtime();
+ $microtime = explode(' ', $microtime);
+ $microtime = $microtime[1] + $microtime[0];
+ $time_taken = $microtime - $lgsl_timer;
+
+ if ($action == "check")
+ {
+ return ($time_taken > $time_limit) ? TRUE : FALSE;
+ }
+ else
+ {
+ return round($time_taken, 2);
+ }
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_server_misc($server)
+ {
+ global $lgsl_url_path;
+
+ $misc['icon_details'] = $lgsl_url_path."other/icon_details.gif";
+ $misc['icon_game'] = lgsl_icon_game($server['b']['type'], $server['s']['game']);
+ $misc['icon_status'] = lgsl_icon_status($server['b']['status'], $server['s']['password'], $server['b']['pending']);
+ $misc['icon_location'] = lgsl_icon_location($server['o']['location']);
+ $misc['image_map'] = lgsl_image_map($server['b']['status'], $server['b']['type'], $server['s']['game'], $server['s']['map'], TRUE, $server['o']['id']);
+ $misc['image_map_password'] = lgsl_image_map_password($server['b']['status'], $server['s']['password']);
+ $misc['text_status'] = lgsl_text_status($server['b']['status'], $server['s']['password'], $server['b']['pending']);
+ $misc['text_type_game'] = lgsl_text_type_game($server['b']['type'], $server['s']['game']);
+ $misc['text_location'] = lgsl_text_location($server['o']['location']);
+ $misc['name_filtered'] = lgsl_string_html($server['s']['name'], FALSE, 20); // LEGACY
+ $misc['software_link'] = lgsl_software_link($server['b']['type'], $server['b']['ip'], $server['b']['c_port'], $server['b']['q_port'], $server['b']['s_port']);
+ $misc['location_link'] = lgsl_location_link($server['o']['location']);
+
+ return $misc;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_icon_game($type, $game)
+ {
+ global $lgsl_file_path, $lgsl_url_path;
+
+ $type = preg_replace("/[^a-z0-9_]/", "_", strtolower($type));
+ $game = preg_replace("/[^a-z0-9_]/", "_", strtolower($game));
+
+ $path_list = array(
+ "icons/{$type}/{$game}.gif",
+ "icons/{$type}/{$game}.png",
+ "icons/{$type}/{$type}.gif",
+ "icons/{$type}/{$type}.png");
+
+ foreach ($path_list as $path)
+ {
+ if (file_exists($lgsl_file_path.$path)) { return $lgsl_url_path.$path; }
+ }
+
+ return "{$lgsl_url_path}other/icon_unknown.gif";
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_icon_status($status, $password, $pending = 0)
+ {
+ global $lgsl_url_path;
+
+ if ($pending) { return "{$lgsl_url_path}other/icon_unknown.gif"; }
+ if (!$status) { return "{$lgsl_url_path}other/icon_no_response.gif"; }
+ if ($password) { return "{$lgsl_url_path}other/icon_online_password.gif"; }
+
+ return "{$lgsl_url_path}other/icon_online.gif";
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_icon_location($location)
+ {
+ global $lgsl_config, $lgsl_file_path, $lgsl_url_path;
+
+ if (!$location || !$lgsl_config["locations"]) { return "{$lgsl_url_path}locations/OFF.png"; }
+
+ if ($location)
+ {
+ $location = "locations/".strtoupper(preg_replace("/[^a-zA-Z0-9_]/", "_", $location)).".png";
+
+ if (file_exists($lgsl_file_path.$location)) { return $lgsl_url_path.$location; }
+ }
+
+ return "{$lgsl_url_path}locations/XX.png";
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_image_map($status, $type, $game, $map, $check_exists = TRUE, $id = 0)
+ {
+ global $lgsl_file_path, $lgsl_url_path;
+
+ $type = preg_replace("/[^a-z0-9_]/", "_", strtolower($type));
+ $game = preg_replace("/[^a-z0-9_]/", "_", strtolower($game));
+ $map = preg_replace("/[^a-z0-9_]/", "_", strtolower($map));
+
+ if ($check_exists !== TRUE) { return "{$lgsl_url_path}maps/{$type}/{$game}/{$map}.jpg"; }
+
+ if ($status)
+ {
+ $path_list = array(
+ "maps/{$type}/{$game}/{$map}.jpg",
+ "maps/{$type}/{$game}/{$map}.gif",
+ "maps/{$type}/{$game}/{$map}.png",
+ "maps/{$type}/{$map}.jpg",
+ "maps/{$type}/{$map}.gif",
+ "maps/{$type}/{$map}.png",
+ "maps/{$type}/map_no_image.jpg",
+ "maps/{$type}/map_no_image.gif",
+ "maps/{$type}/map_no_image.png",
+ "other/map_no_image_{$id}.jpg",
+ "other/map_no_image_{$id}.gif",
+ "other/map_no_image_{$id}.png",
+ "other/map_no_image.jpg");
+ }
+ else
+ {
+ $path_list = array(
+ "maps/{$type}/map_no_response.jpg",
+ "maps/{$type}/map_no_response.gif",
+ "maps/{$type}/map_no_response.png",
+ "other/map_no_response_{$id}.jpg",
+ "other/map_no_response_{$id}.gif",
+ "other/map_no_response_{$id}.png",
+ "other/map_no_response.jpg");
+ }
+
+ foreach ($path_list as $path)
+ {
+ if (file_exists($lgsl_file_path.$path)) { return "{$lgsl_url_path}{$path}"; }
+ }
+
+ return "#LGSL_DEFAULT_IMAGES_MISSING#";
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_image_map_password($status, $password)
+ {
+ global $lgsl_url_path;
+
+ if (!$password || !$status) { return "{$lgsl_url_path}other/map_overlay.gif"; }
+
+ return "{$lgsl_url_path}other/map_overlay_password.gif";
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_text_status($status, $password, $pending = 0)
+ {
+ if ($pending) { return 'pen'; }
+ if (!$status) { return 'nrs'; }
+ if ($password) { return 'onp'; }
+
+ return 'onl';
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_text_type_game($type, $game)
+ {
+ global $lgsl_config;
+
+ return "[ {$lgsl_config['text']['typ']}: {$type} ] [ {$lgsl_config['text']['gme']}: {$game} ]";
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_text_location($location)
+ {
+ global $lgsl_config;
+
+ return $location ? "{$lgsl_config['text']['loc']} {$location}" : "";
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_sort_servers($server_list)
+ {
+ global $lgsl_config;
+
+ if (!is_array($server_list)) { return $server_list; }
+
+ if ($lgsl_config['sort']['servers'] == "id") { usort($server_list, "lgsl_sort_servers_by_id"); }
+ elseif ($lgsl_config['sort']['servers'] == "zone") { usort($server_list, "lgsl_sort_servers_by_zone"); }
+ elseif ($lgsl_config['sort']['servers'] == "type") { usort($server_list, "lgsl_sort_servers_by_type"); }
+ elseif ($lgsl_config['sort']['servers'] == "status") { usort($server_list, "lgsl_sort_servers_by_status"); }
+ elseif ($lgsl_config['sort']['servers'] == "players") { usort($server_list, "lgsl_sort_servers_by_players"); }
+
+ return $server_list;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_sort_fields($server, $fields_show, $fields_hide, $fields_other)
+ {
+ $fields_list = array();
+
+ if (!is_array($server['p'])) { return $fields_list; }
+
+ foreach ($server['p'] as $player)
+ {
+ foreach ($player as $field => $value)
+ {
+ if ($value === "") { continue; }
+ if (in_array($field, $fields_list)) { continue; }
+ if (in_array($field, $fields_hide)) { continue; }
+ $fields_list[] = $field;
+ }
+ }
+
+ $fields_show = array_intersect($fields_show, $fields_list);
+
+ if ($fields_other == FALSE) { return $fields_show; }
+
+ $fields_list = array_diff($fields_list, $fields_show);
+
+ return array_merge($fields_show, $fields_list);
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_sort_servers_by_id($server_a, $server_b)
+ {
+ if ($server_a['o']['id'] == $server_b['o']['id']) { return 0; }
+
+ return ($server_a['o']['id'] > $server_b['o']['id']) ? 1 : -1;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_sort_servers_by_zone($server_a, $server_b)
+ {
+ if ($server_a['o']['zone'] == $server_b['o']['zone']) { return 0; }
+
+ return ($server_a['o']['zone'] > $server_b['o']['zone']) ? 1 : -1;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_sort_servers_by_type($server_a, $server_b)
+ {
+ $result = strcasecmp($server_a['b']['type'], $server_b['b']['type']);
+
+ if ($result == 0)
+ {
+ $result = strcasecmp($server_a['s']['game'], $server_b['s']['game']);
+ }
+
+ return $result;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_sort_servers_by_status($server_a, $server_b)
+ {
+ if ($server_a['b']['status'] == $server_b['b']['status']) { return 0; }
+
+ return ($server_a['b']['status'] < $server_b['b']['status']) ? 1 : -1;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_sort_servers_by_players($server_a, $server_b)
+ {
+ if ($server_a['s']['players'] == $server_b['s']['players'])
+ if ($server_a['b']['status'] < $server_b['b']['status'])
+ { return 1; }
+ else
+ { return 0; }
+
+ return ($server_a['s']['players'] < $server_b['s']['players']) ? 1 : -1;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_sort_extras($server)
+ {
+ if (!is_array($server['e'])) { return $server; }
+
+ ksort($server['e']);
+
+ return $server;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_sort_players($server)
+ {
+ global $lgsl_config;
+
+ if (!is_array($server['p'])) { return $server; }
+
+ if ($lgsl_config['sort']['players'] == "name") { usort($server['p'], "lgsl_sort_players_by_name"); }
+ elseif ($lgsl_config['sort']['players'] == "score") { usort($server['p'], "lgsl_sort_players_by_score"); }
+ elseif ($lgsl_config['sort']['players'] == "time") { usort($server['p'], "lgsl_sort_players_by_time"); }
+
+ return $server;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_sort_players_by_score($player_a, $player_b)
+ {
+ if ($player_a['score'] == $player_b['score']) { return 0; }
+
+ return ($player_a['score'] < $player_b['score']) ? 1 : -1;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_sort_players_by_time($player_a, $player_b)
+ {
+ if ($player_a['time'] == $player_b['time']) { return 0; }
+
+ return ($player_a['time'] < $player_b['time']) ? 1 : -1;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_sort_players_by_name($player_a, $player_b)
+ {
+ // REMOVE NON ALPHA NUMERIC ASCII WHILE LEAVING UPPER UTF-8 CHARACTERS
+ $name_a = preg_replace("/[\x{00}-\x{2F}\x{3A}-\x{40}\x{5B}-\x{60}\x{7B}-\x{7F}]/", "", $player_a['name']);
+ $name_b = preg_replace("/[\x{00}-\x{2F}\x{3A}-\x{40}\x{5B}-\x{60}\x{7B}-\x{7F}]/", "", $player_b['name']);
+
+ if (function_exists("mb_convert_case"))
+ {
+ $name_a = @mb_convert_case($name_a, MB_CASE_LOWER, "UTF-8");
+ $name_b = @mb_convert_case($name_b, MB_CASE_LOWER, "UTF-8");
+ return strcmp($name_a, $name_b);
+ }
+ else
+ {
+ return strcasecmp($name_a, $name_b);
+ }
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_charset_detect($server)
+ {
+ if (!function_exists("mb_detect_encoding")) { return "AUTO"; }
+
+ $test = "";
+
+ if (isset($server['s']['name'])) { $test .= " {$server['s']['name']} "; }
+
+ if (isset($server['p']) && $server['p'])
+ {
+ foreach ($server['p'] as $player)
+ {
+ if (isset($player['name'])) { $test .= " {$player['name']} "; }
+ }
+ }
+
+ $charset = @mb_detect_encoding($server['s']['name'], "UTF-8, Windows-1252, ISO-8859-1, ISO-8859-15");
+
+ return $charset ? $charset : "AUTO";
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_charset_convert($server, $charset)
+ {
+ if (!function_exists("mb_convert_encoding")) { return $server; }
+
+ if (is_array($server))
+ {
+ foreach ($server as $key => $value)
+ {
+ $server[$key] = lgsl_charset_convert($value, $charset);
+ }
+ }
+ else
+ {
+ $server = @mb_convert_encoding($server, "UTF-8", $charset);
+ }
+
+ return $server;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_server_html($server, $word_wrap = 20)
+ {
+ foreach ($server as $key => $value)
+ {
+ $server[$key] = is_array($value) ? lgsl_server_html($value, $word_wrap) : lgsl_string_html($value, FALSE, $word_wrap);
+ }
+
+ return $server;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_string_html($string, $xml_feed = FALSE, $word_wrap = 0)
+ {
+ if ($word_wrap) { $string = lgsl_word_wrap($string, $word_wrap); }
+
+ if ($xml_feed != FALSE)
+ {
+ $string = htmlspecialchars($string, ENT_QUOTES);
+ }
+ elseif (function_exists("mb_convert_encoding"))
+ {
+ $string = htmlspecialchars($string, ENT_QUOTES);
+ $string = @mb_convert_encoding($string, "HTML-ENTITIES", "UTF-8");
+ }
+ else
+ {
+ $string = htmlentities($string, ENT_QUOTES, "UTF-8");
+ }
+
+ if ($word_wrap) { $string = lgsl_word_wrap($string); }
+
+ return $string;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_word_wrap($string, $length_limit = 0)
+ {
+ if (!$length_limit)
+ {
+// http://www.quirksmode.org/oddsandends/wbr.html
+// return str_replace("\x05\x06", " ", $string); // VISIBLE
+// return str_replace("\x05\x06", "", $string); // FF2 VISIBLE AND DIV NEEDED
+ return str_replace("\x05\x06", "", $string); // IE6 VISIBLE
+ }
+
+ $word_list = explode(" ", $string);
+
+ foreach ($word_list as $key => $word)
+ {
+ $word_length = function_exists("mb_strlen") ? mb_strlen($word, "UTF-8") : strlen($word);
+
+ if ($word_length < $length_limit) { continue; }
+
+ $word_new = "";
+
+ for ($i=0; $i<$word_length; $i+=$length_limit)
+ {
+ $word_new .= function_exists("mb_substr") ? mb_substr($word, $i, $length_limit, "UTF-8") : substr($word, $i, $length_limit);
+ $word_new .= "\x05\x06";
+ }
+
+ $word_list[$key] = $word_new;
+ }
+
+ return implode(" ", $word_list);
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_location_link($location)
+ {
+ if (!$location) { return "#"; }
+
+ return "https://www.google.com/maps/search/{$location}/";
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_location($ip)
+ {
+ global $lgsl_config;
+
+ if ($lgsl_config['locations'] !== 1 && $lgsl_config['locations'] !== true) { return $lgsl_config['locations']; }
+
+ $ip = gethostbyname($ip);
+
+ if (long2ip(ip2long($ip)) == "255.255.255.255") { return "XX"; }
+
+ $url = "http://api.wipmania.com/".urlencode($ip)."?".urlencode($_SERVER['HTTP_HOST']);
+
+ if (function_exists('curl_init') && function_exists('curl_setopt') && function_exists('curl_exec'))
+ {
+ $lgsl_curl = curl_init();
+
+ curl_setopt($lgsl_curl, CURLOPT_HEADER, 0);
+ curl_setopt($lgsl_curl, CURLOPT_TIMEOUT, 2);
+ curl_setopt($lgsl_curl, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($lgsl_curl, CURLOPT_CONNECTTIMEOUT, 2);
+ curl_setopt($lgsl_curl, CURLOPT_URL, $url);
+
+ $location = curl_exec($lgsl_curl);
+
+ if (curl_error($lgsl_curl)) { $location = "XX"; }
+
+ curl_close($lgsl_curl);
+ }
+ else
+ {
+ $location = @file_get_contents($url);
+ }
+
+ if (strlen($location) != 2) { $location = "XX"; }
+
+ return $location;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_realpath($path)
+ {
+ // WRAPPER SO IT CAN BE DISABLED
+
+ global $lgsl_config;
+
+ return $lgsl_config['no_realpath'] ? $path : realpath($path);
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_file_path()
+ {
+ // GET THE LGSL_CLASS.PHP PATH
+
+ $lgsl_path = __FILE__;
+
+ // SHORTEN TO JUST THE FOLDERS AND ADD TRAILING SLASH
+
+ $lgsl_path = dirname($lgsl_path)."/";
+
+ // CONVERT WINDOWS BACKSLASHES TO FORWARDSLASHES
+
+ $lgsl_path = str_replace("\\", "/", $lgsl_path);
+
+ return $lgsl_path;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_url_path()
+ {
+ // CHECK IF PATH HAS BEEN SET IN CONFIG
+
+ global $lgsl_config;
+
+ if ($lgsl_config['url_path'])
+ {
+ return $lgsl_config['url_path'];
+ }
+
+ // USE FULL DOMAIN PATH TO AVOID ALIAS PROBLEMS
+
+ $host_path = (!isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) != "on") ? "http://" : "https://";
+ $host_path .= $_SERVER['HTTP_HOST'];
+
+ // GET FULL PATHS ( EXTRA CODE FOR WINDOWS AND IIS - NO DOCUMENT_ROOT - BACKSLASHES - DOUBLESLASHES - ETC )
+
+ if ($_SERVER['DOCUMENT_ROOT'])
+ {
+ $base_path = lgsl_realpath($_SERVER['DOCUMENT_ROOT']);
+ $base_path = str_replace("\\", "/", $base_path);
+ $base_path = str_replace("//", "/", $base_path);
+ }
+ else
+ {
+ $file_path = $_SERVER['SCRIPT_NAME'];
+ $file_path = str_replace("\\", "/", $file_path);
+ $file_path = str_replace("//", "/", $file_path);
+
+ $base_path = $_SERVER['PATH_TRANSLATED'];
+ $base_path = str_replace("\\", "/", $base_path);
+ $base_path = str_replace("//", "/", $base_path);
+ $base_path = substr($base_path, 0, -strlen($file_path));
+ }
+
+ $lgsl_path = dirname(lgsl_realpath(__FILE__));
+ $lgsl_path = str_replace("\\", "/", $lgsl_path);
+
+ // REMOVE ANY TRAILING SLASHES
+
+ if (substr($base_path, -1) == "/") { $base_path = substr($base_path, 0, -1); }
+ if (substr($lgsl_path, -1) == "/") { $lgsl_path = substr($lgsl_path, 0, -1); }
+
+ // USE THE DIFFERENCE BETWEEN PATHS
+
+ if (substr($lgsl_path, 0, strlen($base_path)) == $base_path)
+ {
+ $url_path = substr($lgsl_path, strlen($base_path));
+
+ return $host_path.$url_path."/";
+ }
+
+ return "/#LGSL_PATH_PROBLEM#{$base_path}#{$lgsl_path}#/";
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ } // END OF DOUBLE LOAD PROTECTION
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ global $lgsl_file_path, $lgsl_url_path;
+
+ $lgsl_file_path = lgsl_file_path();
+
+ if (isset($_GET['lgsl_debug']))
+ {
+ echo "".print_r($_SERVER, TRUE)."
+ #d0# ".__FILE__."
+ #d1# ".@realpath(__FILE__)."
+ #d2# ".dirname(__FILE__)."
+ #d3# {$lgsl_file_path}
+ #d4# {$_SERVER['DOCUMENT_ROOT']}
+ #d5# ".@realpath($_SERVER['DOCUMENT_ROOT']);
+ }
+
+ require $lgsl_file_path."lgsl_config.php";
+ require $lgsl_file_path."lgsl_protocol.php";
+
+ $lgsl_url_path = lgsl_url_path();
+
+ if (isset($_GET['lgsl_debug']))
+ {
+ echo " #d6# {$lgsl_url_path}
+ #c0# {$lgsl_config['url_path']}
+ #c1# {$lgsl_config['no_realpath']}
+ #c2# {$lgsl_config['feed']['method']}
+ #c3# {$lgsl_config['feed']['url']}
+ #c4# {$lgsl_config['cache_time']}
+ #c5# {$lgsl_config['live_time']}
+ #c6# {$lgsl_config['timeout']}
+ #c7# {$lgsl_config['cms']}
+ ";
+ }
+
+ if (!isset($lgsl_config['locations']))
+ {
+ exit("LGSL PROBLEM: lgsl_config.php FAILED TO LOAD OR MISSING ENTRIES");
+ }
+
+//------------------------------------------------------------------------------------------------------------+
diff --git a/lgsl_files/lgsl_config.php b/lgsl_files/lgsl_config.php
new file mode 100644
index 0000000..ef5deab
--- /dev/null
+++ b/lgsl_files/lgsl_config.php
@@ -0,0 +1,228 @@
+STARTING [ TIME LIMIT: ".ini_get("max_execution_time")." ] [ CACHE TIME: {$lgsl_config['cache_time']} ]\r\n\r\n";
+
+//------------------------------------------------------------------------------------------------------------+
+
+ $mysql_query = "SELECT `type`,`ip`,`c_port`,`q_port`,`s_port` FROM `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` WHERE `disabled`=0 ORDER BY `cache_time` ASC";
+ $mysql_result = mysqli_query($lgsl_database, $mysql_query) or die(mysqli_error($lgsl_database));
+
+ while($mysql_row = mysqli_fetch_array($mysql_result, MYSQL_ASSOC))
+ {
+ echo str_pad(lgsl_timer("taken"), 8, " ").":".
+ str_pad($mysql_row['type'], 15, " ").":".
+ str_pad($mysql_row['ip'], 30, " ").":".
+ str_pad($mysql_row['c_port'], 6, " ").":".
+ str_pad($mysql_row['q_port'], 6, " ").":".
+ str_pad($mysql_row['s_port'], 12, " ")."\r\n";
+
+ lgsl_query_cached($mysql_row['type'], $mysql_row['ip'], $mysql_row['c_port'], $mysql_row['q_port'], $mysql_row['s_port'], $request);
+
+ flush();
+ ob_flush();
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ echo "\r\nFINISHED";
+
+//------------------------------------------------------------------------------------------------------------+
diff --git a/lgsl_files/lgsl_details.php b/lgsl_files/lgsl_details.php
new file mode 100644
index 0000000..960959d
--- /dev/null
+++ b/lgsl_files/lgsl_details.php
@@ -0,0 +1,186 @@
+ {$lgsl_config['text']['mid']} "; return; }
+
+ $fields = lgsl_sort_fields($server, $fields_show, $fields_hide, $fields_other);
+ $server = lgsl_sort_players($server);
+ $server = lgsl_sort_extras($server);
+ $misc = lgsl_server_misc($server);
+ $server = lgsl_server_html($server);
+
+//------------------------------------------------------------------------------------------------------------+
+
+ $output .= "
+
+
";
+
+//------------------------------------------------------------------------------------------------------------+
+// SHOW THE STANDARD INFO
+
+ $output .= "
+
{$server['s']['name']}
+
+
+
{$lgsl_config['text']['slk']}
+
+
+
+
{$lgsl_config['text']['sts']}:
{$lgsl_config['text'][$misc['text_status']]}
+
+
{$lgsl_config['text']['adr']}:
{$server['b']['ip']}
+
+
{$lgsl_config['text']['cpt']}:
{$server['b']['c_port']}
+
+
{$lgsl_config['text']['qpt']}:
{$server['b']['q_port']}
+
+
+
{$lgsl_config['text']['typ']}:
{$server['b']['type']}
+
+
{$lgsl_config['text']['gme']}:
{$server['s']['game']}
+
+
{$lgsl_config['text']['map']}:
{$server['s']['map']}
+
+
{$lgsl_config['text']['plr']}:
{$server['s']['players']} / {$server['s']['playersmax']}
+
+
+
+
+
+
+
+
+
";
+
+//------------------------------------------------------------------------------------------------------------+
+
+ $output .= "
";
+
+//------------------------------------------------------------------------------------------------------------+
+
+ if($lgsl_config['image_mod']){
+ $output .= '
+
[url='.str_replace("lgsl_files/", "", lgsl_url_path()).($lgsl_config['direct_index'] ? "index.php" : "").'?s='.intval($_GET['s']).'][img]'.str_replace("lgsl_files/", "", lgsl_url_path()).'userbar.php?s='.intval($_GET['s']).'[/img][/url]
+
+ ';
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+// SHOW THE PLAYERS
+
+ $output .= "
+
";
+
+ if (empty($server['p']) || !is_array($server['p']))
+ {
+ $output .= "
{$lgsl_config['text']['npi']}
";
+ }
+ else
+ {
+ $output .= "
+
+ ";
+
+ foreach ($fields as $field)
+ {
+ $field = ucfirst($field);
+ $output .= " {$field} ";
+ }
+
+ $output .= "
+ ";
+
+ foreach ($server['p'] as $player_key => $player)
+ {
+ $output .= "
+ ";
+
+ foreach ($fields as $field)
+ {
+ $output .= " {$player[$field]} ";
+ }
+
+ $output .= "
+ ";
+ }
+
+ $output .= "
+
";
+ }
+
+ $output .= "
+
";
+
+//------------------------------------------------------------------------------------------------------------+
+
+ $output .= "
";
+
+//------------------------------------------------------------------------------------------------------------+
+// SHOW THE SETTINGS
+
+ if (empty($server['e']) || !is_array($server['e']))
+ {
+ $output .= "
{$lgsl_config['text']['nei']}
";
+ }
+ else
+ {
+ $output .= "
+
+
+ {$lgsl_config['text']['ehs']}
+ {$lgsl_config['text']['ehv']}
+ ";
+
+ foreach ($server['e'] as $field => $value)
+ {
+ $output .= "
+
+ {$field}
+ {$value}
+ ";
+ }
+
+ $output .= "
+
";
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ $output .= "
";
+
+ $output .= "
+
";
+
+//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+//------ PLEASE MAKE A DONATION OR SIGN THE GUESTBOOK AT GREYCUBE.COM IF YOU REMOVE THIS CREDIT ----------------------------------------------------------------------------------------------------+
+ $output .= "";
+//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
diff --git a/lgsl_files/lgsl_export.php b/lgsl_files/lgsl_export.php
new file mode 100644
index 0000000..05bc486
--- /dev/null
+++ b/lgsl_files/lgsl_export.php
@@ -0,0 +1,104 @@
+
+ {$mysql_row['type']}
+ {$mysql_row['ip']}
+ {$mysql_row['c_port']}
+ {$mysql_row['q_port']}
+ {$mysql_row['s_port']}
+ {$mysql_row['zone']}
+ {$mysql_row['disabled']}
+ ";
+ }
+ else
+ {
+ $output .= "{$mysql_row['type']} : {$mysql_row['ip']} : {$mysql_row['c_port']} : {$mysql_row['q_port']} : {$mysql_row['s_port']} : {$mysql_row['zone']} : {$mysql_row['disabled']} \r\n";
+ }
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ if ($download)
+ {
+ header("Content-type: application/octet-stream");
+ header("Content-Disposition: attachment; filename=\"servers.txt\"");
+ echo $output;
+ exit;
+ }
+
+ if ($xml)
+ {
+ header("content-type: text/xml");
+ echo "
+ {$output} ";
+ exit;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+?>
+
+
+
+
+
+
+ Live Game Server List
+
+
+
+
+
+
+
+
+
diff --git a/lgsl_files/lgsl_feed.php b/lgsl_files/lgsl_feed.php
new file mode 100644
index 0000000..17ccd12
--- /dev/null
+++ b/lgsl_files/lgsl_feed.php
@@ -0,0 +1,162 @@
+ 99999 || $q_port < 1024)
+ {
+ exit("LGSL FEED PROBLEM: INVALID QUERY PORT: '{$q_port}'");
+ }
+
+ if (preg_match("/[^0-9a-z\.\-\[\]\:]/i", $ip))
+ {
+ exit("LGSL FEED PROBLEM: INVALID IP OR HOSTNAME: '{$ip}'");
+ }
+
+ if (preg_match("/[^a-z]/", $request))
+ {
+ exit("LGSL FEED PROBLEM: INVALID REQUEST: '{$request}'");
+ }
+
+ if ($type == "test")
+ {
+ exit("LGSL FEED PROBLEM: TYPE 'test' IS NOT ALLOWED");
+ }
+
+ $lgsl_protocol_list = lgsl_protocol_list();
+
+ if (!isset($lgsl_protocol_list[$type]))
+ {
+ exit("LGSL FEED PROBLEM: ".($type ? "UNKNOWN TYPE '{$type}'" : "MISSING TYPE")." FOR {$ip} : {$c_port} : {$q_port} : {$s_port}");
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+// FILTER HOSTNAME AND IP FORMATS THAT PHP ACCEPTS BUT ARE NOT WANTED
+
+ if (preg_match("/(\[[0-9a-z\:]+\])/iU", $ip, $match)) { $ip = $match[1]; }
+ elseif (preg_match("/([0-9a-z\.\-]+)/i", $ip, $match)) { $ip = $match[1]; }
+
+//------------------------------------------------------------------------------------------------------------+
+// CHECK PUBLIC FEED SETTING AND EITHER ADD [a] REQUEST OR ENSURE [a] IS REMOVED
+
+ $request = $lgsl_config['public_feed'] ? $request."a" : str_replace("a", "", $request);
+
+//------------------------------------------------------------------------------------------------------------+
+// QUERY SERVER
+
+ $server = lgsl_query_cached($type, $ip, $c_port, $q_port, $s_port, $request);
+
+//------------------------------------------------------------------------------------------------------------+
+// ADD THE FEED PROVIDER
+
+ if ($server['e']) { $server['e']['_feed_'] = "http://{$_SERVER['HTTP_HOST']}"; }
+
+//------------------------------------------------------------------------------------------------------------+
+// FEED USAGE LOGGING - 'logs' FOLDER MUST BE MANUALLY CREATED AND SET AS WRITABLE
+
+ if (is_dir("logs") && is_writable("logs"))
+ {
+// $file_path = "logs/log_feed.html";
+ $file_path = "logs/log_feed_{$_SERVER['REMOTE_ADDR']}.html";
+
+ if (filesize($file_path) > 1234567) { unlink($file_path); }
+
+ $file_handle = fopen($file_path, "a");
+
+ $file_string = "
+ [ ".date("Y/m/d H:i:s")." ] {$type}:{$ip}:{$c_port}:{$q_port}:{$s_port}:{$request}
+ [ ".lgsl_string_html($_SERVER['REMOTE_ADDR']) ." ]
+ [ ".lgsl_string_html($_SERVER['HTTP_REFERER'])." ]
+ ".($version ? " [ {$version} ] " : "")."
+ ".($xml ? " [ XML ] " : "")."
+ ";
+
+ fwrite($file_handle, $file_string);
+
+ fclose($file_handle);
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+// SERIALIZED OUTPUT
+
+ if (!$xml)
+ {
+ if ($format == 0) { exit("_SLGSLF_".serialize($server)."_SLGSLF_"); } // LEGACY SYSTEM ( 5.6 AND OLDER )
+
+ if (($format == 3 || $format == 4) && function_exists("json_encode"))
+ {
+ if ($format == 4 && function_exists("gzcompress")) { exit("_F4_".base64_encode(gzcompress(json_encode($server)))."_F4_"); }
+ else { exit("_F3_".base64_encode( json_encode($server)). "_F3_"); }
+ }
+ else
+ {
+ if ($format == 2 && function_exists("gzcompress")) { exit("_F2_".base64_encode(gzcompress(serialize($server)))."_F2_"); }
+ else { exit("_F1_".base64_encode( serialize($server)). "_F1_"); }
+ }
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+// XML OUTPUT
+
+ header("content-type: text/xml");
+
+ echo "\r\n\r\n";
+
+ foreach ($server as $a => $b)
+ {
+ echo "<".lgsl_string_html($a, TRUE).">";
+
+ foreach ($b as $c => $d)
+ {
+ if (is_array($d))
+ {
+ echo "\r\n";
+
+ foreach ($d as $e => $f)
+ {
+ echo "<".lgsl_string_html($e, TRUE).">".lgsl_string_html($f, TRUE)."".lgsl_string_html($e, TRUE).">\r\n";
+ }
+
+ echo " \r\n";
+ }
+ else
+ {
+ echo "<".lgsl_string_html($c, TRUE).">".lgsl_string_html($d, TRUE)."".lgsl_string_html($c, TRUE).">\r\n";
+ }
+ }
+
+ echo "".lgsl_string_html($a, TRUE).">\r\n";
+ }
+
+ echo " \r\n";
+
+//------------------------------------------------------------------------------------------------------------+
diff --git a/lgsl_files/lgsl_list.php b/lgsl_files/lgsl_list.php
new file mode 100644
index 0000000..01cafb1
--- /dev/null
+++ b/lgsl_files/lgsl_list.php
@@ -0,0 +1,110 @@
+TO ADMIN PANEL ";
+ }
+
+ $output .= "
+
+
+ {$lgsl_config['text']['sts']}:
+ {$lgsl_config['text']['adr']}:
+ {$lgsl_config['text']['tns']}:
+ {$lgsl_config['text']['map']}:
+ {$lgsl_config['text']['plr']}:
+ {$lgsl_config['text']['dtl']}:
+ ";
+
+ foreach ($server_list as $server)
+ {
+ $misc = lgsl_server_misc($server);
+ $server = lgsl_server_html($server);
+
+ $output .= "
+
+
+
+
+
+
+
+
+
+ {$server['b']['ip']}:{$server['b']['c_port']}
+
+
+
+
+
+ {$misc['name_filtered']}
+
+
+
+
+
+ {$server['s']['map']}
+
+
+
+ {$server['s']['players']} /{$server['s']['playersmax']}
+
+
+ ";
+
+ if ($lgsl_config['locations'])
+ {
+ $output .= "
+
+
+ ";
+ }
+
+ $output .= "
+
+
+
+ ";
+ }
+
+ $output .= "
+
";
+
+//------------------------------------------------------------------------------------------------------------+
+
+ if ($lgsl_config['list']['totals'])
+ {
+ $total = lgsl_group_totals($server_list);
+
+ $output .= "
+
+
{$lgsl_config['text']['tns']}: {$total['servers']}
+
{$lgsl_config['text']['tnp']}: {$total['players']}
+
{$lgsl_config['text']['tmp']}: {$total['playersmax']}
+
";
+ }
+
+//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+//------ PLEASE MAKE A DONATION OR SIGN THE GUESTBOOK AT GREYCUBE.COM IF YOU REMOVE THIS CREDIT ----------------------------------------------------------------------------------------------------+
+ $output .= "";
+//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
diff --git a/lgsl_files/lgsl_protocol.php b/lgsl_files/lgsl_protocol.php
new file mode 100644
index 0000000..fdfd466
--- /dev/null
+++ b/lgsl_files/lgsl_protocol.php
@@ -0,0 +1,4292 @@
+ "Americas Army",
+ "aarmy3" => "Americas Army 3",
+ "arcasimracing" => "Arca Sim Racing",
+ "arma" => "ArmA: Armed Assault",
+ "arma2" => "ArmA 2",
+ "arma3" => "ArmA 3, DayZ",
+ "avp2" => "Aliens VS. Predator 2",
+ "avp2010" => "Aliens VS. Predator ( 2010 By Rebellion )",
+ "bfbc2" => "Battlefield Bad Company 2",
+ "bfvietnam" => "Battlefield Vietnam",
+ "bf1942" => "Battlefield 1942",
+ "bf2" => "Battlefield 2",
+ "bf3" => "Battlefield 3",
+ "bf4" => "Battlefield 4",
+ "bf2142" => "Battlefield 2142",
+ "callofduty" => "Call Of Duty",
+ "callofdutyuo" => "Call Of Duty: United Offensive",
+ "callofdutywaw" => "Call Of Duty: World at War",
+ "callofduty2" => "Call Of Duty 2",
+ "callofduty4" => "Call Of Duty 4",
+ "cncrenegade" => "Command and Conquer: Renegade",
+ "conanexiles" => "Conan Exiles",
+ "crysis" => "Crysis",
+ "crysiswars" => "Crysis Wars",
+ "cs2d" => "Counter-Strike 2D",
+ "cube" => "Cube Engine",
+ "discord" => "Discord",
+ "doomskulltag" => "Doom - Skulltag",
+ "doomzdaemon" => "Doom - ZDaemon",
+ "doom3" => "Doom 3",
+ "dh2005" => "Deer Hunter 2005",
+ "farcry" => "Far Cry",
+ "fear" => "F.E.A.R.",
+ "fivem" => "FiveM",
+ "flashpoint" => "Operation Flashpoint",
+ "freelancer" => "Freelancer",
+ "frontlines" => "Frontlines: Fuel Of War",
+ "f1c9902" => "F1 Challenge 99-02",
+ "gamespy1" => "Generic GameSpy 1",
+ "gamespy2" => "Generic GameSpy 2",
+ "gamespy3" => "Generic GameSpy 3",
+ "ghostrecon" => "Ghost Recon",
+ "graw" => "Ghost Recon: Advanced Warfighter",
+ "graw2" => "Ghost Recon: Advanced Warfighter 2",
+ "gtr2" => "GTR 2",
+ "had2" => "Hidden and Dangerous 2",
+ "halflife" => "Half-Life - Steam Protocol",
+ "halflifewon" => "Half-Life - WON Protocol",
+ "halo" => "Halo",
+ "il2" => "IL-2 Sturmovik",
+ "jediknight2" => "JediKnight 2: Jedi Outcast",
+ "jediknightja" => "JediKnight: Jedi Academy",
+ "killingfloor" => "Killing Floor",
+ "kingpin" => "Kingpin: Life of Crime",
+ "minecraft" => "Minecraft",
+ "mohaa" => "Medal of Honor: Allied Assault",
+ "mohaab" => "Medal of Honor: Allied Assault Breakthrough",
+ "mohaas" => "Medal of Honor: Allied Assault Spearhead",
+ "mohpa" => "Medal of Honor: Pacific Assault",
+ "mta" => "Multi Theft Auto",
+ "nascar2004" => "Nascar Thunder 2004",
+ "neverwinter" => "NeverWinter Nights",
+ "neverwinter2" => "NeverWinter Nights 2",
+ "nexuiz" => "Nexuiz",
+ "openttd" => "Open Transport Tycoon Deluxe",
+ "painkiller" => "PainKiller",
+ "plainsight" => "Plain Sight",
+ "prey" => "Prey",
+ "quakeworld" => "Quake World",
+ "quakewars" => "Enemy Territory: Quake Wars",
+ "quake2" => "Quake 2",
+ "quake3" => "Quake 3",
+ "quake4" => "Quake 4",
+ "ragemp" => "Rage:MP",
+ "ravenshield" => "Raven Shield",
+ "redorchestra" => "Red Orchestra",
+ "rfactor" => "RFactor",
+ "samp" => "San Andreas Multiplayer",
+ "savage" => "Savage",
+ "savage2" => "Savage 2",
+ "serioussam" => "Serious Sam",
+ "serioussam2" => "Serious Sam 2",
+ "shatteredh" => "Shattered Horizon",
+ "sof2" => "Soldier of Fortune 2",
+ "soldat" => "Soldat",
+ "source" => "Source Protocol ( Half-Life 2, etc. )",
+ "stalker" => "S.T.A.L.K.E.R.",
+ "stalkercs" => "S.T.A.L.K.E.R. Clear Sky",
+ "startrekef" => "StarTrek Elite-Force",
+ "starwarsbf" => "Star Wars: Battlefront",
+ "starwarsbf2" => "Star Wars: Battlefront 2",
+ "starwarsrc" => "Star Wars: Republic Commando",
+ "swat4" => "SWAT 4",
+ "teeworlds" => "Teeworlds",
+ "tribes" => "Tribes ( Starsiege )",
+ "tribes2" => "Tribes 2",
+ "tribesv" => "Tribes Vengeance",
+ "ts" => "Teamspeak",
+ "ts3" => "Teamspeak 3",
+ "urbanterror" => "UrbanTerror",
+ "ut" => "Unreal Tournament",
+ "ut2003" => "Unreal Tournament 2003",
+ "ut2004" => "Unreal Tournament 2004",
+ "ut3" => "Unreal Tournament 3",
+ "vcmp" => "Vice City Multiplayer",
+ "vietcong" => "Vietcong",
+ "vietcong2" => "Vietcong 2",
+ "warsow" => "Warsow",
+ "warsowold" => "Warsow ( 0.4.2 and older )",
+ "wolfet" => "Wolfenstein: Enemy Territory",
+ "wolfrtcw" => "Wolfenstein: Return To Castle Wolfenstein",
+ "wolf2009" => "Wolfenstein ( 2009 By Raven )",
+ "test" => "~ Test ( For PHP Developers )"
+ );
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_protocol_list()
+ {
+ return array(
+ "aarmy" => "09",
+ "aarmy_" => "03",
+ "aarmy3" => "26",
+ "arcasimracing" => "16",
+ "arma" => "09",
+ "arma2" => "09",
+ "arma3" => "05",
+ "avp2" => "03",
+ "avp2010" => "31",
+ "bfbc2" => "30",
+ "bfvietnam" => "09",
+ "bf1942" => "03",
+ "bf2" => "06",
+ "bf3" => "06",
+ "bf4" => "06",
+ "bf2142" => "06",
+ "callofduty" => "02",
+ "callofdutyuo" => "02",
+ "callofdutywaw" => "02",
+ "callofduty2" => "02",
+ "callofduty4" => "02",
+ "cncrenegade" => "03",
+ "conanexiles" => "05",
+ "crysis" => "06",
+ "crysiswars" => "06",
+ "cs2d" => "29",
+ "cube" => "24",
+ "discord" => "36",
+ "doomskulltag" => "27",
+ "doomzdaemon" => "28",
+ "doom3" => "10",
+ "dh2005" => "09",
+ "had2" => "03",
+ "halflife" => "05",
+ "halflifewon" => "05",
+ "halo" => "03",
+ "il2" => "03",
+ "farcry" => "08",
+ "fear" => "09",
+ "fivem" => "35",
+ "flashpoint" => "03",
+ "freelancer" => "14",
+ "frontlines" => "20",
+ "f1c9902" => "03",
+ "gamespy1" => "03",
+ "gamespy2" => "09",
+ "gamespy3" => "06",
+ "ghostrecon" => "19",
+ "graw" => "06",
+ "graw2" => "09",
+ "gtr2" => "15",
+ "jediknight2" => "02",
+ "jediknightja" => "02",
+ "killingfloor" => "13",
+ "kingpin" => "03",
+ "minecraft" => "06",
+ "mohaa" => "03",
+ "mohaab" => "03",
+ "mohaas" => "03",
+ "mohpa" => "03",
+ "mohaa_" => "02",
+ "mohaab_" => "02",
+ "mohaas_" => "02",
+ "mohpa_" => "02",
+ "mta" => "08",
+ "nascar2004" => "09",
+ "neverwinter" => "09",
+ "neverwinter2" => "09",
+ "nexuiz" => "02",
+ "openttd" => "22",
+ "painkiller" => "08",
+ "painkiller_" => "09",
+ "plainsight" => "32",
+ "prey" => "10",
+ "quakeworld" => "07",
+ "quakewars" => "10",
+ "quake2" => "02",
+ "quake3" => "02",
+ "quake4" => "10",
+ "ragemp" => "34",
+ "ravenshield" => "04",
+ "redorchestra" => "13",
+ "rfactor" => "16",
+ "samp" => "12",
+ "savage" => "17",
+ "savage2" => "18",
+ "serioussam" => "03",
+ "serioussam2" => "09",
+ "shatteredh" => "05",
+ "sof2" => "02",
+ "soldat" => "08",
+ "source" => "05",
+ "stalker" => "06",
+ "stalkercs" => "09",
+ "startrekef" => "02",
+ "starwarsbf" => "09",
+ "starwarsbf2" => "09",
+ "starwarsrc" => "09",
+ "swat4" => "03",
+ "test" => "01",
+ "teeworlds" => "21",
+ "tribes" => "23",
+ "tribes2" => "25",
+ "tribesv" => "09",
+ "ts" => "33",
+ "ts3" => "33",
+ "warsow" => "02",
+ "warsowold" => "02",
+ "urbanterror" => "02",
+ "ut" => "03",
+ "ut2003" => "13",
+ "ut2003_" => "03",
+ "ut2004" => "13",
+ "ut2004_" => "03",
+ "ut3" => "11",
+ "vcmp" => "12",
+ "vietcong" => "03",
+ "vietcong2" => "09",
+ "wolfet" => "02",
+ "wolfrtcw" => "02",
+ "wolf2009" => "10");
+
+ return $lgsl_protocol_list;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_software_link($type, $ip, $c_port, $q_port, $s_port)
+ {
+ $lgsl_software_link = array(
+ "aarmy" => "qtracker://{IP}:{S_PORT}?game=ArmyOperations&action=show",
+ "aarmy3" => "qtracker://{IP}:{S_PORT}?game=AmericasArmy3&action=show",
+ "arcasimracing" => "http://en.wikipedia.org/wiki/ARCA_Sim_Racing",
+ "arma" => "qtracker://{IP}:{S_PORT}?game=ArmedAssault&action=show",
+ "arma2" => "http://en.wikipedia.org/wiki/ARMA_2",
+ "arma3" => "steam://connect/{IP}:{S_PORT}",
+ "avp2" => "qtracker://{IP}:{S_PORT}?game=AliensversusPredator2&action=show",
+ "avp2010" => "http://en.wikipedia.org/wiki/Aliens_vs._Predator_%28video_game%29",
+ "bfbc2" => "http://en.wikipedia.org/wiki/Battlefield_bad_company_2",
+ "bfvietnam" => "qtracker://{IP}:{S_PORT}?game=BattlefieldVietnam&action=show",
+ "bf1942" => "qtracker://{IP}:{S_PORT}?game=Battlefield1942&action=show",
+ "bf2" => "qtracker://{IP}:{S_PORT}?game=Battlefield2&action=show",
+ "bf3" => "https://en.wikipedia.org/wiki/Battlefield_3",
+ "bf4" => "https://en.wikipedia.org/wiki/Battlefield_4",
+ "bf2142" => "qtracker://{IP}:{S_PORT}?game=Battlefield2142&action=show",
+ "callofduty" => "qtracker://{IP}:{S_PORT}?game=CallOfDuty&action=show",
+ "callofdutyuo" => "qtracker://{IP}:{S_PORT}?game=CallOfDutyUnitedOffensive&action=show",
+ "callofdutywaw" => "qtracker://{IP}:{S_PORT}?game=CallOfDutyWorldAtWar&action=show",
+ "callofduty2" => "qtracker://{IP}:{S_PORT}?game=CallOfDuty2&action=show",
+ "callofduty4" => "qtracker://{IP}:{S_PORT}?game=CallOfDuty4&action=show",
+ "cncrenegade" => "qtracker://{IP}:{S_PORT}?game=CommandConquerRenegade&action=show",
+ "conanexiles" => "steam://connect/{IP}:{S_PORT}",
+ "crysis" => "qtracker://{IP}:{S_PORT}?game=Crysis&action=show",
+ "crysiswars" => "qtracker://{IP}:{S_PORT}?game=CrysisWars&action=show",
+ "cs2d" => "http://www.cs2d.com",
+ "cube" => "http://cubeengine.com",
+ "discord" => "http://discord.gg/invite/{IP}",
+ "doomskulltag" => "http://skulltag.com",
+ "doomzdaemon" => "http://www.zdaemon.org",
+ "doom3" => "qtracker://{IP}:{S_PORT}?game=Doom3&action=show",
+ "dh2005" => "http://en.wikipedia.org/wiki/Deer_Hunter_(computer_game)",
+ "farcry" => "qtracker://{IP}:{S_PORT}?game=FarCry&action=show",
+ "fear" => "qtracker://{IP}:{S_PORT}?game=FEAR&action=show",
+ "fivem" => "http://fivem.net/",
+ "flashpoint" => "qtracker://{IP}:{S_PORT}?game=OperationFlashpoint&action=show",
+ "freelancer" => "http://en.wikipedia.org/wiki/Freelancer_(computer_game)",
+ "frontlines" => "http://en.wikipedia.org/wiki/Frontlines:_Fuel_of_War",
+ "f1c9902" => "http://en.wikipedia.org/wiki/EA_Sports_F1_Series",
+ "gamespy1" => "http://www.greycube.com",
+ "gamespy2" => "http://www.greycube.com",
+ "gamespy3" => "http://www.greycube.com",
+ "ghostrecon" => "http://en.wikipedia.org/wiki/Tom_Clancy's_Ghost_Recon",
+ "graw" => "qtracker://{IP}:{S_PORT}?game=GhostRecon&action=show",
+ "graw2" => "http://en.wikipedia.org/wiki/Tom_Clancy's_Ghost_Recon_Advanced_Warfighter_2",
+ "gtr2" => "http://en.wikipedia.org/wiki/GTR2",
+ "had2" => "http://en.wikipedia.org/wiki/Hidden_&_Dangerous_2",
+ "halflife" => "steam://connect/{IP}:{S_PORT}",
+ "halflifewon" => "steam://connect/{IP}:{S_PORT}",
+ "halo" => "qtracker://{IP}:{S_PORT}?game=Halo&action=show",
+ "il2" => "http://en.wikipedia.org/wiki/IL-2_Sturmovik_(game)",
+ "jediknight2" => "qtracker://{IP}:{S_PORT}?game=JediKnight2&action=show",
+ "jediknightja" => "qtracker://{IP}:{S_PORT}?game=JediKnightJediAcademy&action=show",
+ "killingfloor" => "steam://connect/{IP}:{S_PORT}",
+ "kingpin" => "qtracker://{IP}:{S_PORT}?game=Kingpin&action=show",
+ "minecraft" => "http://en.wikipedia.org/wiki/Minecraft",
+ "mohaa" => "qtracker://{IP}:{S_PORT}?game=MedalofHonorAlliedAssault&action=show",
+ "mohaab" => "qtracker://{IP}:{S_PORT}?game=MedalofHonorAlliedAssaultBreakthrough&action=show",
+ "mohaas" => "qtracker://{IP}:{S_PORT}?game=MedalofHonorAlliedAssaultSpearhead&action=show",
+ "mohpa" => "qtracker://{IP}:{S_PORT}?game=MedalofHonorPacificAssault&action=show",
+ "mta" => "http://en.wikipedia.org/wiki/Multi_Theft_Auto",
+ "nascar2004" => "http://en.wikipedia.org/wiki/NASCAR_Thunder_2004",
+ "neverwinter" => "qtracker://{IP}:{S_PORT}?game=NeverwinterNights&action=show",
+ "neverwinter2" => "qtracker://{IP}:{S_PORT}?game=NeverwinterNights&action=show",
+ "nexuiz" => "qtracker://{IP}:{S_PORT}?game=Nexuiz&action=show",
+ "openttd" => "http://wwww.openttd.org",
+ "painkiller" => "qtracker://{IP}:{S_PORT}?game=Painkiller&action=show",
+ "plainsight" => "http://www.plainsightgame.com",
+ "prey" => "qtracker://{IP}:{S_PORT}?game=Prey&action=show",
+ "quakeworld" => "qtracker://{IP}:{S_PORT}?game=QuakeWorld&action=show",
+ "quakewars" => "qtracker://{IP}:{S_PORT}?game=EnemyTerritoryQuakeWars&action=show",
+ "quake2" => "qtracker://{IP}:{S_PORT}?game=Quake2&action=show",
+ "quake3" => "qtracker://{IP}:{S_PORT}?game=Quake3&action=show",
+ "quake4" => "qtracker://{IP}:{S_PORT}?game=Quake4&action=show",
+ "ragemp" => "rage://v/connect?ip={IP}:{S_PORT}",
+ "ravenshield" => "http://en.wikipedia.org/wiki/Tom_Clancy's_Rainbow_Six_3",
+ "redorchestra" => "qtracker://{IP}:{S_PORT}?game=RedOrchestra&action=show",
+ "rfactor" => "rfactor://{IP}:{S_PORT}",
+ "samp" => "http://www.sa-mp.com",
+ "savage" => "http://en.wikipedia.org/wiki/Savage:_The_Battle_for_Newerth",
+ "savage2" => "http://en.wikipedia.org/wiki/Savage_2:_A_Tortured_Soul",
+ "serioussam" => "qtracker://{IP}:{S_PORT}?game=SeriousSam&action=show",
+ "serioussam2" => "qtracker://{IP}:{S_PORT}?game=Serious_Sam2&action=show",
+ "shatteredh" => "http://en.wikipedia.org/wiki/Shattered_Horizon",
+ "sof2" => "qtracker://{IP}:{S_PORT}?game=SoldierOfFortune2&action=show",
+ "soldat" => "http://www.soldat.pl",
+ "source" => "steam://connect/{IP}:{S_PORT}",
+ "stalker" => "qtracker://{IP}:{S_PORT}?game=STALKER_ShadowChernobyl&action=show",
+ "stalkercs" => "qtracker://{IP}:{S_PORT}?game=STALKER_ClearSky&action=show",
+ "startrekef" => "http://en.wikipedia.org/wiki/Star_Trek:_Voyager:_Elite_Force",
+ "starwarsbf" => "qtracker://{IP}:{S_PORT}?game=StarWarsBattlefront&action=show",
+ "starwarsbf2" => "qtracker://{IP}:{S_PORT}?game=StarWarsBattlefront2&action=show",
+ "starwarsrc" => "qtracker://{IP}:{S_PORT}?game=StarWarsRepublicCommando&action=show",
+ "swat4" => "qtracker://{IP}:{S_PORT}?game=SWAT4&action=show",
+ "test" => "http://www.greycube.com",
+ "teeworlds" => "http://www.teeworlds.com",
+ "tribes" => "qtracker://{IP}:{S_PORT}?game=Tribes&action=show",
+ "tribes2" => "qtracker://{IP}:{S_PORT}?game=Tribes2&action=show",
+ "tribesv" => "qtracker://{IP}:{S_PORT}?game=TribesVengeance&action=show",
+ "ts" => "http://www.teamspeak.com",
+ "ts3" => "ts3server://{IP}?port={C_PORT}",
+ "urbanterror" => "qtracker://{IP}:{S_PORT}?game=UrbanTerror&action=show",
+ "ut" => "qtracker://{IP}:{S_PORT}?game=UnrealTournament&action=show",
+ "ut2003" => "qtracker://{IP}:{S_PORT}?game=UnrealTournament2003&action=show",
+ "ut2004" => "qtracker://{IP}:{S_PORT}?game=UnrealTournament2004&action=show",
+ "ut3" => "qtracker://{IP}:{S_PORT}?game=UnrealTournament3&action=show",
+ "vcmp" => "http://vicecitymultiplayer.com",
+ "vietcong" => "qtracker://{IP}:{S_PORT}?game=Vietcong&action=show",
+ "vietcong2" => "qtracker://{IP}:{S_PORT}?game=Vietcong2&action=show",
+ "warsow" => "qtracker://{IP}:{S_PORT}?game=Warsow&action=show",
+ "warsowold" => "qtracker://{IP}:{S_PORT}?game=Warsow&action=show",
+ "wolfet" => "qtracker://{IP}:{S_PORT}?game=WolfensteinEnemyTerritory&action=show",
+ "wolfrtcw" => "qtracker://{IP}:{S_PORT}?game=ReturntoCastleWolfenstein&action=show",
+ "wolf2009" => "http://en.wikipedia.org/wiki/Wolfenstein_(2009_video_game)");
+
+ // SOFTWARE PORT IS THE QUERY PORT UNLESS SET
+ if (!$s_port) { $s_port = $q_port; }
+
+ // TRY USING THE STANDARD LAUNCH LINK FOR ALTERNATE PROTOCOLS IF ONE IS NOT SET
+ if (!isset($lgsl_software_link[$type])) { $type = str_replace("_", "", $type); }
+
+ // ONLY FOR DISCORD
+ if ($type == "discord") { $ip = explode(".", $ip)[1]; }
+
+ // INSERT DATA INTO STATIC LINK - CONVERT SPECIAL CHARACTERS - RETURN
+ return htmlentities(str_replace(array("{IP}", "{C_PORT}", "{Q_PORT}", "{S_PORT}"), array($ip, $c_port, $q_port, $s_port), $lgsl_software_link[$type]), ENT_QUOTES);
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_port_conversion($type, $c_port, $q_port, $s_port)
+ {
+ switch ($type) // GAMES WHERE Q_PORT IS NOT EQUAL TO C_PORT
+ {
+ case "aarmy" : $c_to_q = 1; $c_def = 1716; $q_def = 1717; $c_to_s = 0; break;
+ case "aarmy3" : $c_to_q = 0; $c_def = 8777; $q_def = 39300; $c_to_s = 0; break;
+ case "arcasimracing" : $c_to_q = -100; $c_def = 34397; $q_def = 34297; $c_to_s = 0; break;
+ case "arma3" : $c_to_q = 0; $c_def = 2302; $q_def = 2303; $c_to_s = 0; break;
+ case "bfbc2" : $c_to_q = 0; $c_def = 19567; $q_def = 48888; $c_to_s = 0; break;
+ case "bfvietnam" : $c_to_q = 0; $c_def = 15567; $q_def = 23000; $c_to_s = 0; break;
+ case "bf1942" : $c_to_q = 0; $c_def = 14567; $q_def = 23000; $c_to_s = 0; break;
+ case "bf2" : $c_to_q = 0; $c_def = 16567; $q_def = 29900; $c_to_s = 0; break;
+ case "bf2142" : $c_to_q = 0; $c_def = 17567; $q_def = 29900; $c_to_s = 0; break;
+ case "cube" : $c_to_q = 1; $c_def = 28785; $q_def = 28786; $c_to_s = 0; break;
+ case "dh2005" : $c_to_q = 0; $c_def = 23459; $q_def = 34567; $c_to_s = 0; break;
+ case "farcry" : $c_to_q = 123; $c_def = 49001; $q_def = 49124; $c_to_s = 0; break;
+ case "fivem" : $c_to_q = 0; $c_def = 30120; $q_def = 30120; $c_to_s = 0; break;
+ case "flashpoint" : $c_to_q = 1; $c_def = 2302; $q_def = 2303; $c_to_s = 0; break;
+ case "frontlines" : $c_to_q = 2; $c_def = 5476; $q_def = 5478; $c_to_s = 0; break;
+ case "ghostrecon" : $c_to_q = 2; $c_def = 2346; $q_def = 2348; $c_to_s = 0; break;
+ case "gtr2" : $c_to_q = 1; $c_def = 34297; $q_def = 34298; $c_to_s = 0; break;
+ case "had2" : $c_to_q = 3; $c_def = 11001; $q_def = 11004; $c_to_s = 0; break;
+ case "kingpin" : $c_to_q = -10; $c_def = 31510; $q_def = 31500; $c_to_s = 0; break;
+ case "killingfloor" : $c_to_q = 1; $c_def = 7708; $q_def = 7709; $c_to_s = 0; break;
+ case "mohaa" : $c_to_q = 97; $c_def = 12203; $q_def = 12300; $c_to_s = 0; break;
+ case "mohaab" : $c_to_q = 97; $c_def = 12203; $q_def = 12300; $c_to_s = 0; break;
+ case "mohaas" : $c_to_q = 97; $c_def = 12203; $q_def = 12300; $c_to_s = 0; break;
+ case "mohpa" : $c_to_q = 97; $c_def = 13203; $q_def = 13300; $c_to_s = 0; break;
+ case "mta" : $c_to_q = 123; $c_def = 22003; $q_def = 22126; $c_to_s = 0; break;
+ case "painkiller" : $c_to_q = 123; $c_def = 3455; $q_def = 3578; $c_to_s = 0; break;
+ case "ragemp" : $c_to_q = 0; $c_def = 22005; $q_def = 22005; $c_to_s = 0; break;
+ case "ravenshield" : $c_to_q = 1000; $c_def = 7777; $q_def = 8777; $c_to_s = 0; break;
+ case "redorchestra" : $c_to_q = 1; $c_def = 7758; $q_def = 7759; $c_to_s = 0; break;
+ case "rfactor" : $c_to_q = -100; $c_def = 34397; $q_def = 34297; $c_to_s = 0; break;
+ case "serioussam" : $c_to_q = 1; $c_def = 25600; $q_def = 25601; $c_to_s = 0; break;
+ case "soldat" : $c_to_q = 123; $c_def = 23073; $q_def = 23196; $c_to_s = 0; break;
+ case "stalker" : $c_to_q = 2; $c_def = 5447; $q_def = 5445; $c_to_s = 0; break;
+ case "stalkercs" : $c_to_q = 2; $c_def = 5447; $q_def = 5445; $c_to_s = 0; break;
+ case "starwarsrc" : $c_to_q = 0; $c_def = 7777; $q_def = 11138; $c_to_s = 0; break;
+ case "swat4" : $c_to_q = 1; $c_def = 10780; $q_def = 10781; $c_to_s = 0; break;
+ case "tribesv" : $c_to_q = 1; $c_def = 7777; $q_def = 7778; $c_to_s = 0; break;
+ case "ts" : $c_to_q = 0; $c_def = 8767; $q_def = 51234; $c_to_s = 0; break;
+ case "ts3" : $c_to_q = 0; $c_def = 9987; $q_def = 10011; $c_to_s = 0; break;
+ case "ut" : $c_to_q = 1; $c_def = 7777; $q_def = 7778; $c_to_s = 0; break;
+ case "ut2003" : $c_to_q = 1; $c_def = 7757; $q_def = 7758; $c_to_s = 10; break;
+ case "ut2003_" : $c_to_q = 10; $c_def = 7757; $q_def = 7767; $c_to_s = 0; break;
+ case "ut2004" : $c_to_q = 1; $c_def = 7777; $q_def = 7778; $c_to_s = 10; break;
+ case "ut2004_" : $c_to_q = 10; $c_def = 7777; $q_def = 7787; $c_to_s = 0; break;
+ case "ut3" : $c_to_q = 0; $c_def = 7777; $q_def = 6500; $c_to_s = 0; break;
+ case "vietcong" : $c_to_q = 10000; $c_def = 5425; $q_def = 15425; $c_to_s = 0; break;
+ case "vietcong2" : $c_to_q = 0; $c_def = 5001; $q_def = 19967; $c_to_s = 0; break;
+ default : $c_to_q = 0; $c_def = 0; $q_def = 0; $c_to_s = 0; break;
+ }
+
+ if (!$c_port && !$q_port && $c_def) { $c_port = $c_def; $q_port = $q_def; }
+ if (!$c_port && $q_port && $c_to_q) { $c_port = $q_port - $c_to_q; }
+ elseif (!$c_port && $q_port && $c_def) { $c_port = $c_def; }
+ elseif (!$c_port && $q_port) { $c_port = $q_port; }
+ if (!$q_port && $c_port && $c_to_q) { $q_port = $c_port + $c_to_q; }
+ elseif (!$q_port && $c_port && $q_def) { $q_port = $q_def; }
+ elseif (!$q_port && $c_port) { $q_port = $c_port; }
+ if (!$s_port && $c_to_s) { $s_port = $c_port + $c_to_s; }
+
+ return array(intval($c_port), intval($q_port), intval($s_port));
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_live($type, $ip, $c_port, $q_port, $s_port, $request)
+ {
+//---------------------------------------------------------+
+
+ if (preg_match("/[^0-9a-z\.\-\[\]\:]/i", $ip))
+ {
+ exit("LGSL PROBLEM: INVALID IP OR HOSTNAME");
+ }
+
+ $lgsl_protocol_list = lgsl_protocol_list();
+
+ if (!isset($lgsl_protocol_list[$type]))
+ {
+ exit("LGSL PROBLEM: ".($type ? "INVALID TYPE '{$type}'" : "MISSING TYPE")." FOR {$ip}, {$c_port}, {$q_port}, {$s_port}");
+ }
+
+ $lgsl_function = "lgsl_query_{$lgsl_protocol_list[$type]}";
+
+ if (!function_exists($lgsl_function))
+ {
+ exit("LGSL PROBLEM: FUNCTION DOES NOT EXIST FOR: {$type}");
+ }
+
+ if (!intval($q_port))
+ {
+ exit("LGSL PROBLEM: INVALID QUERY PORT");
+ }
+
+//---------------------------------------------------------+
+// ARRAYS ARE SETUP IN ADVANCE
+
+ $server = array(
+ "b" => array("type" => $type, "ip" => $ip, "c_port" => $c_port, "q_port" => $q_port, "s_port" => $s_port, "status" => 1),
+ "s" => array("game" => "", "name" => "", "map" => "", "players" => 0, "playersmax" => 0, "password" => ""),
+ "e" => array(),
+ "p" => array(),
+ "t" => array());
+
+//---------------------------------------------------------+
+// GET DATA
+
+ if ($lgsl_function == "lgsl_query_01") // TEST RETURNS DIRECT
+ {
+ $lgsl_need = ""; $lgsl_fp = "";
+ $response = call_user_func_array($lgsl_function, array(&$server, &$lgsl_need, &$lgsl_fp));
+ return $server;
+ }
+
+ global $lgsl_config; // FEED ENABLED BY EXTERNAL CONFIG SETTING
+
+ if (!empty($lgsl_config['feed']['method']) && !empty($lgsl_config['feed']['url']))
+ {
+ $response = lgsl_query_feed($server, $request, $lgsl_config['feed']['method'], $lgsl_config['feed']['url']);
+ }
+ elseif ($lgsl_function == "lgsl_query_34" || $lgsl_function == "lgsl_query_36")
+ {
+ $response = lgsl_query_direct($server, $request, $lgsl_function, "http");
+ }
+ elseif ($lgsl_function == "lgsl_query_30" || $lgsl_function == "lgsl_query_33")
+ {
+ $response = lgsl_query_direct($server, $request, $lgsl_function, "tcp");
+ }
+ else
+ {
+ $response = lgsl_query_direct($server, $request, $lgsl_function, "udp");
+ }
+
+//---------------------------------------------------------+
+// FORMAT RESPONSE
+
+ if (!$response) // SERVER OFFLINE
+ {
+ $server['b']['status'] = 0;
+ }
+ else
+ {
+ // FILL IN EMPTY VALUES
+ if (empty($server['s']['game'])) { $server['s']['game'] = $type; }
+ if (empty($server['s']['map'])) { $server['s']['map'] = "-"; }
+
+ // REMOVE FOLDERS FROM MAP NAMES
+ if (($pos = strrpos($server['s']['map'], "/")) !== FALSE) { $server['s']['map'] = substr($server['s']['map'], $pos + 1); }
+ if (($pos = strrpos($server['s']['map'], "\\")) !== FALSE) { $server['s']['map'] = substr($server['s']['map'], $pos + 1); }
+
+ // PLAYER COUNT AND PASSWORD STATUS SHOULD BE NUMERIC
+ $server['s']['players'] = intval($server['s']['players']);
+ $server['s']['playersmax'] = intval($server['s']['playersmax']);
+
+ if (isset($server['s']['password'][0])) { $server['s']['password'] = (strtolower($server['s']['password'][0]) == "t") ? 1 : 0; }
+ else { $server['s']['password'] = intval($server['s']['password']); }
+
+ // REMOVE EMPTY AND UN-REQUESTED ARRAYS
+
+ if (strpos($request, "p") === FALSE && empty($server['p']) && $server['s']['players'] != 0) { unset($server['p']); }
+ if (strpos($request, "p") === FALSE && empty($server['t'])) { unset($server['t']); }
+ if (strpos($request, "e") === FALSE && empty($server['e'])) { unset($server['e']); }
+ if (strpos($request, "s") === FALSE && empty($server['s']['name'])) { unset($server['s']); }
+ }
+
+//---------------------------------------------------------+
+
+ return $server;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_direct(&$server, $request, $lgsl_function, $scheme)
+ {
+//---------------------------------------------------------+
+
+ if ($scheme != 'http') {
+
+ $lgsl_fp = @fsockopen("{$scheme}://{$server['b']['ip']}", $server['b']['q_port'], $errno, $errstr, 1);
+
+ if (!$lgsl_fp) { return FALSE; }
+
+ global $lgsl_config;
+
+ $lgsl_config['timeout'] = intval($lgsl_config['timeout']);
+
+ stream_set_timeout($lgsl_fp, $lgsl_config['timeout'], $lgsl_config['timeout'] ? 0 : 500000);
+ stream_set_blocking($lgsl_fp, TRUE);
+
+ }
+ else {
+ if ($lgsl_function == "lgsl_query_34") // ragemp
+ {
+ $ch = curl_init('https://cdn.rage.mp/master/');
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
+ curl_setopt($ch, CURLOPT_TIMEOUT, 3);
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json'));
+ $lgsl_fp = curl_exec($ch);
+ curl_close($ch);
+ }
+ elseif ($lgsl_function == "lgsl_query_36") // discord
+ {
+ $_ip = explode(".", $server['b']['ip'])[0];
+ $lgsl_fp = file_get_contents("https://discordapp.com/api/guilds/{$_ip}/widget.json");
+ }
+ }
+
+//---------------------------------------------------------+
+// CHECK WHAT IS NEEDED
+
+ $lgsl_need = array();
+ $lgsl_need['s'] = strpos($request, "s") !== FALSE ? TRUE : FALSE;
+ $lgsl_need['e'] = strpos($request, "e") !== FALSE ? TRUE : FALSE;
+ $lgsl_need['p'] = strpos($request, "p") !== FALSE ? TRUE : FALSE;
+
+ // ChANGE [e] TO [s][e] AS BASIC QUERIES OFTEN RETURN EXTRA INFO
+ if ($lgsl_need['e'] && !$lgsl_need['s']) { $lgsl_need['s'] = TRUE; }
+
+//---------------------------------------------------------+
+// QUERY FUNCTION IS REPEATED TO REDUCE DUPLICATE CODE
+
+ do
+ {
+ $lgsl_need_check = $lgsl_need;
+
+ // CALL FUNCTION REQUIRES '&$variable' TO PASS 'BY REFERENCE'
+ $response = call_user_func_array($lgsl_function, array(&$server, &$lgsl_need, &$lgsl_fp));
+
+ // CHECK IF SERVER IS OFFLINE
+ if (!$response) { break; }
+
+ // CHECK IF NEED HAS NOT CHANGED - THIS SERVES TWO PURPOSES - TO PREVENT INFINITE LOOPS - AND TO
+ // AVOID WRITING $lgsl_need = FALSE FALSE FALSE FOR GAMES THAT RETURN ALL DATA IN ONE RESPONSE
+ if ($lgsl_need_check == $lgsl_need) { break; }
+
+ // OPTIMIZATION THAT SKIPS REQUEST FOR PLAYER DETAILS WHEN THE SERVER IS KNOWN TO BE EMPTY
+ if ($lgsl_need['p'] && $server['s']['players'] == "0") { $lgsl_need['p'] = FALSE; }
+ }
+ while ($lgsl_need['s'] == TRUE || $lgsl_need['e'] == TRUE || $lgsl_need['p'] == TRUE);
+
+//---------------------------------------------------------+
+
+ @fclose($lgsl_fp);
+
+ return $response;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_01(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// PROTOCOL FOR DEVELOPING WITHOUT USING LIVE SERVERS TO HELP ENSURE RETURNED
+// DATA IS SANITIZED AND THAT LONG SERVER AND PLAYER NAMES ARE HANDLED PROPERLY
+
+ $server['s'] = array(
+ "game" => "test_game",
+ "name" => "test_ServerNameThatsOften'Really'LongAndCanHaveSymbols ThatWill\"Screw\"UpHtmlUnlessEntitied",
+ "map" => "test_map",
+ "players" => rand(0, 16),
+ "playersmax" => rand(16, 32),
+ "password" => rand(0, 1));
+
+//---------------------------------------------------------+
+
+ $server['e'] = array(
+ "testextra1" => "normal",
+ "testextra2" => 123,
+ "testextra3" => time(),
+ "testextra4" => "",
+ "testextra5" => "Setting WithHtml ",
+ "testextra6" => "ReallyLongSettingLikeSomeMapCyclesThatHaveNoSpacesAndCauseThePageToGoReallyWideIfNotBrokenUp");
+
+//---------------------------------------------------------+
+
+ $server['p']['0']['name'] = "Normal";
+ $server['p']['0']['score'] = "12";
+ $server['p']['0']['ping'] = "34";
+
+ $server['p']['1']['name'] = "\xc3\xa9\x63\x68\x6f\x20\xd0\xb8-d0\xb3\xd1\x80\xd0\xbe\xd0\xba"; // UTF PLAYER NAME
+ $server['p']['1']['score'] = "56";
+ $server['p']['1']['ping'] = "78";
+
+ $server['p']['2']['name'] = "One&&Three&\"Four\"&'Five'";
+ $server['p']['2']['score'] = "90";
+ $server['p']['2']['ping'] = "12";
+
+ $server['p']['3']['name'] = "ReallyLongPlayerNameBecauseTheyAreUberCoolAndAreInFiveClans";
+ $server['p']['3']['score'] = "90";
+ $server['p']['3']['ping'] = "12";
+
+//---------------------------------------------------------+
+
+ if (rand(0, 10) == 5) { $server['p'] = array(); } // RANDOM NO PLAYERS
+ if (rand(0, 10) == 5) { return FALSE; } // RANDOM GOING OFFLINE
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_02(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ if ($server['b']['type'] == "quake2") { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFstatus"); }
+ elseif ($server['b']['type'] == "warsowold") { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFgetinfo"); }
+ elseif (strpos($server['b']['type'], "moh") !== FALSE) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x02getstatus"); } // mohaa_ mohaab_ mohaas_ mohpa_
+ else { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFgetstatus"); }
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $part = explode("\n", $buffer); // SPLIT INTO PARTS: HEADER/SETTINGS/PLAYERS/FOOTER
+ array_pop($part); // REMOVE FOOTER WHICH IS EITHER NULL OR "\challenge\"
+ $item = explode("\\", $part[1]); // SPLIT PART INTO ITEMS
+
+ foreach ($item as $item_key => $data_key)
+ {
+ if (!($item_key % 2)) { continue; } // SKIP EVEN KEYS
+
+ $data_key = strtolower(lgsl_parse_color($data_key, "1"));
+ $server['e'][$data_key] = lgsl_parse_color($item[$item_key+1], "1");
+ }
+
+//---------------------------------------------------------+
+
+ if (!empty($server['e']['hostname'])) { $server['s']['name'] = $server['e']['hostname']; }
+ if (!empty($server['e']['sv_hostname'])) { $server['s']['name'] = $server['e']['sv_hostname']; }
+
+ if (isset($server['e']['gamename'])) { $server['s']['game'] = $server['e']['gamename']; }
+ if (isset($server['e']['mapname'])) { $server['s']['map'] = $server['e']['mapname']; }
+
+ $server['s']['players'] = empty($part['2']) ? 0 : count($part) - 2;
+
+ if (isset($server['e']['maxclients'])) { $server['s']['playersmax'] = $server['e']['maxclients']; } // QUAKE 2
+ if (isset($server['e']['sv_maxclients'])) { $server['s']['playersmax'] = $server['e']['sv_maxclients']; }
+
+ if (isset($server['e']['pswrd'])) { $server['s']['password'] = $server['e']['pswrd']; } // CALL OF DUTY
+ if (isset($server['e']['needpass'])) { $server['s']['password'] = $server['e']['needpass']; } // QUAKE 2
+ if (isset($server['e']['g_needpass'])) { $server['s']['password'] = $server['e']['g_needpass']; }
+
+ array_shift($part); // REMOVE HEADER
+ array_shift($part); // REMOVE SETTING
+
+//---------------------------------------------------------+
+
+ if ($server['b']['type'] == "nexuiz") // (SCORE) (PING) (TEAM IF TEAM GAME) "(NAME)"
+ {
+ $pattern = "/(.*) (.*) (.*)\"(.*)\"/U"; $fields = array(1=>"score", 2=>"ping", 3=>"team", 4=>"name");
+ }
+ elseif ($server['b']['type'] == "warsow") // (SCORE) (PING) "(NAME)" (TEAM)
+ {
+ $pattern = "/(.*) (.*) \"(.*)\" (.*)/"; $fields = array(1=>"score", 2=>"ping", 3=>"name", 4=>"team");
+ }
+ elseif ($server['b']['type'] == "sof2") // (SCORE) (PING) (DEATHS) "(NAME)"
+ {
+ $pattern = "/(.*) (.*) (.*) \"(.*)\"/"; $fields = array(1=>"score", 2=>"ping", 3=>"deaths", 4=>"name");
+ }
+ elseif (strpos($server['b']['type'], "mohpa") !== FALSE) // (?) (SCORE) (?) (TIME) (?) "(RANK?)" "(NAME)"
+ {
+ $pattern = "/(.*) (.*) (.*) (.*) (.*) \"(.*)\" \"(.*)\"/"; $fields = array(2=>"score", 3=>"deaths", 4=>"time", 6=>"rank", 7=>"name");
+ }
+ elseif (strpos($server['b']['type'], "moh") !== FALSE) // (PING) "(NAME)"
+ {
+ $pattern = "/(.*) \"(.*)\"/"; $fields = array(1=>"ping", 2=>"name");
+ }
+ else // (SCORE) (PING) "(NAME)"
+ {
+ $pattern = "/(.*) (.*) \"(.*)\"/"; $fields = array(1=>"score", 2=>"ping", 3=>"name");
+ }
+
+//---------------------------------------------------------+
+
+ foreach ($part as $player_key => $data)
+ {
+ if (!$data) { continue; }
+
+ preg_match($pattern, $data, $match);
+
+ foreach ($fields as $match_key => $field_name)
+ {
+ if (isset($match[$match_key])) { $server['p'][$player_key][$field_name] = trim($match[$match_key]); }
+ }
+
+ $server['p'][$player_key]['name'] = lgsl_parse_color($server['p'][$player_key]['name'], "1");
+
+ if (isset($server['p'][$player_key]['time']))
+ {
+ $server['p'][$player_key]['time'] = lgsl_time($server['p'][$player_key]['time']);
+ }
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_03(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ // BF1942 BUG: RETURNS 'GHOST' NAMES - TO SKIP THESE WE NEED AN [s] REQUEST FOR AN ACCURATE PLAYER COUNT
+ if ($server['b']['type'] == "bf1942" && $lgsl_need['p'] && !$lgsl_need['s'] && !isset($lgsl_need['sp'])) { $lgsl_need['s'] = TRUE; $lgsl_need['sp'] = TRUE; }
+
+ if ($server['b']['type'] == "cncrenegade") { fwrite($lgsl_fp, "\\status\\"); }
+ elseif ($lgsl_need['s'] || $lgsl_need['e']) { fwrite($lgsl_fp, "\\basic\\\\info\\\\rules\\"); $lgsl_need['s'] = FALSE; $lgsl_need['e'] = FALSE; }
+ elseif ($lgsl_need['p']) { fwrite($lgsl_fp, "\\players\\"); $lgsl_need['p'] = FALSE; }
+
+//---------------------------------------------------------+
+
+ $buffer = "";
+ $packet_count = 0;
+ $packet_total = 20;
+
+ do
+ {
+ $packet = fread($lgsl_fp, 4096);
+
+ // QUERY PORT CHECK AS THE CONNECTION PORT WILL ALSO RESPOND
+ if (strpos($packet, "\\") === FALSE) { return FALSE; }
+
+ // REMOVE SLASH PREFIX
+ if ($packet[0] == "\\") { $packet = substr($packet, 1); }
+
+ while ($packet)
+ {
+ $key = strtolower(lgsl_cut_string($packet, 0, "\\"));
+ $value = trim(lgsl_cut_string($packet, 0, "\\"));
+
+ // CHECK IF KEY IS PLAYER DATA
+ if (preg_match("/(.*)_([0-9]+)$/", $key, $match))
+ {
+ // SEPERATE TEAM NAMES
+ if ($match[1] == "teamname") { $server['t'][$match[2]]['name'] = $value; continue; }
+
+ // CONVERT TO LGSL STANDARD
+ if ($match[1] == "player") { $match[1] = "name"; }
+ elseif ($match[1] == "playername") { $match[1] = "name"; }
+ elseif ($match[1] == "frags") { $match[1] = "score"; }
+ elseif ($match[1] == "ngsecret") { $match[1] = "stats"; }
+
+ $server['p'][$match[2]][$match[1]] = $value; continue;
+ }
+
+ // SEPERATE QUERYID
+ if ($key == "queryid") { $queryid = $value; continue; }
+
+ // SERVER SETTING
+ $server['e'][$key] = $value;
+ }
+
+ // FINAL PACKET NUMBER IS THE TOTAL
+ if (isset($server['e']['final']))
+ {
+ preg_match("/([0-9]+)\.([0-9]+)/", $queryid, $match);
+ $packet_total = intval($match[2]);
+ unset($server['e']['final']);
+ }
+
+ $packet_count ++;
+ }
+ while ($packet_count < $packet_total);
+
+//---------------------------------------------------------+
+
+ if (isset($server['e']['mapname']))
+ {
+ $server['s']['map'] = $server['e']['mapname'];
+
+ if (!empty($server['e']['hostname'])) { $server['s']['name'] = $server['e']['hostname']; }
+ if (!empty($server['e']['sv_hostname'])) { $server['s']['name'] = $server['e']['sv_hostname']; }
+
+ if (isset($server['e']['password'])) { $server['s']['password'] = $server['e']['password']; }
+ if (isset($server['e']['numplayers'])) { $server['s']['players'] = $server['e']['numplayers']; }
+ if (isset($server['e']['maxplayers'])) { $server['s']['playersmax'] = $server['e']['maxplayers']; }
+
+ if (!empty($server['e']['gamename'])) { $server['s']['game'] = $server['e']['gamename']; }
+ if (!empty($server['e']['gameid']) && empty($server['e']['gamename'])) { $server['s']['game'] = $server['e']['gameid']; }
+ if (!empty($server['e']['gameid']) && $server['b']['type'] == "bf1942") { $server['s']['game'] = $server['e']['gameid']; }
+ }
+
+//---------------------------------------------------------+
+
+ if ($server['p'])
+ {
+ // BF1942 BUG - REMOVE 'GHOST' PLAYERS
+ if ($server['b']['type'] == "bf1942" && $server['s']['players'])
+ {
+ $server['p'] = array_slice($server['p'], 0, $server['s']['players']);
+ }
+
+ // OPERATION FLASHPOINT BUG: 'GHOST' PLAYERS IN UN-USED 'TEAM' FIELD
+ if ($server['b']['type'] == "flashpoint")
+ {
+ foreach ($server['p'] as $key => $value)
+ {
+ unset($server['p'][$key]['team']);
+ }
+ }
+
+ // AVP2 BUG: PLAYER NUMBER PREFIXED TO NAMES
+ if ($server['b']['type'] == "avp2")
+ {
+ foreach ($server['p'] as $key => $value)
+ {
+ $server['p'][$key]['name'] = preg_replace("/[0-9]+~/", "", $server['p'][$key]['name']);
+ }
+ }
+
+ // IF TEAM NAMES AVAILABLE USED INSTEAD OF TEAM NUMBERS
+ if (isset($server['t'][0]['name']))
+ {
+ foreach ($server['p'] as $key => $value)
+ {
+ $team_key = $server['p'][$key]['team'] - 1;
+ $server['p'][$key]['team'] = $server['t'][$team_key]['name'];
+ }
+ }
+
+ // RE-INDEX PLAYER KEYS TO REMOVE ANY GAPS
+ $server['p'] = array_values($server['p']);
+ }
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_04(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ fwrite($lgsl_fp, "REPORT");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $lgsl_ravenshield_key = array(
+ "A1" => "playersmax",
+ "A2" => "tkpenalty",
+ "B1" => "players",
+ "B2" => "allowradar",
+ "D2" => "version",
+ "E1" => "mapname",
+ "E2" => "lid",
+ "F1" => "maptype",
+ "F2" => "gid",
+ "G1" => "password",
+ "G2" => "hostport",
+ "H1" => "dedicated",
+ "H2" => "terroristcount",
+ "I1" => "hostname",
+ "I2" => "aibackup",
+ "J1" => "mapcycletypes",
+ "J2" => "rotatemaponsuccess",
+ "K1" => "mapcycle",
+ "K2" => "forcefirstpersonweapons",
+ "L1" => "players_name",
+ "L2" => "gamename",
+ "L3" => "punkbuster",
+ "M1" => "players_time",
+ "N1" => "players_ping",
+ "O1" => "players_score",
+ "P1" => "queryport",
+ "Q1" => "rounds",
+ "R1" => "roundtime",
+ "S1" => "bombtimer",
+ "T1" => "bomb",
+ "W1" => "allowteammatenames",
+ "X1" => "iserver",
+ "Y1" => "friendlyfire",
+ "Z1" => "autobalance");
+
+//---------------------------------------------------------+
+
+ $item = explode("\xB6", $buffer);
+
+ foreach ($item as $data_value)
+ {
+ $tmp = explode(" ", $data_value, 2);
+ $data_key = isset($lgsl_ravenshield_key[$tmp[0]]) ? $lgsl_ravenshield_key[$tmp[0]] : $tmp[0]; // CONVERT TO DESCRIPTIVE KEYS
+ $server['e'][$data_key] = trim($tmp[1]); // ALL VALUES NEED TRIMMING
+ }
+
+ $server['e']['mapcycle'] = str_replace("/"," ", $server['e']['mapcycle']); // CONVERT SLASH TO SPACE
+ $server['e']['mapcycletypes'] = str_replace("/"," ", $server['e']['mapcycletypes']); // SO LONG LISTS WRAP
+
+//---------------------------------------------------------+
+
+ $server['s']['game'] = $server['e']['gamename'];
+ $server['s']['name'] = $server['e']['hostname'];
+ $server['s']['map'] = $server['e']['mapname'];
+ $server['s']['players'] = $server['e']['players'];
+ $server['s']['playersmax'] = $server['e']['playersmax'];
+ $server['s']['password'] = $server['e']['password'];
+
+//---------------------------------------------------------+
+
+ $player_name = isset($server['e']['players_name']) ? explode("/", substr($server['e']['players_name'], 1)) : array(); unset($server['e']['players_name']);
+ $player_time = isset($server['e']['players_time']) ? explode("/", substr($server['e']['players_time'], 1)) : array(); unset($server['e']['players_time']);
+ $player_ping = isset($server['e']['players_ping']) ? explode("/", substr($server['e']['players_ping'], 1)) : array(); unset($server['e']['players_ping']);
+ $player_score = isset($server['e']['players_score']) ? explode("/", substr($server['e']['players_score'], 1)) : array(); unset($server['e']['players_score']);
+
+ foreach ($player_name as $key => $name)
+ {
+ $server['p'][$key]['name'] = $player_name[$key];
+ $server['p'][$key]['time'] = $player_time[$key];
+ $server['p'][$key]['ping'] = $player_ping[$key];
+ $server['p'][$key]['score'] = $player_score[$key];
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_05(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE: http://developer.valvesoftware.com/wiki/Server_Queries
+
+ if ($server['b']['type'] == "halflifewon")
+ {
+ if ($lgsl_need['s']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFdetails\x00"); }
+ elseif ($lgsl_need['e']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFrules\x00"); }
+ elseif ($lgsl_need['p']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFplayers\x00"); }
+ }
+ else
+ {
+ $challenge_code = isset($lgsl_need['challenge']) ? $lgsl_need['challenge'] : "\x00\x00\x00\x00";
+
+ if ($lgsl_need['s']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x54Source Engine Query\x00"); }
+ elseif ($lgsl_need['e']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x56{$challenge_code}"); }
+ elseif ($lgsl_need['p']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x55{$challenge_code}"); }
+ }
+
+//---------------------------------------------------------+
+// THE STANDARD HEADER POSITION REVEALS THE TYPE BUT IT MAY NOT ARRIVE FIRST
+// ONCE WE KNOW THE TYPE WE CAN FIND THE TOTAL NUMBER OF PACKETS EXPECTED
+
+ $packet_temp = array();
+ $packet_type = 0;
+ $packet_count = 0;
+ $packet_total = 4;
+
+ do
+ {
+ if (!($packet = fread($lgsl_fp, 4096))) {
+ if ($lgsl_need['s']) { return FALSE; }
+ elseif ($lgsl_need['e']) { $lgsl_need['e'] = FALSE; return TRUE; }
+ else { return TRUE; }
+ }
+
+ //---------------------------------------------------------------------------------------------------------------------------------+
+ // NEWER HL1 SERVERS REPLY TO A2S_INFO WITH 3 PACKETS ( HL1 FORMAT INFO, SOURCE FORMAT INFO, PLAYERS )
+ // THIS DISCARDS UN-EXPECTED PACKET FORMATS ON THE GO ( AS READING IN ADVANCE CAUSES TIMEOUT DELAYS FOR OTHER SERVER VERSIONS )
+ // ITS NOT PERFECT AS [s] CAN FLIP BETWEEN HL1 AND SOURCE FORMATS DEPENDING ON ARRIVAL ORDER ( MAYBE FIX WITH RETURN ON HL1 APPID )
+ if ($lgsl_need['s']) { if ($packet[4] == "D") { continue; } }
+ elseif ($lgsl_need['e']) { if ($packet[4] == "m" || $packet[4] == "I" || $packet[4] == "D") { continue; } }
+ elseif ($lgsl_need['p']) { if ($packet[4] == "m" || $packet[4] == "I") { continue; } }
+ //---------------------------------------------------------------------------------------------------------------------------------+
+
+ if (substr($packet, 0, 5) == "\xFF\xFF\xFF\xFF\x41") { $lgsl_need['challenge'] = substr($packet, 5, 4); return TRUE; } // REPEAT WITH GIVEN CHALLENGE CODE
+ elseif (substr($packet, 0, 4) == "\xFF\xFF\xFF\xFF") { $packet_total = 1; $packet_type = 1; } // SINGLE PACKET - HL1 OR HL2
+ elseif (substr($packet, 9, 4) == "\xFF\xFF\xFF\xFF") { $packet_total = ord($packet[8]) & 0xF; $packet_type = 2; } // MULTI PACKET - HL1 ( TOTAL IS LOWER NIBBLE OF BYTE )
+ elseif (substr($packet, 12, 4) == "\xFF\xFF\xFF\xFF") { $packet_total = ord($packet[8]); $packet_type = 3; } // MULTI PACKET - HL2
+ elseif (substr($packet, 18, 2) == "BZ") { $packet_total = ord($packet[8]); $packet_type = 4; } // BZIP PACKET - HL2
+
+ $packet_count ++;
+ $packet_temp[] = $packet;
+ }
+ while ($packet && $packet_count < $packet_total);
+
+ if ($packet_type == 0) { return $server['s'] ? TRUE : FALSE; } // UNKNOWN RESPONSE ( SOME SERVERS ONLY SEND [s] )
+
+//---------------------------------------------------------+
+// WITH THE TYPE WE CAN NOW SORT AND JOIN THE PACKETS IN THE CORRECT ORDER
+// REMOVING ANY EXTRA HEADERS IN THE PROCESS
+
+ $buffer = array();
+
+ foreach ($packet_temp as $packet)
+ {
+ if ($packet_type == 1) { $packet_order = 0; }
+ elseif ($packet_type == 2) { $packet_order = ord($packet[8]) >> 4; $packet = substr($packet, 9); } // ( INDEX IS UPPER NIBBLE OF BYTE )
+ elseif ($packet_type == 3) { $packet_order = ord($packet[9]); $packet = substr($packet, 12); }
+ elseif ($packet_type == 4) { $packet_order = ord($packet[9]); $packet = substr($packet, 18); }
+
+ $buffer[$packet_order] = $packet;
+ }
+
+ ksort($buffer);
+
+ $buffer = implode("", $buffer);
+
+//---------------------------------------------------------+
+// WITH THE PACKETS JOINED WE CAN NOW DECOMPRESS BZIP PACKETS
+// THEN REMOVE THE STANDARD HEADER AND CHECK ITS CORRECT
+
+ if ($packet_type == 4)
+ {
+ if (!function_exists("bzdecompress")) // REQUIRES http://php.net/bzip2
+ {
+ $server['e']['bzip2'] = "unavailable"; $lgsl_need['e'] = FALSE;
+ return TRUE;
+ }
+
+ $buffer = bzdecompress($buffer);
+ }
+
+ $header = lgsl_cut_byte($buffer, 4);
+
+ if ($header != "\xFF\xFF\xFF\xFF") { return FALSE; } // SOMETHING WENT WRONG
+
+//---------------------------------------------------------+
+
+ $response_type = lgsl_cut_byte($buffer, 1);
+
+ if ($response_type == "I") // SOURCE INFO ( HALF-LIFE 2 )
+ {
+ $server['e']['netcode'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['name'] = lgsl_cut_string($buffer);
+ $server['s']['map'] = lgsl_cut_string($buffer);
+ $server['s']['game'] = lgsl_cut_string($buffer);
+ $server['e']['description'] = lgsl_cut_string($buffer);
+ $server['e']['appid'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['s']['players'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['playersmax'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['bots'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['dedicated'] = lgsl_cut_byte($buffer, 1);
+ $server['e']['os'] = lgsl_cut_byte($buffer, 1);
+ $server['s']['password'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['anticheat'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['version'] = lgsl_cut_string($buffer);
+ }
+
+ elseif ($response_type == "m") // HALF-LIFE 1 INFO
+ {
+ $server_ip = lgsl_cut_string($buffer);
+ $server['s']['name'] = lgsl_cut_string($buffer);
+ $server['s']['map'] = lgsl_cut_string($buffer);
+ $server['s']['game'] = lgsl_cut_string($buffer);
+ $server['e']['description'] = lgsl_cut_string($buffer);
+ $server['s']['players'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['playersmax'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['netcode'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['dedicated'] = lgsl_cut_byte($buffer, 1);
+ $server['e']['os'] = lgsl_cut_byte($buffer, 1);
+ $server['s']['password'] = ord(lgsl_cut_byte($buffer, 1));
+
+ if (ord(lgsl_cut_byte($buffer, 1))) // MOD FIELDS ( OFF FOR SOME HALFLIFEWON-VALVE SERVERS )
+ {
+ $server['e']['mod_url_info'] = lgsl_cut_string($buffer);
+ $server['e']['mod_url_download'] = lgsl_cut_string($buffer);
+ $buffer = substr($buffer, 1);
+ $server['e']['mod_version'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ $server['e']['mod_size'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ $server['e']['mod_server_side'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['mod_custom_dll'] = ord(lgsl_cut_byte($buffer, 1));
+ }
+
+ $server['e']['anticheat'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['bots'] = ord(lgsl_cut_byte($buffer, 1));
+ }
+
+ elseif ($response_type == "D") // SOURCE AND HALF-LIFE 1 PLAYERS
+ {
+ $returned = ord(lgsl_cut_byte($buffer, 1));
+
+ $player_key = 0;
+
+ while ($buffer)
+ {
+ lgsl_cut_byte($buffer, 1);
+ $server['p'][$player_key]['name'] = lgsl_cut_string($buffer);
+ $server['p'][$player_key]['score'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ $server['p'][$player_key]['time'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 4), "f"));
+
+ $player_key ++;
+ }
+ }
+
+ elseif ($response_type == "E") // SOURCE AND HALF-LIFE 1 RULES
+ {
+ $returned = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+
+ while ($buffer)
+ {
+ $item_key = strtolower(lgsl_cut_string($buffer));
+ $item_value = lgsl_cut_string($buffer);
+
+ $server['e'][$item_key] = $item_value;
+ }
+ }
+
+//---------------------------------------------------------+
+
+ // IF ONLY [s] WAS REQUESTED THEN REMOVE INCOMPLETE [e]
+ if ($lgsl_need['s'] && !$lgsl_need['e']) { $server['e'] = array(); }
+
+ if ($lgsl_need['s']) { $lgsl_need['s'] = FALSE; }
+ elseif ($lgsl_need['e']) { $lgsl_need['e'] = FALSE; }
+ elseif ($lgsl_need['p']) { $lgsl_need['p'] = FALSE; }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_06(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// GET A CHALLENGE CODE IF NEEDED
+
+ $challenge_code = "";
+
+ if ($server['b']['type'] != "bf2" && $server['b']['type'] != "graw")
+ {
+ fwrite($lgsl_fp, "\xFE\xFD\x09\x21\x21\x21\x21\xFF\xFF\xFF\x01");
+
+ $challenge_packet = fread($lgsl_fp, 4096);
+
+ if (!$challenge_packet) { return FALSE; }
+
+ $challenge_code = substr($challenge_packet, 5, -1); // REMOVE HEADER AND TRAILING NULL
+
+ // IF CODE IS RETURNED ( SOME STALKER SERVERS RETURN BLANK WHERE THE CODE IS NOT NEEDED )
+ // CONVERT DECIMAL |TO| HEX AS 8 CHARACTER STRING |TO| 4 PAIRS OF HEX |TO| 4 PAIRS OF DECIMAL |TO| 4 PAIRS OF ASCII
+
+ $challenge_code = $challenge_code ? chr($challenge_code >> 24).chr($challenge_code >> 16).chr($challenge_code >> 8).chr($challenge_code >> 0) : "";
+ }
+
+ fwrite($lgsl_fp, "\xFE\xFD\x00\x21\x21\x21\x21{$challenge_code}\xFF\xFF\xFF\x01");
+
+//---------------------------------------------------------+
+// GET RAW PACKET DATA
+
+ $buffer = array();
+ $packet_count = 0;
+ $packet_total = 4;
+
+ do
+ {
+ $packet_count ++;
+ $packet = fread($lgsl_fp, 8192);
+
+ if (!$packet) { return FALSE; }
+
+ $packet = substr($packet, 14); // REMOVE SPLITNUM HEADER
+ $packet_order = ord(lgsl_cut_byte($packet, 1));
+
+ if ($packet_order >= 128) // LAST PACKET - SO ITS ORDER NUMBER IS ALSO THE TOTAL
+ {
+ $packet_order -= 128;
+ $packet_total = $packet_order + 1;
+ }
+
+ $buffer[$packet_order] = $packet;
+ if ($server['b']['type'] == "minecraft") { $packet_total = 1; }
+ }
+ while ($packet_count < $packet_total);
+
+//---------------------------------------------------------+
+// PROCESS AND SORT PACKETS
+
+ foreach ($buffer as $key => $packet)
+ {
+ $packet = substr($packet, 0, -1); // REMOVE END NULL FOR JOINING
+
+ if (substr($packet, -1) != "\x00") // LAST VALUE HAS BEEN SPLIT
+ {
+ $part = explode("\x00", $packet); // REMOVE SPLIT VALUE AS COMPLETE VALUE IS IN NEXT PACKET
+ array_pop($part);
+ $packet = implode("\x00", $part)."\x00";
+ }
+
+ if ($packet[0] != "\x00") // PLAYER OR TEAM DATA THAT MAY BE A CONTINUATION
+ {
+ $pos = strpos($packet, "\x00") + 1; // WHEN DATA IS SPLIT THE NEXT PACKET STARTS WITH A REPEAT OF THE FIELD NAME
+
+ if (isset($packet[$pos]) && $packet[$pos] != "\x00") // REPEATED FIELD NAMES END WITH \x00\x?? INSTEAD OF \x00\x00
+ {
+ $packet = substr($packet, $pos + 1); // REMOVE REPEATED FIELD NAME
+ }
+ else
+ {
+ $packet = "\x00".$packet; // RE-ADD NULL AS PACKET STARTS WITH A NEW FIELD
+ }
+ }
+
+ $buffer[$key] = $packet;
+ }
+
+ ksort($buffer);
+
+ $buffer = implode("", $buffer);
+
+//---------------------------------------------------------+
+// SERVER SETTINGS
+
+ $buffer = substr($buffer, 1); // REMOVE HEADER \x00
+
+ while ($key = strtolower(lgsl_cut_string($buffer)))
+ {
+ $server['e'][$key] = lgsl_cut_string($buffer);
+ }
+
+ $lgsl_conversion = array("hostname"=>"name", "gamename"=>"game", "mapname"=>"map", "map"=>"map", "numplayers"=>"players", "maxplayers"=>"playersmax", "password"=>"password");
+ foreach ($lgsl_conversion as $e => $s) { if (isset($server['e'][$e])) { $server['s'][$s] = $server['e'][$e]; unset($server['e'][$e]); } }
+
+ if ($server['b']['type'] == "bf2" || $server['b']['type'] == "bf2142") { $server['s']['map'] = ucwords(str_replace("_", " ", $server['s']['map'])); } // MAP NAME CONSISTENCY
+ elseif ($server['b']['type'] == "minecraft") {
+ if (isset($server['e']['gametype'])) { $server['s']['game'] = $server['e']['gametype']; }
+ $server['s']['name'] = lgsl_parse_color($server['s']['name'], "minecraft");
+ foreach ($server['e'] as $key=>$val) { if (($key != 'version') && ($key != 'plugins')) { unset($server['e'][$key]); } }
+
+ $plugins = explode(": ",$server['e']['plugins'], 2);
+ if ($plugins[0]) { $server['e']['plugins'] = $plugins[0]; } else { $server['e']['plugins'] = 'none (Vanilla)'; }
+ if (count($plugins) == 2) {
+ while ($key = lgsl_cut_string($plugins[1],0," ")) { $server['e'][$key] = lgsl_cut_string($plugins[1],0,"; "); }
+ }
+ $buffer = $buffer."\x00"; // Needed to correctly terminate the players list
+ }
+
+ if ($server['s']['players'] == "0") { return TRUE; } // IF SERVER IS EMPTY SKIP THE PLAYER CODE
+
+//---------------------------------------------------------+
+// PLAYER DETAILS
+
+ $buffer = substr($buffer, 1); // REMOVE HEADER \x01
+
+ while ($buffer)
+ {
+ if ($buffer[0] == "\x02") { break; }
+ if ($buffer[0] == "\x00") { $buffer = substr($buffer, 1); break; }
+
+ $field = lgsl_cut_string($buffer, 0, "\x00\x00");
+ $field = strtolower(substr($field, 0, -1));
+
+ if ($field == "player") { $field = "name"; }
+ elseif ($field == "aibot") { $field = "bot"; }
+
+ if ($buffer[0] == "\x00") { $buffer = substr($buffer, 1); continue; }
+
+ $value_list = lgsl_cut_string($buffer, 0, "\x00\x00");
+ $value_list = explode("\x00", $value_list);
+
+ foreach ($value_list as $key => $value)
+ {
+ $server['p'][$key][$field] = $value;
+ }
+ }
+
+//---------------------------------------------------------+
+// TEAM DATA
+
+ $buffer = substr($buffer, 1); // REMOVE HEADER \x02
+
+ while ($buffer)
+ {
+ if ($buffer[0] == "\x00") { break; }
+
+ $field = lgsl_cut_string($buffer, 0, "\x00\x00");
+ $field = strtolower($field);
+
+ if ($field == "team_t") { $field = "name"; }
+ elseif ($field == "score_t") { $field = "score"; }
+
+ $value_list = lgsl_cut_string($buffer, 0, "\x00\x00");
+ $value_list = explode("\x00", $value_list);
+
+ foreach ($value_list as $key => $value)
+ {
+ $server['t'][$key][$field] = $value;
+ }
+ }
+
+//---------------------------------------------------------+
+// TEAM NAME CONVERSION
+
+ if ($server['p'] && isset($server['t'][0]['name']) && $server['t'][0]['name'] != "Team")
+ {
+ foreach ($server['p'] as $key => $value)
+ {
+ if (empty($server['p'][$key]['team'])) { continue; }
+
+ $team_key = $server['p'][$key]['team'] - 1;
+
+ if (!isset($server['t'][$team_key]['name'])) { continue; }
+
+ $server['p'][$key]['team'] = $server['t'][$team_key]['name'];
+ }
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_07(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFstatus\x00");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $buffer = substr($buffer, 6, -2); // REMOVE HEADER AND FOOTER
+ $part = explode("\n", $buffer); // SPLIT INTO SETTINGS/PLAYER/PLAYER/PLAYER
+
+//---------------------------------------------------------+
+
+ $item = explode("\\", $part[0]);
+
+ foreach ($item as $item_key => $data_key)
+ {
+ if ($item_key % 2) { continue; } // SKIP ODD KEYS
+
+ $data_key = strtolower($data_key);
+ $server['e'][$data_key] = $item[$item_key+1];
+ }
+
+//---------------------------------------------------------+
+
+ array_shift($part); // REMOVE SETTINGS
+
+ foreach ($part as $key => $data)
+ {
+ preg_match("/(.*) (.*) (.*) (.*) \"(.*)\" \"(.*)\" (.*) (.*)/s", $data, $match); // GREEDY MATCH FOR SKINS
+
+ $server['p'][$key]['pid'] = $match[1];
+ $server['p'][$key]['score'] = $match[2];
+ $server['p'][$key]['time'] = $match[3];
+ $server['p'][$key]['ping'] = $match[4];
+ $server['p'][$key]['name'] = lgsl_parse_color($match[5], $server['b']['type']);
+ $server['p'][$key]['skin'] = $match[6];
+ $server['p'][$key]['skin_top'] = $match[7];
+ $server['p'][$key]['skin_bottom'] = $match[8];
+ }
+
+//---------------------------------------------------------+
+
+ $server['s']['game'] = $server['e']['*gamedir'];
+ $server['s']['name'] = $server['e']['hostname'];
+ $server['s']['map'] = $server['e']['map'];
+ $server['s']['players'] = $server['p'] ? count($server['p']) : 0;
+ $server['s']['playersmax'] = $server['e']['maxclients'];
+ $server['s']['password'] = isset($server['e']['needpass']) && $server['e']['needpass'] > 0 && $server['e']['needpass'] < 4 ? 1 : 0;
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_08(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ fwrite($lgsl_fp, "s"); // ASE ( ALL SEEING EYE ) PROTOCOL
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $buffer = substr($buffer, 4); // REMOVE HEADER
+
+ $server['e']['gamename'] = lgsl_cut_pascal($buffer, 1, -1);
+ $server['e']['hostport'] = lgsl_cut_pascal($buffer, 1, -1);
+ $server['s']['name'] = lgsl_parse_color(lgsl_cut_pascal($buffer, 1, -1), $server['b']['type']);
+ $server['e']['gamemode'] = lgsl_cut_pascal($buffer, 1, -1);
+ $server['s']['map'] = lgsl_cut_pascal($buffer, 1, -1);
+ $server['e']['version'] = lgsl_cut_pascal($buffer, 1, -1);
+ $server['s']['password'] = lgsl_cut_pascal($buffer, 1, -1);
+ $server['s']['players'] = lgsl_cut_pascal($buffer, 1, -1);
+ $server['s']['playersmax'] = lgsl_cut_pascal($buffer, 1, -1);
+
+ while ($buffer && $buffer[0] != "\x01")
+ {
+ $item_key = strtolower(lgsl_cut_pascal($buffer, 1, -1));
+ $item_value = lgsl_cut_pascal($buffer, 1, -1);
+
+ $server['e'][$item_key] = $item_value;
+ }
+
+ $buffer = substr($buffer, 1); // REMOVE END MARKER
+
+//---------------------------------------------------------+
+
+ $player_key = 0;
+
+ while ($buffer)
+ {
+ $bit_flags = lgsl_cut_byte($buffer, 1); // FIELDS HARD CODED BELOW BECAUSE GAMES DO NOT USE THEM PROPERLY
+
+ if ($bit_flags == "\x3D") { $field_list = array("name", "score", "", "time"); } // FARCRY PLAYERS CONNECTING
+ elseif ($server['b']['type'] == "farcry") { $field_list = array("name", "team", "", "score", "ping", "time"); } // FARCRY PLAYERS JOINED
+ elseif ($server['b']['type'] == "mta") { $field_list = array("name", "", "", "score", "ping", "" ); }
+ elseif ($server['b']['type'] == "painkiller") { $field_list = array("name", "", "skin", "score", "ping", "" ); }
+ elseif ($server['b']['type'] == "soldat") { $field_list = array("name", "team", "", "score", "ping", "time"); }
+
+ foreach ($field_list as $item_key)
+ {
+ $item_value = lgsl_cut_pascal($buffer, 1, -1);
+
+ if (!$item_key) { continue; }
+
+ if ($item_key == "name") { lgsl_parse_color($item_value, $server['b']['type']); }
+
+ $server['p'][$player_key][$item_key] = $item_value;
+ }
+
+ $player_key ++;
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_09(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ // SERIOUS SAM 2 RETURNS ALL PLAYER NAMES AS "Unknown Player" SO SKIP OR CONVERT ANY PLAYER REQUESTS
+ if ($server['b']['type'] == "serioussam2") { $lgsl_need['p'] = FALSE; if (!$lgsl_need['s'] && !$lgsl_need['e']) { $lgsl_need['s'] = TRUE; } }
+
+//---------------------------------------------------------+
+
+ if ($lgsl_need['s'] || $lgsl_need['e'])
+ {
+ $lgsl_need['s'] = FALSE; $lgsl_need['e'] = FALSE;
+
+ fwrite($lgsl_fp, "\xFE\xFD\x00\x21\x21\x21\x21\xFF\x00\x00\x00");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ $buffer = substr($buffer, 5, -2); // REMOVE HEADER AND FOOTER
+
+ if (!$buffer) { return FALSE; }
+
+ $item = explode("\x00", $buffer);
+
+ foreach ($item as $item_key => $data_key)
+ {
+ if ($item_key % 2) { continue; } // SKIP EVEN KEYS
+
+ $data_key = strtolower($data_key);
+ $server['e'][$data_key] = $item[$item_key+1];
+ }
+
+ if (isset($server['e']['hostname'])) { $server['s']['name'] = $server['e']['hostname']; }
+ if (isset($server['e']['mapname'])) { $server['s']['map'] = $server['e']['mapname']; }
+ if (isset($server['e']['numplayers'])) { $server['s']['players'] = $server['e']['numplayers']; }
+ if (isset($server['e']['maxplayers'])) { $server['s']['playersmax'] = $server['e']['maxplayers']; }
+ if (isset($server['e']['password'])) { $server['s']['password'] = $server['e']['password']; }
+
+ if (!empty($server['e']['gamename'])) { $server['s']['game'] = $server['e']['gamename']; } // AARMY
+ if (!empty($server['e']['gsgamename'])) { $server['s']['game'] = $server['e']['gsgamename']; } // FEAR
+ if (!empty($server['e']['game_id'])) { $server['s']['game'] = $server['e']['game_id']; } // BFVIETNAM
+
+ if ($server['b']['type'] == "arma" || $server['b']['type'] == "arma2")
+ {
+ $server['s']['map'] = $server['e']['mission'];
+ }
+ elseif ($server['b']['type'] == "vietcong2")
+ {
+ $server['e']['extinfo_autobalance'] = ord($server['e']['extinfo'][18]) == 2 ? "off" : "on";
+ // [ 13 = Vietnam and RPG Mode 19 1b 99 9b ] [ 22 23 = Mounted MG Limit ]
+ // [ 27 = Idle Limit ] [ 18 = Auto Balance ] [ 55 = Chat and Blind Spectator 5a 5c da dc ]
+ }
+ }
+
+//---------------------------------------------------------+
+
+ elseif ($lgsl_need['p'])
+ {
+ $lgsl_need['p'] = FALSE;
+
+ fwrite($lgsl_fp, "\xFE\xFD\x00\x21\x21\x21\x21\x00\xFF\x00\x00");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ $buffer = substr($buffer, 7, -1); // REMOVE HEADER / PLAYER TOTAL / FOOTER
+
+ if (!$buffer) { return FALSE; }
+
+ if (strpos($buffer, "\x00\x00") === FALSE) { return TRUE; } // NO PLAYERS
+
+ $buffer = explode("\x00\x00",$buffer, 2); // SPLIT FIELDS FROM ITEMS
+ $buffer[0] = str_replace("_", "", $buffer[0]); // REMOVE UNDERSCORES FROM FIELDS
+ $buffer[0] = str_replace("player", "name", $buffer[0]); // LGSL STANDARD
+ $field_list = explode("\x00",$buffer[0]); // SPLIT UP FIELDS
+ $item = explode("\x00",$buffer[1]); // SPLIT UP ITEMS
+
+ $item_position = 0;
+ $item_total = count($item);
+ $player_key = 0;
+
+ do
+ {
+ foreach ($field_list as $field)
+ {
+ $server['p'][$player_key][$field] = $item[$item_position];
+
+ $item_position ++;
+ }
+
+ $player_key ++;
+ }
+ while ($item_position < $item_total);
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_10(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ if ($server['b']['type'] == "quakewars") { fwrite($lgsl_fp, "\xFF\xFFgetInfoEX\xFF"); }
+ else { fwrite($lgsl_fp, "\xFF\xFFgetInfo\xFF"); }
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ if ($server['b']['type'] == "wolf2009") { $buffer = substr($buffer, 31); } // REMOVE HEADERS
+ elseif ($server['b']['type'] == "quakewars") { $buffer = substr($buffer, 33); }
+ else { $buffer = substr($buffer, 23); }
+
+ $buffer = lgsl_parse_color($buffer, "2");
+
+//---------------------------------------------------------+
+
+ while ($buffer && $buffer[0] != "\x00")
+ {
+ $item_key = strtolower(lgsl_cut_string($buffer));
+ $item_value = lgsl_cut_string($buffer);
+
+ $server['e'][$item_key] = $item_value;
+ }
+
+//---------------------------------------------------------+
+
+ $buffer = substr($buffer, 2);
+
+ $player_key = 0;
+
+//---------------------------------------------------------+
+
+ if ($server['b']['type'] == "wolf2009") // WOLFENSTEIN: (PID)(PING)(NAME)(TAGPOSITION)(TAG)(BOT)
+ {
+ while ($buffer && $buffer[0] != "\x10") // STOPS AT PID 16
+ {
+ $server['p'][$player_key]['pid'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$player_key]['ping'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['p'][$player_key]['rate'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['p'][$player_key]['unknown'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $player_name = lgsl_cut_string($buffer);
+ $player_tag_position = ord(lgsl_cut_byte($buffer, 1));
+ $player_tag = lgsl_cut_string($buffer);
+ $server['p'][$player_key]['bot'] = ord(lgsl_cut_byte($buffer, 1));
+
+ if ($player_tag == "") { $server['p'][$player_key]['name'] = $player_name; }
+ elseif ($player_tag_position == "0") { $server['p'][$player_key]['name'] = $player_tag." ".$player_name; }
+ else { $server['p'][$player_key]['name'] = $player_name." ".$player_tag; }
+
+ $player_key ++;
+ }
+ }
+
+//---------------------------------------------------------+
+
+ elseif ($server['b']['type'] == "quakewars") // QUAKEWARS: (PID)(PING)(NAME)(TAGPOSITION)(TAG)(BOT)
+ {
+ while ($buffer && $buffer[0] != "\x20") // STOPS AT PID 32
+ {
+ $server['p'][$player_key]['pid'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$player_key]['ping'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $player_name = lgsl_cut_string($buffer);
+ $player_tag_position = ord(lgsl_cut_byte($buffer, 1));
+ $player_tag = lgsl_cut_string($buffer);
+ $server['p'][$player_key]['bot'] = ord(lgsl_cut_byte($buffer, 1));
+
+ if ($player_tag_position == "") { $server['p'][$player_key]['name'] = $player_name; }
+ elseif ($player_tag_position == "1") { $server['p'][$player_key]['name'] = $player_name." ".$player_tag; }
+ else { $server['p'][$player_key]['name'] = $player_tag." ".$player_name; }
+
+ $player_key ++;
+ }
+
+ $buffer = substr($buffer, 1);
+ $server['e']['si_osmask'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "I");
+ $server['e']['si_ranked'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['si_timeleft'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 4), "I") / 1000);
+ $server['e']['si_gamestate'] = ord(lgsl_cut_byte($buffer, 1));
+ $buffer = substr($buffer, 2);
+
+ $player_key = 0;
+
+ while ($buffer && $buffer[0] != "\x20") // QUAKEWARS EXTENDED: (PID)(XP)(TEAM)(KILLS)(DEATHS)
+ {
+ $server['p'][$player_key]['pid'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$player_key]['xp'] = intval(lgsl_unpack(lgsl_cut_byte($buffer, 4), "f"));
+ $server['p'][$player_key]['team'] = lgsl_cut_string($buffer);
+ $server['p'][$player_key]['score'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "i");
+ $server['p'][$player_key]['deaths'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "i");
+ $player_key ++;
+ }
+ }
+
+//---------------------------------------------------------+
+
+ elseif ($server['b']['type'] == "quake4") // QUAKE4: (PID)(PING)(RATE)(NULLNULL)(NAME)(TAG)
+ {
+ while ($buffer && $buffer[0] != "\x20") // STOPS AT PID 32
+ {
+ $server['p'][$player_key]['pid'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$player_key]['ping'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['p'][$player_key]['rate'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $buffer = substr($buffer, 2);
+ $player_name = lgsl_cut_string($buffer);
+ $player_tag = lgsl_cut_string($buffer);
+ $server['p'][$player_key]['name'] = $player_tag ? $player_tag." ".$player_name : $player_name;
+
+ $player_key ++;
+ }
+ }
+
+//---------------------------------------------------------+
+
+ else // DOOM3 AND PREY: (PID)(PING)(RATE)(NULLNULL)(NAME)
+ {
+ while ($buffer && $buffer[0] != "\x20") // STOPS AT PID 32
+ {
+ $server['p'][$player_key]['pid'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$player_key]['ping'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['p'][$player_key]['rate'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $buffer = substr($buffer, 2);
+ $server['p'][$player_key]['name'] = lgsl_cut_string($buffer);
+
+ $player_key ++;
+ }
+ }
+
+//---------------------------------------------------------+
+
+ $server['s']['game'] = $server['e']['gamename'];
+ $server['s']['name'] = $server['e']['si_name'];
+ $server['s']['map'] = $server['e']['si_map'];
+ $server['s']['players'] = $server['p'] ? count($server['p']) : 0;
+ $server['s']['playersmax'] = $server['e']['si_maxplayers'];
+
+ if ($server['b']['type'] == "wolf2009" || $server['b']['type'] == "quakewars")
+ {
+ $server['s']['map'] = str_replace(".entities", "", $server['s']['map']);
+ $server['s']['password'] = $server['e']['si_needpass'];
+ }
+ else
+ {
+ $server['s']['password'] = $server['e']['si_usepass'];
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_11(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE: http://wiki.unrealadmin.org/UT3_query_protocol
+// UT3 RESPONSE IS REALLY MESSY SO THIS CLEANS IT UP
+
+ $status = lgsl_query_06($server, $lgsl_need, $lgsl_fp);
+
+ if (!$status) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $server['s']['map'] = $server['e']['p1073741825'];
+ unset($server['e']['p1073741825']);
+
+//---------------------------------------------------------+
+
+ $lgsl_ut3_key = array(
+ "s0" => "bots_skill",
+ "s6" => "pure",
+ "s7" => "password",
+ "s8" => "bots_vs",
+ "s10" => "forcerespawn",
+ "p268435703" => "bots",
+ "p268435704" => "goalscore",
+ "p268435705" => "timelimit",
+ "p268435717" => "mutators_default",
+ "p1073741826" => "gamemode",
+ "p1073741827" => "description",
+ "p1073741828" => "mutators_custom");
+
+ foreach ($lgsl_ut3_key as $old => $new)
+ {
+ if (!isset($server['e'][$old])) { continue; }
+ $server['e'][$new] = $server['e'][$old];
+ unset($server['e'][$old]);
+ }
+
+//---------------------------------------------------------+
+
+ $part = explode(".", $server['e']['gamemode']);
+
+ if ($part[0] && (stristr($part[0], "UT") === FALSE))
+ {
+ $server['s']['game'] = $part[0];
+ }
+
+//---------------------------------------------------------+
+
+ $tmp = $server['e']['mutators_default'];
+ $server['e']['mutators_default'] = "";
+
+ if ($tmp & 1) { $server['e']['mutators_default'] .= " BigHead"; }
+ if ($tmp & 2) { $server['e']['mutators_default'] .= " FriendlyFire"; }
+ if ($tmp & 4) { $server['e']['mutators_default'] .= " Handicap"; }
+ if ($tmp & 8) { $server['e']['mutators_default'] .= " Instagib"; }
+ if ($tmp & 16) { $server['e']['mutators_default'] .= " LowGrav"; }
+ if ($tmp & 64) { $server['e']['mutators_default'] .= " NoPowerups"; }
+ if ($tmp & 128) { $server['e']['mutators_default'] .= " NoTranslocator"; }
+ if ($tmp & 256) { $server['e']['mutators_default'] .= " Slomo"; }
+ if ($tmp & 1024) { $server['e']['mutators_default'] .= " SpeedFreak"; }
+ if ($tmp & 2048) { $server['e']['mutators_default'] .= " SuperBerserk"; }
+ if ($tmp & 8192) { $server['e']['mutators_default'] .= " WeaponReplacement"; }
+ if ($tmp & 16384) { $server['e']['mutators_default'] .= " WeaponsRespawn"; }
+
+ $server['e']['mutators_default'] = str_replace(" ", " / ", trim($server['e']['mutators_default']));
+ $server['e']['mutators_custom'] = str_replace("\x1c", " / ", $server['e']['mutators_custom']);
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_12(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE:
+// VICE CITY CURRENTLY ONLY SUPPORTS THE 'i' CHALLENGE
+
+ if ($server['b']['type'] == "samp") { $challenge_packet = "SAMP\x21\x21\x21\x21\x00\x00"; }
+ elseif ($server['b']['type'] == "vcmp") { $challenge_packet = "VCMP\x21\x21\x21\x21\x00\x00"; $lgsl_need['e'] = FALSE; $lgsl_need['p'] = FALSE; }
+
+ if ($lgsl_need['s']) { $challenge_packet .= "i"; }
+ elseif ($lgsl_need['e']) { $challenge_packet .= "r"; }
+ elseif ($lgsl_need['p']) { $challenge_packet .= "d"; }
+
+ fwrite($lgsl_fp, $challenge_packet);
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $buffer = substr($buffer, 10); // REMOVE HEADER
+
+ $response_type = lgsl_cut_byte($buffer, 1);
+
+//---------------------------------------------------------+
+
+ if ($response_type == "i")
+ {
+ $lgsl_need['s'] = FALSE;
+
+ $server['s']['password'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['players'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['s']['playersmax'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['s']['name'] = lgsl_cut_pascal($buffer, 4);
+ $server['e']['gamemode'] = lgsl_cut_pascal($buffer, 4);
+ $server['s']['map'] = lgsl_cut_pascal($buffer, 4);
+ }
+
+//---------------------------------------------------------+
+
+ elseif ($response_type == "r")
+ {
+ $lgsl_need['e'] = FALSE;
+
+ $item_total = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+
+ for ($i=0; $i<$item_total; $i++)
+ {
+ if (!$buffer) { return FALSE; }
+
+ $data_key = strtolower(lgsl_cut_pascal($buffer));
+ $data_value = lgsl_cut_pascal($buffer);
+
+ $server['e'][$data_key] = $data_value;
+ }
+ }
+
+//---------------------------------------------------------+
+
+ elseif ($response_type == "d")
+ {
+ $lgsl_need['p'] = FALSE;
+
+ $player_total = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+
+ for ($i=0; $i<$player_total; $i++)
+ {
+ if (!$buffer) { return FALSE; }
+
+ $server['p'][$i]['pid'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$i]['name'] = lgsl_cut_pascal($buffer);
+ $server['p'][$i]['score'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "S");
+ $server['p'][$i]['ping'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "S");
+ }
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_13(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ $buffer_s = ""; fwrite($lgsl_fp, "\x21\x21\x21\x21\x00"); // REQUEST [s]
+ $buffer_e = ""; fwrite($lgsl_fp, "\x21\x21\x21\x21\x01"); // REQUEST [e]
+ $buffer_p = ""; fwrite($lgsl_fp, "\x21\x21\x21\x21\x02"); // REQUEST [p]
+
+//---------------------------------------------------------+
+
+ while ($packet = fread($lgsl_fp, 4096))
+ {
+ if ($packet[4] == "\x00") { $buffer_s .= substr($packet, 5); }
+ elseif ($packet[4] == "\x01") { $buffer_e .= substr($packet, 5); }
+ elseif ($packet[4] == "\x02") { $buffer_p .= substr($packet, 5); }
+ }
+
+ if (!$buffer_s) { return FALSE; }
+
+//---------------------------------------------------------+
+// SOME VALUES START WITH A PASCAL LENGTH AND END WITH A NULL BUT THERE IS AN ISSUE WHERE
+// CERTAIN CHARACTERS CAUSE A WRONG PASCAL LENGTH AND NULLS TO APPEAR WITHIN NAMES
+
+ $buffer_s = str_replace("\xa0", "\x20", $buffer_s); // REPLACE SPECIAL SPACE WITH NORMAL SPACE
+ $buffer_s = substr($buffer_s, 5);
+ $server['e']['hostport'] = lgsl_unpack(lgsl_cut_byte($buffer_s, 4), "S");
+ $buffer_s = substr($buffer_s, 4);
+ $server['s']['name'] = lgsl_cut_string($buffer_s, 1);
+ $server['s']['map'] = lgsl_cut_string($buffer_s, 1);
+ $server['e']['gamemode'] = lgsl_cut_string($buffer_s, 1);
+ $server['s']['players'] = lgsl_unpack(lgsl_cut_byte($buffer_s, 4), "S");
+ $server['s']['playersmax'] = lgsl_unpack(lgsl_cut_byte($buffer_s, 4), "S");
+
+//---------------------------------------------------------+
+
+ while ($buffer_e && $buffer_e[0] != "\x00")
+ {
+ $item_key = strtolower(lgsl_cut_string($buffer_e, 1));
+ $item_value = lgsl_cut_string($buffer_e, 1);
+
+ $item_key = str_replace("\x1B\xFF\xFF\x01", "", $item_key); // REMOVE MOD
+ $item_value = str_replace("\x1B\xFF\xFF\x01", "", $item_value); // GARBAGE
+
+ $server['e'][$item_key] = $item_value;
+ }
+
+//---------------------------------------------------------+
+// THIS PROTOCOL RETURNS MORE INFO THAN THE ALTERNATIVE BUT IT DOES NOT
+// RETURN THE GAME NAME ! SO WE HAVE MANUALLY DETECT IT USING THE GAME TYPE
+
+ $tmp = strtolower(substr($server['e']['gamemode'], 0, 2));
+
+ if ($tmp == "ro") { $server['s']['game'] = "Red Orchestra"; }
+ elseif ($tmp == "kf") { $server['s']['game'] = "Killing Floor"; }
+
+ $server['s']['password'] = empty($server['e']['password']) && empty($server['e']['gamepassword']) ? "0" : "1";
+
+//---------------------------------------------------------+
+
+ $player_key = 0;
+
+ while ($buffer_p && $buffer_p[0] != "\x00")
+ {
+ $server['p'][$player_key]['pid'] = lgsl_unpack(lgsl_cut_byte($buffer_p, 4), "S");
+
+ $end_marker = ord($buffer_p[0]) > 64 ? "\x00\x00" : "\x00"; // DIRTY WORK-AROUND FOR NAMES WITH PROBLEM CHARACTERS
+
+ $server['p'][$player_key]['name'] = lgsl_cut_string($buffer_p, 1, $end_marker);
+ $server['p'][$player_key]['ping'] = lgsl_unpack(lgsl_cut_byte($buffer_p, 4), "S");
+ $server['p'][$player_key]['score'] = lgsl_unpack(lgsl_cut_byte($buffer_p, 4), "s");
+ $tmp = lgsl_cut_byte($buffer_p, 4);
+
+ if ($tmp[3] == "\x20") { $server['p'][$player_key]['team'] = 1; }
+ elseif ($tmp[3] == "\x40") { $server['p'][$player_key]['team'] = 2; }
+
+ $player_key ++;
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_14(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE: http://flstat.cryosphere.co.uk/global-list.php
+
+ fwrite($lgsl_fp, "\x00\x02\xf1\x26\x01\x26\xf0\x90\xa6\xf0\x26\x57\x4e\xac\xa0\xec\xf8\x68\xe4\x8d\x21");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $buffer = substr($buffer, 4); // HEADER ( 00 03 F1 26 )
+ $buffer = substr($buffer, 4); // NOT USED ( 87 + NAME LENGTH )
+ $buffer = substr($buffer, 4); // NOT USED ( NAME END TO BUFFER END LENGTH )
+ $buffer = substr($buffer, 4); // UNKNOWN ( 80 )
+
+ $server['s']['map'] = "freelancer";
+ $server['s']['password'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l") - 1 ? 1 : 0;
+ $server['s']['playersmax'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l") - 1;
+ $server['s']['players'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l") - 1;
+ $buffer = substr($buffer, 4); // UNKNOWN ( 88 )
+ $name_length = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ $buffer = substr($buffer, 56); // UNKNOWN
+ $server['s']['name'] = lgsl_cut_byte($buffer, $name_length);
+
+ lgsl_cut_string($buffer, 0, ":");
+ lgsl_cut_string($buffer, 0, ":");
+ lgsl_cut_string($buffer, 0, ":");
+ lgsl_cut_string($buffer, 0, ":");
+ lgsl_cut_string($buffer, 0, ":");
+
+ // WHATS LEFT IS THE MOTD
+ $server['e']['motd'] = substr($buffer, 0, -1);
+
+ // REMOVE UTF-8 ENCODING NULLS
+ $server['s']['name'] = str_replace("\x00", "", $server['s']['name']);
+ $server['e']['motd'] = str_replace("\x00", "", $server['e']['motd']);
+
+ // DOES NOT RETURN PLAYER INFORMATION
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_15(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ fwrite($lgsl_fp, "GTR2_Direct_IP_Search\x00");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $buffer = str_replace("\xFE", "\xFF", $buffer);
+ $buffer = explode("\xFF", $buffer);
+
+ $server['s']['name'] = $buffer[3];
+ $server['s']['game'] = $buffer[7];
+ $server['e']['version'] = $buffer[11];
+ $server['e']['hostport'] = $buffer[15];
+ $server['s']['map'] = $buffer[19];
+ $server['s']['players'] = $buffer[25];
+ $server['s']['playersmax'] = $buffer[27];
+ $server['e']['gamemode'] = $buffer[31];
+
+ // DOES NOT RETURN PLAYER INFORMATION
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_16(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE:
+// http://www.planetpointy.co.uk/software/rfactorsspy.shtml
+// http://users.pandora.be/viperius/mUtil/
+// USES FIXED DATA POSITIONS WITH RANDOM CHARACTERS FILLING THE GAPS
+
+ fwrite($lgsl_fp, "rF_S");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+// $server['e']['gamename'] = lgsl_get_string($buffer);
+ $buffer = substr($buffer, 8);
+// $server['e']['fullupdate'] = lgsl_unpack($buffer[0], "C");
+ $server['e']['region'] = lgsl_unpack($buffer[1] .$buffer[2], "S");
+// $server['e']['ip'] = ($buffer[3] .$buffer[4].$buffer[5].$buffer[6]); // UNSIGNED LONG
+// $server['e']['size'] = lgsl_unpack($buffer[7] .$buffer[8], "S");
+ $server['e']['version'] = lgsl_unpack($buffer[9] .$buffer[10], "S");
+// $server['e']['version_racecast'] = lgsl_unpack($buffer[11].$buffer[12], "S");
+ $server['e']['hostport'] = lgsl_unpack($buffer[13].$buffer[14], "S");
+// $server['e']['queryport'] = lgsl_unpack($buffer[15].$buffer[16], "S");
+ $buffer = substr($buffer, 17);
+ $server['s']['game'] = lgsl_get_string($buffer);
+ $buffer = substr($buffer, 20);
+ $server['s']['name'] = lgsl_get_string($buffer);
+ $buffer = substr($buffer, 28);
+ $server['s']['map'] = lgsl_get_string($buffer);
+ $buffer = substr($buffer, 32);
+ $server['e']['motd'] = lgsl_get_string($buffer);
+ $buffer = substr($buffer, 96);
+ $server['e']['packed_aids'] = lgsl_unpack($buffer[0].$buffer[1], "S");
+// $server['e']['ping'] = lgsl_unpack($buffer[2].$buffer[3], "S");
+ $server['e']['packed_flags'] = lgsl_unpack($buffer[4], "C");
+ $server['e']['rate'] = lgsl_unpack($buffer[5], "C");
+ $server['s']['players'] = lgsl_unpack($buffer[6], "C");
+ $server['s']['playersmax'] = lgsl_unpack($buffer[7], "C");
+ $server['e']['bots'] = lgsl_unpack($buffer[8], "C");
+ $server['e']['packed_special'] = lgsl_unpack($buffer[9], "C");
+ $server['e']['damage'] = lgsl_unpack($buffer[10], "C");
+ $server['e']['packed_rules'] = lgsl_unpack($buffer[11].$buffer[12], "S");
+ $server['e']['credits1'] = lgsl_unpack($buffer[13], "C");
+ $server['e']['credits2'] = lgsl_unpack($buffer[14].$buffer[15], "S");
+ $server['e']['time'] = lgsl_time(lgsl_unpack($buffer[16].$buffer[17], "S"));
+ $server['e']['laps'] = lgsl_unpack($buffer[18].$buffer[19], "s") / 16;
+ $buffer = substr($buffer, 23);
+ $server['e']['vehicles'] = lgsl_get_string($buffer);
+
+ // DOES NOT RETURN PLAYER INFORMATION
+
+//---------------------------------------------------------+
+
+ $server['s']['password'] = ($server['e']['packed_special'] & 2) ? 1 : 0;
+ $server['e']['racecast'] = ($server['e']['packed_special'] & 4) ? 1 : 0;
+ $server['e']['fixedsetups'] = ($server['e']['packed_special'] & 16) ? 1 : 0;
+
+ $server['e']['aids'] = "";
+ if ($server['e']['packed_aids'] & 1) { $server['e']['aids'] .= " TractionControl"; }
+ if ($server['e']['packed_aids'] & 2) { $server['e']['aids'] .= " AntiLockBraking"; }
+ if ($server['e']['packed_aids'] & 4) { $server['e']['aids'] .= " StabilityControl"; }
+ if ($server['e']['packed_aids'] & 8) { $server['e']['aids'] .= " AutoShifting"; }
+ if ($server['e']['packed_aids'] & 16) { $server['e']['aids'] .= " AutoClutch"; }
+ if ($server['e']['packed_aids'] & 32) { $server['e']['aids'] .= " Invulnerability"; }
+ if ($server['e']['packed_aids'] & 64) { $server['e']['aids'] .= " OppositeLock"; }
+ if ($server['e']['packed_aids'] & 128) { $server['e']['aids'] .= " SteeringHelp"; }
+ if ($server['e']['packed_aids'] & 256) { $server['e']['aids'] .= " BrakingHelp"; }
+ if ($server['e']['packed_aids'] & 512) { $server['e']['aids'] .= " SpinRecovery"; }
+ if ($server['e']['packed_aids'] & 1024) { $server['e']['aids'] .= " AutoPitstop"; }
+
+ $server['e']['aids'] = str_replace(" ", " / ", trim($server['e']['aids']));
+ $server['e']['vehicles'] = str_replace("|", " / ", trim($server['e']['vehicles']));
+
+ unset($server['e']['packed_aids']);
+ unset($server['e']['packed_flags']);
+ unset($server['e']['packed_special']);
+ unset($server['e']['packed_rules']);
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_17(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE: http://masterserver.savage.s2games.com
+
+ fwrite($lgsl_fp, "\x9e\x4c\x23\x00\x00\xce\x21\x21\x21\x21");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $buffer = substr($buffer, 12); // REMOVE HEADER
+
+ while ($key = strtolower(lgsl_cut_string($buffer, 0, "\xFE")))
+ {
+ if ($key == "players") { break; }
+
+ $value = lgsl_cut_string($buffer, 0, "\xFF");
+ $value = str_replace("\x00", "", $value);
+ $value = lgsl_parse_color($value, $server['b']['type']);
+
+ $server['e'][$key] = $value;
+ }
+
+ $server['s']['name'] = $server['e']['name']; unset($server['e']['name']);
+ $server['s']['map'] = $server['e']['world']; unset($server['e']['world']);
+ $server['s']['players'] = $server['e']['cnum']; unset($server['e']['cnum']);
+ $server['s']['playersmax'] = $server['e']['cmax']; unset($server['e']['cnum']);
+ $server['s']['password'] = $server['e']['pass']; unset($server['e']['cnum']);
+
+//---------------------------------------------------------+
+
+ $server['t'][0]['name'] = $server['e']['race1'];
+ $server['t'][1]['name'] = $server['e']['race2'];
+ $server['t'][2]['name'] = "spectator";
+
+ $team_key = -1;
+ $player_key = 0;
+
+ while ($value = lgsl_cut_string($buffer, 0, "\x0a"))
+ {
+ if ($value[0] == "\x00") { break; }
+ if ($value[0] != "\x20") { $team_key++; continue; }
+
+ $server['p'][$player_key]['name'] = lgsl_parse_color(substr($value, 1), $server['b']['type']);
+ $server['p'][$player_key]['team'] = $server['t'][$team_key]['name'];
+
+ $player_key++;
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_18(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE: http://masterserver.savage2.s2games.com
+
+ fwrite($lgsl_fp, "\x01");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $buffer = substr($buffer, 12); // REMOVE HEADER
+
+ $server['s']['name'] = lgsl_cut_string($buffer);
+ $server['s']['players'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['playersmax'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['time'] = lgsl_cut_string($buffer);
+ $server['s']['map'] = lgsl_cut_string($buffer);
+ $server['e']['nextmap'] = lgsl_cut_string($buffer);
+ $server['e']['location'] = lgsl_cut_string($buffer);
+ $server['e']['minimum_players'] = ord(lgsl_cut_string($buffer));
+ $server['e']['gamemode'] = lgsl_cut_string($buffer);
+ $server['e']['version'] = lgsl_cut_string($buffer);
+ $server['e']['minimum_level'] = ord(lgsl_cut_byte($buffer, 1));
+
+ // DOES NOT RETURN PLAYER INFORMATION
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_19(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ fwrite($lgsl_fp, "\xC0\xDE\xF1\x11\x42\x06\x00\xF5\x03\x21\x21\x21\x21");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $buffer = substr($buffer, 25); // REMOVE HEADER
+
+ $server['s']['name'] = lgsl_get_string(lgsl_cut_pascal($buffer, 4, 3, -3));
+ $server['s']['map'] = lgsl_get_string(lgsl_cut_pascal($buffer, 4, 3, -3));
+ $server['e']['nextmap'] = lgsl_get_string(lgsl_cut_pascal($buffer, 4, 3, -3));
+ $server['e']['gametype'] = lgsl_get_string(lgsl_cut_pascal($buffer, 4, 3, -3));
+
+ $buffer = substr($buffer, 1);
+
+ $server['s']['password'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['playersmax'] = ord(lgsl_cut_byte($buffer, 4));
+ $server['s']['players'] = ord(lgsl_cut_byte($buffer, 4));
+
+//---------------------------------------------------------+
+
+ for ($player_key=0; $player_key<$server['s']['players']; $player_key++)
+ {
+ $server['p'][$player_key]['name'] = lgsl_get_string(lgsl_cut_pascal($buffer, 4, 3, -3));
+ }
+
+//---------------------------------------------------------+
+
+ $buffer = substr($buffer, 17);
+
+ $server['e']['version'] = lgsl_get_string(lgsl_cut_pascal($buffer, 4, 3, -3));
+ $server['e']['mods'] = lgsl_get_string(lgsl_cut_pascal($buffer, 4, 3, -3));
+ $server['e']['dedicated'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['time'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 4), "f"));
+ $server['e']['status'] = ord(lgsl_cut_byte($buffer, 4));
+ $server['e']['gamemode'] = ord(lgsl_cut_byte($buffer, 4));
+ $server['e']['motd'] = lgsl_get_string(lgsl_cut_pascal($buffer, 4, 3, -3));
+ $server['e']['respawns'] = ord(lgsl_cut_byte($buffer, 4));
+ $server['e']['time_limit'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 4), "f"));
+ $server['e']['voting'] = ord(lgsl_cut_byte($buffer, 4));
+
+ $buffer = substr($buffer, 2);
+
+//---------------------------------------------------------+
+
+ for ($player_key=0; $player_key<$server['s']['players']; $player_key++)
+ {
+ $server['p'][$player_key]['team'] = ord(lgsl_cut_byte($buffer, 4));
+
+ $unknown = ord(lgsl_cut_byte($buffer, 1));
+ }
+
+//---------------------------------------------------------+
+
+ $buffer = substr($buffer, 7);
+
+ $server['e']['platoon_1_color'] = ord(lgsl_cut_byte($buffer, 8));
+ $server['e']['platoon_2_color'] = ord(lgsl_cut_byte($buffer, 8));
+ $server['e']['platoon_3_color'] = ord(lgsl_cut_byte($buffer, 8));
+ $server['e']['platoon_4_color'] = ord(lgsl_cut_byte($buffer, 8));
+ $server['e']['timer_on'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['timer_time'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 4), "f"));
+ $server['e']['time_debriefing'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 4), "f"));
+ $server['e']['time_respawn_min'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 4), "f"));
+ $server['e']['time_respawn_max'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 4), "f"));
+ $server['e']['time_respawn_safe'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 4), "f"));
+ $server['e']['difficulty'] = ord(lgsl_cut_byte($buffer, 4));
+ $server['e']['respawn_total'] = ord(lgsl_cut_byte($buffer, 4));
+ $server['e']['random_insertions'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['spectators'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['arcademode'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['ai_backup'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['random_teams'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['time_starting'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 4), "f"));
+ $server['e']['identify_friends'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['identify_threats'] = ord(lgsl_cut_byte($buffer, 1));
+
+ $buffer = substr($buffer, 5);
+
+ $server['e']['restrictions'] = lgsl_get_string(lgsl_cut_pascal($buffer, 4, 3, -3));
+
+//---------------------------------------------------------+
+
+ switch ($server['e']['status'])
+ {
+ case 3: $server['e']['status'] = "Joining"; break;
+ case 4: $server['e']['status'] = "Joining"; break;
+ case 5: $server['e']['status'] = "Joining"; break;
+ }
+
+ switch ($server['e']['gamemode'])
+ {
+ case 2: $server['e']['gamemode'] = "Co-Op"; break;
+ case 3: $server['e']['gamemode'] = "Solo"; break;
+ case 4: $server['e']['gamemode'] = "Team"; break;
+ }
+
+ switch ($server['e']['respawns'])
+ {
+ case 0: $server['e']['respawns'] = "None"; break;
+ case 1: $server['e']['respawns'] = "Individual"; break;
+ case 2: $server['e']['respawns'] = "Team"; break;
+ case 3: $server['e']['respawns'] = "Infinite"; break;
+ }
+
+ switch ($server['e']['difficulty'])
+ {
+ case 0: $server['e']['difficulty'] = "Recruit"; break;
+ case 1: $server['e']['difficulty'] = "Veteran"; break;
+ case 2: $server['e']['difficulty'] = "Elite"; break;
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_20(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ if ($lgsl_need['s'])
+ {
+ fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFFLSQ");
+ }
+ else
+ {
+ fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x57");
+
+ $challenge_packet = fread($lgsl_fp, 4096);
+
+ if (!$challenge_packet) { return FALSE; }
+
+ $challenge_code = substr($challenge_packet, 5, 4);
+
+ if ($lgsl_need['e']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x56{$challenge_code}"); }
+ elseif ($lgsl_need['p']) { fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x55{$challenge_code}"); }
+ }
+
+ $buffer = fread($lgsl_fp, 4096);
+ $buffer = substr($buffer, 4); // REMOVE HEADER
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $response_type = lgsl_cut_byte($buffer, 1);
+
+ if ($response_type == "I")
+ {
+ $server['e']['netcode'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['name'] = lgsl_cut_string($buffer);
+ $server['s']['map'] = lgsl_cut_string($buffer);
+ $server['s']['game'] = lgsl_cut_string($buffer);
+ $server['e']['gamemode'] = lgsl_cut_string($buffer);
+ $server['e']['description'] = lgsl_cut_string($buffer);
+ $server['e']['version'] = lgsl_cut_string($buffer);
+ $server['e']['hostport'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "n");
+ $server['s']['players'] = lgsl_unpack(lgsl_cut_byte($buffer, 1), "C");
+ $server['s']['playersmax'] = lgsl_unpack(lgsl_cut_byte($buffer, 1), "C");
+ $server['e']['dedicated'] = lgsl_cut_byte($buffer, 1);
+ $server['e']['os'] = lgsl_cut_byte($buffer, 1);
+ $server['s']['password'] = lgsl_unpack(lgsl_cut_byte($buffer, 1), "C");
+ $server['e']['anticheat'] = lgsl_unpack(lgsl_cut_byte($buffer, 1), "C");
+ $server['e']['cpu_load'] = round(3.03 * lgsl_unpack(lgsl_cut_byte($buffer, 1), "C"))."%";
+ $server['e']['round'] = lgsl_unpack(lgsl_cut_byte($buffer, 1), "C");
+ $server['e']['roundsmax'] = lgsl_unpack(lgsl_cut_byte($buffer, 1), "C");
+ $server['e']['timeleft'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 2), "S") / 250);
+ }
+
+ elseif ($response_type == "E")
+ {
+ $returned = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+
+ while ($buffer)
+ {
+ $item_key = strtolower(lgsl_cut_string($buffer));
+ $item_value = lgsl_cut_string($buffer);
+
+ $server['e'][$item_key] = $item_value;
+ }
+ }
+
+ elseif ($response_type == "D")
+ {
+ $returned = ord(lgsl_cut_byte($buffer, 1));
+
+ $player_key = 0;
+
+ while ($buffer)
+ {
+ $server['p'][$player_key]['pid'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$player_key]['name'] = lgsl_cut_string($buffer);
+ $server['p'][$player_key]['score'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "N");
+ $server['p'][$player_key]['time'] = lgsl_time(lgsl_unpack(strrev(lgsl_cut_byte($buffer, 4)), "f"));
+ $server['p'][$player_key]['ping'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "n");
+ $server['p'][$player_key]['uid'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "N");
+ $server['p'][$player_key]['team'] = ord(lgsl_cut_byte($buffer, 1));
+
+ $player_key ++;
+ }
+ }
+
+//---------------------------------------------------------+
+
+ if ($lgsl_need['s']) { $lgsl_need['s'] = FALSE; }
+ elseif ($lgsl_need['e']) { $lgsl_need['e'] = FALSE; }
+ elseif ($lgsl_need['p']) { $lgsl_need['p'] = FALSE; }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_21(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ fwrite($lgsl_fp,"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xffgief");
+
+ $buffer = fread($lgsl_fp, 4096);
+ $buffer = substr($buffer, 20); // REMOVE HEADER
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $server['s']['name'] = lgsl_cut_string($buffer);
+ $server['s']['map'] = lgsl_cut_string($buffer);
+ $server['e']['gamemode'] = lgsl_cut_string($buffer);
+ $server['s']['password'] = lgsl_cut_string($buffer);
+ $server['e']['progress'] = lgsl_cut_string($buffer)."%";
+ $server['s']['players'] = lgsl_cut_string($buffer);
+ $server['s']['playersmax'] = lgsl_cut_string($buffer);
+
+ switch ($server['e']['gamemode'])
+ {
+ case 0: $server['e']['gamemode'] = "Deathmatch"; break;
+ case 1: $server['e']['gamemode'] = "Team Deathmatch"; break;
+ case 2: $server['e']['gamemode'] = "Capture The Flag"; break;
+ }
+
+//---------------------------------------------------------+
+
+ $player_key = 0;
+
+ while ($buffer)
+ {
+ $server['p'][$player_key]['name'] = lgsl_cut_string($buffer);
+ $server['p'][$player_key]['score'] = lgsl_cut_string($buffer);
+
+ $player_key ++;
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_22(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ fwrite($lgsl_fp,"\x03\x00\x00");
+
+ $buffer = fread($lgsl_fp, 4096);
+ $buffer = substr($buffer, 3); // REMOVE HEADER
+
+ if (!$buffer) { return FALSE; }
+
+ $response_type = ord(lgsl_cut_byte($buffer, 1)); // TYPE SHOULD BE 4
+
+//---------------------------------------------------------+
+
+ $grf_count = ord(lgsl_cut_byte($buffer, 1));
+
+ for ($a=0; $a<$grf_count; $a++)
+ {
+ $server['e']['grf_'.$a.'_id'] = strtoupper(dechex(lgsl_unpack(lgsl_cut_byte($buffer, 4), "N")));
+
+ for ($b=0; $b<16; $b++)
+ {
+ $server['e']['grf_'.$a.'_md5'] .= strtoupper(dechex(ord(lgsl_cut_byte($buffer, 1))));
+ }
+ }
+
+//---------------------------------------------------------+
+
+ $server['e']['date_current'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "L");
+ $server['e']['date_start'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "L");
+ $server['e']['companies_max'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['companies'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['spectators_max'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['name'] = lgsl_cut_string($buffer);
+ $server['e']['version'] = lgsl_cut_string($buffer);
+ $server['e']['language'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['password'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['playersmax'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['players'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['spectators'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['map'] = lgsl_cut_string($buffer);
+ $server['e']['map_width'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['e']['map_height'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['e']['map_set'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['dedicated'] = ord(lgsl_cut_byte($buffer, 1));
+
+ // DOES NOT RETURN PLAYER INFORMATION
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_23(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE:
+// http://siteinthe.us
+// http://www.tribesmasterserver.com
+
+ fwrite($lgsl_fp, "b++");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+ $buffer = substr($buffer, 4); // REMOVE HEADER
+
+//---------------------------------------------------------+
+
+ $server['s']['game'] = lgsl_cut_pascal($buffer);
+ $server['e']['version'] = lgsl_cut_pascal($buffer);
+ $server['s']['name'] = lgsl_cut_pascal($buffer);
+ $server['e']['dedicated'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['password'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['players'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['playersmax'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['cpu'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['e']['mod'] = lgsl_cut_pascal($buffer);
+ $server['e']['type'] = lgsl_cut_pascal($buffer);
+ $server['s']['map'] = lgsl_cut_pascal($buffer);
+ $server['e']['motd'] = lgsl_cut_pascal($buffer);
+ $server['e']['teams'] = ord(lgsl_cut_byte($buffer, 1));
+
+//---------------------------------------------------------+
+
+ $team_field = "?".lgsl_cut_pascal($buffer);
+ $team_field = split("\t", $team_field);
+
+ foreach ($team_field as $key => $value)
+ {
+ $value = substr($value, 1);
+ $value = strtolower($value);
+ $team_field[$key] = $value;
+ }
+
+//---------------------------------------------------------+
+
+ $player_field = "?".lgsl_cut_pascal($buffer);
+ $player_field = split("\t", $player_field);
+
+ foreach ($player_field as $key => $value)
+ {
+ $value = substr($value, 1);
+ $value = strtolower($value);
+
+ if ($value == "player name") { $value = "name"; }
+
+ $player_field[$key] = $value;
+ }
+
+ $player_field[] = "unknown_1";
+ $player_field[] = "unknown_2";
+
+//---------------------------------------------------------+
+
+ for ($i=0; $i<$server['e']['teams']; $i++)
+ {
+ $team_name = lgsl_cut_pascal($buffer);
+ $team_info = lgsl_cut_pascal($buffer);
+
+ if (!$team_info) { continue; }
+
+ $team_info = str_replace("%t", $team_name, $team_info);
+ $team_info = split("\t", $team_info);
+
+ foreach ($team_info as $key => $value)
+ {
+ $field = $team_field[$key];
+ $value = trim($value);
+
+ if ($field == "team name") { $field = "name"; }
+
+ $server['t'][$i][$field] = $value;
+ }
+ }
+
+//---------------------------------------------------------+
+
+ for ($i=0; $i<$server['s']['players']; $i++)
+ {
+ $player_bits = array();
+ $player_bits[] = ord(lgsl_cut_byte($buffer, 1)) * 4; // %p = PING
+ $player_bits[] = ord(lgsl_cut_byte($buffer, 1)); // %l = PACKET LOSS
+ $player_bits[] = ord(lgsl_cut_byte($buffer, 1)); // %t = TEAM
+ $player_bits[] = lgsl_cut_pascal($buffer); // %n = PLAYER NAME
+ $player_info = lgsl_cut_pascal($buffer);
+
+ if (!$player_info) { continue; }
+
+ $player_info = str_replace(array("%p","%l","%t","%n"), $player_bits, $player_info);
+ $player_info = split("\t", $player_info);
+
+ foreach ($player_info as $key => $value)
+ {
+ $field = $player_field[$key];
+ $value = trim($value);
+
+ if ($field == "team") { $value = $server['t'][$value]['name']; }
+
+ $server['p'][$i][$field] = $value;
+ }
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_24(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE: http://cubelister.sourceforge.net
+
+ fwrite($lgsl_fp, "\x21\x21");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+ $buffer = substr($buffer, 2); // REMOVE HEADER
+
+//---------------------------------------------------------+
+
+ if ($buffer[0] == "\x1b") // CUBE 1
+ {
+ // RESPONSE IS XOR ENCODED FOR SOME STRANGE REASON
+ for ($i=0; $i $field)
+ {
+ $field = strtolower($field);
+
+ preg_match("/^player(.*)(\d+)$/U", $field, $match);
+
+ if (isset($match[1]))
+ {
+ // IGNORE POINTLESS PLAYER FIELDS
+ if ($match[1] == "mapname") { continue; }
+ if ($match[1] == "version") { continue; }
+ if ($match[1] == "servermapname") { continue; }
+ if ($match[1] == "serveripaddress") { continue; }
+
+ // LGSL STANDARD ( SWAP NAME AS ITS ACTUALLY THE ACCOUNT NAME )
+ if ($match[1] == "name") { $match[1] = "username"; }
+ if ($match[1] == "soldiername") { $match[1] = "name"; }
+
+ $server['p'][$match[2]][$match[1]] = $raw['attributeValues'][$key];
+ }
+ else
+ {
+ if (substr($field, 0, 6) == "server") { $field = substr($field, 6); }
+ $server['e'][$field] = $raw['attributeValues'][$key];
+ }
+ }
+
+ $lgsl_conversion = array("gamename"=>"name","mapname"=>"map","playercount"=>"players","maxplayers"=>"playersmax","flagpassword"=>"password");
+ foreach ($lgsl_conversion as $e => $s) { $server['s'][$s] = $server['e'][$e]; unset($server['ea'][$e]); } // LGSL STANDARD
+ $server['s']['playersmax'] += intval($server['e']['maxspectators']); // ADD SPECTATOR SLOTS TO MAX PLAYERS
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_27(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE:
+// http://skulltag.com/wiki/Launcher_protocol
+// http://en.wikipedia.org/wiki/Huffman_coding
+// http://www.greycube.com/help/lgsl_other/skulltag_huffman.txt
+
+ $huffman_table = array(
+ "010","110111","101110010","00100","10011011","00101","100110101","100001100","100101100","001110100","011001001","11001000","101100001","100100111","001111111","101110000","101110001","001111011",
+ "11011011","101111100","100001110","110011111","101100000","001111100","0011000","001111000","10001100","100101011","100010000","101111011","100100110","100110010","0111","1111000","00010001",
+ "00011010","00011000","00010101","00010000","00110111","00110110","00011100","01100101","1101001","00110100","10110011","10110100","1111011","10111100","10111010","11001001","11010101","11111110",
+ "11111100","10001110","11110011","001101011","10000000","000101101","11010000","001110111","100000010","11100111","001100101","11100110","00111001","10001010","00010011","001110110","10001111",
+ "000111110","11000111","11010111","11100011","000101000","001100111","11010100","000111010","10010111","100000111","000100100","001110001","11111010","100100011","11110100","000110111","001111010",
+ "100010011","100110001","11101","110001011","101110110","101111110","100100010","100101001","01101","100100100","101100101","110100011","100111100","110110001","100010010","101101101","011001110",
+ "011001101","11111101","100010001","100110000","110001000","110110000","0001001010","110001010","101101010","000110110","10110001","110001101","110101101","110001100","000111111","110010101",
+ "111000100","11011001","110010110","110011110","000101100","001110101","101111101","1001110","0000","1000010","0001110111","0001100101","1010","11001110","0110011000","0110011001","1000011011",
+ "1001100110","0011110011","0011001100","11111001","0110010001","0001010011","1000011010","0001001011","1001101001","101110111","1000001101","1000011111","1100000101","0110000000","1011011101",
+ "11110101","0001111011","1101000101","1101000100","1001000010","0110000001","1011001000","100101010","1100110","111100101","1100101111","0001100111","1110000","0011111100","11111011","1100101110",
+ "101110011","1001100111","1001111111","1011011100","111110001","101111010","1011010110","1001010000","1001000011","1001111110","0011111011","1000011110","1000101100","01100001","00010111",
+ "1000000110","110000101","0001111010","0011001101","0110011110","110010100","111000101","0011001001","0011110010","110000001","101101111","0011111101","110110100","11100100","1011001001",
+ "0011001000","0001110110","111111111","110101100","111111110","1000001011","1001011010","110000000","000111100","111110000","011000001","1001111010","111001011","011000111","1001000001",
+ "1001111100","1000110111","1001101000","0110001100","1001111011","0011010101","1000101101","0011111010","0001100100","01100010","110000100","101101100","0110011111","1001011011","1000101110",
+ "111100100","1000110110","0110001101","1001000000","110110101","1000001000","1000001001","1100000100","110001001","1000000111","1001111101","111001010","0011010100","1000101111","101111111",
+ "0001010010","0011100000","0001100110","1000001010","0011100001","11000011","1011010111","1000001100","100011010","0110010000","100100101","1001010001","110000011");
+
+//---------------------------------------------------------+
+
+ fwrite($lgsl_fp, "\x02\xB8\x49\x1A\x9C\x8B\xB5\x3F\x1E\x8F\x07");
+
+ $packet = fread($lgsl_fp, 4096);
+
+ if (!$packet) { return FALSE; }
+
+ $packet = substr($packet, 1); // REMOVE HEADER
+
+//---------------------------------------------------------+
+
+ $packet_binary = "";
+
+ for ($i=0; $i $huffman_binary)
+ {
+ $huffman_length = strlen($huffman_binary);
+
+ if (substr($packet_binary, 0, $huffman_length) === $huffman_binary)
+ {
+ $packet_binary = substr($packet_binary, $huffman_length);
+ $buffer .= chr($ascii);
+ continue 2;
+ }
+ }
+ break;
+ }
+
+//---------------------------------------------------------+
+
+ $response_status = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l"); if ($response_status != "5660023") { return FALSE; }
+ $response_time = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ $server['e']['version'] = lgsl_cut_string($buffer);
+ $response_flag = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+
+//---------------------------------------------------------+
+
+ if ($response_flag & 0x00000001) { $server['s']['name'] = lgsl_cut_string($buffer); }
+ if ($response_flag & 0x00000002) { $server['e']['wadurl'] = lgsl_cut_string($buffer); }
+ if ($response_flag & 0x00000004) { $server['e']['email'] = lgsl_cut_string($buffer); }
+ if ($response_flag & 0x00000008) { $server['s']['map'] = lgsl_cut_string($buffer); }
+ if ($response_flag & 0x00000010) { $server['s']['playersmax'] = ord(lgsl_cut_byte($buffer, 1)); }
+ if ($response_flag & 0x00000020) { $server['e']['playersmax'] = ord(lgsl_cut_byte($buffer, 1)); }
+ if ($response_flag & 0x00000040)
+ {
+ $pwad_total = ord(lgsl_cut_byte($buffer, 1));
+
+ $server['e']['pwads'] = "";
+
+ for ($i=0; $i<$pwad_total; $i++)
+ {
+ $server['e']['pwads'] .= lgsl_cut_string($buffer)." ";
+ }
+ }
+ if ($response_flag & 0x00000080)
+ {
+ $server['e']['gametype'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['instagib'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['buckshot'] = ord(lgsl_cut_byte($buffer, 1));
+ }
+ if ($response_flag & 0x00000100) { $server['s']['game'] = lgsl_cut_string($buffer); }
+ if ($response_flag & 0x00000200) { $server['e']['iwad'] = lgsl_cut_string($buffer); }
+ if ($response_flag & 0x00000400) { $server['s']['password'] = ord(lgsl_cut_byte($buffer, 1)); }
+ if ($response_flag & 0x00000800) { $server['e']['playpassword'] = ord(lgsl_cut_byte($buffer, 1)); }
+ if ($response_flag & 0x00001000) { $server['e']['skill'] = ord(lgsl_cut_byte($buffer, 1)) + 1; }
+ if ($response_flag & 0x00002000) { $server['e']['botskill'] = ord(lgsl_cut_byte($buffer, 1)) + 1; }
+ if ($response_flag & 0x00004000)
+ {
+ $server['e']['dmflags'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ $server['e']['dmflags2'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ $server['e']['compatflags'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ }
+ if ($response_flag & 0x00010000)
+ {
+ $server['e']['fraglimit'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s");
+ $timelimit = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+
+ if ($timelimit) // FUTURE VERSION MAY ALWAYS RETURN THIS
+ {
+ $server['e']['timeleft'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 2), "S") * 60);
+ }
+
+ $server['e']['timelimit'] = lgsl_time($timelimit * 60);
+ $server['e']['duellimit'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s");
+ $server['e']['pointlimit'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s");
+ $server['e']['winlimit'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s");
+ }
+ if ($response_flag & 0x00020000) { $server['e']['teamdamage'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "f"); }
+ if ($response_flag & 0x00040000) // DEPRECIATED
+ {
+ $server['t'][0]['score'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s");
+ $server['t'][1]['score'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s");
+ }
+ if ($response_flag & 0x00080000) { $server['s']['players'] = ord(lgsl_cut_byte($buffer, 1)); }
+ if ($response_flag & 0x00100000)
+ {
+ for ($i=0; $i<$server['s']['players']; $i++)
+ {
+ $server['p'][$i]['name'] = lgsl_parse_color(lgsl_cut_string($buffer), $server['b']['type']);
+ $server['p'][$i]['score'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s");
+ $server['p'][$i]['ping'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['p'][$i]['spectator'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$i]['bot'] = ord(lgsl_cut_byte($buffer, 1));
+
+ if (($response_flag & 0x00200000) && ($response_flag & 0x00400000))
+ {
+ $server['p'][$i]['team'] = ord(lgsl_cut_byte($buffer, 1));
+ }
+
+ $server['p'][$i]['time'] = lgsl_time(ord(lgsl_cut_byte($buffer, 1)) * 60);
+ }
+ }
+ if ($response_flag & 0x00200000)
+ {
+ $team_total = ord(lgsl_cut_byte($buffer, 1));
+
+ if ($response_flag & 0x00400000)
+ {
+ for ($i=0; $i<$team_total; $i++) { $server['t'][$i]['name'] = lgsl_cut_string($buffer); }
+ }
+ if ($response_flag & 0x00800000)
+ {
+ for ($i=0; $i<$team_total; $i++) { $server['t'][$i]['color'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l"); }
+ }
+ if ($response_flag & 0x01000000)
+ {
+ for ($i=0; $i<$team_total; $i++) { $server['t'][$i]['score'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s"); }
+ }
+
+ for ($i=0; $i<$server['s']['players']; $i++)
+ {
+ if ($server['t'][$i]['name']) { $server['p'][$i]['team'] = $server['t'][$i]['name']; }
+ }
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_28(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE: http://doomutils.ucoz.com
+
+ fwrite($lgsl_fp, "\xA3\xDB\x0B\x00"."\xFC\xFD\xFE\xFF"."\x01\x00\x00\x00"."\x21\x21\x21\x21");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+//---------------------------------------------------------+
+
+ $response_status = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l"); if ($response_status != "5560022") { return FALSE; }
+ $response_version = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ $response_time = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+
+ $server['e']['invited'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['version'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['s']['name'] = lgsl_cut_string($buffer);
+ $server['s']['players'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['playersmax'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['map'] = lgsl_cut_string($buffer);
+
+ $pwad_total = ord(lgsl_cut_byte($buffer, 1));
+
+ for ($i=0; $i<$pwad_total; $i++)
+ {
+ $server['e']['pwads'] .= lgsl_cut_string($buffer)." ";
+ $pwad_optional = ord(lgsl_cut_byte($buffer, 1));
+ $pwad_alternative = lgsl_cut_string($buffer);
+ }
+
+ $server['e']['gametype'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['game'] = lgsl_cut_string($buffer);
+ $server['e']['iwad'] = lgsl_cut_string($buffer);
+ $iwad_altenative = lgsl_cut_string($buffer);
+ $server['e']['skill'] = ord(lgsl_cut_byte($buffer, 1)) + 1;
+ $server['e']['wadurl'] = lgsl_cut_string($buffer);
+ $server['e']['email'] = lgsl_cut_string($buffer);
+ $server['e']['dmflags'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ $server['e']['dmflags2'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ $server['s']['password'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['inviteonly'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['players'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['playersmax'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['timelimit'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 2), "S") * 60);
+ $server['e']['timeleft'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 2), "S") * 60);
+ $server['e']['fraglimit'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s");
+ $server['e']['gravity'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "f");
+ $server['e']['aircontrol'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "f");
+ $server['e']['playersmin'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['removebots'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['voting'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['serverinfo'] = lgsl_cut_string($buffer);
+ $server['e']['startup'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+
+ for ($i=0; $i<$server['s']['players']; $i++)
+ {
+ $server['p'][$i]['name'] = lgsl_cut_string($buffer);
+ $server['p'][$i]['score'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s");
+ $server['p'][$i]['death'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s");
+ $server['p'][$i]['ping'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['p'][$i]['time'] = lgsl_time(lgsl_unpack(lgsl_cut_byte($buffer, 2), "S") * 60);
+ $server['p'][$i]['bot'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$i]['spectator'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$i]['team'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$i]['country'] = lgsl_cut_byte($buffer, 2);
+ }
+
+ $team_total = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['pointlimit'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s");
+ $server['e']['teamdamage'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "f");
+
+ for ($i=0; $i<$team_total; $i++) // RETURNS 4 TEAMS BUT IGNORE THOSE NOT IN USE
+ {
+ $server['t']['team'][$i]['name'] = lgsl_cut_string($buffer);
+ $server['t']['team'][$i]['color'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ $server['t']['team'][$i]['score'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "s");
+ }
+
+ for ($i=0; $i<$server['s']['players']; $i++)
+ {
+ if ($server['t'][$i]['name']) { $server['p'][$i]['team'] = $server['t'][$i]['name']; }
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_29(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE: http://www.cs2d.com/servers.php
+
+ if ($lgsl_need['s'] || $lgsl_need['e'])
+ {
+ $lgsl_need['s'] = FALSE;
+ $lgsl_need['e'] = FALSE;
+
+ fwrite($lgsl_fp, "\x01\x00\x03\x10\x21\xFB\x01\x75\x00");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+ $buffer = substr($buffer, 4); // REMOVE HEADER
+
+ $server['e']['bit_flags'] = ord(lgsl_cut_byte($buffer, 1)) - 48;
+ $server['s']['name'] = lgsl_cut_pascal($buffer);
+ $server['s']['map'] = lgsl_cut_pascal($buffer);
+ $server['s']['players'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['playersmax'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['gamemode'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['bots'] = ord(lgsl_cut_byte($buffer, 1));
+
+ $server['s']['password'] = ($server['e']['bit_flags'] & 1) ? "1" : "0";
+ $server['e']['registered_only'] = ($server['e']['bit_flags'] & 2) ? "1" : "0";
+ $server['e']['fog_of_war'] = ($server['e']['bit_flags'] & 4) ? "1" : "0";
+ $server['e']['friendlyfire'] = ($server['e']['bit_flags'] & 8) ? "1" : "0";
+ }
+
+ if ($lgsl_need['p'])
+ {
+ $lgsl_need['p'] = FALSE;
+
+ fwrite($lgsl_fp, "\x01\x00\xFB\x05");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+ $buffer = substr($buffer, 4); // REMOVE HEADER
+
+ $player_total = ord(lgsl_cut_byte($buffer, 1));
+
+ for ($i=0; $i<$player_total; $i++)
+ {
+ $server['p'][$i]['pid'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$i]['name'] = lgsl_cut_pascal($buffer);
+ $server['p'][$i]['team'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['p'][$i]['score'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ $server['p'][$i]['deaths'] = lgsl_unpack(lgsl_cut_byte($buffer, 4), "l");
+ }
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_30(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// REFERENCE: http://blogs.battlefield.ea.com/battlefield_bad_company/archive/2010/02/05/remote-administration-interface-for-bfbc2-pc.aspx
+// THIS USES TCP COMMUNICATION
+
+ if ($lgsl_need['s'] || $lgsl_need['e'])
+ {
+ fwrite($lgsl_fp, "\x00\x00\x00\x00\x1B\x00\x00\x00\x01\x00\x00\x00\x0A\x00\x00\x00serverInfo\x00");
+ }
+ elseif ($lgsl_need['p'])
+ {
+ fwrite($lgsl_fp, "\x00\x00\x00\x00\x24\x00\x00\x00\x02\x00\x00\x00\x0B\x00\x00\x00listPlayers\x00\x03\x00\x00\x00all\x00");
+ }
+
+//---------------------------------------------------------+
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+ $length = lgsl_unpack(substr($buffer, 4, 4), "L");
+
+ while (strlen($buffer) < $length)
+ {
+ $packet = fread($lgsl_fp, 4096);
+
+ if ($packet) { $buffer .= $packet; } else { break; }
+ }
+
+//---------------------------------------------------------+
+
+ $buffer = substr($buffer, 12); // REMOVE HEADER
+
+ $response_type = lgsl_cut_pascal($buffer, 4, 0, 1);
+
+ if ($response_type != "OK") { return FALSE; }
+
+//---------------------------------------------------------+
+
+ if ($lgsl_need['s'] || $lgsl_need['e'])
+ {
+ $lgsl_need['s'] = FALSE;
+ $lgsl_need['e'] = FALSE;
+
+ $server['s']['name'] = lgsl_cut_pascal($buffer, 4, 0, 1);
+ $server['s']['players'] = lgsl_cut_pascal($buffer, 4, 0, 1);
+ $server['s']['playersmax'] = lgsl_cut_pascal($buffer, 4, 0, 1);
+ $server['e']['gamemode'] = lgsl_cut_pascal($buffer, 4, 0, 1);
+ $server['s']['map'] = lgsl_cut_pascal($buffer, 4, 0, 1);
+ $server['e']['score_attackers'] = lgsl_cut_pascal($buffer, 4, 0, 1);
+ $server['e']['score_defenders'] = lgsl_cut_pascal($buffer, 4, 0, 1);
+
+ // CONVERT MAP NUMBER TO DESCRIPTIVE NAME
+
+ $server['e']['level'] = $server['s']['map'];
+ $map_check = strtolower($server['s']['map']);
+
+ if (strpos($map_check, "mp_001") !== FALSE) { $server['s']['map'] = "Panama Canal"; }
+ elseif (strpos($map_check, "mp_002") !== FALSE) { $server['s']['map'] = "Valparaiso"; }
+ elseif (strpos($map_check, "mp_003") !== FALSE) { $server['s']['map'] = "Laguna Alta"; }
+ elseif (strpos($map_check, "mp_004") !== FALSE) { $server['s']['map'] = "Isla Inocentes"; }
+ elseif (strpos($map_check, "mp_005") !== FALSE) { $server['s']['map'] = "Atacama Desert"; }
+ elseif (strpos($map_check, "mp_006") !== FALSE) { $server['s']['map'] = "Arica Harbor"; }
+ elseif (strpos($map_check, "mp_007") !== FALSE) { $server['s']['map'] = "White Pass"; }
+ elseif (strpos($map_check, "mp_008") !== FALSE) { $server['s']['map'] = "Nelson Bay"; }
+ elseif (strpos($map_check, "mp_009") !== FALSE) { $server['s']['map'] = "Laguna Presa"; }
+ elseif (strpos($map_check, "mp_012") !== FALSE) { $server['s']['map'] = "Port Valdez"; }
+ }
+
+//---------------------------------------------------------+
+
+ elseif ($lgsl_need['p'])
+ {
+ $lgsl_need['p'] = FALSE;
+
+ $field_total = lgsl_cut_pascal($buffer, 4, 0, 1);
+ $field_list = array();
+
+ for ($i=0; $i<$field_total; $i++)
+ {
+ $field_list[] = strtolower(lgsl_cut_pascal($buffer, 4, 0, 1));
+ }
+
+ $player_squad = array("","Alpha","Bravo","Charlie","Delta","Echo","Foxtrot","Golf","Hotel");
+ $player_team = array("","Attackers","Defenders");
+ $player_total = lgsl_cut_pascal($buffer, 4, 0, 1);
+
+ for ($i=0; $i<$player_total; $i++)
+ {
+ foreach ($field_list as $field)
+ {
+ $value = lgsl_cut_pascal($buffer, 4, 0, 1);
+
+ switch ($field)
+ {
+ case "clantag": $server['p'][$i]['name'] = $value; break;
+ case "name": $server['p'][$i]['name'] = empty($server['p'][$i]['name']) ? $value : "[{$server['p'][$i]['name']}] {$value}"; break;
+ case "teamid": $server['p'][$i]['team'] = isset($player_team[$value]) ? $player_team[$value] : $value; break;
+ case "squadid": $server['p'][$i]['squad'] = isset($player_squad[$value]) ? $player_squad[$value] : $value; break;
+ default: $server['p'][$i][$field] = $value; break;
+ }
+ }
+ }
+ }
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_31(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+// AVP 2010 ONLY ROUGHLY FOLLOWS THE SOURCE QUERY FORMAT
+// SERVER RULES ARE ON THE END OF THE INFO RESPONSE
+
+ fwrite($lgsl_fp, "\xFF\xFF\xFF\xFF\x54Source Engine Query\x00");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+ $buffer = substr($buffer, 5); // REMOVE HEADER
+
+ $server['e']['netcode'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['name'] = lgsl_cut_string($buffer);
+ $server['s']['map'] = lgsl_cut_string($buffer);
+ $server['s']['game'] = lgsl_cut_string($buffer);
+ $server['e']['description'] = lgsl_cut_string($buffer);
+ $server['e']['appid'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['s']['players'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['playersmax'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['bots'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['dedicated'] = lgsl_cut_byte($buffer, 1);
+ $server['e']['os'] = lgsl_cut_byte($buffer, 1);
+ $server['s']['password'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['anticheat'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['e']['version'] = lgsl_cut_string($buffer);
+
+ $buffer = substr($buffer, 1);
+ $server['e']['hostport'] = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
+ $server['e']['friendlyfire'] = $buffer[124];
+
+ // DOES NOT RETURN PLAYER INFORMATION
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_32(&$server, &$lgsl_need, &$lgsl_fp)
+ {
+//---------------------------------------------------------+
+
+ fwrite($lgsl_fp, "\x05\x00\x00\x01\x0A");
+
+ $buffer = fread($lgsl_fp, 4096);
+
+ if (!$buffer) { return FALSE; }
+
+ $buffer = substr($buffer, 5); // REMOVE HEADER
+
+ $server['s']['name'] = lgsl_cut_pascal($buffer);
+ $server['s']['map'] = lgsl_cut_pascal($buffer);
+ $server['s']['players'] = ord(lgsl_cut_byte($buffer, 1));
+ $server['s']['playersmax'] = 0; // HELD ON MASTER
+
+ // DOES NOT RETURN PLAYER INFORMATION
+
+//---------------------------------------------------------+
+
+ return TRUE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+function lgsl_query_33(&$server, &$lgsl_need, &$lgsl_fp)
+{
+ if (strpos(fread($lgsl_fp, 4096), 'TS') === FALSE) { return FALSE; }
+ $ver = $server['b']['type'] == 'ts3' ? 1 : 0;
+ $param[0] = array('sel ','si',"\r\n",'pl');
+ $param[1] = array('use port=','serverinfo',' ','clientlist -country');
+ if ($ver) { fread($lgsl_fp, 4096); }
+ fwrite($lgsl_fp, $param[$ver][0].$server['b']['c_port']."\n"); // select virtualserver
+ if (strtoupper(substr(fread($lgsl_fp, 4096), -4, -2)) != 'OK') { return FALSE; }
+
+ fwrite($lgsl_fp, $param[$ver][1]."\n"); // request serverinfo
+ $buffer = fread($lgsl_fp, 4096);
+ if (!$buffer || substr($buffer, 0, 5) == 'error') { return FALSE; }
+ while (strtoupper(substr($buffer, -4, -2)) != 'OK') {
+ $part = fread($lgsl_fp, 4096);
+ if ($part && substr($part, 0, 5) != 'error') { $buffer .= $part; } else { break; }
+ }
+
+ while ($val = lgsl_cut_string($buffer, 7+7*$ver, $param[$ver][2])) {
+ $key = lgsl_cut_string($val, 0, '='); $items[$key] = $val;
+ }
+ if (!isset($items['name'])) { return FALSE; }
+ $server['s']['name'] = $ver ? lgsl_unescape($items['name']) : $items['name'];
+ $server['s']['map'] = "teamspeak";
+ $server['s']['players'] = intval($items[$ver ? 'clientsonline' : 'currentusers']) - $ver;
+ $server['s']['playersmax'] = intval($items[$ver ? 'maxclients' : 'maxusers']);
+ $server['s']['password'] = intval($items[$ver ? 'flag_password' : 'password']);
+ $server['e']['platform'] = $items['platform'];
+ $server['e']['motd'] = $ver ? lgsl_unescape($items['welcomemessage']) : $items['welcomemessage'];
+ $server['e']['uptime'] = lgsl_time($items['uptime']);
+ $server['e']['channels'] = $items[$ver ? 'channelsonline' : 'currentchannels'];
+ if ($ver) { $server['e']['version'] = lgsl_unescape($items['version']); }
+ if (!$lgsl_need['p'] || $server['s']['players'] < 1) { return TRUE; }
+
+ fwrite($lgsl_fp, $param[$ver][3]."\n"); // request playerlist
+ $buffer = fread($lgsl_fp, 4096);
+ while (substr($buffer, -4) != "OK\r\n" && substr($buffer, -2) != "\n\r") {
+ $part = fread($lgsl_fp, 4096);
+ if ($part && substr($part, 0, 5) != 'error') { $buffer .= $part; } else { break; }
+ }
+
+ $i = 0;
+ if ($ver) {
+ while ($items = lgsl_cut_string($buffer, 0, '|')) {
+ lgsl_cut_string($items, 0, 'e='); $name = lgsl_cut_string($items, 0, ' ');
+ if (substr($name, 0, 15) == 'Unknown\sfrom\s') { continue; }
+ $server['p'][$i]['name'] = lgsl_unescape($name); lgsl_cut_string($items, 0, 'ry');
+ $server['p'][$i]['country'] = substr($items, 0, 1) == '=' ? substr($items, 1, 2) : ''; $i++;
+ }
+ }
+ else {
+ $buffer = substr($buffer, 89, -4);
+ while ($items = lgsl_cut_string($buffer, 0, "\r\n")) {
+ $items = explode("\t", $items);
+ $server['p'][$i]['name'] = substr($items[14], 1, -1);
+ $server['p'][$i]['ping'] = $items[7];
+ $server['p'][$i]['time'] = lgsl_time($items[8]); $i++;
+ }
+ }
+ return TRUE;
+}
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_34(&$server, &$lgsl_need, &$lgsl_fp) // Rage:MP
+ {
+ $buffer = json_decode($lgsl_fp, true);
+
+ if(!$buffer) return FALSE;
+
+ $found = false;
+ foreach($buffer as $key => $value){
+ if($key == $server['b']['ip'].':'.$server['b']['c_port']){
+ $found = true;
+ $server['s']['name'] = $value['name'];
+ $server['s']['map'] = "ragemp";
+ $server['s']['players'] = $value['players'];
+ $server['s']['playersmax'] = $value['maxplayers'];
+ $server['e']['url'] = $value['url'];
+ $server['e']['peak'] = $value['peak'];
+ $server['e']['gamemode'] = $value['gamemode'];
+ $server['e']['lang'] = $value['lang'];
+ break;
+ }
+ }
+ return $found;
+ }
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_35(&$server, &$lgsl_need, &$lgsl_fp) // FiveM
+ {
+ fwrite($lgsl_fp, "\xFF\xFF\xFF\xFFgetinfo xxx");
+ $buffer = fread($lgsl_fp, 4096);
+
+ if(!$buffer) return FALSE;
+
+ lgsl_cut_byte($buffer, 18);
+
+ $data = explode('\\', $buffer);
+
+ for ($i = 0; $i < count($data); $i += 2) {
+ switch($data[$i]){
+ case 'sv_maxclients': $server['s']['playersmax'] = $data[$i + 1]; break;
+ case 'clients': $server['s']['players'] = $data[$i + 1]; break;
+ case 'hostname': $server['s']['name'] = lgsl_parse_color($data[$i + 1], "fivem"); break;
+ case 'mapname': $server['s']['map'] = $data[$i + 1]; break;
+ default: $server['e'][$data[$i]] = $data[$i + 1]; break;
+ }
+ }
+ return true;
+ }
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_36(&$server, &$lgsl_need, &$lgsl_fp) // Discord
+ {
+ $buffer = json_decode($lgsl_fp, true);
+
+ if(!$buffer) return FALSE;
+
+ $server['s']['name'] = $buffer['name'];
+ $server['s']['map'] = 'discord';
+ $server['s']['players'] = $buffer['presence_count'];
+ $server['s']['playersmax'] = 10000;
+ $server['e']['instant_invite'] = $buffer['instant_invite'];
+ $server['e']['id'] = $buffer['id'];
+
+ if(isset($buffer['channels']))
+ foreach($buffer['channels'] as $key => $value){
+ $server['e']['channel'.$key] = $value['name'];
+ }
+
+ if(isset($buffer['members']))
+ foreach($buffer['members'] as $key => $value){
+ $server['p'][$key]['name'] = $value['username'];
+ $server['p'][$key]['status'] = $value['status'];
+ $server['p'][$key]['game'] = isset($value['game']) ? $value['game']['name'] : '--';
+ }
+
+ return true;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+function lgsl_unescape($text) {
+ $escaped = array('\t', '\v', '\r', '\n', '\f', '\s', '\p', '\/');
+ $unescaped = array(' ', ' ', ' ', ' ', ' ', ' ', '|', '/');
+ $text = str_replace($escaped, $unescaped, $text);
+ return $text;
+}
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_query_feed(&$server, $request, $lgsl_feed_method, $lgsl_feed_url)
+ {
+//---------------------------------------------------------+
+
+ $lgsl_feed_error = 0;
+
+ $host = parse_url($lgsl_feed_url);
+
+ if (empty($host['host']) || empty($host['path'])) { exit("LGSL FEED PROBLEM: INVALID URL"); }
+
+ $host_query = "?type={$server['b']['type']}&ip={$server['b']['ip']}&c_port={$server['b']['c_port']}&q_port={$server['b']['q_port']}&s_port={$server['b']['s_port']}&request={$request}&version=5.8";
+
+ if (function_exists("json_decode")) { $host_query .= function_exists("gzuncompress") ? "&format=4" : "&format=3"; }
+ else { $host_query .= function_exists("gzuncompress") ? "&format=2" : "&format=1"; }
+
+ $referrer = preg_replace("/(.*):\/\//i", "", $_SERVER['HTTP_HOST'])."/{$_SERVER['SCRIPT_NAME']}";
+ $referrer = "http://".str_replace("//", "/", $referrer);
+ $referrer = empty($_SERVER['QUERY_STRING']) ? $referrer : "{$referrer}?{$_SERVER['QUERY_STRING']}";
+
+//---------------------------------------------------------+
+
+ if (function_exists('curl_init') && function_exists('curl_setopt') && function_exists('curl_exec') && $lgsl_feed_method == 1)
+ {
+ $lgsl_curl = curl_init();
+
+ curl_setopt($lgsl_curl, CURLOPT_HEADER, 0);
+ curl_setopt($lgsl_curl, CURLOPT_HTTPGET, 1);
+ curl_setopt($lgsl_curl, CURLOPT_TIMEOUT, 6);
+ curl_setopt($lgsl_curl, CURLOPT_ENCODING, "");
+ curl_setopt($lgsl_curl, CURLOPT_FORBID_REUSE, 1);
+ curl_setopt($lgsl_curl, CURLOPT_FRESH_CONNECT, 1);
+ curl_setopt($lgsl_curl, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($lgsl_curl, CURLOPT_CONNECTTIMEOUT, 6);
+ curl_setopt($lgsl_curl, CURLOPT_REFERER, $referrer);
+ curl_setopt($lgsl_curl, CURLOPT_URL, "http://{$host['host']}{$host['path']}{$host_query}");
+
+ $http_reply = curl_exec($lgsl_curl);
+
+ if (curl_error($lgsl_curl))
+ {
+ $lgsl_feed_error = 1;
+ }
+
+ curl_close($lgsl_curl);
+ }
+
+//---------------------------------------------------------+
+
+ elseif (function_exists('fsockopen'))
+ {
+ $lgsl_fp = @fsockopen($host['host'], "80", $errno, $errstr, 6);
+
+ if (!$lgsl_fp)
+ {
+ $lgsl_feed_error = 1;
+ }
+ else
+ {
+ stream_set_timeout($lgsl_fp, 6, 0);
+ stream_set_blocking($lgsl_fp, TRUE);
+
+ $http_send = "GET {$host['path']}{$host_query} HTTP/1.0\r\n";
+ $http_send .= "Host: {$host['host']}\r\n";
+ $http_send .= "Referer: {$referrer}\r\n";
+ $http_send .= "Pragma: no-cache\r\n";
+ $http_send .= "Cache-Control: max-age=0\r\n";
+ $http_send .= "Accept-Encoding: \r\n";
+ $http_send .= "Accept-Language: en-us,en;q=0.5\r\n";
+ $http_send .= "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n";
+ $http_send .= "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n";
+ $http_send .= "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.4) Gecko/20091028\r\n";
+ $http_send .= "Connection: Close\r\n\r\n";
+
+ fwrite($lgsl_fp, $http_send);
+
+ $http_reply = "";
+
+ while (!feof($lgsl_fp))
+ {
+ $http_chunk = fread($lgsl_fp, 4096);
+ if ($http_chunk === "") { break; }
+ $http_reply .= $http_chunk;
+ }
+
+ @fclose($lgsl_fp);
+ }
+ }
+
+//---------------------------------------------------------+
+
+ else
+ {
+ exit("LGSL FEED PROBLEM: NO CURL OR FSOCKOPEN SUPPORT");
+ }
+
+//---------------------------------------------------------+
+
+ if (!$lgsl_feed_error)
+ {
+ if (preg_match("/_F([1-4])_(.*)_F([1-4])_/U", $http_reply, $match))
+ {
+ if ($match[1] == 4 && $match[3] == 4) { $server = json_decode(gzuncompress(base64_decode($match[2])), TRUE); }
+ elseif ($match[1] == 3 && $match[3] == 3) { $server = json_decode( (base64_decode($match[2])), TRUE); }
+ elseif ($match[1] == 2 && $match[3] == 2) { $server = unserialize(gzuncompress(base64_decode($match[2]))); }
+ elseif ($match[1] == 1 && $match[3] == 1) { $server = unserialize( (base64_decode($match[2]))); }
+ }
+ elseif (preg_match("/_SLGSLF_(.*)_SLGSLF_/U", $http_reply, $match))
+ {
+ $server = unserialize($match[1]);
+ }
+ else
+ {
+ $lgsl_feed_error = 2;
+ }
+
+ if (!$lgsl_feed_error && empty($server))
+ {
+ $lgsl_feed_error = 3;
+ }
+ }
+
+//---------------------------------------------------------+
+
+ switch($lgsl_feed_error)
+ {
+ case 1: // CONNECTION PROBLEM - FEED MAYBE TEMPORARLY OFFLINE
+ $server['s']['name'] = "---";
+ $server['s']['map'] = "---";
+ $server['e'] = array("feed" => "Failed To Connect");
+ $server['p'] = array();
+ break;
+
+ case 2: // NO FEED DATA - MAYBE WRONG FEED URL
+ exit("FEED MISSING FROM: {$host['host']}{$host['path']} RETURNED: ".htmlspecialchars($http_reply, ENT_QUOTES)." :END
");
+ break;
+
+ case 3: // UNABLE TO UNPACK FEED DATA - MAYBE ERRORS ON FEED
+ exit("FEED CORRUPTION FROM: {$host['host']}{$host['path']} RETURNED: ".htmlspecialchars($http_reply, ENT_QUOTES)." :END
");
+ break;
+ }
+
+//---------------------------------------------------------+
+
+ // FALSE IS SO LOCAL OFFLINE CODE TAKES OVER
+ return $server['b']['status'] ? TRUE : FALSE;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ function lgsl_parse_color($string, $type)
+ {
+ switch($type)
+ {
+ case "1":
+ $string = preg_replace("/\^x.../", "", $string);
+ $string = preg_replace("/\^./", "", $string);
+
+ $string_length = strlen($string);
+ for ($i=0; $i<$string_length; $i++)
+ {
+ $char = ord($string[$i]);
+ if ($char > 160) { $char = $char - 128; }
+ if ($char > 126) { $char = 46; }
+ if ($char == 16) { $char = 91; }
+ if ($char == 17) { $char = 93; }
+ if ($char < 32) { $char = 46; }
+ $string[$i] = chr($char);
+ }
+ break;
+
+ case "2":
+ $string = preg_replace("/\^[\x20-\x7E]/", "", $string);
+ break;
+
+ case "doomskulltag":
+ $string = preg_replace("/\\x1c./", "", $string);
+ break;
+
+ case "farcry":
+ $string = preg_replace("/\\$\d/", "", $string);
+ break;
+
+ case "fivem":
+ $string = preg_replace("/\^\d/", "", $string);
+ break;
+
+ case "painkiller":
+ $string = preg_replace("/#./", "", $string);
+ break;
+
+ case "quakeworld":
+ $string_length = strlen($string);
+ for ($i=0; $i<$string_length; $i++)
+ {
+ $char = ord($string[$i]);
+ if ($char > 141) { $char = $char - 128; }
+ if ($char < 32) { $char = $char + 30; }
+ $string[$i] = chr($char);
+ }
+ break;
+
+ case "savage":
+ $string = preg_replace("/\^[a-z]/", "", $string);
+ $string = preg_replace("/\^[0-9]+/", "", $string);
+ $string = preg_replace("/lan .*\^/U", "", $string);
+ $string = preg_replace("/con .*\^/U", "", $string);
+ break;
+
+ case "swat4":
+ $string = preg_replace("/\[c=......\]/Usi", "", $string);
+ break;
+ }
+ return $string;
+ }
+
+//---------------------------------------------------------+
+
+ function lgsl_time($seconds)
+ {
+ if ($seconds === "") { return ""; }
+
+ $n = $seconds < 0 ? "-" : "";
+
+ $seconds = abs($seconds);
+
+ $h = intval($seconds / 3600);
+ $m = intval($seconds / 60 ) % 60;
+ $s = intval($seconds ) % 60;
+
+ $h = str_pad($h, "2", "0", STR_PAD_LEFT);
+ $m = str_pad($m, "2", "0", STR_PAD_LEFT);
+ $s = str_pad($s, "2", "0", STR_PAD_LEFT);
+
+ return "{$n}{$h}:{$m}:{$s}";
+ }
+
+//---------------------------------------------------------+
+
+ function lgsl_unpack($string, $format)
+ {
+ list(,$string) = @unpack($format, $string);
+
+ return $string;
+ }
+
+//---------------------------------------------------------+
+
+ function lgsl_cut_byte(&$buffer, $length)
+ {
+ $string = substr($buffer, 0, $length);
+ $buffer = substr($buffer, $length);
+
+ return $string;
+ }
+
+//---------------------------------------------------------+
+
+ function lgsl_cut_string(&$buffer, $start_byte = 0, $end_marker = "\x00")
+ {
+ $buffer = substr($buffer, $start_byte);
+ $length = strpos($buffer, $end_marker);
+
+ if ($length === FALSE) { $length = strlen($buffer); }
+
+ $string = substr($buffer, 0, $length);
+ $buffer = substr($buffer, $length + strlen($end_marker));
+
+ return $string;
+ }
+
+//---------------------------------------------------------+
+
+ function lgsl_cut_pascal(&$buffer, $start_byte = 1, $length_adjust = 0, $end_byte = 0)
+ {
+ $length = ord(substr($buffer, 0, $start_byte)) + $length_adjust;
+ $string = substr($buffer, $start_byte, $length);
+ $buffer = substr($buffer, $start_byte + $length + $end_byte);
+
+ return $string;
+ }
+
+//---------------------------------------------------------+
+
+ function lgsl_get_string($buffer, $start_byte = 0, $end_marker = "\x00")
+ {
+ $buffer = substr($buffer, $start_byte);
+ $length = strpos($buffer, $end_marker);
+
+ if ($length === FALSE) { $length = strlen($buffer); }
+
+ $string = substr($buffer, 0, $length);
+
+ return $string;
+ }
+
+//---------------------------------------------------------+
+
+ function lgsl_gs_crypt($type, &$buffer, $encrypt = FALSE)
+ {
+ $master_key = pack("H*",
+ "f5c5914b27235dc0dc274200ddd187c32fe02aed5fc5c079518f49208e4c5548aaef313c5d2e7c91dc580d3cd9e1aec577595325d3c5c84b44a020802becb17e".
+ "7d6b6b87e8a4ebc8e4cafbaf5720f9600818b334ad2695ba0f19e1fbd48d0139f05e9059e98a15c79ebabb4f3aa8039d8720aef2bf1b4693a67a20a114b8505b".
+ "693cf5b24a236503582ecdb8109a7d89a8d90d660b96435b4656ecec3fff2086e94c54988843d2aa55adefb2d47fc804c0024a7897e993b2326e8990e425f7c8".
+ "38aef55f2002f22d84479f43849de260a8a2de6a7de09225c275a172729e65be687182bde68cb17b3fd77bf513c8045f0b6696d3a501b255db0632e36c0e7806".
+ "c5c193b5b9a9c621f0ac9a0ee72196edbb336e7431b75eba95d02191048ab7c3874578218d79a2623e308184fdac98a1568c09b8907d8411e29c53823a3a68bc".
+ "c785547ebb29401822da7fa59c6fc412cf2a9201f31336bcdffe78501058b1d7814e920ceee7aca8fa798f10f0a8ba19a1deae864e1c77f974880e5571a4380b".
+ "52d3357ec8cbf8ff6ff7e8f3fa6223f923e4a7bb1918054bcd2a115e466307f39d964c051983f8b2e5db0b39332ec08c94d9b36a4594ab5e868bc888e4586687".
+ "b6e62b2bb06ad0903544e379d744896f95346a0238b2b72c6d38ed1bf011185bad1910812cfe2c5b38db10433088f2e5a3746e7302467d35e8f07722fad1f7d4".
+ "283fbea23fa6f50f710491b1f0a8dd3a187939e7f344de57c256ffb063791fc556d3791570a873537c3f05f8ca08aa1eb2e3f641e0fb46fde7394f8fb4c216d7".
+ "55c020b405a21b8e4340136fc9583800afd87a677d3d9b6b95585ba502d6db2dec504f25b612340e29be64700682f4f012908e2672916ba83d35deb58d826d83".
+ "d75a61f726876747d78df10a31f6acb36cb64dec47b7da11c7e7177dcc097965a50065e8e5f91732e20647604c00c0fa451f7ee140d93515b7b5e6f9e0c92ad0".
+ "29648ab1e0ea363c5a19d12832c54c0ae67baa7e029217ede5f97cd07ebf3aaf14c020f4646e3792e2472409299868b9ee1ce7a69a30203218289523d848a2ee".
+ "42b96edf05f24182491dfb048c17f815aa8983d9ab72723defbe9750cd694bc1318c92862ed7b7ab1e37472b986a7f4745224fd723e4e6ef53ff6d5f51f1b8cd".
+ "34b32b9ac92968e5ec8b631aa750e7cec51e7fddca5da1cdc836c0243ab2a2f86d072479c117738fafba4d72db6fee13274d652a7c76ff962c1389b32f95f3c0".
+ "04d178b71646fe084507e7dd4b4db98405cb72399f78f989c188fb2ed6e18e5aa417adae504d33ad8414f9e3a6e466837062e8ea91664f63134539679b119d6b".
+ "3918f833ceddc249933b0ae83e0965b38fb86d3da02622d02f57c7282e5f0cdb18f71e7450c538ddca55588575f80754dd0c89840bcf7e246e8f041309069f15".
+ "a49c27fa0a5913c72be881ae27ff6b0332701d96dc295576d2a9bc0fd266f5604da647f78d1c2ced95c4cf8a929c55bf524198898b444c67040d7c7debcc3cc9".
+ "7cab1a8fe190f4db097beaccea9a34e38380b43bd2b2bf98f471c02894aaaf3944680988497aa74d293238d503a4df19d90af204fdcbb1875170a96b7f3e288c".
+ "0f24e1c8b9ce4f77f2b03944c2abbacba69331a244923c38f731f368d10eca82dd503bdece016064c68cb38a4e3408712959cb5216dc42bf5365eb789c484bcc".
+ "5813a1f1680fc5606e8da06bd5a68a73bd593fcd4aeb9aca06bb258f84a38dd0d4c6c0c355c4d5e0e1a97abaa11869f26285a99db4dfb8eab0b0f53e80d2486b".
+ "9a6cc63affac0b830b12434ddbc1c4ef3ee46af67fcc711b88a352d2b324c0acfb35bfbe74865afd7f3293a944cd9f69230a206c5112ed9858497ddc118c0338".
+ "63f1a974b033a225c74e83c9d1bec1a3e6a7b2b7ddab58aec40fe4bed9e2fd1beaded608c695dafaf4d683fdf3b9175d1283d7d99b47c40209a555c317e29bad".
+ "574ac49e78ae91896b527d27f04d89b10d5f754b953d1218bf01fc06086c031ff334eab692e9c6fb221ac0f3027283ac5350d860f2d6125d31edf4b7ac806f21".
+ "abeb04f84230e8c17455e54a27d6862cfb3279370eae1cdb1f84c10209e89241182c307b45a6b97520a62bc263c66f78d27b52ad9728f5d78c1626297b1d1cdd".
+ "e47fd67d9f1f4846a3643810359f2cc6b22a662683836eb48f6e1605be3a830fe29f0c54412e7d82aefff9748a2fddb368dd0103161e2a17da69216e22adf6b5".
+ "7ce255e400279188655820eedd5a1935aa3d8cf621fa312bab89cbb3071bfbe7e0635126de8217bd5c342f35824511769ac6b72de09b87012cd85f2cbef53e11".
+ "9aba484771b15bddda183501230ae6a16fcde55a161df16f178e04478a3711437dc91eeabe92e14b44d2f49036532be42c425346df9d91288aa409a63272e061".
+ "baaaca491cc04c44b2ac739290baa76d9fdc7b66733548af6411a6ba790c4962ddf033e63fab462bc0ccbfa45d45ce377d32f4c7e905cab5fbbb524f8c2907d0".
+ "41b304d1f38f348efd34a7d51c118445d05353b5f0449f368450782df457ca55169bdfa817a94e1082faf4115cf3d6d890481affb2feb95145691f152485465d".
+ "0f8dba4cde2079784574fadbe805222e3a132934f1a419cda032b310fd7dfa2830d3f3385d646ba0c373cba4d624a6267300014cdd2dd5e87999aa5b0e5df0a8".
+ "de50f3473918474ccf82f9c8ab9f31379a9d8d00bead3bc8b9d00f4ebba9c7b0ea882454e3a785e096d7887b3a507f089dba88925df12c633241ed2f9f68905b".
+ "66775d1d0ca3cc312f7be8641856be8de24248e55dd737df8410e23e9457024f534261f09ab278821b1c89da824f7f546a4163f4d53ccf07ee9bd59adb673822".
+ "87092b94a7847141a796a6abf90f7bfa5d8967bfba2275283863bfc3f8283f0e5b223748a55dff04f3c6bf228bb1e0bfd2c80289abf5819e165268b4e687bcf4".
+ "a33f1c42c47a6236ca14c26778ad2cbe013c20807e45276d49a4e0df7df7c42d2c73f298f61fc8e778ba953a71c6b7d1779624552df0f3896a790671a3a981fa".
+ "17914d856321d0997ff4b2d05944335ceac60b63b1d827eab5ef7483990e9bd1b5453a473e1efd476ba1e093466cb21dc72e35dc12bb8c8d3bb29db420251590".
+ "32441b8a7e9458cad9cdc1551ce52312bb27d858a8ae319e525b38f20242a60933b2a21bd858e147cc6ee702983c84bf535d1575a54dc46c03cdb42a39d1a64e".
+ "433d9bea41f9915f7d9d462d4308baccb19bb1adc3e0125715950f7c7f8b54312826204fd512386da587bad7bf81069dc554fd8fd77153832225e56a7fa4046b".
+ "d588ed258dc7e54ccf1c021f9800376376bdcfc62116555ab0e06b3161b3b7a6a7a87de2371215207c43fce54c82feddc5d444b08f6a30c0095007d526da1b02".
+ "41563a9360f86ef3b824294bd174679f4dee74912acdeb00ac96a713ad86dc212a544b7420fa6c83d5dec48400e1f11f8163e20c932bc893820a8261939e0f85".
+ "fdb416c6a0a18cc0182d675702a8362694f23ce686962150f862357fe84a0b572068c7e0578909d7f82c87cd17e7ef50e5566eab694ac76edb4b6d8a85cd2910".
+ "0b93272b0a524a24db8db7d4622fae63d982e4090fb519e30736d5b5152d58a234919d216d0294628841cba91ed72d985ba92f7cc548378e7ddf812816ad99dd".
+ "27adffdf5b6d762a79a942d8af9a8f0ac81afc98869dcdcc06835478947ced5ccbb22d02624e207c774042fa8c133221c362bef69582c52ca9c014db1ec2d351".
+ "a1d72bb01c06e32ca0a4ecfe923737f0f7145b27c943a9be1f174dd46d3af58e7a2f612177affd11ae7e1b9231aadb46bcb732ee79de7e62f467721f06d8e9e5".
+ "59b526bb702ddbc0f0b46a2162458c15c0154cbb1b1edad3fa198a0781279ecc5e5391269c335bc94b2f21da781cf943cd0e700206128fe1f1e3af4e70bfbaec".
+ "1c7ae4884c7e7544050036b001f87fc2f10762888701c160010e7691ea2b53b646d22178ebf1a56eb9cba86ffa2b570d846e231037d403298103c61732b04113".
+ "ff7ec74e0a671332f7df9da231f995c1fb53523c17c23105312b7d8ab63e5f6a0e7b9d106f3ce575d14befb3a5803aabcc9edb5f1ddf9dcabff4efbd785b169d".
+ "f7fb1b991faf63f064b5fc8f2c7fcac4b35a61f19c92dec36a6aadf02dc3942dde51d7225aefeaf6b7527183c2adc832c6bc8735bc7be2c18ad3d70653f91581".
+ "ce42a275ef6715932ae7513d0ecb726be54c167cc89445a08cb8e12fc583aee815b3947bd1ac781fcbfbdda25fe3e931a21c47058197ceffbe9bd2ac6394b2d5".
+ "95c3e10076c3aceba33b1556029edfbc04849e0d66713f7beeb1517dcd43279a5073ec9fa221bfaceef0f639e771a44156778cbb696af28e2437eea3fc025d27".
+ "70b1409d978e4ec808c58288d525ac977db0ace80d9554925bf8767b8e91a9bf1ed25deabdbb93315ca08f711ae3f768a911eeacd93bfa6db3957da83c0fd945".
+ "a7e596b66530aa7347e04590fd31db6b49485a9ea8208c0aab4068f482b185aaed6ee69e32f9ff7b882763da34f6e3bce94c79353ef6849d47e6345d8727e076".
+ "f1aa0133c2399e4d777525fe9aa29e75d23df6e829f9058580413d5c24f85568beb1343430f393adee28ab54e220b4c884fa6ebc2825705f863ba7d82977f653".
+ "edb2088abd84ad52a1810a52abc6e7c3b5687f3bf4744941ce48c876205f2497b641e6e4bb565ab816425c348e1f034104efda9a21723b00cdadc6ed2af6b225".
+ "524ae512afba6bc19c471e14bbba042dba641424005a816f25aee44ee84cf2f729b79b1b9d58218f0274d92168c9bb1cd1c141b5f8341a3a4dc78c0ddf08dfd4".
+ "110b4eb0b71b265fe70aa5a4b2186cafad5ff94dafd5b4b4560bac45cb47c4c863274ac2d84af46b75bfde496d39984ff0af8ab7d98bc12c02ce782b23268d03".
+ "864826b0201d8d1e0c09c9ab229a2f7fe1504795bafa8b8ae13fb046a2f35233a49b772b57862ada835951742439693ed9f3a080aea7a1309de4ae04b1ce3d78".
+ "72cdd85a3544906afaf55aff8255bdb2367c7ecf184c91c8f4c60a1301b80f8bb9f0ff6d80ac6e1c9d6c9fafbc65199790e0a9c323e68b105f5c56eed2f60294".
+ "5ab59d79698829ba092cc97f37dd023595d3fa014e718cda23d6bdbbfd70c2c6cc1b9121d22eae0bde7b94277dc8e5e096d60351f2740ddb986c7e10e0af8a40".
+ "e9bd526f863cde028dd253e18013d3c76c2006a9ab9ec3e7b6b1aca865b2ace8c8debb50ae1efbc0e49dd69f128c28bd02d79f22717e2679d5142540733cb278".
+ "0969944106122d5f2baf97f7e09ef67b894cd191411126ad962e4b9c5a0bbe83215563662ce5f063ce2a76c2e09613539fbb094d389e739ca0a3fc34bd1692ba".
+ "f0601e2122a70fdf68ede6c431090896622362c59801000727718f4b551f32340fc5f740e15fc0a023791aa57a6cc97af3077f5d71d33cbc864049b30cb11ea5".
+ "23c15141ea5ac620aec5f81e6661bf8f01a3c817ac1ab592570b63764402e4934d776df03cadae448c5d9082c30c00737e4bbe5c184a1167507d9b99bdd05592".
+ "456ac25dadb5beafe282028611db969c44db7bfb2cad349c0ecbebc281a00ad4f70cfd889b3533833ab845f86403e6a1970da6b5c8b8e82e9f42a82c7c14e535".
+ "16b3d9efbaae6ca6b9c93977f17f58ec29a1a8bb188fb15f377bf50d37e84781ca1716052f657a361cbe44eb227002a57390873e54b8695f76fe0f84f873e021".
+ "c92945f3d7b54861be3c237701c140c3a4e1b84fa4bab910cd265393e0172293d6fc40fa1872e175d7d3f06153a9eca3f8db85c2166f68415eda3bf4aee35adc".
+ "0231cd6cfe5d3a23b51fb0105176b9cdadc28304d27fef698cf4155235d07ecfaf5a2c5f8610a63ee809b0e0260251c33873dceebdda1ec3725d1376031e45cc".
+ "731a870b39edc97b549b96624c891984acf7a422584bc56f2104256f15da552d0a8376a546b6966153728ca1f38514df0d458375e99bc01fa498b07abb33803f".
+ "da07c4149e6e5773f9ec65ac3c87ca7c515f263de3cda2d53edbc20c47486ee33f9810c8226bbc9c52fcadb1f01fe28bf099b8afb9f1798e0b9815210c559187".
+ "c562b5e45350a5d0708c2fb96bad405ef4b8b535066ed02da198e4a3a4eaf075450c87f6d9840c8e00b8e316bcc7a5c6113fefbd72b0c7f6860fcecc8a3f33fb".
+ "a2999e4f3f3e3da5d7bfcf5d22a93f4d16ae6dd053685dfc7223628f92086735d09551bd29e8d0f537d06f33536fce8360d7443f583e9079685efce0347c1ffa".
+ "fedd0b7d1125f0dfc9bb21460079f286abbbeb549bb744aeea0b7a6bc66a272c8af945621b57b8380d40fa067c3060b9d44b79bd4333ec96d47632124a9aad0a".
+ "2df287eda9312f70f12f544fd7bdef9e6cc5e110effb8dbdebb821571f0fa95301db9da0bb60b77af6d5b7de00ca26039f1dda92f7a777c75d02fc340f1b81b5".
+ "e7c5efc6aaa6ffe3b77db348b7a5973a9465cb1e01841fa10f398318bfb73a4f8f53a4bded656f35db0ef00685826d8eac3aa0941623b3401ffdaba927bc91f4".
+ "808818548a60f653e9f340f79e40d666525923c4847ac3c0a9b36f3069620b0aea677ee7afa2c333987d9a5afade1b0e1e22ef7470228b07c9f482a6c343a37c".
+ "462a749c02d4cc86447cc16c3c68955afa80e63a3a41aaa1375c7ca0cffa0335e96e599e1b6841ae5693b5fa6ff437c3c1dca20075b7a58aafa81845af0aa8f6".
+ "30520d89a362d667447045c2b39f88f573f6b76b95ea4a98950ad797570b841975e9841306223dbefd21a4f092d69452c4539c664e27e110622ae7a7db5073d6".
+ "17eb023b36f28a13eeeebdbd964df63dcb18762950b6bd3eeead2a25b9bba48060ac8b82af3f41ecafbb7134140ca8cc687b92eded8bdabd9567e50950ed617a".
+ "a114d3db8648f9ab48a622456aec56fe79cfa6225fc7fd3fb0607f9dbc1bd861b316600fc10163fe8098ea685bc3fe06435f51cb1ce7ffebae67b3114fadf8c8".
+ "808a4044bb06638d05bc9a73c44c5b1eb7c83cdb4bde51ffa85413a97fbd534ddb17dc899fc4e2ced6ed81eeb117b4c77f9ecd03251367649a5649ec58567907".
+ "4fc8c2702dc42a58308f4023fb2cd30c79ecb9a952cde77dfcf92d8ef234811c327112abd568c49d4bf693f611d07e433fcd0a396530c6a279eb3ba567d780b7".
+ "271b6bfc7f1683a6b9159e143788662e8c5f73dd25ab623633efe781edd647b32003c9f3eaf236d968244e4561bc855848b839bfb93af2ea3e230a30089230c4".
+ "2e593ed3b9be53d677a7c9da744ee1961aaccac237f9e0bc1f886a92d5f335c6c0b0250ea76fbdcd85ae9cf6afe7ab25fd6b4753be6505b986757b003b94a089".
+ "d6a42b1fb24d2249ec917bb0ad50c8bd31265f82071a0816c3f8985edf0311205f83eaf8ff5587a3c7c24938a3f0cf9ff438b567d71407a51292e6d7e3f939e6".
+ "cdbecd49e913793f73cb964406934907ca4d48f44bec301bdf0110986757fcac6c2cca84eb7c5fad1662d1a833d24fa356771d6b772759a4837d9872d23ff1ab".
+ "219597aadc062f317d6cbc044bf65dc5ddda95ddc34d68584b7db991c8441a43e0511f71b88dda141f36b7cb326650c3244b989f1b992d2baa318e2a76dd1c34".
+ "a946c843255f65c6896eac3a6774ceff50b6f66b752672f5ce8dc84149ba6b227da844254d01bf470f6c987e8b5df2168414bcee11ad8c131d16e43addbdd493".
+ "595117f4f211c5d6460ee1be41e72b42c21252ce6dcd9838e53b0e1fd8d1864c2d3d219b82d42d0446865848431658732a78f0d9348f8044fa7f576d11562d25".
+ "d7b681f714c4b43532543d27069a21d1d152e646c56d75229bb198f87676108306e68fa49751f3b1d678bbf1ea38b2e0712d896882b5ea1494136f23a7e1d528".
+ "ca456c6c2a2cfc8cb6b6e7e6526aaa1da082653492b624936213569892706d8f9c6496b1193ec5a4294e3c1da14b25c24337cf9bb3490ea3f8a54e0a5b9f77af".
+ "fc70fe8dcb7687a9f45c7ae3ee8f2a94fa58e6c920cce1f447fd60526fa71b6f1048a3dcc7680e3b20ac66d78290bfc3878e72d4876e014036b0b80b6be4bf2e".
+ "a358125bea811b51af76a0077b3a615750a9ca3368d1d17e060a0d37bfd3b13c91412ca83298b06aea3048607f718c04667dcfc7faa4ac5a594be1c1551140ba".
+ "9c1ea7cebc074b1fbd338eef831fa3eb1f39088bcf1cf13bf706b1d287e12b165f4fb3e6c4586067c5e2f461c4cc86400b456428e8767c1b57a7bc3e64a8abe6".
+ "d253646f8796763b2a33de35c6f1667d06f30bb12c0fd0e28e4859ebdc2f96236af4a895d9a7d6fb90cbb60084db28a0c628faf7653c316ec69b5c5103aea495".
+ "792efd58ec42bc950f8608d5fa6834aab7bd2aaece33b3e16756f518a5410e8957dd534437e8c152451d86beb20124e8fb9e672d13fb7e98e153c124fdb2eaf7".
+ "f94a23efffeea25ec31f821e492d9de00a6d056c67e565f734f864d425035bb13620b7a1f44ec02ab7a6b1c4a38511b6902cfcf199d3918eb07da11d634add44".
+ "0860d123fa2b8003f87270777c6415e32f1b34dd6e1e22df3a78684e1169fce84b61cf461544f4e891fcd9d1f5a1e5fef148aeddbfcc922f5d7bfd3bd2480e8a".
+ "3318c75ce0afc24ca179fc0e832ab64368c174407bf2cd45a72cd5c9e7dd0b9def7500cec54d4d692938a1bb18289189d4b2445640d8abc9a0b70c3ffc8ba3c8".
+ "d483119a4f63851a57cf30f48c88616785a5ee00cb9221db45dd8dff118ca33bb4ae254937891f2c971edc8614fa3fc43e56f297a44a234fb1737f23d44a15f0".
+ "6a9e364fe1daa8e28bf72927526296202713f76dc8342e3843483b479ff793697b11a934bdc206905dd020e2f321cf8d65c245a8e7c4275f87301211800f0751".
+ "4e9cb59b88540f5441e6b09b4b73112d855ba0dffd4affd670c4f76ec11ac07a6cc2201ac65c83b3b3e4dc10d991ef4424cd001d34f0393dc262957df641469a".
+ "e00f74c527f8c99f50432c5ff4c4260ec6998b7ef2a0223290762126542d8aa89bfd241ac59e3a9a6c6f13afc9d69a771d124d16359525e4b374605b699e32bd".
+ "fb393d9397767bce32ab2d5557d05c33fa54183b0d5facc73a097441aa34abf7d6ac36fb35d6be7f19d0c26c7ad564c06f8a4f616ff4819c53e8b29e782b8791".
+ "c4039e5d049bd36819ae6d01a113eae6260e25150b935ee364011558dea97e1ee0e7f2938b7368ad9a5a86bae4f89a9ffbd06638566a785cb6ad3982b133ce6a".
+ "3edb13aa2c4ad4db7052ac646fcf336b375efb6a360d448862f2b711db3d8e657a706c14013664beae06b1a067fd078b0a8800c01dd610d583bee4fa4634e4f3".
+ "5251372b8144a7194ed60dc2539283ce909e7d65338a9050b09b66b647f30b6d595d7e03d9a77029afce140df7717f64949ae1362f94602dc2e70840e3117ab1".
+ "a26cc8e8ffd068ec225f0b75b2de63e3511f4485c87fb0087e4421675f3754bc4bc9c0a38db6392661e8a59802d83f887cf81aa99ed13a10b4b8a176144f76ce".
+ "3a192cc77b09e3f8a087db488f3d304d048623f46a031ba9251896cd08ff601dd0b933f5110b4cc9d943b5705b2435fa1c0adaad6c3aed88022f57cc3d71048f".
+ "9d5f420cfaf737b8a9f2434601b296b14384618fa9b76e6acbf1b55ad7130f582f36920a5aff71e15d120b11d6e0dd374554803538f3b12305512cf24322ed52".
+ "cd7ce5f409efd2f2752684bc326bf4548fa17169028c819ba342ee672682860a6de09752f509caad897484160895dc712b70bd05d588fe218fd85718b9b833ff".
+ "2c18e2566416ce1e52c3d7dc696cca1ad02b9b99e2953f92d8fe7ac0e4d75bd2ae2834b9ad8e87f179cdaf5e75609abdf1236787fe366347c32991f20c7faf41".
+ "b65da4ed5edc3cab1134a4ee0a3b565cab7c6dcd6f93feb528ddf0a1e992f6ad4814e51d338433dc5b52fddd8e780a312d12c80c4dbdaf8818b1c84883d8be41".
+ "186de5fdeeb9c7b7542a8429e53645a313cd8c9a53c3790b9fcf0143421da3bb586762790c91b0110f68b5fd111338560437d7d77457fb5587efb40a90ed1c02".
+ "838ba4e83b0c6adb175d94b6e14767a4f4a127e80f79be7741f4dc446c520176fd5b0412cc4d7a8f3d293e438d50e4e79e52bbc2c3bc6707d97b6289f1b39733".
+ "48c9351b66be55b2152bee9b76c42dc057d12134180488f45aee9491fe72f8634e3beeda8006869a829d2d58614150ab489dca7af268c09dde668cc20428ff88".
+ "366a3c0119446bdba29c39b0723fcd639393d397d138ab241c187beac647d8f73e5e42b3468e3958e0e73908c081ce0b6c894f0409f3bd321807a1633860a8e7".
+ "49cb4a10875a65b3f0a073f48f141747c88afe9039ef0795752dbd07ef51a2dadb40bb09bb9d4fcb328f68af28f8d76085fccaef4afe848a93c4cac43f55863a".
+ "21b540e6d408eb55fdfbd2a0c13fbae6fdf68e51423737f6966105d1ed57570bb521adb9576b06988d7d5a6445fe77d177076d47ca45b437a9780b376d49689e".
+ "6b0be983d90f46dbf935e14b53f3bf7ac7aec7fc1b92c14f161e59ae2620f7552206f22a365c91476943b8b51e920661efc19d040070407ba1cf011d3a0e072e".
+ "68d10e064619aa2184d7e848729b254af6b83db15fca2134d0d54efc761fff25c1169d608ed2434de8ae3cafb8c3af0b5b23a16183b5ead5dc5d175c955f4db5".
+ "454623d611244c462776118992ba03e8e20e6e1d9d6101d2286d7e040d5a56f22d6e3ae86bd6a0605c8b34d7a385fee5f3c9b6d0cf550f7aa67f338d8a014dfd".
+ "639cade855e8d25df73ea01bc5635bb5e032269b2a10f6b2baea7c4a88ede42caf91d7c9d3b2802608fdc361e23ee8cdcc1c954da86f929e9721130ef6d74e99".
+ "180f8c8c2263b41f538e105bc5f411f8dd1c2d3e0dc4540ff9cbdb9a6c44524ebcdfe37d9427a43dc24fd28c2fc25baef96490ae847b435ef4eea87db030829d".
+ "06b4c5d9271c8ffda114c336f5d82f9e6ca0d140112f364b1613cfe84c6e924629cba51a7d21f92ce26802bda0651340a8aad0c1ef439acc5552634304321cf6".
+ "02851751630d671a8cce7028f1cc6fdbce64f762c8ed522c2a81c2886986999a85d41a87d2ba5281dcbc2dbd728559470017e12fd70a97a771de499d2953c49b".
+ "0e60abac5ced203dd26bb75df922938723b1341bb07b0250d7af1bf91788994f8ed193221dd829e6665b114763e490fd8482955b097ac3b5b124bf92ae8ce902".
+ "1897b67db820cbfd646fe2c61e63baa972651a47bb1aae56f5e623a1167beff84166ea78cc9854b21a9478ebf3a1429226213c20a7a9ce8031eced508b937263".
+ "1357591069d5c482c0f6f99e4a6084f34fdab7b26399b4efcb0e5217e4e9115d0f6011bcfe55e0f05d3d8850febab0a6100bab8142a3913662a568f9d32367bf".
+ "5db46b6572cb76bd6a49d84bd567e1f834bbd705dd395c1609e9eba7fe8b9c59f1c4cb2561461204805c25a384140314e515f84050949529050279393884f8d0");
+
+ if ($type == "aarmy3") { $game_key = "c6mw4it2kg7sz5o0813d9qyufenhj\x00"; } else { exit("UNKNOWN GAME CRYPT KEY"); }
+
+ $buffer_length = strlen($buffer);
+ $game_key_length = strlen($game_key);
+
+ if ($encrypt == TRUE)
+ {
+ for ($i=1; $i<$buffer_length; $i++) { $buffer[$i] = chr(ord($buffer[$i]) ^ ord($buffer[$i-1])); }
+ for ($i=0; $i<$buffer_length; $i++) { $buffer[$i] = chr(ord($buffer[$i]) ^ ord($game_key[($i%128) % $game_key_length]) ^ ord($master_key[$i%128]) ^ ord($master_key[$i])); }
+ }
+ else
+ {
+ for ($i=0; $i<$buffer_length; $i++) { $buffer[$i] = chr(ord($buffer[$i]) ^ ord($master_key[$i]) ^ ord($master_key[$i%128]) ^ ord($game_key[($i%128) % $game_key_length])); }
+ for ($i=$buffer_length; $i>0; $i--) { $buffer[$i] = chr(ord($buffer[$i]) ^ ord($buffer[$i-1])); }
+ }
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//--------- PLEASE MAKE A DONATION OR SIGN THE GUESTBOOK AT GREYCUBE.COM IF YOU REMOVE THIS CREDIT -----------+
+
+ function lgsl_version()
+ {
+ return "LGSL By Richard Perry | v 5.10.3"; // little dirty trick
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
+
+ } // END OF DOUBLE LOAD PROTECTION
+
+//------------------------------------------------------------------------------------------------------------+
+//------------------------------------------------------------------------------------------------------------+
diff --git a/lgsl_files/lgsl_zone.php b/lgsl_files/lgsl_zone.php
new file mode 100644
index 0000000..172e216
--- /dev/null
+++ b/lgsl_files/lgsl_zone.php
@@ -0,0 +1,148 @@
+$request, "zone"=>$lgsl_zone_number ) );
+ $server_list = lgsl_sort_servers($server_list);
+
+//------------------------------------------------------------------------------------------------------------+
+
+ if (!$server_list)
+ {
+ $output .= "NO SERVERS IN ZONE {$lgsl_zone_number}
"; return;
+ }
+
+//------------------------------------------------------------------------------------------------------------+
+
+ $output .= "
+
+ ";
+
+ foreach ($server_list as $key => $server)
+ {
+ $server = lgsl_sort_players($server);
+ $misc = lgsl_server_misc($server);
+ $server = lgsl_server_html($server);
+
+//------------------------------------------------------------------------------------------------------------+
+ if ($zone_count != 0 && !($zone_count % $zone_grid))
+ {
+ $output .= "
+
+ ";
+ }
+
+ $zone_count ++;
+//------------------------------------------------------------------------------------------------------------+
+
+ $output .= "
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {$misc['name_filtered']}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {$server['s']['map']}
+
+
+ ";
+
+ if ($server['p'] && $lgsl_config['players'][$lgsl_zone_number])
+ {
+ $zone_height = $lgsl_config['zone']['line_size'] * (count($server['p']) + 2);
+ $zone_height = $zone_height > $lgsl_config['zone']['height'] ? "{$lgsl_config['zone']['height']}px" : "{$zone_height}px";
+
+ $output .= "
+
+
+
+
{$lgsl_config['text']['zpl']}
+
{$server['s']['players']} / {$server['s']['playersmax']}
+
+
";
+
+ foreach ($server['p'] as $player)
+ {
+ $output .= "
+
{$player['name']}
";
+ }
+
+ $output .= "
+
+
+ ";
+ }
+ else
+ {
+ $output .= "
+
+
+ {$lgsl_config['text']['zpl']}
+ {$server['s']['players']} / {$server['s']['playersmax']}
+
+ ";
+ }
+
+ $output .= "
+
+ ";
+ }
+
+ $output .= "
+
+
";
+
+//------------------------------------------------------------------------------------------------------------+
diff --git a/lgsl_files/locations/AD.png b/lgsl_files/locations/AD.png
new file mode 100644
index 0000000..314f4bb
Binary files /dev/null and b/lgsl_files/locations/AD.png differ
diff --git a/lgsl_files/locations/AE.png b/lgsl_files/locations/AE.png
new file mode 100644
index 0000000..72acdda
Binary files /dev/null and b/lgsl_files/locations/AE.png differ
diff --git a/lgsl_files/locations/AF.png b/lgsl_files/locations/AF.png
new file mode 100644
index 0000000..1f511d3
Binary files /dev/null and b/lgsl_files/locations/AF.png differ
diff --git a/lgsl_files/locations/AG.png b/lgsl_files/locations/AG.png
new file mode 100644
index 0000000..2cef8d4
Binary files /dev/null and b/lgsl_files/locations/AG.png differ
diff --git a/lgsl_files/locations/AI.png b/lgsl_files/locations/AI.png
new file mode 100644
index 0000000..a8a9c8a
Binary files /dev/null and b/lgsl_files/locations/AI.png differ
diff --git a/lgsl_files/locations/AL.png b/lgsl_files/locations/AL.png
new file mode 100644
index 0000000..62f0bf3
Binary files /dev/null and b/lgsl_files/locations/AL.png differ
diff --git a/lgsl_files/locations/AM.png b/lgsl_files/locations/AM.png
new file mode 100644
index 0000000..7596bd3
Binary files /dev/null and b/lgsl_files/locations/AM.png differ
diff --git a/lgsl_files/locations/AN.png b/lgsl_files/locations/AN.png
new file mode 100644
index 0000000..4878eca
Binary files /dev/null and b/lgsl_files/locations/AN.png differ
diff --git a/lgsl_files/locations/AO.png b/lgsl_files/locations/AO.png
new file mode 100644
index 0000000..71ae205
Binary files /dev/null and b/lgsl_files/locations/AO.png differ
diff --git a/lgsl_files/locations/AR.png b/lgsl_files/locations/AR.png
new file mode 100644
index 0000000..0d0e00d
Binary files /dev/null and b/lgsl_files/locations/AR.png differ
diff --git a/lgsl_files/locations/AS.png b/lgsl_files/locations/AS.png
new file mode 100644
index 0000000..63a3722
Binary files /dev/null and b/lgsl_files/locations/AS.png differ
diff --git a/lgsl_files/locations/AT.png b/lgsl_files/locations/AT.png
new file mode 100644
index 0000000..f984163
Binary files /dev/null and b/lgsl_files/locations/AT.png differ
diff --git a/lgsl_files/locations/AU.png b/lgsl_files/locations/AU.png
new file mode 100644
index 0000000..4b07e88
Binary files /dev/null and b/lgsl_files/locations/AU.png differ
diff --git a/lgsl_files/locations/AW.png b/lgsl_files/locations/AW.png
new file mode 100644
index 0000000..8c25a68
Binary files /dev/null and b/lgsl_files/locations/AW.png differ
diff --git a/lgsl_files/locations/AX.png b/lgsl_files/locations/AX.png
new file mode 100644
index 0000000..1971b3f
Binary files /dev/null and b/lgsl_files/locations/AX.png differ
diff --git a/lgsl_files/locations/AZ.png b/lgsl_files/locations/AZ.png
new file mode 100644
index 0000000..37ee8f3
Binary files /dev/null and b/lgsl_files/locations/AZ.png differ
diff --git a/lgsl_files/locations/BA.png b/lgsl_files/locations/BA.png
new file mode 100644
index 0000000..bce197e
Binary files /dev/null and b/lgsl_files/locations/BA.png differ
diff --git a/lgsl_files/locations/BB.png b/lgsl_files/locations/BB.png
new file mode 100644
index 0000000..c908dcd
Binary files /dev/null and b/lgsl_files/locations/BB.png differ
diff --git a/lgsl_files/locations/BD.png b/lgsl_files/locations/BD.png
new file mode 100644
index 0000000..da216ad
Binary files /dev/null and b/lgsl_files/locations/BD.png differ
diff --git a/lgsl_files/locations/BE.png b/lgsl_files/locations/BE.png
new file mode 100644
index 0000000..a010d5f
Binary files /dev/null and b/lgsl_files/locations/BE.png differ
diff --git a/lgsl_files/locations/BF.png b/lgsl_files/locations/BF.png
new file mode 100644
index 0000000..466c72e
Binary files /dev/null and b/lgsl_files/locations/BF.png differ
diff --git a/lgsl_files/locations/BG.png b/lgsl_files/locations/BG.png
new file mode 100644
index 0000000..2bd1019
Binary files /dev/null and b/lgsl_files/locations/BG.png differ
diff --git a/lgsl_files/locations/BH.png b/lgsl_files/locations/BH.png
new file mode 100644
index 0000000..7cae840
Binary files /dev/null and b/lgsl_files/locations/BH.png differ
diff --git a/lgsl_files/locations/BI.png b/lgsl_files/locations/BI.png
new file mode 100644
index 0000000..4b8d55c
Binary files /dev/null and b/lgsl_files/locations/BI.png differ
diff --git a/lgsl_files/locations/BJ.png b/lgsl_files/locations/BJ.png
new file mode 100644
index 0000000..d0c52e8
Binary files /dev/null and b/lgsl_files/locations/BJ.png differ
diff --git a/lgsl_files/locations/BM.png b/lgsl_files/locations/BM.png
new file mode 100644
index 0000000..8ac1bfc
Binary files /dev/null and b/lgsl_files/locations/BM.png differ
diff --git a/lgsl_files/locations/BN.png b/lgsl_files/locations/BN.png
new file mode 100644
index 0000000..45059ee
Binary files /dev/null and b/lgsl_files/locations/BN.png differ
diff --git a/lgsl_files/locations/BO.png b/lgsl_files/locations/BO.png
new file mode 100644
index 0000000..c48c09f
Binary files /dev/null and b/lgsl_files/locations/BO.png differ
diff --git a/lgsl_files/locations/BR.png b/lgsl_files/locations/BR.png
new file mode 100644
index 0000000..3cb7011
Binary files /dev/null and b/lgsl_files/locations/BR.png differ
diff --git a/lgsl_files/locations/BS.png b/lgsl_files/locations/BS.png
new file mode 100644
index 0000000..a7a3984
Binary files /dev/null and b/lgsl_files/locations/BS.png differ
diff --git a/lgsl_files/locations/BT.png b/lgsl_files/locations/BT.png
new file mode 100644
index 0000000..f697371
Binary files /dev/null and b/lgsl_files/locations/BT.png differ
diff --git a/lgsl_files/locations/BV.png b/lgsl_files/locations/BV.png
new file mode 100644
index 0000000..bf21377
Binary files /dev/null and b/lgsl_files/locations/BV.png differ
diff --git a/lgsl_files/locations/BW.png b/lgsl_files/locations/BW.png
new file mode 100644
index 0000000..b02765e
Binary files /dev/null and b/lgsl_files/locations/BW.png differ
diff --git a/lgsl_files/locations/BY.png b/lgsl_files/locations/BY.png
new file mode 100644
index 0000000..df452e2
Binary files /dev/null and b/lgsl_files/locations/BY.png differ
diff --git a/lgsl_files/locations/BZ.png b/lgsl_files/locations/BZ.png
new file mode 100644
index 0000000..5a6d2af
Binary files /dev/null and b/lgsl_files/locations/BZ.png differ
diff --git a/lgsl_files/locations/CA.png b/lgsl_files/locations/CA.png
new file mode 100644
index 0000000..14eb66b
Binary files /dev/null and b/lgsl_files/locations/CA.png differ
diff --git a/lgsl_files/locations/CC.png b/lgsl_files/locations/CC.png
new file mode 100644
index 0000000..5bfb51f
Binary files /dev/null and b/lgsl_files/locations/CC.png differ
diff --git a/lgsl_files/locations/CD.png b/lgsl_files/locations/CD.png
new file mode 100644
index 0000000..747f31f
Binary files /dev/null and b/lgsl_files/locations/CD.png differ
diff --git a/lgsl_files/locations/CF.png b/lgsl_files/locations/CF.png
new file mode 100644
index 0000000..881ba0b
Binary files /dev/null and b/lgsl_files/locations/CF.png differ
diff --git a/lgsl_files/locations/CG.png b/lgsl_files/locations/CG.png
new file mode 100644
index 0000000..064ef4f
Binary files /dev/null and b/lgsl_files/locations/CG.png differ
diff --git a/lgsl_files/locations/CH.png b/lgsl_files/locations/CH.png
new file mode 100644
index 0000000..7ace064
Binary files /dev/null and b/lgsl_files/locations/CH.png differ
diff --git a/lgsl_files/locations/CI.png b/lgsl_files/locations/CI.png
new file mode 100644
index 0000000..dcfa735
Binary files /dev/null and b/lgsl_files/locations/CI.png differ
diff --git a/lgsl_files/locations/CK.png b/lgsl_files/locations/CK.png
new file mode 100644
index 0000000..452098a
Binary files /dev/null and b/lgsl_files/locations/CK.png differ
diff --git a/lgsl_files/locations/CL.png b/lgsl_files/locations/CL.png
new file mode 100644
index 0000000..6c92d6e
Binary files /dev/null and b/lgsl_files/locations/CL.png differ
diff --git a/lgsl_files/locations/CM.png b/lgsl_files/locations/CM.png
new file mode 100644
index 0000000..0890325
Binary files /dev/null and b/lgsl_files/locations/CM.png differ
diff --git a/lgsl_files/locations/CN.png b/lgsl_files/locations/CN.png
new file mode 100644
index 0000000..40679d8
Binary files /dev/null and b/lgsl_files/locations/CN.png differ
diff --git a/lgsl_files/locations/CO.png b/lgsl_files/locations/CO.png
new file mode 100644
index 0000000..828541e
Binary files /dev/null and b/lgsl_files/locations/CO.png differ
diff --git a/lgsl_files/locations/CR.png b/lgsl_files/locations/CR.png
new file mode 100644
index 0000000..72116a9
Binary files /dev/null and b/lgsl_files/locations/CR.png differ
diff --git a/lgsl_files/locations/CS.png b/lgsl_files/locations/CS.png
new file mode 100644
index 0000000..d6a394f
Binary files /dev/null and b/lgsl_files/locations/CS.png differ
diff --git a/lgsl_files/locations/CU.png b/lgsl_files/locations/CU.png
new file mode 100644
index 0000000..9647fde
Binary files /dev/null and b/lgsl_files/locations/CU.png differ
diff --git a/lgsl_files/locations/CV.png b/lgsl_files/locations/CV.png
new file mode 100644
index 0000000..9775337
Binary files /dev/null and b/lgsl_files/locations/CV.png differ
diff --git a/lgsl_files/locations/CX.png b/lgsl_files/locations/CX.png
new file mode 100644
index 0000000..f39c8b1
Binary files /dev/null and b/lgsl_files/locations/CX.png differ
diff --git a/lgsl_files/locations/CY.png b/lgsl_files/locations/CY.png
new file mode 100644
index 0000000..81b0f46
Binary files /dev/null and b/lgsl_files/locations/CY.png differ
diff --git a/lgsl_files/locations/CZ.png b/lgsl_files/locations/CZ.png
new file mode 100644
index 0000000..2051250
Binary files /dev/null and b/lgsl_files/locations/CZ.png differ
diff --git a/lgsl_files/locations/DE.png b/lgsl_files/locations/DE.png
new file mode 100644
index 0000000..fb608d5
Binary files /dev/null and b/lgsl_files/locations/DE.png differ
diff --git a/lgsl_files/locations/DJ.png b/lgsl_files/locations/DJ.png
new file mode 100644
index 0000000..4a43d84
Binary files /dev/null and b/lgsl_files/locations/DJ.png differ
diff --git a/lgsl_files/locations/DK.png b/lgsl_files/locations/DK.png
new file mode 100644
index 0000000..825c015
Binary files /dev/null and b/lgsl_files/locations/DK.png differ
diff --git a/lgsl_files/locations/DM.png b/lgsl_files/locations/DM.png
new file mode 100644
index 0000000..411b57a
Binary files /dev/null and b/lgsl_files/locations/DM.png differ
diff --git a/lgsl_files/locations/DO.png b/lgsl_files/locations/DO.png
new file mode 100644
index 0000000..7426bff
Binary files /dev/null and b/lgsl_files/locations/DO.png differ
diff --git a/lgsl_files/locations/DZ.png b/lgsl_files/locations/DZ.png
new file mode 100644
index 0000000..f4313f9
Binary files /dev/null and b/lgsl_files/locations/DZ.png differ
diff --git a/lgsl_files/locations/EC.png b/lgsl_files/locations/EC.png
new file mode 100644
index 0000000..5e8d066
Binary files /dev/null and b/lgsl_files/locations/EC.png differ
diff --git a/lgsl_files/locations/EE.png b/lgsl_files/locations/EE.png
new file mode 100644
index 0000000..5ef9237
Binary files /dev/null and b/lgsl_files/locations/EE.png differ
diff --git a/lgsl_files/locations/EG.png b/lgsl_files/locations/EG.png
new file mode 100644
index 0000000..8fb8fd8
Binary files /dev/null and b/lgsl_files/locations/EG.png differ
diff --git a/lgsl_files/locations/EH.png b/lgsl_files/locations/EH.png
new file mode 100644
index 0000000..1a12f78
Binary files /dev/null and b/lgsl_files/locations/EH.png differ
diff --git a/lgsl_files/locations/ER.png b/lgsl_files/locations/ER.png
new file mode 100644
index 0000000..d30b89f
Binary files /dev/null and b/lgsl_files/locations/ER.png differ
diff --git a/lgsl_files/locations/ES.png b/lgsl_files/locations/ES.png
new file mode 100644
index 0000000..d0a9ff6
Binary files /dev/null and b/lgsl_files/locations/ES.png differ
diff --git a/lgsl_files/locations/ET.png b/lgsl_files/locations/ET.png
new file mode 100644
index 0000000..3d80b7c
Binary files /dev/null and b/lgsl_files/locations/ET.png differ
diff --git a/lgsl_files/locations/EU.png b/lgsl_files/locations/EU.png
new file mode 100644
index 0000000..a1bfa77
Binary files /dev/null and b/lgsl_files/locations/EU.png differ
diff --git a/lgsl_files/locations/FI.png b/lgsl_files/locations/FI.png
new file mode 100644
index 0000000..b099014
Binary files /dev/null and b/lgsl_files/locations/FI.png differ
diff --git a/lgsl_files/locations/FJ.png b/lgsl_files/locations/FJ.png
new file mode 100644
index 0000000..b72ad54
Binary files /dev/null and b/lgsl_files/locations/FJ.png differ
diff --git a/lgsl_files/locations/FK.png b/lgsl_files/locations/FK.png
new file mode 100644
index 0000000..52679b1
Binary files /dev/null and b/lgsl_files/locations/FK.png differ
diff --git a/lgsl_files/locations/FM.png b/lgsl_files/locations/FM.png
new file mode 100644
index 0000000..6ba9cbe
Binary files /dev/null and b/lgsl_files/locations/FM.png differ
diff --git a/lgsl_files/locations/FO.png b/lgsl_files/locations/FO.png
new file mode 100644
index 0000000..13c2c24
Binary files /dev/null and b/lgsl_files/locations/FO.png differ
diff --git a/lgsl_files/locations/FR.png b/lgsl_files/locations/FR.png
new file mode 100644
index 0000000..f615e2d
Binary files /dev/null and b/lgsl_files/locations/FR.png differ
diff --git a/lgsl_files/locations/GA.png b/lgsl_files/locations/GA.png
new file mode 100644
index 0000000..aa22f49
Binary files /dev/null and b/lgsl_files/locations/GA.png differ
diff --git a/lgsl_files/locations/GB.png b/lgsl_files/locations/GB.png
new file mode 100644
index 0000000..4a351b7
Binary files /dev/null and b/lgsl_files/locations/GB.png differ
diff --git a/lgsl_files/locations/GD.png b/lgsl_files/locations/GD.png
new file mode 100644
index 0000000..772c1e9
Binary files /dev/null and b/lgsl_files/locations/GD.png differ
diff --git a/lgsl_files/locations/GE.png b/lgsl_files/locations/GE.png
new file mode 100644
index 0000000..da0b1aa
Binary files /dev/null and b/lgsl_files/locations/GE.png differ
diff --git a/lgsl_files/locations/GF.png b/lgsl_files/locations/GF.png
new file mode 100644
index 0000000..f615e2d
Binary files /dev/null and b/lgsl_files/locations/GF.png differ
diff --git a/lgsl_files/locations/GH.png b/lgsl_files/locations/GH.png
new file mode 100644
index 0000000..b7b6b53
Binary files /dev/null and b/lgsl_files/locations/GH.png differ
diff --git a/lgsl_files/locations/GI.png b/lgsl_files/locations/GI.png
new file mode 100644
index 0000000..d6af6bd
Binary files /dev/null and b/lgsl_files/locations/GI.png differ
diff --git a/lgsl_files/locations/GL.png b/lgsl_files/locations/GL.png
new file mode 100644
index 0000000..894754f
Binary files /dev/null and b/lgsl_files/locations/GL.png differ
diff --git a/lgsl_files/locations/GM.png b/lgsl_files/locations/GM.png
new file mode 100644
index 0000000..e26c9e8
Binary files /dev/null and b/lgsl_files/locations/GM.png differ
diff --git a/lgsl_files/locations/GN.png b/lgsl_files/locations/GN.png
new file mode 100644
index 0000000..88ca04f
Binary files /dev/null and b/lgsl_files/locations/GN.png differ
diff --git a/lgsl_files/locations/GP.png b/lgsl_files/locations/GP.png
new file mode 100644
index 0000000..ba3a3d6
Binary files /dev/null and b/lgsl_files/locations/GP.png differ
diff --git a/lgsl_files/locations/GQ.png b/lgsl_files/locations/GQ.png
new file mode 100644
index 0000000..e200705
Binary files /dev/null and b/lgsl_files/locations/GQ.png differ
diff --git a/lgsl_files/locations/GR.png b/lgsl_files/locations/GR.png
new file mode 100644
index 0000000..4fb8194
Binary files /dev/null and b/lgsl_files/locations/GR.png differ
diff --git a/lgsl_files/locations/GS.png b/lgsl_files/locations/GS.png
new file mode 100644
index 0000000..2411bb8
Binary files /dev/null and b/lgsl_files/locations/GS.png differ
diff --git a/lgsl_files/locations/GT.png b/lgsl_files/locations/GT.png
new file mode 100644
index 0000000..b6118bc
Binary files /dev/null and b/lgsl_files/locations/GT.png differ
diff --git a/lgsl_files/locations/GU.png b/lgsl_files/locations/GU.png
new file mode 100644
index 0000000..578789b
Binary files /dev/null and b/lgsl_files/locations/GU.png differ
diff --git a/lgsl_files/locations/GW.png b/lgsl_files/locations/GW.png
new file mode 100644
index 0000000..3a9921a
Binary files /dev/null and b/lgsl_files/locations/GW.png differ
diff --git a/lgsl_files/locations/GY.png b/lgsl_files/locations/GY.png
new file mode 100644
index 0000000..2274686
Binary files /dev/null and b/lgsl_files/locations/GY.png differ
diff --git a/lgsl_files/locations/HK.png b/lgsl_files/locations/HK.png
new file mode 100644
index 0000000..ffd5b07
Binary files /dev/null and b/lgsl_files/locations/HK.png differ
diff --git a/lgsl_files/locations/HM.png b/lgsl_files/locations/HM.png
new file mode 100644
index 0000000..4b07e88
Binary files /dev/null and b/lgsl_files/locations/HM.png differ
diff --git a/lgsl_files/locations/HN.png b/lgsl_files/locations/HN.png
new file mode 100644
index 0000000..837ae83
Binary files /dev/null and b/lgsl_files/locations/HN.png differ
diff --git a/lgsl_files/locations/HR.png b/lgsl_files/locations/HR.png
new file mode 100644
index 0000000..ead2ad8
Binary files /dev/null and b/lgsl_files/locations/HR.png differ
diff --git a/lgsl_files/locations/HT.png b/lgsl_files/locations/HT.png
new file mode 100644
index 0000000..02554d8
Binary files /dev/null and b/lgsl_files/locations/HT.png differ
diff --git a/lgsl_files/locations/HU.png b/lgsl_files/locations/HU.png
new file mode 100644
index 0000000..369a47e
Binary files /dev/null and b/lgsl_files/locations/HU.png differ
diff --git a/lgsl_files/locations/ID.png b/lgsl_files/locations/ID.png
new file mode 100644
index 0000000..18943d7
Binary files /dev/null and b/lgsl_files/locations/ID.png differ
diff --git a/lgsl_files/locations/IE.png b/lgsl_files/locations/IE.png
new file mode 100644
index 0000000..096415e
Binary files /dev/null and b/lgsl_files/locations/IE.png differ
diff --git a/lgsl_files/locations/IL.png b/lgsl_files/locations/IL.png
new file mode 100644
index 0000000..8656ddc
Binary files /dev/null and b/lgsl_files/locations/IL.png differ
diff --git a/lgsl_files/locations/IN.png b/lgsl_files/locations/IN.png
new file mode 100644
index 0000000..9538fe0
Binary files /dev/null and b/lgsl_files/locations/IN.png differ
diff --git a/lgsl_files/locations/IO.png b/lgsl_files/locations/IO.png
new file mode 100644
index 0000000..f2ccc6b
Binary files /dev/null and b/lgsl_files/locations/IO.png differ
diff --git a/lgsl_files/locations/IQ.png b/lgsl_files/locations/IQ.png
new file mode 100644
index 0000000..17f2560
Binary files /dev/null and b/lgsl_files/locations/IQ.png differ
diff --git a/lgsl_files/locations/IR.png b/lgsl_files/locations/IR.png
new file mode 100644
index 0000000..eebbfa4
Binary files /dev/null and b/lgsl_files/locations/IR.png differ
diff --git a/lgsl_files/locations/IS.png b/lgsl_files/locations/IS.png
new file mode 100644
index 0000000..64e46d2
Binary files /dev/null and b/lgsl_files/locations/IS.png differ
diff --git a/lgsl_files/locations/IT.png b/lgsl_files/locations/IT.png
new file mode 100644
index 0000000..d1ac589
Binary files /dev/null and b/lgsl_files/locations/IT.png differ
diff --git a/lgsl_files/locations/JM.png b/lgsl_files/locations/JM.png
new file mode 100644
index 0000000..2c2a5bb
Binary files /dev/null and b/lgsl_files/locations/JM.png differ
diff --git a/lgsl_files/locations/JO.png b/lgsl_files/locations/JO.png
new file mode 100644
index 0000000..2defac9
Binary files /dev/null and b/lgsl_files/locations/JO.png differ
diff --git a/lgsl_files/locations/JP.png b/lgsl_files/locations/JP.png
new file mode 100644
index 0000000..b5d9eff
Binary files /dev/null and b/lgsl_files/locations/JP.png differ
diff --git a/lgsl_files/locations/KE.png b/lgsl_files/locations/KE.png
new file mode 100644
index 0000000..92b1229
Binary files /dev/null and b/lgsl_files/locations/KE.png differ
diff --git a/lgsl_files/locations/KG.png b/lgsl_files/locations/KG.png
new file mode 100644
index 0000000..66a2d0a
Binary files /dev/null and b/lgsl_files/locations/KG.png differ
diff --git a/lgsl_files/locations/KH.png b/lgsl_files/locations/KH.png
new file mode 100644
index 0000000..7dc8dab
Binary files /dev/null and b/lgsl_files/locations/KH.png differ
diff --git a/lgsl_files/locations/KI.png b/lgsl_files/locations/KI.png
new file mode 100644
index 0000000..15bef23
Binary files /dev/null and b/lgsl_files/locations/KI.png differ
diff --git a/lgsl_files/locations/KM.png b/lgsl_files/locations/KM.png
new file mode 100644
index 0000000..b4599bf
Binary files /dev/null and b/lgsl_files/locations/KM.png differ
diff --git a/lgsl_files/locations/KN.png b/lgsl_files/locations/KN.png
new file mode 100644
index 0000000..2463e50
Binary files /dev/null and b/lgsl_files/locations/KN.png differ
diff --git a/lgsl_files/locations/KP.png b/lgsl_files/locations/KP.png
new file mode 100644
index 0000000..ae1c79b
Binary files /dev/null and b/lgsl_files/locations/KP.png differ
diff --git a/lgsl_files/locations/KR.png b/lgsl_files/locations/KR.png
new file mode 100644
index 0000000..5443e8d
Binary files /dev/null and b/lgsl_files/locations/KR.png differ
diff --git a/lgsl_files/locations/KW.png b/lgsl_files/locations/KW.png
new file mode 100644
index 0000000..7e7415c
Binary files /dev/null and b/lgsl_files/locations/KW.png differ
diff --git a/lgsl_files/locations/KY.png b/lgsl_files/locations/KY.png
new file mode 100644
index 0000000..9d409bd
Binary files /dev/null and b/lgsl_files/locations/KY.png differ
diff --git a/lgsl_files/locations/KZ.png b/lgsl_files/locations/KZ.png
new file mode 100644
index 0000000..a6fc566
Binary files /dev/null and b/lgsl_files/locations/KZ.png differ
diff --git a/lgsl_files/locations/LA.png b/lgsl_files/locations/LA.png
new file mode 100644
index 0000000..8e839be
Binary files /dev/null and b/lgsl_files/locations/LA.png differ
diff --git a/lgsl_files/locations/LB.png b/lgsl_files/locations/LB.png
new file mode 100644
index 0000000..988c24d
Binary files /dev/null and b/lgsl_files/locations/LB.png differ
diff --git a/lgsl_files/locations/LC.png b/lgsl_files/locations/LC.png
new file mode 100644
index 0000000..d271f68
Binary files /dev/null and b/lgsl_files/locations/LC.png differ
diff --git a/lgsl_files/locations/LI.png b/lgsl_files/locations/LI.png
new file mode 100644
index 0000000..54a10cb
Binary files /dev/null and b/lgsl_files/locations/LI.png differ
diff --git a/lgsl_files/locations/LK.png b/lgsl_files/locations/LK.png
new file mode 100644
index 0000000..c682618
Binary files /dev/null and b/lgsl_files/locations/LK.png differ
diff --git a/lgsl_files/locations/LR.png b/lgsl_files/locations/LR.png
new file mode 100644
index 0000000..2649955
Binary files /dev/null and b/lgsl_files/locations/LR.png differ
diff --git a/lgsl_files/locations/LS.png b/lgsl_files/locations/LS.png
new file mode 100644
index 0000000..b933c14
Binary files /dev/null and b/lgsl_files/locations/LS.png differ
diff --git a/lgsl_files/locations/LT.png b/lgsl_files/locations/LT.png
new file mode 100644
index 0000000..42ea852
Binary files /dev/null and b/lgsl_files/locations/LT.png differ
diff --git a/lgsl_files/locations/LU.png b/lgsl_files/locations/LU.png
new file mode 100644
index 0000000..d2340b6
Binary files /dev/null and b/lgsl_files/locations/LU.png differ
diff --git a/lgsl_files/locations/LV.png b/lgsl_files/locations/LV.png
new file mode 100644
index 0000000..de97e93
Binary files /dev/null and b/lgsl_files/locations/LV.png differ
diff --git a/lgsl_files/locations/LY.png b/lgsl_files/locations/LY.png
new file mode 100644
index 0000000..0d20c64
Binary files /dev/null and b/lgsl_files/locations/LY.png differ
diff --git a/lgsl_files/locations/MA.png b/lgsl_files/locations/MA.png
new file mode 100644
index 0000000..274115a
Binary files /dev/null and b/lgsl_files/locations/MA.png differ
diff --git a/lgsl_files/locations/MC.png b/lgsl_files/locations/MC.png
new file mode 100644
index 0000000..a9f493a
Binary files /dev/null and b/lgsl_files/locations/MC.png differ
diff --git a/lgsl_files/locations/MD.png b/lgsl_files/locations/MD.png
new file mode 100644
index 0000000..68c30c2
Binary files /dev/null and b/lgsl_files/locations/MD.png differ
diff --git a/lgsl_files/locations/ME.png b/lgsl_files/locations/ME.png
new file mode 100644
index 0000000..c7d659e
Binary files /dev/null and b/lgsl_files/locations/ME.png differ
diff --git a/lgsl_files/locations/MG.png b/lgsl_files/locations/MG.png
new file mode 100644
index 0000000..463332b
Binary files /dev/null and b/lgsl_files/locations/MG.png differ
diff --git a/lgsl_files/locations/MH.png b/lgsl_files/locations/MH.png
new file mode 100644
index 0000000..fe2caef
Binary files /dev/null and b/lgsl_files/locations/MH.png differ
diff --git a/lgsl_files/locations/MK.png b/lgsl_files/locations/MK.png
new file mode 100644
index 0000000..3905ec4
Binary files /dev/null and b/lgsl_files/locations/MK.png differ
diff --git a/lgsl_files/locations/ML.png b/lgsl_files/locations/ML.png
new file mode 100644
index 0000000..265eb54
Binary files /dev/null and b/lgsl_files/locations/ML.png differ
diff --git a/lgsl_files/locations/MM.png b/lgsl_files/locations/MM.png
new file mode 100644
index 0000000..3379953
Binary files /dev/null and b/lgsl_files/locations/MM.png differ
diff --git a/lgsl_files/locations/MN.png b/lgsl_files/locations/MN.png
new file mode 100644
index 0000000..eab2c75
Binary files /dev/null and b/lgsl_files/locations/MN.png differ
diff --git a/lgsl_files/locations/MO.png b/lgsl_files/locations/MO.png
new file mode 100644
index 0000000..107f888
Binary files /dev/null and b/lgsl_files/locations/MO.png differ
diff --git a/lgsl_files/locations/MP.png b/lgsl_files/locations/MP.png
new file mode 100644
index 0000000..86bc965
Binary files /dev/null and b/lgsl_files/locations/MP.png differ
diff --git a/lgsl_files/locations/MQ.png b/lgsl_files/locations/MQ.png
new file mode 100644
index 0000000..f393300
Binary files /dev/null and b/lgsl_files/locations/MQ.png differ
diff --git a/lgsl_files/locations/MR.png b/lgsl_files/locations/MR.png
new file mode 100644
index 0000000..e5a88de
Binary files /dev/null and b/lgsl_files/locations/MR.png differ
diff --git a/lgsl_files/locations/MS.png b/lgsl_files/locations/MS.png
new file mode 100644
index 0000000..d51ea15
Binary files /dev/null and b/lgsl_files/locations/MS.png differ
diff --git a/lgsl_files/locations/MT.png b/lgsl_files/locations/MT.png
new file mode 100644
index 0000000..2043fe1
Binary files /dev/null and b/lgsl_files/locations/MT.png differ
diff --git a/lgsl_files/locations/MU.png b/lgsl_files/locations/MU.png
new file mode 100644
index 0000000..1226574
Binary files /dev/null and b/lgsl_files/locations/MU.png differ
diff --git a/lgsl_files/locations/MV.png b/lgsl_files/locations/MV.png
new file mode 100644
index 0000000..80003ae
Binary files /dev/null and b/lgsl_files/locations/MV.png differ
diff --git a/lgsl_files/locations/MW.png b/lgsl_files/locations/MW.png
new file mode 100644
index 0000000..3829f23
Binary files /dev/null and b/lgsl_files/locations/MW.png differ
diff --git a/lgsl_files/locations/MX.png b/lgsl_files/locations/MX.png
new file mode 100644
index 0000000..b13bbcc
Binary files /dev/null and b/lgsl_files/locations/MX.png differ
diff --git a/lgsl_files/locations/MY.png b/lgsl_files/locations/MY.png
new file mode 100644
index 0000000..9eeec15
Binary files /dev/null and b/lgsl_files/locations/MY.png differ
diff --git a/lgsl_files/locations/MZ.png b/lgsl_files/locations/MZ.png
new file mode 100644
index 0000000..0840bae
Binary files /dev/null and b/lgsl_files/locations/MZ.png differ
diff --git a/lgsl_files/locations/NA.png b/lgsl_files/locations/NA.png
new file mode 100644
index 0000000..2ceff8f
Binary files /dev/null and b/lgsl_files/locations/NA.png differ
diff --git a/lgsl_files/locations/NC.png b/lgsl_files/locations/NC.png
new file mode 100644
index 0000000..96985b4
Binary files /dev/null and b/lgsl_files/locations/NC.png differ
diff --git a/lgsl_files/locations/NE.png b/lgsl_files/locations/NE.png
new file mode 100644
index 0000000..9b256c0
Binary files /dev/null and b/lgsl_files/locations/NE.png differ
diff --git a/lgsl_files/locations/NF.png b/lgsl_files/locations/NF.png
new file mode 100644
index 0000000..6a67f05
Binary files /dev/null and b/lgsl_files/locations/NF.png differ
diff --git a/lgsl_files/locations/NG.png b/lgsl_files/locations/NG.png
new file mode 100644
index 0000000..5c14b7a
Binary files /dev/null and b/lgsl_files/locations/NG.png differ
diff --git a/lgsl_files/locations/NI.png b/lgsl_files/locations/NI.png
new file mode 100644
index 0000000..347ab90
Binary files /dev/null and b/lgsl_files/locations/NI.png differ
diff --git a/lgsl_files/locations/NL.png b/lgsl_files/locations/NL.png
new file mode 100644
index 0000000..4654566
Binary files /dev/null and b/lgsl_files/locations/NL.png differ
diff --git a/lgsl_files/locations/NO.png b/lgsl_files/locations/NO.png
new file mode 100644
index 0000000..bf21377
Binary files /dev/null and b/lgsl_files/locations/NO.png differ
diff --git a/lgsl_files/locations/NP.png b/lgsl_files/locations/NP.png
new file mode 100644
index 0000000..6ddab18
Binary files /dev/null and b/lgsl_files/locations/NP.png differ
diff --git a/lgsl_files/locations/NR.png b/lgsl_files/locations/NR.png
new file mode 100644
index 0000000..7c50b7e
Binary files /dev/null and b/lgsl_files/locations/NR.png differ
diff --git a/lgsl_files/locations/NU.png b/lgsl_files/locations/NU.png
new file mode 100644
index 0000000..936172b
Binary files /dev/null and b/lgsl_files/locations/NU.png differ
diff --git a/lgsl_files/locations/NZ.png b/lgsl_files/locations/NZ.png
new file mode 100644
index 0000000..3cd39d1
Binary files /dev/null and b/lgsl_files/locations/NZ.png differ
diff --git a/lgsl_files/locations/OFF.png b/lgsl_files/locations/OFF.png
new file mode 100644
index 0000000..01c1eb2
Binary files /dev/null and b/lgsl_files/locations/OFF.png differ
diff --git a/lgsl_files/locations/OM.png b/lgsl_files/locations/OM.png
new file mode 100644
index 0000000..6f16042
Binary files /dev/null and b/lgsl_files/locations/OM.png differ
diff --git a/lgsl_files/locations/PA.png b/lgsl_files/locations/PA.png
new file mode 100644
index 0000000..229821a
Binary files /dev/null and b/lgsl_files/locations/PA.png differ
diff --git a/lgsl_files/locations/PE.png b/lgsl_files/locations/PE.png
new file mode 100644
index 0000000..25e4a39
Binary files /dev/null and b/lgsl_files/locations/PE.png differ
diff --git a/lgsl_files/locations/PF.png b/lgsl_files/locations/PF.png
new file mode 100644
index 0000000..84f9fdc
Binary files /dev/null and b/lgsl_files/locations/PF.png differ
diff --git a/lgsl_files/locations/PG.png b/lgsl_files/locations/PG.png
new file mode 100644
index 0000000..408800d
Binary files /dev/null and b/lgsl_files/locations/PG.png differ
diff --git a/lgsl_files/locations/PH.png b/lgsl_files/locations/PH.png
new file mode 100644
index 0000000..9388e5d
Binary files /dev/null and b/lgsl_files/locations/PH.png differ
diff --git a/lgsl_files/locations/PK.png b/lgsl_files/locations/PK.png
new file mode 100644
index 0000000..6d36677
Binary files /dev/null and b/lgsl_files/locations/PK.png differ
diff --git a/lgsl_files/locations/PL.png b/lgsl_files/locations/PL.png
new file mode 100644
index 0000000..91f45d3
Binary files /dev/null and b/lgsl_files/locations/PL.png differ
diff --git a/lgsl_files/locations/PM.png b/lgsl_files/locations/PM.png
new file mode 100644
index 0000000..eb668ad
Binary files /dev/null and b/lgsl_files/locations/PM.png differ
diff --git a/lgsl_files/locations/PN.png b/lgsl_files/locations/PN.png
new file mode 100644
index 0000000..224e23f
Binary files /dev/null and b/lgsl_files/locations/PN.png differ
diff --git a/lgsl_files/locations/PR.png b/lgsl_files/locations/PR.png
new file mode 100644
index 0000000..4138fea
Binary files /dev/null and b/lgsl_files/locations/PR.png differ
diff --git a/lgsl_files/locations/PS.png b/lgsl_files/locations/PS.png
new file mode 100644
index 0000000..b4eba6a
Binary files /dev/null and b/lgsl_files/locations/PS.png differ
diff --git a/lgsl_files/locations/PT.png b/lgsl_files/locations/PT.png
new file mode 100644
index 0000000..f3ea717
Binary files /dev/null and b/lgsl_files/locations/PT.png differ
diff --git a/lgsl_files/locations/PW.png b/lgsl_files/locations/PW.png
new file mode 100644
index 0000000..59a27f3
Binary files /dev/null and b/lgsl_files/locations/PW.png differ
diff --git a/lgsl_files/locations/PY.png b/lgsl_files/locations/PY.png
new file mode 100644
index 0000000..996a8ea
Binary files /dev/null and b/lgsl_files/locations/PY.png differ
diff --git a/lgsl_files/locations/QA.png b/lgsl_files/locations/QA.png
new file mode 100644
index 0000000..475f2ac
Binary files /dev/null and b/lgsl_files/locations/QA.png differ
diff --git a/lgsl_files/locations/RE.png b/lgsl_files/locations/RE.png
new file mode 100644
index 0000000..f615e2d
Binary files /dev/null and b/lgsl_files/locations/RE.png differ
diff --git a/lgsl_files/locations/RO.png b/lgsl_files/locations/RO.png
new file mode 100644
index 0000000..6bb4c62
Binary files /dev/null and b/lgsl_files/locations/RO.png differ
diff --git a/lgsl_files/locations/RS.png b/lgsl_files/locations/RS.png
new file mode 100644
index 0000000..5709627
Binary files /dev/null and b/lgsl_files/locations/RS.png differ
diff --git a/lgsl_files/locations/RU.png b/lgsl_files/locations/RU.png
new file mode 100644
index 0000000..d929ac9
Binary files /dev/null and b/lgsl_files/locations/RU.png differ
diff --git a/lgsl_files/locations/RW.png b/lgsl_files/locations/RW.png
new file mode 100644
index 0000000..24370a1
Binary files /dev/null and b/lgsl_files/locations/RW.png differ
diff --git a/lgsl_files/locations/SA.png b/lgsl_files/locations/SA.png
new file mode 100644
index 0000000..d6bc23a
Binary files /dev/null and b/lgsl_files/locations/SA.png differ
diff --git a/lgsl_files/locations/SB.png b/lgsl_files/locations/SB.png
new file mode 100644
index 0000000..2ffe230
Binary files /dev/null and b/lgsl_files/locations/SB.png differ
diff --git a/lgsl_files/locations/SC.png b/lgsl_files/locations/SC.png
new file mode 100644
index 0000000..8be054e
Binary files /dev/null and b/lgsl_files/locations/SC.png differ
diff --git a/lgsl_files/locations/SD.png b/lgsl_files/locations/SD.png
new file mode 100644
index 0000000..9c2e8b4
Binary files /dev/null and b/lgsl_files/locations/SD.png differ
diff --git a/lgsl_files/locations/SE.png b/lgsl_files/locations/SE.png
new file mode 100644
index 0000000..24c4799
Binary files /dev/null and b/lgsl_files/locations/SE.png differ
diff --git a/lgsl_files/locations/SG.png b/lgsl_files/locations/SG.png
new file mode 100644
index 0000000..f71243a
Binary files /dev/null and b/lgsl_files/locations/SG.png differ
diff --git a/lgsl_files/locations/SH.png b/lgsl_files/locations/SH.png
new file mode 100644
index 0000000..4a68131
Binary files /dev/null and b/lgsl_files/locations/SH.png differ
diff --git a/lgsl_files/locations/SI.png b/lgsl_files/locations/SI.png
new file mode 100644
index 0000000..dc81b9d
Binary files /dev/null and b/lgsl_files/locations/SI.png differ
diff --git a/lgsl_files/locations/SJ.png b/lgsl_files/locations/SJ.png
new file mode 100644
index 0000000..bf21377
Binary files /dev/null and b/lgsl_files/locations/SJ.png differ
diff --git a/lgsl_files/locations/SK.png b/lgsl_files/locations/SK.png
new file mode 100644
index 0000000..83c2808
Binary files /dev/null and b/lgsl_files/locations/SK.png differ
diff --git a/lgsl_files/locations/SL.png b/lgsl_files/locations/SL.png
new file mode 100644
index 0000000..99c1c9c
Binary files /dev/null and b/lgsl_files/locations/SL.png differ
diff --git a/lgsl_files/locations/SM.png b/lgsl_files/locations/SM.png
new file mode 100644
index 0000000..168dc78
Binary files /dev/null and b/lgsl_files/locations/SM.png differ
diff --git a/lgsl_files/locations/SN.png b/lgsl_files/locations/SN.png
new file mode 100644
index 0000000..4afc398
Binary files /dev/null and b/lgsl_files/locations/SN.png differ
diff --git a/lgsl_files/locations/SO.png b/lgsl_files/locations/SO.png
new file mode 100644
index 0000000..a5fd9f0
Binary files /dev/null and b/lgsl_files/locations/SO.png differ
diff --git a/lgsl_files/locations/SR.png b/lgsl_files/locations/SR.png
new file mode 100644
index 0000000..10bfae0
Binary files /dev/null and b/lgsl_files/locations/SR.png differ
diff --git a/lgsl_files/locations/ST.png b/lgsl_files/locations/ST.png
new file mode 100644
index 0000000..49932e3
Binary files /dev/null and b/lgsl_files/locations/ST.png differ
diff --git a/lgsl_files/locations/SV.png b/lgsl_files/locations/SV.png
new file mode 100644
index 0000000..60baa80
Binary files /dev/null and b/lgsl_files/locations/SV.png differ
diff --git a/lgsl_files/locations/SY.png b/lgsl_files/locations/SY.png
new file mode 100644
index 0000000..a12e594
Binary files /dev/null and b/lgsl_files/locations/SY.png differ
diff --git a/lgsl_files/locations/SZ.png b/lgsl_files/locations/SZ.png
new file mode 100644
index 0000000..02a7b19
Binary files /dev/null and b/lgsl_files/locations/SZ.png differ
diff --git a/lgsl_files/locations/TC.png b/lgsl_files/locations/TC.png
new file mode 100644
index 0000000..0b50f1a
Binary files /dev/null and b/lgsl_files/locations/TC.png differ
diff --git a/lgsl_files/locations/TD.png b/lgsl_files/locations/TD.png
new file mode 100644
index 0000000..8263049
Binary files /dev/null and b/lgsl_files/locations/TD.png differ
diff --git a/lgsl_files/locations/TF.png b/lgsl_files/locations/TF.png
new file mode 100644
index 0000000..221e799
Binary files /dev/null and b/lgsl_files/locations/TF.png differ
diff --git a/lgsl_files/locations/TG.png b/lgsl_files/locations/TG.png
new file mode 100644
index 0000000..4ef741f
Binary files /dev/null and b/lgsl_files/locations/TG.png differ
diff --git a/lgsl_files/locations/TH.png b/lgsl_files/locations/TH.png
new file mode 100644
index 0000000..2817c28
Binary files /dev/null and b/lgsl_files/locations/TH.png differ
diff --git a/lgsl_files/locations/TJ.png b/lgsl_files/locations/TJ.png
new file mode 100644
index 0000000..d9dd480
Binary files /dev/null and b/lgsl_files/locations/TJ.png differ
diff --git a/lgsl_files/locations/TK.png b/lgsl_files/locations/TK.png
new file mode 100644
index 0000000..bac75c1
Binary files /dev/null and b/lgsl_files/locations/TK.png differ
diff --git a/lgsl_files/locations/TL.png b/lgsl_files/locations/TL.png
new file mode 100644
index 0000000..a01ba17
Binary files /dev/null and b/lgsl_files/locations/TL.png differ
diff --git a/lgsl_files/locations/TM.png b/lgsl_files/locations/TM.png
new file mode 100644
index 0000000..d697614
Binary files /dev/null and b/lgsl_files/locations/TM.png differ
diff --git a/lgsl_files/locations/TN.png b/lgsl_files/locations/TN.png
new file mode 100644
index 0000000..fdf73c0
Binary files /dev/null and b/lgsl_files/locations/TN.png differ
diff --git a/lgsl_files/locations/TO.png b/lgsl_files/locations/TO.png
new file mode 100644
index 0000000..8a15b90
Binary files /dev/null and b/lgsl_files/locations/TO.png differ
diff --git a/lgsl_files/locations/TR.png b/lgsl_files/locations/TR.png
new file mode 100644
index 0000000..81116b7
Binary files /dev/null and b/lgsl_files/locations/TR.png differ
diff --git a/lgsl_files/locations/TT.png b/lgsl_files/locations/TT.png
new file mode 100644
index 0000000..d34c32e
Binary files /dev/null and b/lgsl_files/locations/TT.png differ
diff --git a/lgsl_files/locations/TV.png b/lgsl_files/locations/TV.png
new file mode 100644
index 0000000..09dc2f0
Binary files /dev/null and b/lgsl_files/locations/TV.png differ
diff --git a/lgsl_files/locations/TW.png b/lgsl_files/locations/TW.png
new file mode 100644
index 0000000..40f90ad
Binary files /dev/null and b/lgsl_files/locations/TW.png differ
diff --git a/lgsl_files/locations/TZ.png b/lgsl_files/locations/TZ.png
new file mode 100644
index 0000000..e48cb64
Binary files /dev/null and b/lgsl_files/locations/TZ.png differ
diff --git a/lgsl_files/locations/UA.png b/lgsl_files/locations/UA.png
new file mode 100644
index 0000000..5bcfd1e
Binary files /dev/null and b/lgsl_files/locations/UA.png differ
diff --git a/lgsl_files/locations/UG.png b/lgsl_files/locations/UG.png
new file mode 100644
index 0000000..2a1e470
Binary files /dev/null and b/lgsl_files/locations/UG.png differ
diff --git a/lgsl_files/locations/UK.png b/lgsl_files/locations/UK.png
new file mode 100644
index 0000000..4a351b7
Binary files /dev/null and b/lgsl_files/locations/UK.png differ
diff --git a/lgsl_files/locations/UM.png b/lgsl_files/locations/UM.png
new file mode 100644
index 0000000..437576f
Binary files /dev/null and b/lgsl_files/locations/UM.png differ
diff --git a/lgsl_files/locations/US.png b/lgsl_files/locations/US.png
new file mode 100644
index 0000000..32f39d3
Binary files /dev/null and b/lgsl_files/locations/US.png differ
diff --git a/lgsl_files/locations/UY.png b/lgsl_files/locations/UY.png
new file mode 100644
index 0000000..4f8ee0a
Binary files /dev/null and b/lgsl_files/locations/UY.png differ
diff --git a/lgsl_files/locations/UZ.png b/lgsl_files/locations/UZ.png
new file mode 100644
index 0000000..d547f5d
Binary files /dev/null and b/lgsl_files/locations/UZ.png differ
diff --git a/lgsl_files/locations/VA.png b/lgsl_files/locations/VA.png
new file mode 100644
index 0000000..aca2d4f
Binary files /dev/null and b/lgsl_files/locations/VA.png differ
diff --git a/lgsl_files/locations/VC.png b/lgsl_files/locations/VC.png
new file mode 100644
index 0000000..2b03c67
Binary files /dev/null and b/lgsl_files/locations/VC.png differ
diff --git a/lgsl_files/locations/VE.png b/lgsl_files/locations/VE.png
new file mode 100644
index 0000000..8cb15ab
Binary files /dev/null and b/lgsl_files/locations/VE.png differ
diff --git a/lgsl_files/locations/VG.png b/lgsl_files/locations/VG.png
new file mode 100644
index 0000000..ec17ad4
Binary files /dev/null and b/lgsl_files/locations/VG.png differ
diff --git a/lgsl_files/locations/VI.png b/lgsl_files/locations/VI.png
new file mode 100644
index 0000000..8dfc845
Binary files /dev/null and b/lgsl_files/locations/VI.png differ
diff --git a/lgsl_files/locations/VN.png b/lgsl_files/locations/VN.png
new file mode 100644
index 0000000..c5263b0
Binary files /dev/null and b/lgsl_files/locations/VN.png differ
diff --git a/lgsl_files/locations/VU.png b/lgsl_files/locations/VU.png
new file mode 100644
index 0000000..3380ff8
Binary files /dev/null and b/lgsl_files/locations/VU.png differ
diff --git a/lgsl_files/locations/WF.png b/lgsl_files/locations/WF.png
new file mode 100644
index 0000000..81fd8e5
Binary files /dev/null and b/lgsl_files/locations/WF.png differ
diff --git a/lgsl_files/locations/WS.png b/lgsl_files/locations/WS.png
new file mode 100644
index 0000000..97a9de8
Binary files /dev/null and b/lgsl_files/locations/WS.png differ
diff --git a/lgsl_files/locations/XX.png b/lgsl_files/locations/XX.png
new file mode 100644
index 0000000..cf81e5b
Binary files /dev/null and b/lgsl_files/locations/XX.png differ
diff --git a/lgsl_files/locations/YE.png b/lgsl_files/locations/YE.png
new file mode 100644
index 0000000..7a3b88e
Binary files /dev/null and b/lgsl_files/locations/YE.png differ
diff --git a/lgsl_files/locations/YT.png b/lgsl_files/locations/YT.png
new file mode 100644
index 0000000..b4f22b1
Binary files /dev/null and b/lgsl_files/locations/YT.png differ
diff --git a/lgsl_files/locations/ZA.png b/lgsl_files/locations/ZA.png
new file mode 100644
index 0000000..52f25f2
Binary files /dev/null and b/lgsl_files/locations/ZA.png differ
diff --git a/lgsl_files/locations/ZM.png b/lgsl_files/locations/ZM.png
new file mode 100644
index 0000000..8c20f76
Binary files /dev/null and b/lgsl_files/locations/ZM.png differ
diff --git a/lgsl_files/locations/ZW.png b/lgsl_files/locations/ZW.png
new file mode 100644
index 0000000..9a94893
Binary files /dev/null and b/lgsl_files/locations/ZW.png differ
diff --git a/lgsl_files/maps/MAP_IMAGES_GO_HERE.txt b/lgsl_files/maps/MAP_IMAGES_GO_HERE.txt
new file mode 100644
index 0000000..912254f
--- /dev/null
+++ b/lgsl_files/maps/MAP_IMAGES_GO_HERE.txt
@@ -0,0 +1 @@
+https://github.com/tltneon/lgsl/wiki#how-can-i-add-map-images
\ No newline at end of file
diff --git a/lgsl_files/other/banner_thin.gif b/lgsl_files/other/banner_thin.gif
new file mode 100644
index 0000000..1dd1556
Binary files /dev/null and b/lgsl_files/other/banner_thin.gif differ
diff --git a/lgsl_files/other/favicon.ico b/lgsl_files/other/favicon.ico
new file mode 100644
index 0000000..42c4def
Binary files /dev/null and b/lgsl_files/other/favicon.ico differ
diff --git a/lgsl_files/other/icon_details.gif b/lgsl_files/other/icon_details.gif
new file mode 100644
index 0000000..a1d088e
Binary files /dev/null and b/lgsl_files/other/icon_details.gif differ
diff --git a/lgsl_files/other/icon_lgsl_16x16.png b/lgsl_files/other/icon_lgsl_16x16.png
new file mode 100644
index 0000000..2cb6afe
Binary files /dev/null and b/lgsl_files/other/icon_lgsl_16x16.png differ
diff --git a/lgsl_files/other/icon_lgsl_32x32.png b/lgsl_files/other/icon_lgsl_32x32.png
new file mode 100644
index 0000000..3e4113b
Binary files /dev/null and b/lgsl_files/other/icon_lgsl_32x32.png differ
diff --git a/lgsl_files/other/icon_lgsl_48x48.png b/lgsl_files/other/icon_lgsl_48x48.png
new file mode 100644
index 0000000..0053321
Binary files /dev/null and b/lgsl_files/other/icon_lgsl_48x48.png differ
diff --git a/lgsl_files/other/icon_no_response.gif b/lgsl_files/other/icon_no_response.gif
new file mode 100644
index 0000000..ab127cf
Binary files /dev/null and b/lgsl_files/other/icon_no_response.gif differ
diff --git a/lgsl_files/other/icon_online.gif b/lgsl_files/other/icon_online.gif
new file mode 100644
index 0000000..a847cea
Binary files /dev/null and b/lgsl_files/other/icon_online.gif differ
diff --git a/lgsl_files/other/icon_online_password.gif b/lgsl_files/other/icon_online_password.gif
new file mode 100644
index 0000000..66d99ea
Binary files /dev/null and b/lgsl_files/other/icon_online_password.gif differ
diff --git a/lgsl_files/other/icon_unknown.gif b/lgsl_files/other/icon_unknown.gif
new file mode 100644
index 0000000..c87145e
Binary files /dev/null and b/lgsl_files/other/icon_unknown.gif differ
diff --git a/lgsl_files/other/magnifier.svg b/lgsl_files/other/magnifier.svg
new file mode 100644
index 0000000..430b524
--- /dev/null
+++ b/lgsl_files/other/magnifier.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lgsl_files/other/map_no_image.jpg b/lgsl_files/other/map_no_image.jpg
new file mode 100644
index 0000000..9c9b034
Binary files /dev/null and b/lgsl_files/other/map_no_image.jpg differ
diff --git a/lgsl_files/other/map_no_response.jpg b/lgsl_files/other/map_no_response.jpg
new file mode 100644
index 0000000..1012a6c
Binary files /dev/null and b/lgsl_files/other/map_no_response.jpg differ
diff --git a/lgsl_files/other/map_overlay.gif b/lgsl_files/other/map_overlay.gif
new file mode 100644
index 0000000..f583ecd
Binary files /dev/null and b/lgsl_files/other/map_overlay.gif differ
diff --git a/lgsl_files/other/map_overlay_password.gif b/lgsl_files/other/map_overlay_password.gif
new file mode 100644
index 0000000..b25854c
Binary files /dev/null and b/lgsl_files/other/map_overlay_password.gif differ
diff --git a/lgsl_files/other/overlay.gif b/lgsl_files/other/overlay.gif
new file mode 100644
index 0000000..7edc5f0
Binary files /dev/null and b/lgsl_files/other/overlay.gif differ
diff --git a/lgsl_files/other/verdana.ttf b/lgsl_files/other/verdana.ttf
new file mode 100644
index 0000000..754a9b7
Binary files /dev/null and b/lgsl_files/other/verdana.ttf differ
diff --git a/lgsl_files/scripts/parallax.js b/lgsl_files/scripts/parallax.js
new file mode 100644
index 0000000..6ee5319
--- /dev/null
+++ b/lgsl_files/scripts/parallax.js
@@ -0,0 +1,22 @@
+(function() {
+ // Add event listener
+ document.addEventListener("mousemove", parallax);
+ const elem = document.querySelector("#container");
+ // Magic happens here
+ function parallax(e) {
+ let _w = window.innerWidth / 2;
+ let _h = window.innerHeight / 2;
+ let _mouseX = e.clientX;
+ let _mouseY = e.clientY;
+ let _depth1 = `${50 - (_mouseX - _w) * 0.01}% ${50 -
+ (_mouseY - _h) * 0.01}%`;
+ let _depth2 = `${50 - (_mouseX - _w) * 0.02}% ${50 -
+ (_mouseY - _h) * 0.02}%`;
+ let _depth3 = `${50 - (_mouseX - _w) * 0.06}% ${50 -
+ (_mouseY - _h) * 0.06}%`;
+ let x = `${_depth3}, ${_depth2}, ${_depth1}`;
+ //console.log(x);
+ elem.style.backgroundPosition = x;
+ }
+})();
+// credits to https://codepen.io/oscicen
\ No newline at end of file
diff --git a/lgsl_files/styles/breeze_style.css b/lgsl_files/styles/breeze_style.css
new file mode 100644
index 0000000..694801b
--- /dev/null
+++ b/lgsl_files/styles/breeze_style.css
@@ -0,0 +1,227 @@
+/*--------------------------------------
+> Breeze Style <
+> Neon <
+> https://github.com/tltneon <
+---------------------------------------*/
+
+/* global */
+body
+{
+ background-image: linear-gradient(rgba(220, 249, 255, 0.8), rgb(244, 251, 249));
+ background-repeat: no-repeat;
+ background-attachment: fixed;
+ font-size:14px;
+ font-family:helvetica,verdana,tahoma,arial;
+ word-wrap:break-word;
+}
+td { border-radius: 6px; }
+
+a:link, a:visited { text-decoration:none; color:#6f65a2; }
+a:hover { color:#8298b9;}
+a:active { color:#8298b9;}
+
+#adminlink { margin: 0; position: fixed; width: 25px; right: 0; top: 0; background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #6f65a261); height: 25px; }
+#adminlink:hover { background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #6f65a2); }
+#topmenu { padding: 1em; border-bottom: 2px dashed black; }
+#topmenu > li { display: inline-block; padding: 0px 10px; }
+#topmenu > li:before { content: '► '; }
+
+/* add */
+.annotation { text-align: center; background-color: #feffff; border: 1px solid #e5fbff; padding-top:17px; padding-bottom:17px; }
+
+/* details */
+.players_table { margin: auto; border-spacing: 0px 5px; }
+.settings_table { margin: auto; border-spacing: 0px 0px; border-collapse: collapse; max-width: 600px; }
+.details_table tr:nth-child(n), .players_table tr:nth-child(n), .settings_table tr:nth-child(n) { background-color: #e4eaf2; white-space:nowrap; table-layout:fixed; }
+.details_table tr:nth-child(2n), .players_table tr:nth-child(2n), .settings_table tr:nth-child(2n) { background-color: #f4f7fa; white-space:nowrap; table-layout:fixed; }
+.players_table tr:not(.table_head):hover td { background-color: #ecf9ff; outline: auto; }
+.details_table td, .players_table td { padding: 4px; }
+.settings_table td { padding: 4px; white-space: pre-wrap; }
+
+.details_info_row { margin-top: 14px; }
+.details_info, .details_info_column:nth-child(2) { vertical-align: top; }
+.details_info_ceil, .details_info_column, .details_info_scolumn { display: inline-block; }
+.details_info_column { margin-right: 12px; }
+.details_info_srow { padding: 4px; background-color: #f4f7fa; border-radius: 6px; }
+.details_info_srow:nth-child(2n) { background-color: #e4eaf2; }
+.details_info_ceil:first-child { font-weight: 600; padding-right: 4px; }
+#gamelink { vertical-align: middle; display: block; margin-bottom: 6px; width: calc(100% - 2px); }
+.details_info_column:nth-child(2), .details_password_image {
+ background-size: cover;
+ width: 250px;
+ height: 188px;
+}
+.details_password_image, .details_game_image, .details_location_image {
+ display: block;
+ z-index: 5;
+ background-size: cover;
+}
+.details_info_column:nth-child(2) {
+ border-radius: 4px;
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important;
+}
+.details_password_image {
+ background-position: 100% 100%;
+ position: absolute;
+ background-size: auto;
+ background-repeat: no-repeat;
+}
+.details_location_image {
+ width: 16px;
+ height: 11px;
+ position: relative;
+ right: 4px;
+ float: right;
+ top: 4px;
+}
+.details_game_image {
+ width: 32px;
+ height: 32px;
+ position: relative;
+ left: 4px;
+ top: 4px;
+ opacity: .4;
+ border-radius: 6px;
+}
+.details_game_image:hover { opacity: 1; transition-duration: 500ms; }
+img[title='Location: XX'] { display: none; }
+
+.table_head { font-weight: bold; background-color: #e0edff !important; }
+.spacer { background-color: #f6feff; border-radius: 6px; height:10px; width:90%; margin:auto; margin-top: 10px; margin-bottom: 10px; border:1px solid #cee3e6; }
+.noinfo{ margin:auto; text-align:center; background-color: #f4f7fa; display: inline-block; padding: 6px; border-radius: 6px; border: 1px solid #e0f2f4; }
+#invalid_server_id, #back_to_servers_list { margin:auto; text-align:center; }
+div[id^="servername"] { margin:auto; text-align:center; font-weight:bold; padding-bottom: 15px; font-size: 16px; }
+#gamelink { width:100%; margin:auto; background-color: #f3fbff; text-align: center; padding-top:4px; padding-bottom:4px; border-radius: 6px; border: 1px solid #e0f2f4; }
+#details_playerlist {margin:auto; overflow:auto; text-align:center; padding:10px}
+
+/* list */
+.contry_icon { border:none; width: 16px; height: 16px; }
+.details_icon, .status_icon_onl, .status_icon_nrs, .status_icon_onp {
+ width: 16px;
+ height: 16px;
+ display: inline-block;
+ background-size: cover;
+}
+.details_icon { background-image: url(../other/icon_details.gif) !important; }
+.status_icon_onl { background-image: url(../other/icon_online.gif) !important; }
+.status_icon_nrs { background-image: url(../other/icon_no_response.gif) !important; }
+.status_icon_onp { background-image: url(../other/icon_online_password.gif) !important; }
+img.game_icon { width: 16px; }
+a.details_icon:hover { opacity: 0.6; }
+
+#server_list_table { margin:auto; width:85%; background-color: #f6feff; border-radius: 12px; margin-top:30px; padding: 3px; }
+#server_list_table td { border: 1px solid #c2d1d4; border-radius: 2px; padding: 10px; }
+#server_list_table tr:nth-child(n) { background-color: #f3fbff; }
+#server_list_table tr:nth-child(2n) { background-color: #feffff; }
+#server_list_table td:hover, #server_list_table tr:hover td { background-color: #f3f3f3; }
+#server_list_table_top { display:none; }
+.connectlink_cell { text-align:right; }
+.servername_cell { text-align:left; }
+.servername_cell > div { width:100%; overflow:hidden; height:1.3em; line-height:1.3em; }
+div.servername_link { display: none; }
+.map_cell { white-space:nowrap; text-align:left; }
+.players_cell { white-space:nowrap; text-align:right; }
+.details_cell, .status_cell { white-space:nowrap; text-align:center; }
+.status_cell { border-radius: 12px 0px 0px 12px !important; }
+.details_cell { border-radius: 0px 12px 12px 0px !important; }
+.details_cell > a { text-decoration: none; }
+#totals { width: fit-content; background-color: #f4f7fa; margin:auto; margin-top: 20px; }
+#totals > div { border: 1px solid #e5fbff; padding: 10px; display:inline-block; }
+
+/* admin */
+input[type='submit'] {
+ background-color: #FFFFFF;
+ border: 1px solid #CCCCCC;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
+ transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
+ border-radius: 4px;
+ color: #555555;
+ text-align:center;
+ vertical-align: middle;
+ text-decoration:none;
+}
+input[type='submit']:hover, input[type='submit']:focus {
+ border-color: rgba(82, 168, 236, 0.8);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(82, 168, 236, 0.6);
+ outline: 0 none;
+}
+input[type='text'], input[type='number'], input[type='password'], select {
+ display: block;
+ border: none;
+ border-radius: 6px;
+ padding: 5px 8px;
+ color: #333;
+ box-shadow: inset 0 1px 0 rgba(0,0,0,.2), 0 0 4px rgba(0,0,0,0.1);
+}
+input[type='text']:focus, input[type='number']:focus, input[type='password']:focus {
+ outline: none;
+ box-shadow: inset 0 2px 0 rgba(0,0,0,.2), 0 0 4px rgba(0,0,0,0.1), 0 0 5px 1px #51CBEE;
+}
+
+/* */
+.inline {display:inline-block;}
+.center {text-align: center;}
+
+/* adaptiveness */
+
+@media(max-width: 990px){
+ .map_cell {
+ display: none;
+ }
+}
+
+@media(max-width: 414px){
+ body
+ {
+ margin: 0;
+ }
+ #topmenu > li {
+ display: inline-block;
+ padding: 10px 0px;
+ }
+ #server_list_table { width:100%; margin: 0px; }
+ .players_cell { border-radius: 0px 12px 12px 0px !important; }
+ img.game_icon { width: 32px; border-radius: 8px 0px; }
+ .connectlink_cell,
+ td.details_cell,
+ .map_cell,
+ div.servername_nolink,
+ .status_icon_nrs, .status_icon_onl, .status_icon_onp {
+ display: none;
+ }
+ .servername_cell { padding: 0px; }
+ .servername_cell > .servername_link {
+ width: 100%;
+ overflow: hidden;
+ line-height: 1em;
+ font-size: larger;
+ font-family: cursive;
+ height: 3.5em;
+ display: block;
+ text-align: justify;
+ }
+ .servername_link > a {
+ display: block;
+ margin: 0.5em 0.5em 0em 0.5em;
+ height: 100%;
+ }
+ #server_list_table td { padding: 10px; }
+ #server_list_table .status_cell { padding: 2px; }
+ #server_list_table .servername_cell { padding: 0px; }
+ #server_list_table tr.server_nrs {
+ background-color: rgba(148, 0, 0, 0.2);
+ }
+ #totals { margin: 0px; }
+ #totals > div {
+ border-radius: 8px 0px;
+ padding: 10px 1px;
+ border: 1px solid #d5d9da;
+ }
+
+ /*details*/
+ #gamelink {display: none;}
+ .details_info { display: flex; flex-flow: column; }
+ .details_info_column { margin: auto; order: 2; margin-top: 6px; }
+ .details_info_column:nth-child(2) { order: 1; }
+ #details_playerlist { overflow: auto; }
+}
\ No newline at end of file
diff --git a/lgsl_files/styles/classic_style.css b/lgsl_files/styles/classic_style.css
new file mode 100644
index 0000000..8058fd2
--- /dev/null
+++ b/lgsl_files/styles/classic_style.css
@@ -0,0 +1,177 @@
+/*-------------------------------
+> LGSL Classic Style <
+> RICHARD PERRY <
+> GREYCUBE.COM <
+-------------------------------*/
+
+/* global */
+body
+{
+ background-color:#ccd5e2;
+ font-size:11px;
+ font-family:verdana,tahoma,arial;
+ word-wrap:break-word;
+}
+
+a:link { text-decoration:none; color:#c00000; }
+a:visited { text-decoration:none; color:#c00000; }
+a:hover { color:#7500c0; }
+a:active { color:#7500c0; }
+
+#adminlink {margin: 0;position: fixed;width: 25px;right: 0;top: 0;background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #ff000061);height: 25px;}
+#adminlink:hover {background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #f30606);}
+#topmenu {padding: 1em; padding-bottom:6px; border-bottom: 6px solid #e4eaf2; margin-bottom:6px; }
+#topmenu > li {display: inline-block;padding: 0px 10px;}
+#topmenu > li:before {content: '► ';}
+
+/* add */
+.annotation { text-align: center; background-color: #e4eaf2; padding-top:17px; padding-bottom:17px; }
+
+/* details */
+.players_table { margin: auto; border-spacing: 2px 4px; }
+.settings_table { margin: auto; border-spacing: 2px 4px; max-width: 600px; }
+.players_table tr, .settings_table tr { white-space:nowrap; table-layout:fixed; }
+.details_table tr:nth-child(n), .players_table tr:nth-child(n), .settings_table tr:nth-child(n) { background-color: #e4eaf2; }
+.details_table tr:nth-child(2n), .players_table tr:nth-child(2n), .settings_table tr:nth-child(2n) { background-color: #f4f7fa; }
+.players_table td { padding: 4px; }
+.settings_table td { padding: 4px; white-space: pre-wrap; }
+
+.details_info_row { margin-top: 14px; }
+.details_info, .details_info_column:nth-child(2) { vertical-align: top; }
+.details_info_ceil, .details_info_column, .details_info_scolumn { display: inline-block; }
+.details_info_column { margin-right: 12px; }
+.details_info_scolumn:nth-child(1) { margin-right: 6px; }
+.details_info_scolumn:nth-child(2) { margin-left: 6px; }
+.details_info_srow { padding: 6px; background-color: #e4eaf2; margin-top: 4px; }
+.details_info_srow:nth-child(2n) { background-color: #f4f7fa; }
+.details_info_ceil { }
+.details_info_ceil:first-child { font-weight: 600; padding-right: 4px; }
+#gamelink { vertical-align: middle; display: block; margin-bottom: 6px; width: calc(100% - 2px); }
+.details_info_column:nth-child(2), .details_password_image {
+ background-size: cover;
+ width: 160px;
+ height: 120px;
+}
+.details_password_image, .details_game_image, .details_location_image {
+ display: block;
+ z-index: 5;
+ background-size: cover;
+}
+.details_password_image {
+ background-position: 100% 100%;
+ position: absolute;
+ background-size: auto;
+ background-repeat: no-repeat;
+}
+.details_location_image {
+ width: 16px;
+ height: 11px;
+ position: relative;
+ right: 4px;
+ float: right;
+ top: 4px;
+}
+.details_game_image {
+ width: 16px;
+ height: 16px;
+ position: relative;
+ left: 4px;
+ top: 4px;
+}
+img[title='Location: XX'] { display: none; }
+
+.table_head { font-weight: bold; }
+.spacer { background-color: #e4eaf2; height:6px; width:90%; margin:auto; margin-top: 10px; margin-bottom: 10px; border:1px solid; }
+.noinfo { margin:auto; text-align:center; background-color: #f4f7fa; display: inline-block; padding: 4px; }
+#invalid_server_id, #back_to_servers_list { margin:auto; text-align:center; }
+div[id^="servername"] { margin:auto; text-align:center; font-weight:bold; padding-bottom: 15px; }
+#gamelink {width:100%; margin:auto; background-color: #e4eaf2; text-align: center; padding-top:4px; padding-bottom:4px; }
+#details_playerlist {margin:auto; overflow:auto; text-align:center; padding:10px}
+
+/* list */
+.contry_icon { border:none; width: 16px; height: 16px; }
+.details_icon, .status_icon_onl, .status_icon_nrs, .status_icon_onp {
+ width: 16px;
+ height: 16px;
+ display: inline-block;
+ background-size: cover;
+}
+.details_icon { background-image: url(../other/icon_details.gif) !important; }
+.status_icon_onl { background-image: url(../other/icon_online.gif) !important; }
+.status_icon_nrs { background-image: url(../other/icon_no_response.gif) !important; }
+.status_icon_onp { background-image: url(../other/icon_online_password.gif) !important; }
+img.game_icon { width: 16px; }
+
+#server_list_table { margin:auto; margin-top:30px; }
+#server_list_table tr:nth-child(n) { background-color: #e4eaf2; }
+#server_list_table tr:nth-child(2n) { background-color: #f4f7fa; }
+#server_list_table_top { display:none; }
+.connectlink_cell { text-align:right; }
+.servername_cell { text-align:left; }
+.servername_cell > div { width:100%; overflow:hidden; height:1.3em; line-height:1.3em; }
+div.servername_link { display: none; }
+.map_cell { white-space:nowrap; text-align:left; }
+.players_cell { white-space:nowrap; text-align:right; }
+.details_cell, .status_cell { white-space:nowrap; text-align:center; }
+.details_cell > a { text-decoration: none; }
+#totals { width: fit-content; margin:auto; margin-top: 16px; }
+#totals > div {width: fit-content; background-color: #e4eaf2; padding:4px; display:inline-block;}
+
+/* */
+.inline{ display:inline-block; }
+.center {text-align: center;}
+
+/* adaptiveness */
+
+@media(max-width: 990px){
+ .map_cell {
+ display: none;
+ }
+}
+
+@media(max-width: 414px){
+ body
+ {
+ margin: 0;
+ }
+ .servername_cell > div {
+ width: 100%;
+ overflow: hidden;
+ line-height: 1em;
+ font-size: larger;
+ font-family: cursive;
+ height:3em;
+ }
+ .connectlink_cell,
+ td.details_cell,
+ .map_cell,
+ div.servername_nolink,
+ .status_icon_nrs, .status_icon_onl, .status_icon_onp {
+ display: none;
+ }
+ .servername_cell { padding: 0px; }
+ .servername_cell > .servername_link {
+ width: 100%;
+ overflow: hidden;
+ line-height: 1em;
+ font-size: larger;
+ font-family: cursive;
+ height: 3.5em;
+ display: block;
+ text-align: justify;
+ }
+ .servername_link > a {
+ display: block;
+ margin: 0.5em 0.5em 0em 0.5em;
+ height: 100%;
+ }
+ #server_list_table td { padding: 10px; }
+ #server_list_table .status_cell { padding: 2px; }
+ #server_list_table .servername_cell { padding: 0px; }
+ #server_list_table tr.server_nrs {
+ background-color: rgba(148, 0, 0, 0.2);
+ }
+
+ /*details*/
+ #gamelink {display: none;}
+}
\ No newline at end of file
diff --git a/lgsl_files/styles/darken_style.css b/lgsl_files/styles/darken_style.css
new file mode 100644
index 0000000..aaaa582
--- /dev/null
+++ b/lgsl_files/styles/darken_style.css
@@ -0,0 +1,195 @@
+/*--------------------------------------
+> Darken Style <
+> Neon <
+> https://github.com/tltneon <
+---------------------------------------*/
+
+/* global */
+body
+{
+ background-color:#191919;
+ font-size:11px;
+ font-family:verdana,tahoma,arial;
+ word-wrap:break-word;
+ color: white;
+ font-weight: bold;
+}
+
+a:link, a:visited { text-decoration:none; color:#0088DD; }
+a:hover{ color:#adcef1; }
+a:active{ color:#adcef1; }
+textarea {
+ background-color: #282828;
+ color: white;
+ border: 1px solid black;
+}
+
+#adminlink {margin: 0;position: fixed;width: 25px;right: 0;top: 0;background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #ff000061);height: 25px;}
+#adminlink:hover {background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #f30606);}
+#topmenu {padding: 1em; border-bottom: 2px dashed black;}
+#topmenu > li {display: inline-block;padding: 0px 10px;}
+#topmenu > li:before {content: '► ';}
+
+/* add */
+.annotation { text-align: center; background-color: #282828; padding-top:17px; padding-bottom:17px; }
+
+/* details */
+.players_table { margin: auto; border: 1px solid #22252f; border-spacing: 0px 0px; border-collapse: collapse; }
+.settings_table { margin: auto; border: 1px solid #22252f; border-spacing: 0px 0px; border-collapse: collapse; max-width: 600px; }
+.players_table tr, .settings_table tr { white-space:nowrap; border: 1px solid #22252f; table-layout:fixed; }
+.players_table tr:nth-child(n), .settings_table tr:nth-child(n) { background-color: rgba(26, 28, 34, 0.2); }
+.players_table tr:nth-child(2n), .settings_table tr:nth-child(2n) { background-color: rgba(26, 28, 34, 0.1); }
+.players_table td { padding: 8px; border-top: 1px solid #22252f; }
+.settings_table td { padding: 8px; border-top: 1px solid #22252f; white-space: pre-wrap; }
+
+.details_info_row { margin-top: 14px; }
+.details_info, .details_info_column:nth-child(2) {vertical-align: top;}
+.details_info_ceil, .details_info_column, .details_info_scolumn {display: inline-block;}
+.details_info_column {margin-right: 12px;}
+.details_info_srow { border: 1px solid #22252f; margin: -1px 3px; padding: 8px; }
+.details_info_ceil:first-child {padding-right: 4px;}
+.details_info_ceil:nth-child(2) {font-weight: 300;}
+#gamelink {vertical-align: middle;display: block;margin-bottom: 6px;width: calc(100% - 2px); border: 1px solid #22252f; padding: 4px 0px;}
+.details_info_column:nth-child(2), .details_password_image {
+ background-size: cover;
+ width: 250px;
+ height: 188px;
+}
+.details_password_image, .details_game_image, .details_location_image {
+ display: block;
+ z-index: 5;
+ background-size: cover;
+}
+.details_info_column:nth-child(2) {
+ border-radius: 4px;
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important;
+}
+.details_password_image {
+ background-position: 100% 100%;
+ position: absolute;
+ background-size: auto;
+ background-repeat: no-repeat;
+}
+.details_location_image {
+ width: 16px;
+ height: 11px;
+ position: relative;
+ right: 4px;
+ float: right;
+ top: 4px;
+}
+.details_game_image {
+ width: 32px;
+ height: 32px;
+ position: relative;
+ left: 4px;
+ top: 4px;
+ opacity: .4;
+ border-radius: 6px;
+}
+.details_game_image:hover { opacity: 1; transition-duration: 500ms; }
+img[title='Location: XX'] { display: none; }
+
+.table_head { font-weight: bold; }
+.spacer { background-color: #282828; height:6px; width:90%; margin:auto; margin-top: 10px; margin-bottom: 10px; border:1px dotted black; }
+.noinfo { margin:auto; text-align:center; background-color: #282828; display: inline-block; padding:15px; }
+#invalid_server_id, #back_to_servers_list { margin:auto; text-align:center; }
+div[id^="servername"] { margin:auto; text-align:center; font-weight:bold; padding-bottom: 15px; font-size: 16px; }
+#details_playerlist {margin:auto; overflow:auto; text-align:center; padding:10px}
+
+/* list */
+.contry_icon { border:none; width: 16px; height: 16px; }
+.details_icon, .status_icon_onl, .status_icon_nrs, .status_icon_onp {
+ width: 16px;
+ height: 16px;
+ display: inline-block;
+ background-size: cover;
+}
+.details_icon { background-image: url(../other/icon_details.gif) !important; }
+.status_icon_onl { background-image: url(../other/icon_online.gif) !important; }
+.status_icon_nrs { background-image: url(../other/icon_no_response.gif) !important; }
+.status_icon_onp { background-image: url(../other/icon_online_password.gif) !important; }
+img.game_icon { width: 16px;border-radius: 2px; }
+
+#server_list_table { margin:auto; width:90%; border-radius: 12px; margin-top:30px; }
+#server_list_table tr { background-color: #282828; }
+#server_list_table td { padding:13px; border-bottom: 1px dotted black; }
+#server_list_table_top { display:none; }
+.connectlink_cell { text-align:right; }
+.servername_cell { text-align:left; }
+.servername_cell > div { width:100%; overflow:hidden; height:1.3em; line-height:1.3em; }
+div.servername_link { display: none; }
+.map_cell { white-space:nowrap; text-align:left; }
+.players_cell { white-space:nowrap; text-align:right; }
+.details_cell, .status_cell { white-space:nowrap; text-align:center; }
+.details_cell > a { text-decoration: none; }
+#totals { width: fit-content; margin:auto; margin-top: 16px; }
+#totals > div { width: fit-content; background-color: #282828; padding:15px; display:inline-block; }
+
+/* */
+.inline{ display:inline-block; }
+.center {text-align: center;}
+
+/* adaptiveness */
+
+@media(max-width: 990px){
+ .map_cell {
+ display: none;
+ }
+}
+
+@media(max-width: 414px){
+ body
+ {
+ margin: 0;
+ }
+ #topmenu > li {
+ padding: 10px 10px;
+ font-size: 14px;
+ }
+ #server_list_table { width:100%; margin: 0px; }
+ .servername_cell > div {
+ width: 100%;
+ overflow: hidden;
+ line-height: 1em;
+ font-size: larger;
+ font-family: cursive;
+ height:3em;
+ }
+ img.game_icon {
+ width: 32px;
+ }
+ .connectlink_cell,
+ td.details_cell,
+ .map_cell,
+ div.servername_nolink,
+ .status_icon_nrs, .status_icon_onl, .status_icon_onp {
+ display: none;
+ }
+ div.servername_link {
+ height: 3.5em;
+ display: block;
+ text-align: justify;
+ font-size: 1.4em;
+ }
+ .servername_link > a {
+ vertical-align: middle;
+ display: block;
+ margin: 0.5em 0.5em 0em 0.5em;
+ height: 100%;
+ color: #d5f2ff;
+ }
+ #server_list_table td { padding: 10px; }
+ #server_list_table .status_cell { padding: 2px; }
+ #server_list_table .servername_cell { padding: 0px; }
+ #server_list_table tr.server_nrs {
+ background-color: rgba(148, 0, 0, 0.2);
+ }
+
+ /*details*/
+ #gamelink { display: none; }
+ .details_info { display: flex; flex-flow: column; }
+ .details_info_column { margin: auto; order: 2; margin-top: 6px; }
+ .details_info_column:nth-child(2) { order: 1; }
+ #details_playerlist { overflow: auto; }
+}
\ No newline at end of file
diff --git a/lgsl_files/styles/disc_ff_style.css b/lgsl_files/styles/disc_ff_style.css
new file mode 100644
index 0000000..6ac34a5
--- /dev/null
+++ b/lgsl_files/styles/disc_ff_style.css
@@ -0,0 +1,161 @@
+/*--------------------------------------
+> Disc-ff Style <
+> fearts & Neon <
+> https://github.com/tltneon/lgsl <
+---------------------------------------*/
+
+/* global */
+body
+{
+ background-color:#191919;
+ font-size: 12px;
+ font-family:verdana,tahoma,arial;
+ word-wrap:break-word;
+ color: white;
+ font-weight: bold;
+}
+
+a:link, a:visited { text-decoration:none; color:#0088DD; }
+a:hover{ color:#adcef1; }
+a:active{ color:#adcef1; }
+
+#adminlink {margin: 0;position: fixed;width: 25px;right: 0;top: 0;background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #ff000061);height: 25px;}
+#adminlink:hover {background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #f30606);}
+#topmenu {padding: 1em; border-bottom: 2px dashed black;}
+#topmenu > li {display: inline-block;padding: 0px 10px;}
+
+/* add */
+.annotation { text-align: center; background-color: #282828; padding-top:17px; padding-bottom:17px; }
+
+/* details */
+.players_table { margin: auto; border-spacing: 0px 5px; }
+.settings_table { margin: auto; border: 1px solid #22252f; border-spacing: 0px 0px; border-collapse: collapse; max-width: 600px; }
+.players_table tr, .settings_table tr { white-space:nowrap; background-color: #282828; table-layout:fixed; }
+.players_table td { padding: 8px; }
+.settings_table td { padding: 8px; white-space: pre-wrap; }
+
+.details_info_row { background-color: #282828; margin-top: 14px; }
+.details_info, .details_info_column:nth-child(2) {vertical-align: top;}
+.details_info_ceil, .details_info_column, .details_info_scolumn {display: inline-block;}
+.details_info_column {margin-right: 12px;}
+.details_info_srow {padding: 0.75rem;}
+.details_info_srow:nth-child(2n) {background-color: #0000000d;}
+.details_info_ceil:first-child {padding-right: 4px;}
+.details_info_ceil:nth-child(2) {font-weight: 300;}
+#gamelink {vertical-align: middle;display: block;margin-bottom: 6px;width: calc(100% - 2px);}
+.details_info_column:nth-child(2), .details_password_image {
+ background-size: cover;
+ width: 250px;
+ height: 188px;
+}
+.details_password_image, .details_game_image, .details_location_image {
+ display: block;
+ z-index: 5;
+ background-size: cover;
+}
+.details_info_column:nth-child(2) {
+ border-radius: 4px;
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important;
+}
+.details_password_image {
+ background-position: 100% 100%;
+ position: absolute;
+ background-size: auto;
+ background-repeat: no-repeat;
+}
+.details_location_image {
+ width: 16px;
+ height: 11px;
+ position: relative;
+ right: 4px;
+ float: right;
+ top: 4px;
+}
+.details_game_image {
+ width: 32px;
+ height: 32px;
+ position: relative;
+ left: 4px;
+ top: 4px;
+ opacity: .4;
+ border-radius: 6px;
+}
+.details_game_image:hover { opacity: 1; transition-duration: 500ms; }
+img[title='Location: XX'] { display: none; }
+
+.table_head { font-weight: bold; }
+.spacer { background-color: #282828; height:6px; width:90%; margin:auto; margin-top: 10px; margin-bottom: 10px; border:1px dotted black; }
+.noinfo { margin:auto; text-align:center; background-color: #282828; display: inline-block; padding:15px; }
+#invalid_server_id, #back_to_servers_list { margin:auto; text-align:center; }
+div[id^="servername"] { margin:auto; text-align:center; font-weight:bold; padding-bottom: 15px; font-size: 16px; }
+#gamelink { width:100%; margin:auto; background-color: #282828; text-align: center; padding-top:4px; padding-bottom:4px; }
+
+#details_playerlist {overflow: auto;}
+
+/* list */
+.contry_icon { border:none; width: 16px; height: 16px; }
+.game_icon { border:none; width: 32px; height: 32px; border-radius: 2px; }
+.details_icon,
+.status_icon_onp { width: 32px; height: 32px; display: inline-block; background-size: cover; }
+.details_icon { background-image: url(../other/icon_details.gif) !important; }
+.status_icon_nrs,
+.status_icon_onl,
+.status_icon_onp { width: 28px;height: 28px; border: 2px solid black; display: inline-block; }
+.status_icon_onl { background: #8ee683; }
+.status_icon_nrs { background: #f1abab; }
+.status_icon_onp { background-image: url(../other/icon_online_password.gif) !important; }
+
+#server_list_table { margin:auto; width: 100%; border-radius: 12px; margin-top:30px; border-collapse: collapse; }
+#server_list_table tr:not(#server_list_table_top) { background-color: #282828; height: 59px; }
+#server_list_table td, #server_list_table th { padding:13px; border-bottom: 1px dotted black; }
+#server_list_table_top { text-align: left; }
+.connectlink_cell { }
+.servername_cell { text-align:left; }
+.servername_cell > div { width:100%; overflow:hidden; height:1.3em; line-height:1.3em; }
+div.servername_nolink { display: none; }
+.map_cell { white-space:nowrap; text-align:left; }
+.players_cell { white-space:nowrap; }
+.details_cell, .status_cell { white-space:nowrap; text-align:center; }
+.details_cell { display: none; }
+#totals { width: fit-content; margin:auto; margin-top: 16px; }
+#totals > div { width: fit-content; background-color: #282828; padding:15px; display:inline-block; }
+
+/* */
+.inline{ display:inline-block; }
+
+/* adaptiveness */
+@media(max-width: 990px) {
+ .map_cell { display: none; }
+}
+
+@media(max-width: 414px) {
+ body { margin: 0; }
+ .servername_cell > div {
+ width: 100%;
+ overflow: hidden;
+ line-height: 1em;
+ font-size: larger;
+ font-family: cursive;
+ height:3em;
+ }
+ .connectlink_cell,
+ td.details_cell,
+ .map_cell,
+ div.servername_nolink,
+ .status_icon_nrs,
+ .status_icon_onl,
+ .status_icon_onp { display: none; }
+
+ div.servername_link a { color: #d5f2ff; }
+ div.servername_link { display: block; }
+ #server_list_table td { padding: 3px; }
+ #server_list_table td:not(.status_cell) { padding: 10px; }
+ #server_list_table tr.server_nrs { background-color: rgba(148, 0, 0, 0.2); }
+
+ /*details*/
+ #gamelink { display: none; }
+ .details_info { display: flex; flex-flow: column; }
+ .details_info_column { margin: auto; order: 2; margin-top: 6px; }
+ .details_info_column:nth-child(2) { order: 1; }
+ #details_playerlist { overflow: auto; }
+}
\ No newline at end of file
diff --git a/lgsl_files/styles/material_style.css b/lgsl_files/styles/material_style.css
new file mode 100644
index 0000000..978d35f
--- /dev/null
+++ b/lgsl_files/styles/material_style.css
@@ -0,0 +1,343 @@
+/*--------------------------------------
+> Material Design Style <
+> Neon <
+> https://github.com/tltneon <
+---------------------------------------*/
+
+/* global */
+body
+{
+ word-wrap: break-word;
+ font-family: "Roboto", sans-serif;
+ font-weight: 300;
+ font-size: .9rem;
+}
+table{
+ border-collapse: collapse;
+}
+table td {
+ font-size: .9rem;
+ font-weight: 300;
+}
+table th {
+ font-size: .9rem;
+ font-weight: 400;
+}
+table tr:nth-of-type(even) {
+ background-color: rgba(0, 0, 0, 0.05);
+}
+table th, table td {
+ padding-top: 1.1rem;
+ padding-bottom: 1rem;
+}
+table th, table td {
+ padding: 0.75rem;
+ vertical-align: middle;
+ border-top: 1px solid #dee2e6;
+}
+table tr:nth-of-type(1) td {
+ border-top: 0;
+}
+textarea { border-radius: 6px;border: 1px solid #dee2e6; }
+
+
+a:link, a:visited {
+ position: relative;
+ display: inline-block;
+ font-weight: 800;
+ color: royalblue;
+ overflow: hidden;
+ background: linear-gradient(to right, midnightblue, midnightblue 50%, royalblue 50%);
+ background-clip: text;
+ -webkit-background-clip: text;
+ -webkit-text-fill-color: transparent;
+ background-size: 200% 100%;
+ background-position: 100%;
+ transition: background-position 275ms ease;
+}
+a:hover {
+ background-position: 0 100%;
+}
+
+#adminlink { -webkit-background-clip: inherit; -webkit-text-fill-color: inherit; background-size: 100%; margin: 0; position: fixed; width: 25px; right: 0; top: 0; background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #6f65a261); height: 25px; }
+#adminlink:hover { background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #6f65a2); }
+#topmenu { box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important; background-color: #33b5e5 !important; }
+#topmenu > li { display: inline-block; padding: 0px 10px; }
+#topmenu > li > a {
+ position: inherit;
+ display: block;
+ padding: 20px 24px;
+ font-size: 13px;
+ text-transform: uppercase;
+ background: 0;
+ -webkit-text-fill-color: inherit;
+ color: rgba(255, 255, 255, 0.8) !important;
+ text-align: center;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+ font-weight: 500;
+ border-bottom: 3px solid #33b5e5;
+ text-decoration: none;
+ overflow: inherit;
+}
+#topmenu > li > a:hover { border-bottom: 3px solid white !important; color: #fff; }
+
+/* add */
+.annotation { text-align: center; background-color: #feffff; border: 1px solid #e5fbff; padding-top:17px; padding-bottom:17px; }
+
+/* details */
+.players_table { margin: auto; border-spacing: 0px 5px; }
+.settings_table { margin: auto; border-spacing: 0px 0px; border-collapse: collapse; max-width: 600px; }
+.players_table tr:nth-child(n), .settings_table tr:nth-child(n) { white-space:nowrap; table-layout:fixed; }
+.players_table tr:nth-child(2n), .settings_table tr:nth-child(2n) { white-space:nowrap; table-layout:fixed; }
+.players_table tr:not(.table_head):hover td { background-color: #e6f8ff; transition: 0.45s ease; }
+.players_table td { }
+.settings_table td { white-space: pre-wrap; }
+
+.details_info_row { margin-top: 14px; }
+.details_info, .details_info_column:nth-child(2) {vertical-align: top;}
+.details_info_ceil, .details_info_column, .details_info_scolumn {display: inline-block;}
+.details_info_column {margin-right: 12px;}
+.details_info_scolumn { border-top: 1px solid #dee2e6; }
+.details_info_srow {padding: 0.75rem; background-color: rgba(0, 0, 0, 0.05);}
+.details_info_srow:nth-child(2n) {background-color: white;}
+.details_info_ceil:first-child {padding-right: 4px;}
+.details_info_ceil:nth-child(2) {font-weight: 300;}
+#gamelink {vertical-align: middle;display: block;margin-bottom: 6px;width: calc(100% - 2px);}
+.details_info_column:nth-child(2), .details_password_image {
+ background-size: cover;
+ width: 250px;
+ height: 188px;
+}
+.details_password_image, .details_game_image, .details_location_image {
+ display: block;
+ z-index: 5;
+ background-size: cover;
+}
+.details_info_column:nth-child(2) {
+ border-radius: 4px;
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important;
+}
+.details_password_image {
+ background-position: 100% 100%;
+ position: absolute;
+ background-size: auto;
+ background-repeat: no-repeat;
+}
+.details_location_image {
+ width: 16px;
+ height: 11px;
+ position: relative;
+ right: 4px;
+ float: right;
+ top: 4px;
+}
+.details_game_image {
+ width: 32px;
+ height: 32px;
+ position: relative;
+ left: 4px;
+ top: 4px;
+ opacity: .4;
+ border-radius: 6px;
+}
+.details_game_image:hover { opacity: 1; transition-duration: 500ms; }
+img[title='Location: XX'] { display: none; }
+
+.table_head { font-weight: bold; background-color: #e0edff !important; }
+.spacer { width:90%; margin:auto; margin-top: 10px; margin-bottom: 10px; border: .5px solid #dee2e6; }
+.noinfo{ margin:auto; text-align:center; background-color: #f4f7fa; display: inline-block; padding: 6px; border-radius: 6px; border: 1px solid #e0f2f4; }
+#invalid_server_id, #back_to_servers_list { mmargin: 16px auto; text-align:center; }
+div[id^="servername"] { margin:auto; text-align:center; font-weight:bold; padding-bottom: 15px; font-size: 16px; }
+#gamelink { width:100%; margin:auto; text-align: center; padding-top:4px; padding-bottom:4px; border: 1px solid #e0f2f4; }
+#details_playerlist {margin:auto; overflow:auto; text-align:center; padding:10px}
+
+/* list */
+.contry_icon { border:none; width: 16px; height: 16px; }
+.status_icon_onl { background-color: #8ee683; }
+.status_icon_nrs { background-color: #f1abab; }
+.status_icon_onp { background-color: #f8bc85; }
+.status_icon_onl, .status_icon_nrs, .status_icon_onp {
+ width: 0.25rem;
+ height: 3rem;
+ display: inline-block;
+ padding: 0;
+ margin: 0;
+ border-radius: .125rem 0rem 0rem .125rem;
+}
+
+#server_list_table { margin:auto; width:85%; margin-top:30px; }
+tr#server_list_table_top th { border-top: none !important; }
+
+img.game_icon {
+ height: 3rem;
+ margin-left: -4px;
+ padding: 0;
+ border-radius: 0rem .125rem .125rem 0rem;
+}
+a.details_icon {
+ padding-top: .38rem;
+ padding-bottom: .38rem;
+ border: 2px solid #4285f4 !important;
+ transition: color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;
+ transition: color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out;
+ transition: color 0.15s ease-in-out,background-color 0.15s ease-in-out,border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out,-webkit-box-shadow 0.15s ease-in-out;
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
+ border-radius: .125rem;
+ color: #4285f4 !important;
+ padding: .5rem 1.6rem;
+ font-size: .64rem;
+}
+a.details_icon:after {
+ content: '►';
+}
+a.details_icon:hover, a.details_icon:focus, a.details_icon:active {
+ outline: 0;
+ -webkit-box-shadow: 0 5px 11px 0 rgba(0,0,0,0.18), 0 4px 15px 0 rgba(0,0,0,0.15);
+ box-shadow: 0 5px 11px 0 rgba(0,0,0,0.18), 0 4px 15px 0 rgba(0,0,0,0.15);
+}
+.server_nrs td.players_cell { color: black; }
+td.players_cell { color: #e83e8c; }
+.status_cell { min-width: 52px; }
+div.servername_link { display: none; }
+
+.contry_link {
+ display: inline-block !important;
+ height: 16px;
+ margin: -5px;
+ position: absolute !important;
+ z-index: 10;
+ border-radius: 19px;
+}
+
+div#totals {
+ margin: 16px auto 0;
+ display: table;
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important;
+}
+#totals > div {
+ display: inline-block;
+ background: #33b5e5;
+ padding: 20px 24px;
+ font-size: 13px;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.8) !important;
+ text-align: center;
+ font-weight: 500;
+}
+
+/* admin */
+#admin_login_page { height: 40vh; padding-top: 40vh; }
+#admin_login_page table tr { background: transparent; }
+#admin_login_page table td { border: 0; }
+
+input[type='submit'] {
+ background-color: #FFFFFF;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
+ transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
+ border-radius: 4px;
+ border: 1px solid #33b5e5;
+ color: #33b5e5 !important;
+ text-align:center;
+ vertical-align: middle;
+ text-decoration:none;
+ height: 36px;
+ border-style: solid;
+ padding: 0 15px 0 15px;
+ border-width: 1px;
+ font-size: .875rem;
+ line-height: 2.25rem;
+ font-weight: 500;
+ letter-spacing: .0892857143em;
+ text-decoration: none;
+ text-transform: uppercase;
+}
+input[type='submit']:hover, input[type='submit']:focus {
+ border-color: rgba(82, 168, 236, 0.8);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(82, 168, 236, 0.6);
+ outline: 0 none;
+}
+input[type='text'], input[type='number'], input[type='password'], select {
+ display: block;
+ border: none;
+ border-radius: 4px;
+ padding: 5px 8px;
+ color: #333;
+ box-shadow: inset 0 1px 0 rgba(0,0,0,.2), 0 0 4px rgba(0,0,0,0.1);
+ background: white;
+ font-size: .875rem;
+}
+input[type='text']:focus, input[type='number']:focus, input[type='password']:focus {
+ outline: none;
+ box-shadow: inset 0 2px 0 rgba(0,0,0,.2), 0 0 4px rgba(0,0,0,0.1), 0 0 5px 1px #51CBEE;
+}
+
+/* */
+.inline { display:inline-block; }
+.center { text-align: center; }
+
+/* adaptiveness */
+
+@media(max-width: 990px){
+ .map_cell {
+ display: none;
+ }
+}
+
+@media(max-width: 414px){
+ body
+ {
+ margin: 0;
+ }
+ select { width: 100%; }
+ #server_list_table { margin: 0px; width: 100%; }
+ #topmenu, div#totals {
+ text-align: center;
+ background-color: #33b5e5 !important;
+ }
+ #topmenu > li > a {
+ position: inherit;
+ display: block;
+ padding: 16px 0px;
+ font-size: 13px;
+ text-transform: uppercase;
+ background: 0;
+ -webkit-text-fill-color: inherit;
+ color: rgba(255, 255, 255, 0.8) !important;
+ text-align: center;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+ font-weight: 500;
+ border-bottom: 3px solid #33b5e5;
+ text-decoration: none;
+ overflow: inherit;
+ }
+ .servername_cell > div {
+ width: 100%;
+ overflow: hidden;
+ line-height: 1em;
+ font-size: larger;
+ font-family: cursive;
+ height:3em;
+ }
+ .connectlink_cell,
+ .details_cell,
+ .map_cell,
+ div.servername_nolink {
+ display: none;
+ }
+ div.servername_link { display: block; }
+ #server_list_table td {
+ padding: 3px;
+ }
+ #server_list_table td:not(.status_cell) {
+ padding: 10px;
+ }
+
+ /*details*/
+ #gamelink {display: none;}
+ .details_info { display: flex; flex-flow: column; }
+ .details_info_column { margin: auto; order: 2; margin-top: 6px; }
+ .details_info_column:nth-child(2) { order: 1; }
+ #details_playerlist { overflow: auto; }
+}
\ No newline at end of file
diff --git a/lgsl_files/styles/ogp_style.css b/lgsl_files/styles/ogp_style.css
new file mode 100644
index 0000000..cf8b07f
--- /dev/null
+++ b/lgsl_files/styles/ogp_style.css
@@ -0,0 +1,191 @@
+/*--------------------------------------
+> OGP Style <
+> oNdsen & own3mall <
+> https://github.com/OpenGamePanel/Theme-SimpleBootstrap <
+---------------------------------------*/
+
+/* global */
+body
+{
+ margin: 0;
+ background-color: #fff;
+ font-size: 14px;
+ font-family: Roboto,Arial,sans-serif;
+ word-wrap: break-word;
+ color: white;
+ text-shadow: 0 1px 3px rgba(0,0,0,.5);
+ background-image: url('https://raw.githubusercontent.com/OpenGamePanel/Theme-SimpleBootstrap/master/themes/SimpleBootstrap/images/bg/light.jpg') !important;
+ background-size: cover!important;
+ background-repeat: no-repeat;
+ background-attachment: fixed;
+ background-position: center;
+ /* other backgrounds here: https://github.com/OpenGamePanel/Theme-SimpleBootstrap/tree/master/themes/SimpleBootstrap/images/bg */
+}
+
+*::selection {
+ background: black;
+ color: #ffffff;
+}
+
+textarea {background-color: rgba(26, 28, 34, 0.2); border: 1px solid rgba(26, 28, 34, 0.2); color: white;}
+
+a:link, a:visited { text-decoration:none; color: #1997c6; }
+a:hover, a:active { color:#fff; }
+
+#adminlink {margin: 0;position: fixed;width: 25px;right: 0;top: 0;background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #ff000061);height: 25px;}
+#adminlink:hover {background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #f30606);}
+#topmenu {padding: 1em;background-color: #0000002b;border-bottom: 2px dashed black;}
+#topmenu > li {display: inline-block;padding: 0px 10px;}
+#topmenu > li:before {content: '► ';}
+
+/* add */
+.annotation { text-align: center; background-color: rgba(26, 28, 34, 0.2); padding-top:17px; padding-bottom:17px; }
+
+/* details */
+.players_table { margin: auto; border: 1px solid #22252f; border-spacing: 0px 0px; border-collapse: collapse; }
+.settings_table { margin: auto; border: 1px solid #22252f; border-spacing: 0px 0px; border-collapse: collapse; max-width: 600px; }
+.players_table tr, .settings_table tr { white-space:nowrap; border: 1px solid #22252f; table-layout:fixed; }
+.players_table tr:nth-child(n), .settings_table tr:nth-child(n) { background-color: rgba(26, 28, 34, 0.2); }
+.players_table tr:nth-child(2n), .settings_table tr:nth-child(2n) { background-color: rgba(26, 28, 34, 0.1); }
+.players_table td { padding: 8px; border-top: 1px solid #22252f; }
+.settings_table td { padding: 8px; border-top: 1px solid #22252f; white-space: pre-wrap; }
+
+.details_info_row { margin-top: 14px; }
+.details_info, .details_info_column:nth-child(2) {vertical-align: top;}
+.details_info_ceil, .details_info_column, .details_info_scolumn {display: inline-block;}
+.details_info_column {margin-right: 12px;}
+.details_info_srow {padding: 8px; border-top: 1px solid #22252f; background-color: rgba(26, 28, 34, 0.2);}
+.details_info_srow:nth-child(2n) {background-color: rgba(26, 28, 34, 0.1);}
+.details_info_ceil:first-child {padding-right: 4px;}
+.details_info_ceil:nth-child(2) {font-weight: 300;}
+#gamelink {vertical-align: middle;display: block;margin-bottom: 6px;width: calc(100% - 2px);}
+.details_info_column:nth-child(2), .details_password_image {
+ background-size: cover;
+ width: 250px;
+ height: 188px;
+}
+.details_password_image, .details_game_image, .details_location_image {
+ display: block;
+ z-index: 5;
+ background-size: cover;
+}
+.details_info_column:nth-child(2) {
+ border-radius: 4px;
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important;
+}
+.details_password_image {
+ background-position: 100% 100%;
+ position: absolute;
+ background-size: auto;
+ background-repeat: no-repeat;
+}
+.details_location_image {
+ width: 16px;
+ height: 11px;
+ position: relative;
+ right: 4px;
+ float: right;
+ top: 4px;
+}
+.details_game_image {
+ width: 32px;
+ height: 32px;
+ position: relative;
+ left: 4px;
+ top: 4px;
+ opacity: .4;
+ border-radius: 6px;
+}
+.details_game_image:hover { opacity: 1; transition-duration: 500ms; }
+img[title='Location: XX'] { display: none; }
+
+.table_head { font-weight: bold; }
+.spacer { margin-top: 15px; }
+.noinfo { margin:auto; text-align:center; background-color: rgba(26, 28, 34, 0.2); display: inline-block; padding:15px; border: 1px solid #22252f; }
+#invalid_server_id, #back_to_servers_list { margin: 10px auto; text-align:center; }
+div[id^="servername"] { margin:auto; text-align:center; font-weight:bold; padding-bottom: 15px; font-size: 16px; border: 1px solid #22252f; background-color: rgba(26, 28, 34, 0.2); padding: 8px; margin-top:15px; margin-bottom:15px; }
+div#servername_onl { background-image: linear-gradient(to right, #ffffff00 0%, #8ee68345 50%,#ffffff00 ); }
+div#servername_nrs { background-image: linear-gradient(to right, #ffffff00 0%, #f1abab45 50%,#ffffff00 ); }
+div#servername_onp { background-image: linear-gradient(to right, #ffffff00 0%, #d8e68c45 50%,#ffffff00 ); }
+#gamelink { width:100%; margin:auto; background-color: rgba(26, 28, 34, 0.2); text-align: center; padding-top:4px; padding-bottom:4px; }
+#details_playerlist { margin:auto; overflow:auto; text-align:center; padding:10px; }
+
+/* list */
+.contry_icon { border: 1px solid black; width: 15px; height: 15px; border-radius: 2px; }
+a.details_icon { width: 15px; height: 15px; display: inline-block; background: url(../other/magnifier.svg) no-repeat top left; background-size: contain; border-radius: 2px; border: 1px solid #848484; background-color: #c4c4c4; }
+a.details_icon:hover { background-color: #c0e0ec; }
+.status_icon_onl, .status_icon_nrs { width: 15px; height: 15px; display: inline-block; border: 1px solid black; border-radius: 2px; }
+.status_icon_onl { background-color: #8ee683; }
+.status_icon_nrs { background-color: #f1abab; }
+.status_icon_onp { background-image: url(../other/icon_online_password.gif) !important; width: 16px; height: 16px; display: inline-block; background-size: cover; }
+img.game_icon { width: 16px; border-radius: 2px; }
+
+#server_list_table { margin:auto; width:95%; border-radius: 12px; margin-top:30px; }
+#server_list_table tr { background-color: rgba(26, 28, 34, 0.2); }
+#server_list_table td { padding:13px; }
+#server_list_table_top { display:none; }
+.connectlink_cell { text-align:right; }
+.servername_cell { text-align:left; }
+.servername_cell > div { width:100%; overflow:hidden; height:1.3em; line-height:1.3em; }
+div.servername_link { display: none; }
+.map_cell { white-space:nowrap; text-align:left; }
+.players_cell { white-space:nowrap; text-align:right; }
+.server_nrs td.players_cell { color: black; }
+.details_cell, .status_cell { white-space:nowrap; text-align:center; }
+.details_cell > a { text-decoration: none; }
+#totals { width: 95%; margin:auto; margin-top: 16px; background-color: rgba(26, 28, 34, 0.2); border: 1px solid #22252f; }
+#totals > div { width: calc(33vw - 30px - 3vw); padding:15px; text-align: center; display:inline-block; }
+
+/* */
+.inline { display:inline-block; }
+.center { text-align: center; }
+
+/* adaptiveness */
+
+@media(max-width: 990px){
+ .map_cell {
+ display: none;
+ }
+}
+
+@media(max-width: 414px){
+ body
+ {
+ margin: 0;
+ }
+ .servername_cell > div {
+ width: 100%;
+ overflow: hidden;
+ line-height: 1em;
+ font-size: larger;
+ font-family: cursive;
+ height:3em;
+ }
+ .connectlink_cell,
+ td.details_cell,
+ .map_cell,
+ div.servername_nolink,
+ .status_icon_nrs, .status_icon_onl, .status_icon_onp {
+ display: none;
+ }
+ img.game_icon { width: 48px; }
+ #server_list_table { margin: 0px; width: 100%; }
+ div.servername_link a { color: #d5f2ff; }
+ div.servername_link { display: block; }
+ #server_list_table td {
+ padding: 3px;
+ }
+ #server_list_table td:not(.status_cell) {
+ padding: 10px;
+ }
+ #server_list_table tr.server_nrs {
+ background-color: rgba(148, 0, 0, 0.2);
+ }
+
+ /*details*/
+ #gamelink { display: none; }
+ .details_info { display: flex; flex-flow: column; }
+ .details_info_column { margin: auto; order: 2; margin-top: 6px; }
+ .details_info_column:nth-child(2) { order: 1; }
+ #details_playerlist { overflow: auto; }
+}
\ No newline at end of file
diff --git a/lgsl_files/styles/parallax_style.css b/lgsl_files/styles/parallax_style.css
new file mode 100644
index 0000000..5dea2f9
--- /dev/null
+++ b/lgsl_files/styles/parallax_style.css
@@ -0,0 +1,222 @@
+/*--------------------------------------
+> Parallax Style <
+> Neon <
+> https://github.com/tltneon <
+---------------------------------------*/
+
+/* global */
+body
+{
+ margin: 0;
+ padding: 0;
+ background-color: #fff;
+ font-size: 14px;
+ font-family: Roboto,Arial,sans-serif;
+ word-wrap: break-word;
+ color: white;
+ text-shadow: 1px 1px 0px black;
+ background-color: #03060e;
+ background-size: cover !important;
+ background-repeat: no-repeat;
+ background-attachment: fixed;
+ background-position: center;
+}
+#container {
+ width: 100%;
+ height: 95vh;
+ background-image: url(https://i.imgur.com/hTiRMZf.png), url(https://i.imgur.com/bO2MuIo.png), url(https://i.imgur.com/bcBRoVL.png);
+ background-repeat: no-repeat;
+ background-position: center;
+ background-position: 50% 50%;
+ background-size: 105% 100%;
+ overflow-y: overlay;
+}
+@media (max-width: 1280px) { /*1.333*/
+ #container {
+ width: 100%;
+ height: 100vh;
+ background-image: url(https://i.imgur.com/ppJkn41.png), url(https://i.imgur.com/Iwz06m8.png), url(https://i.imgur.com/B2Jp25e.png);
+ background-repeat: no-repeat;
+ background-position: center;
+ background-position: 50% 50%;
+ background-size: 150% 100%;
+ }
+}
+
+textarea { background: #000000de; color: white; border: 1px solid #22252f; }
+
+a:link, a:visited { text-decoration:none; color: #1997c6; }
+a:hover, a:active { color:#fff; }
+
+#adminlink {margin: 0;position: fixed;width: 25px;right: 0;top: 0;background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #ff000061);height: 25px;}
+#adminlink:hover {background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #f30606);}
+#topmenu {padding: 1em;background-color: #0000002b;border-bottom: 2px dashed black;}
+#topmenu > li {display: inline-block;padding: 0px 10px;}
+#topmenu > li:before {content: '► ';}
+
+/* add */
+.annotation { text-align: center; background-color: rgba(0, 0, 0, 0.5); padding-top:17px; padding-bottom:17px; }
+
+/* details */
+.players_table { margin: auto; border: 1px solid #22252f; border-spacing: 0px 0px; border-collapse: collapse; }
+.settings_table { margin: auto; border: 1px solid #22252f; border-spacing: 0px 0px; border-collapse: collapse; max-width: 600px; }
+.players_table tr, .settings_table tr { white-space:nowrap; border: 1px solid #22252f; table-layout:fixed; }
+.players_table tr:nth-child(n), .settings_table tr:nth-child(n) { background-color: rgba(0, 0, 0, 0.5); }
+.players_table tr:nth-child(2n), .settings_table tr:nth-child(2n) { background-color: rgba(0, 0, 0, 0.6); }
+.players_table td { padding: 8px; border-top: 1px solid #22252f; }
+.settings_table td { padding: 8px; border-top: 1px solid #22252f; white-space: pre-wrap; }
+#details_playerlist { overflow: overlay; }
+
+.details_info_row { margin-top: 14px; }
+.details_info, .details_info_column:nth-child(2) {vertical-align: top;}
+.details_info_ceil, .details_info_column, .details_info_scolumn {display: inline-block;}
+.details_info_column {margin-right: 12px;}
+.details_info_srow {padding: 8px; border: 1px solid #22252f; background-color: rgba(26, 28, 34, 0.2);}
+.details_info_srow:nth-child(2n) {background-color: rgba(26, 28, 34, 0.1);}
+.details_info_ceil:first-child {padding-right: 4px;}
+.details_info_ceil:nth-child(2) {font-weight: 300;}
+#gamelink {vertical-align: middle;display: block;margin-bottom: 6px;width: calc(100% - 2px);}
+.details_info_column:nth-child(2), .details_password_image {
+ background-size: cover;
+ width: 250px;
+ height: 188px;
+}
+.details_password_image, .details_game_image, .details_location_image {
+ display: block;
+ z-index: 5;
+ background-size: cover;
+}
+.details_info_column:nth-child(2) {
+ border-radius: 4px;
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important;
+}
+.details_password_image {
+ background-position: 100% 100%;
+ position: absolute;
+ background-size: auto;
+ background-repeat: no-repeat;
+}
+.details_location_image {
+ width: 16px;
+ height: 11px;
+ position: relative;
+ right: 4px;
+ float: right;
+ top: 4px;
+}
+.details_game_image {
+ width: 32px;
+ height: 32px;
+ position: relative;
+ left: 4px;
+ top: 4px;
+ opacity: .4;
+ border-radius: 6px;
+}
+.details_game_image:hover { opacity: 1; transition-duration: 500ms; }
+img[title='Location: XX'] { display: none; }
+
+.table_head { font-weight: bold; }
+.spacer { margin-top: 15px; }
+.noinfo { margin:auto; text-align:center; background-color: rgba(0, 0, 0, 0.5); display: inline-block; padding:15px; border: 1px solid #22252f; }
+#invalid_server_id, #back_to_servers_list { margin:auto; text-align:center; }
+div[id^="servername"] { margin:auto; text-align:center; font-weight:bold; padding-bottom: 15px; font-size: 16px; border: 1px solid #22252f; background-color: rgba(26, 28, 34, 0.2); padding: 8px; margin-top:15px; margin-bottom:15px; }
+#gamelink { width:100%; margin:auto; background-color: rgba(0, 0, 0, 0.5); text-align: center; padding-top:4px; padding-bottom:4px; }
+
+/* list */
+.contry_icon { border:none; width: 16px; height: 16px; }
+.details_icon, .status_icon_onl, .status_icon_nrs, .status_icon_onp { background-size: cover; width: 16px; height: 16px; display: inline-block; }
+.details_icon { background-image: url(../other/icon_details.gif) !important; }
+.status_icon_onl { background-image: url(../other/icon_online.gif) !important; }
+.status_icon_nrs { background-image: url(../other/icon_no_response.gif) !important; }
+.status_icon_onp { background-image: url(../other/icon_online_password.gif) !important; }
+img.game_icon { width: 16px; }
+
+.server_onl { background-image: linear-gradient(to right, #ffffff00 0%, #8ee68345 50%,#ffffff00 ); }
+.server_nrs { background-image: linear-gradient(to right, #ffffff00 0%, #f1abab45 50%,#ffffff00 ); }
+.server_onp { background-image: linear-gradient(to right, #ffffff00 0%, #d8e68c45 50%,#ffffff00 ); }
+
+#server_list_table { margin:auto; width:95%; border-radius: 12px; padding-top:30px; }
+#server_list_table tr { background-color: rgba(0, 0, 0, 0.5); }
+#server_list_table td { padding:13px; }
+.connectlink_cell { text-align:right; }
+.servername_cell { text-align:left; }
+.servername_cell > div { width:100%; overflow:hidden; height:1.3em; line-height:1.3em; }
+div.servername_link { display: none; }
+.map_cell { white-space:nowrap; text-align:left; }
+.players_cell { white-space:nowrap; text-align:right; }
+.server_nrs td.players_cell { color: black; }
+.details_cell, .status_cell { white-space:nowrap; text-align:center; }
+.details_cell > a { text-decoration: none; }
+#totals { width: 95%; margin:auto; margin-top: 16px; background-color: rgba(0, 0, 0, 0.5); border: 1px solid #22252f; }
+#totals > div { width: 28%; padding:2%; text-align: center; display: inline-block; vertical-align: middle; }
+
+/* */
+.inline{ display:inline-block; }
+
+/* adaptiveness */
+
+@media(max-width: 990px){
+ #container {
+ width: 100%;
+ height: 100vh;
+ background-image: url(https://i.imgur.com/ppJkn41.png), url(https://i.imgur.com/Iwz06m8.png), url(https://i.imgur.com/B2Jp25e.png);
+ background-repeat: no-repeat;
+ background-position: center;
+ background-position: 13% 50%;
+ background-size: auto 89%;
+ }
+ .map_cell {
+ display: none;
+ }
+}
+
+@media(max-width: 560px){
+ body
+ {
+ margin: 0;
+ }
+ th {
+ padding: 6px;
+ }
+ #topmenu { padding: 0px; }
+ #topmenu > li { padding: 16px 10px; }
+ #server_list_table { padding: 0px; width: 100%; }
+ .servername_cell > div {
+ width: 100%;
+ overflow: hidden;
+ line-height: 1em;
+ font-size: larger;
+ font-family: cursive;
+ height:3em;
+ }
+ img.game_icon {
+ width: 40px;
+ border-radius: 4px;
+ }
+ .connectlink_cell,
+ .details_cell,
+ .map_cell,
+ div.servername_nolink,
+ .status_icon_nrs, .status_icon_onl, .status_icon_onp {
+ display: none;
+ }
+ div.servername_link a { color: #d5f2ff; }
+ div.servername_link { display: block; }
+ #server_list_table td {
+ padding: 3px;
+ }
+ #server_list_table td:not(.status_cell) {
+ padding: 10px;
+ }
+ #server_list_table tr.server_nrs {
+ background-color: rgba(148, 0, 0, 0.2);
+ }
+
+ /*details*/
+ #gamelink { display: none; }
+ .details_info { display: flex; flex-flow: column; }
+ .details_info_column { margin: auto; order: 2; margin-top: 6px; }
+ .details_info_column:nth-child(2) { order: 1; }
+ #details_playerlist { overflow: auto; }
+}
\ No newline at end of file
diff --git a/lgsl_files/styles/wallpaper_style.css b/lgsl_files/styles/wallpaper_style.css
new file mode 100644
index 0000000..b7c84df
--- /dev/null
+++ b/lgsl_files/styles/wallpaper_style.css
@@ -0,0 +1,200 @@
+/*--------------------------------------
+> Wallpaper Style <
+> Neon <
+> https://github.com/tltneon/lgsl <
+---------------------------------------*/
+
+/* global */
+body
+{
+ background: linear-gradient(180deg, #282828, #282828, transparent);
+ background-repeat: no-repeat;
+ font-size: 12px;
+ font-family:verdana,tahoma,arial;
+ word-wrap:break-word;
+ color: white;
+ font-weight: bold;
+}
+
+a:link, a:visited { text-decoration:none; color: #dd0000; }
+a:hover, a:active { color:#adcef1; }
+
+textarea {background-color: rgba(26, 28, 34, 0.2); border: 1px solid rgba(26, 28, 34, 0.2); color: white;}
+
+#adminlink {margin: 0;position: fixed;width: 25px;right: 0;top: 0;background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #ff000061);height: 25px;}
+#adminlink:hover {background-image: linear-gradient(45deg, #ffffff00, #ffffff00, #f30606);}
+#topmenu {padding: 1em; border-bottom: 2px dashed black;}
+#topmenu > li {display: inline-block;padding: 0px 10px;}
+
+/* add */
+.annotation { text-align: center; background-color: #282828; padding-top:17px; padding-bottom:17px; }
+
+/* details */
+.players_table { margin: auto; border: 1px solid #22252f; border-spacing: 0px 0px; border-collapse: collapse; }
+.settings_table { margin: auto; border: 1px solid #22252f; border-spacing: 0px 0px; border-collapse: collapse; max-width: 600px; }
+.players_table tr, .settings_table tr { white-space:nowrap; border: 1px solid #22252f; table-layout:fixed; }
+.players_table tr:nth-child(n), .settings_table tr:nth-child(n) { background-color: rgba(26, 28, 34, 0.2); }
+.players_table tr:nth-child(2n), .settings_table tr:nth-child(2n) { background-color: rgba(26, 28, 34, 0.1); }
+.players_table td { padding: 8px; border-top: 1px solid #22252f; }
+.settings_table td { padding: 8px; border-top: 1px solid #22252f; white-space: pre-wrap; }
+
+.details_info_row { margin-top: 14px; }
+.details_info, .details_info_column:nth-child(2) {vertical-align: top;}
+.details_info_ceil, .details_info_column, .details_info_scolumn {display: inline-block;}
+.details_info_column {margin-right: 12px;}
+.details_info_srow {padding: 8px; border-top: 1px solid #22252f; background-color: rgba(26, 28, 34, 0.2);}
+.details_info_srow:nth-child(2n) {background-color: rgba(26, 28, 34, 0.1);}
+.details_info_ceil:first-child {padding-right: 4px;}
+.details_info_ceil:nth-child(2) {font-weight: 300;}
+#gamelink {vertical-align: middle;display: block;margin-bottom: 6px;width: calc(100% - 2px);}
+.details_info_column:nth-child(2), .details_password_image {
+ background-size: cover;
+ width: 250px;
+ height: 188px;
+}
+.details_password_image, .details_game_image, .details_location_image {
+ display: block;
+ z-index: 5;
+ background-size: cover;
+}
+.details_info_column:nth-child(2) {
+ border-radius: 4px;
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important;
+}
+.details_password_image {
+ background-position: 100% 100%;
+ position: absolute;
+ background-size: auto;
+ background-repeat: no-repeat;
+}
+.details_location_image {
+ width: 16px;
+ height: 11px;
+ position: relative;
+ right: 4px;
+ float: right;
+ top: 4px;
+}
+.details_game_image {
+ width: 32px;
+ height: 32px;
+ position: relative;
+ left: 4px;
+ top: 4px;
+ border-radius: 6px;
+ z-index: 5;
+}
+img[title='Location: XX'] { display: none; }
+
+.table_head { font-weight: bold; }
+.spacer { background-color: #28282840; height:6px; width:90%; margin:auto; margin-top: 10px; margin-bottom: 10px; border: 0px solid black; }
+.noinfo { margin:auto; text-align:center; background-color: #282828; display: inline-block; padding:15px; }
+#invalid_server_id, #back_to_servers_list { margin:auto; text-align:center; }
+div[id^="servername"] { margin:auto; text-align:center; font-weight:bold; padding-bottom: 15px; font-size: 16px; }
+
+#details_playerlist {overflow: auto;}
+
+.details_info_column:nth-child(2) {
+ border-radius: 4px;
+ position: absolute;
+ z-index: -1;
+ width: 100%;
+ height: 100vh;
+ top: 46px;
+ left: 0;
+ opacity: .75;
+ box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important;
+}
+.details_password_image {
+ background-position: 100% 100%;
+ position: absolute;
+ background-size: auto;
+ width: 48px;
+ height: 56px;
+ right: 4px;
+}
+
+/* list */
+.contry_icon { border:none; width: 16px; height: 16px; }
+.game_icon { width: 28px; height: 28px; border-radius: 10px; border: 1px solid black; margin: 5px; border-radius: 12px; }
+a.details_icon { background-image: url(../other/icon_details.gif) !important; width: 32px; height: 32px; display: inline-block; background-size: cover; }
+.status_icon_onl, .status_icon_nrs, .status_icon_onp
+{ background: #f1abab;
+ width: 36px;
+ height: 36px;
+ border: 2px solid black;
+ display: inline-block;
+ position: absolute;
+ z-index: -1;
+ border-radius: 12px;
+}
+.status_icon_onl { background: #72ff60; }
+.status_icon_nrs { background: #ff6565; }
+.status_icon_onp { background: #fdb94a; }
+
+#server_list_table { margin:auto; width: 100%; border-radius: 12px; margin-top:30px; border-collapse: collapse; }
+#server_list_table tr:not(#server_list_table_top) { background-color: #28282894; height: 59px; border: 1px solid black; }
+#server_list_table td, #server_list_table th { padding:13px; border-bottom: 1px dotted black; }
+#server_list_table_top { text-align: left; }
+.connectlink_cell { }
+.servername_cell { text-align:left; }
+.servername_cell > div { width:100%; overflow:hidden; height:1.3em; line-height:1.3em; }
+div.servername_nolink { display: none; }
+.map_cell { white-space:nowrap; text-align:left; }
+.players_cell { white-space:nowrap; }
+.details_cell, .status_cell { white-space:nowrap; text-align:center; }
+.details_cell { display: none; }
+#totals { width: fit-content; margin:auto; margin-top: 16px; }
+#totals > div { width: fit-content; background-color: #282828; padding:15px; display:inline-block; }
+
+/* */
+.inline{ display:inline-block; }
+
+/* adaptiveness */
+
+@media(max-width: 990px){
+ .map_cell {
+ display: none;
+ }
+}
+@media(max-width: 690px){
+ #server_list_table td, #server_list_table th {
+ padding: 13px 1px;
+ }
+}
+
+@media(max-width: 414px){
+ body
+ {
+ margin: 0;
+ }
+ .servername_cell > div {
+ width: 100%;
+ overflow: hidden;
+ line-height: 1em;
+ font-size: larger;
+ font-family: cursive;
+ height:3em;
+ }
+ .connectlink_cell,
+ td.details_cell,
+ .map_cell,
+ div.servername_nolink, {
+ display: none;
+ }
+ div.servername_link a { color: #d5f2ff; }
+ div.servername_link { display: block; }
+ #server_list_table td {
+ padding: 3px;
+ }
+ #server_list_table tr.server_nrs {
+ background-color: rgba(148, 0, 0, 0.2);
+ }
+
+ /*details*/
+ #gamelink { display: none; }
+ .details_info { display: flex; flex-flow: column; }
+ .details_info_column { margin: auto; order: 2; margin-top: 6px; }
+ .details_info_column:nth-child(2) { order: 1; }
+ #details_playerlist { overflow: auto; }
+}
\ No newline at end of file
diff --git a/lgsl_menu.php b/lgsl_menu.php
new file mode 100644
index 0000000..d49d73e
--- /dev/null
+++ b/lgsl_menu.php
@@ -0,0 +1,54 @@
+toHTML($parm['lgsl_zone_number']);
+
+$output = "";
+require e_PLUGIN."lgsl/lgsl_files/lgsl_zone.php";
+
+$styleid = $parm['block_tablestyle'];
+
+$s = $parm['block_style'];
+
+if(is_string($s) && strlen($s) > 0) {
+ e107::getRender()->setStyle($s);
+}
+
+e107::getRender()->tablerender($caption, $output, $styleid ) ;
+
+
+?>
\ No newline at end of file
diff --git a/lgsl_sql.php b/lgsl_sql.php
new file mode 100644
index 0000000..b2d3344
--- /dev/null
+++ b/lgsl_sql.php
@@ -0,0 +1,16 @@
+CREATE TABLE lgsl (
+`id` INT(11) NOT NULL auto_increment,
+`type` VARCHAR(50)NOT NULL DEFAULT '',
+`ip` VARCHAR(255) NOT NULL DEFAULT '',
+`c_port` VARCHAR(5) NOT NULL DEFAULT '0',
+`q_port` VARCHAR(5) NOT NULL DEFAULT '0',
+`s_port` VARCHAR(5) NOT NULL DEFAULT '0',
+`zone` VARCHAR(255) NOT NULL DEFAULT '',
+`disabled` TINYINT(1) NOT NULL DEFAULT '0',
+`comment` VARCHAR(255) NOT NULL DEFAULT '',
+`status` TINYINT(1) NOT NULL DEFAULT '0',
+`cache`TEXT NOT NULL,
+`cache_time` TEXT NOT NULL,
+PRIMARY KEY (`id`)
+)TYPE=MyISAM;
+
\ No newline at end of file
diff --git a/plugin.xml b/plugin.xml
new file mode 100644
index 0000000..407fb5c
--- /dev/null
+++ b/plugin.xml
@@ -0,0 +1,22 @@
+
+
+
+ Live Game Server List by Richard Perry, tltneon version 5.10.3
+ Live Game Server List Richard Perry, tltneon version 5.10.3
+
+ information
+ content
+ gaming
+
+ content
+
+
+ LGSL
+
+
+ LAN_CONFIGURE
+
+
+
+
\ No newline at end of file
diff --git a/userbar.php b/userbar.php
new file mode 100644
index 0000000..65ce7a4
--- /dev/null
+++ b/userbar.php
@@ -0,0 +1,72 @@
+= 24) {
+ $hour - 24;
+ }
+ $time = date("d.m ".$hour.":i");
+
+ $im = @imagecreatefromgif("lgsl_files/other/banner_thin.gif"); // create background
+
+ $on_id = imagecreatefromgif($misc['icon_status']); // create status icon
+ list($width, $height) = getimagesize($misc['icon_status']);
+ if($width > 16){
+ $on_id = resizeImage(16, 16, $misc['icon_status']); // resize to 16x16 if it needed
+ }
+
+ $game_id = imagecreatefromgif($misc['icon_game']); // create game icon
+ list($width, $height) = getimagesize($misc['icon_game']);
+ if($width > 16){
+ $game_id = resizeImage(16, 16, $misc['icon_game']); // resize to 16x16 if it needed
+ }
+
+ $color_pz = imagecolorallocate($im, 128, 0, 0);
+ $color_ip = imagecolorallocate($im, 255, 0, 0);
+ $color_map = imagecolorallocate($im, 0, 0, 0);
+ $color_pl = imagecolorallocate($im, 0, 128, 0);
+ $color_time = imagecolorallocate($im, 66, 66, 66);
+
+ imagecopy($im, $on_id, 8, 2, 0, 0, 16, 16); // place status icon
+ imagecopy($im, $game_id, 26, 2, 0, 0, 16, 16); // place game icon
+
+ //reported PHP bug https://bugs.php.net/bug.php?id=75656 and used their temp fix
+ //putenv('GDFONTPATH=' . realpath('.'));
+ $FontName = "lgsl_files/other/verdana.ttf";
+ imagettftext($im, 7, 0, 44, 17, $color_map, realpath($FontName), /* map */ $lgsl_config['text']['map'].": ".$server['s']['map']);
+ imagettftext($im, 7, 0, 44, 9, $color_ip, realpath($FontName), /* port */ $server['b']['ip'].":".$server['b']['c_port']);
+ imagettftext($im, 8, 0, 150, 10, $color_pz, realpath($FontName), /* name */ $server['s']['name']);
+ imagettftext($im, 7, 0, 150, 18, $color_pl, realpath($FontName), /* players */ $lgsl_config['text']['plr'].": ".$server['s']['players']."/".$server['s']['playersmax']);
+ imagettftext($im, 5, 0, 238, 18, $color_time, realpath($FontName), /* updated */ "upd: ".$time." | ".$server['s']['game']);
+
+ imagegif($im);
+ imagedestroy($im);
+//------------------------------------------------------------------------------------------------------------+
+?>
\ No newline at end of file