-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from saintly2k/final
Endlich
- Loading branch information
Showing
968 changed files
with
85,519 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?php | ||
|
||
if (!file_exists(__DIR__ . "/.installed")) { | ||
header("Location: install.php"); | ||
die("System not installed."); | ||
} | ||
|
||
// Main-config | ||
require_once "config.php"; | ||
$config["debug"] == true ? error_reporting(E_ALL) && ini_set('display_errors', 1) : error_reporting(0) && ini_set('display_errors', 0); | ||
require_once "funky.php"; | ||
|
||
// SleekDB | ||
require_once ps(__DIR__ . $config["path"]["sleek"] . "/Store.php"); | ||
$db["users"] = new \SleekDB\Store("users", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["sessions"] = new \SleekDB\Store("sessions", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["alerts"] = new \SleekDB\Store("alerts", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["alertReads"] = new \SleekDB\Store("alertReads", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["titles"] = new \SleekDB\Store("titles", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["chapters"] = new \SleekDB\Store("chapters", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["visitLogs"] = new \SleekDB\Store("visitLogs", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["chapterComments"] = new \SleekDB\Store("chapterComments", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["titleComments"] = new \SleekDB\Store("titleComments", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["profileComments"] = new \SleekDB\Store("profileComments", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["titleViews"] = new \SleekDB\Store("titleViews", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["chapterViews"] = new \SleekDB\Store("chapterViews", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["profileViews"] = new \SleekDB\Store("profileViews", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["activation"] = new \SleekDB\Store("activation", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
$db["readChapters"] = new \SleekDB\Store("readChapters", ps(__DIR__ . $config["db"]["sleek"]["dir"]), $config["db"]["sleek"]["config"]); | ||
|
||
// Session | ||
require_once "session.php"; | ||
|
||
// Theme, language and reading language | ||
$usertheme = getUserTheme($logged, $user["theme"] ?? ""); | ||
$userlang = getUserLang($logged, $user["lang"] ?? ""); | ||
$preflang = getPrefLang(); | ||
|
||
// Parsedown | ||
require_once ps(__DIR__ . $config["path"]["parsedown"] . "/Parsedown.php"); | ||
$parsedown = new Parsedown(); | ||
$parsedown->setSafeMode(true); | ||
|
||
// HTML-Purifier | ||
require_once ps(__DIR__ . $config["path"]["htmlpurifier"] . "/HTMLPurifier.auto.php"); | ||
$purifier = new HTMLPurifier(HTMLPurifier_Config::createDefault()); | ||
|
||
// PHPMailer | ||
use PHPMailer\PHPMailer\PHPMailer; | ||
use PHPMailer\PHPMailer\Exception; | ||
|
||
require_once ps(__DIR__ . $config["path"]["phpmailer"] . "/Exception.php"); | ||
require_once ps(__DIR__ . $config["path"]["phpmailer"] . "/PHPMailer.php"); | ||
require_once ps(__DIR__ . $config["path"]["phpmailer"] . "/SMTP.php"); | ||
|
||
$mailer = new PHPMailer(true); | ||
|
||
// Smarty | ||
require_once ps(__DIR__ . $config["path"]["smarty"] . "/Smarty.class.php"); | ||
$smarty = new Smarty(); | ||
$smarty->setTemplateDir(ps(__DIR__ . $config["smarty"]["template"] . "/" . $usertheme)); | ||
$smarty->setConfigDir(ps(__DIR__ . $config["smarty"]["config"])); | ||
$smarty->setCompileDir(ps(__DIR__ . $config["smarty"]["compile"])); | ||
$smarty->setCacheDir(ps(__DIR__ . $config["smarty"]["cache"])); | ||
|
||
// Getting all plugins for the Theme | ||
require ps(__DIR__ . $config["smarty"]["template"] . "/{$usertheme}/info.php"); | ||
foreach ($theme["plugins"] as $reqPlugin) { | ||
if (!file_exists(ps(__DIR__ . $config["path"]["plugins"] . "/enabled/" . $reqPlugin . ".php"))) | ||
die("This theme requires following plugin to be enabled: " . $reqPlugin); | ||
require_once ps(__DIR__ . $config["path"]["plugins"] . "/enabled/" . $reqPlugin . ".php"); | ||
} | ||
|
||
// Plugins (Legacy) | ||
// $plugins = glob(ps(__DIR__ . $config["path"]["plugins"] . "/enabled/*.php")); | ||
// foreach ($plugins as $plugin) { | ||
// require_once $plugin; | ||
// } | ||
|
||
// And finally | ||
$usertheme = getUserTheme($logged, $user["theme"] ?? ""); | ||
$userlang = getUserLang($logged, $user["lang"] ?? ""); | ||
$preflang = getPrefLang(); | ||
require ps(__DIR__ . $config["smarty"]["template"] . "/{$usertheme}/info.php"); | ||
require ps(__DIR__ . $config["path"]["langs"] . "/{$userlang}.php"); | ||
|
||
visit(); | ||
|
||
$smarty->assign("config", $config); | ||
$smarty->assign("lang", $lang); | ||
$smarty->assign("theme", $theme); | ||
$smarty->assign("userlang", $userlang); | ||
$smarty->assign("usertheme", $usertheme); | ||
$smarty->assign("version", file_get_contents(ps(__DIR__ . "/version.txt"))); | ||
$smarty->assign("logged", $logged); | ||
$smarty->assign("user", $user); | ||
$smarty->assign("preflang", $preflang); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?php | ||
|
||
$config["title"] = "FoOlSlideX"; | ||
$config["divider"] = ".::."; | ||
$config["slogan"] = "Mangas for Fools!"; | ||
$config["logs"] = true; | ||
$config["debug"] = true; | ||
$config["url"] = "http://localhost/fsx/public/"; | ||
$config["email"] = "[email protected]"; | ||
$config["activation"] = false; // Activate account through email? | ||
$config["shareAnonymousAnalytics"] = true; | ||
$config["api"] = true; // not really working rn, still please let it enabled until newer versions | ||
|
||
$config["db"]["type"] = "sleek"; // "sleek" | ||
$config["db"]["sleek"]["dir"] = "/database"; | ||
$config["db"]["sleek"]["config"] = array( | ||
"auto_cache" => true, | ||
"cache_lifetime" => null, | ||
"timeout" => false, // deprecated! Set it to false! | ||
"primary_key" => "id", | ||
"search" => array( | ||
"min_length" => 2, | ||
"mode" => "or", | ||
"score_key" => "scoreKey" | ||
), | ||
"folder_permissions" => 0777 | ||
); | ||
|
||
// MaxFileSize (in Bytes, visit https://www.gbmb.org/mb-to-bytes for help) | ||
$config["mfs"]["cover"] = 5242880; // 5MB | ||
$config["mfs"]["chapter"] = 52428800; // 50MB | ||
|
||
// Default-Variablen | ||
$config["default"]["theme"] = "nucleus"; | ||
$config["default"]["lang"] = "en"; | ||
$config["default"]["avatar"] = "https://rav.h33t.moe/data/8c4f8647-4bec-420e-96e0-284125793baf.jpeg"; | ||
|
||
// Captcha | ||
$config["captcha"]["enabled"] = false; | ||
$config["captcha"]["type"] = "hcaptcha"; // "hcaptcha" | ||
$config["captcha"]["hcaptcha"]["secret"] = ""; | ||
$config["captcha"]["hcaptcha"]["sitekey"] = ""; | ||
|
||
// Themes and Languages | ||
$config["themes"] = array( | ||
"nucleus" => "Nucleus" | ||
); | ||
$config["langs"] = array( | ||
"en" => "English", | ||
); | ||
|
||
// Avatars | ||
$config["avatars"] = array( | ||
"https://rav.h33t.moe/data/8c4f8647-4bec-420e-96e0-284125793baf.jpeg", | ||
"https://rav.h33t.moe/data/cf39f370-73f9-4428-bc65-136e1d509cc9.jpeg", | ||
"https://rav.shishnet.org/af4cf8aadc45565bbeecb0ced4857ed5.jpeg", | ||
"https://rav.shishnet.org/4f054d8a364b1cb658a458df687621c6.jpeg", | ||
"https://rav.shishnet.org/21e78a09e342964a8c7ce20e410697d0.jpeg", | ||
"https://rav.shishnet.org/436e8788f8ed655e9c74c54dc9947d00.jpeg", | ||
"https://rav.shishnet.org/3737e6629146ba78fb4a84284357802a.gif", | ||
"https://rav.shishnet.org/c6bbc472ba1ec7012620ac0c1b35491a.gif", | ||
); | ||
|
||
// X elements per page for pagination | ||
$config["perpage"]["titles"] = 25; | ||
$config["perpage"]["chapters"] = 36; | ||
|
||
$config["path"]["sleek"] = "/software/SleekDB"; | ||
$config["path"]["parsedown"] = "/software"; | ||
$config["path"]["langs"] = "/library/langs"; | ||
$config["path"]["htmlpurifier"] = "/software/HTMLPurifier"; | ||
$config["path"]["smarty"] = "/software/Smarty"; | ||
$config["path"]["plugins"] = "/library/plugins"; | ||
$config["path"]["phpmailer"] = "/software/PHPMailer"; | ||
$config["path"]["imagescrambler"] = "/software"; | ||
|
||
// Diese Software nutzt Smarty als Template-Engine. Dokumentation: https://smarty-php.github.io/smarty/ | ||
$config["smarty"]["template"] = "/library/themes"; | ||
$config["smarty"]["config"] = "/software/Smarty/config"; | ||
$config["smarty"]["compile"] = "/software/Smarty/compile"; | ||
$config["smarty"]["cache"] = "/software/Smarty/cache"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[ | ||
"4-Koma", | ||
"Adaption", | ||
"Anthology", | ||
"Award Winning", | ||
"Doujinshi", | ||
"Fan Colored", | ||
"Fan Color", | ||
"Full Color", | ||
"Long Strip", | ||
"Official Colored", | ||
"Oneshot", | ||
"User Created", | ||
"Web Comic" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[ | ||
"Action", | ||
"Adventure", | ||
"Boys' Love", | ||
"Comedy", | ||
"Crime", | ||
"Drama", | ||
"Fantasy", | ||
"Girls' Love", | ||
"Historical", | ||
"Horror", | ||
"Isekai", | ||
"Magical Girls", | ||
"Mecha", | ||
"Medical", | ||
"Mystery", | ||
"Philosophical", | ||
"Psychological", | ||
"Romance", | ||
"Sci-Fi", | ||
"Slice of Life", | ||
"Sports", | ||
"Superhero", | ||
"Thriller", | ||
"Tragedy", | ||
"Wuxia" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[ | ||
"Aliens", | ||
"Animals", | ||
"Cooking", | ||
"Crossdressing", | ||
"Delinquents", | ||
"Demons", | ||
"Genderswap", | ||
"Ghosts", | ||
"Gyaru", | ||
"Harem", | ||
"Incest", | ||
"Loli", | ||
"Mafia", | ||
"Magic", | ||
"Martial Arts", | ||
"Military", | ||
"Monster Girls", | ||
"Monsters", | ||
"Music", | ||
"Ninja", | ||
"Office Workers", | ||
"Police", | ||
"Post-Apocalyptic", | ||
"Reincarnation", | ||
"Reverse Harem", | ||
"Samurai", | ||
"School Life", | ||
"Shota", | ||
"Supernatural", | ||
"Survival", | ||
"Time Travel", | ||
"Traditional Games", | ||
"Vampires", | ||
"Video Games", | ||
"Villainess", | ||
"Virtual Reality", | ||
"Zombies" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[ | ||
[ | ||
"gb", | ||
"English", | ||
"🇬🇧" | ||
], | ||
[ | ||
"de", | ||
"German", | ||
"🇩🇪" | ||
], | ||
[ | ||
"pt", | ||
"Portuguese", | ||
"🇵🇹" | ||
], | ||
[ | ||
"fr", | ||
"French", | ||
"🇫🇷" | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[ | ||
"Gore", | ||
"Sexual Violence", | ||
"Smut" | ||
] |
Oops, something went wrong.