mirror of
https://github.com/saintly2k/FoOlSlideX.git
synced 2025-02-20 11:13:13 +08:00
commit
ad1f3ae2ec
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
|
||||
.installed
|
||||
update.sql
|
||||
update.zip
|
||||
|
@ -11,6 +11,7 @@ RewriteRule ^logout/?$ ./render/public/home.req.php?logout
|
||||
RewriteRule ^titles/?$ ./render/public/titles.req.php
|
||||
RewriteRule ^bookmarks/?$ ./render/public/bookmarks.req.php
|
||||
RewriteRule ^about/?$ ./render/public/about.req.php
|
||||
RewriteRule ^s/(.*)/?$ ./render/public/static.req.php?static=$1
|
||||
|
||||
# Manga Pages
|
||||
RewriteRule ^manga/(.*)/?$ ./render/public/manga.req.php?slug=$1
|
||||
@ -30,6 +31,8 @@ RewriteRule ^admin/edit_chapter/(.*)/?$ ./render/releaser/edit_chapter.req.php?s
|
||||
# Mod Pages
|
||||
RewriteRule ^admin/add_group/?$ ./render/mod/add_group.req.php
|
||||
RewriteRule ^admin/edit_group/(.*)/?$ ./render/mod/edit_group.req.php?id=$1
|
||||
RewriteRule ^admin/statics/?$ ./render/mod/statics.req.php
|
||||
RewriteRule ^admin/editor/?$ ./render/mod/editor.req.php
|
||||
|
||||
# Admin Pages
|
||||
RewriteRule ^admin/config/?$ ./render/admin/config.req.php
|
||||
|
40
README.md
40
README.md
@ -13,7 +13,7 @@ Before contributing, make sure to read [Contributing](#contributing)! Make sure
|
||||
- [Features](#features)
|
||||
- [Contributing](#contributing)
|
||||
- [Video-Guides](#video-guides)
|
||||
- [Installation](#installation)
|
||||
- [Installation using the Installer](#installation-using-the-installer)
|
||||
- [Documentation](#documentation)
|
||||
- [Config Variables](#config-variables)
|
||||
- [Supprt](#support)
|
||||
@ -21,6 +21,7 @@ Before contributing, make sure to read [Contributing](#contributing)! Make sure
|
||||
- [Demo](#demo)
|
||||
- [Used By](#used-by)
|
||||
- [Authors](#authors)
|
||||
|
||||
## Features
|
||||
|
||||
- Create invites
|
||||
@ -29,6 +30,8 @@ Before contributing, make sure to read [Contributing](#contributing)! Make sure
|
||||
- Add Chapters/Edit them
|
||||
- Bookmark Mangas & Chapters via Cookies
|
||||
- View Bookmarks & keep track of them
|
||||
- Create Groups, view groups and their chapters
|
||||
- Create static pages & manage them
|
||||
|
||||
## Contributing
|
||||
|
||||
@ -46,41 +49,22 @@ As someone requested, I started a video-guide on YouTube on how to install, upda
|
||||
|
||||
[View the full PlayList](https://www.youtube.com/playlist?list=PLDQvUzXjsrhP8EsCrxJ6yoqcOKTESXixX)
|
||||
|
||||
## Installation
|
||||
## Installation using the Installer
|
||||
|
||||
- Download the latest stable release
|
||||
- Create a MySQL Database and import `mangareaderx.sql`
|
||||
- Go to table `invites`, press `insert` and type in `token` whatever you want
|
||||
- Edit `config.php` to your likings
|
||||
- Upload everything and open in Browser
|
||||
- Click on `Account`, then `Signup` and fill out the info
|
||||
- Enter in the field `Invite Code` the `token` you just created
|
||||
- After Registering, Login using your Details
|
||||
- Create a MySQL Database
|
||||
- Open your webroot in your browser
|
||||
- Fill out all data and click on submit
|
||||
- Create an account using the invite code `FoOlSlideX`
|
||||
- Done
|
||||
|
||||
## Documentation
|
||||
|
||||
[View full Documentation here.](https://h33t.moe/file/foolslidex-docs) (Soon)
|
||||
[View full Documentation in the GitHub Wiki](https://github.com/saintly2k/FoOlSlideX/wiki)
|
||||
|
||||
|
||||
## Config Variables
|
||||
|
||||
`$config["title"]` is the Title of the Site
|
||||
|
||||
`$config["logo"]` is the location of the logo from the Root folder
|
||||
|
||||
`$config["slogan"]` is what shows when you're on the main page
|
||||
|
||||
`$config["url"]` is the full URL to your site including subfolder AND ends with slash!
|
||||
|
||||
`$config["theme"]` is a number between 1-5 being different Themes
|
||||
|
||||
`$config["start"]` declares when your Group was founded, will show in footer
|
||||
|
||||
`$config["lang"]` is what language-file it uses located in /lang/
|
||||
|
||||
`$config["disqus"]` is the name of your Disqus portal
|
||||
|
||||
`$slave["host"]` is the MySQL host
|
||||
|
||||
`$slave["user"]` is the MySQL user
|
||||
@ -98,7 +82,7 @@ Or eMail me at saintly@h33t.moe
|
||||
|
||||
## Donate
|
||||
|
||||
I spend a lot of time working on this.
|
||||
I spend a lot of time working on this. Really.
|
||||
|
||||
Please consider donating some money via PayPal: [yuki.akihabara@yandex.com](https://paypal.me/WOLFRAMEdev)
|
||||
|
||||
@ -115,12 +99,14 @@ This project is used by the following groups:
|
||||
- [Lubuntu Bionic Beaver Scans](https://stukas.henai.eu)
|
||||
- [weltenWanderer Scans](https://wws.henai.eu)
|
||||
- [ELEVEN SCANLATOR](http://eleven-scanlator.epizy.com)
|
||||
- [PuchiRoll](https://puchiroll.com)
|
||||
|
||||
|
||||
## Authors
|
||||
|
||||
FoOlSlideX Development:
|
||||
- [@saintly2k](https://www.github.com/saintly2k)
|
||||
- [@kaligula-eu](https://www.github.com/kaligula-eu)
|
||||
|
||||
Translation:
|
||||
- EN: [Saintly2k](https://github.com/saintly2k)
|
||||
|
@ -28,25 +28,25 @@ Text Style:
|
||||
3 - Releaser
|
||||
|
||||
[ TYPEN (int) ]
|
||||
000-099:
|
||||
000:
|
||||
Non-user related,
|
||||
For system & updates,
|
||||
For GitHub and such,
|
||||
100-199:
|
||||
100:
|
||||
For all users,
|
||||
Reader, system and such,
|
||||
200-299:
|
||||
200:
|
||||
For Groups and such,
|
||||
300-399:
|
||||
300:
|
||||
For Releases,
|
||||
For Titles and such,
|
||||
400-499:
|
||||
400:
|
||||
For Moderators,
|
||||
For groups,
|
||||
500-599:
|
||||
500:
|
||||
For Admins,
|
||||
Administration and such,
|
||||
600-799:
|
||||
600:
|
||||
Nothing,
|
||||
900-999:
|
||||
900:
|
||||
Languages and such,
|
20
install.php
20
install.php
@ -27,6 +27,8 @@ if(isset($_POST["install"])) {
|
||||
$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"]);
|
||||
if(isset($_POST["blog"])) { $c_blog = "1"; } else { $c_blog = "0"; }
|
||||
if(isset($_POST["news"])) { $c_news = "1"; } else { $c_news = "0"; }
|
||||
$c_lang = mysqli_real_escape_string($conn, $_POST["lang"]);
|
||||
$c_disqus = mysqli_real_escape_string($conn, $_POST["disqus"]);
|
||||
|
||||
@ -47,7 +49,7 @@ if(isset($_POST["install"])) {
|
||||
fwrite($file, $version);
|
||||
fclose($file);
|
||||
|
||||
$conn->query("INSERT INTO `config`(`title`, `slogan`, `logo`, `cookie`, `url`, `theme`, `start`, `lang`, `disqus`) VALUES('$c_title', '$c_slogan', '$c_logo', '$c_cookie', '$c_url', '$c_theme', '$c_start', '$c_lang', '$c_disqus')");
|
||||
$conn->query("INSERT INTO `config`(`title`, `slogan`, `logo`, `cookie`, `url`, `theme`, `start`, `blog`, `news`, `lang`, `disqus`) VALUES('$c_title', '$c_slogan', '$c_logo', '$c_cookie', '$c_url', '$c_theme', '$c_start', '$c_blog', '$cnews', '$c_lang', '$c_disqus')");
|
||||
$conn->query("INSERT INTO `invites`(`token`,`used`) VALUES('FoOlSlideX', NULL)");
|
||||
|
||||
header("Location: signup");
|
||||
@ -125,6 +127,22 @@ include("./render/parts/header.php");
|
||||
<input required tabindex="7" type="number" name="start" id="config_start" class="form-control" placeholder="<?= $lang["config"]["start"] ?>">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label title="<?= $lang["menu"]["blog2"] ?>">
|
||||
<input type="checkbox" name="blog" checked> <?= $lang["menu"]["blog2"] ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label title="<?= $lang["menu"]["news2"] ?>">
|
||||
<input type="checkbox" name="news" checked> <?= $lang["menu"]["news2"] ?>
|
||||
</label>
|
||||
</div>
|
||||
</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"] ?>">
|
||||
|
@ -23,7 +23,6 @@ $lang = [
|
||||
"releases" => "Releases",
|
||||
"titles" => "Mangas",
|
||||
"more" => "Weiteres",
|
||||
"about" => "Über",
|
||||
"quicksearch" => "Schnellsuche",
|
||||
"search" => "Suche",
|
||||
"account" => "Account",
|
||||
@ -42,7 +41,8 @@ $lang = [
|
||||
"blog2" => "Blog aktiviert",
|
||||
"news" => "Neuigkeiten",
|
||||
"news2" => "Neuigkeiten aktiviert",
|
||||
"menu_dis" => "Menü Ansicht"
|
||||
"menu_dis" => "Menü Ansicht",
|
||||
"statics" => "Statische Seiten"
|
||||
],
|
||||
"home" => [
|
||||
"added_titles" => "Neue Titel",
|
||||
@ -238,6 +238,20 @@ $lang = [
|
||||
"hidden" => "Versteckt",
|
||||
"delete" => "Bist du sicher, dass du diesen Menüeintrag löschen möchtest?"
|
||||
],
|
||||
"statics" => [
|
||||
"delete" => "Bist du sicher, dass du diese Seite löschen willst? Es wird der MySQL-Eintrag, der Menüpunkt UND die Datei gelöscht. KEINE CHANCE AUF WIEDERHERSTELLUNG!",
|
||||
"name" => "Seiten Name/URL",
|
||||
"title" => "Anzeige Name",
|
||||
"private" => "Privat?",
|
||||
"menu" => "Menüeintrag erstellen?",
|
||||
"create" => "Erstellen"
|
||||
],
|
||||
"editor" => [
|
||||
"title" => "Dateieditor",
|
||||
"edit" => "Datei bearbeiten",
|
||||
"delete" => "Seite löschen",
|
||||
"close" => "Schließen",
|
||||
],
|
||||
"errors" => [
|
||||
"bad_username" => "Benutzername enthält ungültige Zeichen!",
|
||||
"bad_password" => "Das Passwort enthält ungültige Zeichen!",
|
||||
|
@ -23,7 +23,6 @@ $lang = [
|
||||
"releases" => "Releases",
|
||||
"titles" => "Titles",
|
||||
"more" => "More",
|
||||
"about" => "About",
|
||||
"quicksearch" => "Quicksearch",
|
||||
"search" => "Search",
|
||||
"account" => "Account",
|
||||
@ -42,7 +41,8 @@ $lang = [
|
||||
"blog2" => "Blog activated",
|
||||
"news" => "News",
|
||||
"news2" => "News activated",
|
||||
"menu_dis" => "Menu Display"
|
||||
"menu_dis" => "Menu Display",
|
||||
"statics" => "Static Pages"
|
||||
],
|
||||
"home" => [
|
||||
"added_titles" => "Added Titles",
|
||||
@ -238,6 +238,20 @@ $lang = [
|
||||
"hidden" => "Hidden",
|
||||
"delete" => "Are you sure you want to delete this Menu item?"
|
||||
],
|
||||
"statics" => [
|
||||
"delete" => "Are you sure you want to delete this page? It will delete the MySQL entry, the Menu item AND the file. NO CHANCE FOR RECOVERY!",
|
||||
"name" => "Page Name/URL",
|
||||
"title" => "Display Name",
|
||||
"private" => "Private?",
|
||||
"menu" => "Create Menu item?",
|
||||
"create" => "Create"
|
||||
],
|
||||
"editor" => [
|
||||
"title" => "File Editor",
|
||||
"edit" => "Edit File",
|
||||
"delete" => "Delete Page",
|
||||
"close" => "Close",
|
||||
],
|
||||
"errors" => [
|
||||
"bad_username" => "Username contains bad characters!",
|
||||
"bad_password" => "Password contains bad characters!",
|
||||
|
@ -23,7 +23,6 @@ $lang = [
|
||||
"releases" => "Lançamentos",
|
||||
"titles" => "Titulos",
|
||||
"more" => "Mais",
|
||||
"about" => "Sobre",
|
||||
"quicksearch" => "Pesquisa rapida",
|
||||
"search" => "Pesquisar",
|
||||
"account" => "Conta",
|
||||
@ -42,7 +41,8 @@ $lang = [
|
||||
"blog2" => "Blog activated", # Needs translation
|
||||
"news" => "News", # Needs translation
|
||||
"news2" => "News activated", # Needs translation
|
||||
"menu_dis" => "Menu Display" # Needs translation
|
||||
"menu_dis" => "Menu Display", # Needs translation
|
||||
"statics" => "Static Pages" # Needs translation
|
||||
],
|
||||
"home" => [
|
||||
"added_titles" => "Added Titles", # Needs translation
|
||||
@ -238,6 +238,20 @@ $lang = [
|
||||
"hidden" => "Hidden", # Needs translation
|
||||
"delete" => "Are you sure you want to delete this Menu item?" # Needs translation
|
||||
],
|
||||
"statics" => [
|
||||
"delete" => "Are you sure you want to delete this page? It will delete the MySQL entry, the Menu item AND the file. NO CHANCE FOR RECOVERY!", # Needs translation
|
||||
"name" => "Page Name/URL", # Needs translation
|
||||
"title" => "Display Name", # Needs translation
|
||||
"private" => "Private?", # Needs translation
|
||||
"menu" => "Create Menu item?", # Needs translation
|
||||
"create" => "Create" # Needs translation
|
||||
],
|
||||
"editor" => [
|
||||
"title" => "File Editor", # Needs translation
|
||||
"edit" => "Edit File", # Needs translation
|
||||
"delete" => "Delete Page", # Needs translation
|
||||
"close" => "Close", # Needs translation
|
||||
],
|
||||
"errors" => [
|
||||
"bad_username" => "O nome de usuário contém caracteres ruins!",
|
||||
"bad_password" => "A senha contém caracteres ruins!",
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Russian Language File, ver: 0.3b
|
||||
# Перевод может быть не корректным, если переведенный текст ещё не задействован в функционале!
|
||||
# The translation may not be correct if the translated text is not yet functional!
|
||||
# UpDated 15.06
|
||||
# UpDated 15.06.2022
|
||||
|
||||
$lang = [
|
||||
"cookie_modal" => [
|
||||
@ -23,7 +23,6 @@ $lang = [
|
||||
"releases" => "Релизы",
|
||||
"titles" => "Проекты", # Точно ещё не было решено как обозначить раздел, ибо это можно обозначить как: Проектами, Тайтлами, а так же и Переводами / It has not yet been decided exactly how to designate the section, for it can be designated as: Projects, Titles, as well as Translations
|
||||
"more" => "Ещё",
|
||||
"about" => "О нас",
|
||||
"quicksearch" => "Быстрый поиск",
|
||||
"search" => "Поиск",
|
||||
"account" => "Аккаунт",
|
||||
@ -42,7 +41,8 @@ $lang = [
|
||||
"blog2" => "Blog activated", # Needs translation
|
||||
"news" => "News", # Needs translation
|
||||
"news2" => "News activated", # Needs translation
|
||||
"menu_dis" => "Menu Display" # Needs translation
|
||||
"menu_dis" => "Menu Display", # Needs translation
|
||||
"statics" => "Static Pages" # Needs translation
|
||||
],
|
||||
"home" => [
|
||||
"added_titles" => "Добавлены названия",
|
||||
@ -238,6 +238,20 @@ $lang = [
|
||||
"hidden" => "Hidden", # Needs translation
|
||||
"delete" => "Are you sure you want to delete this Menu item?" # Needs translation
|
||||
],
|
||||
"statics" => [
|
||||
"delete" => "Are you sure you want to delete this page? It will delete the MySQL entry, the Menu item AND the file. NO CHANCE FOR RECOVERY!", # Needs translation
|
||||
"name" => "Page Name/URL", # Needs translation
|
||||
"title" => "Display Name", # Needs translation
|
||||
"private" => "Private?", # Needs translation
|
||||
"menu" => "Create Menu item?", # Needs translation
|
||||
"create" => "Create" # Needs translation
|
||||
],
|
||||
"editor" => [
|
||||
"title" => "File Editor", # Needs translation
|
||||
"edit" => "Edit File", # Needs translation
|
||||
"delete" => "Delete Page", # Needs translation
|
||||
"close" => "Close", # Needs translation
|
||||
],
|
||||
"errors" => [
|
||||
"bad_username" => "Никнейм содержит недопустимые символы!",
|
||||
"bad_password" => "Пароль содержит недопустимые символы!",
|
||||
|
@ -179,6 +179,46 @@ CREATE TABLE `user` (
|
||||
`active` int(11) NOT NULL DEFAULT 1
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
--
|
||||
-- Tabellenstruktur für Tabelle `statics`
|
||||
--
|
||||
|
||||
CREATE TABLE `statics` (
|
||||
`id` int(11) NOT NULL,
|
||||
`name` varchar(20) NOT NULL,
|
||||
`title` varchar(50) NOT NULL,
|
||||
`public` tinyint(1) NOT NULL DEFAULT 1,
|
||||
`created` datetime NOT NULL DEFAULT current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `statics`
|
||||
--
|
||||
|
||||
INSERT INTO `statics` (`id`, `name`, `title`, `public`, `created`) VALUES
|
||||
(1, 'about', 'About', 1, '2022-07-08 17:17:57');
|
||||
|
||||
--
|
||||
-- Indizes der exportierten Tabellen
|
||||
--
|
||||
|
||||
--
|
||||
-- Indizes für die Tabelle `statics`
|
||||
--
|
||||
ALTER TABLE `statics`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT für exportierte Tabellen
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT für Tabelle `statics`
|
||||
--
|
||||
ALTER TABLE `statics`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
|
||||
COMMIT;
|
||||
|
||||
--
|
||||
-- Indizes der exportierten Tabellen
|
||||
--
|
||||
|
@ -85,6 +85,7 @@ include("../parts/header.php");
|
||||
|
||||
<?php if(!isset($_COOKIE[$config["cookie"]."_cookie-consent"]) || empty($_COOKIE[$config["cookie"]."_cookie-consent"])) { include("../parts/cookies.php"); } ?>
|
||||
|
||||
<!-- THIS IS OPTIONAL FOR YOU BUT IF YOU DON'T KNOW, WATCH IT :)
|
||||
<a href="" target="_blank">
|
||||
<div class="alert alert-info text-center" role="alert">
|
||||
<b>
|
||||
@ -92,6 +93,7 @@ include("../parts/header.php");
|
||||
</b>
|
||||
</div>
|
||||
</a>
|
||||
-->
|
||||
|
||||
<?php if(!empty($error_msg)) { ?>
|
||||
<div class="alert alert-warning alert-dismissible text-center" role="alert">
|
||||
|
46
render/mod/editor.req.php
Normal file
46
render/mod/editor.req.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
if($loggedin==false || ($user["level"]!=1 && $user["level"]!=2 && $user["level"]!=3) || $user["active"]==0) {
|
||||
header("Refresh: 0; url=../../");
|
||||
}
|
||||
|
||||
$type = mysqli_real_escape_string($conn, $_GET["type"]);
|
||||
$file = mysqli_real_escape_string($conn, $_GET["file"]);
|
||||
|
||||
if($type=="static") {
|
||||
$s = $conn->query("SELECT * FROM `statics` WHERE `name`='$file' LIMIT 1")->fetch_assoc();
|
||||
|
||||
if(isset($_POST["edit_body"])) {
|
||||
$txt = $_POST["txt"];
|
||||
|
||||
$mf = fopen("../statics/$file.html", "w") or die("couldn't edit file. check file permission and set to 755.");
|
||||
fwrite($mf, $txt);
|
||||
fclose($mf);
|
||||
echo "<script>window.close('','_parent','');</script>";
|
||||
}
|
||||
}
|
||||
|
||||
$page = $lang["editor"]["title"];
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<title><?= $lang["editor"]["title"]." :: ".$config["title"] ?></title>
|
||||
|
||||
</head>
|
||||
|
||||
<body style="margin:0px; padding:0px;margin-top: -20px;">
|
||||
|
||||
<h3><?= $lang["editor"]["title"] ?>: <?= $s["name"] ?>.html <span class="text-right"><a href="#" onclick="javascript:window.close('','_parent','')"><?= glyph("remove", $lang["editor"]["close"]) ?> <?= $lang["editor"]["close"] ?></a></span></h3>
|
||||
|
||||
<form method="post" name="edit_body" style="margin-top: -30px">
|
||||
<textarea name="txt" class="form-control" style="resize: vertical; height: 649px"><?= file_get_contents("../statics/$file.html") ?></textarea>
|
||||
<button type="submit" name="edit_body" class="btn btn-success btn-block"><?= glyph("pencil", $lang["edit_title"]["save"]) ?> <?= $lang["edit_title"]["save"] ?></button>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
201
render/mod/statics.req.php
Normal file
201
render/mod/statics.req.php
Normal file
@ -0,0 +1,201 @@
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["menu"]["statics"];
|
||||
|
||||
if($loggedin==false || ($user["level"]!=1 && $user["level"]!=2) || $user["active"]==0) {
|
||||
header("Refresh: 0; url=../../");
|
||||
}
|
||||
|
||||
$statics = $conn->query("SELECT * FROM `statics` ORDER BY `created` ASC");
|
||||
|
||||
$error = false;
|
||||
$error_msg = "";
|
||||
|
||||
if(isset($_POST["edit_static"])) {
|
||||
$s_id = mysqli_real_escape_string($conn, $_POST["id"]);
|
||||
$s_old_name = mysqli_real_escape_string($conn, $_POST["old_name"]);
|
||||
$s_old_title = mysqli_real_escape_string($conn, $_POST["old_title"]);
|
||||
$s_name = mysqli_real_escape_string($conn, $_POST["name"]);
|
||||
$s_title = mysqli_real_escape_string($conn, $_POST["title"]);
|
||||
if(isset($_POST["private"])) { $s_private = mysqli_real_escape_string($conn, $_POST["private"]); } else { $s_private = "1"; }
|
||||
|
||||
if($s_old_name==$s_name) { $s_name = "waiufbsuigvisvzogbsbvsdb"; $cname = true; } else { $cname = false; }
|
||||
if($s_old_title==$s_title) { $s_title = "waiufbsuigvisvzogbsbvsdb"; $ctitle = true; } else { $ctitle = false; }
|
||||
$check = $conn->query("SELECT * FROM `statics` WHERE `name`='$s_name' OR `title`='$s_title'");
|
||||
if($cname==true) $s_name = $s_old_name;
|
||||
if($ctitle==true) $s_title = $s_old_title;
|
||||
|
||||
if(mysqli_num_rows($check)==1) {
|
||||
$error = true;
|
||||
$error_msg = $lang["errors"]["exising_item"];
|
||||
}
|
||||
|
||||
if($error==false) {
|
||||
rename("../statics/$s_old_name.html", "../statics/$s_name.html");
|
||||
$conn->query("UPDATE `statics` SET `name`='$s_name', `title`='$s_title', `public`='$s_private' WHERE `id`='$s_id'");
|
||||
$conn->query("UPDATE `display` SET `item`='s/$s_name', `text`='$s_title' WHERE `item`='s/$s_old_name'");
|
||||
header("Refresh: 0");
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["add_static"])) {
|
||||
$s_name = mysqli_real_escape_string($conn, $_POST["name"]);
|
||||
$s_title = mysqli_real_escape_string($conn, $_POST["title"]);
|
||||
if(isset($_POST["menu"])) {
|
||||
$s_menu = mysqli_real_escape_string($conn, $_POST["menu"]);
|
||||
$s_icon = mysqli_real_escape_string($conn, $_POST["icon"]);
|
||||
} else {
|
||||
$s_menu = "0";
|
||||
$s_icon = "";
|
||||
}
|
||||
if(isset($_POST["private"])) { $s_private = mysqli_real_escape_string($conn, $_POST["private"]); } else { $s_private = "1"; }
|
||||
|
||||
$check = $conn->query("SELECT * FROM `statics` WHERE `name`='$s_name' OR `title`='$s_title' LIMIT 1");
|
||||
|
||||
if(mysqli_num_rows($check)==1) {
|
||||
$error = true;
|
||||
$error_msg = $lang["errors"]["exising_item"];
|
||||
}
|
||||
|
||||
if($error==false) {
|
||||
$file = fopen("../statics/$s_name.html", "w") or die("could not create file. check permissions and set to 755");
|
||||
fwrite($file, date('Y/m/d H:i:s'));
|
||||
fclose($file);
|
||||
$conn->query("INSERT INTO `statics`(`name`,`title`,`public`) VALUES('$s_name', '$s_title', '$s_private')");
|
||||
if($s_menu==true) {
|
||||
$lmi = $conn->query("SELECT * FROM `display` ORDER BY `order` DESC LIMIT 1")->fetch_assoc();
|
||||
$lmi = $lmi["order"];
|
||||
$lmi++;
|
||||
$conn->query("INSERT INTO `display`(`order`,`item`,`text`,`icon`,`displayed`,`hidden`) VALUES('$lmi', 's/$s_name', '$s_title', '$s_icon', '1', '0')");
|
||||
}
|
||||
header("Refresh: 0");
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_POST["delete_static"])) {
|
||||
$sid = mysqli_real_escape_string($conn, $_POST["id"]);
|
||||
$sname = mysqli_real_escape_string($conn, $_POST["name"]);
|
||||
|
||||
unlink("../statics/$sname.html");
|
||||
$conn->query("DELETE FROM `display` WHERE `item`='s/$sname'");
|
||||
$conn->query("DELETE FROM `statics` WHERE `id`='$sid'");
|
||||
|
||||
|
||||
header("Refresh: 0");
|
||||
}
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<title><?= $lang["menu"]["statics"]." :: ".$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: 800px" id="login_container">
|
||||
<?php foreach($statics as $s) { ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<form method="post" name="edit_static">
|
||||
<input type="number" name="id" value="<?= $s["id"] ?>" style="display: none" readonly>
|
||||
<input type="text" name="old_name" value="<?= $s["name"] ?>" style="display: none" readonly>
|
||||
<input type="text" name="old_title" value="<?= $s["title"] ?>" style="display: none" readonly>
|
||||
<div class="col-sm-3">
|
||||
<input required type="text" name="name" title="<?= $lang["statics"]["name"] ?>" class="form-control" placeholder="<?= $lang["statics"]["name"] ?>" value="<?= $s["name"] ?>" maxlength="20">
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<input required type="text" name="title" title="<?= $lang["statics"]["title"] ?>" class="form-control" placeholder="<?= $lang["statics"]["title"] ?>" value="<?= $s["title"] ?>" maxlength="20">
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<div class="checkbox">
|
||||
<label title="<?= $lang["statics"]["private"] ?>">
|
||||
<input type="checkbox" name="private" <?php if($s["public"]==false) echo "checked"; ?> value="0"> <?= $lang["statics"]["private"] ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="submit" name="edit_static" class="btn btn-success btn-block"><?= glyph("floppy-disk", $lang["edit_title"]["save"]) ?></button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="col-sm-2">
|
||||
<a href="#" class="btn btn-info btn-block" onclick="window.open('<?= $config["url"] ?>admin/editor?type=static&file=<?= $s["name"] ?>','name','width=1000,height=800')"><?= glyph("pencil",$lang["editor"]["edit"]) ?></a>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<form method="post" name="delete_static">
|
||||
<input type="number" name="id" class="form-control" style="display: none" value="<?= $s["id"] ?>">
|
||||
<input type="text" name="name" class="form-control" style="display: none" value="<?= $s["name"] ?>">
|
||||
<button type="submit" name="delete_static" class="btn btn-danger btn-block" onclick="return confirmDel()"><?= glyph("remove",$lang["editor"]["delete"]) ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-body">
|
||||
<form name="add_static" method="post">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<input required type="text" class="form-control" name="name" placeholder="<?= $lang["statics"]["name"] ?>" maxlength="20">
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<input required type="text" class="form-control" name="title" placeholder="<?= $lang["statics"]["title"] ?>" maxlength="20"><br>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="checkbox">
|
||||
<label onchange="toggleVisibility('crmitem')">
|
||||
<input type="checkbox" name="menu" checked value="1"> <?= $lang["statics"]["menu"] ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="private" value="0"> <?= $lang["statics"]["private"] ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<button type="submit" class="btn btn-success btn-block" name="add_static"><?= glyph("plus", $lang["statics"]["create"]) ?> <?= $lang["statics"]["create"] ?></button><br>
|
||||
</div>
|
||||
<div class="col-sm-4" id="crmitem" style="display: block">
|
||||
<input type="text" name="icon" class="form-control" placeholder="<?= $lang["display"]["icon"] ?>" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function toggleVisibility(item) {
|
||||
var i1 = document.getElementById(item);
|
||||
|
||||
if (i1.style.display == "block") {
|
||||
i1.style.display = "none";
|
||||
} else {
|
||||
i1.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
function confirmDel() {
|
||||
let isExecuted = confirm("<?= $lang["statics"]["delete"] ?>");
|
||||
|
||||
return isExecuted; // OK = true, Cancel = false
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
@ -66,6 +66,11 @@
|
||||
<a href="<?= $config["url"] ?>admin/menu_display"><?= glyph("cog",$lang["menu"]["menu_dis"]) ?> <?= $lang["menu"]["menu_dis"] ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<?php if($user["level"]==1 || $user["level"]==2) { ?>
|
||||
<li class="<?php if($page==$lang["menu"]["statics"]) { echo "active"; } ?>">
|
||||
<a href="<?= $config["url"] ?>admin/statics"><?= glyph("file",$lang["menu"]["statics"]) ?> <?= $lang["menu"]["statics"] ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<li class="<?php if($page==$lang["menu"]["add_new"]) { echo "active"; } ?>">
|
||||
<a href="<?= $config["url"] ?>admin/new_title"><?= glyph("plus-sign",$lang["menu"]["add_new"]) ?> <?= $lang["menu"]["add_new"] ?></a>
|
||||
</li>
|
||||
|
@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$page = $lang["menu"]["about"];
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<title><?= $lang["menu"]["about"]." :: ".$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 include("../../about.html") ?>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
@ -117,9 +117,9 @@ $latest_chapters = $conn->query("SELECT * FROM `chapters` ORDER BY `added` DESC"
|
||||
<thead>
|
||||
<th style="width:5%"><?= $lang["home"]["type"] ?></th>
|
||||
<th style="width:5%"><?= $lang["home"]["chapter"] ?></th>
|
||||
<th style="width:25%;"><?= $lang["home"]["chap_title"] ?></th>
|
||||
<th style="width:25%"><?= $lang["home"]["title"] ?></th>
|
||||
<th class="text-center" style="width:5%"><?= $lang["home"]["group"] ?></th>
|
||||
<th style="width:20%;"><?= $lang["home"]["chap_title"] ?></th>
|
||||
<th style="width:20%"><?= $lang["home"]["title"] ?></th>
|
||||
<th class="text-center" style="width:15%"><?= $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> <!-- IF ON OTHER LANGUAGES THAN ENGLISH, HERE IS AN OVERFLOW ON THE "added" TAB, IDK WHY, IF ANYONE KNOWS HOW TO FIX, PLS DO ON GITHUB.com/saintly2k/FoOlSlideX -->
|
||||
</thead>
|
||||
|
26
render/public/static.req.php
Normal file
26
render/public/static.req.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
require("../../requires.php");
|
||||
|
||||
$static = mysqli_real_escape_string($conn, $_GET["static"]);
|
||||
$s = $conn->query("SELECT * FROM `statics` WHERE `name`='$static' LIMIT 1")->fetch_assoc();
|
||||
|
||||
if($s["public"]==false && (($user["level"]!=1 && $user["level"]!=2) || $user["active"]==false)) {
|
||||
header("Location: ../");
|
||||
}
|
||||
|
||||
$page = "s/".$s["name"];
|
||||
|
||||
include("../parts/header.php");
|
||||
|
||||
?>
|
||||
|
||||
<title><?= $s["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 include("../statics/".$s["name"].".html") ?>
|
||||
|
||||
<?php include("../parts/footer.php"); ?>
|
1
render/statics/typewriters.txt
Normal file
1
render/statics/typewriters.txt
Normal file
@ -0,0 +1 @@
|
||||
Typewriters!
|
89
update.sql
89
update.sql
@ -1,89 +0,0 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 5.1.1
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: 127.0.0.1
|
||||
-- Erstellungszeit: 08. Jul 2022 um 01:45
|
||||
-- Server-Version: 10.4.22-MariaDB
|
||||
-- PHP-Version: 7.4.27
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
START TRANSACTION;
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
--
|
||||
-- Datenbank: `mangareaderx`
|
||||
--
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Tabellenstruktur für Tabelle `display`
|
||||
--
|
||||
|
||||
CREATE TABLE `display` (
|
||||
`id` int(11) NOT NULL,
|
||||
`order` int(11) NOT NULL,
|
||||
`item` varchar(20) NOT NULL,
|
||||
`text` varchar(20) NOT NULL,
|
||||
`icon` varchar(20) NOT NULL,
|
||||
`displayed` tinyint(1) NOT NULL DEFAULT 1,
|
||||
`hidden` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`created` datetime NOT NULL DEFAULT current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
--
|
||||
-- Daten für Tabelle `display`
|
||||
--
|
||||
|
||||
INSERT INTO `display` (`id`, `order`, `item`, `text`, `icon`, `displayed`, `hidden`, `created`) VALUES
|
||||
(1, 1, 'releases', '', 'th-list', 1, 0, '2022-07-08 01:39:51'),
|
||||
(2, 2, 'titles', '', 'book', 1, 0, '2022-07-08 01:39:51'),
|
||||
(3, 3, 'bookmarks', '', 'bookmark', 1, 0, '2022-07-08 01:39:51'),
|
||||
(4, 4, 'groups', '', 'user', 1, 0, '2022-07-08 01:39:51'),
|
||||
(5, 5, 'about', '', 'question-sign', 1, 0, '2022-07-08 01:39:51'),
|
||||
(6, 6, 'blog', '', 'font', 1, 1, '2022-07-08 01:39:51'),
|
||||
(7, 7, 'news', '', 'bullhorn', 0, 1, '2022-07-08 01:39:51');
|
||||
|
||||
--
|
||||
-- Indizes der exportierten Tabellen
|
||||
--
|
||||
|
||||
--
|
||||
-- Indizes für die Tabelle `display`
|
||||
--
|
||||
ALTER TABLE `display`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT für exportierte Tabellen
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT für Tabelle `display`
|
||||
--
|
||||
ALTER TABLE `display`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
|
||||
COMMIT;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
|
||||
|
||||
/* ADDING THE GROUPS TO THE DB */
|
||||
|
||||
ALTER TABLE `chapters` ADD `group1` INT NOT NULL DEFAULT '0' AFTER `user`;
|
||||
ALTER TABLE `chapters` ADD `group2` INT NOT NULL DEFAULT '0' AFTER `group1`;
|
||||
ALTER TABLE `chapters` ADD `group3` INT NOT NULL DEFAULT '0' AFTER `group3`;
|
||||
|
||||
/* ADD BLOG AND NEWS BOOLEAN TO DB */
|
||||
|
||||
ALTER TABLE `config` ADD `blog` BOOLEAN NOT NULL DEFAULT FALSE AFTER `start`;
|
||||
ALTER TABLE `config` ADD `news` BOOLEAN NOT NULL DEFAULT FALSE AFTER `blog`;
|
@ -66,8 +66,29 @@ function bbconvert($text) {
|
||||
return preg_replace($find,$replace,$text);
|
||||
}
|
||||
|
||||
function munch_groups($a, $b, $c) {
|
||||
return "YOLO";
|
||||
function munch_groups($a, $b = "", $c = "", $html = true) {
|
||||
require("../../config.php");
|
||||
require("conn.php");
|
||||
require("user.php");
|
||||
|
||||
$output = "";
|
||||
|
||||
if($a=="0") {
|
||||
$output .= "No Group";
|
||||
} else {
|
||||
$a = $conn->query("SELECT * FROM `groups` WHERE `id`='$a' LIMIT 1")->fetch_assoc();
|
||||
$output .= "<a href='".$config["url"]."group/".$a["slug"]."'>".$a["name"]."</a>";
|
||||
}
|
||||
if(!empty($b)) {
|
||||
$b = $conn->query("SELECT * FROM `groups` WHERE `id`='$b' LIMIT 1")->fetch_assoc();
|
||||
$output .= ", <a href='".$config["url"]."group/".$b["slug"]."'>".$b["name"]."</a>";
|
||||
}
|
||||
if(!empty($c)) {
|
||||
$c = $conn->query("SELECT * FROM `groups` WHERE `id`='$c' LIMIT 1")->fetch_assoc();
|
||||
$output .= ", <a href='".$config["url"]."group/".$c["slug"]."'>".$c["name"]."</a>";
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user