Skip to content

Commit

Permalink
LGSL v5.8 SA
Browse files Browse the repository at this point in the history
  • Loading branch information
tltneon committed Oct 22, 2018
1 parent d1fcd88 commit 495a8a5
Show file tree
Hide file tree
Showing 430 changed files with 6,923 additions and 0 deletions.
81 changes: 81 additions & 0 deletions lgsl/admin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?php
//------------------------------------------------------------------------------------------------------------+
require "lgsl_files/lgsl_config.php";

if (empty($lgsl_config['admin']['user']) || empty($lgsl_config['admin']['pass']))
{
exit("ADMIN USERNAME OR PASSWORD MISSING FROM CONFIG");
}
elseif ($lgsl_config['admin']['pass'] == "changeme")
{
exit("ADMIN PASSWORD MUST BE CHANGED FROM THE DEFAULT");
}

$auth = md5($_SERVER['REMOTE_ADDR'].md5($lgsl_config['admin']['user'].md5($lgsl_config['admin']['pass'])));
$cookie = isset($_COOKIE['lgsl_admin_auth']) ? $_COOKIE['lgsl_admin_auth'] : "";

if (isset($_POST['lgsl_user']) && isset($_POST['lgsl_pass']) && $lgsl_config['admin']['user'] == $_POST['lgsl_user'] && $lgsl_config['admin']['pass'] == $_POST['lgsl_pass'])
{
setcookie("lgsl_admin_auth", $auth, (time() + (60 * 60 * 24)), "/");
define("LGSL_ADMIN", TRUE);
}
elseif ($cookie == $auth)
{
setcookie("lgsl_admin_auth", $auth, (time() + (60 * 60 * 24)), "/");
define("LGSL_ADMIN", TRUE);
}

header("Content-Type:text/html; charset=utf-8");
//------------------------------------------------------------------------------------------------------------+
?>



<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>

<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>Live Game Server List</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<meta http-equiv='content-style-type' content='text/css' />
<link rel='stylesheet' href='lgsl_style.css' type='text/css' />
</head>

<body>
<div style='height:30px'><br /></div>




<?php
//------------------------------------------------------------------------------------------------------------+
if (defined("LGSL_ADMIN"))
{
global $output;
$output = "";
require "lgsl_files/lgsl_admin.php";
echo $output;
}
else
{
echo "
<form method='post' action=''>
<table style='margin:auto; text-align:center'>
<tr><td> USERNAME: </td><td> <input type='text' name='lgsl_user' value='' /> </td></tr>
<tr><td> PASSWORD: </td><td> <input type='password' name='lgsl_pass' value='' /> </td></tr>
<tr>
<td colspan='2'>
<br />
<input type='submit' name='lgsl_admin_login' value='Login' />
</td>
</tr>
</div>
</form>";
}
//------------------------------------------------------------------------------------------------------------+
?>



</body>
</html>
45 changes: 45 additions & 0 deletions lgsl/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php
//------------------------------------------------------------------------------------------------------------+
header("Content-Type:text/html; charset=utf-8");
//------------------------------------------------------------------------------------------------------------+
?>



<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>

<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>Live Game Server List</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<meta http-equiv='content-style-type' content='text/css' />
<link rel='stylesheet' href='lgsl_style.css' type='text/css' />
</head>

<body>
<div style='height:30px'><br /></div>



<?php
//------------------------------------------------------------------------------------------------------------+
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"; }

echo $output;

unset($output);
//------------------------------------------------------------------------------------------------------------+
?>



