├── .gitignore ├── Bcrypt.php ├── LICENSE ├── README.md ├── admin.php ├── authenticate.php ├── control ├── admin │ ├── addAccount.php │ ├── addServer.php │ ├── addSocial.php │ ├── editServer.php │ ├── getAccounts.php │ ├── getServers.php │ └── updateAccount.php ├── class.Player.php ├── class.Server.php ├── leaderboard │ ├── leaderboardGrab.php │ └── ssp.class.php ├── profile │ └── profileGrab.php ├── queryFunctions.php ├── search │ └── searchGrab.php └── servers │ └── getServer.php ├── css ├── DataTable │ ├── Bootstrap-3.3.7 │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ └── bootstrap.min.css │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── npm.js │ ├── dataTables.bootstrap.css │ ├── dataTables.bootstrap.min.css │ ├── dataTables.bootstrap4.css │ ├── dataTables.bootstrap4.min.css │ ├── dataTables.foundation.css │ ├── dataTables.foundation.min.css │ ├── dataTables.jqueryui.css │ ├── dataTables.jqueryui.min.css │ ├── dataTables.material.css │ ├── dataTables.material.min.css │ ├── dataTables.semanticui.css │ ├── dataTables.semanticui.min.css │ ├── dataTables.uikit.css │ ├── dataTables.uikit.min.css │ ├── datatables.min.css │ ├── jquery.dataTables.css │ ├── jquery.dataTables.min.css │ └── jquery.dataTables_themeroller.css ├── bootstrap │ ├── bootstrap-flex.css │ ├── bootstrap-flex.css.map │ ├── bootstrap-flex.min.css │ ├── bootstrap-flex.min.css.map │ ├── bootstrap-grid.css │ ├── bootstrap-grid.css.map │ ├── bootstrap-grid.min.css │ ├── bootstrap-grid.min.css.map │ ├── bootstrap-reboot.css │ ├── bootstrap-reboot.css.map │ ├── bootstrap-reboot.min.css │ ├── bootstrap-reboot.min.css.map │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ └── bootstrap.min.css.map ├── circle.css ├── fontawesome │ ├── font-awesome.css │ └── font-awesome.min.css ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 ├── jquery-ui.min.css ├── less │ ├── body.less │ ├── main.less │ ├── nav.less │ ├── tables.less │ └── var.less ├── login.css ├── morris │ └── morris.css ├── navCSS.css ├── social.css ├── style.css ├── style.css.map └── tether │ ├── tether-theme-arrows-dark.css │ ├── tether-theme-arrows-dark.min.css │ ├── tether-theme-arrows.css │ ├── tether-theme-arrows.min.css │ ├── tether-theme-basic.css │ ├── tether-theme-basic.min.css │ ├── tether.css │ └── tether.min.css ├── example.config.php ├── images ├── Sorting icons.psd ├── favicon.ico ├── gears.gif ├── sort_asc.png ├── sort_asc_disabled.png ├── sort_both.png ├── sort_desc.png ├── sort_desc_disabled.png ├── ui-icons_444444_256x240.png ├── ui-icons_555555_256x240.png ├── ui-icons_777620_256x240.png ├── ui-icons_777777_256x240.png ├── ui-icons_cc0000_256x240.png └── ui-icons_ffffff_256x240.png ├── index.php ├── install ├── install.php ├── install.php-tmp ├── installMethods.php └── installMethods.php-tmp ├── js ├── DataTable │ ├── dataTables.bootstrap.js │ ├── dataTables.bootstrap.min.js │ ├── dataTables.bootstrap4.js │ ├── dataTables.bootstrap4.min.js │ ├── dataTables.foundation.js │ ├── dataTables.foundation.min.js │ ├── dataTables.jqueryui.js │ ├── dataTables.jqueryui.min.js │ ├── dataTables.material.js │ ├── dataTables.material.min.js │ ├── dataTables.semanticui.js │ ├── dataTables.semanticui.min.js │ ├── dataTables.uikit.js │ ├── dataTables.uikit.min.js │ ├── datatables.min.js │ ├── jquery.dataTables.js │ ├── jquery.dataTables.min.js │ ├── jquery.js │ └── jqueryDataTables.js ├── Navjs.js ├── bootstrap │ ├── bootstrap.js │ └── bootstrap.min.js ├── jquery-ui.min.js ├── jquery.min.js ├── leaderboard │ └── leaderboardFunctions.js ├── morris │ ├── Gruntfile.js │ ├── morris.js │ ├── morris.min.js │ └── raphael.min.js ├── paging.js ├── search │ ├── search-ajax.js │ └── search.js └── tether │ ├── tether.js │ └── tether.min.js ├── leaderboards.php ├── login.php ├── logout.php ├── profile.php ├── search.php ├── servers.php └── views ├── admin └── index.php ├── error └── errorSteamID.php ├── home └── index.php ├── leaderboards └── index.php ├── nav └── index.php ├── search └── search-index.php └── servers └── index.php /.gitignore: -------------------------------------------------------------------------------- 1 | *.settings -------------------------------------------------------------------------------- /Bcrypt.php: -------------------------------------------------------------------------------- 1 | 31) { 79 | $workFactor = self::$_workFactor; 80 | } 81 | 82 | $input = self::_getRandomBytes(); 83 | $salt = '$' . self::$_identifier . '$'; 84 | 85 | $salt .= str_pad($workFactor, 2, '0', STR_PAD_LEFT); 86 | $salt .= '$'; 87 | 88 | $salt .= substr(strtr(base64_encode($input), '+', '.'), 0, 22); 89 | 90 | return $salt; 91 | } 92 | 93 | /** 94 | * OpenSSL's random generator 95 | * 96 | * @return string 97 | */ 98 | private static function _getRandomBytes() { 99 | if (!function_exists('openssl_random_pseudo_bytes')) { 100 | throw new Exception('Unsupported hash format.'); 101 | } 102 | return openssl_random_pseudo_bytes(16); 103 | } 104 | 105 | /** 106 | * Validate identifier 107 | * 108 | * @param string $hash 109 | * @return void 110 | */ 111 | private static function _validateIdentifier($hash) { 112 | if (!in_array(substr($hash, 1, 2), self::$_validIdentifiers)) { 113 | throw new Exception('Unsupported hash format.'); 114 | } 115 | } 116 | 117 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Toxic Revolution 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CSGORankMeWeb 2 | Web interface for RankMe CSGO stat tracking plugin. 3 | 4 | ### We no longer actively maintain this repo. 5 | 6 | # Purpose 7 | This web interface allows users to view the stats from Counter Strike Global Offensive servers running the RankMe plugin found Here or Kento's version found Here. 8 | 9 | # Features 10 | 15 | 16 | # Restrictions 17 | 18 | The main restriction as of now is that there is only support for mySQL and not SQLite. I will possibly start development of a seperate project for converting SQLite to mySQL so that people can go down that road if they wish. I may also work on implementing support for SQLite into the current project, stay tuned! 19 | 20 | # Installation 21 | 22 | 1. Download all files and extract files into a folder on your webserver. 23 | 2. In a browser navigate to http://yoursite.com/folderName/install/install.php. 24 | 3. Follow the install instructions by hovering over the tooltips for information about each. 25 | 4. Delete the install folder after filling in the install page. 26 | 5. The site should be up at http://yoursite.com/folderName/ feel free to add social media links and servers by logging into your admin account on the bottom left and going to the admin area. 27 | 28 | # Releases 29 | 30 | V1.0 - For the most part stable, runs into issues if using large datasets. Semi-slow method of rendering leaderboard. Not recommended for large communities or communities with 10,000 or more RankMe entries. 31 | 32 | v1.1.1 - Quickest release, utilizing server sided datatables, more stressful on server but much quicker. Stable as all bugs should be addressed as far as we can find. Even with more data calls to server you should end up requesting less data from that server than you would with V1.0. 33 | 34 | # Help and Suport 35 | 36 | Start an Issue and Kenny or myself will reply and hopefully have a solution. 37 | 38 | Additionally you can add me on steam here. Please leave a comment on my profile as to why you are adding me or add me on discord ToxicFrank#7474. Our discord server can be accessed here: 39 | 40 | [![Join our Discord server!](https://invidget.switchblade.xyz/PCw4NSRT3S)](http://discord.gg/PCw4NSRT3S) 41 | 42 | 43 | Please report any errors this way as well so that I can update and fix those errors. 44 | 45 | # Changes 6/5/2017 46 | 47 | As of June 5th, 2017 we made a fairly large change which we encourage all users of our service to use. If you are downloading for the first time please ignore this but if you have already downloaded this web interface please do the following: 48 | 49 | 1. Download a new zip from GitHub of the source code. 50 | 2. Upload all the files onto your server and overwrite all files (as long as you haven't made any changes to the source this won't affect anything, if you have let me know and I can help). 51 | 3. Delete the install folder that was added (if you don't you leave a huge vulnerability on your site). 52 | 4. In the config.php file which was created with the install you ran the first time add at the very buttom the line: `$table = "YOUR DATABASE'S TABLE NAME HERE";` 53 | 5. You're done! If you want you can just delete the entire old install and restart and rerun the install.php file instead of doing the above steps. 54 | 55 | What were the changes? We changed the Players.class.php to a different initialization style as well as how the searchgrab, profilegrab and leaderboard grab pages retrieve information. Also cleaned up some of the functions and added support for those who don't use the default table name. 56 | 57 | # License and Copyright 58 | 59 | CSGO Web Rank Me's Code Is Released Under The MIT License 60 | 61 | # Creator 62 | 63 |

