├── LICENSE ├── README.md ├── SQL UPDATES ├── old updates │ ├── 18.06.2017 - Licence key - mail update │ │ └── import_me.sql │ ├── 19.06.2017 - Product category │ │ └── import me.sql │ ├── 23.06.2017 - Steam Group Rewards │ │ └── import me.sql │ ├── 27.06.2017 - FAQ Update │ │ └── import me.sql │ ├── 30.06.2017 - Navbar rewrite update │ │ └── import me.sql │ ├── INVENTORY VALUE UPDATE │ │ └── import me.sql │ ├── MEMBERLIST - BAN UPDATE │ │ └── IMPORT ME.sql │ ├── NAVBAR DROPDOWN UPDATE │ │ └── IMPORT ME.SQL │ ├── NEWS SYSTEM │ │ └── import me 15.06.2017.sql │ ├── PRODUCT ORDER UPDATE │ │ └── product_order.sql │ ├── REWARDS UPDATE │ │ └── reward_update.sql │ ├── STEAM LOGIN │ │ └── IMPORT ME.SQL │ ├── SUPPORT CENTER UPDATE │ │ └── support_center_sql.sql │ ├── THEME UPDATE │ │ └── IMPORT ME.sql │ ├── TOKEN HISTORY │ │ └── import 16.06.2017.sql │ ├── TOKEN UPDATE │ │ └── IMPORT ME.SQL │ └── TRACKING UPDATE │ │ └── import me 04.06.2017.sql ├── version 1.4 - 02.07.2017 │ └── import.sql ├── version 1.4.1 - 02.07.2017 │ └── import.sql ├── version 1.4.2 - 07.07.2017 │ └── import me.sql ├── version 1.4.3 - 07.07.2017 │ └── import me.sql ├── version 1.4.4 - 12.07.2017 │ └── import.sql ├── version 1.4.5 - 19.07.2017 │ └── import.sql ├── version 1.4.6 - 27.07.2017 │ └── import me.sql ├── version 1.4.7 - 17.09.2017 │ └── import me.sql └── version 1.5 - 15.11.2017 │ └── import me.sql ├── server_files ├── accounts_commend │ └── accounts_1.txt ├── accounts_report │ └── accounts_1.txt ├── commend.js ├── npm-debug.log ├── package.json ├── protos │ ├── base_gcmessages.proto │ ├── cstrike15_gcmessages.proto │ ├── engine_gcmessages.proto │ ├── gcsdk_gcmessages.proto │ ├── protos.js │ ├── steammessages.proto │ └── updater.js ├── report.js └── sentry │ ├── README.txt │ ├── package.json │ └── steam_sentry.js └── web_files ├── account.php ├── admin ├── configuration.php ├── contact.php ├── faq.php ├── history.php ├── home.php ├── inc │ ├── db.php │ ├── footer.php │ ├── functions.php │ ├── graph_commend.php │ ├── graph_report.php │ └── header.php ├── index.php ├── language.php ├── mass_token.php ├── memberlist.php ├── nav.php ├── news.php ├── referral.php ├── rewards.php ├── sell.php ├── sell_categories.php ├── support.php ├── support_category.php ├── theme.php ├── token.php └── whitelist.php ├── commend.php ├── commended.php ├── contact.php ├── converter.php ├── css ├── cerulean │ └── bootstrap.min.css ├── cosmo │ └── bootstrap.min.css ├── cyborg │ └── bootstrap.min.css ├── darkly │ └── bootstrap.min.css ├── default │ ├── bootstrap.css │ └── bootstrap.min.css ├── flatly │ └── bootstrap.min.css ├── journal │ └── bootstrap.min.css ├── lumen │ └── bootstrap.min.css ├── paper │ └── bootstrap.min.css ├── readable │ └── bootstrap.min.css ├── sandstone │ └── bootstrap.min.css ├── simplex │ └── bootstrap.min.css ├── slate │ └── bootstrap.min.css ├── solar │ └── bootstrap.min.css ├── spacelab │ └── bootstrap.min.css ├── superhero │ └── bootstrap.min.css ├── united │ └── bootstrap.min.css ├── wbbtheme.css └── yeti │ └── bootstrap.min.css ├── faq.php ├── fonts ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.svg ├── glyphicons-halflings-regular.ttf ├── glyphicons-halflings-regular.woff └── glyphicons-halflings-regular.woff2 ├── img ├── empty_icon.png └── lang │ ├── en.png │ └── fr.png ├── inc ├── api_mail.php ├── commend_log.php ├── config.php.default ├── db.php ├── do_commend.php ├── do_report.php ├── do_whitelist.php ├── footer.php ├── functions.php ├── header.php ├── home_last.php ├── jbbcode │ ├── CodeDefinition.php │ ├── CodeDefinitionBuilder.php │ ├── CodeDefinitionSet.php │ ├── DefaultCodeDefinitionSet.php │ ├── DocumentElement.php │ ├── ElementNode.php │ ├── InputValidator.php │ ├── Node.php │ ├── NodeVisitor.php │ ├── Parser.php │ ├── ParserException.php │ ├── TextNode.php │ ├── Tokenizer.php │ ├── examples │ │ ├── 1-GettingStarted.php │ │ ├── 2-ClosingUnclosedTags.php │ │ ├── 3-MarkuplessText.php │ │ ├── 4-CreatingNewCodes.php │ │ ├── SmileyVisitorTest.php │ │ └── TagCountingVisitorTest.php │ ├── tests │ │ ├── BBCodeToBBCodeTest.php │ │ ├── BBCodeToTextTest.php │ │ ├── DefaultCodesTest.php │ │ ├── HTMLSafeTest.php │ │ ├── NestLimitTest.php │ │ ├── ParseContentTest.php │ │ ├── ParsingEdgeCaseTest.php │ │ ├── SimpleEvaluationTest.php │ │ ├── TokenizerTest.php │ │ └── ValidatorTest.php │ ├── validators │ │ ├── CssColorValidator.php │ │ └── UrlValidator.php │ └── visitors │ │ ├── HTMLSafeVisitor.php │ │ ├── NestLimitVisitor.php │ │ ├── SmileyVisitor.php │ │ └── TagCountingVisitor.php ├── language.php ├── report_log.php ├── reported_checker.php ├── rewards │ └── rewards_checker_tag.php ├── steam_login.php ├── steamauth │ ├── SteamConfig.php │ ├── openid.php │ ├── steamauth.php │ └── userInfo.php ├── timer_commendbot.php └── timer_reportbot.php ├── index.php ├── install ├── config.php ├── config_2.php ├── db.sql ├── done.php ├── index.php ├── install.php └── install_db.php ├── js ├── bootstrap.js ├── bootstrap.min.js ├── holder.js ├── jquery.js ├── jquery.min.js └── jquery.wysibb.js ├── lang ├── README ├── en.php └── fr.php ├── login.php ├── products.php ├── referral.php ├── register.php ├── report.php ├── reported.php ├── rewards.php ├── support.php ├── tracking.php ├── update.php ├── update ├── index.php └── update.php ├── viewticket.php ├── whitelist.php └── whitelisted.php /README.md: -------------------------------------------------------------------------------- 1 | # I will not provide any help, so don't bother opening an issue because it will be ignored. 2 | 3 | 4 | # Recommanded specs: 5 | 6 | Debian 8 7 | 2GB Ram 8 | 20GB HDD/SSD 9 | 10 | 11 | # Commands list: 12 | 13 | 1- apt-get update && apt-get upgrade 14 | 15 | 16 | 2- apt-get install apache2 mysql-server php5 phpmyadmin curl 17 | 18 | 19 | 3- ln -s /usr/share/phpmyadmin /var/www/html 20 | 21 | 22 | 4- curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh 23 | 24 | 25 | 5- apt-get install nodejs 26 | 27 | 28 | 6- mkdir /var/report-bot 29 | 30 | 31 | 7- cd /var/report-bot 32 | 33 | 34 | 8- After having the server_files uploaded into this directory, run this 35 | 36 | 37 | 9- chmod -R 777 * && npm install 38 | 39 | 40 | 10-crontab -e (then enter the following) 41 | 42 | 43 | */1 * * * * /usr/bin/php /var/www/html/inc/reported_checker.php 44 | 45 | 46 | 0 */6 * * * cd /var/www/html/inc/rewards && /usr/bin/php rewards_checker_tag.php 47 | 48 | -------------------------------------------------------------------------------- /SQL UPDATES/old updates/18.06.2017 - Licence key - mail update/import_me.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `users` ADD `email` VARCHAR(255) NULL AFTER `steamid`, ADD `email_subscribed` BOOLEAN NOT NULL AFTER `email`; -------------------------------------------------------------------------------- /SQL UPDATES/old updates/19.06.2017 - Product category/import me.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.6.4 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Client : 127.0.0.1 6 | -- Généré le : Lun 19 Juin 2017 à 11:44 7 | -- Version du serveur : 5.7.14 8 | -- Version de PHP : 5.6.25 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8mb4 */; 18 | 19 | -- 20 | -- Base de données : `report_bot` 21 | -- 22 | 23 | -- -------------------------------------------------------- 24 | 25 | -- 26 | -- Structure de la table `products_categories` 27 | -- 28 | 29 | CREATE TABLE `products_categories` ( 30 | `id` int(11) NOT NULL, 31 | `order_id` int(11) DEFAULT NULL, 32 | `name` varchar(255) NOT NULL, 33 | `icon` varchar(255) NOT NULL 34 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 35 | 36 | -- 37 | -- Index pour les tables exportées 38 | -- 39 | 40 | -- 41 | -- Index pour la table `products_categories` 42 | -- 43 | ALTER TABLE `products_categories` 44 | ADD PRIMARY KEY (`id`); 45 | 46 | -- 47 | -- AUTO_INCREMENT pour les tables exportées 48 | -- 49 | 50 | -- 51 | -- AUTO_INCREMENT pour la table `products_categories` 52 | -- 53 | ALTER TABLE `products_categories` 54 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; 55 | 56 | ALTER TABLE `products` ADD `category_id` INT NULL AFTER `id`; 57 | 58 | 59 | ALTER TABLE `products` ADD `category_id` INT NULL AFTER `id`; 60 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 61 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 62 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -------------------------------------------------------------------------------- /SQL UPDATES/old updates/23.06.2017 - Steam Group Rewards/import me.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `rewards_config` ADD `steamgroup_url` VARCHAR(255) NULL AFTER `pointsper_commend`; 2 | ALTER TABLE `rewards_config` ADD `steamgroup_points` FLOAT NOT NULL DEFAULT '0' AFTER `steamgroup_url`; 3 | ALTER TABLE `rewards_users` ADD `uip` VARCHAR(255) NULL DEFAULT NULL AFTER `uid`; 4 | ALTER TABLE `rewards_users` ADD `joined_steamgroup` BOOLEAN NOT NULL DEFAULT FALSE AFTER `points`; -------------------------------------------------------------------------------- /SQL UPDATES/old updates/27.06.2017 - FAQ Update/import me.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.6.4 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Client : 127.0.0.1 6 | -- Généré le : Mar 27 Juin 2017 à 09:49 7 | -- Version du serveur : 5.7.14 8 | -- Version de PHP : 5.6.25 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8mb4 */; 18 | 19 | -- 20 | -- Base de données : `report_bot` 21 | -- 22 | 23 | -- -------------------------------------------------------- 24 | 25 | -- 26 | -- Structure de la table `faq` 27 | -- 28 | 29 | CREATE TABLE `faq` ( 30 | `id` int(11) NOT NULL, 31 | `question` varchar(255) NOT NULL, 32 | `answer` longtext NOT NULL, 33 | `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 34 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 35 | 36 | -- 37 | -- Index pour les tables exportées 38 | -- 39 | 40 | -- 41 | -- Index pour la table `faq` 42 | -- 43 | ALTER TABLE `faq` 44 | ADD PRIMARY KEY (`id`); 45 | 46 | -- 47 | -- AUTO_INCREMENT pour les tables exportées 48 | -- 49 | 50 | -- 51 | -- AUTO_INCREMENT pour la table `faq` 52 | -- 53 | ALTER TABLE `faq` 54 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; 55 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 56 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 57 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 58 | -------------------------------------------------------------------------------- /SQL UPDATES/old updates/30.06.2017 - Navbar rewrite update/import me.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS nav_tabs; 2 | CREATE TABLE `navbar` ( 3 | `id` int(11) NOT NULL, 4 | `parentid` int(11) NOT NULL DEFAULT '0', 5 | `display_order` varchar(255) NOT NULL DEFAULT '1', 6 | `type` varchar(255) NOT NULL DEFAULT 'item', 7 | `name` varchar(255) NOT NULL, 8 | `link` varchar(255) NOT NULL DEFAULT '#', 9 | `text_color` varchar(255) NOT NULL DEFAULT 'white', 10 | `access_level` varchar(255) NOT NULL 11 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 12 | 13 | -- 14 | -- Contenu de la table `navbar` 15 | -- 16 | 17 | INSERT INTO `navbar` (`id`, `parentid`, `display_order`, `type`, `name`, `link`, `text_color`, `access_level`) VALUES 18 | (1, 0, '1', 'item', 'Home', 'index.php', 'white', 'all'), 19 | (2, 0, '2', 'dropdown_parent', 'Action', '', 'white', 'all'), 20 | (3, 2, '1', 'item', 'Report', 'report.php', 'white', 'all'), 21 | (4, 2, '2', 'item', 'Commend', 'commend.php', 'white', 'all'), 22 | (5, 0, '3', 'dropdown_parent', 'Tools', '', 'white', 'all'), 23 | (6, 5, '2', 'item', 'SteamID Converter', 'converter.php', 'white', 'all'), 24 | (7, 5, '2', 'item', 'Whitelist', 'whitelist.php', 'white', 'all'), 25 | (8, 0, '4', 'dropdown_parent', 'Lists', '', 'white', 'all'), 26 | (9, 8, '1', 'item', 'Banned Players', 'banned.php', 'white', 'all'), 27 | (10, 8, '2', 'item', 'Whitelisted', 'whitelisted.php', 'white', 'all'), 28 | (11, 0, '5', 'dropdown_parent', 'Login / Register', '', 'white', 'non_logged'), 29 | (12, 11, '', 'item', 'Login', 'login.php', 'white', 'all'), 30 | (13, 11, '3', 'item', 'Register', 'register.php', 'white', 'all'), 31 | (14, 0, '6', 'dropdown_parent', 'My Account', '', 'white', 'logged'), 32 | (15, 14, '', 'item', 'Dashboard', 'account.php', 'white', 'all'), 33 | (16, 14, '', 'item', 'Rewards', 'rewards.php', 'white', 'all'), 34 | (17, 14, '', 'item', 'Logout', '?logout', 'white', 'all'), 35 | (18, 0, '7', 'item', 'FAQ', 'faq.php', 'red', 'all'), 36 | (19, 0, '8', 'item', 'Admin', 'admin', 'white', 'admin'); 37 | 38 | -- 39 | -- Index pour les tables exportées 40 | -- 41 | 42 | -- 43 | -- Index pour la table `navbar` 44 | -- 45 | ALTER TABLE `navbar` 46 | ADD PRIMARY KEY (`id`); 47 | 48 | -- 49 | -- AUTO_INCREMENT pour les tables exportées 50 | -- 51 | 52 | -- 53 | -- AUTO_INCREMENT pour la table `navbar` 54 | -- 55 | ALTER TABLE `navbar` 56 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20; 57 | -------------------------------------------------------------------------------- /SQL UPDATES/old updates/INVENTORY VALUE UPDATE/import me.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `reported_list` ADD `inventory_value` VARCHAR(255) NOT NULL AFTER `steamid`; 2 | UPDATE `reported_list` SET `inventory_value` = 'Unknown'; -------------------------------------------------------------------------------- /SQL UPDATES/old updates/MEMBERLIST - BAN UPDATE/IMPORT ME.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.6.4 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Client : 127.0.0.1 6 | -- Généré le : Ven 26 Mai 2017 à 20:54 7 | -- Version du serveur : 5.7.14 8 | -- Version de PHP : 5.6.25 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8mb4 */; 18 | 19 | 20 | CREATE TABLE `banned_users` ( 21 | `id` int(11) NOT NULL, 22 | `uid` int(11) NOT NULL, 23 | `ip` varchar(255) NOT NULL, 24 | `reason` varchar(255) DEFAULT NULL, 25 | `expiration` date NOT NULL 26 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 27 | 28 | ALTER TABLE `banned_users` 29 | ADD PRIMARY KEY (`id`); 30 | 31 | DROP TABLE IF EXISTS banned; 32 | ALTER TABLE `users` ADD `ip` VARCHAR(255) NULL AFTER `password`; 33 | 34 | 35 | 36 | -- 37 | -- AUTO_INCREMENT pour les tables exportées 38 | -- 39 | 40 | -- 41 | -- AUTO_INCREMENT pour la table `banned_users` 42 | -- 43 | ALTER TABLE `banned_users` 44 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; 45 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 46 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 47 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 48 | -------------------------------------------------------------------------------- /SQL UPDATES/old updates/NAVBAR DROPDOWN UPDATE/IMPORT ME.SQL: -------------------------------------------------------------------------------- 1 | ALTER TABLE `nav_tabs` ADD `is_dropdown` BOOLEAN NULL AFTER `nav_order`; 2 | ALTER TABLE `nav_tabs` ADD `is_dropdown_parent` BOOLEAN NULL AFTER `is_dropdown`; 3 | ALTER TABLE `nav_tabs` ADD `is_dropdown_item` BOOLEAN NULL AFTER `is_dropdown_parent`; 4 | ALTER TABLE `nav_tabs` ADD `dropdown_parentid` INT(11) NULL AFTER `is_dropdown_item`; 5 | UPDATE `nav_tabs` SET `is_dropdown` = 0, `is_dropdown_item` = 0, `dropdown_parentid` = 0, `is_dropdown_parent` = 0; 6 | -------------------------------------------------------------------------------- /SQL UPDATES/old updates/NEWS SYSTEM/import me 15.06.2017.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.6.4 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Client : 127.0.0.1 6 | -- Généré le : Jeu 15 Juin 2017 à 14:18 7 | -- Version du serveur : 5.7.14 8 | -- Version de PHP : 5.6.25 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8mb4 */; 18 | 19 | -- 20 | -- Base de données : `report_bot` 21 | -- 22 | 23 | -- -------------------------------------------------------- 24 | 25 | -- 26 | -- Structure de la table `news` 27 | -- 28 | 29 | CREATE TABLE `news` ( 30 | `id` int(11) NOT NULL, 31 | `title` varchar(255) NOT NULL, 32 | `message` longtext NOT NULL, 33 | `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 34 | `addedby_uid` int(11) NOT NULL 35 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 36 | 37 | -- 38 | -- Index pour les tables exportées 39 | -- 40 | 41 | -- 42 | -- Index pour la table `news` 43 | -- 44 | ALTER TABLE `news` 45 | ADD PRIMARY KEY (`id`); 46 | 47 | -- 48 | -- AUTO_INCREMENT pour les tables exportées 49 | -- 50 | 51 | -- 52 | -- AUTO_INCREMENT pour la table `news` 53 | -- 54 | ALTER TABLE `news` 55 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; 56 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 57 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 58 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -------------------------------------------------------------------------------- /SQL UPDATES/old updates/PRODUCT ORDER UPDATE/product_order.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `products` ADD `product_order` INT NULL AFTER `id`; -------------------------------------------------------------------------------- /SQL UPDATES/old updates/REWARDS UPDATE/reward_update.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.6.4 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Client : 127.0.0.1 6 | -- Généré le : Lun 05 Juin 2017 à 09:02 7 | -- Version du serveur : 5.7.14 8 | -- Version de PHP : 5.6.25 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8mb4 */; 18 | 19 | -- 20 | -- Base de données : `report_bot` 21 | -- 22 | 23 | -- -------------------------------------------------------- 24 | 25 | -- 26 | -- Structure de la table `rewards_config` 27 | -- 28 | 29 | CREATE TABLE `rewards_config` ( 30 | `id` int(11) NOT NULL, 31 | `tag` varchar(255) NOT NULL, 32 | `tag_minconsecutivedays` int(11) NOT NULL DEFAULT '0', 33 | `tag_pointsperday` float NOT NULL DEFAULT '0', 34 | `pointsper_report` float NOT NULL DEFAULT '0', 35 | `pointsper_commend` float DEFAULT '0' 36 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 37 | 38 | -- 39 | -- Contenu de la table `rewards_config` 40 | -- 41 | 42 | INSERT INTO `rewards_config` (`id`, `tag`, `tag_minconsecutivedays`, `tag_pointsperday`, `pointsper_report`, `pointsper_commend`) VALUES 43 | (1, 'Your Tag', 5, 1, 0.05, 0.5); 44 | 45 | -- -------------------------------------------------------- 46 | 47 | -- 48 | -- Structure de la table `rewards_history` 49 | -- 50 | 51 | CREATE TABLE `rewards_history` ( 52 | `id` int(11) NOT NULL, 53 | `uid` int(11) NOT NULL, 54 | `reward_id` int(11) NOT NULL, 55 | `generated_token` varchar(255) DEFAULT NULL, 56 | `cost` int(11) DEFAULT NULL, 57 | `uses` int(11) DEFAULT NULL, 58 | `type` varchar(255) NOT NULL, 59 | `description` longtext, 60 | `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 61 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 62 | 63 | -- -------------------------------------------------------- 64 | 65 | -- 66 | -- Structure de la table `rewards_list` 67 | -- 68 | 69 | CREATE TABLE `rewards_list` ( 70 | `id` int(11) NOT NULL, 71 | `points_cost` int(11) NOT NULL DEFAULT '1', 72 | `reward_type` varchar(255) NOT NULL, 73 | `reward_uses` int(11) NOT NULL, 74 | `description` longtext NOT NULL 75 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 76 | 77 | -- -------------------------------------------------------- 78 | 79 | -- 80 | -- Structure de la table `rewards_users` 81 | -- 82 | 83 | CREATE TABLE `rewards_users` ( 84 | `id` int(11) NOT NULL, 85 | `uid` int(11) NOT NULL, 86 | `points` float NOT NULL DEFAULT '0', 87 | `tag_datebegin` date NOT NULL, 88 | `tag_consecutivedays` int(11) NOT NULL DEFAULT '0', 89 | `enable_notification` int(11) NOT NULL DEFAULT '1' 90 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 91 | 92 | -- 93 | -- Index pour les tables exportées 94 | -- 95 | 96 | -- 97 | -- Index pour la table `rewards_config` 98 | -- 99 | ALTER TABLE `rewards_config` 100 | ADD PRIMARY KEY (`id`); 101 | 102 | -- 103 | -- Index pour la table `rewards_history` 104 | -- 105 | ALTER TABLE `rewards_history` 106 | ADD PRIMARY KEY (`id`); 107 | 108 | -- 109 | -- Index pour la table `rewards_list` 110 | -- 111 | ALTER TABLE `rewards_list` 112 | ADD PRIMARY KEY (`id`); 113 | 114 | -- 115 | -- Index pour la table `rewards_users` 116 | -- 117 | ALTER TABLE `rewards_users` 118 | ADD PRIMARY KEY (`id`); 119 | 120 | -- 121 | -- AUTO_INCREMENT pour les tables exportées 122 | -- 123 | 124 | -- 125 | -- AUTO_INCREMENT pour la table `rewards_config` 126 | -- 127 | ALTER TABLE `rewards_config` 128 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; 129 | -- 130 | -- AUTO_INCREMENT pour la table `rewards_history` 131 | -- 132 | ALTER TABLE `rewards_history` 133 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31; 134 | -- 135 | -- AUTO_INCREMENT pour la table `rewards_list` 136 | -- 137 | ALTER TABLE `rewards_list` 138 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; 139 | -- 140 | -- AUTO_INCREMENT pour la table `rewards_users` 141 | -- 142 | ALTER TABLE `rewards_users` 143 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; 144 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 145 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 146 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -------------------------------------------------------------------------------- /SQL UPDATES/old updates/STEAM LOGIN/IMPORT ME.SQL: -------------------------------------------------------------------------------- 1 | ALTER TABLE `users` ADD `steamid` VARCHAR(17) NULL AFTER `password`; 2 | -------------------------------------------------------------------------------- /SQL UPDATES/old updates/SUPPORT CENTER UPDATE/support_center_sql.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Weeeishy/CSGO-ReportBot-WebPanel/96e401178a474d3a74c5b8bd2ecb6c1670e0a1fd/SQL UPDATES/old updates/SUPPORT CENTER UPDATE/support_center_sql.sql -------------------------------------------------------------------------------- /SQL UPDATES/old updates/THEME UPDATE/IMPORT ME.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Weeeishy/CSGO-ReportBot-WebPanel/96e401178a474d3a74c5b8bd2ecb6c1670e0a1fd/SQL UPDATES/old updates/THEME UPDATE/IMPORT ME.sql -------------------------------------------------------------------------------- /SQL UPDATES/old updates/TOKEN HISTORY/import 16.06.2017.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.6.4 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Client : 127.0.0.1 6 | -- Généré le : Jeu 15 Juin 2017 à 23:44 7 | -- Version du serveur : 5.7.14 8 | -- Version de PHP : 5.6.25 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8mb4 */; 18 | 19 | -- 20 | -- Base de données : `report_bot` 21 | -- 22 | 23 | -- -------------------------------------------------------- 24 | 25 | -- 26 | -- Structure de la table `tokens_activation` 27 | -- 28 | 29 | CREATE TABLE `tokens_activation` ( 30 | `id` int(11) NOT NULL, 31 | `token` varchar(255) NOT NULL, 32 | `type` varchar(255) NOT NULL, 33 | `uid` int(11) DEFAULT NULL, 34 | `uip` varchar(255) NOT NULL, 35 | `date` timestamp NOT NULL 36 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 37 | 38 | -- 39 | -- Index pour les tables exportées 40 | -- 41 | 42 | -- 43 | -- Index pour la table `tokens_activation` 44 | -- 45 | ALTER TABLE `tokens_activation` 46 | ADD PRIMARY KEY (`id`); 47 | 48 | -- 49 | -- AUTO_INCREMENT pour les tables exportées 50 | -- 51 | 52 | -- 53 | -- AUTO_INCREMENT pour la table `tokens_activation` 54 | -- 55 | ALTER TABLE `tokens_activation` 56 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; 57 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 58 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 59 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -------------------------------------------------------------------------------- /SQL UPDATES/old updates/TOKEN UPDATE/IMPORT ME.SQL: -------------------------------------------------------------------------------- 1 | ALTER TABLE `tokens` ADD `token_type` VARCHAR(255) NULL AFTER `token_use`; 2 | UPDATE `tokens` SET `token_type` = "report"; -------------------------------------------------------------------------------- /SQL UPDATES/old updates/TRACKING UPDATE/import me 04.06.2017.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `commended_list` ADD `commendedby_token` VARCHAR(255) NULL AFTER `commendedby_userid`; 2 | ALTER TABLE `reported_list` ADD `reportedby_token` VARCHAR(255) NULL AFTER `reportedby_userid`; -------------------------------------------------------------------------------- /SQL UPDATES/version 1.4 - 02.07.2017/import.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `config` ( 2 | `id` int(11) NOT NULL, 3 | `current_version` varchar(255) NOT NULL, 4 | `licence_key` varchar(255) NOT NULL, 5 | `steam_api_key` varchar(255) NOT NULL, 6 | `website_navtitle` varchar(255) NOT NULL, 7 | `website_title` varchar(255) NOT NULL, 8 | `captcha_secret_key` varchar(255) NOT NULL, 9 | `captcha_website_key` varchar(255) NOT NULL, 10 | `reportbot_number` int(11) NOT NULL, 11 | `commendbot_number` int(11) NOT NULL, 12 | `log_prefix` varchar(255) NOT NULL, 13 | `report_path` varchar(255) NOT NULL, 14 | `report_log_path` varchar(255) NOT NULL, 15 | `commend_path` varchar(255) NOT NULL, 16 | `commend_log_path` varchar(255) NOT NULL, 17 | `report_timer` int(11) NOT NULL, 18 | `commend_timer` int(11) NOT NULL 19 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 20 | 21 | -- 22 | -- Index pour les tables exportées 23 | -- 24 | 25 | -- 26 | -- Index pour la table `config` 27 | -- 28 | ALTER TABLE `config` 29 | ADD PRIMARY KEY (`id`); 30 | 31 | 32 | -- 33 | -- AUTO_INCREMENT pour la table `config` 34 | -- 35 | ALTER TABLE `config` 36 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; 37 | 38 | -------------------------------------------------------------------------------- /SQL UPDATES/version 1.4.1 - 02.07.2017/import.sql: -------------------------------------------------------------------------------- 1 | UPDATE `config` SET `current_version` = '1.4.1' WHERE `config`.`id` = 1; -------------------------------------------------------------------------------- /SQL UPDATES/version 1.4.2 - 07.07.2017/import me.sql: -------------------------------------------------------------------------------- 1 | UPDATE `config` SET `current_version` = '1.4.2'; -------------------------------------------------------------------------------- /SQL UPDATES/version 1.4.3 - 07.07.2017/import me.sql: -------------------------------------------------------------------------------- 1 | UPDATE `config` SET `current_version` = '1.4.3'; -------------------------------------------------------------------------------- /SQL UPDATES/version 1.4.4 - 12.07.2017/import.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `reported_list` ADD `ban_date` TIMESTAMP NULL DEFAULT NULL AFTER `vac`; 2 | UPDATE `config` SET `current_version` = '1.4.4'; -------------------------------------------------------------------------------- /SQL UPDATES/version 1.4.5 - 19.07.2017/import.sql: -------------------------------------------------------------------------------- 1 | UPDATE `config` SET `current_version` = '1.4.5'; -------------------------------------------------------------------------------- /SQL UPDATES/version 1.4.6 - 27.07.2017/import me.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `referral_codes` ( 2 | `id` int(11) NOT NULL, 3 | `uid` int(11) NOT NULL, 4 | `code` varchar(255) NOT NULL, 5 | `date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP 6 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 7 | 8 | ALTER TABLE `referral_codes` 9 | ADD PRIMARY KEY (`id`); 10 | 11 | ALTER TABLE `referral_codes` 12 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; 13 | 14 | 15 | CREATE TABLE `referral_users` ( 16 | `id` int(11) NOT NULL, 17 | `owner_userid` int(11) NOT NULL, 18 | `user_id` int(11) NOT NULL, 19 | `date` timestamp NOT NULL 20 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 21 | 22 | ALTER TABLE `referral_users` 23 | ADD PRIMARY KEY (`id`); 24 | 25 | ALTER TABLE `referral_users` 26 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; 27 | 28 | UPDATE `config` SET `current_version` = '1.4.6'; -------------------------------------------------------------------------------- /SQL UPDATES/version 1.4.7 - 17.09.2017/import me.sql: -------------------------------------------------------------------------------- 1 | UPDATE `config` SET `current_version` = '1.4.7'; -------------------------------------------------------------------------------- /SQL UPDATES/version 1.5 - 15.11.2017/import me.sql: -------------------------------------------------------------------------------- 1 | UPDATE `config` SET `current_version` = '1.5'; -------------------------------------------------------------------------------- /server_files/accounts_commend/accounts_1.txt: -------------------------------------------------------------------------------- 1 | username:password -------------------------------------------------------------------------------- /server_files/accounts_report/accounts_1.txt: -------------------------------------------------------------------------------- 1 | username:password -------------------------------------------------------------------------------- /server_files/npm-debug.log: -------------------------------------------------------------------------------- 1 | 0 info it worked if it ends with ok 2 | 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 3 | 2 info using npm@4.1.2 4 | 3 info using node@v7.5.0 5 | 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 6 | 5 info lifecycle csgo-reportbot-web@1.0.0~prestart: csgo-reportbot-web@1.0.0 7 | 6 silly lifecycle csgo-reportbot-web@1.0.0~prestart: no script for prestart, continuing 8 | 7 info lifecycle csgo-reportbot-web@1.0.0~start: csgo-reportbot-web@1.0.0 9 | 8 verbose lifecycle csgo-reportbot-web@1.0.0~start: unsafe-perm in lifecycle true 10 | 9 verbose lifecycle csgo-reportbot-web@1.0.0~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/var/report-bot/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 11 | 10 verbose lifecycle csgo-reportbot-web@1.0.0~start: CWD: /var/report-bot 12 | 11 silly lifecycle csgo-reportbot-web@1.0.0~start: Args: [ '-c', 'node bot.js' ] 13 | 12 silly lifecycle csgo-reportbot-web@1.0.0~start: Returned: code: 1 signal: null 14 | 13 info lifecycle csgo-reportbot-web@1.0.0~start: Failed to exec start script 15 | 14 verbose stack Error: csgo-reportbot-web@1.0.0 start: `node bot.js` 16 | 14 verbose stack Exit status 1 17 | 14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16) 18 | 14 verbose stack at emitTwo (events.js:106:13) 19 | 14 verbose stack at EventEmitter.emit (events.js:192:7) 20 | 14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14) 21 | 14 verbose stack at emitTwo (events.js:106:13) 22 | 14 verbose stack at ChildProcess.emit (events.js:192:7) 23 | 14 verbose stack at maybeClose (internal/child_process.js:890:16) 24 | 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 25 | 15 verbose pkgid csgo-reportbot-web@1.0.0 26 | 16 verbose cwd /var/report-bot 27 | 17 error Linux 3.2.0-4-amd64 28 | 18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 29 | 19 error node v7.5.0 30 | 20 error npm v4.1.2 31 | 21 error code ELIFECYCLE 32 | 22 error csgo-reportbot-web@1.0.0 start: `node bot.js` 33 | 22 error Exit status 1 34 | 23 error Failed at the csgo-reportbot-web@1.0.0 start script 'node bot.js'. 35 | 23 error Make sure you have the latest version of node.js and npm installed. 36 | 23 error If you do, this is most likely a problem with the csgo-reportbot-web package, 37 | 23 error not with npm itself. 38 | 23 error Tell the author that this fails on your system: 39 | 23 error node bot.js 40 | 23 error You can get information on how to open an issue for this project with: 41 | 23 error npm bugs csgo-reportbot-web 42 | 23 error Or if that isn't available, you can get their info via: 43 | 23 error npm owner ls csgo-reportbot-web 44 | 23 error There is likely additional logging output above. 45 | 24 verbose exit [ 1, true ] 46 | -------------------------------------------------------------------------------- /server_files/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "csgo-reportbot-web", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "bot.js", 6 | "dependencies": { 7 | "long": "^3.1.0", 8 | "protobufjs": "^5.0.1", 9 | "q": "^1.4.1", 10 | "readline-sync": "^1.4.4", 11 | "steam": "^1.4.0", 12 | "steamid": "^1.1.0" 13 | }, 14 | "devDependencies": {}, 15 | "scripts": { 16 | "update": "node ./protos/updater.js", 17 | "install": "npm run update", 18 | "start": "node bot.js" 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "Report-Bot-Web" 23 | }, 24 | "author": "askwrite, Radat.", 25 | "license": "ISC" 26 | } -------------------------------------------------------------------------------- /server_files/protos/engine_gcmessages.proto: -------------------------------------------------------------------------------- 1 | import "google/protobuf/descriptor.proto"; 2 | 3 | option cc_generic_services = false; 4 | 5 | message CEngineGotvSyncPacket { 6 | optional uint64 match_id = 1; 7 | optional uint32 instance_id = 2; 8 | optional uint32 signupfragment = 3; 9 | optional uint32 currentfragment = 4; 10 | optional float tickrate = 5; 11 | optional uint32 tick = 6; 12 | optional float rtdelay = 8; 13 | optional float rcvage = 9; 14 | optional float keyframe_interval = 10; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /server_files/protos/protos.js: -------------------------------------------------------------------------------- 1 | var Protobuf = require("protobufjs"); 2 | 3 | Protobuf.convertFieldsToCamelCase = true; 4 | 5 | var builder = Protobuf.newBuilder(); 6 | Protobuf.loadProtoFile(__dirname + "/base_gcmessages.proto", builder); 7 | Protobuf.loadProtoFile(__dirname + "/cstrike15_gcmessages.proto", builder); 8 | Protobuf.loadProtoFile(__dirname + "/gcsdk_gcmessages.proto", builder); 9 | 10 | module.exports = builder.build(); 11 | -------------------------------------------------------------------------------- /server_files/protos/updater.js: -------------------------------------------------------------------------------- 1 | var fs = require("fs"); 2 | var https = require("https"); 3 | 4 | var baseUrl = "https://raw.githubusercontent.com/SteamRE/SteamKit/master/Resources/Protobufs/csgo/"; 5 | var protos = [ 6 | "base_gcmessages.proto", 7 | "steammessages.proto", 8 | "cstrike15_gcmessages.proto", 9 | "gcsdk_gcmessages.proto", 10 | "engine_gcmessages.proto" 11 | ]; 12 | 13 | fs.readdir(__dirname, function(err, filenames) { 14 | if (err) { 15 | return err; 16 | } 17 | 18 | filenames.forEach(function(filename) { 19 | if (filename != "protos.js" && filename != "updater.js") { 20 | fs.unlinkSync(__dirname + "/" + filename); 21 | } 22 | }); 23 | 24 | protos.forEach(function(proto) { 25 | var file = fs.createWriteStream(__dirname + "/" + proto); 26 | https.get(baseUrl + proto, function(response) { 27 | response.pipe(file); 28 | }); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /server_files/sentry/README.txt: -------------------------------------------------------------------------------- 1 | How to use Sentrys? 2 | 3 | Steps: 4 | 5 | 1. 6 | npm install . | To install the related stuff. 7 | 8 | 2. 9 | node steam_sentry.js | Login and put the Steam Guard Code in and youre good to go 10 | 11 | 3. Copy the ACCOUNT_NAME.sentry in the folder above. So where the bot-report-web.js is. 12 | 13 | Done. Have Fun. 14 | -------------------------------------------------------------------------------- /server_files/sentry/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "csgo-reportbot-web", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "bot.js", 6 | "dependencies": { 7 | "long": "^3.1.0", 8 | "protobufjs": "^5.0.1", 9 | "q": "^1.4.1", 10 | "readline-sync": "^1.4.4", 11 | "steam": "0.6.8", 12 | "steamid": "^1.1.0" 13 | }, 14 | "devDependencies": {}, 15 | "repository": { 16 | "type": "git", 17 | "url": "Report-Bot-Web" 18 | }, 19 | "author": "askwrite, Radat.", 20 | "license": "ISC" 21 | } -------------------------------------------------------------------------------- /server_files/sentry/steam_sentry.js: -------------------------------------------------------------------------------- 1 | var username; 2 | var password; 3 | var steamCode; 4 | 5 | var Steam = require("steam"); 6 | var fs = require("fs"); 7 | var readline = require("readline"); 8 | 9 | var steam = new Steam.SteamClient(); 10 | 11 | var rl = readline.createInterface({ 12 | input: process.stdin, 13 | output: process.stdout 14 | }); 15 | 16 | rl.question("Username: ", function(answer) { 17 | username = answer; 18 | rl.question("Password: ", function(answer2) { 19 | password = answer2; 20 | rl.pause(); 21 | steam.logOn({ 22 | accountName: username, 23 | password: password 24 | }); 25 | }); 26 | }); 27 | 28 | steam.on("logOnResponse", function(result) { 29 | console.log("Logged in"); 30 | setTimeout (function() { 31 | process.exit(); 32 | }, 1000); 33 | }); 34 | 35 | steam.on("error", function(error) { 36 | if (error.cause == "logonFail") { 37 | if (error.eresult == 63) { 38 | rl.resume(); 39 | rl.question("Steam guard code: ", function(answer) { 40 | steamCode = answer; 41 | rl.close(); 42 | steam.logOn({ 43 | accountName: username, 44 | password: password, 45 | authCode: steamCode 46 | }); 47 | }); 48 | } else { 49 | console.log("Logon fail: " + error.eresult); 50 | }; 51 | }; 52 | }); 53 | 54 | steam.on('sentry', function(data) { 55 | var format = username + ".sentry"; 56 | fs.writeFileSync(format, data); 57 | console.log("Sentry file successfully saved!"); 58 | process.exit(); 59 | }); 60 | -------------------------------------------------------------------------------- /web_files/admin/contact.php: -------------------------------------------------------------------------------- 1 | query('SELECT steamid FROM contact'); 8 | $steamid_show = $req->fetch()->steamid; 9 | 10 | $req = $pdo->query('SELECT custom_message FROM contact'); 11 | $custom_show = $req->fetch()->custom_message; 12 | $custom_show = str_replace('
','',$custom_show); 13 | 14 | $custom = ""; 15 | 16 | if(isset($_POST['steam_url'])){ 17 | 18 | // We check if there is already something into contact table 19 | $req = $pdo->prepare('SELECT * FROM contact'); 20 | $req->execute(); 21 | if($req->rowCount() == 0){ 22 | $custom = nl2br(htmlentities($_POST['custom'])); 23 | $steam_url = htmlentities($_POST['steam_url']); 24 | 25 | if((strstr($steam_url, "http://steamcommunity.com/profiles/")) or (strstr($steam_url, "https://steamcommunity.com/profiles/")) or (strstr($steam_url, "http://steamcommunity.com/id/")) or (strstr($steam_url, "https://steamcommunity.com/id/"))){ 26 | 27 | $link = $steam_url.'?xml=1'; 28 | $xml = simplexml_load_file(rawurlencode($link)); 29 | $steamid = $xml->{'steamID64'}; 30 | 31 | $req = $pdo->prepare("INSERT INTO contact SET steamid = ?, custom_message = ?"); 32 | $req->execute([$steamid, $custom]); 33 | header("Location: contact.php"); 34 | exit(); 35 | 36 | }else{ 37 | // Invalid link 38 | } 39 | }else{ 40 | $custom = nl2br(htmlentities($_POST['custom'])); 41 | $steam_url = htmlentities($_POST['steam_url']); 42 | 43 | if((strstr($steam_url, "http://steamcommunity.com/profiles/")) or (strstr($steam_url, "https://steamcommunity.com/profiles/")) or (strstr($steam_url, "http://steamcommunity.com/id/")) or (strstr($steam_url, "https://steamcommunity.com/id/"))){ 44 | 45 | $link = $steam_url.'?xml=1'; 46 | $xml = simplexml_load_file(rawurlencode($link)); 47 | $steamid = $xml->{'steamID64'}; 48 | 49 | $req = $pdo->prepare("UPDATE contact SET steamid = ?, custom_message = ?"); 50 | $req->execute([$steamid, $custom]); 51 | header("Location: contact.php"); 52 | exit(); 53 | } 54 | } 55 | 56 | } 57 | require_once 'inc/header.php'; 58 | ?> 59 | 60 |

