├── data
├── info
│ └── filler.txt
├── .htaccess
├── accounts
│ └── keys
│ │ └── filler.txt
└── levels
│ └── deleted
│ └── filler.txt
├── dashboard
├── errors
│ ├── 400
│ │ └── index.php
│ ├── 403
│ │ └── index.php
│ ├── 404
│ │ └── index.php
│ ├── 500
│ │ └── index.php
│ ├── 502
│ │ └── index.php
│ ├── index.php
│ ├── 404.php
│ └── 418.php
├── login
│ ├── api.php
│ └── logout.php
├── stats
│ ├── index.php
│ ├── favourite.php
│ ├── deleteSong.php
│ ├── quests.php
│ ├── renameSong.php
│ ├── favouriteSongs.php
│ └── dailyTable.php
├── incl
│ ├── flags
│ │ ├── cz.png
│ │ ├── es.png
│ │ ├── fr.png
│ │ ├── id.png
│ │ ├── it.png
│ │ ├── pl.png
│ │ ├── pt.png
│ │ ├── ru.png
│ │ ├── tr.png
│ │ ├── ua.png
│ │ ├── us.png
│ │ └── vi.png
│ ├── no-cover.png
│ ├── socials
│ │ ├── vk.png
│ │ ├── twitch.png
│ │ ├── discord.png
│ │ ├── twitter.png
│ │ └── youtube.png
│ ├── fontawesome
│ │ ├── webfonts
│ │ │ ├── fa-brands-400.ttf
│ │ │ ├── fa-solid-900.ttf
│ │ │ ├── fa-brands-400.woff2
│ │ │ ├── fa-regular-400.ttf
│ │ │ ├── fa-solid-900.woff2
│ │ │ ├── fa-regular-400.woff2
│ │ │ ├── fa-v4compatibility.ttf
│ │ │ └── fa-v4compatibility.woff2
│ │ └── css
│ │ │ ├── solid.min.css
│ │ │ ├── regular.min.css
│ │ │ ├── solid.css
│ │ │ ├── regular.css
│ │ │ ├── v5-font-face.min.css
│ │ │ ├── v5-font-face.css
│ │ │ ├── v4-font-face.min.css
│ │ │ └── v4-font-face.css
│ ├── graph.js
│ ├── auth.php
│ ├── XOR.php
│ └── imgcolr.js
├── messenger
│ └── .htaccess
├── profile
│ └── .htaccess
├── clan
│ └── .htaccess
├── lang
│ └── switchLang.php
├── api
│ ├── getLastFeaturedID.php
│ ├── runCron.php
│ ├── whoRated.php
│ ├── sends.php
│ ├── getGMD.php
│ ├── addSong.php
│ └── makePost.php
├── .htaccess
├── levels
│ ├── rateLevel.php
│ └── gauntlets.php
├── download
│ └── updater.php
├── account
│ ├── unlisted.php
│ └── mods.php
└── sfxs
│ └── update.php
├── likeGJItem.php
├── likeGJItem19.php
├── likeGJItem20.php
├── likeGJItem21.php
├── likeGJLevel.php
├── accounts
├── syncGJAccount.php
├── accountManagement.php
├── activate.php
├── loginGJAccount.php
├── syncGJAccount20.php
├── backupGJAccount.php
└── registerGJAccount.php
├── getAccountURL.php
├── getGJLevels.php
├── getGJLevels19.php
├── getGJLevels20.php
├── getGJLevels21.php
├── getGJRewards.php
├── getGJScores.php
├── getGJScores19.php
├── getGJScores20.php
├── getGJSongInfo.php
├── getGJUsers20.php
├── likeGJItem211.php
├── rateGJDemon21.php
├── rateGJLevel.php
├── rateGJStars20.php
├── rateGJStars211.php
├── downloadGJLevel.php
├── getCustomContentURL.php
├── getGJComments.php
├── getGJComments19.php
├── getGJComments20.php
├── getGJComments21.php
├── getGJCreators.php
├── getGJCreators19.php
├── getGJDailyLevel.php
├── getGJMapPacks.php
├── getGJMessages20.php
├── getGJUserInfo20.php
├── reportGJLevel.php
├── restoreGJItems.php
├── submitGJUserInfo.php
├── suggestGJStars20.php
├── updateGJDesc20.php
├── uploadGJLevel.php
├── uploadGJLevel19.php
├── uploadGJLevel20.php
├── uploadGJLevel21.php
├── blockGJUser20.php
├── deleteGJComment.php
├── deleteGJComment20.php
├── downloadGJLevel19.php
├── downloadGJLevel20.php
├── downloadGJLevel21.php
├── downloadGJLevel22.php
├── getGJChallenges.php
├── getGJCommentHistory.php
├── getGJGauntlets.php
├── getGJGauntlets21.php
├── getGJLevelLists.php
├── getGJLevelScores.php
├── getGJLevelScores211.php
├── getGJMapPacks20.php
├── getGJMapPacks21.php
├── getGJSecretReward.php
├── getGJTopArtists.php
├── getGJUserList20.php
├── requestUserAccess.php
├── unblockGJUser20.php
├── updateGJUserScore.php
├── uploadGJComment.php
├── uploadGJComment19.php
├── uploadGJComment20.php
├── uploadGJComment21.php
├── uploadGJMessage20.php
├── deleteGJAccComment20.php
├── deleteGJComment19.php
├── deleteGJLevelList.php
├── deleteGJLevelUser20.php
├── deleteGJMessages20.php
├── downloadGJMessage20.php
├── getGJLevelScoresPlat.php
├── removeGJFriend20.php
├── updateGJUserScore19.php
├── updateGJUserScore20.php
├── updateGJUserScore21.php
├── updateGJUserScore22.php
├── uploadGJAccComment20.php
├── uploadGJLevelList.php
├── getGJAccountComments20.php
├── updateGJAccSettings20.php
├── getGJFriendRequests20.php
├── readGJFriendRequest20.php
├── uploadFriendRequest20.php
├── acceptGJFriendRequest20.php
├── database
└── accounts
│ ├── backupGJAccountNew.php
│ └── syncGJAccountNew.php
├── deleteGJFriendRequests20.php
├── _updates
├── 2017-11-19.sql
├── 2017-12-03.sql
├── 2020-09-13.sql
├── 2017-11-27.sql
├── 2024-01-22.sql
├── 2021-08-30.sql
├── 2022-03-25.sql
├── 2023-11-23.sql
├── 2017-12-09.sql
├── 2024-01-11.sql
├── 2017-11-20.sql
├── 2022-02-20.sql
├── 2017-11-13.sql
├── 2018-03-07.sql
├── 2022-07-14.sql
├── 2018-03-29.sql
├── 2019-06-15.sql
├── 2021-10-15.sql
├── 2020-02-05.sql
├── 2021-08-31.sql
├── README.md
├── 2023-12-20.sql
└── 2021-03-13.sql
├── incl
├── lib
│ ├── defuse-crypto.phar
│ ├── songReup.php
│ ├── XORCipher.php
│ ├── generateHash.php
│ ├── GJPCheck.php
│ └── connection.php
├── misc
│ ├── getAccountURL.php
│ ├── restoreGJItems.php
│ ├── submitGJUserInfo.php
│ ├── likeGJItem.php
│ └── getTopArtists.php
├── relationships
│ ├── readGJFriendRequest.php
│ ├── unblockGJUser.php
│ ├── deleteGJFriendRequests.php
│ ├── removeGJFriend.php
│ ├── blockGJUser.php
│ ├── acceptGJFriendRequest.php
│ ├── uploadFriendRequest.php
│ ├── getGJUserList.php
│ └── getGJFriendRequests.php
├── levels
│ ├── rateGJLevel.php
│ ├── rateGJStars.php
│ ├── reportGJLevel.php
│ ├── suggestGJStars.php
│ ├── updateGJDesc.php
│ ├── rateGJDemon.php
│ ├── deleteGJLevelUser.php
│ └── getGJDailyLevel.php
├── mods
│ └── requestUserAccess.php
├── levelpacks
│ ├── getGJGauntlets.php
│ ├── deleteGJLevelList.php
│ ├── getGJMapPacks.php
│ └── uploadGJLevelList.php
├── messages
│ ├── deleteGJMessages.php
│ ├── downloadGJMessage.php
│ ├── getGJMessages.php
│ └── uploadGJMessage.php
├── comments
│ ├── deleteGJAccComment.php
│ ├── deleteGJComment.php
│ ├── uploadGJAccComment.php
│ └── getGJAccountComments.php
├── profiles
│ ├── updateGJAccSettings.php
│ └── getGJUsers.php
├── rewards
│ ├── getGJSecretReward.php
│ └── getGJChallenges.php
└── scores
│ └── getGJCreators.php
├── config
├── connection.php
├── topArtists.php
├── proxy.php
├── translit
│ ├── TranslitAscii.php
│ ├── data
│ │ ├── all.php
│ │ ├── bg.php
│ │ ├── ru.php
│ │ ├── be.php
│ │ ├── mk.php
│ │ ├── el.php
│ │ ├── kk.php
│ │ └── hy.php
│ ├── TranslitKa.php
│ ├── TranslitUk.php
│ └── TranslitBe.php
├── reuploadAcc.php
├── dailyChests.php
├── mail.php
└── mail
│ └── Exception.php
├── sfx
├── .htaccess
└── handler.php
├── music
├── .htaccess
└── handler.php
├── .gitattributes
├── Dockerfile
├── nginx.conf
├── .gitignore
└── README.md
/data/info/filler.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/data/.htaccess:
--------------------------------------------------------------------------------
1 | Deny from all
--------------------------------------------------------------------------------
/data/accounts/keys/filler.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/data/levels/deleted/filler.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/errors/index.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/login/api.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/stats/index.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/likeGJItem.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/likeGJItem19.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/likeGJItem20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/likeGJItem21.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/likeGJLevel.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/accounts/syncGJAccount.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getAccountURL.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJLevels.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJLevels19.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJLevels20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJLevels21.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJRewards.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJScores.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJScores19.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJScores20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJSongInfo.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJUsers20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/likeGJItem211.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/rateGJDemon21.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/rateGJLevel.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/rateGJStars20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/rateGJStars211.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/downloadGJLevel.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getCustomContentURL.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJComments.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJComments19.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJComments20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJComments21.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJCreators.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJCreators19.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJDailyLevel.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJMapPacks.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJMessages20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJUserInfo20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/reportGJLevel.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/restoreGJItems.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/submitGJUserInfo.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/suggestGJStars20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/updateGJDesc20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadGJLevel.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadGJLevel19.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadGJLevel20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadGJLevel21.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/accounts/accountManagement.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/blockGJUser20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/deleteGJComment.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/deleteGJComment20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/downloadGJLevel19.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/downloadGJLevel20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/downloadGJLevel21.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/downloadGJLevel22.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJChallenges.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJCommentHistory.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJGauntlets.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJGauntlets21.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJLevelLists.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJLevelScores.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJLevelScores211.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJMapPacks20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJMapPacks21.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJSecretReward.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJTopArtists.php:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/getGJUserList20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/requestUserAccess.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/unblockGJUser20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/updateGJUserScore.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadGJComment.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadGJComment19.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadGJComment20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadGJComment21.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadGJMessage20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/deleteGJAccComment20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/deleteGJComment19.php:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/deleteGJLevelList.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/deleteGJLevelUser20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/deleteGJMessages20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/downloadGJMessage20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJLevelScoresPlat.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/removeGJFriend20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/updateGJUserScore19.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/updateGJUserScore20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/updateGJUserScore21.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/updateGJUserScore22.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadGJAccComment20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadGJLevelList.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJAccountComments20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/updateGJAccSettings20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/getGJFriendRequests20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/readGJFriendRequest20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/uploadFriendRequest20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/acceptGJFriendRequest20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/database/accounts/backupGJAccountNew.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/database/accounts/syncGJAccountNew.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/deleteGJFriendRequests20.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_updates/2017-11-19.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `roles` ADD `modBadgeLevel` int(11) NOT NULL AFTER `commentColor`;
2 |
--------------------------------------------------------------------------------
/_updates/2017-12-03.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `roles` ADD `commandWeekly` INT NOT NULL DEFAULT '0' AFTER `commandDaily`;
2 |
--------------------------------------------------------------------------------
/dashboard/incl/flags/cz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/flags/cz.png
--------------------------------------------------------------------------------
/dashboard/incl/flags/es.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/flags/es.png
--------------------------------------------------------------------------------
/dashboard/incl/flags/fr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/flags/fr.png
--------------------------------------------------------------------------------
/dashboard/incl/flags/id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/flags/id.png
--------------------------------------------------------------------------------
/dashboard/incl/flags/it.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/flags/it.png
--------------------------------------------------------------------------------
/dashboard/incl/flags/pl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/flags/pl.png
--------------------------------------------------------------------------------
/dashboard/incl/flags/pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/flags/pt.png
--------------------------------------------------------------------------------
/dashboard/incl/flags/ru.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/flags/ru.png
--------------------------------------------------------------------------------
/dashboard/incl/flags/tr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/flags/tr.png
--------------------------------------------------------------------------------
/dashboard/incl/flags/ua.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/flags/ua.png
--------------------------------------------------------------------------------
/dashboard/incl/flags/us.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/flags/us.png
--------------------------------------------------------------------------------
/dashboard/incl/flags/vi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/flags/vi.png
--------------------------------------------------------------------------------
/dashboard/incl/no-cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/no-cover.png
--------------------------------------------------------------------------------
/incl/lib/defuse-crypto.phar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/incl/lib/defuse-crypto.phar
--------------------------------------------------------------------------------
/_updates/2020-09-13.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `roles` ADD `toolQuestsCreate` int(11) NOT NULL DEFAULT 0 AFTER `toolPackcreate`;
2 |
--------------------------------------------------------------------------------
/dashboard/incl/socials/vk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/socials/vk.png
--------------------------------------------------------------------------------
/dashboard/incl/socials/twitch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/socials/twitch.png
--------------------------------------------------------------------------------
/dashboard/incl/socials/discord.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/socials/discord.png
--------------------------------------------------------------------------------
/dashboard/incl/socials/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/socials/twitter.png
--------------------------------------------------------------------------------
/dashboard/incl/socials/youtube.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/socials/youtube.png
--------------------------------------------------------------------------------
/dashboard/errors/404.php:
--------------------------------------------------------------------------------
1 | printBox("-1", "", true);
--------------------------------------------------------------------------------
/config/connection.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/webfonts/fa-brands-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/fontawesome/webfonts/fa-brands-400.ttf
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/webfonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/fontawesome/webfonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/webfonts/fa-brands-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/fontawesome/webfonts/fa-brands-400.woff2
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/webfonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/fontawesome/webfonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/webfonts/fa-solid-900.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/fontawesome/webfonts/fa-solid-900.woff2
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/webfonts/fa-regular-400.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/fontawesome/webfonts/fa-regular-400.woff2
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/webfonts/fa-v4compatibility.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/fontawesome/webfonts/fa-v4compatibility.ttf
--------------------------------------------------------------------------------
/_updates/2017-11-27.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `songs` ADD `reuploadTime` int(11) NOT NULL DEFAULT '0' AFTER `levelsCount`;
2 | ALTER TABLE `accounts` ADD `cS` int(11) NOT NULL AFTER `frS`;
3 |
--------------------------------------------------------------------------------
/_updates/2024-01-22.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `users` ADD `sinfo` VARCHAR(100) NULL DEFAULT '' AFTER `dinfo`;
2 | ALTER TABLE `users` ADD `pinfo` VARCHAR(100) NULL DEFAULT '' AFTER `sinfo`;
3 |
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/webfonts/fa-v4compatibility.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MegaSa1nt/GMDprivateServer/HEAD/dashboard/incl/fontawesome/webfonts/fa-v4compatibility.woff2
--------------------------------------------------------------------------------
/_updates/2021-08-30.sql:
--------------------------------------------------------------------------------
1 | UPDATE levels SET starAuto = '0' WHERE starAuto <> '1';
2 | ALTER TABLE `levels` CHANGE `starAuto` `starAuto` TINYINT NOT NULL DEFAULT '0';
3 | DROP TABLE `poll`;
4 |
--------------------------------------------------------------------------------
/_updates/2022-03-25.sql:
--------------------------------------------------------------------------------
1 | UPDATE levels SET levelInfo = "" WHERE levelInfo = "0";
2 | UPDATE levels SET secret = "" WHERE secret = "0";
3 | UPDATE levels SET extraString = "" WHERE extraString = "0";
--------------------------------------------------------------------------------
/dashboard/messenger/.htaccess:
--------------------------------------------------------------------------------
1 | RewriteEngine On
2 | RewriteCond %{REQUEST_FILENAME} !-f
3 | RewriteCond %{REQUEST_FILENAME} !-d
4 | RewriteRule ^ %{REQUEST_URI}/../../messenger/?id=%{REQUEST_URI} [L]
5 |
--------------------------------------------------------------------------------
/sfx/.htaccess:
--------------------------------------------------------------------------------
1 | RewriteEngine On
2 | RewriteCond %{REQUEST_FILENAME} !-f
3 | RewriteCond %{REQUEST_FILENAME} !-d
4 | RewriteRule ^ %{REQUEST_URI}/../../sfx/handler.php?%{QUERY_STRING}&request=%{REQUEST_URI} [L]
--------------------------------------------------------------------------------
/music/.htaccess:
--------------------------------------------------------------------------------
1 | RewriteEngine On
2 | RewriteCond %{REQUEST_FILENAME} !-f
3 | RewriteCond %{REQUEST_FILENAME} !-d
4 | RewriteRule ^ %{REQUEST_URI}/../../music/handler.php?%{QUERY_STRING}&request=%{REQUEST_URI} [L]
--------------------------------------------------------------------------------
/_updates/2023-11-23.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `users` ADD `color3` INT NOT NULL DEFAULT '0' AFTER `color2`;
2 | ALTER TABLE `users` ADD `accSwing` INT NOT NULL DEFAULT '0' AFTER `accGlow`, ADD `accJetpack` INT NOT NULL DEFAULT '0' AFTER `accSwing`;
3 |
--------------------------------------------------------------------------------
/dashboard/profile/.htaccess:
--------------------------------------------------------------------------------
1 | RewriteEngine On
2 | RewriteCond %{REQUEST_FILENAME} !-f
3 | RewriteCond %{REQUEST_FILENAME} !-d
4 | RewriteCond %{REQUEST_URI} !^replies
5 | RewriteRule ^ %{REQUEST_URI}/../../profile/?id=%{REQUEST_URI} [L]
6 |
--------------------------------------------------------------------------------
/incl/misc/getAccountURL.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/login/logout.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/_updates/2017-12-09.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `accounts` CHANGE `cS` `cS` int(11) NOT NULL DEFAULT '0';
2 | ALTER TABLE `levels` CHANGE `levelString` `levelString` longtext COLLATE utf8_unicode_ci;
3 | ALTER TABLE `levels` CHANGE `rateDate` `rateDate` bigint(20) NOT NULL DEFAULT '0';
4 |
--------------------------------------------------------------------------------
/_updates/2024-01-11.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `users` ADD `dinfo` VARCHAR(100) NULL DEFAULT '' AFTER `accJetpack`, ADD `dinfow` INT NULL DEFAULT 0 AFTER `dinfo`, ADD `dinfog` INT NULL DEFAULT 0 AFTER `dinfow`;
2 | ALTER TABLE `users` DROP `dinfow`, DROP `dinfog`; /* You know what? Fuck it! */
3 |
--------------------------------------------------------------------------------
/_updates/2017-11-20.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `roles` ADD `modBadgeLevel` int(11) NOT NULL AFTER `commentColor`;
2 | ALTER TABLE `levelscores` ADD `attempts` int(11) NOT NULL DEFAULT '0' AFTER `uploadDate`;
3 | ALTER TABLE `levelscores` ADD `coins` int(11) NOT NULL DEFAULT '0' AFTER `attempts`;
4 |
--------------------------------------------------------------------------------
/dashboard/errors/418.php:
--------------------------------------------------------------------------------
1 | printBox("
Error 418
image by Tygrysek", "", true);
--------------------------------------------------------------------------------
/_updates/2022-02-20.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `levels` ADD `unlisted2` INT NOT NULL DEFAULT '0' AFTER `isLDM`;
2 | ALTER TABLE `levels` ADD `wt` INT NOT NULL DEFAULT '0' AFTER `unlisted2`;
3 | ALTER TABLE `levels` ADD `wt2` INT NOT NULL DEFAULT '0' AFTER `wt`;
4 | ALTER TABLE `levels` ADD INDEX(`unlisted2`);
5 |
--------------------------------------------------------------------------------
/_updates/2017-11-13.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `dailyfeatures` ADD `type` int(11) NOT NULL DEFAULT '0' AFTER `timestamp`;
2 | ALTER TABLE `modactions` CHANGE `value4` `value4` varchar(255) COLLATE utf8_unicode_ci NOT NULL;
3 | ALTER TABLE `roles` ADD `commentColor` varchar(11) NOT NULL DEFAULT '000,000,000' AFTER `isDefault`;
4 |
--------------------------------------------------------------------------------
/_updates/2018-03-07.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `roles` ADD `commandSongOwn` int(11) NOT NULL DEFAULT '1' AFTER `commandSharecpAll`;
2 | ALTER TABLE `roles` ADD `commandSongAll` int(11) NOT NULL DEFAULT '0' AFTER `commandSongAll`;
3 | ALTER TABLE `songs` CHANGE `hash` `hash` varchar(256) COLLATE utf8_unicode_ci NOT NULL DEFAULT '';
4 |
--------------------------------------------------------------------------------
/config/topArtists.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/dashboard/clan/.htaccess:
--------------------------------------------------------------------------------
1 | RewriteEngine On
2 | RewriteCond %{REQUEST_FILENAME} !-f
3 | RewriteCond %{REQUEST_FILENAME} !-d
4 | RewriteCond %{REQUEST_URI} !^/replies.php
5 | RewriteCond %{REQUEST_URI} !/settings
6 | RewriteRule ^ %{REQUEST_URI}/../../clan/?id=%{REQUEST_URI} [L]
7 |
8 | RewriteCond %{REQUEST_URI} /settings
9 | RewriteRule ^ %{REQUEST_URI}/../../../clan/?id=%{REQUEST_URI} [L]
10 |
--------------------------------------------------------------------------------
/config/proxy.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/incl/misc/restoreGJItems.php:
--------------------------------------------------------------------------------
1 | getIDFromPost();
9 |
10 | if(!file_exists("../../data/info/$id")) exit("-1");
11 | echo XORCipher::cipher(ExploitPatch::url_base64_decode(file_get_contents("../../data/info/$id")), 24157);
12 | ?>
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/_updates/2022-07-14.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `accounts` ADD `gjp2` VARCHAR(255) NULL AFTER `password`;
2 | ALTER TABLE `users` ADD `moons` INT NOT NULL DEFAULT '0' AFTER `diamonds`;
3 | ALTER TABLE `levels` ADD `settingsString` MEDIUMTEXT NOT NULL DEFAULT '' AFTER `wt2`;
4 | ALTER TABLE `levelscores` ADD `clicks` INT NOT NULL DEFAULT '0' AFTER `coins`, ADD `time` INT NOT NULL DEFAULT '0' AFTER `clicks`, ADD `progresses` TEXT NOT NULL DEFAULT '' AFTER `time`, ADD `dailyID` INT NOT NULL DEFAULT '0' AFTER `progresses`;
5 |
--------------------------------------------------------------------------------
/_updates/2018-03-29.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE `modipperms` (
2 | `categoryID` int(11) NOT NULL,
3 | `actionFreeCopy` int(11) NOT NULL DEFAULT '0'
4 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
5 |
6 | ALTER TABLE `modips` ADD `modipCategory` int(11) NOT NULL AFTER `accountID`;
7 | ALTER TABLE `roles` ADD `modipCategory` int(11) NOT NULL DEFAULT '0' AFTER `accountID`;
8 |
9 | ALTER TABLE `modipperms`
10 | ADD PRIMARY KEY (`categoryID`);
11 |
12 | ALTER TABLE `modipperms`
13 | MODIFY `categoryID` int(11) NOT NULL AUTO_INCREMENT;
--------------------------------------------------------------------------------
/config/translit/TranslitAscii.php:
--------------------------------------------------------------------------------
1 |
13 | */
14 |
15 | class TranslitAscii
16 | {
17 | public function convert($text)
18 | {
19 | return iconv('UTF-8', 'ASCII//TRANSLIT', $text);
20 | }
21 | }
--------------------------------------------------------------------------------
/_updates/2019-06-15.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE `suggest` (
2 | `suggestBy` int(11) NOT NULL DEFAULT '0',
3 | `suggestLevelId` int(11) NOT NULL DEFAULT '0',
4 | `suggestDifficulty` int(11) NOT NULL DEFAULT '0' COMMENT '0 - NA 10 - Easy 20 - Normal 30 - Hard 40 - Harder 50 - Insane/Demon/Auto',
5 | `suggestStars` int(11) NOT NULL DEFAULT '0',
6 | `suggestFeatured` int(11) NOT NULL DEFAULT '0',
7 | `suggestAuto` int(11) NOT NULL DEFAULT '0',
8 | `suggestDemon` int(11) NOT NULL DEFAULT '0',
9 | `timestamp` int(11) NOT NULL
10 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--------------------------------------------------------------------------------
/config/reuploadAcc.php:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/incl/misc/submitGJUserInfo.php:
--------------------------------------------------------------------------------
1 | getIDFromPost();
9 | if(empty($_POST["levelsInfo"])) exit('-2');
10 | /* GD doesn't XOR encrypts this data, i just want to encrypt it */
11 | $data = ExploitPatch::url_base64_encode(XORCipher::cipher($_POST["levelsInfo"], 24157));
12 | file_put_contents("../../data/info/$id", $data);
13 | echo 1;
14 | ?>
--------------------------------------------------------------------------------
/incl/relationships/readGJFriendRequest.php:
--------------------------------------------------------------------------------
1 | prepare("UPDATE friendreqs SET isNew='0' WHERE ID = :requestID AND toAccountID = :targetAcc");
12 | $query->execute([':requestID' => $requestID, ':targetAcc' => $accountID]);
13 | echo "1";
--------------------------------------------------------------------------------
/_updates/2021-10-15.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `roles` ADD `actionDeleteComment` INT NOT NULL DEFAULT '0' AFTER `actionSuggestRating`;
2 |
3 | ALTER TABLE `accounts` DROP `friends`;
4 | ALTER TABLE `accounts` DROP `blockedBy`;
5 | ALTER TABLE `accounts` DROP `blocked`;
6 | ALTER TABLE `accounts` DROP `saveKey`;
7 | ALTER TABLE `accounts` DROP `saveData`;
8 | ALTER TABLE `accounts` DROP `userID`;
9 | ALTER TABLE `accounts` DROP `secret`;
10 |
11 | ALTER TABLE `accounts` ADD `isActive` BOOLEAN NOT NULL DEFAULT FALSE AFTER `discordLinkReq`;
12 | ALTER TABLE `accounts` ADD INDEX(`isActive`);
13 |
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/css/solid.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | * Copyright 2022 Fonticons, Inc.
5 | */
6 | :host,:root{--fa-style-family-classic:"Font Awesome 6 Free";--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Free"}@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}.fa-solid,.fas{font-weight:900}
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/css/regular.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | * Copyright 2022 Fonticons, Inc.
5 | */
6 | :host,:root{--fa-style-family-classic:"Font Awesome 6 Free";--fa-font-regular:normal 400 1em/1 "Font Awesome 6 Free"}@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.ttf) format("truetype")}.fa-regular,.far{font-weight:400}
--------------------------------------------------------------------------------
/_updates/2020-02-05.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `levels` CHANGE `levelString` `levelString` longtext COLLATE utf8_unicode_ci DEFAULT NULL;
2 | ALTER TABLE `roles` ADD `actionSuggestRating` int(11) NOT NULL DEFAULT 0 AFTER `actionRequestMod`;
3 | ALTER TABLE `roles` ADD `toolSuggestlist` int(11) NOT NULL DEFAULT 0 AFTER `toolModactions`;
4 | ALTER TABLE `roles` CHANGE `modBadgeLevel` `modBadgeLevel` int(11) NOT NULL DEFAULT 0;
5 | ALTER TABLE `suggest` `ID` int(11) NOT NULL, FIRST;
6 | ALTER TABLE `actions` ADD KEY `type` (`type`);
7 | ALTER TABLE `suggest` ADD PRIMARY KEY (`ID`);
8 | ALTER TABLE `suggest` MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
9 |
--------------------------------------------------------------------------------
/incl/lib/songReup.php:
--------------------------------------------------------------------------------
1 | prepare("INSERT INTO songs (ID, name, authorID, authorName, size, download)
8 | VALUES (:id, :name, :authorID, :authorName, :size, :download)");
9 | $query->execute([':id'=>$resultarray[1], ':name' => $resultarray[3], ':authorID' => $resultarray[5], ':authorName' => $resultarray[7], ':size' => $resultarray[9], ':download' => $resultarray[13]]);
10 | return $db->lastInsertId();
11 | }
12 | }
13 | ?>
--------------------------------------------------------------------------------
/incl/lib/XORCipher.php:
--------------------------------------------------------------------------------
1 | getIDFromPost();
11 | $permState = $gs->checkPermission($accountID, "actionRateStars");
12 | if($permState) {
13 | $difficulty = $gs->getDiffFromRating($rating);
14 | $gs->changeDifficulty($accountID, $levelID, $difficulty["diff"], $difficulty["auto"], $difficulty["demon"]);
15 | }
16 | echo 1;
--------------------------------------------------------------------------------
/config/dailyChests.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/incl/relationships/unblockGJUser.php:
--------------------------------------------------------------------------------
1 | prepare("DELETE FROM blocks WHERE person1 = :accountID AND person2 = :targetAccountID");
14 | if($query->execute([':accountID' => $accountID, ':targetAccountID' => $targetAccountID])) $gs->logAction($accountID, 32, $targetAccountID);
15 | echo "1";
--------------------------------------------------------------------------------
/dashboard/lang/switchLang.php:
--------------------------------------------------------------------------------
1 | printBox("Language changed. Click here to continue
");
13 | }else{
14 | $dl->printBox("Invalid language. Click here to continue");
15 | }
--------------------------------------------------------------------------------
/incl/mods/requestUserAccess.php:
--------------------------------------------------------------------------------
1 | getMaxValuePermission($accountID,"actionRequestMod") >= 1) { // checks if they have mod
12 | $permState = $gs->getMaxValuePermission($accountID,"modBadgeLevel"); // checks mod badge level so it knows what to show
13 | if ($permState >= 2){ // if the mod badge level is higher than 2, it will still show elder mod message
14 | exit("2");
15 | }
16 | echo $permState;
17 | }
18 | ?>
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/css/solid.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | * Copyright 2022 Fonticons, Inc.
5 | */
6 | :root, :host {
7 | --fa-style-family-classic: 'Font Awesome 6 Free';
8 | --fa-font-solid: normal 900 1em/1 'Font Awesome 6 Free'; }
9 |
10 | @font-face {
11 | font-family: 'Font Awesome 6 Free';
12 | font-style: normal;
13 | font-weight: 900;
14 | font-display: block;
15 | src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
16 |
17 | .fas,
18 | .fa-solid {
19 | font-weight: 900; }
20 |
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/css/regular.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | * Copyright 2022 Fonticons, Inc.
5 | */
6 | :root, :host {
7 | --fa-style-family-classic: 'Font Awesome 6 Free';
8 | --fa-font-regular: normal 400 1em/1 'Font Awesome 6 Free'; }
9 |
10 | @font-face {
11 | font-family: 'Font Awesome 6 Free';
12 | font-style: normal;
13 | font-weight: 400;
14 | font-display: block;
15 | src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype"); }
16 |
17 | .far,
18 | .fa-regular {
19 | font-weight: 400; }
20 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM php:8.1.31-apache
2 |
3 | # Dockerfile's Metadata
4 | LABEL name="GMDprivateServer" \
5 | description="A Geometry Dash Server Emulator"
6 |
7 | # Install necessary dependencies
8 | RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates && \
9 | docker-php-ext-install pdo pdo_mysql && \
10 | apt-get clean && rm -rf /var/lib/apt/lists/*
11 |
12 | # Set the working directory
13 | WORKDIR /var/www/html
14 |
15 | # Clone the repository
16 | ARG BRANCH=master
17 | RUN git clone --branch ${BRANCH} https://github.com/MegaSa1nt/GMDprivateServer.git . && \
18 | chown -R www-data:www-data /var/www/html
19 |
20 | # Export Apache's port
21 | EXPOSE 80
22 |
23 | # Start Apache
24 | CMD ["apache2-foreground"]
25 |
--------------------------------------------------------------------------------
/config/translit/data/all.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 |
13 | return array_merge(
14 | include (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'cyrillic.php'),
15 | include (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'el.php'),
16 | include (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'hy.php'),
17 | include (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'kk.php'),
18 | include (dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mk.php'));
19 |
--------------------------------------------------------------------------------
/incl/levelpacks/getGJGauntlets.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT ID,level1,level2,level3,level4,level5 FROM gauntlets WHERE level5 != '0' ORDER BY ID ASC");
8 | $query->execute();
9 | $result = $query->fetchAll();
10 | foreach($result as &$gauntlet){
11 | $lvls = $gauntlet["level1"].",".$gauntlet["level2"].",".$gauntlet["level3"].",".$gauntlet["level4"].",".$gauntlet["level5"];
12 | $gauntletstring .= "1:".$gauntlet["ID"].":3:".$lvls."|";
13 | $string .= $gauntlet["ID"].$lvls;
14 | }
15 | $gauntletstring = substr($gauntletstring, 0, -1);
16 | echo $gauntletstring;
17 | echo "#".GenerateHash::genSolo2($string);
18 | ?>
--------------------------------------------------------------------------------
/incl/relationships/deleteGJFriendRequests.php:
--------------------------------------------------------------------------------
1 | prepare("DELETE FROM friendreqs WHERE (accountID = :accountID AND toAccountID = :targetAccountID) OR (toAccountID = :accountID AND accountID = :targetAccountID) LIMIT 1");
12 | if($query->execute([':accountID' => $accountID, ':targetAccountID' => $targetAccountID])) $gs->logAction($accountID, 30, $targetAccountID);
13 | echo "1";
--------------------------------------------------------------------------------
/incl/levels/rateGJStars.php:
--------------------------------------------------------------------------------
1 | checkPermission($accountID, "actionRateStars");
14 | if($permState) {
15 | $difficulty = $gs->getDiffFromStars($stars);
16 | $gs->changeDifficulty($accountID, $levelID, $difficulty["diff"], $difficulty["auto"], $difficulty["demon"]);
17 | }
18 | echo 1;
--------------------------------------------------------------------------------
/dashboard/api/getLastFeaturedID.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT starFeatured FROM levels ORDER BY starFeatured DESC LIMIT 1");
10 | $featuredID->execute();
11 | $featuredID = $featuredID->fetchColumn();
12 |
13 | if (!$featuredID) exit(json_encode(['dashboard' => true, 'success' => false, 'error' => 1, 'message' => 'No featured level found.']));
14 |
15 | exit(json_encode(['dashboard' => true, 'success' => true, 'id' => $featuredID]));
16 | ?>
--------------------------------------------------------------------------------
/nginx.conf:
--------------------------------------------------------------------------------
1 | location ^~ /sfx/ {
2 | try_files $uri /sfx/handler.php?$query_string&request=$uri;
3 | }
4 | location ^~ /music/ {
5 | try_files $uri /music/handler.php?$query_string&request=$uri;
6 | }
7 | location ^~ /dashboard/clan/ {
8 | try_files $uri /dashboard/clan/index.php?id=$request_uri;
9 | }
10 | location ^~ /dashboard/profile/ {
11 | try_files $uri /dashboard/profile/index.php?id=$request_uri;
12 | }
13 | location ^~ /dashboard/demonlist/ {
14 | try_files $uri /dashboard/demonlist/index.php?id=$request_uri;
15 | }
16 | location ^~ /dashboard/messenger/ {
17 | try_files $uri /dashboard/messenger/index.php?id=$request_uri;
18 | }
19 | location ^~ /config/ {
20 | deny all;
21 | }
22 | location ^~ /data/ {
23 | deny all;
24 | }
25 | location ^~ /incl/ {
26 | deny all;
27 | }
28 |
--------------------------------------------------------------------------------
/incl/levels/reportGJLevel.php:
--------------------------------------------------------------------------------
1 | getIP();
11 | $query = "SELECT count(*) FROM reports WHERE levelID = :levelID AND hostname = :hostname";
12 | $query = $db->prepare($query);
13 | $query->execute([':levelID' => $levelID, ':hostname' => $ip]);
14 |
15 | if($query->fetchColumn() == 0){
16 | $query = $db->prepare("INSERT INTO reports (levelID, hostname) VALUES (:levelID, :hostname)");
17 | $query->execute([':levelID' => $levelID, ':hostname' => $ip]);
18 | echo $db->lastInsertId();
19 | }else{
20 | echo -1;
21 | }
22 | }
23 | ?>
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/css/v5-font-face.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | * Copyright 2022 Fonticons, Inc.
5 | */
6 | @font-face{font-family:"Font Awesome 5 Brands";font-display:block;font-weight:400;src:url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.ttf) format("truetype")}@font-face{font-family:"Font Awesome 5 Free";font-display:block;font-weight:900;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}@font-face{font-family:"Font Awesome 5 Free";font-display:block;font-weight:400;src:url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.ttf) format("truetype")}
--------------------------------------------------------------------------------
/dashboard/.htaccess:
--------------------------------------------------------------------------------
1 | ErrorDocument 400 /database/dashboard/errors/400/
2 | ErrorDocument 403 /database/dashboard/errors/403/
3 | ErrorDocument 404 /database/dashboard/errors/404/
4 | ErrorDocument 500 /database/dashboard/errors/500/
5 | ErrorDocument 502 /database/dashboard/errors/502/
6 |
7 |
8 | ExpiresActive On
9 | ExpiresDefault "access plus 1 seconds"
10 | ExpiresByType text/html "access plus 1 seconds"
11 | ExpiresByType image/gif "access plus 120 minutes"
12 | ExpiresByType image/jpeg "access plus 120 minutes"
13 | ExpiresByType image/png "access plus 120 minutes"
14 | ExpiresByType text/css "access plus 60 minutes"
15 | ExpiresByType text/javascript "access plus 60 minutes"
16 | ExpiresByType application/x-javascript "access plus 60 minutes"
17 | ExpiresByType text/xml "access plus 60 minutes"
18 |
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear on external disk
35 | .Spotlight-V100
36 | .Trashes
37 |
38 | # Directories potentially created on remote AFP share
39 | .AppleDB
40 | .AppleDesktop
41 | Network Trash Folder
42 | Temporary Items
43 | .apdisk
44 | incl/lib/debug.php
45 | dashboard/incl/lang/dev/append.php
46 | dashboard/incl/lang/dev/append.txt
47 |
--------------------------------------------------------------------------------
/incl/relationships/removeGJFriend.php:
--------------------------------------------------------------------------------
1 | prepare("DELETE FROM friendships WHERE (person1 = :accountID AND person2 = :targetAccountID) OR (person2 = :accountID AND person1 = :targetAccountID)");
14 | if($query->execute([':accountID' => $accountID, ':targetAccountID' => $targetAccountID])) $gs->logAction($accountID, 31, $targetAccountID);
15 | if($automaticCron) Cron::updateFriendsCount($accountID, false);
16 | echo "1";
--------------------------------------------------------------------------------
/config/mail.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/accounts/activate.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT accountID FROM accounts WHERE mail = :mail");
12 | $check->execute([':mail' => $mail]);
13 | $check = $check->fetch();
14 | if(empty($check)) {
15 | $gs->logAction(0, 4, 1);
16 | die("Nothing found!");
17 | } else {
18 | $query = $db->prepare("UPDATE accounts SET isActive = '1', mail = 'activated' WHERE accountID = :acc");
19 | $query->execute([':acc' => $check["accountID"]]);
20 | $gs->logAction($check["accountID"], 3, 1);
21 | die("Account was successfully activated!");
22 | }
23 | }
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/css/v5-font-face.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | * Copyright 2022 Fonticons, Inc.
5 | */
6 | @font-face {
7 | font-family: 'Font Awesome 5 Brands';
8 | font-display: block;
9 | font-weight: 400;
10 | src: url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.ttf") format("truetype"); }
11 |
12 | @font-face {
13 | font-family: 'Font Awesome 5 Free';
14 | font-display: block;
15 | font-weight: 900;
16 | src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
17 |
18 | @font-face {
19 | font-family: 'Font Awesome 5 Free';
20 | font-display: block;
21 | font-weight: 400;
22 | src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype"); }
23 |
--------------------------------------------------------------------------------
/dashboard/incl/graph.js:
--------------------------------------------------------------------------------
1 | var ctx = document.getElementById("myChart");
2 | var myChart = new Chart(ctx, {
3 | type: 'line',
4 | data: {
5 | labels: ["sakuješ", "seš maincra", "je to pes", "omg", "1111!!!", "ders a spider in me boot"],
6 | datasets: [{
7 | label: 'test chart by covolto',
8 | data: [12, 19, 3, 5, 2, 3],
9 | backgroundColor: [
10 | 'rgba(255, 99, 132, 0.2)',
11 | 'rgba(54, 162, 235, 0.2)',
12 | 'rgba(255, 206, 86, 0.2)',
13 | 'rgba(75, 192, 192, 0.2)',
14 | 'rgba(153, 102, 255, 0.2)',
15 | 'rgba(255, 159, 64, 0.2)'
16 | ],
17 | borderColor: [
18 | 'rgba(255,99,132,1)',
19 | 'rgba(54, 162, 235, 1)',
20 | 'rgba(255, 206, 86, 1)',
21 | 'rgba(75, 192, 192, 1)',
22 | 'rgba(153, 102, 255, 1)',
23 | 'rgba(255, 159, 64, 1)'
24 | ],
25 | borderWidth: 10
26 | }]
27 | },
28 | options: {
29 | responsive: true,
30 | scales: {
31 | yAxes: [{
32 | ticks: {
33 | beginAtZero:true
34 | }
35 | }]
36 | }
37 | }
38 | });
--------------------------------------------------------------------------------
/incl/levelpacks/deleteGJLevelList.php:
--------------------------------------------------------------------------------
1 | getListOwner($listID)) {
11 | $listData = $db->prepare('SELECT * FROM lists WHERE listID = :listID AND accountID = :accountID');
12 | $listData->execute([':listID' => $listID, ':accountID' => $accountID]);
13 | $listData = $listData->fetch();
14 | $list = $db->prepare('DELETE FROM lists WHERE listID = :listID');
15 | $list->execute([':listID' => $listID]);
16 | $gs->logAction($accountID, 19, $listData['listName'], $listData['listlevels'], $listID, $listData['difficulty'], $listData['unlisted']);
17 | $gs->sendLogsListChangeWebhook($listID, $accountID, $listData);
18 | exit("1");
19 | } else exit("-1");
20 | ?>
--------------------------------------------------------------------------------
/incl/levels/suggestGJStars.php:
--------------------------------------------------------------------------------
1 | getDiffFromStars($stars);
13 | if($gs->checkPermission($accountID, "actionRateStars")) {
14 | $gs->featureLevel($accountID, $levelID, $feature);
15 | $gs->verifyCoinsLevel($accountID, $levelID, 1);
16 | $gs->rateLevel($accountID, $levelID, $stars, $difficulty["diff"], $difficulty["auto"], $difficulty["demon"]);
17 | exit('1');
18 | } elseif($gs->checkPermission($accountID, "actionSuggestRating")) {
19 | $gs->suggestLevel($accountID, $levelID, $difficulty["diff"], $stars, $feature, $difficulty["auto"], $difficulty["demon"]);
20 | exit('1');
21 | } else exit('-2');
22 | ?>
--------------------------------------------------------------------------------
/dashboard/api/runCron.php:
--------------------------------------------------------------------------------
1 | true, 'success' => false, 'error' => 1, 'message' => 'Please supply a valid account credentials.']));
16 | }
17 |
18 | $runCron = Cron::doEverything($accountID, true);
19 | if(!$runCron) {
20 | http_response_code(400);
21 | exit(json_encode(['dashboard' => true, 'success' => false, 'error' => 2, 'message' => 'Please wait a few minutes before running Cron again.']));
22 | }
23 |
24 | exit(json_encode(['dashboard' => true, 'success' => true]));
25 | ?>
--------------------------------------------------------------------------------
/_updates/2021-08-31.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE `actions_downloads` (
2 | `id` int(11) NOT NULL,
3 | `levelID` int(11) NOT NULL,
4 | `ip` varbinary(16) NOT NULL,
5 | `uploadDate` datetime NOT NULL DEFAULT current_timestamp()
6 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
7 |
8 | ALTER TABLE `actions_downloads`
9 | ADD PRIMARY KEY (`id`),
10 | ADD KEY `levelID` (`levelID`,`ip`,`uploadDate`) USING BTREE;
11 |
12 | ALTER TABLE `actions_downloads`
13 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
14 | COMMIT;
15 |
16 | CREATE TABLE `actions_likes` (
17 | `id` int(11) NOT NULL,
18 | `itemID` int(11) NOT NULL,
19 | `type` int(11) NOT NULL,
20 | `isLike` tinyint(4) NOT NULL,
21 | `ip` varbinary(16) NOT NULL,
22 | `uploadDate` datetime NOT NULL DEFAULT current_timestamp()
23 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
24 |
25 | ALTER TABLE `actions_likes`
26 | ADD PRIMARY KEY (`id`),
27 | ADD KEY `levelID` (`itemID`,`type`,`isLike`,`ip`,`uploadDate`) USING BTREE;
28 |
29 | ALTER TABLE `actions_likes`
30 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--------------------------------------------------------------------------------
/incl/relationships/blockGJUser.php:
--------------------------------------------------------------------------------
1 | prepare("INSERT INTO blocks (person1, person2) VALUES (:accountID, :targetAccountID)");
18 | $query->execute([':accountID' => $accountID, ':targetAccountID' => $targetAccountID]);
19 | // Remove from friend list if the two users were friends
20 | $query = $db->prepare("DELETE FROM friendships WHERE (person1 = :accountID AND person2 = :targetAccountID) OR (person1 = :targetAccountID AND person2 = :accountID)");
21 | $query->execute([':accountID' => $accountID, ':targetAccountID' => $targetAccountID]);
22 | if($automaticCron) Cron::updateFriendsCount($accountID, false);
23 | $gs->logAction($accountID, 29, $targetAccountID);
24 | echo 1;
--------------------------------------------------------------------------------
/dashboard/incl/auth.php:
--------------------------------------------------------------------------------
1 | query("SHOW COLUMNS FROM `accounts` LIKE 'auth'");
9 | $exist = $check->fetchAll();
10 | if(empty($exist)) return 'no';
11 | if($_SESSION["accountID"] != 0) {
12 | $query = $db->prepare("SELECT auth FROM accounts WHERE accountID = :id");
13 | $query->execute([':id' => $_SESSION["accountID"]]);
14 | $auth = $query->fetch();
15 | if($_COOKIE["auth"] != $auth["auth"]) $_SESSION["accountID"] = 0;
16 | } else {
17 | $query = $db->prepare("SELECT accountID FROM accounts WHERE auth = :id");
18 | $query->execute([':id' => $_COOKIE["auth"]]);
19 | $auth = $query->fetch();
20 | if(!empty($auth) AND $_COOKIE["auth"] != 'none') $_SESSION["accountID"] = $auth["accountID"];
21 | }
22 | return true;
23 | }
24 | }
25 | ?>
26 |
--------------------------------------------------------------------------------
/dashboard/stats/favourite.php:
--------------------------------------------------------------------------------
1 | prepare('SELECT * FROM songs WHERE ID = :ID');
9 | $check->execute([':ID' => $id]);
10 | $check = $check->fetchColumn();
11 | if(!empty($id) AND $_SESSION["accountID"] != 0 AND $check AND $check['isDisabled'] == 0) {
12 | $favourites = $db->prepare("SELECT * FROM favsongs WHERE songID = :id AND accountID = :aid");
13 | $favourites->execute([':id' => $id, ':aid' => $_SESSION["accountID"]]);
14 | $favourites = $favourites->fetch();
15 | if(!empty($favourites)) {
16 | $favourites = $db->prepare("DELETE FROM favsongs WHERE songID = :id AND accountID = :aid");
17 | $favourites->execute([':id' => $id, ':aid' => $_SESSION["accountID"]]);
18 | exit("1");
19 | } else {
20 | $favourites = $db->prepare("INSERT INTO favsongs (songID, accountID, timestamp) VALUES (:id, :aid, :time)");
21 | $favourites->execute([':id' => $id, ':aid' => $_SESSION["accountID"], ':time' => time()]);
22 | exit("1");
23 | }
24 | } else exit("-1");
25 | ?>
--------------------------------------------------------------------------------
/dashboard/levels/rateLevel.php:
--------------------------------------------------------------------------------
1 | 10 || $stars < 0) header('Location: '.$_SERVER['HTTP_REFERER']);
13 | $difficulty = $gs->getDiffFromStars($stars);
14 | if($gs->checkPermission($_SESSION["accountID"], "actionRateStars")) {
15 | $gs->featureLevel($_SESSION["accountID"], $levelID, $featured);
16 | $gs->verifyCoinsLevel($_SESSION["accountID"], $levelID, 1);
17 | $gs->rateLevel($_SESSION["accountID"], $levelID, $stars, $difficulty["diff"], $difficulty["auto"], $difficulty["demon"]);
18 | } elseif($gs->checkPermission($_SESSION["accountID"], "actionSuggestRating")) $gs->suggestLevel($_SESSION["accountID"], $levelID, $difficulty["diff"], $stars, $featured, $difficulty["auto"], $difficulty["demon"]);
19 | header('Location: '.$_SERVER['HTTP_REFERER']);
20 | ?>
--------------------------------------------------------------------------------
/dashboard/errors/400/index.php:
--------------------------------------------------------------------------------
1 | title($e);
8 | echo ''.$e.'
9 | '.$dl->getLocalizedString($e).'
10 | '.$dl->getLocalizedString($e.'!').'
';
11 | ?>
12 |
--------------------------------------------------------------------------------
/dashboard/errors/403/index.php:
--------------------------------------------------------------------------------
1 | title($e);
8 | echo ''.$e.'
9 | '.$dl->getLocalizedString($e).'
10 | '.$dl->getLocalizedString($e.'!').'
';
11 | ?>
12 |
--------------------------------------------------------------------------------
/dashboard/errors/404/index.php:
--------------------------------------------------------------------------------
1 | title($e);
8 | echo ''.$e.'
9 | '.$dl->getLocalizedString($e).'
10 | '.$dl->getLocalizedString($e.'!').'
';
11 | ?>
12 |
--------------------------------------------------------------------------------
/dashboard/errors/500/index.php:
--------------------------------------------------------------------------------
1 | title($e);
8 | echo ''.$e.'
9 | '.$dl->getLocalizedString($e).'
10 | '.$dl->getLocalizedString($e.'!').'
';
11 | ?>
12 |
--------------------------------------------------------------------------------
/dashboard/errors/502/index.php:
--------------------------------------------------------------------------------
1 | title($e);
8 | echo ''.$e.'
9 | '.$dl->getLocalizedString($e).'
10 | '.$dl->getLocalizedString($e.'!').'
';
11 | ?>
12 |
--------------------------------------------------------------------------------
/incl/messages/deleteGJMessages.php:
--------------------------------------------------------------------------------
1 | prepare("DELETE FROM messages WHERE messageID IN (".$messages.") AND accID=:accountID LIMIT 10");
13 | $query->execute([':accountID' => $accountID]);
14 | $query = $db->prepare("DELETE FROM messages WHERE messageID IN (".$messages.") AND toAccountID=:accountID LIMIT 10");
15 | $query->execute([':accountID' => $accountID]);
16 | echo "1";
17 | } else {
18 | $query = $db->prepare("DELETE FROM messages WHERE messageID=:messageID AND accID=:accountID LIMIT 1");
19 | $query->execute([':messageID' => $messageID, ':accountID' => $accountID]);
20 | $query = $db->prepare("DELETE FROM messages WHERE messageID=:messageID AND toAccountID=:accountID LIMIT 1");
21 | $query->execute([':messageID' => $messageID, ':accountID' => $accountID]);
22 | echo "1";
23 | }
24 | ?>
25 |
--------------------------------------------------------------------------------
/incl/relationships/acceptGJFriendRequest.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT accountID, toAccountID FROM friendreqs WHERE ID = :requestID");
15 | $query->execute([':requestID' => $requestID]);
16 | $request = $query->fetch();
17 | $reqAccountID = $request["accountID"];
18 | $toAccountID = $request["toAccountID"];
19 | if($toAccountID != $accountID OR $reqAccountID == $accountID) exit("-1");
20 | $query = $db->prepare("INSERT INTO friendships (person1, person2, isNew1, isNew2) VALUES (:accountID, :targetAccountID, 1, 1)");
21 | $query->execute([':accountID' => $reqAccountID, ':targetAccountID' => $toAccountID]);
22 | $gs->logAction($accountID, 28, $reqAccountID);
23 | $query = $db->prepare("DELETE from friendreqs WHERE ID = :requestID LIMIT 1");
24 | $query->execute([':requestID' => $requestID]);
25 | if($automaticCron) Cron::updateFriendsCount($accountID, false);
26 | echo "1";
27 | ?>
--------------------------------------------------------------------------------
/incl/levels/updateGJDesc.php:
--------------------------------------------------------------------------------
1 | substr_count($rawDesc, '')) {
22 | $tags = $tags - substr_count($rawDesc, '');
23 | for ($i = 0; $i < $tags; $i++) {
24 | $rawDesc .= '';
25 | }
26 | $levelDesc = ExploitPatch::url_base64_encode($rawDesc);
27 | }
28 | }
29 | $query = $db->prepare("UPDATE levels SET levelDesc = :levelDesc WHERE levelID = :levelID AND extID = :extID");
30 | $query->execute([':levelID' => $levelID, ':extID' => $id, ':levelDesc' => $levelDesc]);
31 | $gs->logAction($id, 21, $levelID, $levelDesc);
32 | echo 1;
33 | ?>
--------------------------------------------------------------------------------
/accounts/loginGJAccount.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT accountID FROM accounts WHERE userName LIKE :userName");
10 | $query->execute([':userName' => $userName]);
11 | if($query->rowCount() == 0) exit("-1");
12 | $accountID = $query->fetchColumn();
13 | $pass = 0;
14 | if(!empty($_POST["password"])) $pass = GeneratePass::isValidUsrname($userName, $_POST["password"]);
15 | elseif(!empty($_POST["gjp2"])) $pass = GeneratePass::isGJP2ValidUsrname($userName, $_POST["gjp2"]);
16 | if($pass == 1) {
17 | $gs->logAction($accountID, 2);
18 | $userID = $gs->getUserID($accountID, $userName);
19 | if(!is_numeric($udid)) {
20 | $query2 = $db->prepare("SELECT userID FROM users WHERE extID = :udid");
21 | $query2->execute([':udid' => $udid]);
22 | $usrid2 = $query2->fetchColumn();
23 | $query2 = $db->prepare("UPDATE levels SET userID = :userID, extID = :extID WHERE userID = :usrid2");
24 | $query2->execute([':userID' => $userID, ':extID' => $accountID, ':usrid2' => $usrid2]);
25 | }
26 | exit($accountID.",".$userID);
27 | } elseif($pass == '-1') exit('-12');
28 | exit('-1');
29 | ?>
--------------------------------------------------------------------------------
/config/mail/Exception.php:
--------------------------------------------------------------------------------
1 |
10 | * @author Jim Jagielski (jimjag)
11 | * @author Andy Prevost (codeworxtech)
12 | * @author Brent R. Matzelle (original founder)
13 | * @copyright 2012 - 2020 Marcus Bointon
14 | * @copyright 2010 - 2012 Jim Jagielski
15 | * @copyright 2004 - 2009 Andy Prevost
16 | * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
17 | * @note This program is distributed in the hope that it will be useful - WITHOUT
18 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 | * FITNESS FOR A PARTICULAR PURPOSE.
20 | */
21 |
22 | namespace PHPMailer\PHPMailer;
23 |
24 | /**
25 | * PHPMailer exception handler.
26 | *
27 | * @author Marcus Bointon
28 | */
29 | class Exception extends \Exception
30 | {
31 | /**
32 | * Prettify error message output.
33 | *
34 | * @return string
35 | */
36 | public function errorMessage()
37 | {
38 | return '' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . "
\n";
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/incl/comments/deleteGJAccComment.php:
--------------------------------------------------------------------------------
1 | getUserID($accountID);
12 | $getCommentData = $db->prepare('SELECT * FROM acccomments WHERE commentID = :commentID');
13 | $getCommentData->execute([':commentID' => $commentID]);
14 | $getCommentData = $getCommentData->fetch();
15 | if(!$getCommentData) exit("-1");
16 | if($gs->checkPermission($accountID, "actionDeleteComment") == 1) {
17 | $query = $db->prepare("DELETE FROM acccomments WHERE commentID = :commentID LIMIT 1");
18 | if($query->execute([':commentID' => $commentID])) $gs->logAction($accountID, 12, $getCommentData['userName'], $getCommentData['comment'], $accountID, $commentID, ($getCommentData['likes'] - $getCommentData['dislikes']));
19 | } else {
20 | $query = $db->prepare("DELETE FROM acccomments WHERE commentID=:commentID AND userID=:userID LIMIT 1");
21 | if($query->execute([':userID' => $userID, ':commentID' => $commentID])) $gs->logAction($accountID, 12, $getCommentData['userName'], $getCommentData['comment'], $gs->getExtID($userID), $commentID, ($getCommentData['likes'] - $getCommentData['dislikes']));
22 | }
23 | echo "1";
--------------------------------------------------------------------------------
/config/translit/data/bg.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 |
12 | return array (
13 | // upper case
14 | 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G',
15 | 'Д' => 'D', 'Е' => 'E', 'З' => 'Z', 'И' => 'I',
16 | 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N',
17 | 'О' => 'O', 'П' => 'P', 'Р' => 'R', 'С' => 'S',
18 | 'Т' => 'T', 'Ф' => 'F', 'Ж' => 'ZH', 'Ч' => 'CH',
19 | 'Ш' => 'SH', 'Щ' => 'SHT', 'Х' => 'H', 'Ц' => 'TS',
20 | 'Ь' => 'Y', 'Й' => 'Y', 'Ю' => 'YU', 'Я' => 'YA',
21 | 'У' => 'U', 'Ъ' => 'A', 'ѣ' => 'YA', 'Ѫ' => 'Ŭ',
22 | // lower case
23 | 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g',
24 | 'д' => 'd', 'е' => 'e', 'з' => 'z', 'и' => 'i',
25 | 'к' => 'k', 'л' => 'l', 'м' => 'm', 'н' => 'n',
26 | 'о' => 'o', 'п' => 'p', 'р' => 'r', 'с' => 's',
27 | 'т' => 't', 'ф' => 'f', 'ж' => 'zh', 'ч' => 'ch',
28 | 'ш' => 'sh', 'щ' => 'sht', 'х' => 'h', 'ц' => 'ts',
29 | 'ь' => 'y', 'й' => 'y', 'ю' => 'yu', 'я' => 'ya',
30 | 'у' => 'u', 'ъ' => 'a', 'ѣ' => 'ya', 'ѫ' => 'ŭ',
31 | );
32 |
--------------------------------------------------------------------------------
/config/translit/data/ru.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 |
13 | return array (
14 | // upper case
15 | 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'G',
16 | 'Д' => 'D', 'Е' => 'E', 'Ё' => 'E', 'Ж' => 'Zh',
17 | 'З' => 'Z', 'И' => 'I', 'Й' => 'Y', 'К' => 'K',
18 | 'Л' => 'L', 'М' => 'M', 'Н' => 'N', 'О' => 'O',
19 | 'П' => 'P', 'Р' => 'R', 'С' => 'S', 'Т' => 'T',
20 | 'У' => 'U', 'Ф' => 'F', 'Х' => 'Kh', 'Ц' => 'Ts',
21 | 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Shch', 'Ъ' => 'Ye',
22 | 'Ы' => 'Y', 'Ь' => '', 'Э' => 'E', 'Ю' => 'Yu',
23 | 'Я' => 'Ya',
24 | // lower case
25 | 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'g',
26 | 'д' => 'd', 'е' => 'e', 'ё' => 'e', 'ж' => 'zh',
27 | 'з' => 'z', 'и' => 'i', 'й' => 'y', 'к' => 'k',
28 | 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o',
29 | 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't',
30 | 'у' => 'u', 'ф' => 'f', 'х' => 'kh', 'ц' => 'ts',
31 | 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'shch', 'ъ' => 'ye',
32 | 'ы' => 'y', 'ь' => '', 'э' => 'e', 'ю' => 'yu',
33 | 'я' => 'ya',
34 | );
35 |
36 |
--------------------------------------------------------------------------------
/incl/relationships/uploadFriendRequest.php:
--------------------------------------------------------------------------------
1 | query("SELECT ID FROM `blocks` WHERE person1 = $toAccountID AND person2 = $accountID")->fetchAll(PDO::FETCH_COLUMN);
15 | $frSOnly = $db->query("SELECT frS FROM `accounts` WHERE accountID = $toAccountID AND frS = 1")->fetchAll(PDO::FETCH_COLUMN);
16 | $query = $db->prepare("SELECT count(*) FROM friendreqs WHERE (accountID=:accountID AND toAccountID=:toAccountID) OR (toAccountID=:accountID AND accountID=:toAccountID)");
17 | $query->execute([':accountID' => $accountID, ':toAccountID' => $toAccountID]);
18 | if($query->fetchColumn() == 0 && empty($blocked[0]) && empty($frSOnly[0])) {
19 | $query = $db->prepare("INSERT INTO friendreqs (accountID, toAccountID, comment, uploadDate)
20 | VALUES (:accountID, :toAccountID, :comment, :uploadDate)");
21 | $query->execute([':accountID' => $accountID, ':toAccountID' => $toAccountID, ':comment' => $comment, ':uploadDate' => $uploadDate]);
22 | $gs->logAction($accountID, 33, $toAccountID, $comment);
23 | echo 1;
24 | } else echo '-1';
25 | ?>
26 |
--------------------------------------------------------------------------------
/dashboard/incl/XOR.php:
--------------------------------------------------------------------------------
1 | text2ascii($key);
9 | $plaintext = $this->text2ascii($plaintext);
10 |
11 | $keysize = count($key);
12 | $input_size = count($plaintext);
13 |
14 | $cipher = "";
15 |
16 | for ($i = 0; $i < $input_size; $i++)
17 | $cipher .= chr($plaintext[$i] ^ $key[$i % $keysize]);
18 |
19 | return $cipher;
20 | }
21 |
22 | public function crack($cipher, $keysize) {
23 | $cipher = $this->text2ascii($cipher);
24 | $occurences = $key = array();
25 | $input_size = count($cipher);
26 |
27 | for ($i = 0; $i < $input_size; $i++) {
28 | $j = $i % $keysize;
29 | if (++$occurences[$j][$cipher[$i]] > $occurences[$j][$key[$j]])
30 | $key[$j] = $cipher[$i];
31 | }
32 |
33 | return $this->ascii2text(array_map(function($v) { return $v ^ 32; }, $key));
34 | }
35 |
36 | public function plaintext($cipher, $key) {
37 | $key = $this->text2ascii($key);
38 | $cipher = $this->text2ascii($cipher);
39 | $keysize = count($key);
40 | $input_size = count($cipher);
41 | $plaintext = "";
42 |
43 | for ($i = 0; $i < $input_size; $i++)
44 | $plaintext .= chr($cipher[$i] ^ $key[$i % $keysize]);
45 |
46 | return $plaintext;
47 | }
48 |
49 | private function text2ascii($text) {
50 | return array_map('ord', str_split($text));
51 | }
52 |
53 | private function ascii2text($ascii) {
54 | $text = "";
55 |
56 | foreach($ascii as $char)
57 | $text .= chr($char);
58 |
59 | return $text;
60 | }
61 | }
--------------------------------------------------------------------------------
/incl/levelpacks/getGJMapPacks.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT * FROM `mappacks` ORDER BY `stars` ASC LIMIT 10 OFFSET $packpage");
13 | else $query = $db->prepare("SELECT * FROM `mappacks` ORDER BY `ID` ASC LIMIT 10 OFFSET $packpage");
14 | $query->execute();
15 | $result = $query->fetchAll();
16 | $packcount = $query->rowCount();
17 | foreach($result as &$mappack) {
18 | $lvlsmultistring[] = ['ID' => $mappack["ID"], 'stars' => $mappack["stars"], 'coins' => $mappack["coins"]];
19 | $colors2 = $mappack["colors2"];
20 | if($colors2 == "none" OR $colors2 == "") $colors2 = $mappack["rgbcolors"];
21 | $mappackstring .= "1:".$mappack["ID"].":2:".ExploitPatch::translit($mappack["name"]).":3:".$mappack["levels"].":4:".$mappack["stars"].":5:".$mappack["coins"].":6:".$mappack["difficulty"].":7:".$mappack["rgbcolors"].":8:".$colors2."|";
22 | }
23 | $query = $db->prepare("SELECT count(*) FROM mappacks");
24 | $query->execute();
25 | $totalpackcount = $query->fetchColumn();
26 | $mappackstring = substr($mappackstring, 0, -1);
27 | echo $mappackstring;
28 | echo "#".$totalpackcount.":".$packpage.":10";
29 | echo "#";
30 | echo GenerateHash::genPack($lvlsmultistring);
31 | ?>
--------------------------------------------------------------------------------
/incl/profiles/updateGJAccSettings.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT * FROM accounts WHERE accountID = :accountID");
18 | $getAccountData->execute([':accountID' => $accountID]);
19 | $getAccountData = $getAccountData->fetch();
20 |
21 | if(substr($youtubeurl, 0, 4) == "../@") $youtubeurl = "@" . substr($youtubeurl, 4);
22 | $youtubeurl = mb_ereg_replace("(?!^@)[^a-zA-Z0-9_]", "", $youtubeurl);
23 | $twitter = mb_ereg_replace("[^a-zA-Z0-9_]", "", $twitter);
24 | $twitch = mb_ereg_replace("[^a-zA-Z0-9_]", "", $twitch);
25 |
26 | $query = $db->prepare("UPDATE accounts SET mS = :mS, frS = :frS, cS = :cS, youtubeurl = :youtubeurl, twitter = :twitter, twitch = :twitch WHERE accountID = :accountID");
27 | $query->execute([':mS' => $mS, ':frS' => $frS, ':cS' => $cS, ':youtubeurl' => $youtubeurl, ':accountID' => $accountID, ':twitch' => $twitch, ':twitter' => $twitter]);
28 | echo 1;
29 | $gs->logAction($accountID, 27, $mS, $frS, $cS);
30 | $gs->sendLogsAccountChangeWebhook($accountID, $accountID, $getAccountData);
31 | ?>
--------------------------------------------------------------------------------
/config/translit/data/be.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 |
13 | return array (
14 | // upper case
15 | 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'H',
16 | 'Ґ' => 'G', 'ДЖ' => 'Dhz', 'Дж' => 'Dhz', 'ДЗ' => 'Dz',
17 | 'Дз' => 'Dz', 'Д' => 'D', 'Е' => 'E', 'Ё' => 'Ë',
18 | 'Ж' => 'Zh', 'З' => 'Z', 'І' => 'I', 'Й' => 'Ĭ',
19 | 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N',
20 | 'О' => 'O', 'П' => 'P', 'Р' => 'R', 'С' => 'S',
21 | 'ТС' => 'T-s', 'Тс' => 'T-s', 'Т' => 'T', 'У' => 'U',
22 | 'Ў' => 'W', 'Ф' => 'F', 'Х' => 'Kh', 'Ц' => 'Ts',
23 | 'Ч' => 'Ch', 'Ш' => 'Sh', '’' => ', ', 'Ы' => 'Ȳ',
24 | 'Ь' => '', 'Э' => 'É', 'Ю' => 'Yu', 'Я' => 'Ya',
25 | // lower case
26 | 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'h',
27 | 'ґ' => 'g', 'дж' => 'dhz', 'дз' => 'dz', 'д' => 'd',
28 | 'е' => 'e', 'ё' => 'ë', 'ж' => 'zh', 'з' => 'z',
29 | 'і' => 'i', 'й' => 'ĭ', 'к' => 'k', 'л' => 'l',
30 | 'м' => 'm', 'н' => 'n', 'о' => 'o', 'п' => 'p',
31 | 'р' => 'r', 'с' => 's', 'тс' => 't-s', 'т' => 't',
32 | 'у' => 'u', 'ў' => 'w', 'ф' => 'f', 'х' => 'kh',
33 | 'ц' => 'ts', 'ч' => 'ch', 'ш' => 'sh', 'ы' => 'ȳ',
34 | 'ь' => '', 'э' => 'é', 'ю' => 'yu', 'я' => 'ya',
35 | );
36 |
--------------------------------------------------------------------------------
/incl/levels/rateGJDemon.php:
--------------------------------------------------------------------------------
1 | checkPermission($id, "actionRateDemon") == false){
18 | exit("-1");
19 | }
20 | $auto = 0;
21 | $demon = 0;
22 | switch($rating){
23 | case 1:
24 | $dmn = 3;
25 | $dmnname = "Easy";
26 | break;
27 | case 2:
28 | $dmn = 4;
29 | $dmnname = "Medium";
30 | break;
31 | case 3:
32 | $dmn = 0;
33 | $dmnname = "Hard";
34 | break;
35 | case 4:
36 | $dmn = 5;
37 | $dmnname = "Insane";
38 | break;
39 | case 5:
40 | $dmn = 6;
41 | $dmnname = "Extreme";
42 | break;
43 | }
44 | $timestamp = time();
45 | $query = $db->prepare("UPDATE levels SET starDemonDiff=:demon WHERE levelID=:levelID");
46 | $query->execute([':demon' => $dmn, ':levelID'=>$levelID]);
47 | $query = $db->prepare("INSERT INTO modactions (type, value, value3, timestamp, account) VALUES ('10', :value, :levelID, :timestamp, :id)");
48 | $query->execute([':value' => $dmnname, ':timestamp' => $timestamp, ':id' => $id, ':levelID' => $levelID]);
49 | echo $levelID;
50 | ?>
51 |
--------------------------------------------------------------------------------
/incl/levels/deleteGJLevelUser.php:
--------------------------------------------------------------------------------
1 | getUserID($accountID);
17 | $query = $db->prepare("SELECT * FROM levels WHERE levelID = :levelID AND userID = :userID AND starStars = 0");
18 | $query->execute([':levelID' => $levelID, ':userID' => $userID]);
19 | $getLevelData = $query->fetch();
20 |
21 | if(!$getLevelData) exit("-1");
22 |
23 | $query = $db->prepare("DELETE FROM comments WHERE levelID = :levelID");
24 | $query->execute([':levelID' => $levelID]);
25 | $query = $db->prepare("DELETE FROM levels WHERE levelID = :levelID AND userID = :userID LIMIT 1");
26 | $query->execute([':levelID' => $levelID, ':userID' => $userID]);
27 | if(file_exists("../../data/levels/$levelID")) rename("../../data/levels/$levelID","../../data/levels/deleted/$levelID");
28 | echo "1";
29 | $gs->logAction($accountID, 8, $getLevelData['levelName'], $getLevelData['levelDesc'], $getLevelData['extID'], $levelID, $getLevelData['starStars'], $getLevelData['starDifficulty']);
30 | $gs->sendLogsLevelChangeWebhook($levelID, $accountID, $getLevelData);
31 | if($automaticCron) {
32 | Cron::autoban($accountID, false);
33 | Cron::updateCreatorPoints($accountID, false);
34 | Cron::updateSongsUsage($accountID, false);
35 | }
36 | ?>
--------------------------------------------------------------------------------
/config/translit/data/mk.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 |
12 | return array (
13 | // upper case
14 | 'А' => 'A',
15 | 'Б' => 'B',
16 | 'В' => 'V',
17 | 'Г' => 'G',
18 | 'Д' => 'D',
19 | 'Ѓ' => 'GJ',
20 | 'Е' => 'E',
21 | 'Ж' => 'ZH',
22 | 'З' => 'Z',
23 | 'Ѕ' => 'DZ',
24 | 'И' => 'I',
25 | 'Ј' => 'J',
26 | 'К' => 'K',
27 | 'Л' => 'L',
28 | 'Љ' => 'LJ',
29 | 'М' => 'M',
30 | 'Н' => 'N',
31 | 'Њ' => 'NJ',
32 | 'О' => 'O',
33 | 'П' => 'P',
34 | 'Р' => 'R',
35 | 'С' => 'S',
36 | 'Т' => 'T',
37 | 'Ќ' => 'KJ',
38 | 'У' => 'U',
39 | 'Ф' => 'F',
40 | 'Х' => 'H',
41 | 'Ц' => 'C',
42 | 'Ч' => 'CH',
43 | 'Џ' => 'DJ',
44 | 'Ш' => 'SH',
45 | // lower case
46 | 'а' => 'a',
47 | 'б' => 'b',
48 | 'в' => 'v',
49 | 'г' => 'g',
50 | 'д' => 'd',
51 | 'ѓ' => 'gj',
52 | 'е' => 'e',
53 | 'ж' => 'zh',
54 | 'з' => 'z',
55 | 'ѕ' => 'dz',
56 | 'и' => 'i',
57 | 'ј' => 'j',
58 | 'к' => 'k',
59 | 'л' => 'l',
60 | 'љ' => 'lj',
61 | 'м' => 'm',
62 | 'н' => 'n',
63 | 'њ' => 'nj',
64 | 'о' => 'o',
65 | 'п' => 'p',
66 | 'р' => 'r',
67 | 'с' => 's',
68 | 'т' => 't',
69 | 'ќ' => 'kj',
70 | 'у' => 'u',
71 | 'ф' => 'f',
72 | 'х' => 'h',
73 | 'ц' => 'c',
74 | 'ч' => 'ch',
75 | 'џ' => 'dj',
76 | 'ш' => 'sh',
77 | );
78 |
--------------------------------------------------------------------------------
/incl/rewards/getGJSecretReward.php:
--------------------------------------------------------------------------------
1 | getIDFromPost() ?: 0;
12 | $rewardKey = ExploitPatch::charclean($_POST["rewardKey"]);
13 | $chk = XORCipher::cipher(ExploitPatch::url_base64_decode(substr(ExploitPatch::charclean($_POST["chk"]), 5)), 59182);
14 |
15 | $vaultCode = $db->prepare('SELECT * FROM vaultcodes WHERE code = :code');
16 | $vaultCode->execute([':code' => base64_encode($rewardKey)]);
17 | $vaultCode = $vaultCode->fetch();
18 |
19 | if(!$vaultCode || $vaultCode['uses'] == 0 || ($vaultCode['duration'] != 0 && $vaultCode['duration'] <= time())) exit('-1');
20 |
21 | $check = $db->prepare("SELECT count(*) FROM actions WHERE type = 38 AND value = :vaultCode AND account = :extID");
22 | $check->execute([':vaultCode' => $vaultCode['rewardID'], ':extID' => $extID]);
23 | $check = $check->fetchColumn();
24 | if($check) exit('-1');
25 |
26 | if($vaultCode['uses'] > 0) {
27 | $reduceUses = $db->prepare('UPDATE vaultcodes SET uses = uses - 1 WHERE rewardID = :rewardID');
28 | $reduceUses->execute([':rewardID' => $vaultCode['rewardID']]);
29 | }
30 |
31 | $gs->logAction($extID, 38, $vaultCode['rewardID'], $vaultCode['rewards'], $rewardKey);
32 | $string = ExploitPatch::url_base64_encode(XORCipher::cipher('Sa1nt:'.$chk.':'.$vaultCode['rewardID'].':1:'.$vaultCode['rewards'], 59182));
33 | $hash = $gh->genSolo4($string);
34 | echo 'Sa1nt'.$string.'|'.$hash;
35 | ?>
--------------------------------------------------------------------------------
/dashboard/download/updater.php:
--------------------------------------------------------------------------------
1 | true, 'time' => $time, 'client' => $client]));
12 | } else {
13 | if($_GET["dl"] == "updater") $fileName = $file = "GDPS-Updater.exe";
14 | elseif($_GET["dl"] == "client") $fileName = $file = "GDPS-Client.exe";
15 | else $fileName = $file = $gdps.".zip";
16 | $bufferSize = 2097152;
17 | $filesize = filesize($file);
18 | $offset = 0;
19 | $length = $filesize;
20 | if (isset($_SERVER['HTTP_RANGE'])) {
21 | preg_match('/bytes=(\d+)-(\d+)?/', $_SERVER['HTTP_RANGE'], $matches);
22 | $offset = intval($matches[1]);
23 | $end = $matches[2] || $matches[2] === '0' ? intval($matches[2]) : $filesize - 1;
24 | $length = $end + 1 - $offset;
25 | header('HTTP/1.1 206 Partial Content');
26 | header("Content-Range: bytes $offset-$end/$filesize");
27 | }
28 | header('Content-Type: ' . mime_content_type($file));
29 | header("Content-Length: $filesize");
30 | header("Content-Disposition: attachment; filename=\"$fileName\"");
31 | header('Accept-Ranges: bytes');
32 |
33 | $file = fopen($file, 'r');
34 | fseek($file, $offset);
35 | while ($length >= $bufferSize)
36 | {
37 | print(fread($file, $bufferSize));
38 | $length -= $bufferSize;
39 | }
40 | if ($length) print(fread($file, $length));
41 | fclose($file);
42 | }
43 | ?>
--------------------------------------------------------------------------------
/incl/profiles/getGJUsers.php:
--------------------------------------------------------------------------------
1 | prepare($query);
13 | $query->execute([':str' => $str]);
14 | $result = $query->fetchAll();
15 | if(count($result) < 1) exit("-1");
16 | $countquery = "SELECT count(*) FROM users WHERE userName LIKE CONCAT('%', :str, '%')";
17 | $countquery = $db->prepare($countquery);
18 | $countquery->execute([':str' => $str]);
19 | $usercount = $countquery->fetchColumn();
20 | foreach($result as &$user) {
21 | $user["userName"] = $gs->makeClanUsername($user);
22 | $user['extID'] = is_numeric($user['extID']) ? $user['extID'] : 0;
23 | $userstring .= "1:".$user["userName"].":2:".$user["userID"].":13:".$user["coins"].":17:".$user["userCoins"].":9:".$user["icon"].":10:".$user["color1"].":11:".$user["color2"].":51:".$user["color3"].":14:".$user["iconType"].":15:".$user["special"].":16:".$user["extID"].":3:".$user["stars"].":8:".round($user["creatorPoints"],0,PHP_ROUND_HALF_DOWN).":4:".$user["demons"].":46:".$user["diamonds"].":52:".$user["moons"]."|";
24 | }
25 | $userstring = substr($userstring, 0, -1);
26 | echo $userstring;
27 | echo "#".$usercount.":".$usrpagea.":10";
28 | ?>
--------------------------------------------------------------------------------
/dashboard/stats/deleteSong.php:
--------------------------------------------------------------------------------
1 | false, 'error' => '0']));
17 | else {
18 | if($songid == 0) die(json_encode(['success' => false, 'error' => '-1']));
19 | $query = $db->prepare("SELECT reuploadID, isDisabled FROM ".$type." WHERE ID = :sid");
20 | $query->execute([':sid' => $songid]);
21 | $song = $query->fetch();
22 | if(!$song) die(json_encode(['success' => false, 'error' => '-2']));
23 | else {
24 | $check = $gs->checkPermission($accID, "dashboardManageSongs") ?: $accID == $song['reuploadID'];
25 | if(!$check) die(json_encode(['success' => false, 'error' => '-3']));
26 | if(!isset($_GET['disable'])) {
27 | $query = $db->prepare("DELETE FROM ".$type." WHERE ID = :sid");
28 | $query->execute([':sid' => $songid]);
29 | if(file_exists("../".$type."/".$songid.".".$format)) unlink("../".$type."/".$songid.".".$format);
30 | if(file_exists("../".$type."/".$songid."_temp.".$format)) unlink("../".$type."/".$songid."_temp.".$format);
31 | } else {
32 | $query = $db->prepare("UPDATE ".$type." SET isDisabled = :isDisabled WHERE ID = :sid");
33 | $query->execute([':sid' => $songid, ':isDisabled' => ($song['isDisabled'] == 0 ? 1 : 0)]);
34 | }
35 | die(json_encode(['success' => true]));
36 | }
37 | }
38 | ?>
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/css/v4-font-face.min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | * Copyright 2022 Fonticons, Inc.
5 | */
6 | @font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.ttf) format("truetype")}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.ttf) format("truetype");unicode-range:u+f003,u+f006,u+f014,u+f016-f017,u+f01a-f01b,u+f01d,u+f022,u+f03e,u+f044,u+f046,u+f05c-f05d,u+f06e,u+f070,u+f087-f088,u+f08a,u+f094,u+f096-f097,u+f09d,u+f0a0,u+f0a2,u+f0a4-f0a7,u+f0c5,u+f0c7,u+f0e5-f0e6,u+f0eb,u+f0f6-f0f8,u+f10c,u+f114-f115,u+f118-f11a,u+f11c-f11d,u+f133,u+f147,u+f14e,u+f150-f152,u+f185-f186,u+f18e,u+f190-f192,u+f196,u+f1c1-f1c9,u+f1d9,u+f1db,u+f1e3,u+f1ea,u+f1f7,u+f1f9,u+f20a,u+f247-f248,u+f24a,u+f24d,u+f255-f25b,u+f25d,u+f271-f274,u+f278,u+f27b,u+f28c,u+f28e,u+f29c,u+f2b5,u+f2b7,u+f2ba,u+f2bc,u+f2be,u+f2c0-f2c1,u+f2c3,u+f2d0,u+f2d2,u+f2d4,u+f2dc}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-v4compatibility.woff2) format("woff2"),url(../webfonts/fa-v4compatibility.ttf) format("truetype");unicode-range:u+f041,u+f047,u+f065-f066,u+f07d-f07e,u+f080,u+f08b,u+f08e,u+f090,u+f09a,u+f0ac,u+f0ae,u+f0b2,u+f0d0,u+f0d6,u+f0e4,u+f0ec,u+f10a-f10b,u+f123,u+f13e,u+f148-f149,u+f14c,u+f156,u+f15e,u+f160-f161,u+f163,u+f175-f178,u+f195,u+f1f8,u+f219,u+f27a}
--------------------------------------------------------------------------------
/_updates/README.md:
--------------------------------------------------------------------------------
1 | # Updating GMDprivateServer
2 | This directory contains all SQL files containing updates made to the database AFTER October 28, 2017. This gives everyone running a version that supports Geometry Dash 2.11 or newer the opportunity to update to the latest version of the private server for new features, exploit patches and performance improvements.
3 |
4 | ## How to update
5 | 1. Make a backup of the `config` and `data` directories in the server files.
6 | - You can optionally create a backup of all server files in case the update fails.
7 | 2. Make a backup of the server database (you can use the export feature in phpMyAdmin).
8 | 3. Determine which version of `database.sql` your server is currently using
9 | - In most cases you can take a look inside the file itself and look at the date mentioned on line 6 as `Generation Time`. In some cases the line might say `Vytvořeno` in Czech, in this case you can use [Google Translate](https://translate.google.com/) to translate the timestamp into a language you understand.
10 | 4. Download a copy of the private server repository.
11 | 5. Compare the config directory in the new version with your version and edit the files as necessary to set new variables.
12 | 6. Delete all files from the server EXCEPT for the `config` and `data` directories.
13 | - **IMPORTANT: If you delete the `data` directory and do not have a backup, you will lose ALL player-made levels.**
14 | 7. Upload the new server files including your new config files (if applicable) to the server.
15 | 8. Import all SQL files in this directory with timestamps newer than your current version `database.sql`. (You can use the import feature in phpMyAdmin for this).
16 |
17 | TL;DR upload new server files, import relevant SQL files from this directory
--------------------------------------------------------------------------------
/config/translit/data/el.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 |
12 | return array (
13 | // upper case
14 | 'Α' => 'A',
15 | 'Ά' => 'Á',
16 | 'Β' => 'V',
17 | 'Γ' => 'G',
18 | 'Δ' => 'D',
19 | 'Ε' => 'E',
20 | 'Έ' => 'É',
21 | 'Ζ' => 'Z',
22 | 'Η' => 'I',
23 | 'Ή' => 'Í',
24 | 'Θ' => 'Th',
25 | 'Ι' => 'I',
26 | 'Ί' => 'Í',
27 | 'Ϊ' => 'Ï',
28 | 'ΐ' => 'ḯ',
29 | 'Κ' => 'K',
30 | 'Λ' => 'L',
31 | 'Μ' => 'M',
32 | 'Ν' => 'N',
33 | 'Ξ' => 'X',
34 | 'Ο' => 'O',
35 | 'Ό' => 'Ó',
36 | 'Π' => 'P',
37 | 'Ρ' => 'R',
38 | 'Σ' => 'S',
39 | 'Τ' => 'T',
40 | 'Υ' => 'Y',
41 | 'Ύ' => 'Ý',
42 | 'Ϋ' => 'Ÿ',
43 | 'ΰ' => 'ÿ́',
44 | 'Φ' => 'F',
45 | 'Χ' => 'Ch',
46 | 'Ψ' => 'Ps',
47 | 'Ω' => 'O',
48 | 'Ώ' => 'Ó',
49 | // lower case
50 | 'α' => 'a',
51 | 'ά' => 'á',
52 | 'β' => 'v',
53 | 'γ' => 'g',
54 | 'δ' => 'd',
55 | 'ε' => 'e',
56 | 'έ' => 'é',
57 | 'ζ' => 'z',
58 | 'η' => 'i',
59 | 'ή' => 'í',
60 | 'θ' => 'th',
61 | 'ι' => 'i',
62 | 'ί' => 'í',
63 | 'ϊ' => 'ï',
64 | 'κ' => 'k',
65 | 'λ' => 'l',
66 | 'μ' => 'm',
67 | 'ν' => 'n',
68 | 'ξ' => 'x',
69 | 'ο' => 'o',
70 | 'ό' => 'ó',
71 | 'π' => 'p',
72 | 'ρ' => 'r',
73 | 'σ' => 's',
74 | 'ς' => 's',
75 | 'τ' => 't',
76 | 'υ' => 'y',
77 | 'ύ' => 'ý',
78 | 'ϋ' => 'ÿ',
79 | 'φ' => 'f',
80 | 'χ' => 'ch',
81 | 'ψ' => 'ps',
82 | 'ω' => 'o',
83 | 'ώ' => 'ó',
84 | );
85 |
--------------------------------------------------------------------------------
/dashboard/incl/imgcolr.js:
--------------------------------------------------------------------------------
1 | /*! imgcolr v1.0.1 | Sway Deng | MIT */
2 | !function(a,b){function c(a,c,d){var f=b(a),g=f.data("imgcolrIgnore"),h={url:a.src};"object"==typeof c&&(d=c,c=void 0),d=b.extend(h,d),"string"==typeof g&&(d.ignore=g),d.success=function(b){var d="function"==typeof c?c.call(a,a,b.color):"string"==typeof c?f.parents(c):f.parent();d&&d.jquery&&d.css("backgroundColor",b.color)},e.color(d)}var d=a.Imgcolr,e={},f={},g=document.createElement("canvas"),h="t",i="r",j="b",k="l",l=function(a){var c=f[a];return c||(c=b.Deferred(),f[a]=c),c},m=function(a){var b=a.toString(16);return 1===b.length?"0"+b:b},n=function(a,b,c){return["#",m(a),m(b),m(c)].join("")},o=function(a,b,c){var d,e=b[a+3];127>e||(d=n(b[a],b[a+1],b[a+2]),c[d]?c[d]++:c[d]=1)},p=function(a,b,c,d,e){var f,g;if(a===h||a===j)for(g=a===h?0:d-1,f=0;c>f;f++)o(4*(g*c+f),e,b);else for(d-=1,f=a===i?c-1:0,g=1;d>g;g++)o(4*(g*c+f),e,b)},q=function(a,b){var c,d,e,f="#ffffff",l=0,m={},n=a.width,o=a.height,q=g.getContext("2d");g.width=n,g.height=o,q.drawImage(a,0,0),c=q.getImageData(0,0,n,o).data,b.indexOf(h)<0&&p(h,m,n,o,c),b.indexOf(i)<0&&p(i,m,n,o,c),b.indexOf(j)<0&&p(j,m,n,o,c),b.indexOf(k)<0&&p(k,m,n,o,c);for(d in m)e=m[d],e>l&&(f=d,l=e);return f},r=function(a,b){var c=new Image,d={url:a,ignore:b};c.onload=function(){try{d.color=q(this,b),l(a).resolve(d)}catch(e){l(a).reject(d)}c=null},c.onerror=function(){c.onerror=null,c=null,l(a).reject(d)},c.crossOrigin="",c.src=a};e.color=function(a){var b=l(a.url);"function"==typeof a.success&&b.done(a.success),"function"==typeof a.error&&b.fail(a.error),"pending"===b.state()&&r(a.url,"string"==typeof a.ignore?a.ignore:"")},e.noConflict=function(){return a.Imgcolr=d,e},a.Imgcolr=e;var s="imgcolr";b.fn[s]=function(a,b){return this.each(function(){new c(this,a,b)})}}(this,jQuery);
--------------------------------------------------------------------------------
/dashboard/stats/quests.php:
--------------------------------------------------------------------------------
1 | checkPermission($_SESSION["accountID"], 'toolQuestsCreate')) {
11 | $name = ExploitPatch::charclean($_GET["name"]);
12 | if(!is_numeric($_GET["type"]) OR !is_numeric($_GET["amount"]) OR !is_numeric($_GET["reward"])) die("-1");
13 | if($_GET["type"] > 3) $type = 3; elseif($_GET["type"] < 1) $type = 1; else $type = ExploitPatch::number($_GET["type"]);
14 | $amount = ExploitPatch::number($_GET["amount"]);
15 | $reward = ExploitPatch::number($_GET["reward"]);
16 | $change = $db->prepare("UPDATE quests SET name = :n, type = :t, amount = :a, reward = :r WHERE ID = :i");
17 | if($change->execute([':n' => $name, ':t' => $type, ':a' => $amount, ':r' => $reward, ':i' => $id])) echo 1; else die("-1");
18 | $query = $db->prepare("INSERT INTO modactions (type, value, timestamp, account, value2, value3, value4) VALUES ('23',:value,:timestamp,:account,:amount,:reward,:name)");
19 | $query->execute([':value' => $type, ':timestamp' => time(), ':account' => $_SESSION["accountID"], ':amount' => $amount, ':reward' => $reward, ':name' => $name]);
20 | } else {
21 | $pck = $db->prepare("SELECT * FROM quests WHERE ID = :id");
22 | $pck->execute([':id' => $id]);
23 | $map = $pck->fetch();
24 | echo $map["ID"].' | '.$map["name"].' | '.$map["type"].' | '.$map["amount"].' | '.$map["reward"];
25 | }
26 | }
27 | ?>
--------------------------------------------------------------------------------
/incl/comments/deleteGJComment.php:
--------------------------------------------------------------------------------
1 | getIDFromPost();
10 |
11 | $userID = $gs->getUserID($accountID);
12 | $getCommentData = $db->prepare('SELECT * FROM comments WHERE commentID = :commentID');
13 | $getCommentData->execute([':commentID' => $commentID]);
14 | $getCommentData = $getCommentData->fetch();
15 | $query = $db->prepare("DELETE FROM comments WHERE commentID = :commentID AND userID = :userID LIMIT 1");
16 | $query->execute([':commentID' => $commentID, ':userID' => $userID]);
17 | if($query->rowCount() == 0) {
18 | $query = $db->prepare("SELECT users.extID FROM comments INNER JOIN levels ON levels.levelID = comments.levelID INNER JOIN users ON levels.userID = users.userID WHERE commentID = :commentID");
19 | $query->execute([':commentID' => $commentID]);
20 | $creatorAccID = $query->fetchColumn();
21 | if($creatorAccID == $accountID || $gs->checkPermission($accountID, "actionDeleteComment") == 1) {
22 | $query = $db->prepare("DELETE FROM comments WHERE commentID = :commentID LIMIT 1");
23 | if($query->execute([':commentID' => $commentID])) $gs->logAction($accountID, 13, $getCommentData['userName'], $getCommentData['comment'], $creatorAccID, $commentID, ($getCommentData['likes'] - $getCommentData['dislikes']), $getCommentData['levelID']);
24 | }
25 | } else $gs->logAction($accountID, 13, $getCommentData['userName'], $getCommentData['comment'], $accountID, $commentID, ($getCommentData['likes'] - $getCommentData['dislikes']), $getCommentData['levelID']);
26 | echo "1";
--------------------------------------------------------------------------------
/config/translit/data/kk.php:
--------------------------------------------------------------------------------
1 |
10 | */
11 |
12 | return array (
13 | // upper case
14 | 'А' => 'A', 'Ә' => 'Ä', 'Б' => 'B', 'В' => 'V',
15 | 'Г' => 'G', 'Ғ' => 'Gh', 'Д' => 'D', 'Е' => 'E',
16 | 'Ё' => 'Yo', 'Ж' => 'Zh', 'З' => 'Z', 'И' => 'Ī',
17 | 'Й' => 'Y', 'К' => 'K', 'Қ' => 'Q', 'Л' => 'L',
18 | 'М' => 'M', 'Н' => 'N', 'Ң' => 'Ng', 'О' => 'O',
19 | 'Ө' => 'Ö', 'П' => 'P', 'Р' => 'R', 'С' => 'S',
20 | 'Т' => 'T', 'У' => 'Ū', 'Ұ' => 'U', 'Ү' => 'Ü',
21 | 'Ф' => 'F', 'Х' => 'Kh', 'Һ' => 'H', 'Ц' => 'Ts',
22 | 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Shch', 'Ъ' => '”',
23 | 'Ы' => 'Y', 'І' => 'I', 'Ь' => '’', 'Э' => 'Ė',
24 | 'Ю' => 'Yu', 'Я' => 'Ya',
25 | // lower case
26 | 'а' => 'a', 'ә' => 'ä', 'б' => 'b', 'в' => 'v',
27 | 'г' => 'g', 'ғ' => 'gh', 'д' => 'd', 'е' => 'e',
28 | 'ё' => 'yo', 'ж' => 'zh', 'з' => 'z', 'и' => 'ī',
29 | 'й' => 'y', 'к' => 'k', 'қ' => 'q', 'л' => 'l',
30 | 'м' => 'm', 'н' => 'n', 'ң' => 'ng', 'о' => 'o',
31 | 'ө' => 'ö', 'п' => 'p', 'р' => 'r', 'с' => 's',
32 | 'т' => 't', 'у' => 'ū', 'ұ' => 'u', 'ү' => 'ü',
33 | 'ф' => 'f', 'х' => 'kh', 'һ' => 'h', 'ц' => 'ts',
34 | 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'shch', 'ъ' => '”',
35 | 'ы' => 'y', 'і' => 'i', 'ь' => '’', 'э' => 'ė',
36 | 'ю' => 'yu', 'я' => 'ya',
37 | );
38 |
--------------------------------------------------------------------------------
/dashboard/api/whoRated.php:
--------------------------------------------------------------------------------
1 | true, 'success' => false, 'error' => 1, 'message' => "Please supply a valid level ID."]));
13 | $query = $db->prepare("SELECT * FROM levels WHERE levelID = :lvid");
14 | $query->execute([':lvid' => $levelID]);
15 | $levelInfo = $query->fetch();
16 | if(!$levelInfo) exit(json_encode(['dashboard' => true, 'success' => false, 'error' => 2, 'message' => "This level wasn't found."]));
17 | $query = $db->prepare("SELECT * FROM modactions WHERE value3 = :lvid AND type = '1'");
18 | $query->execute([':lvid' => $levelID]);
19 | $result = $query->fetchAll();
20 | if($query->rowCount() == 0) exit(json_encode(['dashboard' => true, 'success' => false, 'error' => 3, 'message' => "This level wasn't rated."]));
21 | foreach($result as &$action){
22 | $userName = $gs->getAccountName($action['account']);
23 | $data[] = [
24 | 'username' => $userName,
25 | 'accountID' => $action['account'],
26 | 'difficulty' => $action['value'],
27 | 'stars' => $action['value2'],
28 | 'timestamp' => $action['timestamp']
29 | ];
30 | }
31 | exit(json_encode(['dashboard' => true, 'success' => true, 'level' => ['name' => $levelInfo['levelName'], 'author' => $levelInfo['userName']], 'rates' => $data]));
32 | ?>
--------------------------------------------------------------------------------
/incl/misc/likeGJItem.php:
--------------------------------------------------------------------------------
1 | getIP();
15 |
16 | $query = $db->prepare("SELECT count(*) FROM actions_likes WHERE itemID=:itemID AND type=:type AND ip=INET6_ATON(:ip)");
17 | $query->execute([':type' => $type, ':itemID' => $itemID, ':ip' => $ip]);
18 | if($query->fetchColumn() > 2)
19 | exit("-1");
20 |
21 | $query = $db->prepare("INSERT INTO actions_likes (itemID, type, isLike, ip) VALUES
22 | (:itemID, :type, :isLike, INET6_ATON(:ip))");
23 | $query->execute([':itemID' => $itemID, ':type' => $type, ':isLike' => $isLike, ':ip' => $ip]);
24 |
25 | switch($type){
26 | case 1:
27 | $table = "levels";
28 | $column = "levelID";
29 | break;
30 | case 2:
31 | $table = "comments";
32 | $column = "commentID";
33 | break;
34 | case 3:
35 | $table = "acccomments";
36 | $column = "commentID";
37 | break;
38 | case 4:
39 | $table = "lists";
40 | $column = "listID";
41 | break;
42 | }
43 |
44 | $query=$db->prepare("SELECT likes FROM $table WHERE $column = :itemID LIMIT 1");
45 | $query->execute([':itemID' => $itemID]);
46 | $likes = $query->fetchColumn();
47 | if($isLike == 1)
48 | $sign = "+";
49 | else
50 | $sign = "-";
51 |
52 | $query=$db->prepare("UPDATE $table SET likes = likes $sign 1 WHERE $column = :itemID");
53 | $query->execute([':itemID' => $itemID]);
54 | echo "1";
55 | ?>
--------------------------------------------------------------------------------
/incl/lib/generateHash.php:
--------------------------------------------------------------------------------
1 | 49) break;
45 | $hash[$p] = $levelstring[$k];
46 | $p++;
47 | }
48 | $hash = sha1($hash."xI25fpAapCQg");
49 | return $hash;
50 | }
51 | }
52 | ?>
--------------------------------------------------------------------------------
/config/translit/TranslitKa.php:
--------------------------------------------------------------------------------
1 |
14 | */
15 | class TranslitKa
16 | {
17 | protected $alphabet = array (
18 | 'ა' => 'a',
19 | 'ბ' => 'b',
20 | 'გ' => 'g',
21 | 'დ' => 'd',
22 | 'ე' => 'e',
23 | 'ვ' => 'v',
24 | 'ზ' => 'z',
25 | 'თ' => 't',
26 | 'ი' => 'i',
27 | 'კ' => 'k',
28 | 'ლ' => 'l',
29 | 'მ' => 'm',
30 | 'ნ' => 'n',
31 | 'ო' => 'o',
32 | 'პ' => 'p\'',
33 | 'ჟ' => 'zh',
34 | 'რ' => 'r',
35 | 'ს' => 's',
36 | 'ტ' => 't\'',
37 | 'უ' => 'u',
38 | 'ფ' => 'p',
39 | 'ქ' => 'k',
40 | 'ღ' => 'gh',
41 | 'ყ' => 'q\'',
42 | 'შ' => 'sh',
43 | 'ჩ' => 'ch',
44 | 'ც' => 'ts',
45 | 'ძ' => 'dz',
46 | 'წ' => 'ts\'',
47 | 'ჭ' => 'ch\'',
48 | 'ხ' => 'kh',
49 | 'ჯ' => 'j',
50 | 'ჰ' => 'h',
51 | );
52 |
53 | public function convert($text)
54 | {
55 | return str_replace(
56 | array_keys($this->alphabet),
57 | array_values($this->alphabet),
58 | preg_replace_callback(
59 | // make capital from first chars of sentences
60 | '/(^|[\.\?\!]\s*)([a-z])/s',
61 | function ($m) {
62 | return $m[1] . strtoupper($m[2]);
63 | },
64 | $text)
65 | );
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/dashboard/api/sends.php:
--------------------------------------------------------------------------------
1 | true, 'success' => false, 'error' => 1, 'message' => "Please supply a valid level ID."]));
17 | }
18 |
19 | $query = $db->prepare("SELECT * FROM levels WHERE levelID = :levelID");
20 | $query->execute([":levelID" => $levelID]);
21 | $query = $query->fetch();
22 |
23 | if(!$query) {
24 | http_response_code(404);
25 | exit(json_encode(['dashboard' => true, 'success' => false, 'error' => 2, 'message' => "This level wasn't found."]));
26 | }
27 |
28 | $query = $db->prepare("SELECT * FROM suggest WHERE suggestLevelId = :levelID ORDER BY timestamp DESC");
29 | $query->execute([":levelID" => $levelID]);
30 | $sendsInfo = $query->fetchAll();
31 |
32 | if(!$sendsInfo) {
33 | http_response_code(404);
34 | exit(json_encode(['dashboard' => true, 'success' => false, 'error' => 3, 'message' => "This level wasn't sent."]));
35 | }
36 |
37 | $sends = [];
38 |
39 | foreach ($sendsInfo as $send) {
40 | $sends[] = [
41 | "modUsername" => $gs->getAccountName($send["suggestBy"]),
42 | "modID" => $send["suggestBy"],
43 | "stars" => $send["suggestStars"],
44 | "featured" => $send["suggestFeatured"],
45 | "timestamp" => $send["timestamp"]
46 | ];
47 | }
48 |
49 | exit(json_encode(['dashboard' => true, 'success' => true, 'sends' => $sends]));
50 | ?>
--------------------------------------------------------------------------------
/dashboard/account/unlisted.php:
--------------------------------------------------------------------------------
1 | 0){
14 | $page = ($_GET["page"] - 1) * 10;
15 | $actualpage = $_GET["page"];
16 | }else{
17 | $page = 0;
18 | $actualpage = 1;
19 | }
20 | $table = '
21 |
22 |
23 | | '.$dl->getLocalizedString("ID").' |
24 | '.$dl->getLocalizedString("name").' |
25 | '.$dl->getLocalizedString("stars").' |
26 | '.$dl->getLocalizedString("userCoins").' |
27 |
28 |
29 | ';
30 |
31 | $query = $db->prepare("SELECT levelID, levelName, starStars, coins FROM levels WHERE extID=:extID AND unlisted=1 ORDER BY levelID DESC LIMIT 10 OFFSET $page");
32 | $query->execute([":extID" => $_SESSION["accountID"]]);
33 | $result = $query->fetchAll();
34 | foreach($result as &$level){
35 | $table .= "
36 | | ".$level["levelID"]." |
37 | ".$level["levelName"]." |
38 | ".$level["starStars"]." |
39 | ".$level["coins"]." |
40 |
";
41 | }
42 | $table .= "
";
43 | /*
44 | bottom row
45 | */
46 | //getting count
47 | $query = $db->prepare("SELECT count(*) FROM levels WHERE extID=:extID AND unlisted=1");
48 | $query->execute([':extID' => $_SESSION["accountID"]]);
49 | $packcount = $query->fetchColumn();
50 | $pagecount = ceil($packcount / 10);
51 | $bottomrow = $dl->generateBottomRow($pagecount, $actualpage);
52 | $dl->printPage($table . $bottomrow, true, "browse");
--------------------------------------------------------------------------------
/sfx/handler.php:
--------------------------------------------------------------------------------
1 | prepare('SELECT reuploadTime FROM sfxs ORDER BY reuploadTime DESC LIMIT 1');
13 | $time->execute();
14 | $time = $time->fetchColumn();
15 | $gs->updateLibraries($_GET['token'], $_GET['expires'], $time, 0);
16 | }
17 | echo file_get_contents($datFile);
18 | break;
19 | case 'sfxlibrary_version.txt':
20 | $time = $db->prepare('SELECT reuploadTime FROM sfxs WHERE reuploadTime > 0 ORDER BY reuploadTime DESC LIMIT 1');
21 | $time->execute();
22 | $time = $time->fetchColumn();
23 | if(!$time) $time = 1;
24 | $gs->updateLibraries($_GET['token'], $_GET['expires'], $time, 0);
25 | $times = [];
26 | foreach($customLibrary AS $library) {
27 | if($library[2] !== null) $times[] = explode(', ', file_get_contents('s'.$library[0].'.txt'))[1];
28 | }
29 | $times[] = $time;
30 | rsort($times);
31 | echo $times[0];
32 | break;
33 | default:
34 | $servers = [];
35 | foreach($customLibrary AS $library) {
36 | $servers[$library[0]] = $library[2];
37 | }
38 | $sfxID = explode('.', substr($file, 1, strlen($file)))[0];
39 | if(!file_exists('ids.json')) {
40 | $time = $db->prepare('SELECT reuploadTime FROM sfxs ORDER BY reuploadTime DESC LIMIT 1');
41 | $time->execute();
42 | $time = $time->fetchColumn();
43 | $gs->updateLibraries($_GET['token'], $_GET['expires'], $time, 0);
44 | }
45 | $song = $gs->getLibrarySongInfo($sfxID, 'sfx');
46 | $url = urldecode($song['download']);
47 | header("Location: $url");
48 | break;
49 | }
50 | ?>
--------------------------------------------------------------------------------
/dashboard/api/getGMD.php:
--------------------------------------------------------------------------------
1 | false, 'error' => 0, 'message' => 'Invalid level ID.']));
17 | $level = $db->prepare('SELECT * FROM levels WHERE levelID = :levelID');
18 | $level->execute([':levelID' => $levelID]);
19 | $level = $level->fetch();
20 | if(!$level) exit(json_encode(['success' => false, 'error' => 1, 'message' => 'Level was not found!']));
21 | $isPlayerAnAdmin = false;
22 | if($unlistedLevelsForAdmins) {
23 | $checkAdmin = $db->prepare('SELECT isAdmin FROM accounts WHERE accountID = :accountID');
24 | $checkAdmin->execute([':accountID' => $accountID]);
25 | $checkAdmin = $checkAdmin->fetchColumn();
26 | if($checkAdmin) $isPlayerAnAdmin = true;
27 | }
28 | if($level["unlisted2"] == 1) if(!($level["extID"] == $accountID || $gs->isFriends($accountID, $level["extID"])) && !$isPlayerAnAdmin) exit(json_encode(['success' => false, 'error' => 1, 'message' => 'Level was not found!']));
29 | $GMDFile = $gs->getGMDFile($levelID);
30 | if(!$GMDFile) exit(json_encode(['success' => false, 'error' => 2, 'message' => 'Level data was not found!']));
31 | exit(json_encode(['success' => true, 'levelName' => $level['levelName'], 'GMD' => base64_encode($GMDFile)]));
32 | ?>
--------------------------------------------------------------------------------
/dashboard/incl/fontawesome/css/v4-font-face.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com
3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4 | * Copyright 2022 Fonticons, Inc.
5 | */
6 | @font-face {
7 | font-family: 'FontAwesome';
8 | font-display: block;
9 | src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
10 |
11 | @font-face {
12 | font-family: 'FontAwesome';
13 | font-display: block;
14 | src: url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.ttf") format("truetype"); }
15 |
16 | @font-face {
17 | font-family: 'FontAwesome';
18 | font-display: block;
19 | src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype");
20 | unicode-range: U+F003,U+F006,U+F014,U+F016-F017,U+F01A-F01B,U+F01D,U+F022,U+F03E,U+F044,U+F046,U+F05C-F05D,U+F06E,U+F070,U+F087-F088,U+F08A,U+F094,U+F096-F097,U+F09D,U+F0A0,U+F0A2,U+F0A4-F0A7,U+F0C5,U+F0C7,U+F0E5-F0E6,U+F0EB,U+F0F6-F0F8,U+F10C,U+F114-F115,U+F118-F11A,U+F11C-F11D,U+F133,U+F147,U+F14E,U+F150-F152,U+F185-F186,U+F18E,U+F190-F192,U+F196,U+F1C1-F1C9,U+F1D9,U+F1DB,U+F1E3,U+F1EA,U+F1F7,U+F1F9,U+F20A,U+F247-F248,U+F24A,U+F24D,U+F255-F25B,U+F25D,U+F271-F274,U+F278,U+F27B,U+F28C,U+F28E,U+F29C,U+F2B5,U+F2B7,U+F2BA,U+F2BC,U+F2BE,U+F2C0-F2C1,U+F2C3,U+F2D0,U+F2D2,U+F2D4,U+F2DC; }
21 |
22 | @font-face {
23 | font-family: 'FontAwesome';
24 | font-display: block;
25 | src: url("../webfonts/fa-v4compatibility.woff2") format("woff2"), url("../webfonts/fa-v4compatibility.ttf") format("truetype");
26 | unicode-range: U+F041,U+F047,U+F065-F066,U+F07D-F07E,U+F080,U+F08B,U+F08E,U+F090,U+F09A,U+F0AC,U+F0AE,U+F0B2,U+F0D0,U+F0D6,U+F0E4,U+F0EC,U+F10A-F10B,U+F123,U+F13E,U+F148-F149,U+F14C,U+F156,U+F15E,U+F160-F161,U+F163,U+F175-F178,U+F195,U+F1F8,U+F219,U+F27A; }
27 |
--------------------------------------------------------------------------------
/dashboard/sfxs/update.php:
--------------------------------------------------------------------------------
1 | false, 'code' => 0, 'error' => 'Invalid params.']));
13 | $check = $db->prepare('SELECT ID FROM sfxs WHERE token = :token');
14 | $check->execute([':token' => $token]);
15 | $check = $check->fetchColumn();
16 | if(!$check) exit(json_encode(['success' => false, 'code' => 1, 'error' => 'Invalid token.']));
17 | $info = new finfo(FILEINFO_MIME);
18 | $file_type = explode(';', $info->buffer(file_get_contents($_FILES['file']['tmp_name'])))[0];
19 | if($file_type != 'audio/ogg' || $_FILES['file']['size'] >= $sfxSize * 1024 * 1024 || $_FILES['file']['size'] == 0) exit(json_encode(['success' => false, 'code' => 2, 'error' => 'Invalid file.']));
20 | move_uploaded_file($_FILES['file']['tmp_name'], $check.'.ogg');
21 | if(file_exists($check.'_temp.ogg')) unlink($check.'_temp.ogg');
22 | $song = $server.$check.".ogg";
23 | $change = $db->prepare('UPDATE sfxs SET token = "", download = :dl WHERE ID = :id');
24 | if($change->execute([':dl' => $song, ':id' => $check])) exit(json_encode(['success' => true]));
25 | exit(json_encode(['success' => false, 'code' => 3, 'error' => 'Something went wrong.']));
26 | }
27 | exit(json_encode(['success' => false, 'code' => 0, 'error' => 'Invalid params.']));
28 | ?>
--------------------------------------------------------------------------------
/incl/comments/uploadGJAccComment.php:
--------------------------------------------------------------------------------
1 | 20 ? 'temp_0_Account posting is currently disabled!' : '-1'));
12 | $userName = ExploitPatch::remove($_POST["userName"]);
13 | $comment = ExploitPatch::remove($_POST["comment"]);
14 | $commentLength = ($gameVersion >= 20) ? mb_strlen(ExploitPatch::url_base64_decode($comment)) : mb_strlen($comment);
15 | if($enableCommentLengthLimiter && $commentLength > $maxAccountCommentLength) exit("temp_0_You cannot post account comments above $maxAccountCommentLength characters! (Your's ".$commentLength.")");
16 | $accountID = GJPCheck::getAccountIDOrDie();
17 | $userID = $gs->getUserID($accountID, $userName);
18 | $uploadDate = time();
19 | //usercheck
20 | if($accountID != "" AND $comment != "") {
21 | $decodecomment = ExploitPatch::url_base64_decode($comment);
22 | if(Commands::doProfileCommands($accountID, $decodecomment)) exit("-1");
23 | $checkCommentBan = $gs->getPersonBan($accountID, $userID, 3);
24 | if($checkCommentBan) ($_POST['gameVersion'] > 20 ? exit("temp_".($checkCommentBan['expires'] - time())."_".ExploitPatch::translit(ExploitPatch::url_base64_decode($checkCommentBan['reason']))) : exit('-10'));
25 | $query = $db->prepare("INSERT INTO acccomments (userName, comment, userID, timeStamp) VALUES (:userName, :comment, :userID, :uploadDate)");
26 | $query->execute([':userName' => $userName, ':comment' => $comment, ':userID' => $userID, ':uploadDate' => $uploadDate]);
27 | Automod::checkAccountPostsSpamming($userID);
28 | $gs->logAction($accountID, 14, $userName, $comment, $db->lastInsertId());
29 | echo 1;
30 | } else echo -1;
31 | ?>
--------------------------------------------------------------------------------
/_updates/2023-12-20.sql:
--------------------------------------------------------------------------------
1 | CREATE TABLE `lists` (
2 | `listID` int(11) NOT NULL AUTO_INCREMENT,
3 | `listName` varchar(2048) NOT NULL,
4 | `listDesc` varchar(2048) NOT NULL,
5 | `listVersion` int(11) NOT NULL DEFAULT '1',
6 | `accountID` int(11) NOT NULL,
7 | `userName` varchar(2048) NOT NULL,
8 | `downloads` int(11) NOT NULL DEFAULT '0',
9 | `starDifficulty` int(11) NOT NULL,
10 | `likes` int(11) NOT NULL DEFAULT '0',
11 | `starFeatured` int(11) NOT NULL DEFAULT '0',
12 | `starStars` int(11) NOT NULL DEFAULT '0',
13 | `listlevels` varchar(2048) NOT NULL,
14 | `uploadDate` int(11) NOT NULL DEFAULT '0',
15 | `updateDate` int(11) NOT NULL DEFAULT '0',
16 | `original` int(11) NOT NULL DEFAULT '0',
17 | `unlisted` int(11) NOT NULL DEFAULT '0',
18 | PRIMARY KEY (`listID`)
19 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
20 | CREATE TABLE `platscores` (
21 | `ID` int(11) NOT NULL AUTO_INCREMENT,
22 | `accountID` int(11) NOT NULL DEFAULT '0',
23 | `levelID` int(11) NOT NULL DEFAULT '0',
24 | `time` int(11) NOT NULL DEFAULT '0',
25 | `points` int(11) NOT NULL DEFAULT '0',
26 | `timestamp` int(11) NOT NULL DEFAULT '0',
27 | PRIMARY KEY (`ID`)
28 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
29 | ALTER TABLE `levels` ADD `songs` VARCHAR(2048) NOT NULL DEFAULT '' AFTER `songID`, ADD `sfxs` VARCHAR(2048) NOT NULL DEFAULT '' AFTER `songs`, ADD `ts` INT NOT NULL DEFAULT '0' AFTER `wt2`;
30 | ALTER TABLE `levels` CHANGE `songs` `songIDs` VARCHAR(2048) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '';
31 | ALTER TABLE `levels` CHANGE `sfxs` `sfxIDs` VARCHAR(2048) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '';
32 | ALTER TABLE `lists` DROP `userName`;
33 | ALTER TABLE `lists` ADD `countForReward` INT NOT NULL DEFAULT '0' AFTER `listlevels`;
34 | ALTER TABLE `levels` CHANGE `songIDs` `songIDs` VARCHAR(2048) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NULL DEFAULT '';
35 | ALTER TABLE `levels` CHANGE `sfxIDs` `sfxIDs` VARCHAR(2048) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NULL DEFAULT '';
36 |
--------------------------------------------------------------------------------
/incl/scores/getGJCreators.php:
--------------------------------------------------------------------------------
1 | getAllBansOfBanType(1);
10 | $extIDs = $userIDs = $bannedIPs = [];
11 | foreach($bans AS &$ban) {
12 | switch($ban['personType']) {
13 | case 0:
14 | $extIDs[] = $ban['person'];
15 | break;
16 | case 1:
17 | $userIDs[] = $ban['person'];
18 | break;
19 | case 2:
20 | $bannedIPs[] = $gs->IPForBan($ban['person'], true);
21 | break;
22 | }
23 | }
24 | $extIDsString = implode("','", $extIDs);
25 | $userIDsString = implode("','", $userIDs);
26 | $bannedIPsString = implode("|", $bannedIPs);
27 | $queryArray = [];
28 | if(!empty($extIDsString)) $queryArray[] = "extID NOT IN ('".$extIDsString."')";
29 | if(!empty($userIDsString)) $queryArray[] = "userID NOT IN ('".$userIDsString."')";
30 | if(!empty($bannedIPsString)) $queryArray[] = "IP NOT REGEXP '".$bannedIPsString."'";
31 | $queryText = !empty($queryArray) ? '('.implode(' AND ', $queryArray).') AND' : '';
32 | $query = $db->prepare("SELECT * FROM users WHERE ".$queryText." creatorPoints > 0 ORDER BY creatorPoints DESC LIMIT 100");
33 | $query->execute();
34 | $result = $query->fetchAll();
35 | $xi = 0;
36 | foreach($result as &$user) {
37 | $extid = is_numeric($user["extID"]) ? $user["extID"] : 0;
38 | $xi++;
39 | $user["userName"] = $gs->makeClanUsername($user);
40 | $pplstring .= "1:".$user["userName"].":2:".$user["userID"].":13:".$user["coins"].":17:".$user["userCoins"].":6:".$xi.":9:".$user["icon"].":10:".$user["color1"].":11:".$user["color2"].":14:".$user["iconType"].":15:".$user["special"].":16:".$extid.":3:".$user["stars"].":8:".round($user["creatorPoints"],0,PHP_ROUND_HALF_DOWN).":4:".$user["demons"].":7:".$extid.":46:".$user["diamonds"]."|";
41 | }
42 | $pplstring = substr($pplstring, 0, -1);
43 | echo $pplstring;
44 | ?>
--------------------------------------------------------------------------------
/incl/messages/downloadGJMessage.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT accID, toAccountID, timestamp, userName, messageID, subject, isNew, body FROM messages WHERE messageID = :messageID AND (accID = :accID OR toAccountID = :accID) LIMIT 1");
14 | $query->execute([':messageID' => $messageID, ':accID' => $accountID]);
15 | $result = $query->fetch();
16 | if($query->rowCount() == 0) exit("-1");
17 | if(empty($_POST["isSender"])) {
18 | $query = $db->prepare("UPDATE messages SET isNew = 1, readTime = :readTime WHERE messageID = :messageID AND toAccountID = :accID AND readTime = 0");
19 | $query->execute([':messageID' => $messageID, ':accID' => $accountID, ':readTime' => time()]);
20 | $accountID = $result["accID"];
21 | $isSender = 0;
22 | } else {
23 | $isSender = 1;
24 | $accountID = $result["toAccountID"];
25 | }
26 | $query = $db->prepare("SELECT userName, userID, extID, clan FROM users WHERE extID = :accountID");
27 | $query->execute([':accountID' => $accountID]);
28 | $result12 = $query->fetch();
29 | $uploadDate = $gs->makeTime($result["timestamp"]);
30 | $result12["userName"] = $gs->makeClanUsername($result12);
31 | $result["subject"] = ExploitPatch::url_base64_encode(ExploitPatch::translit(ExploitPatch::url_base64_decode($result["subject"])));
32 | $result["body"] = ExploitPatch::url_base64_encode(XORCipher::cipher(ExploitPatch::translit(XORCipher::cipher(ExploitPatch::url_base64_decode($result["body"]), 14251)), 14251));
33 | echo "6:".$result12["userName"].":3:".$result12["userID"].":2:".$result12["extID"].":1:".$result["messageID"].":4:".$result["subject"].":8:".$result["isNew"].":9:".$isSender.":5:".$result["body"].":7:".$uploadDate."";
34 | ?>
--------------------------------------------------------------------------------
/dashboard/stats/renameSong.php:
--------------------------------------------------------------------------------
1 | prepare('SELECT reuploadID FROM '.$audioType.' WHERE ID = :ID');
11 | $check->execute([':ID' => $sid]);
12 | $check = $check->fetchColumn();
13 | if($gs->checkPermission($_SESSION["accountID"], "dashboardManageSongs") || ($_SESSION["accountID"] != 0 && $_SESSION["accountID"] == $check)) {
14 | $author = mb_substr(ExploitPatch::rucharclean($_POST["author"]), 0, 23);
15 | $name = mb_substr(ExploitPatch::rucharclean($_POST["name"]), 0, 30);
16 | if($audioType == 'sfxs' AND !empty($name) AND !empty($sid)) {
17 | $query = $db->prepare("UPDATE sfxs SET name = :n WHERE ID = :id");
18 | $query->execute([':n' => $name, ':id' => $sid]);
19 | $query = $db->prepare("INSERT INTO modactions (type, value2, value3, timestamp, account) VALUES ('27', :n, :id, :timestamp, :account)");
20 | $query->execute([':n' => $name, ':id' => $sid, ':timestamp' => time(), ':account' => $_SESSION["accountID"]]);
21 | die(json_encode(['success' => true]));
22 | } elseif(!empty($author) AND !empty($name) AND !empty($sid)) {
23 | $query = $db->prepare("UPDATE songs SET name = :n, authorName = :a WHERE ID = :id");
24 | $query->execute([':n' => $name, ':a' => $author, ':id' => $sid]);
25 | $query = $db->prepare("INSERT INTO modactions (type, value, value2, value3, timestamp, account) VALUES ('19', :a, :n, :id, :timestamp, :account)");
26 | $query->execute([':n' => $name, ':a' => $author, ':id' => $sid, ':timestamp' => time(), ':account' => $_SESSION["accountID"]]);
27 | die(json_encode(['success' => true]));
28 | } else die(json_encode(['success' => false, 'error' => '-2']));
29 | } else die(json_encode(['success' => false, 'error' => '-1']));
30 | ?>
--------------------------------------------------------------------------------
/incl/rewards/getGJChallenges.php:
--------------------------------------------------------------------------------
1 | getUserID($accountID);
18 | }else{
19 | $userID = $gs->getUserID($udid);
20 | }
21 | $chk = XORCipher::cipher(ExploitPatch::url_base64_decode(substr($chk, 5)),19847);
22 | //Generating quest IDs
23 | $from = strtotime('2000-12-17');
24 | $today = time();
25 | $difference = $today - $from;
26 | $questID = floor($difference / 86400);
27 | $questID = $questID * 3;
28 | $quest1ID = $questID;
29 | $quest2ID = $questID+1;
30 | $quest3ID = $questID+2;
31 | //Time left
32 | $midnight = strtotime("tomorrow 00:00:00");
33 | $current = time();
34 | $timeleft = $midnight - $current;
35 | $query=$db->prepare("SELECT type,amount,reward,name FROM quests");
36 | $query->execute();
37 | $result = $query->fetchAll();
38 | //var_dump($result);
39 | shuffle($result);
40 | //var_dump($result);
41 | //quests
42 | if (empty($result[0]) || empty($result[1]) || empty($result[2])) {
43 | exit("-1");
44 | }
45 | $quest1 = $quest1ID.",".$result[0]["type"].",".$result[0]["amount"].",".$result[0]["reward"].",".$result[0]["name"]."";
46 | $quest2 = $quest2ID.",".$result[1]["type"].",".$result[1]["amount"].",".$result[1]["reward"].",".$result[1]["name"]."";
47 | $quest3 = $quest3ID.",".$result[2]["type"].",".$result[2]["amount"].",".$result[2]["reward"].",".$result[2]["name"]."";
48 | $string = ExploitPatch::url_base64_encode(XORCipher::cipher("SaKuJ:".$userID.":".$chk.":".$udid.":".$accountID.":".$timeleft.":".$quest1.":".$quest2.":".$quest3."",19847));
49 | $hash = GenerateHash::genSolo3($string);
50 | echo "SaKuJ".$string . "|".$hash;
51 | ?>
52 |
--------------------------------------------------------------------------------
/config/translit/data/hy.php:
--------------------------------------------------------------------------------
1 |
11 | */
12 | return array (
13 | // upper case
14 | 'Ա' => 'A',
15 | 'Բ' => 'B',
16 | 'Գ' => 'G',
17 | 'Դ' => 'D',
18 | 'Ե' => 'E',
19 | 'Զ' => 'Z',
20 | 'Է' => 'Ē',
21 | 'Ը' => 'Ə',
22 | 'Թ' => 'Tʿ',
23 | 'Ժ' => 'ZH',
24 | 'Ի' => 'I',
25 | 'Լ' => 'L',
26 | 'Խ' => 'X',
27 | 'Ծ' => 'C',
28 | 'Կ' => 'K',
29 | 'Հ' => 'H',
30 | 'Ձ' => 'J',
31 | 'Ղ' => 'Ł',
32 | 'Ճ' => 'Č',
33 | 'Մ' => 'M',
34 | 'Յ' => 'Y',
35 | 'Ն' => 'N',
36 | 'Շ' => 'Š',
37 | 'Ո' => 'O',
38 | 'Չ' => 'Čʿ',
39 | 'Պ' => 'P',
40 | 'Ջ' => 'ǰ',
41 | 'Ռ' => 'Ṙ',
42 | 'Ս' => 'S',
43 | 'Վ' => 'V',
44 | 'Տ' => 'T',
45 | 'Ր' => 'R',
46 | 'Ց' => 'Cʿ',
47 | 'ՈՒ' => 'U',
48 | 'Ւ' => 'W',
49 | 'Փ' => 'Pʿ',
50 | 'Ք' => 'Kʿ',
51 | 'և' => 'EV',
52 | 'Օ' => 'Ō',
53 | 'Ֆ' => 'F',
54 | // lower case
55 | 'ա' => 'a',
56 | 'բ' => 'b',
57 | 'գ' => 'g',
58 | 'դ' => 'd',
59 | 'ե' => 'e',
60 | 'զ' => 'z',
61 | 'է' => 'ē',
62 | 'ը' => 'ə',
63 | 'թ' => 'tʿ',
64 | 'ժ' => 'ž',
65 | 'ի' => 'i',
66 | 'լ' => 'l',
67 | 'խ' => 'x',
68 | 'ծ' => 'c',
69 | 'կ' => 'k',
70 | 'հ' => 'h',
71 | 'ձ' => 'j',
72 | 'ղ' => 'ł',
73 | 'ճ' => 'č',
74 | 'մ' => 'm',
75 | 'յ' => 'y',
76 | 'ն' => 'n',
77 | 'շ' => 'š',
78 | 'ո' => 'o',
79 | 'չ' => 'čʿ',
80 | 'պ' => 'p',
81 | 'ջ' => 'ǰ',
82 | 'ռ' => 'ṙ',
83 | 'ս' => 's',
84 | 'վ' => 'v',
85 | 'տ' => 't',
86 | 'ր' => 'r',
87 | 'ց' => 'cʿ',
88 | 'ու' => 'u',
89 | 'ւ' => 'w',
90 | 'փ' => 'pʿ',
91 | 'ք' => 'kʿ',
92 | 'օ' => 'ō',
93 | 'ֆ' => 'f',
94 | );
95 |
--------------------------------------------------------------------------------
/incl/levels/getGJDailyLevel.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT * FROM dailyfeatures WHERE timestamp < :current AND type = :type ORDER BY timestamp DESC LIMIT 1");
21 | $query->execute([':current' => $current, ':type' => $type]);
22 | break;
23 | case 2:
24 | $dailyTable = 'events';
25 | $dailyTime = 'duration';
26 | $isEvent = true;
27 | $query = $db->prepare("SELECT * FROM events WHERE timestamp < :current AND duration >= :current ORDER BY duration ASC LIMIT 1");
28 | $query->execute([':current' => $current]);
29 | break;
30 | }
31 |
32 | $daily = $query->fetch();
33 | if($query->rowCount() == 0) exit("-1");
34 | $dailyID = $daily['feaID'] + ($type * 100000);
35 | $timeleft = $daily[$dailyTime] - $current;
36 | if(!$daily['webhookSent']) {
37 | $gs->sendDailyWebhook($daily['levelID'], $type);
38 | $sent = $db->prepare('UPDATE '.$dailyTable.' SET webhookSent = 1 WHERE feaID = :feaID');
39 | $sent->execute([':feaID' => $daily['feaID']]);
40 | if($automaticCron) Cron::updateCreatorPoints($accountID, false);
41 | }
42 | $stringToAdd = '';
43 | if($isEvent) {
44 | $chk = XORCipher::cipher(ExploitPatch::url_base64_decode(substr(ExploitPatch::charclean($_POST["chk"]), 5)), 59182);
45 | $string = ExploitPatch::url_base64_encode(XORCipher::cipher('Sa1nt:'.$chk.':'.($daily['feaID'] + 19).':3:'.$daily['rewards'], 59182));
46 | $timeleft = 10;
47 | $hash = $gh->genSolo4($string);
48 | $stringToAdd = '|Sa1nt'.$string.'|'.$hash;
49 | }
50 | echo $dailyID ."|". $timeleft.$stringToAdd;
51 | ?>
--------------------------------------------------------------------------------
/incl/lib/GJPCheck.php:
--------------------------------------------------------------------------------
1 |
64 |
--------------------------------------------------------------------------------
/dashboard/account/mods.php:
--------------------------------------------------------------------------------
1 | checkPermission($_SESSION["accountID"], 'dashboardAddMod')) {
11 | $priority = $gs->getMaxValuePermission($_SESSION["accountID"], 'priority');
12 | $role = ExploitPatch::numbercolon($_GET["role"]);
13 | $check = $db->prepare('SELECT priority FROM roles WHERE roleID = :role');
14 | $check->execute([':role' => $role]);
15 | $check = $check->fetchColumn();
16 | $mod = ExploitPatch::number($_GET["acc"]);
17 | $mod2 = $gs->getAccountName($mod);
18 | if($_SESSION['accountID'] == $mod) die('-1');
19 | $query = $db->prepare("SELECT * FROM roleassign WHERE accountID = :mod");
20 | $query->execute([':mod' => $mod]);
21 | $res = $query->fetch();
22 | if($role != "-1") {
23 | if($check >= $priority) die("-1");
24 | $change = $db->prepare("UPDATE roleassign SET roleID = :r WHERE assignID = :i");
25 | $change = $change->execute([':r' => $role, ':i' => $id]);
26 | } else {
27 | $change = $db->prepare("DELETE FROM roleassign WHERE assignID = :i");
28 | $change = $change->execute([':i' => $id]);
29 | }
30 | if($change) echo "1"; else die("-1");
31 | $query = $db->prepare("INSERT INTO modactions (type, value, timestamp, account, value2, value3) VALUES ('24', :value, :timestamp, :account, :value2, :value3)");
32 | $query->execute([':value' => $mod2, ':timestamp' => time(), ':account' => $_SESSION["accountID"], ':value2' => $mod, ':value3' => $role]);
33 | $gs->sendLogsModChangeWebhook($res['accountID'], $_SESSION['accountID'], $res['assignID'], $res);
34 | } else {
35 | $pck = $db->prepare("SELECT * FROM roleassign WHERE assignID = :id");
36 | $pck->execute([':id' => $id]);
37 | $map = $pck->fetch();
38 | echo $map["assignID"].' | '.$map["roleID"].' | '.$map["accountID"]." | ".$gs->getAccountName($map["accountID"]);
39 | }
40 | }
41 | ?>
--------------------------------------------------------------------------------
/incl/misc/getTopArtists.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT extID FROM users WHERE IP = :ip ORDER BY lastPlayed DESC");
33 | $IPcheck->execute([':ip' => $gs->getIP()]);
34 | $IPcheck = $IPcheck->fetch();
35 | $querywhat = "SELECT * FROM favsongs INNER JOIN songs on favsongs.songID = songs.ID WHERE favsongs.accountID = :id ORDER BY favsongs.ID DESC LIMIT 20 OFFSET $offset";
36 | $query = $db->prepare($querywhat);
37 | $query->execute([':id' => $IPcheck["extID"]]);
38 | $res = $query->fetchAll();
39 | foreach($res as $sel){
40 | $str .= "4:".$sel["authorName"]." - ".$sel["name"].", ".$sel["ID"];
41 | $str .= ":7:../redirect?q=".urlencode($sel["download"]);
42 | $str .= "|";
43 | }
44 | if(empty($str)) $str = "4:There is no songs!|4:If you liked some...|4:Update your IP!|4:Go to your profile to do that.";
45 | $str = rtrim($str, "|");
46 | $querywhat = "SELECT * FROM favsongs INNER JOIN songs on favsongs.songID = songs.ID WHERE favsongs.accountID = :id ORDER BY favsongs.ID DESC";
47 | $query = $db->prepare($querywhat);
48 | $query->execute([':id' => $IPcheck["extID"]]);
49 | $res = $query->fetchAll();
50 | $totalCount = count($res);
51 | $str .= "#$totalCount:$offset:20";
52 | echo "$str";
53 | }
54 | ?>
55 |
--------------------------------------------------------------------------------
/music/handler.php:
--------------------------------------------------------------------------------
1 | prepare('SELECT reuploadTime FROM songs WHERE reuploadTime > 0 ORDER BY reuploadTime DESC LIMIT 1');
14 | $time->execute();
15 | $time = $time->fetchColumn();
16 | $gs->updateLibraries($_GET['token'], $_GET['expires'], $time, 1);
17 | }
18 | echo file_get_contents($datFile);
19 | break;
20 | case 'musiclibrary_version.txt':
21 | case 'musiclibrary_version_02.txt':
22 | $time = $db->prepare('SELECT reuploadTime FROM songs WHERE reuploadTime > 0 ORDER BY reuploadTime DESC LIMIT 1');
23 | $time->execute();
24 | $time = $time->fetchColumn();
25 | if(!$time) $time = 1;
26 | $gs->updateLibraries($_GET['token'], $_GET['expires'], $time, 1);
27 | $times = [];
28 | foreach($customLibrary AS $library) {
29 | if($library[2] !== null) $times[] = explode(', ', file_get_contents('s'.$library[0].'.txt'))[1];
30 | }
31 | $times[] = $time;
32 | rsort($times);
33 | echo $times[0];
34 | break;
35 | default:
36 | $servers = [];
37 | foreach($customLibrary AS $library) {
38 | $servers[$library[0]] = $library[2];
39 | }
40 | if(!file_exists('ids.json')) {
41 | $time = $db->prepare('SELECT reuploadTime FROM songs WHERE reuploadTime > 0 ORDER BY reuploadTime DESC LIMIT 1');
42 | $time->execute();
43 | $time = $time->fetchColumn();
44 | $gs->updateLibraries($_GET['token'], $_GET['expires'], $time, 1);
45 | }
46 | $musicID = explode('.', $file)[0];
47 | $song = $gs->getLibrarySongInfo($musicID, true);
48 | if($song) $url = urldecode($song['download']);
49 | else $url = urldecode($gs->getSongInfo($musicID, 'download'));
50 | if(empty($url)) header("Location: https://www.newgrounds.com/audio/listen/$musicID");
51 | header("Location: $url");
52 | break;
53 | }
54 | ?>
55 |
--------------------------------------------------------------------------------
/accounts/syncGJAccount20.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT accountID FROM accounts WHERE userName = :userName");
18 | $query->execute([':userName' => $userName]);
19 | $accountID = $query->fetchColumn();
20 | } else {
21 | $accountID = ExploitPatch::number($_POST["accountID"]);
22 | }
23 |
24 | $pass = 0;
25 | if(!empty($_POST["password"])) $pass = GeneratePass::isValid($accountID, $_POST["password"]);
26 | elseif(!empty($_POST["gjp2"])) $pass = GeneratePass::isGJP2Valid($accountID, $_POST["gjp2"]);
27 | if($pass == 1) {
28 | if(!is_numeric($accountID) || !file_exists("../data/accounts/$accountID")) {
29 | exit("-1");
30 | } else {
31 | $saveData = file_get_contents("../data/accounts/$accountID");
32 | if(file_exists("../data/accounts/keys/$accountID") && substr($saveData,0,3) != "H4s") {
33 | $protected_key_encoded = file_get_contents("../data/accounts/keys/$accountID");
34 | $protected_key = KeyProtectedByPassword::loadFromAsciiSafeString($protected_key_encoded);
35 | $user_key = $protected_key->unlockKey($password);
36 | try {
37 | $saveData = Crypto::decrypt($saveData, $user_key);
38 | file_put_contents("../data/accounts/$accountID",$saveData);
39 | file_put_contents("../data/accounts/keys/$accountID","");
40 | } catch (Defuse\Crypto\Exception\WrongKeyOrModifiedCiphertextException $ex) {
41 | $gs->logAction($accountID, 11, $userName, 2);
42 | exit("-3");
43 | }
44 | }
45 | }
46 | $gs->logAction($accountID, 10, $userName, strlen($saveData));
47 | echo $saveData.";21;30;a;a";
48 | } else {
49 | $gs->logAction($accountID, 11, $userName, 1);
50 | echo -2;
51 | }
52 | ?>
--------------------------------------------------------------------------------
/incl/comments/getGJAccountComments.php:
--------------------------------------------------------------------------------
1 | getUserID($accountid);
13 | $query = "SELECT comment, userID, likes, isSpam, commentID, timestamp FROM acccomments WHERE userID = :userID ORDER BY timeStamp DESC LIMIT 10 OFFSET $commentpage";
14 | $query = $db->prepare($query);
15 | $query->execute([':userID' => $userID]);
16 | $result = $query->fetchAll();
17 | if($query->rowCount() == 0){
18 | exit("#0:0:0");
19 | }
20 | $countquery = $db->prepare("SELECT count(*) FROM acccomments WHERE userID = :userID");
21 | $countquery->execute([':userID' => $userID]);
22 | $commentcount = $countquery->fetchColumn();
23 | foreach($result as &$comment1) {
24 | if($comment1["commentID"]!="") {
25 | $uploadDate = $gs->makeTime($comment1["timestamp"]);
26 | $likes = $comment1["likes"]; // - $comment1["dislikes"];
27 | $reply = $db->prepare("SELECT count(*) FROM replies WHERE commentID = :id");
28 | $reply->execute([':id' => $comment1["commentID"]]);
29 | $reply = $reply->fetchColumn();
30 | if($reply > 0) {
31 | $rep = $reply > 1 ? 'replies)' : 'reply)';
32 | $comment1["comment"] = ExploitPatch::url_base64_encode(ExploitPatch::url_base64_decode($comment1["comment"]).' ('.$reply.' '.$rep);
33 | }
34 | $comment1['comment'] = ExploitPatch::url_base64_encode(trim(ExploitPatch::translit(ExploitPatch::url_base64_decode($comment1['comment']))));
35 | if($enableCommentLengthLimiter) $comment1['comment'] = ExploitPatch::url_base64_encode(substr(ExploitPatch::url_base64_decode($comment1['comment']), 0, $maxAccountCommentLength));
36 | $commentstring .= "2~".$comment1["comment"]."~3~".$comment1["userID"]."~4~".$likes."~5~0~7~".$comment1["isSpam"]."~9~".$uploadDate."~6~".$comment1["commentID"]."|";
37 | }
38 | }
39 | $commentstring = substr($commentstring, 0, -1);
40 | echo $commentstring;
41 | echo "#".$commentcount.":".$commentpage.":10";
42 | ?>
--------------------------------------------------------------------------------
/incl/messages/getGJMessages.php:
--------------------------------------------------------------------------------
1 | prepare($query);
24 | $query->execute([':toAccountID' => $toAccountID]);
25 | $result = $query->fetchAll();
26 | $countquery = $db->prepare($countquery);
27 | $countquery->execute([':toAccountID' => $toAccountID]);
28 | $msgcount = $countquery->fetchColumn();
29 | if($msgcount == 0){
30 | exit("-2");
31 | }
32 | foreach ($result as &$message1) {
33 | if($message1["messageID"] != ""){
34 | $uploadDate = $gs->makeTime($message1["timestamp"]);
35 | if($getSent == 1){
36 | $accountID = $message1["toAccountID"];
37 | }else{
38 | $accountID = $message1["accID"];
39 | }
40 | $query=$db->prepare("SELECT * FROM users WHERE extID = :accountID");
41 | $query->execute([':accountID' => $accountID]);
42 | $result12 = $query->fetchAll()[0];
43 | $result12["userName"] = $gs->makeClanUsername($result12);
44 | $message1['subject'] = ExploitPatch::url_base64_encode(ExploitPatch::translit(ExploitPatch::url_base64_decode($message1["subject"])));
45 | $msgstring .= "6:".$result12["userName"].":3:".$result12["userID"].":2:".$result12["extID"].":1:".$message1["messageID"].":4:".$message1["subject"].":8:".$message1["isNew"].":9:".$getSent.":7:".$uploadDate."|";
46 | }
47 | }
48 | $msgstring = substr($msgstring, 0, -1);
49 | echo $msgstring ."#".$msgcount.":".$offset.":10";
50 | ?>
--------------------------------------------------------------------------------
/dashboard/api/addSong.php:
--------------------------------------------------------------------------------
1 | getAccountIDFromName('ObeyGDBot');
15 | if(!$reuploadID) $reuploadID = 0;
16 | if(!$download) exit(json_encode(['dashboard' => true, 'success' => false, 'error' => 1, 'message' => 'Please specify song download link.']));
17 | $songReupload = $gs->songReupload($download, $author, $name, $reuploadID);
18 | if($songReupload < 0) {
19 | $error = mb_substr($songReupload, 0, 2);
20 | switch($error) {
21 | case '-2':
22 | $errorNumber = 2;
23 | $errorMessage = 'Your download link is not link.';
24 | break;
25 | case '-3':
26 | $errorNumber = 3;
27 | $errorMessage = 'This song was already reuploaded.';
28 | break;
29 | case '-4':
30 | $errorNumber = 4;
31 | $errorMessage = 'Your download link is not link to an audio.';
32 | break;
33 | default:
34 | $errorNumber = 0;
35 | $errorMessage = 'Unexpected error.';
36 | break;
37 | }
38 | exit(json_encode(['dashboard' => true, 'success' => false, 'error' => $errorNumber, 'message' => $errorMessage]));
39 | } else {
40 | $songInfo = $gs->getSongInfo($songReupload);
41 | $song = [
42 | 'ID' => $songInfo['ID'],
43 | 'author' => $songInfo['authorName'],
44 | 'name' => $songInfo['name'],
45 | 'size' => $songInfo['size'],
46 | 'download' => urldecode($songInfo['download']),
47 | 'reuploader' => [
48 | 'accountID' => $reuploadID,
49 | 'userID' => $gs->getUserID($reuploadID, 'ObeyGDBot'),
50 | 'username' => 'ObeyGDBot'
51 | ],
52 | 'newgrounds' => false,
53 | 'customSong' => true
54 | ];
55 | exit(json_encode(['dashboard' => true, 'success' => true, 'song' => $song]));
56 | }
57 | ?>
--------------------------------------------------------------------------------
/incl/relationships/getGJUserList.php:
--------------------------------------------------------------------------------
1 | prepare($query);
22 | $query->execute([':accountID' => $accountID]);
23 | $result = $query->fetchAll();
24 | if($query->rowCount() == 0){
25 | echo "-2";
26 | }
27 | else
28 | {
29 | foreach ($result as &$friendship) {
30 | $person = $friendship["person1"];
31 | $isnew = $friendship["isNew1"];
32 | if($friendship["person1"] == $accountID){
33 | $person = $friendship["person2"];
34 | $isnew = $friendship["isNew2"];
35 | }
36 | $new[$person] = $isnew;
37 | $people .= $person . ",";
38 | }
39 | $people = substr($people, 0,-1);
40 | $query = $db->prepare("SELECT userName, userID, icon, color1, color2, iconType, special, extID, clan FROM users WHERE extID IN ($people) ORDER BY userName ASC");
41 | $query->execute();
42 | $result = $query->fetchAll();
43 | foreach($result as &$user) {
44 | $user["userName"] = $gs->makeClanUsername($user);
45 | $user['extID'] = is_numeric($user['extID']) ? $user['extID'] : 0;
46 | $peoplestring .= "1:".$user["userName"].":2:".$user["userID"].":9:".$user["icon"].":10:".$user["color1"].":11:".$user["color2"].":14:".$user["iconType"].":15:".$user["special"].":16:".$user["extID"].":18:0:41:".$new[$user["extID"]]."|";
47 | }
48 | $peoplestring = substr($peoplestring, 0, -1);
49 | $query = $db->prepare("UPDATE friendships SET isNew1 = '0' WHERE person2 = :me");
50 | $query->execute([':me' => $accountID]);
51 | $query = $db->prepare("UPDATE friendships SET isNew2 = '0' WHERE person1 = :me");
52 | $query->execute([':me' => $accountID]);
53 | if($peoplestring == ""){
54 | exit("-1");
55 | }
56 | echo $peoplestring;
57 | }
58 | ?>
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## This version of core is deprecated
2 | ### [Repository with new GDPS core](https://github.com/MegaSa1nt/GMDprivateServer/tree/new)
3 |
4 | # GMDprivateServer
5 | ## Geometry Dash Private Server
6 | Basically a Geometry Dash Server Emulator
7 |
8 | Supported version of Geometry Dash: 1.0 - 2.207
9 |
10 | (See [the backwards compatibility section of this article](https://github.com/Cvolton/GMDprivateServer/wiki/Deliberate-differences-from-real-GD) for more information)
11 |
12 | Required version of PHP: 7.0+ (tested up to 8.3)
13 |
14 | ### Setup
15 | 1) Upload the files on a webserver
16 | 2) Import database.sql into a MySQL/MariaDB database
17 | 3) Edit the links in GeometryDash.exe (some are base64 encoded since 2.1, remember that)
18 |
19 | #### Updating the server
20 | 1) Upload the files on a webserver
21 | 2) Set `$installed` to false in config/dashboard.php
22 | 3) Run main dashboard's page
23 |
24 | ### Credits
25 | Base for account settings and the private messaging system by someguy28
26 |
27 | XOR encryption — https://github.com/sathoro/php-xor-cipher — (incl/lib/XORCipher.php)
28 |
29 | Cloud save encryption — https://github.com/defuse/php-encryption — (incl/lib/defuse-crypto.phar)
30 |
31 | Mail verification — https://github.com/phpmailer/phpmailer — (config/mail)
32 |
33 | JQuery — https://github.com/jquery/jquery — (dashboard/lib/jq.js)
34 |
35 | Image dominant color picker — https://github.com/swaydeng/imgcolr — (dashboard/lib/imgcolr.js)
36 |
37 | Media cover — https://github.com/aadsm/jsmediatags — (dashboard/lib/jsmediatags.js)
38 |
39 | Audio duration — https://github.com/JamesHeinrich/getID3 — (config/getid3)
40 |
41 | Proxies list — https://github.com/SevenworksDev/proxy-list — (config/proxies.txt)
42 |
43 | Common VPNs list — https://github.com/X4BNet/lists_vpn — (config/vpns.txt)
44 |
45 | Discord Webhooks — https://github.com/renzbobz/DiscordWebhook-PHP — (config/webhooks/DiscordWebhook.php)
46 |
47 | GD icons — https://github.com/oatmealine/gd-icon-renderer-web — (any page with player's username)
48 |
49 | Cloudflare IPs List — https://www.cloudflare.com/ips — (incl/lib/mainLib.php & incl/lib/ipCheck.php)
50 |
51 | Translit — https://github.com/ashtokalo/php-translit — (config/translit)
52 |
53 | Snow — https://embed.im/snow — (dashboard)
54 |
55 | Most of the stuff in generateHash.php has been figured out by pavlukivan and Italian APK Downloader, so credits to them
56 |
--------------------------------------------------------------------------------
/accounts/backupGJAccount.php:
--------------------------------------------------------------------------------
1 | prepare("SELECT accountID FROM accounts WHERE userName = :userName");
21 | $query->execute([':userName' => $userName]);
22 | $accountID = $query->fetchColumn();
23 | } else $accountID = ExploitPatch::number($_POST["accountID"]);
24 |
25 | if(!is_numeric($accountID)) exit("-1");
26 |
27 | $pass = 0;
28 | if(!empty($_POST["password"])) $pass = GeneratePass::isValid($accountID, $_POST["password"]);
29 | elseif(!empty($_POST["gjp2"])) $pass = GeneratePass::isGJP2Valid($accountID, $_POST["gjp2"]);
30 | if($pass == 1) {
31 | $saveDataArr = explode(";",$saveData);
32 | $saveData = ExploitPatch::url_base64_decode($saveDataArr[0]);
33 | $saveData = gzdecode($saveData);
34 | $orbs = explode("14",$saveData)[1];
35 | $orbs = explode("",$orbs)[0] ?? 0;
36 | $lvls = explode("GS_value",$saveData)[1];
37 | $lvls = explode("4",$lvls)[1];
38 | $lvls = explode("",$lvls)[0] ?? 0;
39 | $saveData = str_replace("GJA_002".$password."", "GJA_002password", $saveData);
40 | $saveData = gzencode($saveData);
41 | $saveData = ExploitPatch::url_base64_encode($saveData);
42 | $saveData = $saveData . ";" . $saveDataArr[1];
43 | file_put_contents("../data/accounts/$accountID",$saveData);
44 | file_put_contents("../data/accounts/keys/$accountID","");
45 | $query = $db->prepare("UPDATE `users` SET `orbs` = :orbs, `completedLvls` = :lvls WHERE extID = :extID");
46 | $query->execute([':orbs' => $orbs, ':extID' => $accountID, ':lvls' => $lvls]);
47 | $gs->logAction($accountID, 5, $userName, filesize("../data/accounts/$accountID"), $orbs, $lvls);
48 | echo "1";
49 | } else {
50 | $gs->logAction($accountID, 7, $userName, strlen($saveData));
51 | echo "-1";
52 | }
53 | ?>
54 |
--------------------------------------------------------------------------------
/config/translit/TranslitUk.php:
--------------------------------------------------------------------------------
1 |
12 | */
13 |
14 | class TranslitUk
15 | {
16 | public $alphabet = array (
17 | // upper case
18 | 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'H',
19 | 'ЗГ' => 'Zgh', 'Зг' => 'Zgh', 'Ґ' => 'G', 'Д' => 'D',
20 | 'Е' => 'E', 'Є' => 'IE', 'Ж' => 'Zh', 'З' => 'Z',
21 | 'И' => 'Y', 'І' => 'I', 'Ї' => 'I', 'Й' => 'I',
22 | 'К' => 'K', 'Л' => 'L', 'М' => 'M', 'Н' => 'N',
23 | 'О' => 'O', 'П' => 'P', 'Р' => 'R', 'С' => 'S',
24 | 'Т' => 'T', 'У' => 'U', 'Ф' => 'F', 'Х' => 'Kh',
25 | 'Ц' => 'Ts', 'Ч' => 'Ch', 'Ш' => 'Sh', 'Щ' => 'Shch',
26 | 'Ь' => '', 'Ю' => 'Iu', 'Я' => 'Ia', '’' => '',
27 | // lower case
28 | 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'h',
29 | 'зг' => 'zgh', 'ґ' => 'g', 'д' => 'd', 'е' => 'e',
30 | 'є' => 'ie', 'ж' => 'zh', 'з' => 'z', 'и' => 'y',
31 | 'і' => 'i', 'ї' => 'i', 'й' => 'i', 'к' => 'k',
32 | 'л' => 'l', 'м' => 'm', 'н' => 'n', 'о' => 'o',
33 | 'п' => 'p', 'р' => 'r', 'с' => 's', 'т' => 't',
34 | 'у' => 'u', 'ф' => 'f', 'х' => 'kh', 'ц' => 'ts',
35 | 'ч' => 'ch', 'ш' => 'sh', 'щ' => 'shch', 'ь' => '',
36 | 'ю' => 'iu', 'я' => 'ia', '\'' => '',
37 | );
38 |
39 | public function convert($text)
40 | {
41 | return str_replace(
42 | array_keys($this->alphabet),
43 | array_values($this->alphabet),
44 | preg_replace(
45 | // use alternative variant at the beginning of a word
46 | array (
47 | '/(?<=^|\s)Є/', '/(?<=^|\s)Ї/', '/(?<=^|\s)Й/',
48 | '/(?<=^|\s)Ю/', '/(?<=^|\s)Я/', '/(?<=^|\s)є/',
49 | '/(?<=^|\s)ї/', '/(?<=^|\s)й/', '/(?<=^|\s)ю/',
50 | '/(?<=^|\s)я/',
51 | ),
52 | array (
53 | 'Ye', 'Yi', 'Y', 'Yu', 'Ya', 'ye', 'yi', 'y', 'yu', 'ya',
54 | ),
55 | $text)
56 | );
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/config/translit/TranslitBe.php:
--------------------------------------------------------------------------------
1 |
12 | */
13 |
14 | class TranslitBe
15 | {
16 | public $alphabet = array (
17 | // upper case
18 | 'А' => 'A', 'Б' => 'B', 'В' => 'V', 'Г' => 'H',
19 | 'Д' => 'D', 'ДЖ' => 'Dž', 'ДЗ' => 'Dz', 'Е' => 'Ie',
20 | 'Ё' => 'Io', 'Ж' => 'Ž', 'З' => 'Z', 'І' => 'I',
21 | 'Й' => 'J', 'К' => 'K', 'Л' => 'L', 'М' => 'M',
22 | 'Н' => 'N', 'О' => 'O', 'П' => 'P', 'Р' => 'R',
23 | 'СЬ' => 'Ś', 'С' => 'S', 'Т' => 'T', 'У' => 'U',
24 | 'Ў' => 'Ǔ', 'Ф' => 'F', 'Х' => 'Ch', 'Ц' => 'C',
25 | 'Ч' => 'Č', 'Ш' => 'Š', 'Ы' => 'Y', 'Ь' => '\'',
26 | 'Э' => 'E', 'Ю' => 'Iu', 'Я' => 'Ia', '’' => '',
27 | // lower case
28 | 'а' => 'a', 'б' => 'b', 'в' => 'v', 'г' => 'h',
29 | 'д' => 'd', 'дж' => 'dž', 'дз' => 'dz', 'е' => 'ie',
30 | 'ё' => 'io', 'ж' => 'ž', 'з' => 'z', 'і' => 'i',
31 | 'й' => 'j', 'к' => 'k', 'л' => 'l', 'м' => 'm',
32 | 'н' => 'n', 'о' => 'o', 'п' => 'p', 'р' => 'r',
33 | 'сь' => 'ś', 'с' => 's', 'т' => 't', 'у' => 'u',
34 | 'ў' => 'ǔ', 'ф' => 'f', 'х' => 'ch', 'ц' => 'c',
35 | 'ч' => 'č', 'ш' => 'š', 'ы' => 'y', 'ь' => '\'',
36 | 'э' => 'e', 'ю' => 'iu', 'я' => 'ia', '\'' => '',
37 | );
38 |
39 | public function convert($text)
40 | {
41 | $sRe = '/(?<=^|\s|\'|’|[IЭЫAУО])';
42 | return str_replace(
43 | array_keys($this->alphabet),
44 | array_values($this->alphabet),
45 | preg_replace(
46 | // For е, ё, ю, я, the digraphs je, jo, ju, ja are used
47 | // word-initially, and after a vowel, apostrophe (’),
48 | // separating ь, or ў.
49 | array (
50 | $sRe . 'Е/i', $sRe . 'Ё/i', $sRe . 'Ю/i', $sRe . 'Я/i',
51 | $sRe . 'е/i', $sRe . 'ё/i', $sRe . 'ю/i', $sRe . 'я/i',
52 | ),
53 | array (
54 | 'Je', 'Jo', 'Ju', 'Ja', 'je', 'jo', 'ju', 'ja',
55 | ),
56 | $text)
57 | );
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/incl/messages/uploadGJMessage.php:
--------------------------------------------------------------------------------
1 | prepare($query3);
20 | $query3->execute([':accID' => $accID]);
21 | $userName = $query3->fetchColumn();
22 | //continuing the accounts system
23 | $id = ExploitPatch::remove($_POST["accountID"]);
24 | $register = 1;
25 | $userID = $gs->getUserID($id);
26 | $uploadDate = time();
27 |
28 | $checkBan = $gs->getPersonBan($accID, $userID, 3);
29 | if($checkBan) exit('-1');
30 |
31 | $checkExistence = $db->prepare("SELECT count(*) FROM accounts WHERE accountID = :toAccountID");
32 | $checkExistence->execute([':toAccountID' => $toAccountID]);
33 | if(!$checkExistence->fetchColumn()) exit('-1');
34 |
35 | $blocked = $db->query("SELECT ID FROM `blocks` WHERE person1 = $toAccountID AND person2 = $accID")->fetchAll(PDO::FETCH_COLUMN);
36 | $mSOnly = $db->query("SELECT mS FROM `accounts` WHERE accountID = $toAccountID AND mS > 0")->fetchAll(PDO::FETCH_COLUMN);
37 | $friend = $db->query("SELECT ID FROM `friendships` WHERE (person1 = $accID AND person2 = $toAccountID) || (person2 = $accID AND person1 = $toAccountID)")->fetchAll(PDO::FETCH_COLUMN);
38 |
39 | $query = $db->prepare("INSERT INTO messages (subject, body, accID, userID, userName, toAccountID, secret, timestamp)
40 | VALUES (:subject, :body, :accID, :userID, :userName, :toAccountID, :secret, :uploadDate)");
41 |
42 | if (!empty($mSOnly[0]) and $mSOnly[0] == 2) {
43 | echo -1;
44 | } else {
45 | if (empty($blocked[0]) and (empty($mSOnly[0]) || !empty($friend[0]))) {
46 | $query->execute([':subject' => $subject, ':body' => $body, ':accID' => $id, ':userID' => $userID, ':userName' => $userName, ':toAccountID' => $toAccountID, ':secret' => $secret, ':uploadDate' => $uploadDate]);
47 | echo 1;
48 | } else {
49 | echo -1;
50 | }
51 | }
52 | ?>
--------------------------------------------------------------------------------
/incl/relationships/getGJFriendRequests.php:
--------------------------------------------------------------------------------
1 | 21) ? $_POST["gjp2"] : $_POST["gjp"]; // Backwards Compatible GJP
11 | if(empty($_POST["accountID"]) OR (!isset($_POST["page"]) OR !is_numeric($_POST["page"])) OR empty($bcgjp)) {
12 | exit("-1");
13 | }
14 | $accountID = GJPCheck::getAccountIDOrDie();
15 | $page = ExploitPatch::number($_POST["page"]);
16 | $offset = $page*10;
17 | if($getSent == 0) {
18 | $query = "SELECT accountID, toAccountID, uploadDate, ID, comment, isNew FROM friendreqs WHERE toAccountID = :accountID LIMIT 10 OFFSET $offset";
19 | $countquery = "SELECT count(*) FROM friendreqs WHERE toAccountID = :accountID";
20 | } elseif($getSent == 1) {
21 | $query = "SELECT * FROM friendreqs WHERE accountID = :accountID LIMIT 10 OFFSET $offset";
22 | $countquery = "SELECT count(*) FROM friendreqs WHERE accountID = :accountID";
23 | } else exit("-1");
24 | $query = $db->prepare($query);
25 | $query->execute([':accountID' => $accountID]);
26 | $result = $query->fetchAll();
27 | $countquery = $db->prepare($countquery);
28 | $countquery->execute([':accountID' => $accountID]);
29 | $reqcount = $countquery->fetchColumn();
30 | if($reqcount == 0) exit("-2");
31 | foreach($result as &$request) {
32 | if($getSent == 0) {
33 | $requester = $request["accountID"];
34 | } elseif($getSent == 1) {
35 | $requester = $request["toAccountID"];
36 | }
37 | $query = "SELECT userName, userID, icon, color1, color2, iconType, special, extID, clan FROM users WHERE extID = :requester";
38 | $query = $db->prepare($query);
39 | $query->execute([':requester' => $requester]);
40 | $user = $query->fetch();
41 | $uploadTime = $gs->makeTime($request["uploadDate"]);
42 | $extid = is_numeric($user["extID"]) ? $user['extID'] : 0;
43 | $user["userName"] = $gs->makeClanUsername($user);
44 | $request["comment"] = ExploitPatch::url_base64_encode(ExploitPatch::translit(ExploitPatch::url_base64_decode($request["comment"])));
45 | $reqstring .= "1:".$user["userName"].":2:".$user["userID"].":9:".$user["icon"].":10:".$user["color1"].":11:".$user["color2"].":14:".$user["iconType"].":15:".$user["special"].":16:".$extid.":32:".$request["ID"].":35:".$request["comment"].":41:".$request["isNew"].":37:".$uploadTime."|";
46 |
47 | }
48 | $reqstring = substr($reqstring, 0, -1);
49 | echo $reqstring;
50 | echo "#${reqcount}:${offset}:10";
51 | ?>
--------------------------------------------------------------------------------
/incl/lib/connection.php:
--------------------------------------------------------------------------------
1 | true));
15 | $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
16 | $ic->checkIP();
17 | $ip = $ic->getYourIP();
18 | if($minGameVersion != 0 && isset($_POST['gameVersion']) && $_POST['gameVersion'] != 0 && $_POST['gameVersion'] < $minGameVersion && !isset($_SESSION)) exit("-1");
19 | if($maxGameVersion != 0 && isset($_POST['gameVersion']) && $_POST['gameVersion'] != 0 && $_POST['gameVersion'] > $maxGameVersion && !isset($_SESSION)) exit("-1");
20 | if($minBinaryVersion != 0 && isset($_POST['binaryVersion']) && $_POST['binaryVersion'] != 0 && $_POST['binaryVersion'] < $minBinaryVersion && !isset($_SESSION)) exit("-1");
21 | if($maxBinaryVersion != 0 && isset($_POST['binaryVersion']) && $_POST['binaryVersion'] != 0 && $_POST['binaryVersion'] > $maxBinaryVersion && !isset($_SESSION)) exit("-1");
22 | if(!isset($_SESSION['accountID'])) {
23 | $getExtID = $db->prepare('SELECT extID FROM users WHERE isRegistered = 1 AND IP = :ip LIMIT 1');
24 | $getExtID->execute([':ip' => $ip]);
25 | $getExtID = $getExtID->fetchColumn();
26 | }
27 | if(!isset($installed)) global $installed;
28 | if($installed && (!empty($getExtID) || isset($_SESSION['accountID']))) {
29 | $accountIDcheck = $getExtID ?? $_SESSION['accountID'];
30 | $timezone = $db->prepare('SELECT timezone FROM accounts WHERE accountID = :id');
31 | $timezone->execute([':id' => $accountIDcheck]);
32 | $timezone = $timezone->fetchColumn();
33 | if(!empty($timezone)) date_default_timezone_set($timezone);
34 | else {
35 | $json = file_get_contents('http://ip-api.com/json/'.$ip);
36 | $ipData = json_decode($json, true);
37 | if($ipData['timezone']) {
38 | $update = $db->prepare('UPDATE accounts SET timezone = :tz WHERE accountID = :id');
39 | $update->execute([':tz' => $ipData['timezone'], ':id' => $accountIDcheck]);
40 | date_default_timezone_set($ipData['timezone']);
41 | }
42 | }
43 | }
44 | }
45 | catch(PDOException $e) {
46 | echo "Connection failed: " . $e->getMessage();
47 | }
48 | }
49 | ?>
--------------------------------------------------------------------------------
/dashboard/stats/favouriteSongs.php:
--------------------------------------------------------------------------------
1 | title($dl->getLocalizedString("favouriteSongs"));
10 | $dl->printFooter('../');
11 | if(!isset($_SESSION["accountID"]) || $_SESSION["accountID"] == 0) die($dl->printSong('', 'account'));
18 | if(isset($_GET["page"]) AND is_numeric($_GET["page"]) AND $_GET["page"] > 0) {
19 | $page = ($_GET["page"] - 1) * 10;
20 | $actualpage = $_GET["page"];
21 | } else {
22 | $page = 0;
23 | $actualpage = 1;
24 | }
25 | $dailytable = $songs = "";
26 | if(!isset($_GET["type"])) $_GET["type"] = "";
27 | if(!isset($_GET["ng"])) $_GET["ng"] = "";
28 | $query = $db->prepare("SELECT * FROM favsongs INNER JOIN songs on favsongs.songID = songs.ID WHERE favsongs.accountID = :id ORDER BY favsongs.ID DESC LIMIT 10 OFFSET $page");
29 | $query->execute([':id' => $_SESSION["accountID"]]);
30 | $result = $query->fetchAll();
31 | if(empty($result)) {
32 | $dl->printSong('', 'account');
39 | die();
40 | }
41 | foreach($result as &$action) $songs .= $dl->generateSongCard($action);
42 | $pagel = '';
47 | $query = $db->prepare("SELECT * FROM favsongs INNER JOIN songs on favsongs.songID = songs.ID WHERE favsongs.accountID = :id ORDER BY favsongs.ID DESC");
48 | $query->execute([':id' => $_SESSION["accountID"]]);
49 | $result = $query->fetchAll();
50 | $pagecount = ceil(count($result) / 10);
51 | $bottomrow = $dl->generateBottomRow($pagecount, $actualpage);
52 | $dl->printPage($pagel . $bottomrow, true, "account");
53 | ?>
--------------------------------------------------------------------------------
/accounts/registerGJAccount.php:
--------------------------------------------------------------------------------
1 | = 1) {
18 | $bannedUsernamesList = array_map('strtolower', $bannedUsernames);
19 | switch($filterUsernames) {
20 | case 1:
21 | if(in_array(strtolower($userName), $bannedUsernamesList)) exit("-4");
22 | break;
23 | case 2:
24 | foreach($bannedUsernamesList as $bannedUsername) {
25 | if(!empty($bannedUsername) && mb_strpos(strtolower($userName), $bannedUsername) !== false) exit("-4");
26 | }
27 | }
28 | }
29 | if(strlen($userName) > 20) exit("-4");
30 | if(strlen($userName) < 3) exit("-9");
31 | if(strlen($password) < 6) exit("-8");
32 | if(!filter_var($email, FILTER_VALIDATE_EMAIL)) exit("-6");
33 | if($mailEnabled) {
34 | $checkMail = $db->prepare("SELECT count(*) FROM accounts WHERE email LIKE :mail");
35 | $checkMail->execute([':mail' => $email]);
36 | $checkMail = $checkMail->fetchColumn();
37 | if($checkMail > 0) exit("-3");
38 | }
39 | $query2 = $db->prepare("SELECT count(*) FROM accounts WHERE userName LIKE :userName");
40 | $query2->execute([':userName' => $userName]);
41 | $regusrs = $query2->fetchColumn();
42 | if($regusrs > 0) {
43 | echo "-2";
44 | } else {
45 | $hashpass = password_hash($password, PASSWORD_DEFAULT);
46 | $gjp2 = GeneratePass::GJP2hash($password);
47 | $query = $db->prepare("INSERT INTO accounts (userName, password, email, registerDate, isActive, gjp2)
48 | VALUES (:userName, :password, :email, :time, :isActive, :gjp)");
49 | $query->execute([':userName' => $userName, ':password' => $hashpass, ':email' => $email, ':time' => time(), ':isActive' => $preactivateAccounts ? 1 : 0, ':gjp' => $gjp2]);
50 | $accountID = $db->lastInsertId();
51 | echo "1";
52 | $gs->logAction($accountID, 1, $userName, $email, $gs->getUserID($accountID, $userName));
53 | $gs->sendLogsRegisterWebhook($accountID);
54 | if($mailEnabled) $gs->mail($email, $userName);
55 | }
56 | } else echo "-1";
57 | ?>
58 |
--------------------------------------------------------------------------------
/incl/levelpacks/uploadGJLevelList.php:
--------------------------------------------------------------------------------
1 | prepare('SELECT * FROM lists WHERE listID = :listID AND accountID = :accountID');
25 | $list->execute([':listID' => $listID, ':accountID' => $accountID]);
26 | $list = $list->fetch();
27 | if(!empty($list)) {
28 | $updateList = $db->prepare('UPDATE lists SET listDesc = :listDesc, listVersion = :listVersion, listlevels = :listlevels, starDifficulty = :difficulty, original = :original, unlisted = :unlisted, updateDate = :timestamp WHERE listID = :listID');
29 | $updateList->execute([':listID' => $listID, ':listDesc' => $listDesc, ':listVersion' => $listVersion, ':listlevels' => $listLevels, ':difficulty' => $difficulty, ':original' => $original, ':unlisted' => $unlisted, ':timestamp' => time()]);
30 | $gs->logAction($accountID, 18, $listName, $listLevels, $listID, $difficulty, $unlisted);
31 | $gs->sendLogsListChangeWebhook($listID, $accountID, $list);
32 | exit($listID);
33 | }
34 | }
35 | $list = $db->prepare('INSERT INTO lists (listName, listDesc, listVersion, accountID, listlevels, starDifficulty, original, unlisted, uploadDate) VALUES (:listName, :listDesc, :listVersion, :accountID, :listlevels, :difficulty, :original, :unlisted, :timestamp)');
36 | $list->execute([':listName' => $listName, ':listDesc' => $listDesc, ':listVersion' => $listVersion, ':accountID' => $accountID, ':listlevels' => $listLevels, ':difficulty' => $difficulty, ':original' => $original, ':unlisted' => $unlisted, ':timestamp' => time()]);
37 | $listID = $db->lastInsertId();
38 | $gs->logAction($accountID, 17, $listName, $listLevels, $listID, $difficulty, $unlisted);
39 | $gs->sendLogsListChangeWebhook($listID, $accountID);
40 | echo $listID;
41 | ?>
--------------------------------------------------------------------------------
/_updates/2021-03-13.sql:
--------------------------------------------------------------------------------
1 | ALTER TABLE `dailyfeatures` ADD INDEX(`type`);
2 | ALTER TABLE `dailyfeatures` ADD INDEX(`timestamp`);
3 | ALTER TABLE `users` ADD INDEX(`extID`);
4 | ALTER TABLE `modactions` ADD INDEX(`account`);
5 | ALTER TABLE `modactions` ADD INDEX(`type`);
6 | ALTER TABLE `comments` ADD INDEX(`userID`);
7 | ALTER TABLE `levelscores` ADD INDEX(`accountID`);
8 | ALTER TABLE `levels` ADD INDEX(`starDemon`);
9 | ALTER TABLE `levels` ADD INDEX(`starAuto`);
10 | ALTER TABLE `reports` ADD INDEX(`levelID`);
11 | ALTER TABLE `reports` ADD INDEX(`hostname`);
12 | ALTER TABLE `levels` ADD INDEX(`extID`);
13 | ALTER TABLE `modips` ADD INDEX(`accountID`);
14 | ALTER TABLE `modips` ADD INDEX(`IP`);
15 | ALTER TABLE `roles` ADD INDEX(`priority`);
16 | ALTER TABLE `roleassign` ADD INDEX(`roleID`);
17 | ALTER TABLE `roleassign` ADD INDEX(`accountID`);
18 | ALTER TABLE `messages` ADD INDEX(`accID`);
19 | ALTER TABLE `songs` ADD INDEX(`authorName`);
20 | ALTER TABLE `blocks` ADD INDEX(`person1`);
21 | ALTER TABLE `blocks` ADD INDEX(`person2`);
22 | ALTER TABLE `friendreqs` ADD INDEX(`accountID`);
23 | ALTER TABLE `friendreqs` ADD INDEX(`uploadDate`);
24 | ALTER TABLE `accounts` ADD INDEX(`frS`);
25 | ALTER TABLE `modactions` ADD INDEX(`value3`);
26 | ALTER TABLE `accounts` ADD INDEX(`discordID`);
27 | ALTER TABLE `accounts` ADD INDEX(`discordLinkReq`);
28 | ALTER TABLE `levels` ADD INDEX(`starCoins`);
29 | ALTER TABLE `levels` ADD INDEX(`coins`);
30 | ALTER TABLE `users` ADD INDEX(`IP`);
31 | ALTER TABLE `cpshares` ADD INDEX(`levelID`);
32 | ALTER TABLE `levels` ADD INDEX(`password`);
33 | ALTER TABLE `levels` ADD INDEX(`originalReup`);
34 | ALTER TABLE `levels` ADD INDEX(`original`);
35 | ALTER TABLE `links` ADD INDEX(`targetUserID`);
36 | ALTER TABLE `links` ADD INDEX(`targetAccountID`);
37 | ALTER TABLE `links` ADD INDEX(`server`);
38 | ALTER TABLE `levels` ADD INDEX(`unlisted`);
39 | ALTER TABLE `levels` ADD INDEX(`isCPShared`);
40 | ALTER TABLE `acccomments` ADD INDEX(`timestamp`);
41 | ALTER TABLE `comments` ADD INDEX(`likes`);
42 | ALTER TABLE `users` ADD INDEX(`isRegistered`);
43 | ALTER TABLE `accounts` ADD INDEX(`friendsCount`);
44 | ALTER TABLE `levels` ADD INDEX(`gameVersion`);
45 | ALTER TABLE `roles` ADD INDEX(`toolModactions`);
46 | ALTER TABLE `suggest` ADD INDEX(`timestamp`);
47 | ALTER TABLE `levels` ADD INDEX(`rateDate`);
48 | ALTER TABLE `levels` ADD INDEX(`objects`);
49 |
50 | ALTER TABLE `levels` CHANGE `uploadDate` `uploadDate` BIGINT NOT NULL;
51 | ALTER TABLE `levels` CHANGE `updateDate` `updateDate` BIGINT NOT NULL;
52 | ALTER TABLE `levels` ADD INDEX(`uploadDate`);
53 | ALTER TABLE `levels` ADD INDEX(`updateDate`);
54 |
55 | ALTER TABLE `actions` ADD INDEX(`value`);
56 | ALTER TABLE `actions` ADD INDEX(`value2`);
57 | ALTER TABLE `actions` ADD INDEX(`timestamp`);
58 |
--------------------------------------------------------------------------------
/dashboard/levels/gauntlets.php:
--------------------------------------------------------------------------------
1 | checkPermission($_SESSION["accountID"], 'dashboardGauntletCreate')) {
12 | if(!Captcha::validateCaptcha()) {
13 | exit(json_encode(['success' => false]));
14 | }
15 | if(!$gs->getLevelName($_GET["l1"]) OR !$gs->getLevelName($_GET["l2"]) OR !$gs->getLevelName($_GET["l3"]) OR !$gs->getLevelName($_GET["l4"]) OR !$gs->getLevelName($_GET["l5"]) OR !is_numeric($_GET['gid'])) {
16 | exit(json_encode(['success' => false]));
17 | }
18 | $gauntletLevels = [ExploitPatch::number($_GET["l1"]), ExploitPatch::number($_GET["l2"]), ExploitPatch::number($_GET["l3"]), ExploitPatch::number($_GET["l4"]), ExploitPatch::number($_GET["l5"])];
19 | if(array_unique($gauntletLevels) != $gauntletLevels) {
20 | exit(json_encode(['success' => false]));
21 | }
22 | $gid = ExploitPatch::number($_GET['gid']);
23 | $gauntletData = $db->prepare('SELECT * FROM gauntlets WHERE ID = :gid');
24 | $gauntletData->execute([':gid' => $id]);
25 | $gauntletData = $gauntletData->fetch();
26 | $change = $db->prepare("UPDATE gauntlets SET ID = :gid, level1 = :l1, level2 = :l2, level3 = :l3, level4 = :l4, level5 = :l5 WHERE ID = :i");
27 | $change->execute([':i' => $id, ':gid' => $gid,':l1' => $gauntletLevels[0], ':l2' => $gauntletLevels[1], ':l3' => $gauntletLevels[2], ':l4' => $gauntletLevels[3], ':l5' => $gauntletLevels[4]]);
28 | $levels = $gauntletLevels[0].','.$gauntletLevels[1].','.$gauntletLevels[2].','.$gauntletLevels[3].','.$gauntletLevels[4];
29 | $query = $db->prepare("INSERT INTO modactions (type, value, value3, timestamp, account) VALUES ('22',:value, :value3, :timestamp,:account)");
30 | $query->execute([':value' => $levels, ':value3' => $gid, ':timestamp' => time(), ':account' => $_SESSION["accountID"]]);
31 | $gs->sendLogsGauntletChangeWebhook($gid, $_SESSION['accountID'], $gauntletData);
32 | echo json_encode(['success' => true, 'name' => $gs->getGauntletName($gid)." Gauntlet"]);
33 | } else {
34 | $pck = $db->prepare("SELECT * FROM gauntlets WHERE ID = :id");
35 | $pck->execute([':id' => $id]);
36 | $map = $pck->fetch();
37 | echo json_encode(['success' => true, 'ID' => $map['ID'], 'l1' => $map['level1'], 'l2' => $map['level2'], 'l3' => $map['level3'], 'l4' => $map['level4'], 'l5' => $map['level5'], 'name' => $gs->getGauntletName($id)." Gauntlet"]);
38 | }
39 | }
40 | ?>
--------------------------------------------------------------------------------
/dashboard/stats/dailyTable.php:
--------------------------------------------------------------------------------
1 | title($dl->getLocalizedString("dailyTable"));
10 | $dl->printFooter('../');
11 | if(isset($_GET["page"]) AND is_numeric($_GET["page"]) AND $_GET["page"] > 0){
12 | $page = ($_GET["page"] - 1) * 10;
13 | $actualpage = $_GET["page"];
14 | } else {
15 | $page = 0;
16 | $actualpage = 1;
17 | }
18 | $query = $db->prepare("SELECT * FROM dailyfeatures WHERE timestamp < :time ORDER BY feaID DESC LIMIT 10 OFFSET $page");
19 | $query->execute([':time' => time()]);
20 | $result = $query->fetchAll();
21 | $query = $db->prepare("SELECT count(*) FROM dailyfeatures WHERE timestamp < :time");
22 | $query->execute([':time' => time()]);
23 | $dailycount = $query->fetchColumn();
24 | $x = $dailycount - $page;
25 | if(empty($result)) {
26 | $dl->printSong('', 'stats');
33 | die();
34 | }
35 | $modcheck = $gs->checkPermission($_SESSION["accountID"], "dashboardModTools");
36 | foreach($result as &$daily){
37 | $typeArray = ['Daily', 'Weekly'];
38 | $type = $typeArray[$daily["type"]];
39 | $query = $db->prepare("SELECT * FROM levels WHERE levelID = :levelID");
40 | $query->execute([':levelID' => $daily["levelID"]]);
41 | $level = $query->fetch();
42 | $dtt = $dl->convertToDate($daily['timestamp'], true);
43 | if(!empty($level)) {
44 | $dailyl = ' '.$type.'
';
45 | $dt = ' '.$dtt.'
';
46 | $levels .= $dl->generateLevelsCard($level, $modcheck, $dailyl.$dt);
47 | } else $levels .= '';
48 | }
49 | $pagel = '';
55 | $pagecount = ceil($dailycount / 10);
56 | $bottomrow = $dl->generateBottomRow($pagecount, $actualpage);
57 | $dl->printPage($pagel.$bottomrow, true, "stats");
58 | ?>
--------------------------------------------------------------------------------
/dashboard/api/makePost.php:
--------------------------------------------------------------------------------
1 | true, 'success' => false, 'error' => 1, 'message' => 'Please supply a valid account credentials.']));
18 | }
19 | $body = trim(ExploitPatch::rucharclean($_POST['body']));
20 | if(empty($body)) {
21 | http_response_code(400);
22 | exit(json_encode(['dashboard' => true, 'success' => false, 'error' => 2, 'message' => 'Please enter post message.']));
23 | }
24 | $userID = $gs->getUserID($accountID);
25 | $checkBan = $gs->getPersonBan($accountID, $userID, 3);
26 | if($checkBan) {
27 | http_response_code(403);
28 | exit(json_encode(['dashboard' => true, 'success' => false, 'error' => 3, 'message' => 'You are banned!', 'reason' => base64_decode($checkBan['reason']), 'expires' => $checkBan['expires']]));
29 | }
30 | $query = $db->prepare("SELECT timestamp FROM acccomments WHERE userID = :userID ORDER BY timestamp DESC LIMIT 1");
31 | $query->execute([':userID' => $userID]);
32 | $res = $query->fetch();
33 | $time = time() - 5;
34 | if($res["timestamp"] > $time) {
35 | http_response_code(400);
36 | exit(json_encode(['dashboard' => true, 'success' => false, 'error' => 4, 'message' => 'You send posts too fast.']));
37 | }
38 | if($enableCommentLengthLimiter && strlen($body) > $maxAccountCommentLength) {
39 | http_response_code(400);
40 | exit(json_encode(['dashboard' => true, 'success' => false, 'error' => 5, 'message' => 'Your post is too long.']));
41 | } else {
42 | $accountUsername = $gs->getAccountName($accountID);
43 | $body = ExploitPatch::url_base64_encode($body);
44 | $query = $db->prepare("INSERT INTO acccomments (userID, userName, comment, timestamp) VALUES (:userID, :name, :body, :time)");
45 | $query->execute([':userID' => $userID, ':name' => $accountUsername, ':body' => $body, ':time' => time()]);
46 | $gs->logAction($accountID, 14, $accountUsername, $body, $db->lastInsertId());
47 | Automod::checkAccountPostsSpamming($userID);
48 | exit(json_encode(['dashboard' => true, 'success' => true]));
49 | }
50 | exit(json_encode(['dashboard' => true, 'success' => false, 'error' => 6, 'message' => 'Unexpected error.']));
51 | ?>
--------------------------------------------------------------------------------