</body>
</html>
Binary file added lgsl/lgsl_files/icons/aarmy/aarmy.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/aarmy/armygame.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/aarmy3/aarmy3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/arcasimracing/arcasimracing.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/arma/arma.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/arma2/arma2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/arma2/arma2pc.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/avp2/avp2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/avp2010/avp2010.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/bf1942/bf1942.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/bf1942/bfield1942.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/bf1942/desertcombat.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/bf1942/interstate.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/bf2/battlefield2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/bf2/bf2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/bf2142/bf2142.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/bf2142/stella.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/bfbc2/bfbc2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/bfvietnam/bfvietnam.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/callofduty/callofduty.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/callofduty2/callofduty2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/callofduty4/callofduty4.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/callofdutyuo/callofdutyuo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/cncrenegade/cncrenegade.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgsl/lgsl_files/icons/crysis/crysis.gif
Binary file added lgsl/lgsl_files/icons/crysiswars/crysiswars.gif
Binary file added lgsl/lgsl_files/icons/cs2d/cs2d.gif
Binary file added lgsl/lgsl_files/icons/cube/assaultcube.gif
Binary file added lgsl/lgsl_files/icons/cube/blood_frontier.gif
Binary file added lgsl/lgsl_files/icons/cube/cube.gif
Binary file added lgsl/lgsl_files/icons/cube/cube1.gif
Binary file added lgsl/lgsl_files/icons/cube/cube2.gif
Binary file added lgsl/lgsl_files/icons/cube/sauerbraten.gif
Binary file added lgsl/lgsl_files/icons/dh2005/dh2005.gif
Binary file added lgsl/lgsl_files/icons/doom3/basedoom-1.gif
Binary file added lgsl/lgsl_files/icons/doom3/doom3.gif
Binary file added lgsl/lgsl_files/icons/doomskulltag/doomskulltag.gif
Binary file added lgsl/lgsl_files/icons/doomzdaemon/doomzdaemon.gif
Binary file added lgsl/lgsl_files/icons/f1c9902/f1c9902.gif
Binary file added lgsl/lgsl_files/icons/farcry/farcry.gif
Binary file added lgsl/lgsl_files/icons/farcry/obsidianedge.gif
Binary file added lgsl/lgsl_files/icons/fear/fear.gif
Binary file added lgsl/lgsl_files/icons/flashpoint/flashpoint.gif
Binary file added lgsl/lgsl_files/icons/flashpoint/opflashr.gif
Binary file added lgsl/lgsl_files/icons/freelancer/freelancer.gif
Binary file added lgsl/lgsl_files/icons/frontlines/frontlines.gif
Binary file added lgsl/lgsl_files/icons/gamespy1/gamespy1.gif
Binary file added lgsl/lgsl_files/icons/gamespy2/gamespy2.gif
Binary file added lgsl/lgsl_files/icons/gamespy3/gamespy3.gif
Binary file added lgsl/lgsl_files/icons/ghostrecon/ghostrecon.gif
Binary file added lgsl/lgsl_files/icons/graw/graw.gif
Binary file added lgsl/lgsl_files/icons/graw2/graw2.gif
Binary file added lgsl/lgsl_files/icons/gtr2/gtr2.gif
Binary file added lgsl/lgsl_files/icons/had2/had2.gif
Binary file added lgsl/lgsl_files/icons/halflife/cstrike.gif
Binary file added lgsl/lgsl_files/icons/halflife/czero.gif
Binary file added lgsl/lgsl_files/icons/halflife/dod.gif
Binary file added lgsl/lgsl_files/icons/halflife/frontline.gif
Binary file added lgsl/lgsl_files/icons/halflife/halflife.gif
Binary file added lgsl/lgsl_files/icons/halflife/ns.gif
Binary file added lgsl/lgsl_files/icons/halflife/nsp.gif
Binary file added lgsl/lgsl_files/icons/halflife/ricochet.gif
Binary file added lgsl/lgsl_files/icons/halflife/svencoop.gif
Binary file added lgsl/lgsl_files/icons/halflife/tfc.gif
Binary file added lgsl/lgsl_files/icons/halflife/ts.gif
Binary file added lgsl/lgsl_files/icons/halflife/valve.gif
Binary file added lgsl/lgsl_files/icons/halflifewon/cstrike.gif
Binary file added lgsl/lgsl_files/icons/halflifewon/halflifewon.gif
Binary file added lgsl/lgsl_files/icons/halo/halo.gif
Binary file added lgsl/lgsl_files/icons/il2/il2.gif
Binary file added lgsl/lgsl_files/icons/jediknight2/basejk.gif
Binary file added lgsl/lgsl_files/icons/jediknight2/jediknight2.gif
Binary file added lgsl/lgsl_files/icons/killingfloor/killing_floor.gif
Binary file added lgsl/lgsl_files/icons/killingfloor/killingfloor.gif
Binary file added lgsl/lgsl_files/icons/kingpin/kingpin.gif
Binary file added lgsl/lgsl_files/icons/mohaa/mohaa.gif
Binary file added lgsl/lgsl_files/icons/mohaab/mohaab.gif
Binary file added lgsl/lgsl_files/icons/mohaas/mohaas.gif
Binary file added lgsl/lgsl_files/icons/mohpa/mohpa.gif
Binary file added lgsl/lgsl_files/icons/mta/mta.gif
Binary file added lgsl/lgsl_files/icons/nascar2004/nascar2004.gif
Binary file added lgsl/lgsl_files/icons/neverwinter/neverwinter.gif
Binary file added lgsl/lgsl_files/icons/neverwinter2/neverwinter2.gif
Binary file added lgsl/lgsl_files/icons/nexuiz/nexuiz.gif
Binary file added lgsl/lgsl_files/icons/openttd/openttd.gif
Binary file added lgsl/lgsl_files/icons/painkiller/painkiller.gif
Binary file added lgsl/lgsl_files/icons/plainsight/plainsight.gif
Binary file added lgsl/lgsl_files/icons/prey/prey.gif
Binary file added lgsl/lgsl_files/icons/quake2/quake2.gif
Binary file added lgsl/lgsl_files/icons/quake3/quake3.gif
Binary file added lgsl/lgsl_files/icons/quake4/basequake4-1.gif
Binary file added lgsl/lgsl_files/icons/quake4/quake4.gif
Binary file added lgsl/lgsl_files/icons/quakewars/quakewars.gif
Binary file added lgsl/lgsl_files/icons/quakeworld/fortress.gif
Binary file added lgsl/lgsl_files/icons/quakeworld/quakeworld.gif
Binary file added lgsl/lgsl_files/icons/quakeworld/qw.gif
Binary file added lgsl/lgsl_files/icons/ravenshield/ravenshield.gif
Binary file added lgsl/lgsl_files/icons/rfactor/rfactor.gif
Binary file added lgsl/lgsl_files/icons/samp/samp.gif
Binary file added lgsl/lgsl_files/icons/savage/savage.gif
Binary file added lgsl/lgsl_files/icons/savage2/savage2.gif
Binary file added lgsl/lgsl_files/icons/serioussam/serioussam.gif
Binary file added lgsl/lgsl_files/icons/serioussam2/serioussam2.gif
Binary file added lgsl/lgsl_files/icons/shatteredh/shatteredh.gif
Binary file added lgsl/lgsl_files/icons/sof2/sof2.gif
Binary file added lgsl/lgsl_files/icons/sof2/sof2mp.gif
Binary file added lgsl/lgsl_files/icons/soldat/soldat.gif
Binary file added lgsl/lgsl_files/icons/source/ageofchivalry.gif
Binary file added lgsl/lgsl_files/icons/source/cstrike.gif
Binary file added lgsl/lgsl_files/icons/source/decadence.gif
Binary file added lgsl/lgsl_files/icons/source/dod.gif
Binary file added lgsl/lgsl_files/icons/source/dystopia.gif
Binary file added lgsl/lgsl_files/icons/source/empires.gif
Binary file added lgsl/lgsl_files/icons/source/esmod.gif
Binary file added lgsl/lgsl_files/icons/source/garrysmod.gif
Binary file added lgsl/lgsl_files/icons/source/hidden.gif
Binary file added lgsl/lgsl_files/icons/source/hl2mp.gif
Binary file added lgsl/lgsl_files/icons/source/insurgency.gif
Binary file added lgsl/lgsl_files/icons/source/left4dead.gif
Binary file added lgsl/lgsl_files/icons/source/left4dead2.gif
Binary file added lgsl/lgsl_files/icons/source/neotokyosource.gif
Binary file added lgsl/lgsl_files/icons/source/obsidian.gif
Binary file added lgsl/lgsl_files/icons/source/source.gif
Binary file added lgsl/lgsl_files/icons/source/svencoop.gif
Binary file added lgsl/lgsl_files/icons/source/synergy.gif
Binary file added lgsl/lgsl_files/icons/source/tf.gif
Binary file added lgsl/lgsl_files/icons/source/zombie_master.gif
Binary file added lgsl/lgsl_files/icons/source/zps.gif
Binary file added lgsl/lgsl_files/icons/stalker/stalker.gif
Binary file added lgsl/lgsl_files/icons/stalkercs/stalkercs.gif
Binary file added lgsl/lgsl_files/icons/startrekef/startrekef.gif
Binary file added lgsl/lgsl_files/icons/starwarsbf/starwarsbf.gif
Binary file added lgsl/lgsl_files/icons/starwarsbf2/starwarsbf2.gif
Binary file added lgsl/lgsl_files/icons/starwarsrc/starwarsrc.gif
Binary file added lgsl/lgsl_files/icons/swat4/swat4.gif
Binary file added lgsl/lgsl_files/icons/teeworlds/teeworlds.gif
Binary file added lgsl/lgsl_files/icons/tribes/tribes.gif
Binary file added lgsl/lgsl_files/icons/tribes2/tribes2.gif
Binary file added lgsl/lgsl_files/icons/tribesv/tribesv.gif
Binary file added lgsl/lgsl_files/icons/urbanterror/urbanterror.gif
Binary file added lgsl/lgsl_files/icons/ut/ut.gif
Binary file added lgsl/lgsl_files/icons/ut2003/ut2003.gif
Binary file added lgsl/lgsl_files/icons/ut2004/killing_floor.gif
Binary file added lgsl/lgsl_files/icons/ut2004/red_orchestra.gif
Binary file added lgsl/lgsl_files/icons/ut2004/ut2004.gif
Binary file added lgsl/lgsl_files/icons/ut3/ut3.gif
Binary file added lgsl/lgsl_files/icons/vcmp/vcmp.gif
Binary file added lgsl/lgsl_files/icons/vietcong/vietcong.gif
Binary file added lgsl/lgsl_files/icons/vietcong2/vietcong2.gif
Binary file added lgsl/lgsl_files/icons/warsow/warsow.gif
Binary file added lgsl/lgsl_files/icons/warsowold/warsowold.gif
Binary file added lgsl/lgsl_files/icons/wolf2009/wolf2009.gif
Binary file added lgsl/lgsl_files/icons/wolfet/wolfet.gif
Binary file added lgsl/lgsl_files/icons/wolfrtcw/wolfrtcw.gif
264 changes: 264 additions & 0 deletions lgsl/lgsl_files/lgsl_add.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
<?php

