diff --git a/README.md b/README.md index 3d35ae27..b849fbc7 100644 --- a/README.md +++ b/README.md @@ -49,8 +49,7 @@ Download the archive and extract the files to the game server. From the download - ``addons/sourcemod/translations`` - ``cfg/sourcemod/multi1v1`` -If you are going to use a web-stats interface, you should also add the ``multi1v1_online_stats_viewer.smx`` plugin, which is under the ``plugins/disabled`` directory by default. - +If you are going to use a web-stats interface, you should also add the ``multi1v1_online_stats_viewer.smx`` plugin, which is under the ``plugins/disabled`` directory by default. **Note:** you still have to create a website for this. This project only provides the game server plugin. #### Configuration @@ -70,9 +69,6 @@ Here is a brief list of **some** cvars available. See the auto-generated ``cfg/s ``addons/sourcemod/configs/multi1v1_weapons.cfg`` contains the list of weapons that are available under the rifle and pistol menus. You are free to add or remove weapons from this as long as they match the correct format. Note that the ``team`` part is only for making sure the player gets the correct weapon skin, otherwise it has no effect. -## Web Interface -There is a work-in-progress open-source web interface being developed under the [web](web) directory. Check its [readme](web/readme.md) for more details. - ## More help on setting up the stats system There is a [wiki page](https://github.com/splewis/csgo-multi-1v1/wiki/Standard-stats-setup) that explains how to setup the stats system with the provided components. diff --git a/web/CHANGES.md b/web/CHANGES.md deleted file mode 100644 index a6ebf42d..00000000 --- a/web/CHANGES.md +++ /dev/null @@ -1,22 +0,0 @@ -Multi-1v1 Web Interface -========= -Updates ----- -1.3.6 ------------ -* Switched from checking IP to using a password for Anti-Squatter. -* mysqli_begin_transaction did not exist in older versions of PHP. Changed to mysqli_autocommit. - -Upcoming -* Add an option to disable getting the player's avatar/online status. -* Option to backup database before running Anti-Squatter - -1.3.5 ------------ -* Made a switch from MySQL to MySQLi -* [Anti-Squatter] - Now completes the job much faster. - -1.3.2 ------------ -* [Anti-Squatter] - Changed max_execution_time to 300 because PHP would stop the script before it was complete -* [Top 15 Players] - Limited the SQL query to only return 15 players making the page load much faster. diff --git a/web/cron/antisquatter.php b/web/cron/antisquatter.php deleted file mode 100644 index 49d9fc74..00000000 --- a/web/cron/antisquatter.php +++ /dev/null @@ -1,47 +0,0 @@ -You aren't supposed to be here! Only follow links!"); -} - -ini_set('max_execution_time', 300); -$changes = 0; - -if ($passphrase == $anti_squatter_pass) { - $run_query = "SELECT accountID, name, rating, lastTime, TRUNCATE((unix_timestamp(NOW()) - lastTime) / 86400, 0) AS elapsedtime_days FROM $mysql_table WHERE rating > 1500 AND lastTime > 0 AND (unix_timestamp(NOW()) - lastTime) > 86400"; - $query = mysqli_query($connect, $run_query); - - mysqli_autocommit($connect, false); - - - while ($row = mysqli_fetch_assoc($query)) { - $accountID = $row['accountID']; - $rating = $row['rating']; - $lastTime = $row['lastTime']; - $elapsedtime_days = $row['elapsedtime_days']; - - $rating_loss = $antisquatter_rate_loss * $elapsedtime_days * ($rating - 1500) / $rating; - $rating_new = number_format((float)$rating - $rating_loss, 2, '.', ''); - - mysqli_query($connect, "UPDATE multi1v1_stats SET rating='$rating_new' WHERE accountID='$accountID'"); - $changes++; - } - - mysqli_commit($connect); - - if ($log_antisquatter == true) { - file_put_contents("antisquatter.log", date('d/m/y h:i:s')." Script ran successfully. | Players updated: ".$changes."\n", FILE_APPEND); - } - echo "Complete. Updated $changes players."; -} else{ - if ($log_antisquatter == true) { - file_put_contents("antisquatter.log", date('d/m/y h:i:s')." Invalid password from IP: ".$externalIP."\n", FILE_APPEND); - } - echo "Incorrect Password!"; -} -?> diff --git a/web/css/style.css b/web/css/style.css deleted file mode 100644 index 61133a1f..00000000 --- a/web/css/style.css +++ /dev/null @@ -1,169 +0,0 @@ -/*====================================== reset.css is here ========================================*/ -body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { margin:0; padding:0;} -table { border-collapse:collapse; border-spacing:0;} -fieldset,img { border:0; } -address,caption,cite,code,dfn,em,strong,th,var {font-style:normal; font-weight:normal;} -ol,ul { list-style:none;} -caption,th {text-align:left;} -h1,h2,h3,h4,h5,h6 { font-size:100%; font-weight:bold;} -q:before,q:after {content:'';} -abbr,acronym { border:0;} -.clear{clear:both; font-size:0px;line-height:0px; display:block;} -.last {margin:0 !important;} -.pad_last{padding:0 !important;} -.no_bg {background:none !important;} -textarea:focus, input:focus{outline:none;} -.tg {border-collapse:collapse;border-spacing:0;} -.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} -.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} -.tg .tg-dilm{background-color:#c0c0c0;color:#000000;} -.tg .tg-bsv2{background-color:#efefef;color:#000000;} -/**************************************************************************************/ -a {color:#000;text-decoration:none;outline:0 none;} -a:hover {color:#000; text-decoration:none;} -h1 {font-size:24px;} -h2 {font-size:22px;} -h3 {font-size:18px;} -h4 {font-size:16px;} -h5 {font-size:14px;} -h6 {font-size:12px;} -/*----------------------------------------------------------------------------------*/ -body {color:#b1b1b1; font-family:"Arial", Verdana, Tahoma; font-size:12px;} -.flt_Lt {float:left; display:inline;} -.flt_Rt {float:right; display:inline;} -/* ---------------------------------------------------------------------------------*/ - - -/* ----------------------- layout ----------*/ -.wrapper {margin:0 auto;} -.container {width:980px; margin:0 auto;} - -#header{ - width:100%; - border-bottom:1px solid #cdcdcd; - height:100px; - background-color: #EFEFEF; -} -#header2{ - width:100%; - border-bottom:1px solid #cdcdcd; - height:100px; -} -.header{ - width:980px; - margin:0 auto; - height: 100px; -} -.search{ - top: 15px; - right: 20px; - position: absolute; -} -.searchnoinfo{ - margin: 0 auto 0 auto; - width: 202px; -} -.stats{ - padding-top:20px; - padding-left:50px; - margin-top:auto; - margin-bottom:auto; - height:auto; - background-color: #f6f6f6; - border: 1px solid #eeeeee; -} -.everything { - padding:20px 20px 20px 20px; - position: absolute; - top:0; - bottom: 0; - left: 0; - right: 0; - margin: auto; - background-image: url("http://api.thumbr.it/whitenoise-361x370.png?background=f6f6f6ff&noise=d6d6d6&density=100&opacity=22"); -} -.everything h3{ - font-family:"Trebuchet MS",Arial, Helvetica; - font-size:24px; - font-weight:normal; - color:#339966; - margin:0 0 25px 0; - line-height:1; - text-align: center; -} -.everything h4{ - font-family:"Trebuchet MS",Arial, Helvetica; - font-size:50px; - font-weight:bold; - color:#339966; - margin:0 0 25px 0; - line-height:1; -} -.everything h5{ - font-family:Arial, Helvetica, sans-serif; - font-size:13px; - color:#333333; - text-decoration:underline; - margin:0 0 2px 0; -} -.everything p{ - font-family:Arial, Helvetica, sans-serif; - font-size:12px; - color:#333333; - line-height:1.6; - margin:0 0 25px 0; -} - -.playerAvatar { - position:absolute; - right:50px; - top:90px; - padding: 4px; - border-radius: 3px; - background-color: #545454; -} -.playerAvatar.offline { - - background: -moz-linear-gradient(top, #706c6b 5%, #4e4d4d 95%);background: -webkit-gradient(linear, left top, left bottom, color-stop(5%,#706c6b), color-stop(95%,#4e4d4d));background: -webkit-linear-gradient(top, #706c6b 5%,#4e4d4d 95%);background: -o-linear-gradient(top, #706c6b 5%,#4e4d4d 95%);background: -ms-linear-gradient(top, #706c6b 5%,#4e4d4d 95%);background: linear-gradient(to bottom, #706c6b 5%,#4e4d4d 95%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#706c6b', endColorstr='#4e4d4d',GradientType=0 ); /* IE <= 9 doesn't support rounded corners and gradient. The gradient isn't too noticable so just disable the filter in IE9 */ - filter: none; -} - /* #8dccff to 6da1d0 */ -.playerAvatar.online { - background-color: #7bafd6; - - background: -moz-linear-gradient(top, #7bafd6 5%, #506d92 95%);background: -webkit-gradient(linear, left top, left bottom, color-stop(5%,#7bafd6), color-stop(95%,#506d92));background: -webkit-linear-gradient(top, #7bafd6 5%,#506d92 95%);background: -o-linear-gradient(top, #7bafd6 5%,#506d92 95%);background: -ms-linear-gradient(top, #7bafd6 5%,#506d92 95%);background: linear-gradient(to bottom, #7bafd6 5%,#506d92 95%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7bafd6', endColorstr='#506d92',GradientType=0 ); /* IE <= 9 doesn't support rounded corners and gradient. The gradient isn't too noticable so just disable the filter in IE9 */ - filter: none; -} -.playerAvatar.online img { - border-color: #4d5761; -} - /* gradient from #b3fc55 to #8cc82c */ -.playerAvatar.in-game { - background-color: #9bc861; - background: -moz-linear-gradient(top, #9bc861 5%, #789e4c 95%);background: -webkit-gradient(linear, left top, left bottom, color-stop(5%,#9bc861), color-stop(95%,#789e4c));background: -webkit-linear-gradient(top, #9bc861 5%,#789e4c 95%);background: -o-linear-gradient(top, #9bc861 5%,#789e4c 95%);background: -ms-linear-gradient(top, #9bc861 5%,#789e4c 95%);background: linear-gradient(to bottom, #9bc861 5%,#789e4c 95%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9bc861', endColorstr='#789e4c',GradientType=0 ); /* IE <= 9 doesn't support rounded corners and gradient. The gradient isn't too noticable so just disable the filter in IE9 */ - filter: none; -} -.playerAvatar.in-game img { - border-color: #525a4f; -} -.playerAvatar { - width: 184px; - height: 184px; -} -.topPlayers{ - position:absolute; - top:150px; - left:50%; - margin-left:-225px; -} -.activity{ - position:relative; - top:15px; - font-size:25px; - font-weight:bold; - margin: 0 auto; - color: rgb(0,255,0); -} -.activity.inactive{ - color: rgb(255,0,0); -} diff --git a/web/css/style.min.css b/web/css/style.min.css deleted file mode 100644 index fdbe896e..00000000 --- a/web/css/style.min.css +++ /dev/null @@ -1 +0,0 @@ -blockquote,body,dd,div,dl,dt,fieldset,form,h1,h2,h3,h4,h5,h6,input,li,ol,p,pre,td,textarea,th,ul{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:400}ol,ul{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-weight:700}q:after,q:before{content:''}abbr,acronym{border:0}.clear{clear:both;font-size:0;line-height:0;display:block}.last{margin:0!important}.pad_last{padding:0!important}.no_bg{background:none!important}input:focus,textarea:focus{outline:0}.tg{border-collapse:collapse;border-spacing:0}.tg td{font-family:Arial,sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal}.tg th{font-family:Arial,sans-serif;font-size:14px;font-weight:400;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal}.tg .tg-dilm{background-color:silver;color:#000}.tg .tg-bsv2{background-color:#efefef;color:#000}a{color:#000;text-decoration:none;outline:0}a:hover{color:#000;text-decoration:none}h1{font-size:24px}h2{font-size:22px}h3{font-size:18px}h4{font-size:16px}h5{font-size:14px}h6{font-size:12px}body{color:#b1b1b1;font-family:Arial,Verdana,Tahoma;font-size:12px}.flt_Lt{float:left;display:inline}.flt_Rt{float:right;display:inline}.wrapper{margin:0 auto}.container{width:980px;margin:0 auto}#header{width:100%;border-bottom:1px solid #cdcdcd;height:100px;background-color:#EFEFEF}#header2{width:100%;border-bottom:1px solid #cdcdcd;height:100px}.header{width:980px;margin:0 auto;height:100px}.search{top:15px;right:20px;position:absolute}.searchnoinfo{margin:0 auto;width:202px}.stats{padding-top:20px;padding-left:50px;margin-top:auto;margin-bottom:auto;height:auto;background-color:#f6f6f6;border:1px solid #eee}.everything{padding:20px;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto;background-image:url(http://api.thumbr.it/whitenoise-361x370.png?background=f6f6f6ff&noise=d6d6d6&density=100&opacity=22)}.everything h3{font-family:"Trebuchet MS",Arial,Helvetica;font-size:24px;font-weight:400;color:#396;margin:0 0 25px;line-height:1;text-align:center}.everything h4{font-family:"Trebuchet MS",Arial,Helvetica;font-size:50px;font-weight:700;color:#396;margin:0 0 25px;line-height:1}.everything h5{font-family:Arial,Helvetica,sans-serif;font-size:13px;color:#333;text-decoration:underline;margin:0 0 2px}.everything p{font-family:Arial,Helvetica,sans-serif;font-size:12px;color:#333;line-height:1.6;margin:0 0 25px}.playerAvatar{position:absolute;right:50px;top:90px;padding:4px;border-radius:3px;background-color:#545454}.playerAvatar.offline{background:-moz-linear-gradient(top,#706c6b 5%,#4e4d4d 95%);background:-webkit-gradient(linear,left top,left bottom,color-stop(5%,#706c6b),color-stop(95%,#4e4d4d));background:-webkit-linear-gradient(top,#706c6b 5%,#4e4d4d 95%);background:-o-linear-gradient(top,#706c6b 5%,#4e4d4d 95%);background:-ms-linear-gradient(top,#706c6b 5%,#4e4d4d 95%);background:linear-gradient(to bottom,#706c6b 5%,#4e4d4d 95%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#706c6b', endColorstr='#4e4d4d', GradientType=0);filter:none}.playerAvatar.online{background:-moz-linear-gradient(top,#7bafd6 5%,#506d92 95%);background:-webkit-gradient(linear,left top,left bottom,color-stop(5%,#7bafd6),color-stop(95%,#506d92));background:-webkit-linear-gradient(top,#7bafd6 5%,#506d92 95%);background:-o-linear-gradient(top,#7bafd6 5%,#506d92 95%);background:-ms-linear-gradient(top,#7bafd6 5%,#506d92 95%);background:linear-gradient(to bottom,#7bafd6 5%,#506d92 95%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7bafd6', endColorstr='#506d92', GradientType=0);filter:none}.playerAvatar.online img{border-color:#4d5761}.playerAvatar.in-game{background:-moz-linear-gradient(top,#9bc861 5%,#789e4c 95%);background:-webkit-gradient(linear,left top,left bottom,color-stop(5%,#9bc861),color-stop(95%,#789e4c));background:-webkit-linear-gradient(top,#9bc861 5%,#789e4c 95%);background:-o-linear-gradient(top,#9bc861 5%,#789e4c 95%);background:-ms-linear-gradient(top,#9bc861 5%,#789e4c 95%);background:linear-gradient(to bottom,#9bc861 5%,#789e4c 95%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9bc861', endColorstr='#789e4c', GradientType=0);filter:none}.playerAvatar.in-game img{border-color:#525a4f}.playerAvatar{width:184px;height:184px}.topPlayers{position:absolute;top:150px;left:50%;margin-left:-225px}.activity{position:relative;top:15px;font-size:25px;font-weight:700;margin:0 auto;color:#0f0}.activity.inactive{color:red} diff --git a/web/includes/config.inc.php b/web/includes/config.inc.php deleted file mode 100644 index 909f6074..00000000 --- a/web/includes/config.inc.php +++ /dev/null @@ -1,26 +0,0 @@ -set_charset('utf8'); -$select_db = mysqli_select_db($connect, $mysql_db) or die('Cannot find database.') -?> diff --git a/web/includes/generatetopplayers.php b/web/includes/generatetopplayers.php deleted file mode 100644 index 4d3c917b..00000000 --- a/web/includes/generatetopplayers.php +++ /dev/null @@ -1,76 +0,0 @@ - - - # - Name - Wins - Losses - W/L Ratio - ELO Rank - "; - -$alt = 0; - -$server_limit = 'AND serverID=0'; -$server_id = '0'; -if (isset($_GET['serverid'])) { - $server_id = (int)$_GET['serverid']; - $server_limit = 'AND serverID='.(int)$_GET['serverid']; -} - -$run_query = "SELECT s1.*, (SELECT COUNT(*) FROM $mysql_table AS s2 WHERE s2.rating > s1.rating AND s2.wins+s2.losses > 200 $server_limit)+1 AS rank FROM $mysql_table AS s1 WHERE s1.wins+s1.losses > 200 $server_limit ORDER BY rating DESC LIMIT 0, 15"; -$query = mysqli_query($connect, $run_query); - -if (@$query){ - for ($i = 0; $i < 15; $i++){ - $row = mysqli_fetch_assoc($query); - $accountID = $row['accountID']; - $rank = $row['rank']; - $name = htmlentities($row['name']); - $wins = $row['wins']; - $losses = $row['losses']; - $rating = $row['rating']; - $lastTime = $row['lastTime']; - - if ($losses == 0) { - $WL = $wins; - } else{ - $WL = round($wins/$losses, 2); - } - - if ($alt == 0){ - $generated .= "$rank"; - - // NEED TO FIX THE SERVERID! Combine user stats. - if (isPlayerActive($lastTime) == true){ - $generated .= "$name (Inactive)"; - } else { - $generated .= "$name"; - } - - $generated .= "$wins - $losses - $WL - $rating"; - $alt = 1; - } else{ - $generated .= "$rank"; - - if (isPlayerActive($lastTime) == true){ - $generated .= "$name (Inactive)"; - } else{ - $generated .= "$name"; - } - - $generated .= "$wins - $losses - $WL - $rating"; - $alt = 0; - } - - } - $generated .= "
Ranked by ELO Rating."; -} -echo $generated; -?> diff --git a/web/includes/utils.inc.php b/web/includes/utils.inc.php deleted file mode 100644 index 8025b6a9..00000000 --- a/web/includes/utils.inc.php +++ /dev/null @@ -1,61 +0,0 @@ - $days_until_inactivity && $lastTime != 0) { - return 'true'; - } -} -?> diff --git a/web/index.php b/web/index.php deleted file mode 100644 index ec1ee1c3..00000000 --- a/web/index.php +++ /dev/null @@ -1,113 +0,0 @@ - - - - - -$page_title"; - $time = microtime(); - $time = explode(' ', $time); - $time = $time[1] + $time[0]; - $start = $time; -?> - - - - - -
-
- - $page_title"; - echo "
"; - } else{ - echo "
"; - } - ?> - -
-
Search player stats:
- -
-
- -

