mirror of
https://github.com/saintly2k/FoOlSlideX.git
synced 2025-02-20 11:13:13 +08:00
reworked
This commit is contained in:
parent
e86b15118e
commit
7c45bea701
@ -1,41 +0,0 @@
|
||||
<?php
|
||||
|
||||
// Basic Configuration
|
||||
|
||||
$config["name"] = "FoOlSlideX"; // Site name
|
||||
$config["logo"] = "logo.png"; // Logo file (300x50), located in the "img" folder of your theme (default: /assets/themes/RoriconScans/img/logo.png)
|
||||
$config["url"] = "http://localhost/"; // Site URL (WITH slash ending!!, if you're in a folder, add it too)
|
||||
$config["home"] = "home"; // What is the page that shows up, if no page is set?
|
||||
$config["theme"] = "RoriconScans"; // Themes located in /assets/themes/, CASE SENSITIVE!!
|
||||
$config["hero"] = "10"; // How many images should be shown on the home page on the hero slider?
|
||||
$config["chapters"] = "20"; // How many chapters should be shown on the home page right to the hero slider?
|
||||
|
||||
// Items per page shown (for pagination)
|
||||
$perpage["manga"] = "25"; // How many Mangas should be shown on the Manga page per page?
|
||||
$perpage["latest"] = "25"; // How many Chapters should be shown on the Latest page per page?
|
||||
$perpage["list"] = "50"; // How many Chapters should be shown on a Manga entry as chapterlist?
|
||||
|
||||
// Reader Configs
|
||||
$reader["type"] = "strip"; // strip or page WIPPP!!
|
||||
|
||||
// Socials Configs
|
||||
$socials["twitter"] = "https://twitter.com/saintly2k"; // INCLUDE https and leave blank if none
|
||||
$socials["mangadex"] = "https://mangadex.org/group/16890"; // INCLUDE https, leave blank for none
|
||||
$socials["discord"] = "https://discord.gg/gFux2eazGp"; // INCLUDE https, leave blank for none
|
||||
$socials["irc"] = ""; // WIP
|
||||
$socials["facebook"] = "https://facebook.com/saintly2k"; // INCLUDE https, leave blank for none
|
||||
$socials["website"] = "https://weltenwanderer-scans.ovh"; //INCLUDE https, leave blank for none
|
||||
|
||||
// Admin Account Info, edit/add users in
|
||||
// views/pages/users.php
|
||||
|
||||
// Chapter Generation features .:: COMING SOON! ::.
|
||||
$chagen["slug"] = "w"; // WIP
|
||||
|
||||
// DataBase details
|
||||
$based["host"] = "localhost"; // Host for Database
|
||||
$based["user"]= "root"; // User for Database
|
||||
$based["pass"] = "root"; // Password for Database user
|
||||
$based["table"] = "foolslidex"; // Table where you imported "roriconscans.sql"
|
||||
|
||||
?>
|
13
core/db.php
13
core/db.php
@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
require("config.php");
|
||||
|
||||
$conn = new mysqli($based["host"], $based["user"], $based["pass"], $based["table"]);
|
||||
|
||||
// Check connection
|
||||
if ($conn->connect_error) {
|
||||
die("Connection failed. Error: " . $conn->connect_error);
|
||||
}
|
||||
$success = "Connected successfully!";
|
||||
|
||||
?>
|
@ -1,75 +0,0 @@
|
||||
<?php
|
||||
|
||||
function generateURL($length = 5) {
|
||||
$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
|
||||
$charactersLength = strlen($characters);
|
||||
$randomString = '';
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||
}
|
||||
return $randomString;
|
||||
}
|
||||
|
||||
$ranSlug = generateURL(5)."-".generateURL(5)."-".generateURL(5)."-".generateURL(5);
|
||||
|
||||
if(isset($_POST["delete-manga"])) {
|
||||
$manga = mysqli_real_escape_string($conn, $_POST["manga_url"]);
|
||||
|
||||
$query = "DELETE FROM `mangas` WHERE `url`='$manga'";
|
||||
mysqli_query($conn, $query);
|
||||
echo "<script type='text/javascript'> document.location = 'index.php?page=home'; </script>";
|
||||
}
|
||||
|
||||
if(isset($_POST["edit-chapter"])) {
|
||||
$title = mysqli_real_escape_string($conn, $_POST["chapter_title"]);
|
||||
$number = mysqli_real_escape_string($conn, $_POST["chapter_number"]);
|
||||
$manga = mysqli_real_escape_string($conn, $_POST["manga_url"]);
|
||||
$chapter_url = mysqli_real_escape_string($conn, $_POST["chapter_url"]);
|
||||
$mid = mysqli_real_escape_string($conn, $_POST["manga_id"]);
|
||||
$img_directory = mysqli_real_escape_string($conn, $_POST["chapter_directory"]);
|
||||
|
||||
$query = "UPDATE `chapters` SET `title`='$title', `chapter`='$number', `images`='$img_directory' WHERE `manga`='$mid' AND `url`='$chapter_url'";
|
||||
mysqli_query($conn, $query);
|
||||
echo "<script type='text/javascript'> document.location = 'index.php?page=view&manga=$manga'; </script>";
|
||||
}
|
||||
|
||||
if(isset($_POST["add-chapter"])) {
|
||||
$title = mysqli_real_escape_string($conn, $_POST["chapter_title"]);
|
||||
$number = mysqli_real_escape_string($conn, $_POST["chapter_number"]);
|
||||
$manga = mysqli_real_escape_string($conn, $_POST["manga_url"]);
|
||||
$mid = mysqli_real_escape_string($conn, $_POST["manga_id"]);
|
||||
$url = mysqli_real_escape_string($conn, $ranSlug);
|
||||
$img_directory = mysqli_real_escape_string($conn, $_POST["chapter_directory"]);
|
||||
|
||||
$query = "INSERT INTO `chapters`(`manga`, `url`, `title`, `chapter`, `images`) VALUES ('$mid','$url','$title','$number','$img_directory')";
|
||||
mysqli_query($conn, $query);
|
||||
echo "<script type='text/javascript'> document.location = 'index.php?page=view&manga=$manga'; </script>";
|
||||
}
|
||||
|
||||
if(isset($_POST["edit-manga"])) {
|
||||
$cover = mysqli_real_escape_string($conn, $_POST["manga_cover"]);
|
||||
$title = mysqli_real_escape_string($conn, $_POST["manga_title"]);
|
||||
$alternates = mysqli_real_escape_string($conn, $_POST["manga_alternates"]);
|
||||
$scanlating = mysqli_real_escape_string($conn, $_POST["manga_scanlating"]);
|
||||
$url = mysqli_real_escape_string($conn, $_POST["manga_url"]);
|
||||
$description = mysqli_real_escape_string($conn, $_POST["manga_description"]);
|
||||
|
||||
$query = "UPDATE mangas SET `title`='$title', `cover`='$cover', `alternates`='$alternates', `scanlating`='$scanlating', `description`='$description' WHERE url='$url'";
|
||||
mysqli_query($conn, $query);
|
||||
echo "<script type='text/javascript'> document.location = 'index.php?page=view&manga=$url'; </script>";
|
||||
}
|
||||
|
||||
if(isset($_POST["add-manga"])) {
|
||||
$cover = mysqli_real_escape_string($conn, $_POST["manga_cover"]);
|
||||
$title = mysqli_real_escape_string($conn, $_POST["manga_title"]);
|
||||
$alternates = mysqli_real_escape_string($conn, $_POST["manga_alternates"]);
|
||||
$scanlating = mysqli_real_escape_string($conn, $_POST["manga_scanlating"]);
|
||||
$url = mysqli_real_escape_string($conn, $ranSlug);
|
||||
$description = mysqli_real_escape_string($conn, $_POST["manga_description"]);
|
||||
|
||||
$query = "INSERT INTO `mangas`(`title`, `cover`, `alternates`, `scanlating`, `url`, `description`) VALUES ('$title','$cover','$alternates','$scanlating','$url','$description')";
|
||||
mysqli_query($conn, $query);
|
||||
echo "<script type='text/javascript'> document.location = 'index.php?page=view&manga=$url'; </script>";
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user