/*----------------------------------------------------------------------------------------------------------\
| |
| [ LIVE GAME SERVER LIST ] [ © RICHARD PERRY FROM GREYCUBE.COM ] |
| |
| Released under the terms and conditions of the GNU General Public License Version 3 (http://gnu.org) |
| |
\-----------------------------------------------------------------------------------------------------------*/

//------------------------------------------------------------------------------------------------------------+

require "lgsl_class.php";

//-----------------------------------------------------------------------------------------------------------+

if (!$lgsl_config['public_add'])
{
$output .= "
<div style='text-align:center;".lgsl_bg()."'>
<br />
{$lgsl_config['text']['asd']}
<br />
<br />
</div>";

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 > 99999 || $q_port < 1024) { $c_port = 0; }
if ($q_port > 99999 || $q_port < 1024) { $q_port = 0; }

list($c_port, $q_port, $s_port) = lgsl_port_conversion($type, $c_port, $q_port, $s_port);

//-----------------------------------------------------------------------------------------------------------+

$output .= "
<form method='post' action=''>
<div style='text-align:center'>
<table cellpadding='4' cellspacing='2' style='margin:auto; text-align:left'>
<tr style='".lgsl_bg()."'>
<td colspan='2' style='text-align:center'>
<br />
{$lgsl_config['text']['awm']}
<br />
<br />
</td>
</tr>
<tr style='".lgsl_bg()."'>
<td> {$lgsl_config['text']['typ']} </td>
<td>
<select name='form_type'>";
//---------------------------------------------------------+
foreach ($lgsl_type_list as $key => $value)
{
$output .= "
<option ".($key == $type ? "selected='selected'" : "")." value='{$key}'> {$value} </option>";
}
//---------------------------------------------------------+
$output .= "
</select>
</td>
</tr>
<tr style='".lgsl_bg()."'>
<td> {$lgsl_config['text']['adr']} </td>
<td> <input type='text' name='form_ip' value='".lgsl_string_html($ip)."' size='15' maxlength='128' /> </td>
</tr>
<tr style='".lgsl_bg()."'>
<td> {$lgsl_config['text']['cpt']} </td>
<td> <input type='text' name='form_c_port' value='".lgsl_string_html($c_port)."' size='5' maxlength='5' /> </td>
</tr>
<tr style='".lgsl_bg()."'>
<td> {$lgsl_config['text']['qpt']} </td>
<td> <input type='text' name='form_q_port' value='".lgsl_string_html($q_port)."' size='5' maxlength='5' /> </td>
</tr>
<tr style='".lgsl_bg()."'>
<td colspan='2' style='text-align:center'>
<br />
<input type='submit' name='lgsl_submit_test' value='{$lgsl_config['text']['ats']}' />
<br />
<br />
</td>
</tr>
</table>
<br />
<br />
</div>
</form>";