Andy Petrizilka

64 | 68 | 69 | # Helpers 70 | 71 |

Kenny Lindelof

72 | 76 | 77 |

B3none

78 | 82 | 83 | 84 | # Donate! 85 | If you feel super generous you can donate me a drink or two here: 86 | 87 | [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/AndyPetrzilka) 88 | [![Keybase](https://img.shields.io/badge/Keybase-Group-blue.svg)](https://keybase.io/team/toxicrevolution.development) 89 | -------------------------------------------------------------------------------- /admin.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | <?= $webTitle; ?> 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 |
39 |
40 |
41 | 42 | 43 | 44 |
45 |
46 |
47 | 48 | 49 | -------------------------------------------------------------------------------- /authenticate.php: -------------------------------------------------------------------------------- 1 | prepare($query); 6 | $stmt->bindValue(":email", strtolower($_POST['email'])); 7 | $stmt->execute(); 8 | $row = $stmt->fetch(PDO::FETCH_ASSOC); 9 | if (isset($row['email'])) { 10 | 11 | require('Bcrypt.php'); 12 | if (Bcrypt::checkPassword($_POST['password'], $row['password'])){ 13 | session_regenerate_id(); 14 | $_SESSION['sess_user_id'] = $row['id']; 15 | $_SESSION['sess_email'] = $row['email']; 16 | session_write_close(); 17 | 18 | header("Location: admin.php"); 19 | } else { 20 | header("Location: login.php?wrong=Incorrect Password"); 21 | } 22 | } else { 23 | header("Location: login.php?wrong=Email Not Found"); 24 | } 25 | ?> -------------------------------------------------------------------------------- /control/admin/addAccount.php: -------------------------------------------------------------------------------- 1 | prepare($query); 12 | $stmt->bindValue(":email", $_POST['accountEmail']); 13 | $stmt->bindValue(":Password", $hash); 14 | $stmt->execute(); 15 | header("location:../../admin.php?msg=Success!"); 16 | 17 | }else{ 18 | header("location:../../admin.php?msg=Error"); 19 | } 20 | 21 | }else { 22 | header("location:../../admin.php?msg=Error"); 23 | 24 | } 25 | 26 | 27 | ?> -------------------------------------------------------------------------------- /control/admin/addServer.php: -------------------------------------------------------------------------------- 1 | prepare($addServer); 5 | $stmt->bindValue(":serverIP", $_POST['serverIP']); 6 | $stmt->bindValue(":serverPort", $_POST['serverPort']); 7 | $stmt->bindValue(":serverName", $_POST['serverName']); 8 | $stmt->execute(); 9 | header("location:../../admin.php"); 10 | ?> -------------------------------------------------------------------------------- /control/admin/addSocial.php: -------------------------------------------------------------------------------- 1 | \n"; 5 | $fixedBottom = ""; 6 | fwrite($fileMain, $fixedTop); 7 | if($_POST['facebook'] != ""){ 8 | $facebookWrite = "
\n"; 9 | fwrite($fileMain, $facebookWrite); 10 | } 11 | 12 | if($_POST['twitter'] != ""){ 13 | $twitterWrite = "
\n"; 14 | fwrite($fileMain, $twitterWrite); 15 | } 16 | if($_POST['twitch'] != ""){ 17 | $twitchWrite = "
\n"; 18 | fwrite($fileMain, $twitchWrite); 19 | } 20 | if($_POST['steamGroup'] != ""){ 21 | $steamWrite = "
\n"; 22 | fwrite($fileMain, $steamWrite); 23 | } 24 | 25 | fwrite($fileMain, $fixedBottom); 26 | fclose($fileMain); 27 | header("location:../../admin.php"); 28 | ?> -------------------------------------------------------------------------------- /control/admin/editServer.php: -------------------------------------------------------------------------------- 1 | prepare($addServer); 5 | $stmt->bindValue(":serverID", $_POST['serverID']); 6 | $stmt->bindValue(":serverIP", $_POST['serverIP']); 7 | $stmt->bindValue(":serverPort", $_POST['serverPort']); 8 | $stmt->bindValue(":serverName", $_POST['serverName']); 9 | $stmt->execute(); 10 | header("location:../../admin.php"); 11 | ?> -------------------------------------------------------------------------------- /control/admin/getAccounts.php: -------------------------------------------------------------------------------- 1 | {$item['email']}"; 7 | } 8 | 9 | 10 | 11 | 12 | ?> 13 | 14 | -------------------------------------------------------------------------------- /control/admin/getServers.php: -------------------------------------------------------------------------------- 1 | {$server->get("name")} - {$server->get("IP")}:{$server->get("port")}"; 8 | } 9 | 10 | 11 | 12 | 13 | ?> 14 | 15 | -------------------------------------------------------------------------------- /control/admin/updateAccount.php: -------------------------------------------------------------------------------- 1 | prepare($addServer); 8 | $stmt->bindValue(":id", $_POST['accountID']); 9 | $stmt->bindValue(":password", $hash); 10 | $stmt->execute(); 11 | header("location:../../admin.php?msg=Success!"); 12 | } 13 | ?> -------------------------------------------------------------------------------- /control/class.Player.php: -------------------------------------------------------------------------------- 1 | steam = $item['steam']; 160 | $this->name = $item['name']; 161 | $this->lastIP = $item['lastip']; 162 | $this->score = $item['score']; 163 | $this->kills = $item['kills']; 164 | $this->deaths = $item['deaths']; 165 | $this->assists = $item['assists']; 166 | $this->suicides = $item['suicides']; 167 | $this->tk = $item['tk']; 168 | $this->shots = $item['shots']; 169 | $this->hits = $item['hits']; 170 | $this->headshots = $item['headshots']; 171 | $this->connected = $item['connected']; 172 | $this->rounds_tr = $item['rounds_tr']; 173 | $this->rounds_ct = $item['rounds_ct']; 174 | $this->lastconnect = $item['lastconnect']; 175 | $this->knife = $item['knife']; 176 | $this->glock = $item['glock']; 177 | $this->hkp2000 = $item['hkp2000']; 178 | $this->usp_silencer = $item['usp_silencer']; 179 | $this->p250 = $item['p250']; 180 | $this->deagle = $item['deagle']; 181 | $this->elite = $item['elite']; 182 | $this->fiveseven = $item['fiveseven']; 183 | $this->tec9 = $item['tec9']; 184 | $this->cz75a = $item['cz75a']; 185 | $this->revolver = $item['revolver']; 186 | $this->nova = $item['nova']; 187 | $this->xm1014 = $item['xm1014']; 188 | $this->mag7 = $item['mag7']; 189 | $this->sawedoff = $item['sawedoff']; 190 | $this->bizon = $item['bizon']; 191 | $this->mac10 = $item['mac10']; 192 | $this->mp9 = $item['mp9']; 193 | $this->mp7 = $item['mp7']; 194 | $this->ump45 = $item['ump45']; 195 | $this->p90 = $item['p90']; 196 | $this->galilar = $item['galilar']; 197 | $this->ak47 = $item['ak47']; 198 | $this->scar20 = $item['scar20']; 199 | $this->famas = $item['famas']; 200 | $this->m4a1 = $item['m4a1']; 201 | $this->m4a1_silencer = $item['m4a1_silencer']; 202 | $this->aug = $item['aug']; 203 | $this->ssg08 = $item['ssg08']; 204 | $this->sg556 = $item['sg556']; 205 | $this->awp = $item['awp']; 206 | $this->g3sg1 = $item['g3sg1']; 207 | $this->m249 = $item['m249']; 208 | $this->negev = $item['negev']; 209 | $this->hegrenade = $item['hegrenade']; 210 | $this->flashbang = $item['flashbang']; 211 | $this->smokegrenade = $item['smokegrenade']; 212 | $this->inferno = $item['inferno']; 213 | $this->decoy = $item['decoy']; 214 | $this->taser = $item['taser']; 215 | $this->head = $item['head']; 216 | $this->chest = $item['chest']; 217 | $this->stomach = $item['stomach']; 218 | $this->left_arm = $item['left_arm']; 219 | $this->right_arm = $item['right_arm']; 220 | $this->left_leg = $item['left_leg']; 221 | $this->right_leg = $item['right_leg']; 222 | $this->c4_planted = $item['c4_planted']; 223 | $this->c4_exploded = $item['c4_exploded']; 224 | $this->c4_defused = $item['c4_defused']; 225 | $this->ct_win = $item['ct_win']; 226 | $this->tr_win = $item['tr_win']; 227 | $this->hostages_rescued = $item['hostages_rescued']; 228 | $this->vip_killed = $item['vip_killed']; 229 | $this->vip_escaped = $item['vip_escaped']; 230 | $this->vip_played = $item['vip_played']; 231 | $this->mvp = $item['mvp']; 232 | $this->damage = $item['damage']; 233 | } 234 | 235 | public function get($name) { 236 | return $this->$name; 237 | } 238 | 239 | } 240 | ?> 241 | -------------------------------------------------------------------------------- /control/class.Server.php: -------------------------------------------------------------------------------- 1 | prepare($stmt); 17 | $query->bindValue(":id", $id); 18 | $query->execute(); 19 | $item = $query->fetch(PDO::FETCH_ASSOC); 20 | 21 | $this->IP = $item['serverIP']; 22 | $this->port = $item['serverPort']; 23 | $this->name = $item['serverName']; 24 | 25 | } 26 | 27 | public function get($name) { 28 | return $this->$name; 29 | } 30 | 31 | } 32 | ?> -------------------------------------------------------------------------------- /control/leaderboard/leaderboardGrab.php: -------------------------------------------------------------------------------- 1 | 'name', 'dt' => 0 ), 31 | array( 'db' => 'steam', 'dt' => 1 ), 32 | array( 'db' => 'score', 'dt' => 2 ), 33 | array( 'db' => 'deaths', 'dt' => NULL), 34 | array( 'db' => 'kills', 'dt' => 3, 35 | 'formatter' => function($d, $row){ 36 | $deaths = $row['deaths']; 37 | if($deaths == 0){ 38 | $deaths = 1; 39 | } 40 | $kd = round($row['kills']/$deaths, 2); 41 | return $kd; 42 | } 43 | ), 44 | array( 'db' => 'rounds_tr', 'dt' => NULL), 45 | array( 'db' => 'rounds_ct', 'dt' => NULL), 46 | array( 'db' => 'damage', 'dt' => 4, 47 | 'formatter' => function($d, $row){ 48 | $roundsTotal = $row['rounds_ct']; 49 | $roundsTotal += $row["rounds_tr"]; 50 | if($roundsTotal == 0){ 51 | return 0; 52 | }else{ 53 | $damageTotal = $row["damage"]; 54 | $ADR = round($damageTotal / $roundsTotal, 2); 55 | return $ADR; 56 | } 57 | } 58 | ), 59 | array( 'db' => 'steam', 'dt' => 5, 60 | 'formatter' => function($d, $row){ 61 | $button = "
"; 62 | return $button; 63 | } 64 | ) 65 | ); 66 | 67 | 68 | 69 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 70 | * If you just want to use the basic configuration for DataTables with PHP 71 | * server-side, there is no need to edit below this line. 72 | */ 73 | 74 | require( 'ssp.class.php' ); 75 | //var_dump($columns); 76 | echo json_encode( 77 | SSP::simple( $_GET, $sql_details, $table, $primaryKey, $columns ) 78 | ); 79 | -------------------------------------------------------------------------------- /control/search/searchGrab.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 | 19 |
Main Stats: name; ?>
20 |
21 |
22 | 23 |