Top 15 Players

"; - include 'includes/generatetopplayers.php'; - echo "
"; - } - - if (isset($_GET['id']) && !empty($_GET['id'])){ - - $server_limit = 'AND serverID=0'; - $server_id = '0'; - if (isset($_GET['serverid'])) { - $server_id = (int)$_GET['serverid']; - $server_limit = 'AND serverID='.(int)$_GET['serverid']; - } - // TODO: Fix serverid. Combine user's stats if the serverid is not set. - - $totalplayers = mysqli_num_rows(mysqli_query($connect, "SELECT * FROM $mysql_table WHERE serverID=$server_id")); - $run_query = "SELECT s1.*, (SELECT COUNT(*) FROM $mysql_table AS s2 WHERE s2.rating > s1.rating $server_limit)+1 AS rank FROM $mysql_table AS s1 WHERE accountID=".(int)$_GET['id']." $server_limit"; - $query = mysqli_query($connect, $run_query); - - if (mysqli_num_rows($query) > 0){ - if ($query){ - while ($row = mysqli_fetch_assoc($query)){ - $accountID = $row['accountID']; - $auth = $row['auth']; - $rank = $row['rank']; - $name = htmlentities($row['name']); - $wins = $row['wins']; - $losses = $row['losses']; - $rating = $row['rating']; - $lastTime = $row['lastTime']; - - if ($losses == 0) { - $WL = $wins; - } else{ - $WL = round($wins/$losses, 2); - } - - echo "