//-----------------------------------------------------------------------------------------------------------+

if (empty($_POST['lgsl_submit_test']) && empty($_POST['lgsl_submit_add'])) { return; }
if (!isset($lgsl_type_list[$type]) || !$ip || !$c_port || !$q_port) { return; }

//-----------------------------------------------------------------------------------------------------------+

lgsl_database();

$ip = mysql_real_escape_string($ip);
$q_port = mysql_real_escape_string($q_port);
$c_port = mysql_real_escape_string($c_port);
$s_port = mysql_real_escape_string($s_port);
$type = mysql_real_escape_string($type);

//-----------------------------------------------------------------------------------------------------------+

$ip_check = gethostbyname($ip);
$mysql_result = mysql_query("SELECT `ip`,`disabled` FROM `{$lgsl_config['db']['prefix']}{$lgsl_config['db']['table']}` WHERE `type`='{$type}' AND `q_port`='{$q_port}'");

while ($mysql_row = mysql_fetch_array($mysql_result, MYSQL_ASSOC))
{
if ($ip_check == gethostbyname($mysql_row['ip']))
{
$output .= "
<div style='text-align:center;".lgsl_bg()."'>
<br />";

if ($mysql_row['disabled'])
{
$output .= $lgsl_config['text']['aaa'];
}
else
{
$output .= $lgsl_config['text']['aan'];
}

$output .="
<br />
<br />
</div>
<div>
<br />
</div>";

return;
}
}