Score: get("score"); ?>

24 |

Kills: get("kills"); ?>

25 |

Deaths: get("deaths"); ?>

26 |

K/D:

27 |

ADR

28 |

HS %

29 |
30 |
31 | 32 | 33 | 36 | 37 | 38 | 53 | 54 |
34 |

Accuracy

35 |
39 |
40 | "; 43 | echo "{$Accuracy}%"; 44 | ?> 45 | 46 |
47 |
48 |
49 |
50 | 51 |
52 |
55 |
56 |
57 |
58 |
59 | 60 |
61 |
62 |
Hitbox Stats:
63 |
64 |
65 | 80 | 81 |
82 |
83 |
84 |
85 |
86 |
Weapon Stats:
87 |
88 |

Favorite Weapon:

89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | "; 102 | echo ""; 103 | $weaponName = getWeaponName($weapon); 104 | echo ""; 105 | $total = $player->get($weapon); 106 | echo ""; 107 | $percentKill = getPerctTotalKill($player, $total); 108 | echo ""; 109 | echo ""; 110 | } 111 | ?> 112 | 113 |
Weapon Name
Weapon Kill
Percent Total Kill
{$weaponName}{$total} {$percentKill} %
114 | 115 |
116 | 136 |
137 |
138 |
139 |
140 |
141 | 142 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 37 |
38 |
39 |
40 | 41 | 42 | 43 |
44 |
45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /install/install.php-tmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ToxicRevolution/CSGORankMeWeb/4cbf9aace0f7837757338a4cc91a6a7d5a6f1750/install/install.php-tmp -------------------------------------------------------------------------------- /install/installMethods.php: -------------------------------------------------------------------------------- 1 | "; 13 | $requireStatements = "require_once(\"control/queryFunctions.php\");\nrequire_once(\"control/class.Player.php\");\nrequire_once(\"control/class.Server.php\");\n"; 14 | 15 | 16 | $pageTitle = "\$pageTitle = '{$_POST['pageTitle']}';\n"; 17 | $array = $_POST['check']; 18 | foreach($array as $item){ 19 | if($commaFlag > 0){ 20 | $itemsArray .= ","; 21 | } 22 | $commaFlag++; 23 | $itemsArray .= "\"{$item}\""; 24 | 25 | } 26 | $array = "\$weaponsArray = array({$itemsArray});\n"; 27 | $webTitle = "\$webTitle = '{$_POST['browserTitle']}';\n"; 28 | $serverType = "\$serverType = '{$_POST['serverType']}';\n"; 29 | $table = "\$table = '{$_POST['tableName']}';\n"; 30 | 31 | 32 | $databaseConn = "\$dbh = new PDO(\"mysql:host={$_POST['databaseIP']};dbname={$_POST['databaseName']}\", '{$_POST['databaseUser']}', '{$_POST['databasePass']}');\n"; 33 | 34 | fwrite($fileMain, $headPHP); 35 | fwrite($fileMain, $requireStatements); 36 | fwrite($fileMain, $pageTitle); 37 | fwrite($fileMain, $array); 38 | fwrite($fileMain, $webTitle); 39 | fwrite($fileMain, $serverType); 40 | fwrite($fileMain, $table); 41 | fwrite($fileMain, $databaseConn); 42 | if(isset($_POST['webURL'])){ 43 | $webURL = "\$webURL = '{$_POST['webURL']}';\n"; 44 | fwrite($fileMain, $webURL); 45 | } 46 | if(isset($_POST['sbURL'])){ 47 | $sbURL = "\$sbURL = '{$_POST['sbURL']}';\n"; 48 | fwrite($fileMain, $sbURL); 49 | } 50 | $sqlDets = "\n\$sql_details = array(\n\t\t\t'user' => '{$_POST['databaseUser']}',\n\t\t\t'pass' => '{$_POST['databasePass']}',\n\t\t\t'db' => '{$_POST['databaseName']}',\n\t\t\t'host' => '{$_POST['databaseIP']}'\n);\n"; 51 | fwrite($fileMain, $sqlDets); 52 | fwrite($fileMain, $tailPHP); 53 | 54 | fclose($fileMain); 55 | 56 | $dbh = new PDO("mysql:host={$_POST['databaseIP']};dbname={$_POST['databaseName']}", $_POST['databaseUser'], $_POST['databasePass']); 57 | 58 | $createAdminDB = "CREATE TABLE IF NOT EXISTS `users` ( 59 | `id` int(11) NOT NULL AUTO_INCREMENT, 60 | `email` varchar(256) NOT NULL, 61 | `password` varchar(256) NOT NULL, 62 | PRIMARY KEY (`id`) 63 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;"; 64 | $stmt = $dbh->prepare($createAdminDB); 65 | $stmt->execute(); 66 | $createServersDB = "CREATE TABLE IF NOT EXISTS `servers` ( 67 | `id` int(11) NOT NULL AUTO_INCREMENT, 68 | `serverIP` varchar(128) NOT NULL, 69 | `serverPort` varchar(128) NOT NULL, 70 | `serverName` varchar(512) NOT NULL, 71 | PRIMARY KEY (`id`) 72 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;"; 73 | $stmt = $dbh->prepare($createServersDB); 74 | $stmt->execute(); 75 | 76 | $hash = Bcrypt::hashPassword($_POST['adminPass']); 77 | 78 | $query = "INSERT INTO users (email, password) VALUES (:email, :Password)"; 79 | $stmt = $dbh->prepare($query); 80 | $stmt->bindValue(":email", $_POST['adminEmail']); 81 | $stmt->bindValue(":Password", $hash); 82 | $stmt->execute(); 83 | 84 | echo "

Success! You can now delete the install folder, please note that you must delete it before you can use the site!

"; 85 | } catch(PDOException $e) { 86 | echo $e->getMessage(); 87 | } 88 | 89 | ?> 90 | -------------------------------------------------------------------------------- /install/installMethods.php-tmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ToxicRevolution/CSGORankMeWeb/4cbf9aace0f7837757338a4cc91a6a7d5a6f1750/install/installMethods.php-tmp -------------------------------------------------------------------------------- /js/DataTable/dataTables.bootstrap.js: -------------------------------------------------------------------------------- 1 | /*! DataTables Bootstrap 3 integration 2 | * ©2011-2015 SpryMedia Ltd - datatables.net/license 3 | */ 4 | 5 | /** 6 | * DataTables integration for Bootstrap 3. This requires Bootstrap 3 and 7 | * DataTables 1.10 or newer. 8 | * 9 | * This file sets the defaults and adds options to DataTables to style its 10 | * controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap 11 | * for further information. 12 | */ 13 | (function( factory ){ 14 | if ( typeof define === 'function' && define.amd ) { 15 | // AMD 16 | define( ['jquery', 'datatables.net'], function ( $ ) { 17 | return factory( $, window, document ); 18 | } ); 19 | } 20 | else if ( typeof exports === 'object' ) { 21 | // CommonJS 22 | module.exports = function (root, $) { 23 | if ( ! root ) { 24 | root = window; 25 | } 26 | 27 | if ( ! $ || ! $.fn.dataTable ) { 28 | // Require DataTables, which attaches to jQuery, including 29 | // jQuery if needed and have a $ property so we can access the 30 | // jQuery object that is used 31 | $ = require('datatables.net')(root, $).$; 32 | } 33 | 34 | return factory( $, root, root.document ); 35 | }; 36 | } 37 | else { 38 | // Browser 39 | factory( jQuery, window, document ); 40 | } 41 | }(function( $, window, document, undefined ) { 42 | 'use strict'; 43 | var DataTable = $.fn.dataTable; 44 | 45 | 46 | /* Set the defaults for DataTables initialisation */ 47 | $.extend( true, DataTable.defaults, { 48 | dom: 49 | "<'row'<'col-sm-6'l><'col-sm-6'f>>" + 50 | "<'row'<'col-sm-12'tr>>" + 51 | "<'row'<'col-sm-5'i><'col-sm-7'p>>", 52 | renderer: 'bootstrap' 53 | } ); 54 | 55 | 56 | /* Default class modification */ 57 | $.extend( DataTable.ext.classes, { 58 | sWrapper: "dataTables_wrapper form-inline dt-bootstrap", 59 | sFilterInput: "form-control input-sm", 60 | sLengthSelect: "form-control input-sm", 61 | sProcessing: "dataTables_processing panel panel-default" 62 | } ); 63 | 64 | 65 | /* Bootstrap paging button renderer */ 66 | DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) { 67 | var api = new DataTable.Api( settings ); 68 | var classes = settings.oClasses; 69 | var lang = settings.oLanguage.oPaginate; 70 | var aria = settings.oLanguage.oAria.paginate || {}; 71 | var btnDisplay, btnClass, counter=0; 72 | 73 | var attach = function( container, buttons ) { 74 | var i, ien, node, button; 75 | var clickHandler = function ( e ) { 76 | e.preventDefault(); 77 | if ( !$(e.currentTarget).hasClass('disabled') && api.page() != e.data.action ) { 78 | api.page( e.data.action ).draw( 'page' ); 79 | } 80 | }; 81 | 82 | for ( i=0, ien=buttons.length ; i 0 ? 101 | '' : ' disabled'); 102 | break; 103 | 104 | case 'previous': 105 | btnDisplay = lang.sPrevious; 106 | btnClass = button + (page > 0 ? 107 | '' : ' disabled'); 108 | break; 109 | 110 | case 'next': 111 | btnDisplay = lang.sNext; 112 | btnClass = button + (page < pages-1 ? 113 | '' : ' disabled'); 114 | break; 115 | 116 | case 'last': 117 | btnDisplay = lang.sLast; 118 | btnClass = button + (page < pages-1 ? 119 | '' : ' disabled'); 120 | break; 121 | 122 | default: 123 | btnDisplay = button + 1; 124 | btnClass = page === button ? 125 | 'active' : ''; 126 | break; 127 | } 128 | 129 | if ( btnDisplay ) { 130 | node = $('
  • ', { 131 | 'class': classes.sPageButton+' '+btnClass, 132 | 'id': idx === 0 && typeof button === 'string' ? 133 | settings.sTableId +'_'+ button : 134 | null 135 | } ) 136 | .append( $('', { 137 | 'href': '#', 138 | 'aria-controls': settings.sTableId, 139 | 'aria-label': aria[ button ], 140 | 'data-dt-idx': counter, 141 | 'tabindex': settings.iTabIndex 142 | } ) 143 | .html( btnDisplay ) 144 | ) 145 | .appendTo( container ); 146 | 147 | settings.oApi._fnBindAction( 148 | node, {action: button}, clickHandler 149 | ); 150 | 151 | counter++; 152 | } 153 | } 154 | } 155 | }; 156 | 157 | // IE9 throws an 'unknown error' if document.activeElement is used 158 | // inside an iframe or frame. 159 | var activeEl; 160 | 161 | try { 162 | // Because this approach is destroying and recreating the paging 163 | // elements, focus is lost on the select button which is bad for 164 | // accessibility. So we want to restore focus once the draw has 165 | // completed 166 | activeEl = $(host).find(document.activeElement).data('dt-idx'); 167 | } 168 | catch (e) {} 169 | 170 | attach( 171 | $(host).empty().html('