Contact

61 | 62 |
63 | 64 |
65 |
66 | 67 | 68 |
69 | 70 |
71 | 72 | 73 | 74 |
75 |
76 |
77 | 78 |
79 | 80 |
81 | 82 | 83 | -------------------------------------------------------------------------------- /web_files/admin/faq.php: -------------------------------------------------------------------------------- 1 | prepare("INSERT INTO faq SET question = ?, answer = ?"); 18 | $req->execute([$question, $answer]); 19 | 20 | $_SESSION['flash']['success'] = "Question added."; 21 | header("Location: faq.php"); 22 | exit(); 23 | } 24 | } 25 | } 26 | 27 | if(isset($_GET['del'])){ 28 | $id = htmlentities($_GET['del']); 29 | 30 | $req = $pdo->prepare("SELECT * FROM faq WHERE id = ?"); 31 | $req->execute([$id]); 32 | 33 | if($req->rowCount() == 0){ 34 | $_SESSION['flash']['danger'] = "ID Doesnt exist."; 35 | header("Location: faq.php"); 36 | exit(); 37 | } 38 | 39 | $req = $pdo->prepare("DELETE FROM faq WHERE id = ?"); 40 | $req->execute([$id]); 41 | 42 | $_SESSION['flash']['warning'] = "Question successfully deleted."; 43 | header("Location: faq.php"); 44 | exit(); 45 | } 46 | 47 | if(isset($_POST['edit_id'])){ 48 | $id = htmlentities($_POST['edit_id']); 49 | $question = htmlentities($_POST['edit_question']); 50 | $answer = nl2br(htmlentities($_POST['edit_answer'])); 51 | 52 | $req = $pdo->prepare("SELECT * FROM faq WHERE id = ?"); 53 | $req->execute([$id]); 54 | if($req->rowCount() == 0){ 55 | $_SESSION['flash']['danger'] = "ID Doesnt exist."; 56 | header("Location: faq.php"); 57 | exit(); 58 | } 59 | 60 | // id exist 61 | $req = $pdo->prepare("UPDATE faq SET question = ?, answer = ? WHERE id = ?"); 62 | $req->execute([$question, $answer, $id]); 63 | 64 | $_SESSION['flash']['success'] = "Question successfully updated."; 65 | header("Location: faq.php"); 66 | exit(); 67 | } 68 | 69 | require_once 'inc/header.php'; 70 | 71 | ?> 72 |

FAQ - Admin

73 |
74 | 75 |
76 |
77 |

Question list

78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | query("SELECT * FROM faq ORDER BY id ASC"); 90 | while($row = $req->fetch()) : ?> 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 |
IDQuestionAnswer
id ?>question ?>answer ?>
100 |
101 | 102 |
103 |

Add a Question

104 | 105 |
106 |
107 | 108 | 109 |
110 | 111 |
112 | 113 | 114 |
115 | 116 | 117 |
118 | 119 |
120 |
121 | 122 | 123 | 124 | 125 | 126 | query("SELECT * FROM faq"); 128 | while($row = $req->fetch()): ?> 129 | 160 | 161 | -------------------------------------------------------------------------------- /web_files/admin/history.php: -------------------------------------------------------------------------------- 1 | 8 | 9 |

Token history

10 |
11 |
12 |

Report

13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | query("SELECT * FROM tokens_activation WHERE type = 'report' ORDER BY id DESC"); 26 | while($row = $req->fetch()){ 27 | if(!empty($row->uid)){ 28 | $r = $pdo->query("SELECT * FROM users WHERE id = '$row->uid'"); 29 | $username = $r->fetch()->username; 30 | }else{ 31 | $username = "Unknown"; 32 | } 33 | ?> 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 45 |
IDTokenuser IPUserDate
id ?>token ?>uip ?>date ?>
46 |
47 | 48 |
49 |

Whitelist

50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | query("SELECT * FROM tokens_activation WHERE type = 'whitelist' ORDER BY id DESC"); 63 | while($row = $req->fetch()){ 64 | if(!empty($row->uid)){ 65 | $r = $pdo->query("SELECT * FROM users WHERE id = '$row->uid'"); 66 | $username = $r->fetch()->username; 67 | }else{ 68 | $username = "Unknown"; 69 | } 70 | ?> 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 81 | 82 |
IDTokenuser IPUserDate
id ?>token ?>uip ?>date ?>
83 |
84 | 85 |
86 |
87 |
88 | 89 |
90 |

Commend

91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | query("SELECT * FROM tokens_activation WHERE type = 'commend' ORDER BY id DESC"); 104 | while($row = $req->fetch()){ 105 | if(!empty($row->uid)){ 106 | $r = $pdo->query("SELECT * FROM users WHERE id = '$row->uid'"); 107 | $username = $r->fetch()->username; 108 | }else{ 109 | $username = "Unknown"; 110 | } 111 | ?> 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 122 | 123 |
IDTokenuser IPUserDate
id ?>token ?>uip ?>date ?>
124 |
125 | 126 |
127 |

Account

128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | query("SELECT * FROM tokens_activation WHERE type = 'account' ORDER BY id DESC"); 141 | while($row = $req->fetch()){ 142 | if(!empty($row->uid)){ 143 | $r = $pdo->query("SELECT * FROM users WHERE id = '$row->uid'"); 144 | $username = $r->fetch()->username; 145 | }else{ 146 | $username = "Unknown"; 147 | } 148 | ?> 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 159 | 160 |
IDTokenuser IPUserDate
id ?>token ?>uip ?>date ?>
161 |
162 |
163 | 164 | -------------------------------------------------------------------------------- /web_files/admin/inc/db.php: -------------------------------------------------------------------------------- 1 | setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 5 | $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ); -------------------------------------------------------------------------------- /web_files/admin/inc/footer.php: -------------------------------------------------------------------------------- 1 | 5 |
6 | 7 | 12 | 13 |
14 |

© 2017 - v
15 |

Language:

16 | prepare("SELECT * FROM language"); 18 | $req->execute(); 19 | $language_number = $req->rowCount(); 20 | $id = 0; 21 | while($row = $req->fetch()){ 22 | $id = $id + 1; 23 | if($id > 1){ 24 | echo ' | '; 25 | } 26 | echo ' 27 |
28 | 29 | 30 | 31 |
'; 32 | } 33 | 34 | 35 | ?> 36 | 37 |

38 |

Created with ♥ by Yellow

39 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | email)) : ?> 49 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /web_files/admin/inc/functions.php: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | prepare('SELECT id FROM commended_list WHERE datum LIKE ?'); 15 | $req->execute(["________" . $d . "%"]); 16 | ${'nb' . $i} = $req->rowCount(); 17 | $commended = $commended .",". ${'nb' . $i}; 18 | } 19 | 20 | 21 | 22 | $commended = "Array," . $commended; 23 | $commended = str_replace("Array,,","", $commended); 24 | $commend = "[" . $commended . "]"; 25 | ?> 26 | -------------------------------------------------------------------------------- /web_files/admin/inc/graph_report.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 | 6 | prepare('SELECT id FROM reported_list WHERE datum LIKE ?'); 19 | $req->execute(["_____".$month."_" . $d . "%"]); 20 | ${'nb' . $i} = $req->rowCount(); 21 | $reported = $reported .",". ${'nb' . $i}; 22 | } 23 | 24 | 25 | $banned = ''; 26 | for($i = 1; $i <= 31; $i++){ 27 | $d = $i; 28 | if($d < 10){ 29 | $d = '0'. $d; 30 | } 31 | 32 | $req = $pdo->prepare('SELECT * FROM reported_list WHERE (datum LIKE ?) AND (vac = "true" OR ow = "true")'); 33 | $req->execute(["_____".$month."_" . $d . "%"]); 34 | ${'nb_ban' . $i} = $req->rowCount(); 35 | $banned = $banned . ',' . ${'nb_ban' . $i}; 36 | 37 | } 38 | $banned = "Array," . $banned; 39 | $banned = str_replace("Array,,","", $banned); 40 | $ban = "[" . $banned . "]"; 41 | 42 | $reported = "Array,," . $reported; 43 | $reported = str_replace("Array,,,",'', $reported); 44 | $report = "[" . $reported . "]"; 45 | ?> 46 | -------------------------------------------------------------------------------- /web_files/admin/index.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 |
13 |

Administration

14 | 58 |
59 | 60 |
61 |

Graph

62 | 63 | 64 | 65 | 66 |
67 | 68 |
69 |
70 |
71 | 72 | -------------------------------------------------------------------------------- /web_files/admin/language.php: -------------------------------------------------------------------------------- 1 | prepare('SELECT * FROM language WHERE (language_name = ? OR lang_code = ? OR lang_icon = ?)'); 22 | $req->execute([htmlentities($_POST['language_name']), htmlentities($_POST['language_code']), htmlentities($_POST['language_icon'])]); 23 | $exist = $req->rowCount(); 24 | if($exist == 0){ 25 | // Now, we insert data into db 26 | $req = $pdo->prepare('INSERT INTO language SET language_name = ?, lang_code = ?, lang_icon = ?'); 27 | $req->execute([htmlentities($_POST['language_name']), htmlentities($_POST['language_code']), htmlentities($_POST['language_icon'])]); 28 | 29 | // data inserted 30 | $_SESSION['flash']['success'] = $language['admin_language_added_succes']; 31 | header("Location: language.php"); 32 | exit(); 33 | 34 | }else{ 35 | $_SESSION['flash']['danger'] = $language['admin_language_error_already_exist']; 36 | header("Location: language.php"); 37 | exit(); 38 | } 39 | 40 | 41 | }else{ 42 | $_SESSION['flash']['danger'] = $language['admin_language_error_no_icon']; 43 | header("Location: language.php"); 44 | exit(); 45 | } 46 | }else{ 47 | echo 'lang file doesnt exist'; 48 | $_SESSION['flash']['danger'] = $language['admin_language_error_no_lang_file']; 49 | header("Location: language.php"); 50 | exit(); 51 | } 52 | 53 | 54 | 55 | }else{ 56 | // empty name 57 | $_SESSION['flash']['danger'] = $language['admin_language_error_empty_name']; 58 | header("Location: language.php"); 59 | exit(); 60 | } 61 | }else{ 62 | // empty icon 63 | $_SESSION['flash']['danger'] = $language['admin_language_error_empty_icon']; 64 | header("Location: language.php"); 65 | exit(); 66 | } 67 | }else{ 68 | // empty language code 69 | $_SESSION['flash']['danger'] = $language['admin_language_error_empty_code']; 70 | header("Location: language.php"); 71 | exit(); 72 | } 73 | } // end add language 74 | 75 | if(isset($_POST['language_delete_id'])){ 76 | $req = $pdo->prepare('DELETE FROM language WHERE id = ?'); 77 | $req->execute([htmlentities($_POST['language_delete_id'])]); 78 | header("Location: language.php"); 79 | exit(); 80 | } 81 | 82 | require_once 'inc/header.php'; 83 | 84 | ?> 85 | 86 | 87 | 88 |
89 |

90 |
91 |

Language Manager

92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | query('SELECT * FROM language'); 106 | while($row = $req->fetch()){ 107 | echo ' 108 | 109 | 110 | 111 | 112 | 113 | 120 | '; 121 | 122 | } 123 | 124 | ?> 125 | 126 |
ID
'.$row->id.''.$row->language_name.''.$row->lang_code.''.$row->lang_icon.'.png | 114 |
115 | 116 | 117 | 118 |
119 |
127 |
128 |
129 | 130 |
131 |

132 |
133 |

134 |
135 |
136 | 137 | 138 |
139 | 140 |
141 | 142 | 143 |
144 | 145 |
146 | 147 | 148 |
149 | 150 | 151 |
152 |
153 |
154 | 155 | -------------------------------------------------------------------------------- /web_files/admin/mass_token.php: -------------------------------------------------------------------------------- 1 | prepare("INSERT INTO tokens SET token = :token, token_use = :token_use, token_type = :token_type, token_generation = CURRENT_TIMESTAMP"); 26 | $req->bindParam(':token', $token); 27 | $req->bindParam(':token_use', $token_use); 28 | $req->bindParam(':token_type', $token_type); 29 | $req->execute(); 30 | 31 | $token_list = $token_list . ', '. $token; 32 | } 33 | require_once 'inc/header.php'; 34 | $token_list = str_replace('START, ', '', $token_list); 35 | echo 'This is a text ready. Just past it into your selly.gg product.
'; 36 | echo 'Generated ' . $token_number . ' Tokens with ' . $token_use . ' use(s)'; 37 | echo '
' . $token_list . '
'; 38 | } 39 | require_once 'inc/header.php'; 40 | 41 | ?> 42 | 43 |

44 | 45 | 46 |
47 |

48 |
49 |
50 | 51 | 52 |
53 | 54 |
55 | 56 | 57 |
58 | 59 |
60 | 65 |
66 | 67 | 68 |
69 | 70 |
71 | 72 | 73 | 11 | 12 |
13 |

Referral - Admin

14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | query("SELECT * FROM referral_codes ORDER BY id ASC"); 28 | while($row = $req->fetch()) : 29 | 30 | $r = $pdo->query("SELECT * FROM users WHERE id = '$row->uid'"); 31 | $username = $r->fetch()->username; 32 | 33 | $r = $pdo->query("SELECT * FROM referral_users WHERE owner_userid = '$row->uid'"); 34 | $referral_numbers = $r->rowCount(); 35 | 36 | $token_used = "0"; 37 | while($g = $r->fetch()){ 38 | $q = $pdo->query("SELECT * FROM tokens_activation WHERE uid = '$g->user_id'"); 39 | $token_used = $token_used + $q->rowCount(); 40 | } 41 | 42 | ?> 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 52 | 53 |
#UsernameCodeNumber of referralNumber of purchased token by all refered users
id?>code?>
54 |
55 | 56 | prepare('SELECT * FROM themes WHERE theme_name = ?'); 12 | $req->execute([$theme]); 13 | 14 | if($req->rowCount() == 0){ 15 | // doesnt exist 16 | $_SESSION['flash']['danger'] = "Theme doesnt exist."; 17 | header("Location: theme.php"); 18 | exit(); 19 | } 20 | 21 | $req = $pdo->prepare('UPDATE themes SET use_this_theme = 0'); 22 | $req->execute(); 23 | 24 | $req = $pdo->prepare('UPDATE themes SET use_this_theme = 1 WHERE theme_name = ?'); 25 | $req->execute([$theme]); 26 | 27 | $_SESSION['flash']['success'] = "Theme changed successfully"; 28 | header("Location: theme.php"); 29 | exit(); 30 | 31 | } 32 | 33 | require_once 'inc/header.php'; 34 | ?> 35 | 36 |

Theme selector

37 | 38 |
39 |
40 |
41 | 42 | 53 |
54 | 55 |
56 |
57 | 58 | -------------------------------------------------------------------------------- /web_files/commended.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |

Commended players

7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | prepare('SELECT * FROM commended_list'); 20 | $req->execute(); 21 | $result = $req->fetchall(); 22 | 23 | foreach($result as $row){ 24 | echo " 25 | 26 | 27 | 28 | 29 | 30 | 31 | "; 32 | } 33 | 34 | ?> 35 | 36 |
IDSteamIDDateLogs
$row->id$row->steamid$row->datumCommend log
37 | 38 | 39 | -------------------------------------------------------------------------------- /web_files/contact.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | query('SELECT steamid FROM contact'); 9 | if($req->rowCount() == 0){ 10 | $steamid_show = ""; 11 | }else{ 12 | $steamid_show = $req->fetch()->steamid; 13 | } 14 | 15 | $req = $pdo->query('SELECT custom_message FROM contact'); 16 | if($req->rowCount() == 0){ 17 | $custom_show = "Not defined yet."; 18 | }else{ 19 | $custom_show = $req->fetch()->custom_message; 20 | } 21 | ?> 22 | 23 |

Contact

24 | 25 | 26 | 27 |
28 |

29 |
30 | 31 |
32 | 33 |
34 | 35 |
36 |
37 |
38 | -------------------------------------------------------------------------------- /web_files/converter.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {'steamID64'}; 26 | $avatar = $xml->{'avatarFull'}; 27 | $name = $xml->{'steamID'}; 28 | $status = $xml->{'onlineState'}; 29 | 30 | if(empty($steamid)){ 31 | $_SESSION['flash']['danger'] = $language['converter_invalid_steamid']; 32 | header("Location: converter.php"); 33 | exit(); 34 | } 35 | 36 | if($status == 'offline'){ 37 | $status = ''.$language['converter_offline'].''; 38 | }elseif($status == 'online'){ 39 | $status = ''.$language['converter_online'].''; 40 | 41 | }elseif($status == 'in-game'){ 42 | $status = ''.$language['converter_ingame'].''; 43 | 44 | }else{ 45 | $status = $xml->{'onlineState'}; 46 | } 47 | 48 | $converted = "1"; 49 | 50 | }else{ 51 | // Invalid link 52 | $_SESSION['flash']['danger'] = $language['converter_invalid_steamid']; 53 | header("Location: converter.php"); 54 | exit(); 55 | 56 | } 57 | 58 | } 59 | require 'inc/header.php'; 60 | 61 | ?> 62 | 63 |

64 | 65 | 70 | 71 |

Information:

72 |
73 |

:

74 |

SteamID:

75 |

:

76 |
77 | 78 | 79 | 80 | 81 |
82 | 83 |
84 |

85 | 86 |
87 | 88 |
89 |
90 |
91 | 92 | 93 | 98 |
99 |
100 | 101 | 102 |
103 |
104 | 105 | 106 |
107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /web_files/faq.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 |

Frequently Asked Questions

9 |
10 |
11 | 12 |
13 | query("SELECT * FROM faq ORDER BY id ASC"); 15 | $count = $req->rowCount(); 16 | 17 | if($count == 0){ 18 | echo "

No questions available

"; 19 | }else{ 20 | 21 | while($row = $req->fetch()) : ?> 22 | id; 25 | if(substr($id, -1) == '1' OR substr($id, -1) == '3' OR substr($id, -1) == '5' OR substr($id, -1) == '7' OR substr($id, -1) == '9'){ 26 | 27 | $type = "primary"; 28 | }else{ 29 | $type = "default"; 30 | } ?> 31 | 32 |
33 |
34 |

35 | 37 | question?> 38 | 39 |

40 | 41 |
42 |
43 |
answer?>
44 |
45 |
46 | 47 | 48 | 49 |
50 |
51 | 52 | 53 | -------------------------------------------------------------------------------- /web_files/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Weeeishy/CSGO-ReportBot-WebPanel/96e401178a474d3a74c5b8bd2ecb6c1670e0a1fd/web_files/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /web_files/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Weeeishy/CSGO-ReportBot-WebPanel/96e401178a474d3a74c5b8bd2ecb6c1670e0a1fd/web_files/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /web_files/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Weeeishy/CSGO-ReportBot-WebPanel/96e401178a474d3a74c5b8bd2ecb6c1670e0a1fd/web_files/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /web_files/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Weeeishy/CSGO-ReportBot-WebPanel/96e401178a474d3a74c5b8bd2ecb6c1670e0a1fd/web_files/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /web_files/img/empty_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Weeeishy/CSGO-ReportBot-WebPanel/96e401178a474d3a74c5b8bd2ecb6c1670e0a1fd/web_files/img/empty_icon.png -------------------------------------------------------------------------------- /web_files/img/lang/en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Weeeishy/CSGO-ReportBot-WebPanel/96e401178a474d3a74c5b8bd2ecb6c1670e0a1fd/web_files/img/lang/en.png -------------------------------------------------------------------------------- /web_files/img/lang/fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Weeeishy/CSGO-ReportBot-WebPanel/96e401178a474d3a74c5b8bd2ecb6c1670e0a1fd/web_files/img/lang/fr.png -------------------------------------------------------------------------------- /web_files/inc/api_mail.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM users WHERE (email IS NOT NULL AND email_subscribed = 1)"); 13 | $count = $req->rowCount(); 14 | //echo "Count: $count
"; 15 | $emails = array(); 16 | while($row = $req->fetch()){ 17 | array_push($emails, $row->email); 18 | } 19 | 20 | 21 | $mails = ""; 22 | $count = count($emails); 23 | foreach ($emails as $key => $value) { 24 | if($count == 1){ 25 | $mails = $value; 26 | break; 27 | } 28 | if($key == 0){ 29 | $mails = $value . ";"; 30 | }elseif($key < $count -1){ 31 | $mails .= $value . ";"; 32 | }else{ 33 | $mails .= $value; 34 | } 35 | } 36 | 37 | 38 | echo $mails; 39 | }else{ 40 | echo "no"; 41 | } -------------------------------------------------------------------------------- /web_files/inc/commend_log.php: -------------------------------------------------------------------------------- 1 | Error: SteamID not Valid?'; 7 | } else { 8 | if (!ctype_digit($steamid)) { 9 | echo '
Error: SteamID not Valid?'; 10 | } else { 11 | echo '

Output of "'.$steamid.'"


'; 12 | $filename = $commend_log_path.$steamid.'.txt'; 13 | if (file_exists($filename)) { 14 | if (is_readable($filename)) { 15 | $handle = fopen($filename, 'r'); 16 | if (filesize($filename) > 0) { 17 | $contents = fread($handle, filesize($filename)); 18 | fclose($handle); 19 | $contents = str_replace('\r\n', "\r\n", $contents); 20 | echo '
'; 21 | echo '
'; 22 | echo ' '; 23 | echo '
'; 24 | echo '
'; 25 | echo ''; 26 | 27 | } else { 28 | echo '
'; 29 | echo '
'; 30 | echo ' '; 31 | echo '
'; 32 | echo '
'; 33 | echo ''; 34 | 35 | 36 | } 37 | } 38 | } else { 39 | echo '
Cant get any Logs for SteamID: "'.$steamid.'"'; 40 | } 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /web_files/inc/config.php.default: -------------------------------------------------------------------------------- 1 | setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 16 | $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ); 17 | 18 | $req = $pdo->query("SELECT * FROM config"); 19 | while($row = $req->fetch()){ 20 | $version = $row->current_version; 21 | $licence_key = $row->licence_key; 22 | $steam_api_key = $row->steam_api_key; 23 | 24 | 25 | $website_navtitle = $row->website_navtitle; 26 | $website_title = $row->website_title; 27 | 28 | /* CAPTCHA INFORMATION */ 29 | 30 | $secret_key = $row->captcha_secret_key; 31 | $website_key = $row->captcha_website_key; 32 | 33 | /* REPORTBOT INFORMATION */ 34 | 35 | $reportbot_number = $row->reportbot_number; 36 | $commendbot_number = $row->commendbot_number; 37 | 38 | $log_prefix = $row->log_prefix; 39 | 40 | $report_path = $row->report_path; 41 | $report_log_path = $row->report_log_path; 42 | 43 | $commend_path = $row->commend_path; 44 | $commend_log_path = $row->commend_log_path; 45 | 46 | $commend_timer = $row->commend_timer; 47 | $report_timer = $row->report_timer; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /web_files/inc/db.php: -------------------------------------------------------------------------------- 1 | setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 7 | $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ); -------------------------------------------------------------------------------- /web_files/inc/do_whitelist.php: -------------------------------------------------------------------------------- 1 | id; 9 | }else{ 10 | $uid = NULL; 11 | } 12 | 13 | $token_custom = htmlentities($_POST['token_custom']); 14 | if(isset($_POST['token'])){ 15 | $token = htmlentities($_POST['token']); 16 | }else{ 17 | $token = ''; 18 | } 19 | 20 | if($token_custom == ''){ 21 | $token = htmlentities($_POST['token']); 22 | }else{ 23 | $token = htmlentities($_POST['token_custom']); 24 | } 25 | 26 | if(isset($_POST['g-recaptcha-response']) AND !empty($_POST['g-recaptcha-response'])){ 27 | 28 | 29 | $verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secret_key.'&response='.$_POST['g-recaptcha-response']); 30 | $responseData = json_decode($verifyResponse); 31 | if($responseData->success){ 32 | // CAPTCHA IS OK, WE DONT DO ANYTHING 33 | }else{ 34 | // CAPTCHA NOT OK 35 | $_SESSION['flash']['danger'] = "CAPTCHA ERROR"; 36 | header("Location: ../whitelist.php"); 37 | exit(); 38 | } 39 | }else{ 40 | 41 | // NO CAPTCHA 42 | $_SESSION['flash']['danger'] = "NO CAPTCHA"; 43 | header("Location: ../whitelist.php"); 44 | exit(); 45 | } 46 | 47 | if(is_null($token)){ 48 | $_SESSION['flash']['danger'] = $language['error_no_token']; // no token 49 | header("Location: ../whitelist.php"); 50 | exit(); 51 | 52 | } 53 | 54 | if(empty($_POST['steamid'])){ 55 | 56 | $_SESSION['flash']['danger'] = $language['error_no_steamid']; // no steamid 57 | header("Location: ../whitelist.php"); 58 | exit(); 59 | } 60 | 61 | if(!is_numeric($_POST['steamid'])){ 62 | 63 | $_SESSION['flash']['danger'] = $language['error_steamid_numberonly']; // steamid isnt only numbers 64 | header("Location: ../whitelist.php"); 65 | exit(); 66 | } 67 | 68 | if(strlen($_POST['steamid']) != 17){ 69 | 70 | $_SESSION['flash']['danger'] = $language['error_steamid_invalid']; // invalid steamid 71 | header("Location: ../whitelist.php"); 72 | exit(); 73 | } 74 | 75 | // Check if token is valid 76 | $req = $pdo->prepare('SELECT * FROM tokens WHERE token = ? AND token_type = "whitelist"'); 77 | $req->execute([$token]); 78 | $check_token = $req->rowCount(); 79 | 80 | if($check_token == 0){ 81 | $_SESSION['flash']['danger'] = $language['error_token_invalid']; 82 | header("Location: ../whitelist.php"); 83 | exit(); 84 | } 85 | 86 | // Check if token have use left 87 | $req = $pdo->prepare('SELECT * FROM tokens WHERE (token = ? AND token_use > 0)'); 88 | $req->execute([$token]); 89 | $check_token = $req->rowCount(); 90 | 91 | if($check_token == 0){ 92 | $_SESSION['flash']['danger'] = $language['error_token_no_use_left']; 93 | header("Location: ../whitelist.php"); 94 | exit(); 95 | } 96 | 97 | if($check_token > 0){ 98 | 99 | 100 | $steamid = htmlentities($_POST['steamid']); 101 | 102 | $req = $pdo->prepare("SELECT * FROM whitelist WHERE steamid = ?"); 103 | $req->execute([$steamid]); 104 | if($req->rowCount() > 0){ 105 | $_SESSION['flash']['danger'] = "$steamid already Whitelisted."; 106 | header("Location: ../whitelist.php"); 107 | exit(); 108 | } 109 | 110 | // TOKEN -1 111 | $req = $pdo->prepare('UPDATE tokens SET token_use = token_use - 1 WHERE token = ?'); 112 | $req->execute([$token]); 113 | 114 | // we log the token activation 115 | if (!empty($_SERVER['HTTP_CLIENT_IP'])) { 116 | $ip = $_SERVER['HTTP_CLIENT_IP']; 117 | } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { 118 | $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; 119 | } else { 120 | $ip = $_SERVER['REMOTE_ADDR']; 121 | } 122 | 123 | $ip = htmlentities($ip); 124 | 125 | $req = $pdo->prepare('INSERT INTO tokens_activation SET token = ?, type = "whitelist", date = CURRENT_TIMESTAMP, uid = ?, uip = ?'); 126 | $req->execute([$token, $uid, $ip]); 127 | 128 | // add values into db 129 | 130 | $req = $pdo->prepare('INSERT INTO whitelist SET steamid = ?, added_date = CURRENT_TIMESTAMP, comment = "Added with a token"'); 131 | $req->execute(["$steamid"]); 132 | 133 | // whitelist done 134 | $_SESSION['flash']['success'] = "$steamid Whitelisted!"; 135 | header("Location: ../whitelist.php"); 136 | exit(); 137 | 138 | 139 | 140 | 141 | } -------------------------------------------------------------------------------- /web_files/inc/footer.php: -------------------------------------------------------------------------------- 1 | 7 |
8 | 9 | 14 | 15 |
16 |

© 2017 - v
17 |

Language:

18 | prepare("SELECT * FROM language"); 20 | $req->execute(); 21 | $language_number = $req->rowCount(); 22 | $id = 0; 23 | while($row = $req->fetch()){ 24 | $id = $id + 1; 25 | if($id > 1){ 26 | echo ' | '; 27 | } 28 | echo ' 29 |
30 | 31 | 32 | 33 |
'; 34 | } 35 | 36 | 37 | ?> 38 | 39 |

40 |

Created with ♥ by Yellow

41 | 42 |
43 | 44 | 45 | 46 | 47 | 48 | 49 | email)) : ?> 51 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /web_files/inc/functions.php: -------------------------------------------------------------------------------- 1 | ' . print_r($variable, true) . ''; 5 | 6 | } 7 | 8 | 9 | function is_logged(){ 10 | if(session_status() != PHP_SESSION_ACTIVE ){ 11 | session_start(); 12 | } 13 | if(!isset($_SESSION['auth'])){ 14 | $_SESSION['flash']['danger'] = "You must be logged to see this page"; 15 | header("Location: login.php"); 16 | exit(); 17 | } 18 | 19 | if(empty($_SESSION['auth'])){ 20 | unset($_SESSION['auth']); 21 | header("Location: login.php"); 22 | exit(); 23 | } 24 | 25 | } 26 | 27 | function logged_check(){ 28 | 29 | if(session_status() != PHP_SESSION_ACTIVE ){ 30 | session_start(); 31 | } 32 | if(isset($_SESSION['auth'])){ 33 | $_SESSION['flash']['info'] = "You are already logged in"; 34 | header("Location: account.php"); 35 | exit(); 36 | } 37 | } 38 | 39 | function is_admin(){ 40 | 41 | if(session_status() != PHP_SESSION_ACTIVE ){ 42 | session_start(); 43 | } 44 | 45 | if(isset($_SESSION['auth']) AND $_SESSION['auth']->is_admin == 1){ 46 | 47 | }else{ 48 | $_SESSION['flash']['danger'] = "You are not allowed to enter the admin area."; 49 | header("Location: ../index.php"); 50 | exit(); 51 | } 52 | 53 | } 54 | 55 | function CheckUserInSteamGroup($steamurl, $steamid) 56 | { 57 | $groupData = simplexml_load_file($steamurl,'SimpleXMLElement',LIBXML_NOWARNING); 58 | if (!$groupData) { die('steamerror'); } 59 | $groupMembers = $groupData->members; 60 | $found = false; 61 | foreach($groupMembers->steamID64 as $member) 62 | { 63 | if ($member == $steamid) { $found = true; break; } 64 | } 65 | if ($found == true) { return true; } 66 | if($groupData->nextPageLink) 67 | { 68 | $url = (string)$groupData->nextPageLink; 69 | $found = CheckUserInSteamGroup($url, $steamid, $ran); 70 | } 71 | return $found; 72 | } 73 | 74 | function getLastVersion(){ 75 | $url = "http://api.cs-report.me/version.php"; 76 | $file = file_get_contents($url); 77 | $api = json_decode($file); 78 | 79 | $version = $api->{'version'}; 80 | return $version; 81 | 82 | } 83 | 84 | 85 | function getLastDate(){ 86 | $url = "http://api.cs-report.me/version.php"; 87 | $file = file_get_contents($url); 88 | $api = json_decode($file); 89 | 90 | $date = $api->{'date'}; 91 | return $date; 92 | 93 | } 94 | 95 | 96 | function showVersionAlert($version, $date){ 97 | if(isset($_SESSION['auth']) AND $_SESSION['auth']->is_admin == 1){ 98 | $_SESSION['flash_admin']['warning'] = "[UPDATE] $version is available. Release date: $date."; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /web_files/inc/home_last.php: -------------------------------------------------------------------------------- 1 | 2 |

3 |
4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | query('SELECT * FROM reported_list ORDER BY id DESC LIMIT 10'); 18 | 19 | 20 | while($row = $req->fetch()){ 21 | if(($row->inventory_value != 'Private') and ($row->inventory_value != "Unknown")){ 22 | $inventory_value = "$row->inventory_value"; 23 | }else{ 24 | $inventory_value = $row->inventory_value; 25 | } 26 | echo ' 27 | 28 |
29 |
30 |
31 |
32 |
33 | '; 34 | 35 | } 36 | ?> 37 | 38 |
IDSteamIDReportbot IDDateInventory Value
'.$row->id.''.$row->steamid.''.$row->reportbot_id.''.$row->datum.''.$inventory_value.'
39 |
40 | 41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | query('SELECT * FROM commended_list ORDER BY id DESC LIMIT 10'); 54 | 55 | 56 | while($row = $req->fetch()){ 57 | echo ' 58 | 59 |
60 |
61 |
62 |
63 | '; 64 | 65 | } 66 | ?> 67 | 68 |
IDSteamIDCommendbot IDDate
'.$row->id.''.$row->steamid.''.$row->commendbot_id.''.$row->datum.'
69 |
70 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/CodeDefinitionBuilder.php: -------------------------------------------------------------------------------- 1 | tagName = $tagName; 33 | $this->replacementText = $replacementText; 34 | } 35 | 36 | /** 37 | * Sets the tag name the CodeDefinition should be built with. 38 | * 39 | * @param $tagName the tag name for the new CodeDefinition 40 | */ 41 | public function setTagName($tagName) 42 | { 43 | $this->tagName = $tagName; 44 | return $this; 45 | } 46 | 47 | /** 48 | * Sets the replacement text that the new CodeDefinition should be 49 | * built with. 50 | * 51 | * @param $replacementText the replacement text for the new CodeDefinition 52 | */ 53 | public function setReplacementText($replacementText) 54 | { 55 | $this->replacementText = $replacementText; 56 | return $this; 57 | } 58 | 59 | /** 60 | * Set whether or not the built CodeDefinition should use the {option} bbcode 61 | * argument. 62 | * 63 | * @param $option ture iff the definition includes an option 64 | */ 65 | public function setUseOption($option) 66 | { 67 | $this->useOption = $option; 68 | return $this; 69 | } 70 | 71 | /** 72 | * Set whether or not the built CodeDefinition should allow its content 73 | * to be parsed and evaluated as bbcode. 74 | * 75 | * @param $parseContent true iff the content should be parsed 76 | */ 77 | public function setParseContent($parseContent) 78 | { 79 | $this->parseContent = $parseContent; 80 | return $this; 81 | } 82 | 83 | /** 84 | * Sets the nest limit for this code definition. 85 | * 86 | * @param $nestLimit a positive integer, or -1 if there is no limit. 87 | * @throws \InvalidArgumentException if the nest limit is invalid 88 | */ 89 | public function setNestLimit($limit) 90 | { 91 | if(!is_int($limit) || ($limit <= 0 && -1 != $limit)) { 92 | throw new \InvalidArgumentException("A nest limit must be a positive integer " . 93 | "or -1."); 94 | } 95 | $this->nestLimit = $limit; 96 | return $this; 97 | } 98 | 99 | /** 100 | * Sets the InputValidator that option arguments should be validated with. 101 | * 102 | * @param $validator the InputValidator instance to use 103 | */ 104 | public function setOptionValidator(\JBBCode\InputValidator $validator, $option=null) 105 | { 106 | if(empty($option)){ 107 | $option = $this->tagName; 108 | } 109 | $this->optionValidator[$option] = $validator; 110 | return $this; 111 | } 112 | 113 | /** 114 | * Sets the InputValidator that body ({param}) text should be validated with. 115 | * 116 | * @param $validator the InputValidator instance to use 117 | */ 118 | public function setBodyValidator(\JBBCode\InputValidator $validator) 119 | { 120 | $this->bodyValidator = $validator; 121 | return $this; 122 | } 123 | 124 | /** 125 | * Removes the attached option validator if one is attached. 126 | */ 127 | public function removeOptionValidator() 128 | { 129 | $this->optionValidator = array(); 130 | return $this; 131 | } 132 | 133 | /** 134 | * Removes the attached body validator if one is attached. 135 | */ 136 | public function removeBodyValidator() 137 | { 138 | $this->bodyValidator = null; 139 | return $this; 140 | } 141 | 142 | /** 143 | * Builds a CodeDefinition with the current state of the builder. 144 | * 145 | * @return a new CodeDefinition instance 146 | */ 147 | public function build() 148 | { 149 | $definition = CodeDefinition::construct($this->tagName, 150 | $this->replacementText, 151 | $this->useOption, 152 | $this->parseContent, 153 | $this->nestLimit, 154 | $this->optionValidator, 155 | $this->bodyValidator); 156 | return $definition; 157 | } 158 | 159 | 160 | } 161 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/CodeDefinitionSet.php: -------------------------------------------------------------------------------- 1 | {param}'); 29 | array_push($this->definitions, $builder->build()); 30 | 31 | /* [i] italics tag */ 32 | $builder = new CodeDefinitionBuilder('i', '{param}'); 33 | array_push($this->definitions, $builder->build()); 34 | 35 | /* [u] underline tag */ 36 | $builder = new CodeDefinitionBuilder('u', '{param}'); 37 | array_push($this->definitions, $builder->build()); 38 | 39 | $urlValidator = new \JBBCode\validators\UrlValidator(); 40 | 41 | /* [url] link tag */ 42 | $builder = new CodeDefinitionBuilder('url', '{param}'); 43 | $builder->setParseContent(false)->setBodyValidator($urlValidator); 44 | array_push($this->definitions, $builder->build()); 45 | 46 | /* [url=http://example.com] link tag */ 47 | $builder = new CodeDefinitionBuilder('url', '{param}'); 48 | $builder->setUseOption(true)->setParseContent(true)->setOptionValidator($urlValidator); 49 | array_push($this->definitions, $builder->build()); 50 | 51 | /* [img] image tag */ 52 | $builder = new CodeDefinitionBuilder('img', ''); 53 | $builder->setUseOption(false)->setParseContent(false)->setBodyValidator($urlValidator); 54 | array_push($this->definitions, $builder->build()); 55 | 56 | /* [img=alt text] image tag */ 57 | $builder = new CodeDefinitionBuilder('img', '{option}'); 58 | $builder->setUseOption(true)->setParseContent(false)->setBodyValidator($urlValidator); 59 | array_push($this->definitions, $builder->build()); 60 | 61 | /* [color] color tag */ 62 | $builder = new CodeDefinitionBuilder('color', '{param}'); 63 | $builder->setUseOption(true)->setOptionValidator(new \JBBCode\validators\CssColorValidator()); 64 | array_push($this->definitions, $builder->build()); 65 | } 66 | 67 | /** 68 | * Returns an array of the default code definitions. 69 | */ 70 | public function getCodeDefinitions() 71 | { 72 | return $this->definitions; 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/DocumentElement.php: -------------------------------------------------------------------------------- 1 | setTagName("Document"); 22 | $this->setNodeId(0); 23 | } 24 | 25 | /** 26 | * (non-PHPdoc) 27 | * @see JBBCode.ElementNode::getAsBBCode() 28 | * 29 | * Returns the BBCode representation of this document 30 | * 31 | * @return this document's bbcode representation 32 | */ 33 | public function getAsBBCode() 34 | { 35 | $s = ""; 36 | foreach($this->getChildren() as $child){ 37 | $s .= $child->getAsBBCode(); 38 | } 39 | 40 | return $s; 41 | } 42 | 43 | /** 44 | * (non-PHPdoc) 45 | * @see JBBCode.ElementNode::getAsHTML() 46 | * 47 | * Documents don't add any html. They only exist as a container for their 48 | * children, so getAsHTML() simply iterates through the document's children, 49 | * returning their html. 50 | * 51 | * @return the HTML representation of this document 52 | */ 53 | public function getAsHTML() 54 | { 55 | $s = ""; 56 | foreach($this->getChildren() as $child) 57 | $s .= $child->getAsHTML(); 58 | 59 | return $s; 60 | } 61 | 62 | public function accept(NodeVisitor $visitor) 63 | { 64 | $visitor->visitDocumentElement($this); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/InputValidator.php: -------------------------------------------------------------------------------- 1 | nodeid; 28 | } 29 | 30 | /** 31 | * Returns this node's immediate parent. 32 | * 33 | * @return the node's parent 34 | */ 35 | public function getParent() 36 | { 37 | return $this->parent; 38 | } 39 | 40 | /** 41 | * Determines if this node has a parent. 42 | * 43 | * @return true if this node has a parent, false otherwise 44 | */ 45 | public function hasParent() 46 | { 47 | return $this->parent != null; 48 | } 49 | 50 | /** 51 | * Returns true if this is a text node. Returns false otherwise. 52 | * (Overridden by TextNode to return true) 53 | * 54 | * @return true if this node is a text node 55 | */ 56 | public function isTextNode() 57 | { 58 | return false; 59 | } 60 | 61 | /** 62 | * Accepts a NodeVisitor 63 | * 64 | * @param nodeVisitor the NodeVisitor traversing the graph 65 | */ 66 | abstract public function accept(NodeVisitor $nodeVisitor); 67 | 68 | /** 69 | * Returns this node as text (without any bbcode markup) 70 | * 71 | * @return the plain text representation of this node 72 | */ 73 | abstract public function getAsText(); 74 | 75 | /** 76 | * Returns this node as bbcode 77 | * 78 | * @return the bbcode representation of this node 79 | */ 80 | abstract public function getAsBBCode(); 81 | 82 | /** 83 | * Returns this node as HTML 84 | * 85 | * @return the html representation of this node 86 | */ 87 | abstract public function getAsHTML(); 88 | 89 | /** 90 | * Sets this node's parent to be the given node. 91 | * 92 | * @param parent the node to set as this node's parent 93 | */ 94 | public function setParent(Node $parent) 95 | { 96 | $this->parent = $parent; 97 | } 98 | 99 | /** 100 | * Sets this node's nodeid 101 | * 102 | * @param nodeid this node's node id 103 | */ 104 | public function setNodeId($nodeid) 105 | { 106 | $this->nodeid = $nodeid; 107 | } 108 | 109 | } 110 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/NodeVisitor.php: -------------------------------------------------------------------------------- 1 | value = $val; 25 | } 26 | 27 | public function accept(NodeVisitor $visitor) 28 | { 29 | $visitor->visitTextNode($this); 30 | } 31 | 32 | /** 33 | * (non-PHPdoc) 34 | * @see JBBCode.Node::isTextNode() 35 | * 36 | * returns true 37 | */ 38 | public function isTextNode() 39 | { 40 | return true; 41 | } 42 | 43 | /** 44 | * Returns the text string value of this text node. 45 | * 46 | * @return string 47 | */ 48 | public function getValue() 49 | { 50 | return $this->value; 51 | } 52 | 53 | /** 54 | * (non-PHPdoc) 55 | * @see JBBCode.Node::getAsText() 56 | * 57 | * Returns the text representation of this node. 58 | * 59 | * @return this node represented as text 60 | */ 61 | public function getAsText() 62 | { 63 | return $this->getValue(); 64 | } 65 | 66 | /** 67 | * (non-PHPdoc) 68 | * @see JBBCode.Node::getAsBBCode() 69 | * 70 | * Returns the bbcode representation of this node. (Just its value) 71 | * 72 | * @return this node represented as bbcode 73 | */ 74 | public function getAsBBCode() 75 | { 76 | return $this->getValue(); 77 | } 78 | 79 | /** 80 | * (non-PHPdoc) 81 | * @see JBBCode.Node::getAsHTML() 82 | * 83 | * Returns the html representation of this node. (Just its value) 84 | * 85 | * @return this node represented as HTML 86 | */ 87 | public function getAsHTML() 88 | { 89 | return $this->getValue(); 90 | } 91 | 92 | /** 93 | * Edits the text value contained within this text node. 94 | * 95 | * @param newValue the new text value of the text node 96 | */ 97 | public function setValue($newValue) 98 | { 99 | $this->value = $newValue; 100 | } 101 | 102 | } 103 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/Tokenizer.php: -------------------------------------------------------------------------------- 1 | tokens, substr($str, $strStart, $index - $strStart)); 32 | $strStart = $index; 33 | } 34 | 35 | /* Add the [ or ] to the tokens array. */ 36 | array_push($this->tokens, $str[$index]); 37 | $strStart = $index+1; 38 | } 39 | } 40 | 41 | if ($strStart < strlen($str)) { 42 | /* There are still characters in the buffer. Add them to the tokens. */ 43 | array_push($this->tokens, substr($str, $strStart, strlen($str) - $strStart)); 44 | } 45 | } 46 | 47 | /** 48 | * Returns true if there is another token in the token stream. 49 | */ 50 | public function hasNext() 51 | { 52 | return count($this->tokens) > 1 + $this->i; 53 | } 54 | 55 | /** 56 | * Advances the token stream to the next token and returns the new token. 57 | */ 58 | public function next() 59 | { 60 | if (!$this->hasNext()) { 61 | return null; 62 | } else { 63 | return $this->tokens[++$this->i]; 64 | } 65 | } 66 | 67 | /** 68 | * Retrieves the current token. 69 | */ 70 | public function current() 71 | { 72 | if ($this->i < 0) { 73 | return null; 74 | } else { 75 | return $this->tokens[$this->i]; 76 | } 77 | } 78 | 79 | /** 80 | * Moves the token stream back a token. 81 | */ 82 | public function stepBack() 83 | { 84 | if ($this->i > -1) { 85 | $this->i--; 86 | } 87 | } 88 | 89 | /** 90 | * Restarts the tokenizer, returning to the beginning of the token stream. 91 | */ 92 | public function restart() 93 | { 94 | $this->i = -1; 95 | } 96 | 97 | /** 98 | * toString method that returns the entire string from the current index on. 99 | */ 100 | public function toString() 101 | { 102 | return implode('', array_slice($this->tokens, $this->i + 1)); 103 | } 104 | 105 | } 106 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/examples/1-GettingStarted.php: -------------------------------------------------------------------------------- 1 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 6 | 7 | $text = "The default codes include: [b]bold[/b], [i]italics[/i], [u]underlining[/u], "; 8 | $text .= "[url=http://jbbcode.com]links[/url], [color=red]color![/color] and more."; 9 | 10 | $parser->parse($text); 11 | 12 | print $parser->getAsHtml(); 13 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/examples/2-ClosingUnclosedTags.php: -------------------------------------------------------------------------------- 1 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 6 | 7 | $text = "The bbcode in here [b]is never closed!"; 8 | $parser->parse($text); 9 | 10 | print $parser->getAsBBCode(); 11 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/examples/3-MarkuplessText.php: -------------------------------------------------------------------------------- 1 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 6 | 7 | $text = "[b][u]There is [i]a lot[/i] of [url=http://en.wikipedia.org/wiki/Markup_language]markup[/url] in this"; 8 | $text .= "[color=#333333]text[/color]![/u][/b]"; 9 | $parser->parse($text); 10 | 11 | print $parser->getAsText(); 12 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/examples/4-CreatingNewCodes.php: -------------------------------------------------------------------------------- 1 | addBBCode("quote", '
{param}
'); 7 | $parser->addBBCode("code", '
{param}
', false, false, 1); 8 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/examples/SmileyVisitorTest.php: -------------------------------------------------------------------------------- 1 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 10 | 11 | if (count($argv) < 2) { 12 | die("Usage: " . $argv[0] . " \"bbcode string\"\n"); 13 | } 14 | 15 | $inputText = $argv[1]; 16 | 17 | $parser->parse($inputText); 18 | 19 | $smileyVisitor = new \JBBCode\visitors\SmileyVisitor(); 20 | $parser->accept($smileyVisitor); 21 | 22 | echo $parser->getAsHTML() . "\n"; 23 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/examples/TagCountingVisitorTest.php: -------------------------------------------------------------------------------- 1 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 10 | 11 | if (count($argv) < 3) { 12 | die("Usage: " . $argv[0] . " \"bbcode string\" \n"); 13 | } 14 | 15 | $inputText = $argv[1]; 16 | $tagName = $argv[2]; 17 | 18 | $parser->parse($inputText); 19 | 20 | $tagCountingVisitor = new \JBBCode\visitors\TagCountingVisitor(); 21 | $parser->accept($tagCountingVisitor); 22 | 23 | echo $tagCountingVisitor->getFrequency($tagName) . "\n"; 24 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/tests/BBCodeToBBCodeTest.php: -------------------------------------------------------------------------------- 1 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 23 | $parser->parse($bbcode); 24 | return $parser->getAsBBCode(); 25 | } 26 | 27 | /** 28 | * Asserts that the given bbcode matches the given text when 29 | * the bbcode is run through defaultBBCodeParse 30 | */ 31 | private function assertBBCodeOutput($bbcode, $text) 32 | { 33 | $this->assertEquals($this->defaultBBCodeParse($bbcode), $text); 34 | } 35 | 36 | public function testEmptyString() 37 | { 38 | $this->assertBBCodeOutput('', ''); 39 | } 40 | 41 | public function testOneTag() 42 | { 43 | $this->assertBBCodeOutput('[b]this is bold[/b]', '[b]this is bold[/b]'); 44 | } 45 | 46 | public function testOneTagWithSurroundingText() 47 | { 48 | $this->assertBBCodeOutput('buffer text [b]this is bold[/b] buffer text', 49 | 'buffer text [b]this is bold[/b] buffer text'); 50 | } 51 | 52 | public function testMultipleTags() 53 | { 54 | $bbcode = 'this is some text with [b]bold tags[/b] and [i]italics[/i] and ' . 55 | 'things like [u]that[/u].'; 56 | $bbcodeOutput = 'this is some text with [b]bold tags[/b] and [i]italics[/i] and ' . 57 | 'things like [u]that[/u].'; 58 | $this->assertBBCodeOutput($bbcode, $bbcodeOutput); 59 | } 60 | 61 | public function testCodeOptions() 62 | { 63 | $code = 'This contains a [url=http://jbbcode.com]url[/url] which uses an option.'; 64 | $codeOutput = 'This contains a [url=http://jbbcode.com]url[/url] which uses an option.'; 65 | $this->assertBBCodeOutput($code, $codeOutput); 66 | } 67 | 68 | /** 69 | * @depends testCodeOptions 70 | */ 71 | public function testOmittedOption() 72 | { 73 | $code = 'This doesn\'t use the url option [url]http://jbbcode.com[/url].'; 74 | $codeOutput = 'This doesn\'t use the url option [url]http://jbbcode.com[/url].'; 75 | $this->assertBBCodeOutput($code, $codeOutput); 76 | } 77 | 78 | public function testUnclosedTags() 79 | { 80 | $code = '[b]bold'; 81 | $codeOutput = '[b]bold[/b]'; 82 | $this->assertBBCodeOutput($code, $codeOutput); 83 | } 84 | 85 | } 86 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/tests/BBCodeToTextTest.php: -------------------------------------------------------------------------------- 1 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 24 | $parser->parse($bbcode); 25 | return $parser->getAsText(); 26 | } 27 | 28 | /** 29 | * Asserts that the given bbcode matches the given text when 30 | * the bbcode is run through defaultTextParse 31 | */ 32 | private function assertTextOutput($bbcode, $text) 33 | { 34 | $this->assertEquals($text, $this->defaultTextParse($bbcode)); 35 | } 36 | 37 | public function testEmptyString() 38 | { 39 | $this->assertTextOutput('', ''); 40 | } 41 | 42 | public function testOneTag() 43 | { 44 | $this->assertTextOutput('[b]this is bold[/b]', 'this is bold'); 45 | } 46 | 47 | public function testOneTagWithSurroundingText() 48 | { 49 | $this->assertTextOutput('buffer text [b]this is bold[/b] buffer text', 50 | 'buffer text this is bold buffer text'); 51 | } 52 | 53 | public function testMultipleTags() 54 | { 55 | $bbcode = 'this is some text with [b]bold tags[/b] and [i]italics[/i] and ' . 56 | 'things like [u]that[/u].'; 57 | $text = 'this is some text with bold tags and italics and things like that.'; 58 | $this->assertTextOutput($bbcode, $text); 59 | } 60 | 61 | public function testCodeOptions() 62 | { 63 | $code = 'This contains a [url=http://jbbcode.com]url[/url] which uses an option.'; 64 | $text = 'This contains a url which uses an option.'; 65 | $this->assertTextOutput($code, $text); 66 | } 67 | 68 | /** 69 | * @depends testCodeOptions 70 | */ 71 | public function testOmittedOption() 72 | { 73 | $code = 'This doesn\'t use the url option [url]http://jbbcode.com[/url].'; 74 | $text = 'This doesn\'t use the url option http://jbbcode.com.'; 75 | $this->assertTextOutput($code, $text); 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/tests/DefaultCodesTest.php: -------------------------------------------------------------------------------- 1 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 22 | $parser->parse($bbcode); 23 | $this->assertEquals($html, $parser->getAsHtml()); 24 | } 25 | 26 | /** 27 | * Tests the [b] bbcode. 28 | */ 29 | public function testBold() 30 | { 31 | $this->assertProduces('[b]this should be bold[/b]', 'this should be bold'); 32 | } 33 | 34 | /** 35 | * Tests the [color] bbcode. 36 | */ 37 | public function testColor() 38 | { 39 | $this->assertProduces('[color=red]red[/color]', 'red'); 40 | } 41 | 42 | /** 43 | * Tests the example from the documentation. 44 | */ 45 | public function testExample() 46 | { 47 | $text = "The default codes include: [b]bold[/b], [i]italics[/i], [u]underlining[/u], "; 48 | $text .= "[url=http://jbbcode.com]links[/url], [color=red]color![/color] and more."; 49 | $html = 'The default codes include: bold, italics, underlining, '; 50 | $html .= 'links, color! and more.'; 51 | $this->assertProduces($text, $html); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/tests/HTMLSafeTest.php: -------------------------------------------------------------------------------- 1 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 20 | $parser->parse($bbcode); 21 | 22 | $htmlsafer = new JBBCode\visitors\HTMLSafeVisitor(); 23 | $parser->accept($htmlsafer); 24 | 25 | $this->assertEquals($html, $parser->getAsHtml()); 26 | } 27 | 28 | /** 29 | * Tests escaping quotes and ampersands in simple text 30 | */ 31 | public function testQuoteAndAmp() 32 | { 33 | $this->assertProduces('te"xt te&xt', 'te"xt te&xt'); 34 | } 35 | 36 | /** 37 | * Tests escaping quotes and ampersands inside a BBCode tag 38 | */ 39 | public function testQuoteAndAmpInTag() 40 | { 41 | $this->assertProduces('[b]te"xt te&xt[/b]', 'te"xt te&xt'); 42 | } 43 | 44 | /** 45 | * Tests escaping HTML tags 46 | */ 47 | public function testHtmlTag() 48 | { 49 | $this->assertProduces('not bold', '<b>not bold</b>'); 50 | $this->assertProduces('[b]bold[/b]
', '<b>bold</b> <hr>'); 51 | } 52 | 53 | /** 54 | * Tests escaping ampersands in URL using [url]...[/url] 55 | */ 56 | public function testUrlParam() 57 | { 58 | $this->assertProduces('text [url]http://example.com/?a=b&c=d[/url] more text', 'text http://example.com/?a=b&c=d more text'); 59 | } 60 | 61 | /** 62 | * Tests escaping ampersands in URL using [url=...] tag 63 | */ 64 | public function testUrlOption() 65 | { 66 | $this->assertProduces('text [url=http://example.com/?a=b&c=d]this is a "link"[/url]', 'text this is a "link"'); 67 | } 68 | 69 | /** 70 | * Tests escaping ampersands in URL using [url=...] tag when URL is in quotes 71 | */ 72 | public function testUrlOptionQuotes() 73 | { 74 | $this->assertProduces('text [url="http://example.com/?a=b&c=d"]this is a "link"[/url]', 'text this is a "link"'); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/tests/NestLimitTest.php: -------------------------------------------------------------------------------- 1 | addBBCode('b', '{param}', false, true, -1); 23 | $parser->parse('[b][b][b][b][b][b][b][b]bold text[/b][/b][/b][/b][/b][/b][/b][/b]'); 24 | $this->assertEquals('' . 25 | 'bold text' . 26 | '', 27 | $parser->getAsHtml()); 28 | } 29 | 30 | /** 31 | * Test over nesting. 32 | */ 33 | public function testOverNesting() 34 | { 35 | $parser = new JBBCode\Parser(); 36 | $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 37 | $parser->addBBCode('quote', '
{param}
', false, true, 2); 38 | $bbcode = '[quote][quote][quote]wut[/quote] huh?[/quote] i don\'t know[/quote]'; 39 | $parser->parse($bbcode); 40 | $expectedBbcode = '[quote][quote] huh?[/quote] i don\'t know[/quote]'; 41 | $expectedHtml = '
huh?
i don\'t know
'; 42 | $this->assertEquals($expectedBbcode, $parser->getAsBBCode()); 43 | $this->assertEquals($expectedHtml, $parser->getAsHtml()); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/tests/ParseContentTest.php: -------------------------------------------------------------------------------- 1 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 23 | $parser->addBBCode('verbatim', '{param}', false, false); 24 | 25 | $parser->parse('[verbatim]plain text[/verbatim]'); 26 | $this->assertEquals('plain text', $parser->getAsHtml()); 27 | 28 | $parser->parse('[verbatim][b]bold[/b][/verbatim]'); 29 | $this->assertEquals('[b]bold[/b]', $parser->getAsHtml()); 30 | 31 | } 32 | 33 | public function testNoParsingWithBufferText() 34 | { 35 | 36 | $parser = new JBBCode\Parser(); 37 | $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 38 | $parser->addBBCode('verbatim', '{param}', false, false); 39 | 40 | $parser->parse('buffer text[verbatim]buffer text[b]bold[/b]buffer text[/verbatim]buffer text'); 41 | $this->assertEquals('buffer textbuffer text[b]bold[/b]buffer textbuffer text', $parser->getAsHtml()); 42 | } 43 | 44 | /** 45 | * Tests that when a tag is not closed within an unparseable tag, 46 | * the BBCode output does not automatically close that tag (because 47 | * the contents were not parsed). 48 | */ 49 | public function testUnclosedTag() 50 | { 51 | 52 | $parser = new JBBCode\Parser(); 53 | $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 54 | $parser->addBBCode('verbatim', '{param}', false, false); 55 | 56 | $parser->parse('[verbatim]i wonder [b]what will happen[/verbatim]'); 57 | $this->assertEquals('i wonder [b]what will happen', $parser->getAsHtml()); 58 | $this->assertEquals('[verbatim]i wonder [b]what will happen[/verbatim]', $parser->getAsBBCode()); 59 | } 60 | 61 | /** 62 | * Tests that an unclosed tag with parseContent = false ends cleanly. 63 | */ 64 | public function testUnclosedVerbatimTag() 65 | { 66 | $parser = new JBBCode\Parser(); 67 | $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 68 | $parser->addBBCode('verbatim', '{param}', false, false); 69 | 70 | $parser->parse('[verbatim]yo this [b]text should not be bold[/b]'); 71 | $this->assertEquals('yo this [b]text should not be bold[/b]', $parser->getAsHtml()); 72 | } 73 | 74 | /** 75 | * Tests a malformed closing tag for a verbatim block. 76 | */ 77 | public function testMalformedVerbatimClosingTag() 78 | { 79 | $parser = new JBBCode\Parser(); 80 | $parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 81 | $parser->addBBCode('verbatim', '{param}', false, false); 82 | $parser->parse('[verbatim]yo this [b]text should not be bold[/b][/verbatim'); 83 | $this->assertEquals('yo this [b]text should not be bold[/b][/verbatim', $parser->getAsHtml()); 84 | } 85 | 86 | /** 87 | * Tests an immediate end after a verbatim. 88 | */ 89 | public function testVerbatimThenEof() 90 | { 91 | $parser = new JBBCode\Parser(); 92 | $parser->addBBCode('verbatim', '{param}', false, false); 93 | $parser->parse('[verbatim]'); 94 | $this->assertEquals('', $parser->getAsHtml()); 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/tests/ParsingEdgeCaseTest.php: -------------------------------------------------------------------------------- 1 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 26 | $parser->parse($bbcode); 27 | return $parser->getAsHtml(); 28 | } 29 | 30 | /** 31 | * Asserts that the given bbcode matches the given html when 32 | * the bbcode is run through defaultParse. 33 | */ 34 | private function assertProduces($bbcode, $html) 35 | { 36 | $this->assertEquals($html, $this->defaultParse($bbcode)); 37 | } 38 | 39 | /** 40 | * Tests attempting to use a code that doesn't exist. 41 | */ 42 | public function testNonexistentCodeMalformed() 43 | { 44 | $this->assertProduces('[wat]', '[wat]'); 45 | } 46 | 47 | /** 48 | * Tests attempting to use a code that doesn't exist, but this 49 | * time in a well-formed fashion. 50 | * 51 | * @depends testNonexistentCodeMalformed 52 | */ 53 | public function testNonexistentCodeWellformed() 54 | { 55 | $this->assertProduces('[wat]something[/wat]', '[wat]something[/wat]'); 56 | } 57 | 58 | /** 59 | * Tests a whole bunch of meaningless left brackets. 60 | */ 61 | public function testAllLeftBrackets() 62 | { 63 | $this->assertProduces('[[[[[[[[', '[[[[[[[['); 64 | } 65 | 66 | /** 67 | * Tests a whole bunch of meaningless right brackets. 68 | */ 69 | public function testAllRightBrackets() 70 | { 71 | $this->assertProduces(']]]]]', ']]]]]'); 72 | } 73 | 74 | /** 75 | * Intermixes well-formed, meaningful tags with meaningless brackets. 76 | */ 77 | public function testRandomBracketsInWellformedCode() 78 | { 79 | $this->assertProduces('[b][[][[i]heh[/i][/b]', 80 | '[[][heh'); 81 | } 82 | 83 | /** 84 | * Tests an unclosed tag within a closed tag. 85 | */ 86 | public function testUnclosedWithinClosed() 87 | { 88 | $this->assertProduces('[url=http://jbbcode.com][b]oh yeah[/url]', 89 | 'oh yeah'); 90 | } 91 | 92 | /** 93 | * Tests half completed opening tag. 94 | */ 95 | public function testHalfOpenTag() 96 | { 97 | $this->assertProduces('[b', '[b'); 98 | $this->assertProduces('wut [url=http://jbbcode.com', 99 | 'wut [url=http://jbbcode.com'); 100 | } 101 | 102 | /** 103 | * Tests half completed closing tag. 104 | */ 105 | public function testHalfClosingTag() 106 | { 107 | $this->assertProduces('[b]this should be bold[/b', 108 | 'this should be bold[/b'); 109 | } 110 | 111 | /** 112 | * Tests lots of left brackets before the actual tag. For example: 113 | * [[[[[[[[b]bold![/b] 114 | */ 115 | public function testLeftBracketsThenTag() 116 | { 117 | $this->assertProduces('[[[[[b]bold![/b]', 118 | '[[[[bold!'); 119 | } 120 | 121 | /** 122 | * Tests a whitespace after left bracket. 123 | */ 124 | public function testWhitespaceAfterLeftBracketWhithoutTag() 125 | { 126 | $this->assertProduces('[ ABC ] ', 127 | '[ ABC ] '); 128 | } 129 | 130 | } 131 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/tests/SimpleEvaluationTest.php: -------------------------------------------------------------------------------- 1 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 18 | $parser->parse($bbcode); 19 | return $parser->getAsHtml(); 20 | } 21 | 22 | /** 23 | * Asserts that the given bbcode matches the given html when 24 | * the bbcode is run through defaultParse. 25 | */ 26 | private function assertProduces($bbcode, $html) 27 | { 28 | $this->assertEquals($html, $this->defaultParse($bbcode)); 29 | } 30 | 31 | 32 | public function testEmptyString() 33 | { 34 | $this->assertProduces('', ''); 35 | } 36 | 37 | public function testOneTag() 38 | { 39 | $this->assertProduces('[b]this is bold[/b]', 'this is bold'); 40 | } 41 | 42 | public function testOneTagWithSurroundingText() 43 | { 44 | $this->assertProduces('buffer text [b]this is bold[/b] buffer text', 45 | 'buffer text this is bold buffer text'); 46 | } 47 | 48 | public function testMultipleTags() 49 | { 50 | $bbcode = <<bold tags and italics and 56 | things like that. 57 | EOD; 58 | $this->assertProduces($bbcode, $html); 59 | } 60 | 61 | public function testCodeOptions() 62 | { 63 | $code = 'This contains a [url=http://jbbcode.com/?b=2]url[/url] which uses an option.'; 64 | $html = 'This contains a url which uses an option.'; 65 | $this->assertProduces($code, $html); 66 | } 67 | 68 | public function testAttributes() 69 | { 70 | $parser = new JBBCode\Parser(); 71 | $builder = new JBBCode\CodeDefinitionBuilder('img', '{alt}'); 72 | $parser->addCodeDefinition($builder->setUseOption(true)->setParseContent(false)->build()); 73 | 74 | $expected = 'Multiple alt text options.'; 75 | 76 | $code = 'Multiple [img height="50" alt="alt text"]http://jbbcode.com/img.png[/img] options.'; 77 | $parser->parse($code); 78 | $result = $parser->getAsHTML(); 79 | $this->assertEquals($expected, $result); 80 | 81 | $code = 'Multiple [img height=50 alt="alt text"]http://jbbcode.com/img.png[/img] options.'; 82 | $parser->parse($code); 83 | $result = $parser->getAsHTML(); 84 | $this->assertEquals($expected, $result); 85 | } 86 | 87 | /** 88 | * @depends testCodeOptions 89 | */ 90 | public function testOmittedOption() 91 | { 92 | $code = 'This doesn\'t use the url option [url]http://jbbcode.com[/url].'; 93 | $html = 'This doesn\'t use the url option http://jbbcode.com.'; 94 | $this->assertProduces($code, $html); 95 | } 96 | 97 | public function testUnclosedTag() 98 | { 99 | $code = 'hello [b]world'; 100 | $html = 'hello world'; 101 | $this->assertProduces($code, $html); 102 | } 103 | 104 | public function testNestingTags() 105 | { 106 | $code = '[url=http://jbbcode.com][b]hello [u]world[/u][/b][/url]'; 107 | $html = 'hello world'; 108 | $this->assertProduces($code, $html); 109 | } 110 | 111 | public function testBracketInTag() 112 | { 113 | $this->assertProduces('[b]:-[[/b]', ':-['); 114 | } 115 | 116 | public function testBracketWithSpaceInTag() 117 | { 118 | $this->assertProduces('[b]:-[ [/b]', ':-[ '); 119 | } 120 | 121 | public function testBracketWithTextInTag() 122 | { 123 | $this->assertProduces('[b]:-[ foobar[/b]', ':-[ foobar'); 124 | } 125 | 126 | public function testMultibleBracketsWithTextInTag() 127 | { 128 | $this->assertProduces('[b]:-[ [fo[o[bar[/b]', ':-[ [fo[o[bar'); 129 | } 130 | 131 | } 132 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/tests/TokenizerTest.php: -------------------------------------------------------------------------------- 1 | assertFalse($tokenizer->hasNext()); 18 | } 19 | 20 | public function testPlainTextOnly() 21 | { 22 | $tokenizer = new JBBCode\Tokenizer('this is some plain text.'); 23 | $this->assertEquals('this is some plain text.', $tokenizer->next()); 24 | $this->assertEquals('this is some plain text.', $tokenizer->current()); 25 | $this->assertFalse($tokenizer->hasNext()); 26 | } 27 | 28 | public function testStartingBracket() 29 | { 30 | $tokenizer = new JBBCode\Tokenizer('[this has a starting bracket.'); 31 | $this->assertEquals('[', $tokenizer->next()); 32 | $this->assertEquals('[', $tokenizer->current()); 33 | $this->assertEquals('this has a starting bracket.', $tokenizer->next()); 34 | $this->assertEquals('this has a starting bracket.', $tokenizer->current()); 35 | $this->assertFalse($tokenizer->hasNext()); 36 | $this->assertEquals(null, $tokenizer->next()); 37 | } 38 | 39 | public function testOneTag() 40 | { 41 | $tokenizer = new JBBCode\Tokenizer('[b]'); 42 | $this->assertEquals('[', $tokenizer->next()); 43 | $this->assertEquals('b', $tokenizer->next()); 44 | $this->assertEquals(']', $tokenizer->next()); 45 | $this->assertFalse($tokenizer->hasNext()); 46 | } 47 | 48 | public function testMatchingTags() 49 | { 50 | $tokenizer = new JBBCode\Tokenizer('[url]http://jbbcode.com[/url]'); 51 | $this->assertEquals('[', $tokenizer->next()); 52 | $this->assertEquals('url', $tokenizer->next()); 53 | $this->assertEquals(']', $tokenizer->next()); 54 | $this->assertEquals('http://jbbcode.com', $tokenizer->next()); 55 | $this->assertEquals('[', $tokenizer->next()); 56 | $this->assertEquals('/url', $tokenizer->next()); 57 | $this->assertEquals(']', $tokenizer->next()); 58 | $this->assertFalse($tokenizer->hasNext()); 59 | } 60 | 61 | public function testLotsOfBrackets() 62 | { 63 | $tokenizer = new JBBCode\Tokenizer('[[][]]['); 64 | $this->assertEquals('[', $tokenizer->next()); 65 | $this->assertEquals('[', $tokenizer->next()); 66 | $this->assertEquals(']', $tokenizer->next()); 67 | $this->assertEquals('[', $tokenizer->next()); 68 | $this->assertEquals(']', $tokenizer->next()); 69 | $this->assertEquals(']', $tokenizer->next()); 70 | $this->assertEquals('[', $tokenizer->next()); 71 | $this->assertFalse($tokenizer->hasNext()); 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/validators/CssColorValidator.php: -------------------------------------------------------------------------------- 1 | getChildren() as $child) { 15 | $child->accept($this); 16 | } 17 | } 18 | 19 | public function visitTextNode(\JBBCode\TextNode $textNode) 20 | { 21 | $textNode->setValue($this->htmlSafe($textNode->getValue())); 22 | } 23 | 24 | public function visitElementNode(\JBBCode\ElementNode $elementNode) 25 | { 26 | $attrs = $elementNode->getAttribute(); 27 | if (is_array($attrs)) 28 | { 29 | foreach ($attrs as &$el) 30 | $el = $this->htmlSafe($el); 31 | 32 | $elementNode->setAttribute($attrs); 33 | } 34 | 35 | foreach ($elementNode->getChildren() as $child) { 36 | $child->accept($this); 37 | } 38 | } 39 | 40 | protected function htmlSafe($str, $options = null) 41 | { 42 | if (is_null($options)) 43 | { 44 | if (defined('ENT_DISALLOWED')) 45 | $options = ENT_QUOTES | ENT_DISALLOWED | ENT_HTML401; // PHP 5.4+ 46 | else 47 | $options = ENT_QUOTES; // PHP 5.3 48 | } 49 | 50 | return htmlspecialchars($str, $options, 'UTF-8'); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/visitors/NestLimitVisitor.php: -------------------------------------------------------------------------------- 1 | getChildren() as $child) { 28 | $child->accept($this); 29 | } 30 | } 31 | 32 | public function visitTextNode(\JBBCode\TextNode $textNode) 33 | { 34 | /* Nothing to do. Text nodes don't have tag names or children. */ 35 | } 36 | 37 | public function visitElementNode(\JBBCode\ElementNode $elementNode) 38 | { 39 | $tagName = strtolower($elementNode->getTagName()); 40 | 41 | /* Update the current depth for this tag name. */ 42 | if (isset($this->depth[$tagName])) { 43 | $this->depth[$tagName]++; 44 | } else { 45 | $this->depth[$tagName] = 1; 46 | } 47 | 48 | /* Check if $elementNode is nested too deeply. */ 49 | if ($elementNode->getCodeDefinition()->getNestLimit() != -1 && 50 | $elementNode->getCodeDefinition()->getNestLimit() < $this->depth[$tagName]) { 51 | /* This element is nested too deeply. We need to remove it and not visit any 52 | * of its children. */ 53 | $elementNode->getParent()->removeChild($elementNode); 54 | } else { 55 | /* This element is not nested too deeply. Visit all of its children. */ 56 | foreach ($elementNode->getChildren() as $child) { 57 | $child->accept($this); 58 | } 59 | } 60 | 61 | /* Now that we're done visiting this node, decrement the depth. */ 62 | $this->depth[$tagName]--; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/visitors/SmileyVisitor.php: -------------------------------------------------------------------------------- 1 | getChildren() as $child) { 18 | $child->accept($this); 19 | } 20 | } 21 | 22 | function visitTextNode(\JBBCode\TextNode $textNode) 23 | { 24 | /* Convert :) into an image tag. */ 25 | $textNode->setValue(str_replace(':)', 26 | ':)', 27 | $textNode->getValue())); 28 | } 29 | 30 | function visitElementNode(\JBBCode\ElementNode $elementNode) 31 | { 32 | /* We only want to visit text nodes within elements if the element's 33 | * code definition allows for its content to be parsed. 34 | */ 35 | if ($elementNode->getCodeDefinition()->parseContent()) { 36 | foreach ($elementNode->getChildren() as $child) { 37 | $child->accept($this); 38 | } 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /web_files/inc/jbbcode/visitors/TagCountingVisitor.php: -------------------------------------------------------------------------------- 1 | getChildren() as $child) { 19 | $child->accept($this); 20 | } 21 | } 22 | 23 | public function visitTextNode(\JBBCode\TextNode $textNode) 24 | { 25 | // Nothing to do here, text nodes do not have tag names or children 26 | } 27 | 28 | public function visitElementNode(\JBBCode\ElementNode $elementNode) 29 | { 30 | $tagName = strtolower($elementNode->getTagName()); 31 | 32 | // Update this tag name's frequency 33 | if (isset($this->frequencies[$tagName])) { 34 | $this->frequencies[$tagName]++; 35 | } else { 36 | $this->frequencies[$tagName] = 1; 37 | } 38 | 39 | // Visit all the node's childrens 40 | foreach ($elementNode->getChildren() as $child) { 41 | $child->accept($this); 42 | } 43 | 44 | } 45 | 46 | /** 47 | * Retrieves the frequency of the given tag name. 48 | * 49 | * @param $tagName the tag name to look up 50 | */ 51 | public function getFrequency($tagName) 52 | { 53 | if (!isset($this->frequencies[$tagName])) { 54 | return 0; 55 | } else { 56 | return $this->frequencies[$tagName]; 57 | } 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /web_files/inc/language.php: -------------------------------------------------------------------------------- 1 | Error: SteamID not Valid?'; 7 | } else { 8 | if (!ctype_digit($steamid)) { 9 | echo '
Error: SteamID not Valid?'; 10 | } else { 11 | echo '

Output of "'.$steamid.'"


'; 12 | $filename = $report_log_path.$steamid.'.txt'; 13 | if (file_exists($filename)) { 14 | if (is_readable($filename)) { 15 | $handle = fopen($filename, 'r'); 16 | if (filesize($filename) > 0) { 17 | $contents = fread($handle, filesize($filename)); 18 | fclose($handle); 19 | $contents = str_replace('\r\n', "\r\n", $contents); 20 | echo '
'; 21 | echo '
'; 22 | echo ' '; 23 | echo '
'; 24 | echo '
'; 25 | echo ''; 26 | 27 | } else { 28 | echo '
'; 29 | echo '
'; 30 | echo ' '; 31 | echo '
'; 32 | echo '
'; 33 | echo ''; 34 | 35 | 36 | } 37 | } 38 | } else { 39 | echo '
Cant get any Logs for SteamID: "'.$steamid.'"'; 40 | } 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /web_files/inc/reported_checker.php: -------------------------------------------------------------------------------- 1 | query("DELETE FROM tokens WHERE token_use = '0'"); 6 | 7 | 8 | $result = $pdo->query("SELECT * FROM reported_list WHERE ow=false OR vac=false ORDER BY id DESC LIMIT 5000;"); 9 | $ids; 10 | $count = 0; 11 | $counter = 1; 12 | $rows = []; 13 | 14 | while ($row = $result->fetch()) { 15 | 16 | $rows[] = $row; 17 | } 18 | 19 | $s = sizeof($rows); 20 | foreach ($rows as $row) { 21 | 22 | $steamid = $row->steamid; 23 | if ($count == 0) { 24 | $ids = $steamid; 25 | $count = $count + 1; 26 | } else { 27 | 28 | if (strpos($ids, $steamid) !== false) { 29 | $s = $s - 1; 30 | } else { 31 | $counter = $counter + 1; 32 | $ids = $ids . ',' . $steamid; 33 | $count = $count + 1; 34 | } 35 | } 36 | 37 | 38 | if ($count > 10 || $counter == $s) { 39 | $key = $steam_api_key; 40 | $link = file_get_contents('http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=' . $key . '&steamids=' . $ids . '&format=json'); 41 | //echo $link; 42 | $myarray = json_decode($link, true); 43 | echo '
'.$link.'
'; 44 | 45 | 46 | 47 | for ($i = 0; $i < $count; $i++) { 48 | 49 | @$ow = $myarray['players'][$i]['NumberOfGameBans']; 50 | @$vac = $myarray['players'][$i]['VACBanned']; 51 | @$steamid = $myarray['players'][$i]['SteamId']; 52 | @$daylastban = $myarray['players'][$i]['DaysSinceLastBan']; 53 | 54 | 55 | //Now, we check if user is OW 56 | if($ow > 0){ 57 | if($daylastban < 10){ 58 | // WE CHECK IF USER IS ALREADY MARKED AS OWED 59 | $req = $pdo->prepare('SELECT * FROM reported_list WHERE (steamid = ? AND ow = "true")'); 60 | $req->execute([$steamid]); 61 | if($req->rowCount() == 0){ 62 | // USER NOT MARKED AS OW 63 | $req = $pdo->prepare('UPDATE reported_list SET ow = "true", ban_date = CURRENT_TIMESTAMP WHERE steamid = ?'); 64 | $req->execute([$steamid]); 65 | 66 | $req = $pdo->prepare('UPDATE reported_list SET ow = "true", ban_date = CURRENT_TIMESTAMP WHERE steamid = ?'); 67 | $req->execute([$steamid]); 68 | 69 | 70 | } 71 | } 72 | } 73 | 74 | // Now, we chec if user is VAC 75 | if($vac > 0){ 76 | if($daylastban < 10){ 77 | // CHECK IF USER ALREADY VACCED 78 | $req = $pdo->prepare('SELECT * FROM reported_list WHERE (steamid = ? AND vac = "true")'); 79 | $req->execute([$steamid]); 80 | if($req->rowCount() == 0){ 81 | // USER NOT MARKED AS VAC 82 | $req = $pdo->prepare('UPDATE reported_list SET vac = "true", ban_date = CURRENT_TIMESTAMP WHERE steamid = ?'); 83 | $req->execute([$steamid]); 84 | 85 | $req = $pdo->prepare('UPDATE reported_list SET vac = "true", ban_date = CURRENT_TIMESTAMP WHERE steamid = ?'); 86 | $req->execute([$steamid]); 87 | 88 | } 89 | } 90 | } 91 | 92 | 93 | 94 | } 95 | } 96 | } 97 | 98 | ?> -------------------------------------------------------------------------------- /web_files/inc/rewards/rewards_checker_tag.php: -------------------------------------------------------------------------------- 1 | query("SELECT * FROM rewards_config"); 6 | $tag = $gcfg->fetch()->tag; 7 | 8 | $gpts = $pdo->query("SELECT * FROM rewards_config"); 9 | $pts = $gpts->fetch()->tag_pointsperday; 10 | 11 | $req = $pdo->query("SELECT * FROM rewards_config"); 12 | $minconsecutif = $req->fetch()->tag_minconsecutivedays; 13 | 14 | echo "TAG: $tag
"; 15 | echo "PTS PER DAY: $pts
"; 16 | echo "MIN CONSECUTIVE DAYS: $minconsecutif
"; 17 | $req = $pdo->query('SELECT * FROM users WHERE (steamid IS NOT NULL OR steamid > 0)'); 18 | $count = $req->rowCount(); 19 | $rows = $req->fetchAll(); 20 | 21 | $req = $pdo->query('SELECT * FROM users WHERE (steamid IS NOT NULL OR steamid > 0)'); 22 | 23 | 24 | foreach ($rows as $key => $value) { 25 | $username_db = $value->{'username'}; 26 | $uid = $value->{'id'}; 27 | $steamid = $value->{'steamid'}; 28 | 29 | $api_key = $steam_api_key; 30 | $link = file_get_contents('http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key='.$api_key.'&steamids='.$steamid.'?json=1'); 31 | //echo $link; 32 | $myarray = json_decode($link, true); 33 | //var_dump($link); 34 | $username = $myarray['response']['players'][0]['personaname']; 35 | 36 | if(preg_match('/'.$tag.'/i', $username)){ 37 | //USER HAVE TAG 38 | // WE NEED SOME INFO ABOUT HIM 39 | $q = $pdo->query("SELECT * FROM rewards_users WHERE uid = '$uid'"); 40 | while($row = $q->fetch()){ 41 | $tag_date_begin = $row->tag_datebegin; 42 | $tag_consecutivedays = $row->tag_consecutivedays; 43 | 44 | $date_now = date('Y-m-d'); 45 | $date_now_ts = strtotime($date_now); 46 | 47 | // WE CONVERT OUR DATE INTO TIMESTAMP 48 | $date_begin = strtotime($tag_date_begin); 49 | $consecutivedays = $tag_consecutivedays * 24 * 60 * 60; 50 | 51 | $date_check = date('Y-m-d', $date_begin + $consecutivedays); 52 | 53 | $date_minus = $date_now_ts - (60*60*24); 54 | $date_minus = date('Y-m-d', $date_minus); 55 | 56 | if($date_now == $date_check){ 57 | // Already added the day 58 | echo "
---------------

[OK] $username_db ($username) have the tag: $tag


---------------
"; 59 | }else{ 60 | if($date_check == $date_minus){ 61 | if($tag_consecutivedays >= $minconsecutif){ 62 | // We need to add 1 consecutive day 63 | // We need to add the points 64 | $pdo->query("UPDATE rewards_users SET tag_consecutivedays = tag_consecutivedays + 1, points = points + $pts WHERE uid = '$uid'"); 65 | echo "$username +1 day, +$pts points
"; 66 | echo "$minconsecutif >= $tag_consecutivedays
"; 67 | }else{ 68 | $pdo->query("UPDATE rewards_users SET tag_consecutivedays = tag_consecutivedays + 1 WHERE uid = '$uid'"); 69 | echo "$username +1 day
"; 70 | } 71 | }else{ 72 | // We need to reset consecutive day 73 | 74 | $pdo->query("UPDATE rewards_users SET tag_consecutivedays = 0, tag_datebegin = CURDATE() WHERE uid = '$uid'"); 75 | echo "$username consecutive days reseted
"; 76 | } 77 | 78 | } 79 | } 80 | 81 | }else{ 82 | // USER DOESNT HAVE THE TAG 83 | // WE RESET HIM 84 | echo "$username_db ($username) doesn't have the tag: $tag
" ; 85 | $pdo->query("UPDATE rewards_users SET tag_consecutivedays = 0, tag_datebegin = CURDATE() WHERE uid = '$uid'"); 86 | } 87 | } -------------------------------------------------------------------------------- /web_files/inc/steam_login.php: -------------------------------------------------------------------------------- 1 | prepare('SELECT * FROM users WHERE steamid = ?'); 14 | $req->execute([$steamid]); 15 | 16 | if($req->rowCount() == 1){ 17 | // there is already an user with this steamid 18 | $_SESSION['flash']['danger'] = "An user with this SteamID already exist."; 19 | header("Location: ../account.php"); 20 | exit(); 21 | } 22 | 23 | $req = $pdo->prepare('UPDATE users SET steamid = :steamid WHERE id = :id'); 24 | $req->bindParam(':steamid', $steamid); 25 | $req->bindParam(':id', $_SESSION['auth']->id); 26 | 27 | $req->execute(); 28 | 29 | $id = $_SESSION['auth']->id; 30 | unset($_SESSION['auth']); 31 | 32 | $req = $pdo->prepare('SELECT * FROM users WHERE id = ?'); 33 | $req->execute([$id]); 34 | 35 | $_SESSION['auth'] = $req->fetch(); 36 | if(isset($_SESSION['auth']->steamid)){ 37 | $req = $pdo->query('SELECT * FROM rewards_users WHERE uid = '.$_SESSION['auth']->id); 38 | if($req->rowCount() == 0 ){ 39 | $pdo->query("INSERT INTO rewards_users SET uid = '".$_SESSION['auth']->id."', tag_datebegin = CURDATE()"); 40 | } 41 | } 42 | 43 | $_SESSION['flash']['success'] = "Successfully linked your account to steam"; 44 | header("Location: ../account.php"); 45 | exit(); 46 | 47 | } 48 | 49 | if(isset($_SESSION['steamid'])){ 50 | // user logged in with steam 51 | require_once 'steamauth/userInfo.php'; 52 | 53 | $steamid = $steamprofile['steamid']; 54 | 55 | // we check if there is an user with this steamID in database 56 | $req = $pdo->prepare('SELECT * FROM users WHERE steamid = ?'); 57 | $req->execute([$steamid]); 58 | 59 | if($req->rowCount() == 0){ 60 | // there is no account with this steamID 61 | // we need to redirect to registration form 62 | header("Location: ../register.php?steamid=$steamid"); 63 | exit(); 64 | }else{ 65 | // There is an account, we'll get the info and login the user 66 | $req = $pdo->prepare('SELECT * FROM users WHERE steamid = ?'); 67 | $req->execute([$steamid]); 68 | $_SESSION['auth'] = $req->fetch(); 69 | 70 | if(isset($_SESSION['auth']->steamid)){ 71 | $req = $pdo->query('SELECT * FROM rewards_users WHERE uid = '.$_SESSION['auth']->id); 72 | if($req->rowCount() == 0 ){ 73 | $pdo->query("INSERT INTO rewards_users SET uid = '".$_SESSION['auth']->id."', tag_datebegin = CURDATE()"); 74 | } 75 | } 76 | 77 | $_SESSION['flash']['success'] = $language['logged_in']; 78 | header("Location: ../account.php"); 79 | exit(); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /web_files/inc/steamauth/SteamConfig.php: -------------------------------------------------------------------------------- 1 | SteamAuth:
Please supply an API-Key!
Find this in steamauth/SteamConfig.php, Find the '\$steamauth['apikey']' Array. ");} 11 | if (empty($steamauth['domainname'])) {$steamauth['domainname'] = $_SERVER['SERVER_NAME'];} 12 | if (empty($steamauth['logoutpage'])) {$steamauth['logoutpage'] = $_SERVER['PHP_SELF'];} 13 | if (empty($steamauth['loginpage'])) {$steamauth['loginpage'] = $_SERVER['PHP_SELF'];} 14 | ?> 15 | -------------------------------------------------------------------------------- /web_files/inc/steamauth/steamauth.php: -------------------------------------------------------------------------------- 1 | "; //logout button 9 | } 10 | 11 | function loginbutton($buttonstyle = "square") { 12 | $button['rectangle'] = "01"; 13 | $button['square'] = "02"; 14 | $button = ""; 15 | 16 | echo $button; 17 | } 18 | 19 | if (isset($_GET['login'])){ 20 | require 'openid.php'; 21 | try { 22 | require 'SteamConfig.php'; 23 | $openid = new LightOpenID($steamauth['domainname']); 24 | 25 | if(!$openid->mode) { 26 | $openid->identity = 'http://steamcommunity.com/openid'; 27 | header('Location: ' . $openid->authUrl()); 28 | } elseif ($openid->mode == 'cancel') { 29 | echo 'User has canceled authentication!'; 30 | } else { 31 | if($openid->validate()) { 32 | $id = $openid->identity; 33 | $ptn = "/^http:\/\/steamcommunity\.com\/openid\/id\/(7[0-9]{15,25}+)$/"; 34 | preg_match($ptn, $id, $matches); 35 | 36 | $_SESSION['steamid'] = $matches[1]; 37 | if (!headers_sent()) { 38 | header('Location: '.$steamauth['loginpage']); 39 | exit; 40 | } else { 41 | ?> 42 | 45 | 48 | getMessage(); 57 | } 58 | } 59 | 60 | if (isset($_GET['logout'])){ 61 | require 'SteamConfig.php'; 62 | session_unset(); 63 | session_destroy(); 64 | header('Location: '.$steamauth['logoutpage']); 65 | exit; 66 | } 67 | 68 | if (isset($_GET['update'])){ 69 | unset($_SESSION['steam_uptodate']); 70 | require 'userInfo.php'; 71 | header('Location: '.$_SERVER['PHP_SELF']); 72 | exit; 73 | } 74 | 75 | // Version 3.2 76 | 77 | ?> 78 | -------------------------------------------------------------------------------- /web_files/inc/steamauth/userInfo.php: -------------------------------------------------------------------------------- 1 | 43 | 44 | -------------------------------------------------------------------------------- /web_files/inc/timer_commendbot.php: -------------------------------------------------------------------------------- 1 | prepare('SELECT * FROM commended_list WHERE (commendbot_id = :id AND NOW() < datum + interval :timer hour)'); 6 | $req->bindParam(':id', $i); 7 | $req->bindParam(':timer', $commend_timer); 8 | $req->execute(); 9 | if($req->rowCount() == 0){ 10 | // we can use a commendbot 11 | $ready_to_report = '1'; 12 | break; 13 | }else{ 14 | $ready_to_report = '0'; 15 | } 16 | 17 | 18 | } 19 | if($commendbot_number == 0){ 20 | 21 | echo '
There is 0 commendbot in the config file
'; 22 | require 'inc/footer.php'; 23 | die(); 24 | } 25 | if($ready_to_report == '0'){ 26 | $commendbot = array(); // We define commendbot as an array to store all of our commendbot which are not ready 27 | 28 | for($i = 1; $i <= $commendbot_number; $i++){ 29 | $req = $pdo->prepare('SELECT * FROM commended_list WHERE (commendbot_id = :id AND NOW() < datum + interval :timer hour)'); 30 | $req->bindParam(':id', $i); 31 | $req->bindParam(':timer', $commend_timer); 32 | $req->execute(); 33 | while($row = $req->fetch()){ 34 | $commendbot[$i] = $row->datum; 35 | } 36 | } 37 | 38 | 39 | // We get current date 40 | $req = $pdo->query("SELECT NOW()"); 41 | $req->execute(); 42 | $date_now = $req->fetchColumn(); 43 | 44 | $date_now = new Datetime($date_now); 45 | $date_now = $date_now->getTimestamp(); 46 | 47 | $cooldown_commend = array_search(min($commendbot), $commendbot); // Report Cooldown 48 | $cooldown_commend = $commendbot[$cooldown_commend]; 49 | // Now we get the cooldown of this commendbot 50 | $cooldown_commend = date('Y-m-d H:i:s', strtotime('+'.$commend_timer . ' hours', strtotime($cooldown_commend))); 51 | 52 | $cooldown_commend = new Datetime($cooldown_commend); 53 | $cooldown_commend = $cooldown_commend->getTimestamp(); 54 | $diff_commendbot = $date_now - $cooldown_commend; 55 | 56 | 57 | $init = $diff_commendbot; 58 | $hours = floor($init / 3600); 59 | $minutes = floor(($init/60) % 60); 60 | $seconds = $init % 60; 61 | 62 | $hours = abs($hours) - 1; 63 | $minutes = abs($minutes); 64 | $seconds = abs($seconds); 65 | 66 | }else{ 67 | $hours = 0; 68 | $minutes = 0; 69 | $seconds = 1; 70 | } ?> 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /web_files/inc/timer_reportbot.php: -------------------------------------------------------------------------------- 1 | prepare('SELECT * FROM reported_list WHERE (reportbot_id = :id AND NOW() < datum + interval :timer hour)'); 7 | $req->bindParam(':id', $i); 8 | $req->bindParam(':timer', $report_timer); 9 | $req->execute(); 10 | if($req->rowCount() == 0){ 11 | // we can use a reportbot 12 | $reportbot_to_use = $i; 13 | $ready_to_report = '1'; 14 | break; 15 | }else{ 16 | $ready_to_report = '0'; 17 | } 18 | 19 | 20 | } 21 | if($ready_to_report == '0'){ 22 | $reportbot = array(); // We define reportsbot as an array to store all of our reportbot which are not ready 23 | 24 | for($i = 1; $i <= $reportbot_number; $i++){ 25 | $req = $pdo->prepare('SELECT * FROM reported_list WHERE (reportbot_id = :id AND NOW() < datum + interval :timer hour)'); 26 | $req->bindParam(':id', $i); 27 | $req->bindParam(':timer', $report_timer); 28 | $req->execute(); 29 | while($row = $req->fetch()){ 30 | if($req->rowCount() == 1){ 31 | $reportbot[$i] = $row->datum; 32 | } 33 | } 34 | } 35 | 36 | 37 | // We get current date 38 | $req = $pdo->query("SELECT NOW()"); 39 | $req->execute(); 40 | $date_now = $req->fetchColumn(); 41 | 42 | $date_now = new Datetime($date_now); 43 | $date_now = $date_now->getTimestamp(); 44 | 45 | $cooldown_report = array_search(min($reportbot), $reportbot); // Report Cooldown 46 | $cooldown_report = $reportbot[$cooldown_report]; 47 | // Now we get the cooldown of this reportbot 48 | $cooldown_report = date('Y-m-d H:i:s', strtotime('+'.$report_timer . ' hours', strtotime($cooldown_report))); 49 | 50 | $cooldown_report = new Datetime($cooldown_report); 51 | $cooldown_report = $cooldown_report->getTimestamp(); 52 | $diff_reportbot = $date_now - $cooldown_report; 53 | 54 | 55 | $init = $diff_reportbot; 56 | $hours = floor($init / 3600); 57 | $minutes = floor(($init/60) % 60); 58 | $seconds = $init % 60; 59 | 60 | $hours = abs($hours) - 1; 61 | $minutes = abs($minutes); 62 | $seconds = abs($seconds); 63 | }else{ 64 | $hours = 0; 65 | $minutes = 0; 66 | $seconds = 1; 67 | } 68 | ?> 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /web_files/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet()); 12 | 13 | ?> 14 | 15 |
16 | 17 |
18 |

Last news

19 |
20 | 83 |
84 | 85 | 86 |
87 |
88 |

89 |
90 |
91 | prepare('SELECT * FROM homepage'); 93 | $req->execute(); 94 | $introduction_element = $req->rowCount(); 95 | while($row = $req->fetch()){ 96 | echo ' 97 |
98 |
99 | 100 | 101 | 102 |

103 | '.$row->title.' 104 |

105 |

'.$row->text.'

106 | 107 |
108 |
'; 109 | } 110 | 111 | ?> 112 |
113 |
114 |
115 |
116 | 117 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /web_files/install/config.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 27 | $dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ); 28 | // create account 29 | 30 | $user_name = $_POST['username']; 31 | $user_password = $_POST['password']; 32 | if(ctype_alnum($user_name)){ 33 | $user_password = password_hash($_POST['password'], PASSWORD_BCRYPT); 34 | $req = $dbh->prepare('INSERT INTO users SET username = ?, password = ?, is_admin = "1", email_subscribed = "1"'); 35 | //$dbh->bindParam(':username', $user_name); 36 | //$dbh->bindParam(':password', $user_password); 37 | $req->execute([$user_name, $user_password]); 38 | 39 | $req = $dbh->prepare('SELECT * FROM users WHERE username = ?'); 40 | $req->execute([$user_name]); 41 | // create login session 42 | $_SESSION['auth'] = $req->fetch(); 43 | // destroy sesson 44 | unset($_SESSION['install']); 45 | 46 | $_SESSION['do_config'] = "ok"; 47 | header("Location: config_2.php"); // We redirect intp 48 | exit(); 49 | }else{ 50 | // username is not valid 51 | echo "
Invalid Username (Only letters and numbers)
"; 52 | } 53 | 54 | 55 | } catch (PDOException $e) { 56 | echo '
Connection error : ' . utf8_encode($e->getMessage()). '
'; 57 | } 58 | }else{ 59 | // password doesnt match 60 | echo "
Password and Password Confirm doesn't match
"; 61 | } 62 | }else{ 63 | // empty confirm 64 | echo "
You must confirm your password
"; 65 | } 66 | }else{ 67 | // empty password 68 | echo "
Password can't be empty
"; 69 | } 70 | } 71 | 72 | ?> 73 | 79 |
80 |

Install - Create your account - Step 2

81 |
82 |
83 | 84 | 85 |
86 | 87 |
88 | 89 |
90 | 91 | 92 |
93 | 94 |
95 | 96 | 97 |
98 | 99 |
100 | 101 | 102 |
103 | 2 | 3 |

Your installation is now completed.

4 |

But please, wait! Read this page, it's not fully ready yet!

5 |

Remove the install folder.

6 | 7 |

You have one more thing to do. Open the config file called config.php.default inside 'inc'. Rename the file to config.php. And put your database details. This should be the default code:

8 | 9 |

Thanks again for your purchase.

10 |

Also, you have other stuff to set up, but it wont take long. Just take a look at the config.php file. If you have any problem, you can contact me on my mail adress: ximylzx@gmail.com or on my steam profile http://steamcommunity.com/profiles/76561198138326581/.

11 |
12 | 13 |

Thanks again for your purchase.

14 | 15 |
16 |

Click here to access the admin Area.

17 | 18 | 19 | -------------------------------------------------------------------------------- /web_files/install/index.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 64 | 65 |

Install - Setup Database - Step 1

66 |
67 |
68 | 69 |
70 | 71 | 72 |
73 | 74 |
75 | 76 | 77 |
78 | 79 |
80 | 81 | 82 |
83 | 84 |
85 | 86 | 87 |
88 | 89 |
90 | 91 | 92 | 93 |
94 | 95 | -------------------------------------------------------------------------------- /web_files/install/install_db.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 28 | // install db 29 | $_SESSION['install'] = '2'; 30 | 31 | if (!empty($_SERVER['HTTP_CLIENT_IP'])) { 32 | $installedby_ip = $_SERVER['HTTP_CLIENT_IP']; 33 | } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { 34 | $installedby_ip = $_SERVER['HTTP_X_FORWARDED_FOR']; 35 | } else { 36 | $installedby_ip = $_SERVER['REMOTE_ADDR']; 37 | } 38 | 39 | $website_url = "http" . (($_SERVER['SERVER_PORT'] == 443) ? "s://" : "://") . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 40 | $install_date = date('Y-m-d H:i:s'); 41 | $website_url = str_replace('install/install_db.php', '', $website_url); 42 | 43 | $request = "http://synchroneyes.fr/api.php?url=" . $website_url . "&install_ip=" . $installedby_ip . "&date=" . $install_date; 44 | 45 | $response = file_get_contents($request); 46 | $sql = file_get_contents('db.sql'); 47 | $dbh->query($sql); 48 | header("Location: config.php"); 49 | exit(); 50 | 51 | ?> 52 | 53 |

Database successfully imported. Please remove the Install Folder

54 | 55 | Échec lors de la connexion : ' . utf8_encode($e->getMessage()). ''; 59 | } 60 | 61 | 62 | } 63 | } 64 | 65 | -------------------------------------------------------------------------------- /web_files/js/holder.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Weeeishy/CSGO-ReportBot-WebPanel/96e401178a474d3a74c5b8bd2ecb6c1670e0a1fd/web_files/js/holder.js -------------------------------------------------------------------------------- /web_files/lang/README: -------------------------------------------------------------------------------- 1 | --- HOW TO ADD A LANGUAGE -- 2 | 3 | Create a new file called whateveryouwant.php 4 | 5 | For example, de.php for a german language file 6 | 7 | Copy the whole content from en.php 8 | 9 | Change $lang['en'] to $lang['de'] if the file is called de.php, $lang['ru'] if the file is called ru.php ... 10 | 11 | You will have this, for example: 12 | 'error_steamid_whitelisted' => "This SteamID is whitelisted." 13 | 14 | DO not touch this part: 'error_steamid_whitelisted' 15 | You only need to change this: "This SteamID is whitelisted." 16 | 17 | When you're done, go here /admin/language.php and add your language! 18 | -------------------------------------------------------------------------------- /web_files/login.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | prepare('SELECT * FROM users WHERE username = ?'); 39 | $req->execute([$_POST['username']]); 40 | $user = $req->fetch(); 41 | 42 | if(password_verify($_POST['password'], $user->password)){ 43 | require_once 'inc/language.php'; 44 | $_SESSION['flash']['success'] = $language['logged_in']; 45 | 46 | $req = $pdo->prepare('SELECT * FROM users WHERE username = ?'); 47 | $req->execute([$_POST['username']]); 48 | $_SESSION['auth'] = $req->fetch(); 49 | 50 | if(isset($_SESSION['auth']->steamid)){ 51 | $req = $pdo->query('SELECT * FROM rewards_users WHERE uid = '.$_SESSION['auth']->id); 52 | if($req->rowCount() == 0 ){ 53 | $pdo->query("INSERT INTO rewards_users SET uid = '".$_SESSION['auth']->id."', tag_datebegin = CURDATE()"); 54 | } 55 | } 56 | 57 | $req = $pdo->prepare('SELECT * FROM users WHERE username = ?'); 58 | $req->execute([$_POST['username']]); 59 | $ip = $req->fetch()->ip; 60 | 61 | if(is_null($ip)){ 62 | if (!empty($_SERVER['HTTP_CLIENT_IP'])) { 63 | $ip = $_SERVER['HTTP_CLIENT_IP']; 64 | } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { 65 | $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; 66 | } else { 67 | $ip = $_SERVER['REMOTE_ADDR']; 68 | } 69 | } 70 | 71 | $ip = htmlentities($ip); 72 | 73 | $req = $pdo->prepare('SELECT * FROM users WHERE (username = ? AND ip IS NOT NULL)'); 74 | $req->execute([$_POST['username']]); 75 | if($req->rowCount() == 0){ 76 | $req = $pdo->prepare('UPDATE users SET ip = ? WHERE username = ?'); 77 | $req->execute([$ip, $_POST['username']]); 78 | } 79 | 80 | $req = $pdo->prepare('SELECT token FROM tokens WHERE token_ownerid = ?'); 81 | $req->execute([$_SESSION['auth']->id]); 82 | $_SESSION['token_list'] = $req->fetchAll(); 83 | 84 | $req = $pdo->prepare('SELECT * FROM tokens WHERE (token_ownerid = ? AND token_use > 0)'); 85 | $req->execute([$_SESSION['auth']->id]); 86 | $_SESSION['token_number'] = $req->rowCount(); 87 | 88 | header("Location: account.php"); 89 | exit(); 90 | 91 | }else{ 92 | $_SESSION['flash']['danger'] = $language['error_invalid_login']; 93 | header("Location: login.php"); 94 | exit(); 95 | 96 | } 97 | 98 | 99 | } 100 | } 101 | 102 | 103 | 104 | } 105 | 106 | require 'inc/header.php'; 107 | ?> 108 | 109 | 110 | 114 | 115 |
116 | 117 |
118 | 119 |
120 |
121 |
122 | 123 | 124 |
125 |
126 | 127 | 128 |
129 | 130 | 131 | 132 |
133 |
134 | 135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /web_files/referral.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | query("SELECT * FROM tokens_activation WHERE uid = '$uid'"); 19 | if($req->rowCount() == 0){ 20 | echo '
You need to use at least 1 token to view this page.
'; 21 | include 'inc/footer.php'; 22 | die(); 23 | 24 | } 25 | 26 | if(isset($_POST['referral'])){ 27 | // referral code added/edited 28 | $referral_code = htmlentities($_POST['referral']); 29 | 30 | // first, we check if user already have a referral code 31 | $req = $pdo->prepare("SELECT * FROM referral_codes WHERE uid = ?"); 32 | $req->execute([$_SESSION['auth']->id]); 33 | 34 | if($req->rowCount() == 1){ 35 | //user already have a referral code 36 | $req = $pdo->prepare("UPDATE referral_codes SET code = ?, date_created = CURRENT_TIMESTAMP WHERE uid = ?"); 37 | $req->execute([$referral_code, $_SESSION['auth']->id]); 38 | $_SESSION['flash']['success'] = "Referral code successfully created."; 39 | header("Location: referral.php"); 40 | exit(); 41 | }else{ 42 | // user doesnt have a referral code 43 | $req = $pdo->prepare("INSERT INTO referral_codes SET uid = ?, code = ?"); 44 | $req->execute([$_SESSION['auth']->id, $referral_code]); 45 | $_SESSION['flash']['success'] = "Referral code successfully created."; 46 | header("Location: referral.php"); 47 | exit(); 48 | } 49 | 50 | } 51 | 52 | $req = $pdo->prepare("SELECT * FROM referral_codes WHERE uid = ?"); 53 | $req->execute([$_SESSION['auth']->id]); 54 | 55 | if($req->rowCount() == 1){ 56 | while($row = $req->fetch()){ 57 | $code = $row->code; 58 | $btn_text = "Edit"; 59 | } 60 | }else{ 61 | $btn_text = "Create"; 62 | $code = ""; 63 | } 64 | 65 | ?> 66 | 67 |
68 |

Referral

69 |
70 |

Referral Code

71 | 72 |
73 |
74 | 75 | 76 |
77 | 78 | 79 | 80 |
81 | 82 |
83 |

Referral List

84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | query("SELECT * FROM referral_users WHERE owner_userid = '".$_SESSION['auth']->id."'"); 96 | if($req->rowCount() == 0){ 97 | echo "No referral."; 98 | }else{ 99 | while($row = $req->fetch()) : 100 | $r = $pdo->query("SELECT * FROM tokens_activation WHERE uid = '$row->user_id'"); 101 | $count = $r->rowCount(); 102 | 103 | $r = $pdo->query("SELECT * FROM users WHERE id = '$row->user_id'"); 104 | $username = $r->fetch()->username; 105 | ?> 106 | 107 | 108 | 109 | 110 | 112 | 113 |
IDUsernamePurchased tokens
id ?>
114 |
115 |
116 | 117 | 118 | 119 | 121 | -------------------------------------------------------------------------------- /web_files/reported.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | prepare("SELECT * FROM reported_list WHERE vac = 'true'"); 9 | $req->execute(); 10 | $num_vac = $req->rowCount(); 11 | 12 | $req = $pdo->prepare("SELECT * FROM reported_list WHERE ow = 'true'"); 13 | $req->execute(); 14 | $num_ow = $req->rowCount(); 15 | 16 | $req = $pdo->prepare("SELECT * FROM reported_list"); 17 | $req->execute(); 18 | $num_report = $req->rowCount(); 19 | ?> 20 | 21 |

Reported players

22 |
REPORTED: | OW BANNED: | VAC BANNED:
23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | prepare('SELECT * FROM reported_list ORDER BY id DESC'); 39 | $req->execute(); 40 | $result = $req->fetchall(); 41 | 42 | foreach($result as $row){ 43 | 44 | if($row->vac == "true"){ 45 | $vac = "
"; 46 | }else{ 47 | $vac = "
"; 48 | } 49 | 50 | if($row->ow == "true"){ 51 | $ow = "
"; 52 | }else{ 53 | $ow = "
"; 54 | } 55 | 56 | if(ctype_digit($row->inventory_value)){ 57 | $inventory_value = "$row->inventory_value"; 58 | }else{ 59 | $inventory_value = $row->inventory_value; 60 | } 61 | 62 | 63 | echo " 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | "; 74 | } 75 | 76 | ?> 77 | 78 |
IDSteamIDDateInventory ValueLogs
OW
VAC
$row->id$row->steamid$row->datum$inventory_valueReport log$ow$vac
79 | 80 | 81 | -------------------------------------------------------------------------------- /web_files/update/index.php: -------------------------------------------------------------------------------- 1 | prepare('SELECT * FROM users WHERE username = ?'); 12 | $req->execute([$username]); 13 | if($req->rowCount() == 1){ 14 | $is_admin = $req->fetch()->is_admin; 15 | }else{ 16 | $is_admin = NULL; 17 | } 18 | $req->execute([$username]); 19 | if($req->rowCount() == 1){ 20 | $password_db = $req->fetch()->password; 21 | }else{ 22 | $password_db = NULL; 23 | } 24 | 25 | if(password_verify($password, $password_db) AND $is_admin == 1){ 26 | $_SESSION['update-auth'] = "OK"; 27 | header("Location: update.php"); 28 | exit(); 29 | }else{ 30 | echo '
Invalid login
'; 31 | } 32 | } 33 | ?> 34 | 35 | 36 | 37 | 38 | 39 |

Please, log-in.

40 |
41 | 42 |
43 | 44 | 45 |
46 | 47 |
48 | 49 |
50 | 51 | 52 |
53 | 54 |
55 | 56 | 57 |
58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /web_files/update/update.php: -------------------------------------------------------------------------------- 1 | prepare($sql_request); 27 | $req->execute(); 28 | 29 | $sql_error = "Successfully imported $file_name."; 30 | 31 | } catch (PDOException $e) { 32 | $sql_error = "
SQL Error:
".$e->getMessage()."
"; 33 | } 34 | 35 | 36 | }else{ 37 | $error = 'Error: Invalid file.'; 38 | } 39 | } 40 | 41 | if(isset($_GET['logout'])){ 42 | unset($_SESSION['update-auth']); 43 | header("Location: index.php"); 44 | exit(); 45 | } 46 | ?> 47 | 48 | 49 | 57 | 58 | 59 | 60 | 61 | 62 |
63 | Logout 64 | 65 |

SQL Import

66 |
67 |
68 | 69 | 70 |
71 | 72 |
73 | 74 | 75 |
76 | 77 | 78 | -------------------------------------------------------------------------------- /web_files/whitelist.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | prepare('SELECT token FROM tokens WHERE token_ownerid = ? AND token_use > 0 AND token_type = "whitelist"'); 32 | $req->execute([$_SESSION['auth']->id]); 33 | $_SESSION['token_list'] = $req->fetchAll(); 34 | 35 | $req = $pdo->prepare('SELECT * FROM tokens WHERE (token_ownerid = ? AND token_use > 0 AND token_type = "whitelist")'); 36 | $req->execute([$_SESSION['auth']->id]); 37 | $_SESSION['token_number'] = $req->rowCount(); 38 | 39 | } 40 | 41 | if(!isset($_SESSION['token_number'])){ 42 | $have_token = '0'; 43 | }elseif($_SESSION['token_number'] > 0){ 44 | $have_token = '1'; 45 | }else{ 46 | $have_token = '0'; 47 | } 48 | 49 | if(isset($_POST['profile']) AND !empty($_POST['profile'])){ 50 | if((strstr($_POST['profile'], "http://steamcommunity.com/profiles/")) or (strstr($_POST['profile'], "https://steamcommunity.com/profiles/")) or (strstr($_POST['profile'], "http://steamcommunity.com/id/")) or (strstr($_POST['profile'], "https://steamcommunity.com/id/"))){ 51 | // Valid link 52 | $url = $_POST['profile']; 53 | $parsed = parse_url($url); 54 | 55 | if(isset($parsed['scheme'])){ 56 | if($parsed['scheme'] == "http" OR $parsed['scheme'] == "https"){ 57 | 58 | } 59 | }else{ 60 | $url = "http://" . $url; 61 | } 62 | $steam_url = $url . '?xml=1'; 63 | $xml = simplexml_load_file(rawurlencode($steam_url)); 64 | 65 | 66 | $steamid = (string) $xml->{'steamID64'}; 67 | //$steamid = simplexml_load_file($xml); 68 | 69 | }else{ 70 | // Invalid link 71 | //unset($_SESSION['report']->steamid); 72 | $_SESSION['flash']['danger'] = $language['converter_invalid_steamid']; 73 | header("Location: commend.php"); 74 | exit(); 75 | 76 | } 77 | 78 | } 79 | 80 | require 'inc/header.php'; 81 | ?> 82 | 83 | 84 |

Whitelist

85 | 86 |
87 |
88 | SteamID converter 89 | 90 |
91 | 92 |
93 | 94 | 96 | 97 |
98 | 99 | 108 |
109 |
110 |
111 | 112 | 113 |
114 | 115 | 116 | 117 | 118 | 119 |
120 | 121 |
122 |
123 |
124 | 125 | 126 | 127 |
128 | 129 | 149 | 150 | 151 | 154 | -------------------------------------------------------------------------------- /web_files/whitelisted.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 |

Whitelisted players

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | prepare('SELECT * FROM whitelist'); 21 | $req->execute(); 22 | $result = $req->fetchall(); 23 | 24 | foreach($result as $row){ 25 | echo " 26 | 27 | 28 | 29 | 30 | 31 | "; 32 | } 33 | 34 | ?> 35 | 36 |
IDSteamIDDate
$row->id$row->steamid$row->added_date
37 | 38 | 39 | --------------------------------------------------------------------------------