//-----------------------------------------------------------------------------------------------------------+

$server = lgsl_query_live($type, $ip, $c_port, $q_port, $s_port, "s");
$server = lgsl_server_html($server);

if (!$server['b']['status'])
{
$output .= "
<div style='text-align:center;".lgsl_bg()."'>
<br />
{$lgsl_config['text']['anr']}
<br />
<br />
</div>
<div>
<br />
</div>";

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 = mysql_query($mysql_query) or die(mysql_error());

$output .= "
<div style='text-align:center;".lgsl_bg()."'>
<br />";

if ($disabled)
{
$output .= $lgsl_config['text']['ada'];
}
else
{
$output .= $lgsl_config['text']['adn'];
}

$output .="
<br />
<br />
</div>
<div>
<br />
</div>";

return;
}

//-----------------------------------------------------------------------------------------------------------+

$output .= "
<form method='post' action=''>
<div style='text-align:center;".lgsl_bg()."'>
<br />
{$lgsl_config['text']['asc']}
<br />
<br />
</div>
<div>
<br />
</div>
<table cellpadding='4' cellspacing='2' style='margin:auto; text-align:left'>
<tr style='".lgsl_bg()."'> <td> <b> Name: </b> </td> <td style='white-space:nowrap'> {$server['s']['name']} </td> </tr>
<tr style='".lgsl_bg()."'> <td> <b> {$lgsl_config['text']['gme']} </b> </td> <td style='white-space:nowrap'> {$server['s']['game']} </td> </tr>
<tr style='".lgsl_bg()."'> <td> <b> {$lgsl_config['text']['map']} </b> </td> <td style='white-space:nowrap'> {$server['s']['map']} </td> </tr>
<tr style='".lgsl_bg()."'> <td> <b> {$lgsl_config['text']['plr']} </b> </td> <td style='white-space:nowrap'> {$server['s']['players']} / {$server['s']['playersmax']} </td> </tr>
</table>
<div>
<br />
</div>
<div style='text-align:center;".lgsl_bg()."'>
<br />
<input type='hidden' name='form_type' value='".lgsl_string_html($type)."' />
<input type='hidden' name='form_ip' value='".lgsl_string_html($ip)."' />
<input type='hidden' name='form_c_port' value='".lgsl_string_html($c_port)."' />
<input type='hidden' name='form_q_port' value='".lgsl_string_html($q_port)."' />
<input type='submit' name='lgsl_submit_add' value='{$lgsl_config['text']['aas']}' />
<br />
<br />
</div>
<div>
<br />
</div>
</form>";

//------------------------------------------------------------------------------------------------------------+
Loading

0 comments on commit 495a8a5

Please sign in to comment.