mirror of
https://github.com/saintly2k/FoOlSlideX.git
synced 2025-02-20 11:13:13 +08:00
different styles, user levels, config migration to db
This commit is contained in:
parent
7c6eb02509
commit
5e5f5b7796
21
.htaccess
21
.htaccess
@ -15,11 +15,24 @@ RewriteRule ^about/?$ ./render/public/about.req.php
|
||||
RewriteRule ^manga/(.*)/?$ ./render/public/manga.req.php?slug=$1
|
||||
RewriteRule ^chapter/(.*)/?$ ./render/public/chapter.req.php?slug=$1
|
||||
|
||||
# Group Pages
|
||||
RewriteRule ^groups/?$ ./render/public/groups.req.php
|
||||
RewriteRule ^group/(.*)/?$ ./render/public/group.req.php?id=$1
|
||||
|
||||
# Releaser Pages
|
||||
RewriteRule ^admin/settings/?$ ./render/releaser/settings.req.php
|
||||
RewriteRule ^admin/new_title/?$ ./render/releaser/new_title.req.php
|
||||
RewriteRule ^admin/edit_title/(.*)/?$ ./render/releaser/edit_title.req.php?slug=$1
|
||||
RewriteRule ^admin/add_chapter/(.*)/?$ ./render/releaser/add_chapter.req.php?slug=$1
|
||||
RewriteRule ^admin/edit_chapter/(.*)/?$ ./render/releaser/edit_chapter.req.php?slug=$1
|
||||
|
||||
# Mod Pages
|
||||
RewriteRule ^admin/add_group/?$ ./render/mod/add_group.req.php
|
||||
RewriteRule ^admin/manage_groups/?$ ./render/mod/manage_groups.req.php
|
||||
RewriteRule ^admin/edit_group/(.*)/?$ ./render/mod/edit_group.req.php?id=$1
|
||||
|
||||
# Admin Pages
|
||||
RewriteRule ^admin/new_title/?$ ./render/admin/new_title.req.php
|
||||
RewriteRule ^admin/edit_title/(.*)/?$ ./render/admin/edit_title.req.php?slug=$1
|
||||
RewriteRule ^admin/add_chapter/(.*)/?$ ./render/admin/add_chapter.req.php?slug=$1
|
||||
RewriteRule ^admin/edit_chapter/(.*)/?$ ./render/admin/edit_chapter.req.php?slug=$1
|
||||
RewriteRule ^admin/config/?$ ./render/admin/config.req.php
|
||||
|
||||
# Redirect whatever
|
||||
RewriteRule ^login.req.php?$ ./render/redirect.php?page=login
|
||||
|
Binary file not shown.
7402
assets/themes/bootstrap.1.min.css
vendored
Normal file
7402
assets/themes/bootstrap.1.min.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
11
assets/themes/bootstrap.2.min.css
vendored
Normal file
11
assets/themes/bootstrap.2.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
assets/themes/bootstrap.3.min.css
vendored
Normal file
11
assets/themes/bootstrap.3.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
assets/themes/bootstrap.4.min.css
vendored
Normal file
11
assets/themes/bootstrap.4.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
assets/themes/bootstrap.5.min.css
vendored
Normal file
11
assets/themes/bootstrap.5.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
assets/themes/bootstrap.6.min.css
vendored
Normal file
11
assets/themes/bootstrap.6.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
12
config.php
12
config.php
@ -1,17 +1,5 @@
|
||||
<?php
|
||||
|
||||
$config = [
|
||||
"title" => "MangaReader", // Spaces allowed
|
||||
"cookie" => "mangareader", // NO SPACES, ONE WORD!
|
||||
"logo" => "assets/img/logo.png",
|
||||
"slogan" => "Read Manga online for free with no ads",
|
||||
"url" => "http://localhost/mangareaderx/",
|
||||
"theme" => 1, // choose betweeen 1-5
|
||||
"start" => "2020",
|
||||
"lang" => "pt", // "de", en", "pt", "ru", default language
|
||||
"disqus" => "mangapanzer"
|
||||
];
|
||||
|
||||
$slave = [
|
||||
"host" => "localhost",
|
||||
"user" => "root",
|
||||
|
@ -20,4 +20,9 @@ Text Style:
|
||||
3 - Scan on Hiatus
|
||||
4 - Forced Hiatus (due to exposure)
|
||||
5 - Completed
|
||||
6 - Dropped
|
||||
6 - Dropped
|
||||
|
||||
[ User-Level (int) ]
|
||||
1 - Admin
|
||||
2 - Moderator
|
||||
3 - Releaser
|
@ -25,7 +25,46 @@ $lang = [
|
||||
"settings" => "Einstellungen",
|
||||
"logout" => "Abmelden",
|
||||
"add_new" => "Neuen Titel",
|
||||
"bookmarks" => "Bookmarks"
|
||||
"bookmarks" => "Bookmarks",
|
||||
"manage_groups" => "Gruppen Managen",
|
||||
"groups" => "Gruppen",
|
||||
"config" => "Seiten-Konfiguration",
|
||||
"settings" => "Account Einstellungen"
|
||||
],
|
||||
"home" => [
|
||||
"added_titles" => "Neue Titel",
|
||||
"type" => "Typ",
|
||||
"title" => "Titel",
|
||||
"added" => "Hinzugefügt",
|
||||
"released_chap" => "Neue Kapitel",
|
||||
"chapter" => "Kapitel",
|
||||
"chap_title" => "Kapitel Titel",
|
||||
"group" => "Gruppe",
|
||||
"uploader" => "Uploader"
|
||||
],
|
||||
"groups" => [
|
||||
"add_group" => "Neue Gruppe hinzufügen",
|
||||
"req_group" => "Neue Gruppe anfragen",
|
||||
],
|
||||
"config" => [
|
||||
"title" => "Konfiguration Bearbeiten",
|
||||
"title2" => "Seitentitle",
|
||||
"slogan" => "Seitenslogan",
|
||||
"logo" => "Logo URL (Leer lassen für keins)",
|
||||
"cookie" => "Cookie Prefix (Wenn du ihn änderst, gehen alle Bookmarks verloren!)",
|
||||
"url" => "URL zur Seite (Mit https und MUSS MIT SCHRÄGSTRICH ENDEN!)",
|
||||
"theme" => "Standard-Theme",
|
||||
"themes" => [
|
||||
1 => "Standard Hell",
|
||||
2 => "Cerulean Hell",
|
||||
3 => "Lumen Hell",
|
||||
4 => "Lesbar Hell",
|
||||
5 => "Slate Dunkel",
|
||||
6 => "Cyborg Dunkel"
|
||||
],
|
||||
"start" => "Seite gegründet in",
|
||||
"lang" => "Standard Sprache",
|
||||
"disqus" => "Disqus Name"
|
||||
],
|
||||
"login" => [
|
||||
"error" => "Error",
|
||||
@ -58,6 +97,7 @@ $lang = [
|
||||
"licensed" => "Lizenzer (Leer lassen wenn unlizenziert)",
|
||||
"official" => "URL zum offiziellem Release (Leer lassen wenn nicht vorhanden)",
|
||||
"required" => "Erforderliche Felder sind mit * gekennzeichnet.",
|
||||
"all_required" => "Alle Felder sind erforderlich!",
|
||||
"manga" => "Manga",
|
||||
"manhua" => "Manhua",
|
||||
"manwha" => "Manwha",
|
||||
|
@ -25,7 +25,46 @@ $lang = [
|
||||
"settings" => "Settings",
|
||||
"logout" => "Logout",
|
||||
"add_new" => "New Title",
|
||||
"bookmarks" => "Bookmarks"
|
||||
"bookmarks" => "Bookmarks",
|
||||
"manage_groups" => "Manage Groups",
|
||||
"groups" => "Groups",
|
||||
"config" => "Edit Config",
|
||||
"settings" => "Account Settings"
|
||||
],
|
||||
"home" => [
|
||||
"added_titles" => "Added Titles",
|
||||
"type" => "Type",
|
||||
"title" => "Title",
|
||||
"added" => "Added",
|
||||
"released_chap" => "Released Chapters",
|
||||
"chapter" => "Chapter",
|
||||
"chap_title" => "Chapter Title",
|
||||
"group" => "Group",
|
||||
"uploader" => "Uploader"
|
||||
],
|
||||
"groups" => [
|
||||
"add_group" => "Add new Group",
|
||||
"req_group" => "Request new Group",
|
||||
],
|
||||
"config" => [
|
||||
"title" => "Edit Config",
|
||||
"title2" => "Site Title",
|
||||
"slogan" => "Site Slogan",
|
||||
"logo" => "Logo URL (Leave empty for none)",
|
||||
"cookie" => "Cookie Prefix (If you change, all old Bookmarks will be lost!)",
|
||||
"url" => "URL to Site (With https and END WITH SLASH!)",
|
||||
"theme" => "Site Default Theme",
|
||||
"themes" => [
|
||||
1 => "Default Light",
|
||||
2 => "Cerulean Light",
|
||||
3 => "Lumen Light",
|
||||
4 => "Readable Light",
|
||||
5 => "Slate Dark",
|
||||
6 => "Cyborg Dark"
|
||||
],
|
||||
"start" => "Site Started in",
|
||||
"lang" => "Default Language",
|
||||
"disqus" => "Disqus Name"
|
||||
],
|
||||
"login" => [
|
||||
"error" => "Error",
|
||||
@ -58,6 +97,7 @@ $lang = [
|
||||
"licensed" => "Licenser (leave empty if unlicensed)",
|
||||
"official" => "URL to official Release (leave empty if none)",
|
||||
"required" => "Required fiels are marked with *",
|
||||
"all_required" => "All fields are required!",
|
||||
"manga" => "Manga",
|
||||
"manhua" => "Manhua",
|
||||
"manwha" => "Manwha",
|
||||
|
@ -25,7 +25,46 @@ $lang = [
|
||||
"settings" => "Configurações",
|
||||
"logout" => "Logout",
|
||||
"add_new" => "Novo titulo",
|
||||
"bookmarks" => "Favoritos"
|
||||
"bookmarks" => "Favoritos",
|
||||
"manage_groups" => "Manage Groups", # Needs translation
|
||||
"groups" => "Groups", # Needs translation
|
||||
"config" => "Edit Config", # Needs translation
|
||||
"settings" => "Account Settings" # Needs translation
|
||||
],
|
||||
"home" => [
|
||||
"added_titles" => "Added Titles", # Needs translation
|
||||
"type" => "Type", # Needs translation
|
||||
"title" => "Title", # Needs translation
|
||||
"added" => "Added", # Needs translation
|
||||
"released_chap" => "Released Chapters", # Needs translation
|
||||
"chapter" => "Chapter", # Needs translation
|
||||
"chap_title" => "Chapter Title", # Needs translation
|
||||
"group" => "Group", # Needs translation
|
||||
"uploader" => "Uploader" # Needs translation
|
||||
],
|
||||
"groups" => [
|
||||
"add_group" => "Add new Group", # Needs translation
|
||||
"req_group" => "Request new Group", # Needs translation
|
||||
],
|
||||
"config" => [
|
||||
"title" => "Edit Config", # Needs translation
|
||||
"title2" => "Site Title", # Needs translation
|
||||
"slogan" => "Site Slogan", # Needs translation
|
||||
"logo" => "Logo URL (Leave empty for none)", # Needs translation
|
||||
"cookie" => "Cookie Prefix (If you change, all old Bookmarks will be lost!)", # Needs translation
|
||||
"url" => "URL to Site (With https and END WITH SLASH!)", # Needs translation
|
||||
"theme" => "Site Default Theme", # Needs translation
|
||||
"themes" => [
|
||||
1 => "Default Light", # Needs translation
|
||||
2 => "Cerulean Light", # Needs translation
|
||||
3 => "Lumen Light", # Needs translation
|
||||
4 => "Readable Light", # Needs translation
|
||||
5 => "Slate Dark", # Needs translation
|
||||
6 => "Cyborg Dark" # Needs translation
|
||||
],
|
||||
"start" => "Site Started in", # Needs translation
|
||||
"lang" => "Default Language", # Needs translation
|
||||
"disqus" => "Disqus Name" # Needs translation
|
||||
],
|
||||
"login" => [
|
||||
"error" => "Error",
|
||||
@ -58,6 +97,7 @@ $lang = [
|
||||
"licensed" => "Licença (Deixe limpo se estiver sem licença)",
|
||||
"official" => "URL para lançamento oficial (deixe limpo e não tiver)",
|
||||
"required" => "Os campos necessários são marcados com *",
|
||||
"all_required" => "All fields are required!", # Needs translation
|
||||
"manga" => "Manga",
|
||||
"manhua" => "Manhua",
|
||||
"manwha" => "Manwha",
|
||||
|
@ -24,7 +24,46 @@ $lang = [
|
||||
"settings" => "Настройки",
|
||||
"logout" => "Выход",
|
||||
"add_new" => "Добавить релиз",
|
||||
"bookmarks" => "Закладки"
|
||||
"bookmarks" => "Закладки",
|
||||
"manage_groups" => "Manage Groups", # Needs translation
|
||||
"groups" => "Groups", # Needs translation
|
||||
"config" => "Edit Config", # Needs translation
|
||||
"settings" => "Account Settings" # Needs translation
|
||||
],
|
||||
"home" => [
|
||||
"added_titles" => "Added Titles", # Needs translation
|
||||
"type" => "Type", # Needs translation
|
||||
"title" => "Title", # Needs translation
|
||||
"added" => "Added", # Needs translation
|
||||
"released_chap" => "Released Chapters", # Needs translation
|
||||
"chapter" => "Chapter", # Needs translation
|
||||
"chap_title" => "Chapter Title", # Needs translation
|
||||
"group" => "Group", # Needs translation
|
||||
"uploader" => "Uploader" # Needs translation
|
||||
],
|
||||
"groups" => [
|
||||
"add_group" => "Add new Group", # Needs translation
|
||||
"req_group" => "Request new Group", # Needs translation
|
||||
],
|
||||
"config" => [
|
||||
"title" => "Edit Config", # Needs translation
|
||||
"title2" => "Site Title", # Needs translation
|
||||
"slogan" => "Site Slogan", # Needs translation
|
||||
"logo" => "Logo URL (Leave empty for none)", # Needs translation
|
||||
"cookie" => "Cookie Prefix (If you change, all old Bookmarks will be lost!)", # Needs translation
|
||||
"url" => "URL to Site (With https and END WITH SLASH!)", # Needs translation
|
||||
"theme" => "Site Default Theme", # Needs translation
|
||||
"themes" => [
|
||||
1 => "Default Light", # Needs translation
|
||||
2 => "Cerulean Light", # Needs translation
|
||||
3 => "Lumen Light", # Needs translation
|
||||
4 => "Readable Light", # Needs translation
|
||||
5 => "Slate Dark", # Needs translation
|
||||
6 => "Cyborg Dark" # Needs translation
|
||||
],
|
||||
"start" => "Site Started in", # Needs translation
|
||||
"lang" => "Default Language", # Needs translation
|
||||
"disqus" => "Disqus Name" # Needs translation
|
||||
],
|
||||
"login" => [
|
||||
"error" => "Ошибка",
|
||||
@ -57,6 +96,7 @@ $lang = [
|
||||
"licensed" => "Лицензиар (оставить пустым, если не имеет лицензии)",
|
||||
"official" => "URL-адрес официального релиза (оставьте пустым, если его нет)",
|
||||
"required" => "Необходимые поля отмечены значком *",
|
||||
"all_required" => "All fields are required!", # Needs translation
|
||||
"manga" => "Манга",
|
||||
"manhua" => "Маньхуа",
|
||||
"manwha" => "Манхва",
|
||||
|
139
render/admin/config.req.php
Normal file
139
render/admin/config.req.php
Normal file
@ -0,0 +1,139 @@
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["menu"]["config"];
|
||||
|
||||
if($loggedin==false || $user["level"]!=1 || $user["active"]==0) {
|
||||
header("Refresh: 0; url=../../");
|
||||
}
|
||||
|
||||
$error = false;
|
||||
$error_msg = "";
|
||||
|
||||
if(isset($_POST["edit_config"])) {
|
||||
$c_title = mysqli_real_escape_string($conn, $_POST["title"]);
|
||||
$c_slogan = mysqli_real_escape_string($conn, $_POST["slogan"]);
|
||||
$c_logo = mysqli_real_escape_string($conn, $_POST["logo"]);
|
||||
$c_cookie = mysqli_real_escape_string($conn, $_POST["cookie"]);
|
||||
$c_url = mysqli_real_escape_string($conn, $_POST["url"]);
|
||||
$c_theme = mysqli_real_escape_string($conn, $_POST["theme"]);
|
||||
$c_start = mysqli_real_escape_string($conn, $_POST["start"]);
|
||||
$c_lang = mysqli_real_escape_string($conn, $_POST["lang"]);
|
||||
$c_disqus = mysqli_real_escape_string($conn, $_POST["disqus"]);
|
||||
|
||||
if($c_title!=$config["title"]) {
|
||||
$conn->query("UPDATE `config` SET `title`='$c_title'");
|
||||
}
|
||||
if($c_slogan!=$config["slogan"]) {
|
||||
$conn->query("UPDATE `config` SET `slogan`='$c_slogan'");
|
||||
}
|
||||
if($c_logo!=$config["logo"]) {
|
||||
$conn->query("UPDATE `config` SET `logo`='$c_logo'");
|
||||
}
|
||||
if($c_cookie!=$config["cookie"]) {
|
||||
$conn->query("UPDATE `config` SET `cookie`='$c_cookie'");
|
||||
}
|
||||
if($c_url!=$config["url"]) {
|
||||
$conn->query("UPDATE `config` SET `url`='$c_url'");
|
||||
}
|
||||
if($c_theme!=$config["theme"]) {
|
||||
$conn->query("UPDATE `config` SET `theme`='$c_theme'");
|
||||
}
|
||||
if($c_start!=$config["start"]) {
|
||||
$conn->query("UPDATE `config` SET `start`='$c_start'");
|
||||
}
|
||||
if($c_lang!=$config["lang"]) {
|
||||
$conn->query("UPDATE `config` SET `lang`='$c_lang'");
|
||||
}
|
||||
if($c_disqus!=$config["disqus"]) {
|
||||
$conn->query("UPDATE `config` SET `disqus`='$c_disqus'");
|
||||
}
|
||||
|
||||
header("Refresh: 0");
|
||||
}
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<title><?= $lang["config"]["title"]." :: ".$config["title"] ?></title>
|
||||
|
||||
<?php include("../parts/menu.php"); ?>
|
||||
|
||||
<?php if(!isset($_COOKIE[$config["cookie"]."_cookie-consent"]) || empty($_COOKIE[$config["cookie"]."_cookie-consent"])) { include("../parts/cookies.php"); } ?>
|
||||
|
||||
<?php if(!empty($error_msg)) { ?>
|
||||
<div class="alert alert-warning alert-dismissible text-center" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<strong><?= $lang["login"]["error"] ?>:</strong> <?= $error_msg ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div style="margin: 0 auto; width: 300px" id="login_container">
|
||||
<form method="post" name="edit_config">
|
||||
<h1 class="text-center"><?= $lang["config"]["title"] ?></h1>
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="config_title"><?= $lang["config"]["title2"] ?> </label>
|
||||
<input required tabindex="1" type="text" name="title" id="config_title" class="form-control" value="<?= $config["title"] ?>" placeholder="<?= $lang["config"]["title2"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="config_slogan"><?= $lang["config"]["slogan"] ?> </label>
|
||||
<input required tabindex="2" type="text" name="slogan" id="config_slogan" class="form-control" value="<?= $config["slogan"] ?>" placeholder="<?= $lang["config"]["slogan"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="config_logo"><?= $lang["config"]["logo"] ?> </label>
|
||||
<input tabindex="3" type="text" name="logo" id="config_logo" class="form-control" value="<?= $config["logo"] ?>" placeholder="<?= $lang["config"]["logo"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="config_cookie"><?= $lang["config"]["cookie"] ?> </label>
|
||||
<input required tabindex="4" type="text" name="cookie" id="config_cookie" class="form-control" value="<?= $config["cookie"] ?>" placeholder="<?= $lang["config"]["cookie"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="config_url"><?= $lang["config"]["url"] ?> </label>
|
||||
<input required tabindex="5" type="text" name="url" id="config_url" class="form-control" value="<?= $config["url"] ?>" placeholder="<?= $lang["config"]["url"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="config_theme"><?= $lang["config"]["theme"] ?></label>
|
||||
<select required tabindex="6" name="theme" id="config_theme" class="form-control selectpicker" title="<?= $lang["config"]["theme"] ?>">
|
||||
<option value="1" <?php if($config["theme"]==1) echo "selected"; ?>><?= $lang["config"]["themes"][1] ?></option>
|
||||
<option value="2" <?php if($config["theme"]==2) echo "selected"; ?>><?= $lang["config"]["themes"][2] ?></option>
|
||||
<option value="3" <?php if($config["theme"]==3) echo "selected"; ?>><?= $lang["config"]["themes"][3] ?></option>
|
||||
<option value="4" <?php if($config["theme"]==4) echo "selected"; ?>><?= $lang["config"]["themes"][4] ?></option>
|
||||
<option value="5" <?php if($config["theme"]==5) echo "selected"; ?>><?= $lang["config"]["themes"][5] ?></option>
|
||||
<option value="6" <?php if($config["theme"]==6) echo "selected"; ?>><?= $lang["config"]["themes"][6] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="config_start"><?= $lang["config"]["start"] ?> </label>
|
||||
<input required tabindex="7" type="text" name="start" id="config_start" class="form-control" value="<?= $config["start"] ?>" placeholder="<?= $lang["config"]["start"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="config_lang"><?= $lang["config"]["lang"] ?> </label>
|
||||
<select required tabindex="8" name="lang" id="config_lang" class="form-control selectpicker" title="<?= $lang["config"]["lang"] ?>">
|
||||
<option value="de" <?php if($config["lang"]=="de") echo "selected"; ?>>Deutsch</option>
|
||||
<option value="en" <?php if($config["lang"]=="en") echo "selected"; ?>>English</option>
|
||||
<option value="pt" <?php if($config["lang"]=="pt") echo "selected"; ?>>Português</option>
|
||||
<option value="ru" <?php if($config["lang"]=="ru") echo "selected"; ?>>Русский</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="config_disqus"><?= $lang["config"]["disqus"] ?> </label>
|
||||
<input required tabindex="9" type="text" name="disqus" id="config_disqus" class="form-control" value="<?= $config["disqus"] ?>" placeholder="<?= $lang["config"]["disqus"] ?>">
|
||||
</div>
|
||||
|
||||
<p><i><?= $lang["add_manga"]["all_required"] ?></i></p>
|
||||
<button tabindex="10" class="btn btn-lg btn-success btn-block" type="submit" id="upload-file" name="edit_config"><?= glyph("pencil",$lang["config"]["title"]) ?> <?= $lang["config"]["title"] ?></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
1
render/mod/add_group.req.php
Normal file
1
render/mod/add_group.req.php
Normal file
@ -0,0 +1 @@
|
||||
To-do!
|
1
render/mod/edit_group.req.php
Normal file
1
render/mod/edit_group.req.php
Normal file
@ -0,0 +1 @@
|
||||
To-do!
|
1
render/mod/manage_groups.req.php
Normal file
1
render/mod/manage_groups.req.php
Normal file
@ -0,0 +1 @@
|
||||
To-do!
|
@ -9,6 +9,7 @@
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="<?= $config["url"] ?>assets/themes/bootstrap.<?= $user["theme"] ?>.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="<?= $config["url"] ?>assets/theme.css" type="text/css">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
<?php if(empty($config["logo"])) { ?>
|
||||
<?= $config["title"] ?>
|
||||
<?php } else { ?>
|
||||
<img src="<?= $config["url"].$config["logo"] ?>" height="200%" style="margin-top:-9px" alt="<?= $config["title"] ?>" title="<?= $config["title"]." - ".$config["slogan"] ?>">
|
||||
<img src="<?= $config["url"].$config["logo"] ?>" style="margin-top:-9px; max-width: 200px; max-height: 200%" alt="<?= $config["title"] ?>" title="<?= $config["title"]." - ".$config["slogan"] ?>">
|
||||
<?php } ?>
|
||||
</a>
|
||||
</div>
|
||||
@ -30,6 +30,9 @@
|
||||
<li class="<?php if($page==$lang["menu"]["bookmarks"]) { echo "active"; } ?>" id="titles">
|
||||
<a href="<?php echo $config["url"]; ?>bookmarks"><?= glyph("bookmark",$lang["menu"]["bookmarks"]) ?> <?= $lang["menu"]["bookmarks"] ?></a>
|
||||
</li>
|
||||
<li class="<?php if($page==$lang["menu"]["groups"]) { echo "active"; } ?>" id="titles">
|
||||
<a href="<?php echo $config["url"]; ?>groups"><?= glyph("user",$lang["menu"]["groups"]) ?> <?= $lang["menu"]["groups"] ?></a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<?= glyph("info-sign",$lang["menu"]["more"]) ?> <span class="nav-label-1440"><?= $lang["menu"]["more"] ?></span> <span class="caret"></span>
|
||||
@ -54,7 +57,7 @@
|
||||
<a href="<?= $config["url"] ?>signup"><?= glyph("log-in",$lang["menu"]["signup"]) ?> <?= $lang["menu"]["signup"] ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php } elseif($user["active"]==1) { ?>
|
||||
<?php } else { ?>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?= glyph("user",$lang["menu"]["account"]) ?> <span class="nav-label-1440"><?= $user["username"] ?></span> <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- <li class="<?php if($page==$lang["menu"]["profile"]) { echo "active"; } ?>">
|
||||
@ -63,16 +66,24 @@
|
||||
<!-- <li class="<?php if($page==$lang["menu"]["settings"]) { echo "active"; } ?>">
|
||||
<a href="<?= $config["url"] ?>settings"><?= glyph("wrench",$lang["menu"]["settings"]) ?> <?= $lang["menu"]["settings"] ?></a>
|
||||
</li> -->
|
||||
<?php if(($user["level"]==1 || $user["level"]==2 || $user["level"]==3) && $user["active"]==true) { ?>
|
||||
<?php if($user["level"]==1 && $user["active"]==true) { ?>
|
||||
<li class="<?php if($page==$lang["menu"]["config"]) { echo "active"; } ?>">
|
||||
<a href="<?= $config["url"] ?>admin/config"><?= glyph("pencil",$lang["menu"]["config"]) ?> <?= $lang["menu"]["config"] ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if(($user["level"]==1 || $user["level"]==2) && $user["active"]==true) { ?>
|
||||
<li class="<?php if($page==$lang["menu"]["manage_groups"]) { echo "active"; } ?>">
|
||||
<a href="<?= $config["url"] ?>admin/manage_groups"><?= glyph("wrench",$lang["menu"]["manage_groups"]) ?> <?= $lang["menu"]["manage_groups"] ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="<?php if($page==$lang["menu"]["add_new"]) { echo "active"; } ?>">
|
||||
<a href="<?= $config["url"] ?>admin/new_title"><?= glyph("log-out",$lang["menu"]["add_new"]) ?> <?= $lang["menu"]["add_new"] ?></a>
|
||||
<a href="<?= $config["url"] ?>admin/new_title"><?= glyph("plus-sign",$lang["menu"]["add_new"]) ?> <?= $lang["menu"]["add_new"] ?></a>
|
||||
</li>
|
||||
<li class="<?php if($page==$lang["menu"]["logout"]) { echo "active"; } ?>">
|
||||
<a href="<?= $config["url"] ?>logout"><?= glyph("log-out",$lang["menu"]["logout"]) ?> <?= $lang["menu"]["logout"] ?></a>
|
||||
<?php } ?>
|
||||
<li class="<?php if($page==$lang["menu"]["settings"]) { echo "active"; } ?>">
|
||||
<a href="<?= $config["url"] ?>admin/settings"><?= glyph("wrench",$lang["menu"]["settings"]) ?> <?= $lang["menu"]["settings"] ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<?php } else { ?>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><?= glyph("user",$lang["menu"]["account"]) ?> <span class="nav-label-1440"><?= $user["username"] ?></span> <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="<?php if($page==$lang["menu"]["logout"]) { echo "active"; } ?>">
|
||||
<a href="<?= $config["url"] ?>logout"><?= glyph("log-out",$lang["menu"]["logout"]) ?> <?= $lang["menu"]["logout"] ?></a>
|
||||
</li>
|
||||
|
43
render/public/groups.req.php
Normal file
43
render/public/groups.req.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["menu"]["groups"];
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
$groups = $conn->query("SELECT * FROM `groups` ORDER BY `name` ASC");
|
||||
|
||||
?>
|
||||
|
||||
<title><?= $lang["menu"]["groups"]." :: ".$config["title"] ?></title>
|
||||
|
||||
<?php include("../parts/menu.php"); ?>
|
||||
|
||||
<?php if(!isset($_COOKIE[$config["cookie"]."_cookie-consent"]) || empty($_COOKIE[$config["cookie"]."_cookie-consent"])) { include("../parts/cookies.php"); } ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 text-center">
|
||||
<h2 class="text-center"><?= $lang["menu"]["groups"] ?></h2>
|
||||
<?php if($user["level"]==1 || $user["level"]==2) { ?>
|
||||
<a href="<?= $config["url"] ?>admin/add_group" class="btn btn-success"><?= glyph("plus-sign",$lang["groups"]["add_group"]) ?> <?= $lang["groups"]["add_group"] ?></a>
|
||||
<?php } elseif($user["level"]==3) { ?>
|
||||
<a href="<?= $config["url"] ?>admin/add_group" class="btn btn-success"><?= glyph("plus-sign",$lang["groups"]["req_group"]) ?> <?= $lang["groups"]["req_group"] ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<?php foreach($groups as $g) { ?>
|
||||
<div class="well well-sm" style="background:url('<?= $row["banner"] ?>');background-position: center;background-repeat: no-repeat;background-size: cover;">
|
||||
<span class="image-shadow"><b><a href="<?= $config["url"] ?>gruppe/<?= $row["id"] ?>" style="color:black"><?= $row["name"] ?></a></b></span> <span class="label label-success"><?= glyph("thumbs-up",$likes["total"]." Likes") ?> <?= $likes["total"] ?></span> <span class="label label-success"><?= glyph("comment",$comments["total"]." Kommentare") ?> <?= $comments["total"] ?></span> <span class="text-right image-shadow">
|
||||
<?php if(!empty ($row["discord"])) { ?><a href="<?= $row["discord"] ?>" target="_blank" style="color:black"><?= glyph("comment","Discord") ?></a><?php } ?>
|
||||
<?php if(!empty ($row["website"])) { ?><a href="<?= $row["website"] ?>" target="_blank" style="color:black"><?= glyph("globe","Website") ?></a><?php } ?>
|
||||
<?php if(!empty ($row["irc"])) { ?><a href="irc://<?= $row["irc"] ?>" target="_blank" style="color:black"><?= glyph("tags","IRC") ?></a><?php } ?>
|
||||
<?php if(!empty ($row["email"])) { ?><a href="mailto:<?= $row["email"] ?>" target="_blank" style="color:black"><?= glyph("envelope","eMail") ?></a><?php } ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
@ -79,13 +79,13 @@ $latest_chapters = $conn->query("SELECT * FROM `chapters` ORDER BY `added` DESC"
|
||||
</style>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<h3 class="text-center" style="max-height:20px;padding: 0; margin: 0;">Added Titles</h3>
|
||||
<h3 class="text-center" style="max-height:20px;padding: 0; margin: 0;"><?= $lang["home"]["added_titles"] ?></h3>
|
||||
<div class="table-responsive" id="latest-titles">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th style="width:5%">Type</th>
|
||||
<th>Title</th>
|
||||
<th class="text-right" style="width:20%">Added</th>
|
||||
<th style="width:5%"><?= $lang["home"]["type"] ?></th>
|
||||
<th><?= $lang["home"]["title"] ?></th>
|
||||
<th class="text-right" style="width:20%"><?= $lang["home"]["added"] ?></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($latest_titles as $item) { ?>
|
||||
@ -115,16 +115,17 @@ $latest_chapters = $conn->query("SELECT * FROM `chapters` ORDER BY `added` DESC"
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12">
|
||||
<h3 class="text-center">Released Chapters</h3>
|
||||
<h3 class="text-center"><?= $lang["home"]["released_chap"] ?></h3>
|
||||
<div class="table-responsive" id="latest-titles">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th style="width:5%">Type</th>
|
||||
<th style="width:8%">Chapter</th>
|
||||
<th style="width:30%;">Chapter Title</th>
|
||||
<th style="width:30%">Manga</th>
|
||||
<th style="width:10%" class="text-center">Uploader</th>
|
||||
<th class="text-right" style="width:20%">Added</th>
|
||||
<th style="width:5%"><?= $lang["home"]["type"] ?></th>
|
||||
<th style="width:8%"><?= $lang["home"]["chapter"] ?></th>
|
||||
<th style="width:30%;"><?= $lang["home"]["chap_title"] ?></th>
|
||||
<th style="width:30%"><?= $lang["home"]["title"] ?></th>
|
||||
<th class="text-center" style="width:10%"><?= $lang["home"]["group"] ?></th>
|
||||
<th class="text-center" style="width:10%"><?= $lang["home"]["uploader"] ?></th>
|
||||
<th class="text-right" style="width:20%"><?= $lang["home"]["added"] ?></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($latest_chapters as $chapter) { ?>
|
||||
@ -171,8 +172,11 @@ $latest_chapters = $conn->query("SELECT * FROM `chapters` ORDER BY `added` DESC"
|
||||
<?= $mng["title"] ?>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<?php $group = $conn->query("SELECT * FROM `groups` WHERE `id`='".$chapter["group"]."' LIMIT 1")->fetch_assoc(); ?><a href="<?= $config["url"] ?>group/<?= $group["slug"] ?>"><?= $group["short"] ?></a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?php $uploader = $conn->query("SELECT * FROM `user` WHERE `id`='".$chapter["user"]."' LIMIT 1"); $uploader = mysqli_fetch_assoc($uploader); echo $uploader["username"]; ?>
|
||||
<?php $uploader = $conn->query("SELECT * FROM `user` WHERE `id`='".$chapter["user"]."' LIMIT 1")->fetch_assoc(); echo $uploader["username"]; ?>
|
||||
</td>
|
||||
<td class="text-right"><?= $item["added"] ?></td>
|
||||
</tr>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["menu"]["login"];
|
||||
$page = $lang["menu"]["signup"];
|
||||
|
||||
if($loggedin==true) {
|
||||
header("Refresh: 0; url=./");
|
||||
|
@ -1,97 +1,97 @@
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["add_chapter"]["title"];
|
||||
|
||||
if($loggedin==false || $user["active"]==0) {
|
||||
header("Refresh: 0; url=../login");
|
||||
}
|
||||
|
||||
$slug2 = mysqli_real_escape_string($conn, $_GET["slug"]);
|
||||
$manga = $conn->query("SELECT * FROM `titles` WHERE `slug`='$slug2' LIMIT 1");
|
||||
$manga = mysqli_fetch_assoc($manga);
|
||||
|
||||
$mid = $manga["id"];
|
||||
|
||||
$error = false;
|
||||
$error_msg = "";
|
||||
|
||||
if(isset($_POST["add_chapter"])) {
|
||||
$slug = generate_url();
|
||||
$volume = mysqli_real_escape_string($conn, $_POST["volume"]);
|
||||
$chapter = mysqli_real_escape_string($conn, $_POST["chapter"]);
|
||||
$title = mysqli_real_escape_string($conn, $_POST["title"]);
|
||||
|
||||
if(empty($volume)) { $volume = "NULL"; } else { $volume = "'$volume'"; }
|
||||
if(empty($chapter)) { $chapter = "'0'"; } else { $chapter = "'$chapter'"; }
|
||||
if(empty($title)) { $title = "NULL"; } else { $title = "'$title'"; }
|
||||
|
||||
$target_file = "../../data/chapters/".$_FILES["archive"]["name"];
|
||||
$new_file = "../../data/chapters/".$slug;
|
||||
move_uploaded_file($_FILES["archive"]["tmp_name"], $target_file);
|
||||
$filename = pathinfo($_FILES['archive']['name'], PATHINFO_FILENAME);
|
||||
$before_file = "../../data/chapters/".$filename;
|
||||
$zip = new ZipArchive;
|
||||
$res = $zip->open($target_file);
|
||||
$zip->extractTo('../../data/chapters/');
|
||||
$zip->close();
|
||||
rename($before_file, $new_file);
|
||||
unlink($target_file);
|
||||
|
||||
$uid = $user["id"];
|
||||
|
||||
$conn->query("INSERT INTO `chapters`(`mid`,`slug`,`volume`,`chapter`,`title`,`user`) VALUES('$mid','$slug',$volume,$chapter,$title,'$uid')");
|
||||
}
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<?php if(!empty($manga["id"])) { ?>
|
||||
<title><?= $lang["add_chapter"]["title"]." ".$manga["title"]." :: ".$config["title"] ?></title>
|
||||
<?php } else { ?>
|
||||
<title><?= $lang["login"]["error"]." :: ".$config["title"] ?></title>
|
||||
<?php } ?>
|
||||
|
||||
<?php include("../parts/menu.php"); ?>
|
||||
|
||||
<?php if(!isset($_COOKIE[$config["cookie"]."_cookie-consent"]) || empty($_COOKIE[$config["cookie"]."_cookie-consent"])) { include("../parts/cookies.php"); } ?>
|
||||
|
||||
<?php if(!empty($error_msg)) { ?>
|
||||
<div class="alert alert-warning alert-dismissible text-center" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<strong><?= $lang["login"]["error"] ?>:</strong> <?= $error_msg ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div style="margin: 0 auto; width: 300px" id="login_container">
|
||||
<form method="post" name="add_chapter" enctype="multipart/form-data">
|
||||
<h1 class="text-center"><?= $lang["add_chapter"]["title"] ?> <a href="<?= $config["url"] ?>manga/<?= $slug2 ?>"><b><u><?= $manga["title"] ?></u></b></a></h1>
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="archive" class="sr-"><?= $lang["add_chapter"]["file"] ?></label>
|
||||
<input tabindex="1" required type="file" name="archive" id="archive" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chapter_vol"><?= $lang["add_chapter"]["volume"] ?> </label>
|
||||
<input tabindex="2" type="number" name="volume" id="chapter_vol" class="form-control" value="<?php if(isset($_POST["volume"])) { $vol = $_POST["volume"]; echo $vol; } ?>" placeholder="<?= $lang["add_chapter"]["volume"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chapter_chap"><?= $lang["add_chapter"]["chapter"] ?> </label>
|
||||
<input tabindex="3" type="text" name="chapter" id="chapter_chap" class="form-control" value="<?php if(isset($_POST["chapter"])) { $chap = $_POST["chapter"]; $chap++; echo $chap; } ?>" placeholder="<?= $lang["add_chapter"]["chapter"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chapter_title"><?= $lang["add_chapter"]["ctitle"] ?> </label>
|
||||
<input tabindex="4" type="text" name="title" id="chapter_title" class="form-control" placeholder="<?= $lang["add_chapter"]["ctitle"] ?>">
|
||||
</div>
|
||||
|
||||
<p><i><?= $lang["add_manga"]["required"] ?></i></p>
|
||||
<button tabindex="5" class="btn btn-lg btn-success btn-block" type="submit" id="upload-file" name="add_chapter"><?= glyph("plus",$lang["add_chapter"]["button"]) ?> <?= $lang["add_chapter"]["button"] ?></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["add_chapter"]["title"];
|
||||
|
||||
if($loggedin==false || $user["active"]==0) {
|
||||
header("Refresh: 0; url=../../");
|
||||
}
|
||||
|
||||
$slug2 = mysqli_real_escape_string($conn, $_GET["slug"]);
|
||||
$manga = $conn->query("SELECT * FROM `titles` WHERE `slug`='$slug2' LIMIT 1");
|
||||
$manga = mysqli_fetch_assoc($manga);
|
||||
|
||||
$mid = $manga["id"];
|
||||
|
||||
$error = false;
|
||||
$error_msg = "";
|
||||
|
||||
if(isset($_POST["add_chapter"])) {
|
||||
$slug = generate_url();
|
||||
$volume = mysqli_real_escape_string($conn, $_POST["volume"]);
|
||||
$chapter = mysqli_real_escape_string($conn, $_POST["chapter"]);
|
||||
$title = mysqli_real_escape_string($conn, $_POST["title"]);
|
||||
|
||||
if(empty($volume)) { $volume = "NULL"; } else { $volume = "'$volume'"; }
|
||||
if(empty($chapter)) { $chapter = "'0'"; } else { $chapter = "'$chapter'"; }
|
||||
if(empty($title)) { $title = "NULL"; } else { $title = "'$title'"; }
|
||||
|
||||
$target_file = "../../data/chapters/".$_FILES["archive"]["name"];
|
||||
$new_file = "../../data/chapters/".$slug;
|
||||
move_uploaded_file($_FILES["archive"]["tmp_name"], $target_file);
|
||||
$filename = pathinfo($_FILES['archive']['name'], PATHINFO_FILENAME);
|
||||
$before_file = "../../data/chapters/".$filename;
|
||||
$zip = new ZipArchive;
|
||||
$res = $zip->open($target_file);
|
||||
$zip->extractTo('../../data/chapters/');
|
||||
$zip->close();
|
||||
rename($before_file, $new_file);
|
||||
unlink($target_file);
|
||||
|
||||
$uid = $user["id"];
|
||||
|
||||
$conn->query("INSERT INTO `chapters`(`mid`,`slug`,`volume`,`chapter`,`title`,`user`) VALUES('$mid','$slug',$volume,$chapter,$title,'$uid')");
|
||||
}
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<?php if(!empty($manga["id"])) { ?>
|
||||
<title><?= $lang["add_chapter"]["title"]." ".$manga["title"]." :: ".$config["title"] ?></title>
|
||||
<?php } else { ?>
|
||||
<title><?= $lang["login"]["error"]." :: ".$config["title"] ?></title>
|
||||
<?php } ?>
|
||||
|
||||
<?php include("../parts/menu.php"); ?>
|
||||
|
||||
<?php if(!isset($_COOKIE[$config["cookie"]."_cookie-consent"]) || empty($_COOKIE[$config["cookie"]."_cookie-consent"])) { include("../parts/cookies.php"); } ?>
|
||||
|
||||
<?php if(!empty($error_msg)) { ?>
|
||||
<div class="alert alert-warning alert-dismissible text-center" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<strong><?= $lang["login"]["error"] ?>:</strong> <?= $error_msg ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div style="margin: 0 auto; width: 300px" id="login_container">
|
||||
<form method="post" name="add_chapter" enctype="multipart/form-data">
|
||||
<h1 class="text-center"><?= $lang["add_chapter"]["title"] ?> <a href="<?= $config["url"] ?>manga/<?= $slug2 ?>"><b><u><?= $manga["title"] ?></u></b></a></h1>
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="archive" class="sr-"><?= $lang["add_chapter"]["file"] ?></label>
|
||||
<input tabindex="1" required type="file" name="archive" id="archive" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chapter_vol"><?= $lang["add_chapter"]["volume"] ?> </label>
|
||||
<input tabindex="2" type="number" name="volume" id="chapter_vol" class="form-control" value="<?php if(isset($_POST["volume"])) { $vol = $_POST["volume"]; echo $vol; } ?>" placeholder="<?= $lang["add_chapter"]["volume"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chapter_chap"><?= $lang["add_chapter"]["chapter"] ?> </label>
|
||||
<input tabindex="3" type="text" name="chapter" id="chapter_chap" class="form-control" value="<?php if(isset($_POST["chapter"])) { $chap = $_POST["chapter"]; $chap++; echo $chap; } ?>" placeholder="<?= $lang["add_chapter"]["chapter"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chapter_title"><?= $lang["add_chapter"]["ctitle"] ?> </label>
|
||||
<input tabindex="4" type="text" name="title" id="chapter_title" class="form-control" placeholder="<?= $lang["add_chapter"]["ctitle"] ?>">
|
||||
</div>
|
||||
|
||||
<p><i><?= $lang["add_manga"]["required"] ?></i></p>
|
||||
<button tabindex="5" class="btn btn-lg btn-success btn-block" type="submit" id="upload-file" name="add_chapter"><?= glyph("plus",$lang["add_chapter"]["button"]) ?> <?= $lang["add_chapter"]["button"] ?></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
@ -1,132 +1,132 @@
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["edit_chapter"]["title"];
|
||||
|
||||
if($loggedin==false || $user["active"]==0) {
|
||||
header("Refresh: 0; url=../login");
|
||||
}
|
||||
|
||||
$slug2 = mysqli_real_escape_string($conn, $_GET["slug"]);
|
||||
$chapter = $conn->query("SELECT * FROM `chapters` WHERE `slug`='$slug2' LIMIT 1");
|
||||
$chapter = mysqli_fetch_assoc($chapter);
|
||||
|
||||
$mid = $chapter["mid"];
|
||||
|
||||
$manga = $conn->query("SELECT * FROM `titles` WHERE `id`='$mid' LIMIT 1");
|
||||
$manga = mysqli_fetch_assoc($manga);
|
||||
|
||||
$error = false;
|
||||
$error_msg = "";
|
||||
|
||||
if(isset($_POST["edit_chapter"])) {
|
||||
$slug = generate_url();
|
||||
$volume = mysqli_real_escape_string($conn, $_POST["volume"]);
|
||||
$chapter = mysqli_real_escape_string($conn, $_POST["chapter"]);
|
||||
$title = mysqli_real_escape_string($conn, $_POST["title"]);
|
||||
|
||||
if(empty($volume)) { $volume = "NULL"; } else { $volume = "'$volume'"; }
|
||||
if(empty($chapter)) { $chapter = "'0'"; } else { $chapter = "'$chapter'"; }
|
||||
if(empty($title)) { $title = "NULL"; } else { $title = "'$title'"; }
|
||||
|
||||
if(isset($_FILES["archive"]["tmp_name"]) && !empty($_FILES["archive"]["tmp_name"])) {
|
||||
$target_file = "../../data/chapters/".$_FILES["archive"]["name"];
|
||||
$new_file = "../../data/chapters/".$slug;
|
||||
move_uploaded_file($_FILES["archive"]["tmp_name"], $target_file);
|
||||
$filename = pathinfo($_FILES['archive']['name'], PATHINFO_FILENAME);
|
||||
$before_file = "../../data/chapters/".$filename;
|
||||
$zip = new ZipArchive;
|
||||
$res = $zip->open($target_file);
|
||||
$zip->extractTo('../../data/chapters/');
|
||||
$zip->close();
|
||||
rename($before_file, $new_file);
|
||||
unlink($target_file);
|
||||
} else {
|
||||
$slug = $slug2;
|
||||
}
|
||||
|
||||
$uid = $user["id"];
|
||||
|
||||
$conn->query("UPDATE `chapters` SET `slug`='$slug', `volume`=$volume, `chapter`=$chapter, `title`=$title, `user`='$uid' WHERE `slug`='$slug2'");
|
||||
header("Refresh: 0; url=$slug");
|
||||
}
|
||||
|
||||
if(isset($_POST["delete_chapter"])) {
|
||||
$conn->query("DELETE FROM `chapters` WHERE `slug`='$slug2'");
|
||||
header("Location: ".$config["url"]."manga/".$manga["slug"]);
|
||||
}
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<?php if(!empty($chapter["id"])) { ?>
|
||||
<title><?= $lang["edit_chapter"]["title"]." - ".$manga["title"]." :: ".$config["title"] ?></title>
|
||||
<?php } else { ?>
|
||||
<title><?= $lang["login"]["error"]." :: ".$config["title"] ?></title>
|
||||
<?php } ?>
|
||||
|
||||
<?php include("../parts/menu.php"); ?>
|
||||
|
||||
<?php if(!isset($_COOKIE[$config["cookie"]."_cookie-consent"]) || empty($_COOKIE[$config["cookie"]."_cookie-consent"])) { include("../parts/cookies.php"); } ?>
|
||||
|
||||
<?php if(!empty($error_msg)) { ?>
|
||||
<div class="alert alert-warning alert-dismissible text-center" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<strong><?= $lang["login"]["error"] ?>:</strong> <?= $error_msg ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div style="margin: 0 auto; width: 300px" id="login_container">
|
||||
<form method="post" name="edit_chapter" enctype="multipart/form-data">
|
||||
<h1 class="text-center"><?= $lang["edit_chapter"]["title"] ?></h1>
|
||||
<h3 class="text-center"><a href="<?= $config["url"] ?>manga/<?= $manga["slug"] ?>"><?= $lang["edit_chapter"]["return"] ?>: <?= $manga["title"] ?></a></h3>
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="archive" class="sr-"><?= $lang["edit_chapter"]["file"] ?></label>
|
||||
<input tabindex="1" type="file" name="archive" id="archive" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chapter_vol"><?= $lang["add_chapter"]["volume"] ?> </label>
|
||||
<input tabindex="2" type="number" name="volume" id="chapter_vol" class="form-control" value="<?= $chapter["volume"] ?>" placeholder="<?= $lang["add_chapter"]["volume"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chapter_chap"><?= $lang["add_chapter"]["chapter"] ?> </label>
|
||||
<input tabindex="3" type="number" name="chapter" id="chapter_chap" class="form-control" value="<?= $chapter["chapter"] ?>" placeholder="<?= $lang["add_chapter"]["chapter"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chapter_title"><?= $lang["add_chapter"]["ctitle"] ?> </label>
|
||||
<input tabindex="4" type="text" name="title" id="chapter_title" class="form-control" placeholder="<?= $lang["add_chapter"]["ctitle"] ?>" value="<?= $chapter["title"] ?>">
|
||||
</div>
|
||||
|
||||
<p><i><?= $lang["add_manga"]["required"] ?></i></p>
|
||||
<button tabindex="5" class="btn btn-lg btn-success btn-block" type="submit" id="upload-file" name="edit_chapter"><?= glyph("pencil",$lang["edit_chapter"]["edit"]) ?> <?= $lang["edit_chapter"]["edit"] ?></button>
|
||||
</form>
|
||||
<hr>
|
||||
<form method="post" name="delete_chapter">
|
||||
<button style="width: 300px; display: block" class="btn btn-lg btn-danger btn-block" onclick="showDelCon()" type="button" id="delbtn"><?= glyph("trash",$lang["edit_chapter"]["delete"]) ?> <?= $lang["edit_chapter"]["delete"] ?></button>
|
||||
<div id="delcon" style="display: none">
|
||||
<button style="width: 300px; display: block" class="btn btn-lg btn-success btn-block" onclick="hideDelCon()" type="button" id="delbtn"><?= glyph("remove",$lang["edit_chapter"]["del_no"]) ?> <?= $lang["edit_chapter"]["del_no"] ?></button>
|
||||
<button style="width: 300px; display: block" class="btn btn-lg btn-danger btn-block" type="submit" name="delete_chapter" id="delbtn"><?= glyph("trash",$lang["edit_chapter"]["del_yes"]) ?> <?= $lang["edit_chapter"]["del_yes"] ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function showDelCon() {
|
||||
document.getElementById("delbtn").style.display = "none";
|
||||
document.getElementById("delcon").style.display = "block";
|
||||
}
|
||||
|
||||
function hideDelCon() {
|
||||
document.getElementById("delbtn").style.display = "block";
|
||||
document.getElementById("delcon").style.display = "none";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["edit_chapter"]["title"];
|
||||
|
||||
if($loggedin==false || $user["active"]==0) {
|
||||
header("Refresh: 0; url=../../");
|
||||
}
|
||||
|
||||
$slug2 = mysqli_real_escape_string($conn, $_GET["slug"]);
|
||||
$chapter = $conn->query("SELECT * FROM `chapters` WHERE `slug`='$slug2' LIMIT 1");
|
||||
$chapter = mysqli_fetch_assoc($chapter);
|
||||
|
||||
$mid = $chapter["mid"];
|
||||
|
||||
$manga = $conn->query("SELECT * FROM `titles` WHERE `id`='$mid' LIMIT 1");
|
||||
$manga = mysqli_fetch_assoc($manga);
|
||||
|
||||
$error = false;
|
||||
$error_msg = "";
|
||||
|
||||
if(isset($_POST["edit_chapter"])) {
|
||||
$slug = generate_url();
|
||||
$volume = mysqli_real_escape_string($conn, $_POST["volume"]);
|
||||
$chapter = mysqli_real_escape_string($conn, $_POST["chapter"]);
|
||||
$title = mysqli_real_escape_string($conn, $_POST["title"]);
|
||||
|
||||
if(empty($volume)) { $volume = "NULL"; } else { $volume = "'$volume'"; }
|
||||
if(empty($chapter)) { $chapter = "'0'"; } else { $chapter = "'$chapter'"; }
|
||||
if(empty($title)) { $title = "NULL"; } else { $title = "'$title'"; }
|
||||
|
||||
if(isset($_FILES["archive"]["tmp_name"]) && !empty($_FILES["archive"]["tmp_name"])) {
|
||||
$target_file = "../../data/chapters/".$_FILES["archive"]["name"];
|
||||
$new_file = "../../data/chapters/".$slug;
|
||||
move_uploaded_file($_FILES["archive"]["tmp_name"], $target_file);
|
||||
$filename = pathinfo($_FILES['archive']['name'], PATHINFO_FILENAME);
|
||||
$before_file = "../../data/chapters/".$filename;
|
||||
$zip = new ZipArchive;
|
||||
$res = $zip->open($target_file);
|
||||
$zip->extractTo('../../data/chapters/');
|
||||
$zip->close();
|
||||
rename($before_file, $new_file);
|
||||
unlink($target_file);
|
||||
} else {
|
||||
$slug = $slug2;
|
||||
}
|
||||
|
||||
$uid = $user["id"];
|
||||
|
||||
$conn->query("UPDATE `chapters` SET `slug`='$slug', `volume`=$volume, `chapter`=$chapter, `title`=$title, `user`='$uid' WHERE `slug`='$slug2'");
|
||||
header("Refresh: 0; url=$slug");
|
||||
}
|
||||
|
||||
if(isset($_POST["delete_chapter"])) {
|
||||
$conn->query("DELETE FROM `chapters` WHERE `slug`='$slug2'");
|
||||
header("Location: ".$config["url"]."manga/".$manga["slug"]);
|
||||
}
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<?php if(!empty($chapter["id"])) { ?>
|
||||
<title><?= $lang["edit_chapter"]["title"]." - ".$manga["title"]." :: ".$config["title"] ?></title>
|
||||
<?php } else { ?>
|
||||
<title><?= $lang["login"]["error"]." :: ".$config["title"] ?></title>
|
||||
<?php } ?>
|
||||
|
||||
<?php include("../parts/menu.php"); ?>
|
||||
|
||||
<?php if(!isset($_COOKIE[$config["cookie"]."_cookie-consent"]) || empty($_COOKIE[$config["cookie"]."_cookie-consent"])) { include("../parts/cookies.php"); } ?>
|
||||
|
||||
<?php if(!empty($error_msg)) { ?>
|
||||
<div class="alert alert-warning alert-dismissible text-center" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<strong><?= $lang["login"]["error"] ?>:</strong> <?= $error_msg ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div style="margin: 0 auto; width: 300px" id="login_container">
|
||||
<form method="post" name="edit_chapter" enctype="multipart/form-data">
|
||||
<h1 class="text-center"><?= $lang["edit_chapter"]["title"] ?></h1>
|
||||
<h3 class="text-center"><a href="<?= $config["url"] ?>manga/<?= $manga["slug"] ?>"><?= $lang["edit_chapter"]["return"] ?>: <?= $manga["title"] ?></a></h3>
|
||||
<hr>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="archive" class="sr-"><?= $lang["edit_chapter"]["file"] ?></label>
|
||||
<input tabindex="1" type="file" name="archive" id="archive" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chapter_vol"><?= $lang["add_chapter"]["volume"] ?> </label>
|
||||
<input tabindex="2" type="number" name="volume" id="chapter_vol" class="form-control" value="<?= $chapter["volume"] ?>" placeholder="<?= $lang["add_chapter"]["volume"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chapter_chap"><?= $lang["add_chapter"]["chapter"] ?> </label>
|
||||
<input tabindex="3" type="number" name="chapter" id="chapter_chap" class="form-control" value="<?= $chapter["chapter"] ?>" placeholder="<?= $lang["add_chapter"]["chapter"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chapter_title"><?= $lang["add_chapter"]["ctitle"] ?> </label>
|
||||
<input tabindex="4" type="text" name="title" id="chapter_title" class="form-control" placeholder="<?= $lang["add_chapter"]["ctitle"] ?>" value="<?= $chapter["title"] ?>">
|
||||
</div>
|
||||
|
||||
<p><i><?= $lang["add_manga"]["required"] ?></i></p>
|
||||
<button tabindex="5" class="btn btn-lg btn-success btn-block" type="submit" id="upload-file" name="edit_chapter"><?= glyph("pencil",$lang["edit_chapter"]["edit"]) ?> <?= $lang["edit_chapter"]["edit"] ?></button>
|
||||
</form>
|
||||
<hr>
|
||||
<form method="post" name="delete_chapter">
|
||||
<button style="width: 300px; display: block" class="btn btn-lg btn-danger btn-block" onclick="showDelCon()" type="button" id="delbtn"><?= glyph("trash",$lang["edit_chapter"]["delete"]) ?> <?= $lang["edit_chapter"]["delete"] ?></button>
|
||||
<div id="delcon" style="display: none">
|
||||
<button style="width: 300px; display: block" class="btn btn-lg btn-success btn-block" onclick="hideDelCon()" type="button" id="delbtn"><?= glyph("remove",$lang["edit_chapter"]["del_no"]) ?> <?= $lang["edit_chapter"]["del_no"] ?></button>
|
||||
<button style="width: 300px; display: block" class="btn btn-lg btn-danger btn-block" type="submit" name="delete_chapter" id="delbtn"><?= glyph("trash",$lang["edit_chapter"]["del_yes"]) ?> <?= $lang["edit_chapter"]["del_yes"] ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function showDelCon() {
|
||||
document.getElementById("delbtn").style.display = "none";
|
||||
document.getElementById("delcon").style.display = "block";
|
||||
}
|
||||
|
||||
function hideDelCon() {
|
||||
document.getElementById("delbtn").style.display = "block";
|
||||
document.getElementById("delcon").style.display = "none";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
@ -1,227 +1,227 @@
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["edit_title"]["title"];
|
||||
|
||||
if($loggedin==false || $user["active"]==0) {
|
||||
header("Refresh: 0; url=../login");
|
||||
}
|
||||
|
||||
$slug2 = mysqli_real_escape_string($conn, $_GET["slug"]);
|
||||
$manga = $conn->query("SELECT * FROM `titles` WHERE `slug`='$slug2' LIMIT 1");
|
||||
$manga = mysqli_fetch_assoc($manga);
|
||||
|
||||
$error = false;
|
||||
$error_msg = "";
|
||||
|
||||
$slug = $manga["slug"];
|
||||
|
||||
if(isset($_POST["edit_title"])) {
|
||||
$m_title = mysqli_real_escape_string($conn, $_POST["title"]);
|
||||
$m_alt = mysqli_real_escape_string($conn, $_POST["alt"]);
|
||||
$m_author = mysqli_real_escape_string($conn, $_POST["author"]);
|
||||
$m_genre = mysqli_real_escape_string($conn, $_POST["genre"]);
|
||||
$m_type = mysqli_real_escape_string($conn, $_POST["type"]);
|
||||
$m_released = mysqli_real_escape_string($conn, $_POST["released"]);
|
||||
$m_rawstatus = mysqli_real_escape_string($conn, $_POST["raw-status"]);
|
||||
$m_scanstatus = mysqli_real_escape_string($conn, $_POST["scan-status"]);
|
||||
$m_description = mysqli_real_escape_string($conn, $_POST["description"]);
|
||||
$m_rawurl = mysqli_real_escape_string($conn, $_POST["raw-url"]);
|
||||
$m_licensed = mysqli_real_escape_string($conn, $_POST["licensed"]);
|
||||
$m_officialurl = mysqli_real_escape_string($conn, $_POST["official-url"]);
|
||||
|
||||
if($m_title!=$manga["title"]) {
|
||||
$conn->query("UPDATE `titles` SET `title`='$m_title' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_alt!=$manga["alt"]) {
|
||||
$conn->query("UPDATE `titles` SET `alt`='$m_alt' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_author!=$manga["author"]) {
|
||||
$conn->query("UPDATE `titles` SET `author`='$m_author' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_genre!=$manga["genre"]) {
|
||||
$conn->query("UPDATE `titles` SET `genre`='$m_genre' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_released!=$manga["released"]) {
|
||||
$conn->query("UPDATE `titles` SET `released`='$m_released' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_description!=$manga["description"]) {
|
||||
$conn->query("UPDATE `titles` SET `description`='$m_description' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_rawurl!=$manga["raw-url"]) {
|
||||
$conn->query("UPDATE `titles` SET `raw-url`='$m_rawurl' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_licensed!=$manga["licensed"]) {
|
||||
$conn->query("UPDATE `titles` SET `licensed`='$m_licensed' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_officialurl!=$manga["official-url"]) {
|
||||
$conn->query("UPDATE `titles` SET `official-url`='$m_officialurl' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
|
||||
if(isset($_FILES["cover"]["tmp_name"]) && !empty($_FILES["cover"]["tmp_name"])) {
|
||||
$filename = pathinfo($_FILES['cover']['name'], PATHINFO_FILENAME);
|
||||
$fileextension = pathinfo($_FILES['cover']['name'], PATHINFO_EXTENSION);
|
||||
$finalfile = $filename."-".$slug.".".$fileextension;
|
||||
$target_file = "../../data/covers/".$finalfile;
|
||||
|
||||
// Check if image file is a actual image or fake image
|
||||
$check = getimagesize($_FILES["cover"]["tmp_name"]);
|
||||
if($check !== false) {
|
||||
// Update SQL for Image
|
||||
move_uploaded_file($_FILES["cover"]["tmp_name"], $target_file);
|
||||
$conn->query("UPDATE `titles` SET `cover`='$finalfile' WHERE `id`='".$manga["id"]."'");
|
||||
} else {
|
||||
$error = true;
|
||||
$error_msg = $lang["errors"]["unsupported_image"];
|
||||
}
|
||||
} // no else statement needed
|
||||
|
||||
// No need for it anymore
|
||||
// if($error==false) {
|
||||
// $conn->query("INSERT INTO `titles`(`slug`,`title`,`cover`,`alt`,`author`,`genre`,`type`,`released`,`raw-status`,`scan-status`,`description`,`raw-url`,`licensed`,`official-url`) VALUES('$slug','$m_title','$finalfile',$m_alt,$m_author,$m_genre,'$m_type',$m_released,'$m_rawstatus','$m_scanstatus',$m_description,$m_rawurl,$m_licensed,$m_officialurl)");
|
||||
// if(isset($_FILES["cover"]["tmp_name"])) {
|
||||
// move_uploaded_file($_FILES["cover"]["tmp_name"], $target_file);
|
||||
// }
|
||||
// }
|
||||
|
||||
header("Refresh: 0");
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST["delete_title"])) {
|
||||
$conn->query("DELETE FROM `titles` WHERE `slug`='$slug'");
|
||||
header("Location: ../../");
|
||||
}
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<title><?= $lang["edit_title"]["title"]." - ".$manga["title"]." :: ".$config["title"] ?></title>
|
||||
|
||||
<?php include("../parts/menu.php"); ?>
|
||||
|
||||
<?php if(!isset($_COOKIE[$config["cookie"]."_cookie-consent"]) || empty($_COOKIE[$config["cookie"]."_cookie-consent"])) { include("../parts/cookies.php"); } ?>
|
||||
|
||||
<?php if(!empty($error_msg)) { ?>
|
||||
<div class="alert alert-warning alert-dismissible text-center" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<strong><?= $lang["login"]["error"] ?>:</strong> <?= $error_msg ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div style="margin: 0 auto; width: 300px" id="login_container">
|
||||
<form method="post" id="login_form" name="edit_title" enctype="multipart/form-data">
|
||||
<h1 class="text-center"><?= $lang["edit_title"]["title"] ?></h1>
|
||||
<h3 class="text-center"><a href="<?= $config["url"] ?>manga/<?= $manga["slug"] ?>"><?= $lang["edit_chapter"]["return"] ?>: <?= $manga["title"] ?></a></h3>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label for="manga_title"><?= $lang["add_manga"]["title"] ?></label>
|
||||
<input tabindex="1" type="text" name="title" id="manga_title" class="form-control" value="<?= $manga["title"] ?>" placeholder="<?= $lang["add_manga"]["title"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_cover" class="sr-"><?= $lang["add_manga"]["cover"] ?></label>
|
||||
<input tabindex="2" type="file" name="cover" id="manga_cover" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_alt"><?= $lang["add_manga"]["alt"] ?></label>
|
||||
<input tabindex="3" type="text" name="alt" id="manga_alt" class="form-control" value="<?= $manga["alt"] ?>" placeholder="<?= $lang["add_manga"]["alt"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_author"><?= $lang["add_manga"]["author"] ?></label>
|
||||
<input tabindex="4" type="text" name="author" id="manga_author" class="form-control" value="<?= $manga["author"] ?>" placeholder="<?= $lang["add_manga"]["author"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_genre"><?= $lang["add_manga"]["genre"] ?></label>
|
||||
<input tabindex="5" type="text" name="genre" id="manga_genre" class="form-control" value="<?= $manga["genre"] ?>" placeholder="<?= $lang["add_manga"]["genre"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_raw-status"><?= $lang["add_manga"]["type"] ?></label>
|
||||
<select required tabindex="6" class="selectpicker form-control" name="type" id="manga_type">
|
||||
<option <?php if($manga["type"]=="Manga") echo "selected"; ?> value="Manga"><?= $lang["add_manga"]["type_manga"] ?></option>
|
||||
<option <?php if($manga["type"]=="Manwha") echo "selected"; ?> value="Manwha"><?= $lang["add_manga"]["type_manwha"] ?></option>
|
||||
<option <?php if($manga["type"]=="Manhua") echo "selected"; ?> value="Manhua"><?= $lang["add_manga"]["type_manhua"] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_released"><?= $lang["add_manga"]["released"] ?></label>
|
||||
<input tabindex="7" type="number" name="released" id="manga_released" class="form-control" value="<?= $manga["released"] ?>" placeholder="<?= $lang["add_manga"]["released"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_raw-status"><?= $lang["add_manga"]["raw-st"] ?></label>
|
||||
<select tabindex="8" class="selectpicker form-control" name="raw-status" id="manga_raw-status">
|
||||
<option <?php if($manga["raw-status"]==1) echo "selected"; ?> value="1"><?= $lang["add_manga"]["rawst"][1] ?></option>
|
||||
<option <?php if($manga["raw-status"]==2) echo "selected"; ?> value="2"><?= $lang["add_manga"]["rawst"][2] ?></option>
|
||||
<option <?php if($manga["raw-status"]==3) echo "selected"; ?> value="3"><?= $lang["add_manga"]["rawst"][3] ?></option>
|
||||
<option <?php if($manga["raw-status"]==4) echo "selected"; ?> value="4"><?= $lang["add_manga"]["rawst"][4] ?></option>
|
||||
<option <?php if($manga["raw-status"]==5) echo "selected"; ?> value="5"><?= $lang["add_manga"]["rawst"][5] ?></option>
|
||||
<option <?php if($manga["raw-status"]==6) echo "selected"; ?> value="5"><?= $lang["add_manga"]["rawst"][6] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_scan-status"><?= $lang["add_manga"]["status"] ?></label>
|
||||
<select required tabindex="9" class="selectpicker form-control" name="scan-status" id="manga_scan-status">
|
||||
<option <?php if($manga["scan-status"]==1) echo "selected"; ?> value="1"><?= $lang["add_manga"]["scanst"][1] ?></option>
|
||||
<option <?php if($manga["scan-status"]==2) echo "selected"; ?> value="2"><?= $lang["add_manga"]["scanst"][2] ?></option>
|
||||
<option <?php if($manga["scan-status"]==3) echo "selected"; ?> value="3"><?= $lang["add_manga"]["scanst"][3] ?></option>
|
||||
<option <?php if($manga["scan-status"]==4) echo "selected"; ?> value="4"><?= $lang["add_manga"]["scanst"][4] ?></option>
|
||||
<option <?php if($manga["scan-status"]==5) echo "selected"; ?> value="5"><?= $lang["add_manga"]["scanst"][5] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_description"><?= $lang["add_manga"]["descript"] ?></label>
|
||||
<textarea tabindex="10" type="text" name="description" id="manga_description" class="form-control" placeholder="<?= $lang["add_manga"]["descript"] ?>" style="margin-left: -200px; width: 700px; max-width: 700px; min-width: 700px; min-height:200px"><?= $manga["description"] ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_raw-url"><?= $lang["add_manga"]["raw-url"] ?></label>
|
||||
<input tabindex="11" type="text" name="raw-url" id="manga_raw-url" class="form-control" value="<?= $manga["raw-url"] ?>" placeholder="<?= $lang["add_manga"]["raw-url"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_licensed"><?= $lang["add_manga"]["licensed"] ?></label>
|
||||
<input tabindex="12" type="text" name="licensed" id="manga_licensed" class="form-control" value="<?= $manga["licensed"] ?>" placeholder="<?= $lang["add_manga"]["licensed"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_official-url"><?= $lang["add_manga"]["official"] ?></label>
|
||||
<input tabindex="13" type="text" name="official-url" id="manga_official-url" class="form-control" value="<?= $manga["official-url"] ?>" placeholder="<?= $lang["add_manga"]["official"] ?>">
|
||||
</div>
|
||||
|
||||
<p><i><?= $lang["add_manga"]["required"] ?></i></p>
|
||||
<button tabindex="14" class="btn btn-lg btn-success btn-block" type="submit" id="login_button" name="edit_title"><?= glyph("plus",$lang["edit_title"]["save"]) ?> <?= $lang["edit_title"]["save"] ?></button>
|
||||
</form>
|
||||
<hr>
|
||||
<form method="post" name="delete_title">
|
||||
<button style="width: 300px; display: block" class="btn btn-lg btn-danger btn-block" onclick="showDelCon()" type="button" id="delbtn"><?= glyph("trash",$lang["edit_title"]["delete"]) ?> <?= $lang["edit_title"]["delete"] ?></button>
|
||||
<div id="delcon" style="display: none">
|
||||
<button style="width: 300px; display: block" class="btn btn-lg btn-success btn-block" onclick="hideDelCon()" type="button" id="delbtn"><?= glyph("remove",$lang["edit_chapter"]["del_no"]) ?> <?= $lang["edit_chapter"]["del_no"] ?></button>
|
||||
<button style="width: 300px; display: block" class="btn btn-lg btn-danger btn-block" type="submit" name="delete_title" id="delbtn"><?= glyph("trash",$lang["edit_chapter"]["del_yes"]) ?> <?= $lang["edit_chapter"]["del_yes"] ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
function showDelCon() {
|
||||
document.getElementById("delbtn").style.display = "none";
|
||||
document.getElementById("delcon").style.display = "block";
|
||||
}
|
||||
|
||||
function hideDelCon() {
|
||||
document.getElementById("delbtn").style.display = "block";
|
||||
document.getElementById("delcon").style.display = "none";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["edit_title"]["title"];
|
||||
|
||||
if($loggedin==false || $user["active"]==0) {
|
||||
header("Refresh: 0; url=../../");
|
||||
}
|
||||
|
||||
$slug2 = mysqli_real_escape_string($conn, $_GET["slug"]);
|
||||
$manga = $conn->query("SELECT * FROM `titles` WHERE `slug`='$slug2' LIMIT 1");
|
||||
$manga = mysqli_fetch_assoc($manga);
|
||||
|
||||
$error = false;
|
||||
$error_msg = "";
|
||||
|
||||
$slug = $manga["slug"];
|
||||
|
||||
if(isset($_POST["edit_title"])) {
|
||||
$m_title = mysqli_real_escape_string($conn, $_POST["title"]);
|
||||
$m_alt = mysqli_real_escape_string($conn, $_POST["alt"]);
|
||||
$m_author = mysqli_real_escape_string($conn, $_POST["author"]);
|
||||
$m_genre = mysqli_real_escape_string($conn, $_POST["genre"]);
|
||||
$m_type = mysqli_real_escape_string($conn, $_POST["type"]);
|
||||
$m_released = mysqli_real_escape_string($conn, $_POST["released"]);
|
||||
$m_rawstatus = mysqli_real_escape_string($conn, $_POST["raw-status"]);
|
||||
$m_scanstatus = mysqli_real_escape_string($conn, $_POST["scan-status"]);
|
||||
$m_description = mysqli_real_escape_string($conn, $_POST["description"]);
|
||||
$m_rawurl = mysqli_real_escape_string($conn, $_POST["raw-url"]);
|
||||
$m_licensed = mysqli_real_escape_string($conn, $_POST["licensed"]);
|
||||
$m_officialurl = mysqli_real_escape_string($conn, $_POST["official-url"]);
|
||||
|
||||
if($m_title!=$manga["title"]) {
|
||||
$conn->query("UPDATE `titles` SET `title`='$m_title' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_alt!=$manga["alt"]) {
|
||||
$conn->query("UPDATE `titles` SET `alt`='$m_alt' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_author!=$manga["author"]) {
|
||||
$conn->query("UPDATE `titles` SET `author`='$m_author' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_genre!=$manga["genre"]) {
|
||||
$conn->query("UPDATE `titles` SET `genre`='$m_genre' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_released!=$manga["released"]) {
|
||||
$conn->query("UPDATE `titles` SET `released`='$m_released' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_description!=$manga["description"]) {
|
||||
$conn->query("UPDATE `titles` SET `description`='$m_description' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_rawurl!=$manga["raw-url"]) {
|
||||
$conn->query("UPDATE `titles` SET `raw-url`='$m_rawurl' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_licensed!=$manga["licensed"]) {
|
||||
$conn->query("UPDATE `titles` SET `licensed`='$m_licensed' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
if($m_officialurl!=$manga["official-url"]) {
|
||||
$conn->query("UPDATE `titles` SET `official-url`='$m_officialurl' WHERE `id`='".$manga["id"]."'");
|
||||
}
|
||||
|
||||
if(isset($_FILES["cover"]["tmp_name"]) && !empty($_FILES["cover"]["tmp_name"])) {
|
||||
$filename = pathinfo($_FILES['cover']['name'], PATHINFO_FILENAME);
|
||||
$fileextension = pathinfo($_FILES['cover']['name'], PATHINFO_EXTENSION);
|
||||
$finalfile = $filename."-".$slug.".".$fileextension;
|
||||
$target_file = "../../data/covers/".$finalfile;
|
||||
|
||||
// Check if image file is a actual image or fake image
|
||||
$check = getimagesize($_FILES["cover"]["tmp_name"]);
|
||||
if($check !== false) {
|
||||
// Update SQL for Image
|
||||
move_uploaded_file($_FILES["cover"]["tmp_name"], $target_file);
|
||||
$conn->query("UPDATE `titles` SET `cover`='$finalfile' WHERE `id`='".$manga["id"]."'");
|
||||
} else {
|
||||
$error = true;
|
||||
$error_msg = $lang["errors"]["unsupported_image"];
|
||||
}
|
||||
} // no else statement needed
|
||||
|
||||
// No need for it anymore
|
||||
// if($error==false) {
|
||||
// $conn->query("INSERT INTO `titles`(`slug`,`title`,`cover`,`alt`,`author`,`genre`,`type`,`released`,`raw-status`,`scan-status`,`description`,`raw-url`,`licensed`,`official-url`) VALUES('$slug','$m_title','$finalfile',$m_alt,$m_author,$m_genre,'$m_type',$m_released,'$m_rawstatus','$m_scanstatus',$m_description,$m_rawurl,$m_licensed,$m_officialurl)");
|
||||
// if(isset($_FILES["cover"]["tmp_name"])) {
|
||||
// move_uploaded_file($_FILES["cover"]["tmp_name"], $target_file);
|
||||
// }
|
||||
// }
|
||||
|
||||
header("Refresh: 0");
|
||||
|
||||
}
|
||||
|
||||
if(isset($_POST["delete_title"])) {
|
||||
$conn->query("DELETE FROM `titles` WHERE `slug`='$slug'");
|
||||
header("Location: ../../");
|
||||
}
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<title><?= $lang["edit_title"]["title"]." - ".$manga["title"]." :: ".$config["title"] ?></title>
|
||||
|
||||
<?php include("../parts/menu.php"); ?>
|
||||
|
||||
<?php if(!isset($_COOKIE[$config["cookie"]."_cookie-consent"]) || empty($_COOKIE[$config["cookie"]."_cookie-consent"])) { include("../parts/cookies.php"); } ?>
|
||||
|
||||
<?php if(!empty($error_msg)) { ?>
|
||||
<div class="alert alert-warning alert-dismissible text-center" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<strong><?= $lang["login"]["error"] ?>:</strong> <?= $error_msg ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div style="margin: 0 auto; width: 300px" id="login_container">
|
||||
<form method="post" id="login_form" name="edit_title" enctype="multipart/form-data">
|
||||
<h1 class="text-center"><?= $lang["edit_title"]["title"] ?></h1>
|
||||
<h3 class="text-center"><a href="<?= $config["url"] ?>manga/<?= $manga["slug"] ?>"><?= $lang["edit_chapter"]["return"] ?>: <?= $manga["title"] ?></a></h3>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label for="manga_title"><?= $lang["add_manga"]["title"] ?></label>
|
||||
<input tabindex="1" type="text" name="title" id="manga_title" class="form-control" value="<?= $manga["title"] ?>" placeholder="<?= $lang["add_manga"]["title"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_cover" class="sr-"><?= $lang["add_manga"]["cover"] ?></label>
|
||||
<input tabindex="2" type="file" name="cover" id="manga_cover" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_alt"><?= $lang["add_manga"]["alt"] ?></label>
|
||||
<input tabindex="3" type="text" name="alt" id="manga_alt" class="form-control" value="<?= $manga["alt"] ?>" placeholder="<?= $lang["add_manga"]["alt"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_author"><?= $lang["add_manga"]["author"] ?></label>
|
||||
<input tabindex="4" type="text" name="author" id="manga_author" class="form-control" value="<?= $manga["author"] ?>" placeholder="<?= $lang["add_manga"]["author"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_genre"><?= $lang["add_manga"]["genre"] ?></label>
|
||||
<input tabindex="5" type="text" name="genre" id="manga_genre" class="form-control" value="<?= $manga["genre"] ?>" placeholder="<?= $lang["add_manga"]["genre"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_raw-status"><?= $lang["add_manga"]["type"] ?></label>
|
||||
<select required tabindex="6" class="selectpicker form-control" name="type" id="manga_type">
|
||||
<option <?php if($manga["type"]=="Manga") echo "selected"; ?> value="Manga"><?= $lang["add_manga"]["type_manga"] ?></option>
|
||||
<option <?php if($manga["type"]=="Manwha") echo "selected"; ?> value="Manwha"><?= $lang["add_manga"]["type_manwha"] ?></option>
|
||||
<option <?php if($manga["type"]=="Manhua") echo "selected"; ?> value="Manhua"><?= $lang["add_manga"]["type_manhua"] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_released"><?= $lang["add_manga"]["released"] ?></label>
|
||||
<input tabindex="7" type="number" name="released" id="manga_released" class="form-control" value="<?= $manga["released"] ?>" placeholder="<?= $lang["add_manga"]["released"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_raw-status"><?= $lang["add_manga"]["raw-st"] ?></label>
|
||||
<select tabindex="8" class="selectpicker form-control" name="raw-status" id="manga_raw-status">
|
||||
<option <?php if($manga["raw-status"]==1) echo "selected"; ?> value="1"><?= $lang["add_manga"]["rawst"][1] ?></option>
|
||||
<option <?php if($manga["raw-status"]==2) echo "selected"; ?> value="2"><?= $lang["add_manga"]["rawst"][2] ?></option>
|
||||
<option <?php if($manga["raw-status"]==3) echo "selected"; ?> value="3"><?= $lang["add_manga"]["rawst"][3] ?></option>
|
||||
<option <?php if($manga["raw-status"]==4) echo "selected"; ?> value="4"><?= $lang["add_manga"]["rawst"][4] ?></option>
|
||||
<option <?php if($manga["raw-status"]==5) echo "selected"; ?> value="5"><?= $lang["add_manga"]["rawst"][5] ?></option>
|
||||
<option <?php if($manga["raw-status"]==6) echo "selected"; ?> value="5"><?= $lang["add_manga"]["rawst"][6] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_scan-status"><?= $lang["add_manga"]["status"] ?></label>
|
||||
<select required tabindex="9" class="selectpicker form-control" name="scan-status" id="manga_scan-status">
|
||||
<option <?php if($manga["scan-status"]==1) echo "selected"; ?> value="1"><?= $lang["add_manga"]["scanst"][1] ?></option>
|
||||
<option <?php if($manga["scan-status"]==2) echo "selected"; ?> value="2"><?= $lang["add_manga"]["scanst"][2] ?></option>
|
||||
<option <?php if($manga["scan-status"]==3) echo "selected"; ?> value="3"><?= $lang["add_manga"]["scanst"][3] ?></option>
|
||||
<option <?php if($manga["scan-status"]==4) echo "selected"; ?> value="4"><?= $lang["add_manga"]["scanst"][4] ?></option>
|
||||
<option <?php if($manga["scan-status"]==5) echo "selected"; ?> value="5"><?= $lang["add_manga"]["scanst"][5] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_description"><?= $lang["add_manga"]["descript"] ?></label>
|
||||
<textarea tabindex="10" type="text" name="description" id="manga_description" class="form-control" placeholder="<?= $lang["add_manga"]["descript"] ?>" style="margin-left: -200px; width: 700px; max-width: 700px; min-width: 700px; min-height:200px"><?= $manga["description"] ?></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_raw-url"><?= $lang["add_manga"]["raw-url"] ?></label>
|
||||
<input tabindex="11" type="text" name="raw-url" id="manga_raw-url" class="form-control" value="<?= $manga["raw-url"] ?>" placeholder="<?= $lang["add_manga"]["raw-url"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_licensed"><?= $lang["add_manga"]["licensed"] ?></label>
|
||||
<input tabindex="12" type="text" name="licensed" id="manga_licensed" class="form-control" value="<?= $manga["licensed"] ?>" placeholder="<?= $lang["add_manga"]["licensed"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_official-url"><?= $lang["add_manga"]["official"] ?></label>
|
||||
<input tabindex="13" type="text" name="official-url" id="manga_official-url" class="form-control" value="<?= $manga["official-url"] ?>" placeholder="<?= $lang["add_manga"]["official"] ?>">
|
||||
</div>
|
||||
|
||||
<p><i><?= $lang["add_manga"]["required"] ?></i></p>
|
||||
<button tabindex="14" class="btn btn-lg btn-success btn-block" type="submit" id="login_button" name="edit_title"><?= glyph("plus",$lang["edit_title"]["save"]) ?> <?= $lang["edit_title"]["save"] ?></button>
|
||||
</form>
|
||||
<hr>
|
||||
<form method="post" name="delete_title">
|
||||
<button style="width: 300px; display: block" class="btn btn-lg btn-danger btn-block" onclick="showDelCon()" type="button" id="delbtn"><?= glyph("trash",$lang["edit_title"]["delete"]) ?> <?= $lang["edit_title"]["delete"] ?></button>
|
||||
<div id="delcon" style="display: none">
|
||||
<button style="width: 300px; display: block" class="btn btn-lg btn-success btn-block" onclick="hideDelCon()" type="button" id="delbtn"><?= glyph("remove",$lang["edit_chapter"]["del_no"]) ?> <?= $lang["edit_chapter"]["del_no"] ?></button>
|
||||
<button style="width: 300px; display: block" class="btn btn-lg btn-danger btn-block" type="submit" name="delete_title" id="delbtn"><?= glyph("trash",$lang["edit_chapter"]["del_yes"]) ?> <?= $lang["edit_chapter"]["del_yes"] ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
function showDelCon() {
|
||||
document.getElementById("delbtn").style.display = "none";
|
||||
document.getElementById("delcon").style.display = "block";
|
||||
}
|
||||
|
||||
function hideDelCon() {
|
||||
document.getElementById("delbtn").style.display = "block";
|
||||
document.getElementById("delcon").style.display = "none";
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
@ -1,178 +1,178 @@
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["menu"]["add_new"];
|
||||
|
||||
if($loggedin==false || $user["active"]==0) {
|
||||
header("Refresh: 0; url=../login");
|
||||
}
|
||||
|
||||
$error = false;
|
||||
$error_msg = "";
|
||||
|
||||
if(isset($_POST["add_manga"])) {
|
||||
$m_title = mysqli_real_escape_string($conn, $_POST["title"]);
|
||||
$m_alt = mysqli_real_escape_string($conn, $_POST["alt"]);
|
||||
$m_author = mysqli_real_escape_string($conn, $_POST["author"]);
|
||||
$m_genre = mysqli_real_escape_string($conn, $_POST["genre"]);
|
||||
$m_type = mysqli_real_escape_string($conn, $_POST["type"]);
|
||||
$m_released = mysqli_real_escape_string($conn, $_POST["released"]);
|
||||
$m_rawstatus = mysqli_real_escape_string($conn, $_POST["raw-status"]);
|
||||
$m_scanstatus = mysqli_real_escape_string($conn, $_POST["scan-status"]);
|
||||
$m_description = mysqli_real_escape_string($conn, $_POST["description"]);
|
||||
$m_rawurl = mysqli_real_escape_string($conn, $_POST["raw-url"]);
|
||||
$m_licensed = mysqli_real_escape_string($conn, $_POST["licensed"]);
|
||||
$m_officialurl = mysqli_real_escape_string($conn, $_POST["official-url"]);
|
||||
$titlecheck = $conn->query("SELECT * FROM `titles` WHERE `title`='$m_title' LIMIT 1");
|
||||
$slug = generate_url();
|
||||
|
||||
if(mysqli_num_rows($titlecheck)==1) {
|
||||
$error = true;
|
||||
$error_msg = $lang["errors"]["title_exists"];
|
||||
}
|
||||
|
||||
if(empty($m_alt)) { $m_alt = "NULL"; } else { $m_alt = "'$m_alt'"; }
|
||||
if(empty($m_author)) { $m_author = "NULL"; } else { $m_author = "'$m_author'"; }
|
||||
if(empty($m_genre)) { $m_genre = "NULL"; } else { $m_genre = "'$m_genre'"; }
|
||||
if(empty($m_released)) { $m_released = "NULL"; } else { $m_released = "'$m_released'"; }
|
||||
if(empty($m_description)) { $m_description = "NULL"; } else { $m_description = "'$m_description'"; }
|
||||
if(empty($m_rawurl)) { $m_rawurl = "NULL"; } else { $m_rawurl = "'$m_rawurl'"; }
|
||||
if(empty($m_licensed)) { $m_licensed = "NULL"; } else { $m_licensed = "'$m_licensed'"; }
|
||||
if(empty($m_officialurl)) { $m_officialurl = "NULL"; } else { $m_officialurl = "'$m_officialurl'"; }
|
||||
|
||||
if(isset($_FILES["cover"]["tmp_name"]) && !empty($_FILES["cover"]["tmp_name"])) {
|
||||
$filename = pathinfo($_FILES['cover']['name'], PATHINFO_FILENAME);
|
||||
$fileextension = pathinfo($_FILES['cover']['name'], PATHINFO_EXTENSION);
|
||||
$finalfile = $filename."-".$slug.".".$fileextension;
|
||||
$target_file = "../../data/covers/".$finalfile;
|
||||
|
||||
// Check if image file is a actual image or fake image
|
||||
$check = getimagesize($_FILES["cover"]["tmp_name"]);
|
||||
if($check !== false) {
|
||||
//echo "File is an image - " . $check["mime"] . ".";
|
||||
} else {
|
||||
$error = true;
|
||||
$error_msg = $lang["errors"]["unsupported_image"];
|
||||
}
|
||||
} else {
|
||||
$finalfile = "no-cover.jpg";
|
||||
}
|
||||
|
||||
if($error==false) {
|
||||
$conn->query("INSERT INTO `titles`(`slug`,`title`,`cover`,`alt`,`author`,`genre`,`type`,`released`,`raw-status`,`scan-status`,`description`,`raw-url`,`licensed`,`official-url`) VALUES('$slug','$m_title','$finalfile',$m_alt,$m_author,$m_genre,'$m_type',$m_released,'$m_rawstatus','$m_scanstatus',$m_description,$m_rawurl,$m_licensed,$m_officialurl)");
|
||||
if(isset($_FILES["cover"]["tmp_name"])) {
|
||||
move_uploaded_file($_FILES["cover"]["tmp_name"], $target_file);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<title><?= $lang["menu"]["add_new"]." :: ".$config["title"] ?></title>
|
||||
|
||||
<?php include("../parts/menu.php"); ?>
|
||||
|
||||
<?php if(!isset($_COOKIE[$config["cookie"]."_cookie-consent"]) || empty($_COOKIE[$config["cookie"]."_cookie-consent"])) { include("../parts/cookies.php"); } ?>
|
||||
|
||||
<?php if(!empty($error_msg)) { ?>
|
||||
<div class="alert alert-warning alert-dismissible text-center" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<strong><?= $lang["login"]["error"] ?>:</strong> <?= $error_msg ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div style="margin: 0 auto; width: 300px" id="login_container">
|
||||
<form method="post" id="login_form" name="add_manga" enctype="multipart/form-data">
|
||||
<h1 class="text-center"><?= $lang["menu"]["add_new"] ?></h1>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label for="manga_title"><?= $lang["add_manga"]["title"] ?></label>
|
||||
<input required tabindex="1" type="text" name="title" id="manga_title" class="form-control" placeholder="<?= $lang["add_manga"]["title"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_cover" class="sr-"><?= $lang["add_manga"]["cover"] ?></label>
|
||||
<input tabindex="2" type="file" name="cover" id="manga_cover" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_alt"><?= $lang["add_manga"]["alt"] ?></label>
|
||||
<input tabindex="3" type="text" name="alt" id="manga_alt" class="form-control" placeholder="<?= $lang["add_manga"]["alt"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_author"><?= $lang["add_manga"]["author"] ?></label>
|
||||
<input tabindex="4" type="text" name="author" id="manga_author" class="form-control" placeholder="<?= $lang["add_manga"]["author"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_genre"><?= $lang["add_manga"]["genre"] ?></label>
|
||||
<input tabindex="5" type="text" name="genre" id="manga_genre" class="form-control" placeholder="<?= $lang["add_manga"]["genre"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_raw-status"><?= $lang["add_manga"]["type"] ?></label>
|
||||
<select required tabindex="6" class="selectpicker form-control" name="type" id="manga_type">
|
||||
<option value="<?= $lang["add_manga"]["manga"] ?>" selected><?= $lang["add_manga"]["type_manga"] ?></option>
|
||||
<option value="<?= $lang["add_manga"]["manwha"] ?>"><?= $lang["add_manga"]["type_manwha"] ?></option>
|
||||
<option value="<?= $lang["add_manga"]["manhua"] ?>"><?= $lang["add_manga"]["type_manhua"] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_released"><?= $lang["add_manga"]["released"] ?></label>
|
||||
<input tabindex="7" type="number" name="released" id="manga_released" class="form-control" placeholder="<?= $lang["add_manga"]["released"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_raw-status"><?= $lang["add_manga"]["raw-st"] ?></label>
|
||||
<select tabindex="8" class="selectpicker form-control" name="raw-status" id="manga_raw-status">
|
||||
<option value="1" selected><?= $lang["add_manga"]["rawst"][1] ?></option>
|
||||
<option value="2"><?= $lang["add_manga"]["rawst"][2] ?></option>
|
||||
<option value="3"><?= $lang["add_manga"]["rawst"][3] ?></option>
|
||||
<option value="4"><?= $lang["add_manga"]["rawst"][4] ?></option>
|
||||
<option value="5"><?= $lang["add_manga"]["rawst"][5] ?></option>
|
||||
<option value="5"><?= $lang["add_manga"]["rawst"][6] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_scan-status"><?= $lang["add_manga"]["status"] ?></label>
|
||||
<select required tabindex="9" class="selectpicker form-control" name="scan-status" id="manga_scan-status">
|
||||
<option value="1"><?= $lang["add_manga"]["scanst"][1] ?></option>
|
||||
<option value="2" selected><?= $lang["add_manga"]["scanst"][2] ?></option>
|
||||
<option value="3"><?= $lang["add_manga"]["scanst"][3] ?></option>
|
||||
<option value="4"><?= $lang["add_manga"]["scanst"][4] ?></option>
|
||||
<option value="5"><?= $lang["add_manga"]["scanst"][5] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_description"><?= $lang["add_manga"]["descript"] ?></label>
|
||||
<textarea tabindex="10" type="text" name="description" id="manga_description" class="form-control" placeholder="<?= $lang["add_manga"]["descript"] ?>" style="margin-left: -200px; width: 700px; max-width: 700px; min-width: 700px; min-height:200px"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_raw-url"><?= $lang["add_manga"]["raw-url"] ?></label>
|
||||
<input tabindex="11" type="text" name="raw-url" id="manga_raw-url" class="form-control" placeholder="<?= $lang["add_manga"]["raw-url"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_licensed"><?= $lang["add_manga"]["licensed"] ?></label>
|
||||
<input tabindex="12" type="text" name="licensed" id="manga_licensed" class="form-control" placeholder="<?= $lang["add_manga"]["licensed"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_official-url"><?= $lang["add_manga"]["official"] ?></label>
|
||||
<input tabindex="13" type="text" name="official-url" id="manga_official-url" class="form-control" placeholder="<?= $lang["add_manga"]["official"] ?>">
|
||||
</div>
|
||||
|
||||
<p><i><?= $lang["add_manga"]["required"] ?></i></p>
|
||||
<button tabindex="14" class="btn btn-lg btn-success btn-block" type="submit" id="login_button" name="add_manga"><?= glyph("plus",$lang["add_manga"]["add"]) ?> <?= $lang["add_manga"]["add"] ?></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["menu"]["add_new"];
|
||||
|
||||
if($loggedin==false || $user["active"]==0) {
|
||||
header("Refresh: 0; url=../../");
|
||||
}
|
||||
|
||||
$error = false;
|
||||
$error_msg = "";
|
||||
|
||||
if(isset($_POST["add_manga"])) {
|
||||
$m_title = mysqli_real_escape_string($conn, $_POST["title"]);
|
||||
$m_alt = mysqli_real_escape_string($conn, $_POST["alt"]);
|
||||
$m_author = mysqli_real_escape_string($conn, $_POST["author"]);
|
||||
$m_genre = mysqli_real_escape_string($conn, $_POST["genre"]);
|
||||
$m_type = mysqli_real_escape_string($conn, $_POST["type"]);
|
||||
$m_released = mysqli_real_escape_string($conn, $_POST["released"]);
|
||||
$m_rawstatus = mysqli_real_escape_string($conn, $_POST["raw-status"]);
|
||||
$m_scanstatus = mysqli_real_escape_string($conn, $_POST["scan-status"]);
|
||||
$m_description = mysqli_real_escape_string($conn, $_POST["description"]);
|
||||
$m_rawurl = mysqli_real_escape_string($conn, $_POST["raw-url"]);
|
||||
$m_licensed = mysqli_real_escape_string($conn, $_POST["licensed"]);
|
||||
$m_officialurl = mysqli_real_escape_string($conn, $_POST["official-url"]);
|
||||
$titlecheck = $conn->query("SELECT * FROM `titles` WHERE `title`='$m_title' LIMIT 1");
|
||||
$slug = generate_url();
|
||||
|
||||
if(mysqli_num_rows($titlecheck)==1) {
|
||||
$error = true;
|
||||
$error_msg = $lang["errors"]["title_exists"];
|
||||
}
|
||||
|
||||
if(empty($m_alt)) { $m_alt = "NULL"; } else { $m_alt = "'$m_alt'"; }
|
||||
if(empty($m_author)) { $m_author = "NULL"; } else { $m_author = "'$m_author'"; }
|
||||
if(empty($m_genre)) { $m_genre = "NULL"; } else { $m_genre = "'$m_genre'"; }
|
||||
if(empty($m_released)) { $m_released = "NULL"; } else { $m_released = "'$m_released'"; }
|
||||
if(empty($m_description)) { $m_description = "NULL"; } else { $m_description = "'$m_description'"; }
|
||||
if(empty($m_rawurl)) { $m_rawurl = "NULL"; } else { $m_rawurl = "'$m_rawurl'"; }
|
||||
if(empty($m_licensed)) { $m_licensed = "NULL"; } else { $m_licensed = "'$m_licensed'"; }
|
||||
if(empty($m_officialurl)) { $m_officialurl = "NULL"; } else { $m_officialurl = "'$m_officialurl'"; }
|
||||
|
||||
if(isset($_FILES["cover"]["tmp_name"]) && !empty($_FILES["cover"]["tmp_name"])) {
|
||||
$filename = pathinfo($_FILES['cover']['name'], PATHINFO_FILENAME);
|
||||
$fileextension = pathinfo($_FILES['cover']['name'], PATHINFO_EXTENSION);
|
||||
$finalfile = $filename."-".$slug.".".$fileextension;
|
||||
$target_file = "../../data/covers/".$finalfile;
|
||||
|
||||
// Check if image file is a actual image or fake image
|
||||
$check = getimagesize($_FILES["cover"]["tmp_name"]);
|
||||
if($check !== false) {
|
||||
//echo "File is an image - " . $check["mime"] . ".";
|
||||
} else {
|
||||
$error = true;
|
||||
$error_msg = $lang["errors"]["unsupported_image"];
|
||||
}
|
||||
} else {
|
||||
$finalfile = "no-cover.jpg";
|
||||
}
|
||||
|
||||
if($error==false) {
|
||||
$conn->query("INSERT INTO `titles`(`slug`,`title`,`cover`,`alt`,`author`,`genre`,`type`,`released`,`raw-status`,`scan-status`,`description`,`raw-url`,`licensed`,`official-url`) VALUES('$slug','$m_title','$finalfile',$m_alt,$m_author,$m_genre,'$m_type',$m_released,'$m_rawstatus','$m_scanstatus',$m_description,$m_rawurl,$m_licensed,$m_officialurl)");
|
||||
if(isset($_FILES["cover"]["tmp_name"])) {
|
||||
move_uploaded_file($_FILES["cover"]["tmp_name"], $target_file);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<title><?= $lang["menu"]["add_new"]." :: ".$config["title"] ?></title>
|
||||
|
||||
<?php include("../parts/menu.php"); ?>
|
||||
|
||||
<?php if(!isset($_COOKIE[$config["cookie"]."_cookie-consent"]) || empty($_COOKIE[$config["cookie"]."_cookie-consent"])) { include("../parts/cookies.php"); } ?>
|
||||
|
||||
<?php if(!empty($error_msg)) { ?>
|
||||
<div class="alert alert-warning alert-dismissible text-center" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<strong><?= $lang["login"]["error"] ?>:</strong> <?= $error_msg ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div style="margin: 0 auto; width: 300px" id="login_container">
|
||||
<form method="post" id="login_form" name="add_manga" enctype="multipart/form-data">
|
||||
<h1 class="text-center"><?= $lang["menu"]["add_new"] ?></h1>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label for="manga_title"><?= $lang["add_manga"]["title"] ?></label>
|
||||
<input required tabindex="1" type="text" name="title" id="manga_title" class="form-control" placeholder="<?= $lang["add_manga"]["title"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_cover" class="sr-"><?= $lang["add_manga"]["cover"] ?></label>
|
||||
<input tabindex="2" type="file" name="cover" id="manga_cover" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_alt"><?= $lang["add_manga"]["alt"] ?></label>
|
||||
<input tabindex="3" type="text" name="alt" id="manga_alt" class="form-control" placeholder="<?= $lang["add_manga"]["alt"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_author"><?= $lang["add_manga"]["author"] ?></label>
|
||||
<input tabindex="4" type="text" name="author" id="manga_author" class="form-control" placeholder="<?= $lang["add_manga"]["author"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_genre"><?= $lang["add_manga"]["genre"] ?></label>
|
||||
<input tabindex="5" type="text" name="genre" id="manga_genre" class="form-control" placeholder="<?= $lang["add_manga"]["genre"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_raw-status"><?= $lang["add_manga"]["type"] ?></label>
|
||||
<select required tabindex="6" class="selectpicker form-control" name="type" id="manga_type">
|
||||
<option value="<?= $lang["add_manga"]["manga"] ?>" selected><?= $lang["add_manga"]["type_manga"] ?></option>
|
||||
<option value="<?= $lang["add_manga"]["manwha"] ?>"><?= $lang["add_manga"]["type_manwha"] ?></option>
|
||||
<option value="<?= $lang["add_manga"]["manhua"] ?>"><?= $lang["add_manga"]["type_manhua"] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_released"><?= $lang["add_manga"]["released"] ?></label>
|
||||
<input tabindex="7" type="number" name="released" id="manga_released" class="form-control" placeholder="<?= $lang["add_manga"]["released"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_raw-status"><?= $lang["add_manga"]["raw-st"] ?></label>
|
||||
<select tabindex="8" class="selectpicker form-control" name="raw-status" id="manga_raw-status">
|
||||
<option value="1" selected><?= $lang["add_manga"]["rawst"][1] ?></option>
|
||||
<option value="2"><?= $lang["add_manga"]["rawst"][2] ?></option>
|
||||
<option value="3"><?= $lang["add_manga"]["rawst"][3] ?></option>
|
||||
<option value="4"><?= $lang["add_manga"]["rawst"][4] ?></option>
|
||||
<option value="5"><?= $lang["add_manga"]["rawst"][5] ?></option>
|
||||
<option value="5"><?= $lang["add_manga"]["rawst"][6] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_scan-status"><?= $lang["add_manga"]["status"] ?></label>
|
||||
<select required tabindex="9" class="selectpicker form-control" name="scan-status" id="manga_scan-status">
|
||||
<option value="1"><?= $lang["add_manga"]["scanst"][1] ?></option>
|
||||
<option value="2" selected><?= $lang["add_manga"]["scanst"][2] ?></option>
|
||||
<option value="3"><?= $lang["add_manga"]["scanst"][3] ?></option>
|
||||
<option value="4"><?= $lang["add_manga"]["scanst"][4] ?></option>
|
||||
<option value="5"><?= $lang["add_manga"]["scanst"][5] ?></option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_description"><?= $lang["add_manga"]["descript"] ?></label>
|
||||
<textarea tabindex="10" type="text" name="description" id="manga_description" class="form-control" placeholder="<?= $lang["add_manga"]["descript"] ?>" style="margin-left: -200px; width: 700px; max-width: 700px; min-width: 700px; min-height:200px"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_raw-url"><?= $lang["add_manga"]["raw-url"] ?></label>
|
||||
<input tabindex="11" type="text" name="raw-url" id="manga_raw-url" class="form-control" placeholder="<?= $lang["add_manga"]["raw-url"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_licensed"><?= $lang["add_manga"]["licensed"] ?></label>
|
||||
<input tabindex="12" type="text" name="licensed" id="manga_licensed" class="form-control" placeholder="<?= $lang["add_manga"]["licensed"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="manga_official-url"><?= $lang["add_manga"]["official"] ?></label>
|
||||
<input tabindex="13" type="text" name="official-url" id="manga_official-url" class="form-control" placeholder="<?= $lang["add_manga"]["official"] ?>">
|
||||
</div>
|
||||
|
||||
<p><i><?= $lang["add_manga"]["required"] ?></i></p>
|
||||
<button tabindex="14" class="btn btn-lg btn-success btn-block" type="submit" id="login_button" name="add_manga"><?= glyph("plus",$lang["add_manga"]["add"]) ?> <?= $lang["add_manga"]["add"] ?></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
1
render/releaser/settings.req.php
Normal file
1
render/releaser/settings.req.php
Normal file
@ -0,0 +1 @@
|
||||
To-do!
|
@ -7,6 +7,8 @@ if($conn->connect_error) {
|
||||
die("Database Error: " . $conn->connect_error);
|
||||
}
|
||||
|
||||
$config = $conn->query("SELECT * FROM `config`")->fetch_assoc();
|
||||
|
||||
if((isset($_COOKIE[$config["cookie"]."_session"]) && !empty($_COOKIE[$config["cookie"]."_session"])) || (isset($_SESSION[$config["cookie"]."_session"]) && !empty($_SESSION[$config["cookie"]."_session"]))) {
|
||||
if(!empty($_COOKIE[$config["cookie"]."_session"])) {
|
||||
$token = mysqli_real_escape_string($conn, $_COOKIE[$config["cookie"]."_session"]);
|
||||
@ -24,6 +26,10 @@ if((isset($_COOKIE[$config["cookie"]."_session"]) && !empty($_COOKIE[$config["co
|
||||
} else {
|
||||
// Invalid session! (Hacking attempt or outdated? who knows...)
|
||||
$loggedin = false;
|
||||
$user = [
|
||||
"level" => 5,
|
||||
"theme" => $config["theme"],
|
||||
];
|
||||
}
|
||||
} else {
|
||||
$loggedin = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user