From 1e33bdcf9b7e2dd78e4fab9284281bbce95788e9 Mon Sep 17 00:00:00 2001 From: SiskelDev Date: Thu, 29 May 2025 23:10:56 +0200 Subject: [PATCH] Insertion for Jinxxy added --- admin/insert-jinxxy.php | 139 +++++++++++++++++++++++++++++++++++ admin/redirectFromJinxxy.php | 34 +++++++++ 2 files changed, 173 insertions(+) diff --git a/admin/insert-jinxxy.php b/admin/insert-jinxxy.php index e69de29..5b6bb3f 100644 --- a/admin/insert-jinxxy.php +++ b/admin/insert-jinxxy.php @@ -0,0 +1,139 @@ +query("SELECT * FROM `creator` WHERE `jinxxy_url`=\"" . $creator_jinxxyURL . "\";"); + +if ($creatorResult->num_rows == 0) { + $furatalog->query("INSERT INTO `creator`(`name`, `pb_url`, `jinxxy_url`) VALUES ('" . $creator_name . "','" . $creator_pb . "','" . $creator_jinxxyURL . "')"); + + $creator = $creatorResult->fetch_assoc(); +} else { + $creator = $creatorResult->fetch_assoc(); +} + +$contentResult = $furatalog->query("SELECT * FROM `content` WHERE `url`=\"" . $content_url . "\";"); + +if ($contentResult->num_rows == 0) { + + try { + $furatalog->query("INSERT INTO `content`(`name`, `price`, `rating`, `creator_id`, `currency_id`, `url`, `image`, `nsfw`, `section`) VALUES + ('" . $content_name . "' + ,'" . $content_price . "' + ,'" . $content_rating . "' + ,'" . $creator["id"] . "' + ,'" . $content_currency_id . "' + ,'" . $content_url . "' + ,'" . $content_image . "' + , false + , 1)"); + + + + $parsed_url = parse_url($content_url); + $clean_url = $parsed_url['scheme'] . '://' . $parsed_url['host'] . $parsed_url['path']; + + $contentResult = $furatalog->query("SELECT * FROM content WHERE url LIKE '%" . $clean_url . "%'"); + $contentResultResult = $contentResult->fetch_assoc(); + + + + $species = explode(" ", $_POST["species"]); + + foreach ($species as $key => $value) { + $speciesResult = $furatalog->query("SELECT * FROM species WHERE tag='" . $value . "'"); + $speciesResultResult = $speciesResult->fetch_assoc(); + + $speciesID = $speciesResultResult["id"]; + + $furatalog->query("INSERT INTO `content_species` (`content_id`, `species_id`) VALUES ('" . $contentResultResult["id"] . "', '" . $speciesID . "')"); + } + + + + } catch (Exception $e) { + echo " + + + + + +

An Error has Occurred

+
" . $e . "
+ + "; + $success = false; + } + + if ($success) { + echo " + + + + +

Success

+
The Item with the following name and url has been added.
+ Name: " . $content_name . "
+ + "; + } + + +} + + + + + + + + + + + + + + + + + + + + + + + + +?> \ No newline at end of file diff --git a/admin/redirectFromJinxxy.php b/admin/redirectFromJinxxy.php index 20f4725..64efcc7 100644 --- a/admin/redirectFromJinxxy.php +++ b/admin/redirectFromJinxxy.php @@ -587,6 +587,18 @@ echo '
Currency Code ' . $cur
+
+ query("SELECT * FROM `species`"); + while ($row = $requestSpeciesResult->fetch_assoc()) { + echo " +
"; + } + ?> +



@@ -598,8 +610,30 @@ echo '
Currency Code ' . $cur


+
+ + \ No newline at end of file