Stats for player: $name

-
-

Rank: $rank of $totalplayers


-

Wins: $wins


-

Losses: $losses


-

W/L Ratio: $WL


-

ELO Rating: $rating


-
"; - if (isPlayerActive($lastTime) == true){ - echo "
INACTIVE
"; - } else{ - echo "
ACTIVE
"; - } - } - } - } else{ - die("

User not found.

"); - } - } - ?> - -
- - Page generated in '.$total_time.' seconds.'; - } - ?> -
- - - diff --git a/web/readme.md b/web/readme.md deleted file mode 100644 index 0c118750..00000000 --- a/web/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -Multi 1v1 Arena Web Stats Interface -======================================= - -###Configuration -Edit config.inc.php with your appropriate database credentials, page title, Steam Web API key, and other settings. All descriptions are avaliable in the file. - -**Note**: For players to be listed on the top 15 list, they will have to have played 200 or more games. This can be removed by changing **line 21** in includes/generatetopplayers.php with the following - -```php -$run_query = "SELECT s1.*, (SELECT COUNT(*) FROM $mysql_table AS s2 WHERE s2.rating > s1.rating AND s2.wins+s2.losses > 0 $server_limit)+1 AS rank FROM $mysql_table AS s1 WHERE s1.wins+s1.losses > 0 $server_limit ORDER BY rating DESC LIMIT 0, 15"; -``` - -###Setting up Anti-Squatter -Setting up the anti-squatter feature is fairly simple to set up. -All you have to do is add a password to $anti_squatter_pass in config.inc.php and create a cronjob set to run everyday with the command following command: -```bash -wget http://www.domain.com/stats/cron/antisquatter.php?p={YOUR_PASSWORD} && rm -rf antisquatter.php -``` -**IMPORTANT***: Make sure your password is secure! The integrity of your stats depend on it. - -###In-Game Stats -If you are using the included ``multi1v1_online_stats_viewer`` plugin, you should set the ``sm_multi1v1_stats_url`` to something like: -``http://www.domain.com/stats/redirect.php?id={USER}&serverid={SERVER}`` and ``sm_multi1v1_top_url`` to something like: ``http://www.domain.com/stats/redirect.php?serverid={SERVER}``. - -These cvars should be set in ``cfg/multi1v1/multi1v1_online_stats_viewer.cfg``. - -**Note**: Don't forget that if you have multiple servers with different IDs you have to set the URL with the serverid in the plugin config or else it will only the stats for serverID 0. - -###Other Info -This web interface was a quick job that I randomly took up while I was learning PHP. I don't have a 1v1 server anymore but I will try and keep it updated when I can, but no promises. If you have any issues setting it up, feel free to email me at clayton@hiddenempire.org. diff --git a/web/redirect.php b/web/redirect.php deleted file mode 100644 index 274d2fb0..00000000 --- a/web/redirect.php +++ /dev/null @@ -1,16 +0,0 @@ - - - -window.onload = function(){ - var popup=window.open(\"$url\",\"Player Stats\"); -}; -"; - -?> - - diff --git a/web/search.php b/web/search.php deleted file mode 100644 index 8fcaf0c5..00000000 --- a/web/search.php +++ /dev/null @@ -1,58 +0,0 @@ - - - - - -$page_title"; - $time = microtime(); - $time = explode(' ', $time); - $time = $time[1] + $time[0]; - $start = $time; -?> - - - - - -
-
- - - 2){ - $searchquery = htmlentities($_GET['searchquery']); - $run_query = "SELECT `accountID`, `serverID`, `name` FROM multi1v1_stats WHERE name LIKE '%".mysqli_real_escape_string($connect, $searchquery)."%'"; - $query = mysqli_query($connect, $run_query); - - echo "

Searching for players with name \"$searchquery\".

"; - if (mysqli_num_rows($query) > 0){ - echo "
Players found:
    "; - if ($query) { - while ($row = mysqli_fetch_assoc($query)){ - $accountID = $row['accountID']; - $server_id = $row['serverID']; - $name = htmlentities($row['name']); - //FIX SERVER ID - echo "

  • $name (Server $server_id)
  • "; - } - } - echo "
"; - } else { - die("No users found with name \"".$searchquery."\"."); - } - } else { - die("

Please enter a search term longer than 2 characters.

"); - } - ?> - -
-
- -