";
+$o .= $mfelements->printFilterSection($mflib, $actual_link);
+$o .= $mfelements->printAccountSection($mflib);
+$o .= "
";
+
+$o .= $mfelements->printPreviewProductPage();
+
+if (isset($_SESSION["adminmode"]) && $_SESSION["adminmode"] == true) {
+ $o .= $mfelements->printAdminInsertData($mflib);
+}
+
+$o .= $mfelements->printNavbar($mflib);
+
+$o .= $mfelements->printPageContent($mflib, $wishlistArray);
+
+$o .= $mfelements->printNSFWpromt($actual_link);
+
+$o .= $mfelements->printFooter($mflib);
+
+$o .= $mfelements->printJSLoginVar();
+$o .= $mfelements->printScriptSources();
+
+$o .= "";
+
+echo $o;
\ No newline at end of file
diff --git a/avatar-bases/AutoInsertData.php b/avatar-bases/AutoInsertData.php
new file mode 100644
index 0000000..9424a86
--- /dev/null
+++ b/avatar-bases/AutoInsertData.php
@@ -0,0 +1,195 @@
+
+
+
+
+
+loadHTML($string);
+ $finder = new DomXPath($dom);
+
+ $content = $finder->query("//*[contains(concat(' ', normalize-space(@data-component-name), ' '), ' ProductPage ')]")[0]->textContent;
+ $content = json_decode($content);
+ $c = $content->product;
+
+
+ $currency = "{
+ \"usd\": \"$\",
+ \"eur\": \"€\",
+ \"crc\": \"₡\",
+ \"gbp\": \"£\",
+ \"ils\": \"₪\",
+ \"inr\": \"₹\",
+ \"jpy\": \"¥\",
+ \"krw\": \"₩\",
+ \"ngn\": \"₦\",
+ \"php\": \"₱\",
+ \"pln\": \"zł\",
+ \"pyg\": \"₲\",
+ \"thb\": \"฿\",
+ \"uah\": \"₴\",
+ \"vnd\": \"₫\",
+ \"aud\": \"A\$\",
+ \"cad\": \"CAD\$\"
+ }";
+
+ $currency = json_decode($currency);
+ $currencyOutput = $c->currency_code;
+
+ if ($c->thumbnail_url == null) {
+ $thumbnailURL = $c->covers[0]->url;
+ } else $thumbnailURL = $c->thumbnail_url;
+
+ $rating = $finder->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' rating-average ')]")[0]->textContent;
+
+ if ($rating == null || $rating == "" || $rating == " ") $rating = "None";
+
+ $conn = new mysqli($servername, $username, $password, $dbname);
+
+ if ($conn->connect_error) {
+ $failed = true;
+ }
+
+ $c->name = str_replace("'","\'",str_replace("`","\`",str_replace('"','\"',$c->name)));
+ $c->seller->name = str_replace("'","\'",str_replace("`","\`",str_replace('"','\"',$c->seller->name)));
+ $species = str_replace("'","\'",str_replace("`","\`",str_replace('"','\"',$species)));
+
+
+ $sql2 = "SELECT * FROM `content` WHERE
+ name LIKE \"%" . $c->name . "%\" AND
+ url_link LIKE \"%" . $url . "%\" AND
+ url_image LIKE \"%" . $thumbnailURL . "%\" AND
+ creator LIKE \"%" . $c->seller->name . "%\";";
+
+ $result2 = $conn->query($sql2);
+
+ if ($result2->num_rows > 0) {
+ $isExisting = true;
+ } else {
+ $isExisting = false;
+ }
+
+ $sql = "INSERT INTO content (
+ `name`,
+ `price`,
+ `currency`,
+ `url_link`,
+ `url_image`,
+ `creator`,
+ `rating`,
+ `species`,
+ `nsfw`,
+ `section`
+ )
+ VALUES (
+ '" . $c->name . "',
+ '" . $c->price_cents . "',
+ '" . $currency->$currencyOutput . "',
+ '" . $url . "',
+ '" . $thumbnailURL . "',
+ '" . $c->seller->name . "',
+ '" . $rating . "',
+ '" . $species . "',
+ '" . $nsfw . "',
+ 3
+ )";
+ if ($isExisting == false) {
+ if ($conn->query($sql) === TRUE) {
+ echo "";
+$o .= $mfelements->printFilterSection($mflib, $actual_link);
+$o .= $mfelements->printAccountSection($mflib);
+$o .= "
";
+
+$o .= $mfelements->printPreviewProductPage();
+
+if (isset($_SESSION["adminmode"]) && $_SESSION["adminmode"] == true) {
+ $o .= $mfelements->printAdminInsertData($mflib);
+}
+
+$o .= $mfelements->printNavbar($mflib);
+
+$o .= $mfelements->printPageContent($mflib, $wishlistArray);
+
+$o .= $mfelements->printNSFWpromt($actual_link);
+
+$o .= $mfelements->printFooter($mflib);
+
+$o .= $mfelements->printJSLoginVar();
+$o .= $mfelements->printScriptSources();
+
+$o .= "";
+
+echo $o;
\ No newline at end of file
diff --git a/avatars/AutoInsertData.php b/avatars/AutoInsertData.php
new file mode 100644
index 0000000..22e794e
--- /dev/null
+++ b/avatars/AutoInsertData.php
@@ -0,0 +1,196 @@
+
+
+
+
+
+loadHTML($string);
+ $finder = new DomXPath($dom);
+
+ $content = $finder->query("//*[contains(concat(' ', normalize-space(@data-component-name), ' '), ' ProductPage ')]")[0]->textContent;
+ $content = json_decode($content);
+ $c = $content->product;
+
+
+ $currency = "{
+ \"usd\": \"$\",
+ \"eur\": \"€\",
+ \"crc\": \"₡\",
+ \"gbp\": \"£\",
+ \"ils\": \"₪\",
+ \"inr\": \"₹\",
+ \"jpy\": \"¥\",
+ \"krw\": \"₩\",
+ \"ngn\": \"₦\",
+ \"php\": \"₱\",
+ \"pln\": \"zł\",
+ \"pyg\": \"₲\",
+ \"thb\": \"฿\",
+ \"uah\": \"₴\",
+ \"vnd\": \"₫\",
+ \"aud\": \"A\$\",
+ \"cad\": \"CAD\$\"
+ }";
+
+ $currency = json_decode($currency);
+ $currencyOutput = $c->currency_code;
+
+ if ($c->thumbnail_url == null) {
+ $thumbnailURL = $c->covers[0]->url;
+ } else $thumbnailURL = $c->thumbnail_url;
+
+ $rating = $finder->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' rating-average ')]")[0]->textContent;
+
+ if ($rating == null || $rating == "" || $rating == " ") $rating = "None";
+
+ $conn = new mysqli($servername, $username, $password, $dbname);
+
+ if ($conn->connect_error) {
+ $failed = true;
+ }
+
+ $c->name = str_replace("'","\'",str_replace("`","\`",str_replace('"','\"',$c->name)));
+ $c->seller->name = str_replace("'","\'",str_replace("`","\`",str_replace('"','\"',$c->seller->name)));
+ $species = str_replace("'","\'",str_replace("`","\`",str_replace('"','\"',$species)));
+
+
+ $sql2 = "SELECT * FROM `content` WHERE
+ name LIKE \"%" . $c->name . "%\" AND
+ url_link LIKE \"%" . $url . "%\" AND
+ url_image LIKE \"%" . $thumbnailURL . "%\" AND
+ creator LIKE \"%" . $c->seller->name . "%\";";
+
+ $result2 = $conn->query($sql2);
+
+ if ($result2->num_rows > 0) {
+ $isExisting = true;
+ } else {
+ $isExisting = false;
+ }
+
+ $sql = "INSERT INTO content (
+ `name`,
+ `price`,
+ `currency`,
+ `url_link`,
+ `url_image`,
+ `creator`,
+ `rating`,
+ `species`,
+ `nsfw`,
+ `section`
+ )
+ VALUES (
+ '" . $c->name . "',
+ '" . $c->price_cents . "',
+ '" . $currency->$currencyOutput . "',
+ '" . $url . "',
+ '" . $thumbnailURL . "',
+ '" . $c->seller->name . "',
+ '" . $rating . "',
+ '" . $species . "',
+ '" . $nsfw . "',
+ 2
+ )";
+ if ($isExisting == false) {
+ if ($conn->query($sql) === TRUE) {
+ echo "";
+$o .= $mfelements->printFilterSection2($mflib, $actual_link);
+$o .= $mfelements->printAccountSection($mflib);
+$o .= "
";
+
+$o .= $mfelements->printPreviewProductPage();
+
+if (isset($_SESSION["adminmode"]) && $_SESSION["adminmode"] == true) {
+ $o .= $mfelements->printAdminInsertData($mflib);
+}
+
+$o .= $mfelements->printNavbar($mflib);
+
+$o .= $mfelements->printPageContent($mflib, $wishlistArray);
+
+$o .= $mfelements->printNSFWpromt($actual_link);
+
+$o .= $mfelements->printFooter($mflib);
+
+$o .= $mfelements->printJSLoginVar();
+$o .= $mfelements->printScriptSources();
+
+$o .= "";
+
+echo $o;
\ No newline at end of file
diff --git a/da.html b/da.html
new file mode 100644
index 0000000..b9feb47
--- /dev/null
+++ b/da.html
@@ -0,0 +1,32 @@
+
+
+
+ ";
+ } else {
+ $tmp .= "
";
+
+ return $tmp;
+ }
+
+ function printFooter($mflib) {
+ $tmp = "
+ ";
+
+ return $tmp;
+ }
+
+ function printJSLoginVar() {
+ $tmp = "";
+
+ if(isset($_SESSION["uuid"]) && $_SESSION["uuid"] != "") {
+ $tmp .= "";
+ } else {
+ $tmp .= "";
+ }
+
+ return $tmp;
+ }
+
+ function printScriptSources() {
+ return "
+
+
+
+
+
+
+
+
+
+ ";
+ }
+}
diff --git a/error/400.html b/error/400.html
new file mode 100644
index 0000000..7805e0c
--- /dev/null
+++ b/error/400.html
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+
diff --git a/error/401.html b/error/401.html
new file mode 100644
index 0000000..a05fcd0
--- /dev/null
+++ b/error/401.html
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+
diff --git a/error/403.html b/error/403.html
new file mode 100644
index 0000000..3988947
--- /dev/null
+++ b/error/403.html
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+
diff --git a/error/404.html b/error/404.html
new file mode 100644
index 0000000..da81be6
--- /dev/null
+++ b/error/404.html
@@ -0,0 +1,434 @@
+
+
Seite Nicht Gefunden | MFGames.de
+
+
+
+
+
+
diff --git a/error/405.html b/error/405.html
new file mode 100644
index 0000000..ca5df21
--- /dev/null
+++ b/error/405.html
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+
diff --git a/error/500.html b/error/500.html
new file mode 100644
index 0000000..d8ced14
--- /dev/null
+++ b/error/500.html
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+
500
+
error
+
Server Arbeiten:
+
Wir arbeiten momentan an den Servern und beheben ein paar Probleme.
+
Neuladen
+
Zur Startseite
+
+
+
+
+
+
diff --git a/getFav.php b/getFav.php
new file mode 100644
index 0000000..44eb471
--- /dev/null
+++ b/getFav.php
@@ -0,0 +1,47 @@
+limitperpage = 15;
+
+$mflib->setCookie();
+session_start();
+
+$mflib->initialize();
+
+if (isset($_SESSION["uuid"]) && $_SESSION["uuid"] != "") {
+ if ($mflib->dataGetWishlist() != null) {
+ echo "
+
+ | Item Name |
+ Price |
+ Creator |
+ Rating |
+ Edit |
+
";
+
+ foreach ($mflib->dataGetWishlist() as $row) {
+ if (strlen($row["name"]) >= 40) {
+ $NAME = substr(substr($row["name"], 0, 40), 0, strrpos(substr($row["name"], 0, 40), ' ')) . " ...";
+ } else $NAME = $row["name"];
+
+ if (!isset($row["rating"])) {
+ $row["rating"] = "None";
+ }
+
+ echo "
+
+ | " . $NAME . " |
+ " . $row["currency"] . "" . str_replace(".00", "", sprintf ("%.2f", $row["price"])) . " |
+ " . $row["creator"] . " |
+ " . $row["rating"] . " |
+ Delete |
+
";
+ }
+ } else {
+ echo "
You have nothing currently in your Wishlist
";
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/getFavArray.php b/getFavArray.php
new file mode 100644
index 0000000..bed2333
--- /dev/null
+++ b/getFavArray.php
@@ -0,0 +1,16 @@
+limitperpage = 15;
+
+$mflib->setCookie();
+session_start();
+
+$mflib->initialize();
+
+$wishlistArray = $mflib->dataGetWishlist();
+
+print_r(json_encode($wishlistArray));
+
+?>
\ No newline at end of file
diff --git a/getGumroadData.php b/getGumroadData.php
new file mode 100644
index 0000000..be5a385
--- /dev/null
+++ b/getGumroadData.php
@@ -0,0 +1,77 @@
+loadHTML($string);
+ $finder = new DomXPath($dom);
+
+ $this->jsonData = $finder->query("//*[contains(concat(' ', normalize-space(@data-component-name), ' '), ' ProductPage ')]")[0]->textContent;
+ } elseif (str_contains($url, 'booth.pm/')) {
+
+ $string = file_get_contents($url);
+
+ $dom = new DomDocument();
+ $dom->loadHTML($string);
+ $finder = new DomXPath($dom);
+
+ $tmp = $finder->query("//*[contains(concat(' ', normalize-space(@type), ' '), ' application/ld+json ')]")[0]->textContent;
+
+ $tmp = json_decode($tmp);
+
+ $boothArray = array('product' => array('name' => $tmp->name,
+ 'description_html' => str_replace("\n", "
", $tmp->description) . "
",
+ 'long_url' => $tmp->url,
+ 'price_cents' => str_replace("¥ ", "", str_replace(",", "", $finder->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' variation-price u-text-right ')]")[0]->textContent)) * 100,
+ 'currency_code' => $tmp->offers->priceCurrency,
+ 'rating_counts' => array(0,0,0,0,0),
+ 'covers' => array(
+ array('url' => $tmp->image, 'filetype' => "png", 'type' => "image"),
+ array('url' => $tmp->image, 'filetype' => "png", 'type' => "image")
+ ),
+ 'seller' => array(
+ 'name' => $finder->query("//*[contains(concat(' ', normalize-space(@data-product-list), ' '), ' from market_show via market_item_detail to shop_index ')]")[0]->textContent,
+ 'avatar_url' => str_replace("48x48", "128x128", $finder->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' h-[24px] rounded-oval w-[24px] ')]")[0]->attributes[2]->value)
+ )
+ ));
+
+ $this->jsonData = json_encode($boothArray);
+ //echo $tmp;
+
+ }
+
+ }
+
+ function getURL($id) {
+ $servername = "localhost";
+ $username = "database_access";
+ $password = "DataAccess1.";
+ $dbname = "avali_shop";
+
+ $conn = new mysqli($servername, $username, $password, $dbname);
+
+ if ($conn->connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+ }
+
+ $sql = "SELECT * FROM content WHERE id=\"" . $id . "\"";
+ $result = $conn->query($sql);
+ $row = $result->fetch_assoc();
+ $this->setURL = str_replace("?layout=profile","", $row["url_link"]);
+ }
+}
+
+$thisGumroad = new getGumroadData();
+$thisGumroad->getURL($_POST["id"]);
+
+//$thisGumroad->getURL("173");
+
+$thisGumroad->load($thisGumroad->setURL);
+print_r($thisGumroad->jsonData);
\ No newline at end of file
diff --git a/getMoreContent.php b/getMoreContent.php
new file mode 100644
index 0000000..fd4fa16
--- /dev/null
+++ b/getMoreContent.php
@@ -0,0 +1,80 @@
+initializeDB();
+$mflib->limitperpage = 15;
+
+$_GET["p"] = $_POST["p"];
+
+foreach ($mflib->dataGetPageContent() as $row) {
+ $tmp .= "
";
+
+ if (isset($_SESSION["nsfwblur"]) && $_SESSION["nsfwblur"] == true) {
+ if (isset($row["nsfw"]) && $row["nsfw"] == 1)
+ $tmp .= "
+
+ ";
+ }
+
+ if (strlen($row["name"]) >= 40) {
+ $NAME = substr(substr($row["name"], 0, 40), 0, strrpos(substr($row["name"], 0, 40), ' ')) . " ...";
+ } else $NAME = $row["name"];
+
+ $tmp .= "
+
+
+ ";
+
+ if (!$mflib->isItMobile)
+ $tmp .= "
+ Preview
+ ";
+
+ if (isset($_SESSION["uuid"]) && $_SESSION["uuid"] != null) {
+ $liked = false;
+
+ foreach ($wishlistArray as $k) {
+ if ($row["id"] == $k["id"]) {
+ $liked = true;
+ }
+ }
+
+ if ($liked) {
+ $tmp .= "
favorite";
+ } else {
+ $tmp .= "
favorite_border";
+ }
+ }
+
+ if (!isset($row["rating"])) {
+ $row["rating"] = "None";
+ }
+
+ $tmp .= "
+
+
+
+
+ ";
+}
+
+echo $tmp;
\ No newline at end of file
diff --git a/html.code-workspace b/html.code-workspace
new file mode 100644
index 0000000..49cebc5
--- /dev/null
+++ b/html.code-workspace
@@ -0,0 +1,20 @@
+{
+ "folders": [
+ {
+ "path": "/var/www/html"
+ },
+ {
+ "path": "/var/www/dev.siskeldev"
+ },
+ {
+ "path": "../nerdnation"
+ },
+ {
+ "path": "../devilpatt"
+ },
+ {
+ "path": "../../../home/siskeldev"
+ }
+ ],
+ "settings": {}
+}
\ No newline at end of file
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..c519b05
--- /dev/null
+++ b/index.php
@@ -0,0 +1,127 @@
+getLink();
+
+$mflib->limitperpage = 15;
+
+$mflib->setCookie();
+session_start();
+$mflib->initialize();
+
+$wishlistArray = $mflib->dataGetWishlist();
+
+if (!isset($_GET["p"])) $_GET["p"] = 1;
+
+$o .= "";
+$o .= $mfelements->printHead($wishlistArray);
+
+$o .= "";
+$o .= $mfelements->printSiteHeader();
+
+$o .= '
+
';
+
+$o .= $mfelements->printNSFWpromt($actual_link);
+
+$o .= $mfelements->printJSLoginVar();
+$o .= $mfelements->printScriptSources();
+
+$o .= "";
+
+
+if ($maintenance) {
+ echo "";
+} else {
+ echo $o;
+ die();
+}
+?>
+
+
+
+
+
+
+
Maintenance - MFGames.net
+
+
+
+
+
MFGames.net
+
Currently Under Construction
+
+
+
+
+
+
diff --git a/lib.php b/lib.php
new file mode 100644
index 0000000..655238c
--- /dev/null
+++ b/lib.php
@@ -0,0 +1,465 @@
+ Filter löschen button
+
+class MFLib {
+ // Public Variables to be accessed though Class Initialisation in Variable
+ public $searchQuery = ""; // string: What has been searched; Public Access
+ public $limitperpage = 15; // int: Default -> 15; Can be overridden
+ public $current_species; // string: Current Filtered Species (Get Through Database);
+ public $current_speciesShort; // string: Shorted version of current Filtered Species (Get Through Database); Public Access
+ public $currentSection = 0;
+
+ public $isItMobile = true;
+
+
+ // Private Variables for Class only
+ private $dbConn; // object: Database Object to interact with while Class is Accessed through function; not for Public access
+ private $limitbegin; // string: Will be set through current pagenumber; Database knows through this where to start the current Search; no for Public access
+ private $nsfwfilter;
+ private $nsfwfilter2;
+ private $totalpages;
+ private $lastpage;
+ private $ifsearch; // string: While a SearchQuery is present it will contain a specific part for the Redirection URL at Footer Page Navigation; not for Public access
+ private $query_over_species;
+ private $PageContent;
+
+
+ // Main Functions
+ function initialize() {
+ $this->initializeDB();
+
+ $this->isMobile();
+
+ $this->setCookie();
+
+ $this->doNSFW($this->getLink(), $this->getSection());
+ $this->doNSFWBlur($this->getLink());
+ $this->doSearch();
+ $this->doLastPage();
+
+ $this->setBeginn();
+ $this->setCurrentSpecies();
+ $this->setCurrentTotalPages();
+
+ $this->setErrorHandlerFunc();
+ }
+
+ function getSection() {
+ $section = 0;
+
+ if (str_contains($_SERVER['REQUEST_URI'], 'avatar-bases')) {
+ $section = 3;
+ } else if (str_contains($_SERVER['REQUEST_URI'], 'avatar-assets')) {
+ $section = 1;
+ } else if (str_contains($_SERVER['REQUEST_URI'], 'avatars')) {
+ $section = 2;
+ } else if (str_contains($_SERVER['REQUEST_URI'], 'worlds')) {
+ $section = 4;
+ }
+
+ $this->currentSection = $section;
+ return $section;
+ }
+
+ function getLink() {
+ return (empty($_SERVER['HTTPS']) ? 'http' : 'https') . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
+ }
+
+ function isMobile() {
+ $useragent = $_SERVER['HTTP_USER_AGENT'];
+
+ if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)||preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i',$useragent)) {
+ $this->isItMobile = true;
+ } else {
+ $this->isItMobile = false;
+ }
+ return $this->isItMobile;
+ }
+
+ // Override Section
+ function doNSFW($link, $section) {
+ if (isset($_GET["nsfw"])) {
+ if ($_GET["nsfw"] == "true") {
+ $_SESSION["nsfw"] = true;
+ $_SESSION["promtshown"] = true;
+ $_SESSION["nsfwblur"] = true;
+ $link = str_replace("&nsfw=true", "", str_replace("?nsfw=true&", "?", str_replace("?nsfw=true", "", $link)));
+ header("Location: " . $link);
+ die();
+ }
+
+ if ($_GET["nsfw"] == "false") {
+ $_SESSION["nsfw"] = false;
+ $_SESSION["promtshown"] = true;
+ $_SESSION["nsfwblur"] = true;
+ $link = str_replace("&nsfw=false", "", str_replace("?nsfw=false&", "?", str_replace("?nsfw=false", "", $link)));
+ header("Location: " . $link);
+ die();
+ }
+ }
+
+ if (isset($_SESSION["nsfw"]) && $_SESSION["nsfw"] == true) {
+ $this->nsfwfilter = "AND section=" . $section;
+ $this->nsfwfilter2 = "WHERE section=" . $section;
+ } else {
+ $this->nsfwfilter = "AND section=" . $section . " AND nsfw='0'";
+ $this->nsfwfilter2 = "WHERE section=" . $section . " AND nsfw='0'";
+ }
+ }
+
+ function doNSFWBlur($link) {
+ if (isset($_GET["nsfwblur"])) {
+ if ($_GET["nsfwblur"] == "true") {
+ $_SESSION["nsfwblur"] = true;
+ $link = str_replace("&nsfwblur=true", "", str_replace("?nsfwblur=true&", "?", str_replace("?nsfwblur=true", "", $link)));
+ header("Location: " . $link);
+ } else {
+ $_SESSION["nsfwblur"] = false;
+ $link = str_replace("&nsfwblur=false", "", str_replace("?nsfwblur=false&", "?", str_replace("?nsfwblur=false", "", $link)));
+ header("Location: " . $link);
+ }
+ }
+ }
+
+ function doSearch() {
+ if (isset($_GET["s"])) {
+ $this->searchQuery = str_replace("'", "\'", str_replace("`", "\`", str_replace('"', '\"', $_GET["s"])));
+ }
+
+ if (isset($_GET["s"])) {
+ $this->ifsearch = "&s=" . $_GET["s"];
+ } else $this->ifsearch = "";
+ }
+
+ function doLastPage() {
+ if (isset($_GET["p"])) {
+ $this->lastpage = $_GET["p"];
+ } else $this->lastpage = 1;
+ }
+
+ function setBeginn() {
+ if (isset($_GET["p"])) {
+ $this->limitbegin = ($_GET["p"] - 1) * $this->limitperpage;
+ } else {
+ $_GET["p"] = 1;
+ $this->limitbegin = 0;
+ }
+ }
+
+ function setCurrentSpecies() {
+ if (isset($_GET["t"])) {
+ $sql = "SELECT * FROM species WHERE `shorted`=\"" . $_GET["t"] . "\" ORDER BY id ASC";
+
+ $result = $this->dbConn->query($sql);
+ $current_type = $result->fetch_assoc();
+
+ if ($current_type["species"] == "( - Props - )") $current_type["species"] = "Props";
+
+ $this->current_species = $current_type["species"];
+ $this->current_speciesShort = $current_type["shorted"];
+
+ $this->current_species = str_replace("'","\'",str_replace("`","\`",str_replace('"','\"',$this->current_species)));
+ }
+ }
+
+ function setCookie() {
+ $maxlifetime = 86400;
+ $secure = true;
+ $httponly = true;
+ $samesite = 'lax';
+ session_set_cookie_params([
+ 'lifetime' => $maxlifetime,
+ 'path' => '/',
+ 'domain' => $_SERVER['HTTP_HOST'],
+ 'secure' => $secure,
+ 'httponly' => $httponly,
+ 'samesite' => $samesite
+ ]);
+ }
+
+ function setCurrentTotalPages() {
+ $SEARCH = $this->searchQuery;
+
+ if (isset($_GET["sort"]) && $_GET["sort"] == "free") {
+ $PRICE = "price=0";
+ } else {
+ $PRICE = "price IS NOT NULL";
+ }
+
+ // Setting the NSFW Filter for the Content
+ if (isset($_SESSION["nsfw"]) && $_SESSION["nsfw"] == true) {
+ $NSFW = "nsfw IS NOT NULL"; // Disable NSFW Filter
+ } else {
+ $NSFW = "nsfw=0"; // Enable NSFW Filter
+ }
+
+ $SECTION = "section=" . $this->currentSection;
+
+ if ($SEARCH != "") {
+ $NAME_SEARCH = "name LIKE '%" . $SEARCH . "%'";
+ $CREATOR_SEARCH = "creator LIKE '%" . $SEARCH . "%'";
+ $SPECIES_SEARCH = "species LIKE '%" . $SEARCH . "%'";
+ } else {
+ $NAME_SEARCH = "name IS NOT NULL";
+ $CREATOR_SEARCH = "creator IS NOT NULL";
+ $SPECIES_SEARCH = "species IS NOT NULL";
+ }
+
+ $sql = "SELECT count(*) as total from content WHERE
+ " . $PRICE . " AND " . $NAME_SEARCH . " AND " . $SECTION . " AND " . $NSFW . "
+ OR " . $PRICE . " AND " . $CREATOR_SEARCH . " AND " . $SECTION . " AND " . $NSFW . "
+ OR " . $PRICE . " AND " . $SPECIES_SEARCH . " AND " . $SECTION . " AND " . $NSFW . ";";
+
+ $this->totalpages = ceil($this->setQuery($sql)[0]['total'] / $this->limitperpage);
+ }
+
+ function setErrorHandlerFunc() {
+ // A user-defined error handler function
+ function myErrorHandler($errno, $errstr, $errfile, $errline) {
+ echo "
Custom error: [$errno] $errstr
";
+ echo " Error on line $errline in $errfile
";
+ }
+
+ // Set user-defined error handler function
+ set_error_handler("myErrorHandler");
+ }
+
+ function getErrorPage($page) {
+ $htmlFile = file_get_contents("/var/www/error/" . $page . ".html");
+ return $htmlFile;
+ }
+
+ // Database Initialisation
+ function initializeDB() {
+ $servername = "localhost";
+ $username = "database_access";
+ $password = "DataAccess1.";
+ $dbname = "avali_shop";
+
+ try {
+ $this->dbConn = new mysqli($servername, $username, $password, $dbname);
+ $this->testDB();
+ } catch (Exception $e) {
+ echo $this->getErrorPage(500);
+ die();
+ }
+ }
+
+ function testDB() {
+ if ($this->dbConn->connect_error) {
+ die("Connection failed: " . $this->dbConn->connect_error);
+ }
+ }
+
+ function setQuery($sql) {
+ $query = $this->dbConn->query($sql);
+ $array = array();
+ if ($query->num_rows > 0) {
+ while ($row = $query->fetch_assoc()) {
+ $temparray = array();
+ foreach ($row as $element) {
+ $key = array_search ($element, $row);
+
+ $temparray = $temparray + array($key => $element);
+ }
+ array_push($array, $temparray);
+ }
+ }
+ return $array;
+ }
+
+ // Get Database Data
+ function dataGetOverSpecies() {
+ return $this->setQuery("SELECT * FROM over_species");
+ }
+
+ function dataGetOtherSpecies() {
+ return $this->setQuery("SELECT * FROM species WHERE a_tag=\"\"");
+ }
+
+ function dataGetSpecies($tag) {
+ return $this->setQuery("SELECT * FROM species WHERE a_tag=\"" . $tag . "\" ORDER BY species ASC");
+ }
+
+ function dataGetAllSpecies() {
+ return $this->setQuery("SELECT * FROM species");
+ }
+
+ function dataGetPageContent() {
+ $SEARCH = $this->searchQuery;
+
+ $LIMIT = "LIMIT " . $this->limitbegin . ", " . $this->limitperpage;
+
+ if (isset($_GET["sort"]) && $_GET["sort"] == "free") {
+ $PRICE = "price=0";
+ } else {
+ $PRICE = "price IS NOT NULL";
+ }
+
+ if (isset($_GET["sort"]) && $_GET["sort"] == "priceup") {
+ $ORDER = "ORDER BY price ASC"; // Sort by Lowest to Highes Price
+ } else if (isset($_GET["sort"]) && $_GET["sort"] == "pricedown") {
+ $ORDER = "ORDER BY price DESC"; // Sort by Highes to Lowest Price
+ } else {
+ $ORDER = "ORDER BY id DESC"; // Sort by Recently Added
+ }
+
+ // Setting the NSFW Filter for the Content
+ if (isset($_SESSION["nsfw"]) && $_SESSION["nsfw"] == true) {
+ $NSFW = "nsfw IS NOT NULL"; // Disable NSFW Filter
+ } else {
+ $NSFW = "nsfw=0"; // Enable NSFW Filter
+ }
+
+ $SECTION = "section=" . $this->currentSection;
+
+ if ($SEARCH != "") {
+ $NAME_SEARCH = "name LIKE '%" . $SEARCH . "%'";
+ $CREATOR_SEARCH = "creator LIKE '%" . $SEARCH . "%'";
+ $SPECIES_SEARCH = "species LIKE '%" . $SEARCH . "%'";
+
+ $SPECIES_TYPE = "";
+ } else {
+ $NAME_SEARCH = "name IS NOT NULL";
+ $CREATOR_SEARCH = "creator IS NOT NULL";
+ $SPECIES_SEARCH = "species IS NOT NULL";
+
+ $SPECIES_TYPE = "species";
+ }
+
+ if (isset($_GET["t"])) {
+ $TYPE = "AND species LIKE \"%" . $this->current_species . "%\"";
+ } else {
+ $TYPE = "";
+ }
+
+ $sql = "SELECT * from content WHERE
+ " . $PRICE . " AND " . $NAME_SEARCH . " AND " . $SECTION . " " . $TYPE . " AND " . $NSFW . "
+ OR " . $PRICE . " AND " . $CREATOR_SEARCH . " AND " . $SECTION . " " . $TYPE . " AND " . $NSFW . "
+ OR " . $PRICE . " AND " . $SPECIES_SEARCH . " AND " . $SECTION . " " . $TYPE . " AND " . $NSFW . "
+
+ " . $ORDER . " " . $LIMIT . ";";
+
+ $return = $this->setQuery($sql);
+ $this->PageContent = $return;
+ return $return;
+ }
+
+ function dataGetWishlist() {
+ if (isset($_SESSION["uuid"])) {
+ $wishArray = json_decode($this->setQuery("SELECT * FROM wishlist_uuid WHERE uuid=\"" . $_SESSION["uuid"] . "\"")[0]["array"]);
+ } else $wishArray = null;
+ $descWishArray = array();
+
+ $returnArray = array();
+
+ if ($wishArray != null) {
+ for($x = 0; $x < count($wishArray); $x++) {
+ $descWishArray[] = $wishArray[count($wishArray) - 1 - $x];
+ }
+ } else {
+ return null;
+ }
+
+ if ($descWishArray != null) {
+ foreach ($descWishArray as $wish) {
+ $returnArray[] = $this->setQuery("SELECT * FROM content WHERE id=\"" . $wish . "\"")[0];
+ }
+ }
+
+
+ return $returnArray;
+ }
+
+ // Print Footer
+ function footerBackArrow() {
+ $tmp = "";
+
+ $hrefbuilder = "?p=" . ($this->lastpage - 1);
+ if (isset($_GET["t"]) && $_GET["t"] != "") $hrefbuilder .= "&t=" . $this->current_speciesShort . "";
+ if (isset($_GET["s"]) && $_GET["s"] != "") $hrefbuilder .= "&s=" . $_GET["s"];
+ if (isset($_GET["sort"]) && $_GET["sort"] != "") $hrefbuilder .= "&sort=" . $_GET["sort"];
+
+ if (isset($_GET["p"]) && $this->lastpage != 1) {
+ $tmp = "
‹";
+ }
+
+ return $tmp;
+ }
+
+ function footerForwardArrow() {
+ $tmp = "";
+
+ $hrefbuilder = "?p=" . ($this->lastpage + 1);
+ if (isset($_GET["t"]) && $_GET["t"] != "") $hrefbuilder .= "&t=" . $this->current_speciesShort . "";
+ if (isset($_GET["s"]) && $_GET["s"] != "") $hrefbuilder .= "&s=" . $_GET["s"];
+ if (isset($_GET["sort"]) && $_GET["sort"] != "") $hrefbuilder .= "&sort=" . $_GET["sort"];
+
+ if ($this->lastpage != $this->totalpages && $this->totalpages != 0) {
+ $tmp = "
›";
+ }
+
+ return $tmp;
+ }
+
+ function footerBackDots() {
+ $tmp = "";
+
+ $hrefbuilder = "?p=1";
+ if (isset($_GET["t"]) && $_GET["t"] != "") $hrefbuilder .= "&t=" . $this->current_speciesShort . "";
+ if (isset($_GET["s"]) && $_GET["s"] != "") $hrefbuilder .= "&s=" . $_GET["s"];
+ if (isset($_GET["sort"]) && $_GET["sort"] != "") $hrefbuilder .= "&sort=" . $_GET["sort"];
+
+ if (1 != $this->lastpage && 1 < $this->lastpage && 1 < $this->lastpage + 1 && 2 != $this->lastpage) {
+ $tmp = "
1";
+ if (3 != $this->lastpage) {
+ $tmp = $tmp . "
…";
+ }
+ }
+
+ return $tmp;
+ }
+
+ function footerForwardDots() {
+ $tmp = "";
+
+ $hrefbuilder = "?p=" . $this->totalpages;
+ if (isset($_GET["t"]) && $_GET["t"] != "") $hrefbuilder .= "&t=" . $this->current_speciesShort . "";
+ if (isset($_GET["s"]) && $_GET["s"] != "") $hrefbuilder .= "&s=" . $_GET["s"];
+ if (isset($_GET["sort"]) && $_GET["sort"] != "") $hrefbuilder .= "&sort=" . $_GET["sort"];
+
+ if ($this->totalpages != $this->lastpage && $this->totalpages > $this->lastpage && $this->totalpages > $this->lastpage + 1) {
+ if ($this->totalpages - 1 > $this->lastpage + 1) {
+ $tmp = $tmp . "
…";
+ }
+ $tmp = $tmp . "
" . $this->totalpages . "";
+ }
+
+ return $tmp;
+ }
+
+ function footerPages() {
+ $tmp = " ";
+
+ for ($x = 0; $x < $this->totalpages; $x++) {
+
+ if ($_GET["p"] == $x + 1) {
+ $temp = "style=\"color: white;\"";
+ } else {
+ $temp = "";
+ }
+
+ $hrefbuilder = "?p=" . ($x + 1);
+ if (isset($_GET["t"]) && $_GET["t"] != "") $hrefbuilder .= "&t=" . $this->current_speciesShort . "";
+ if (isset($_GET["s"]) && $_GET["s"] != "") $hrefbuilder .= "&s=" . $_GET["s"];
+ if (isset($_GET["sort"]) && $_GET["sort"] != "") $hrefbuilder .= "&sort=" . $_GET["sort"];
+
+ if ($x + 1 == $_GET["p"] - 1 || $x + 1 == $_GET["p"] || $x + 1 == $_GET["p"] + 1) {
+ $tmp = $tmp . "
" . ($x + 1) . "";
+ }
+ }
+
+ return $tmp;
+ }
+}
diff --git a/login.php b/login.php
new file mode 100644
index 0000000..4625361
--- /dev/null
+++ b/login.php
@@ -0,0 +1,28 @@
+aa
+
+connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+ }
+
+ $sql_test = "SELECT * FROM wishlist_uuid WHERE uuid=\"" . $_POST["uuid"] . "\"";
+ $result_test = $conn->query($sql_test);
+ if ($result_test->num_rows > 0) {
+ $row = $result_test->fetch_assoc();
+ if ($row["uuid"] == (string)$_POST["uuid"]) {
+ $_SESSION["uuid"] = (string)$_POST["uuid"];
+ }
+ }
+
+ header("Location:javascript://history.go(-2);");
+ header("Location: https://mfgames.net/#acc");
+?>
\ No newline at end of file
diff --git a/logout.php b/logout.php
new file mode 100644
index 0000000..f66cbaf
--- /dev/null
+++ b/logout.php
@@ -0,0 +1,11 @@
+aa
+
+
\ No newline at end of file
diff --git a/register.php b/register.php
new file mode 100644
index 0000000..d16bb9d
--- /dev/null
+++ b/register.php
@@ -0,0 +1,64 @@
+connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+}
+
+
+if (!isset($_SESSION["uuid"])) {
+
+ $exists = true;
+
+ $NEWuuid;
+
+ while($exists) {
+ $NEWuuid = getNewUUID();
+
+ $sql = "SELECT * FROM wishlist_uuid WHERE uuid=\"" . $NEWuuid . "\"";
+ //$sql = "SELECT * FROM wishlist_uuid WHERE uuid=\"" . $_GET["uuid"] . "\"";
+ $result = $conn->query($sql);
+ $row = $result->fetch_assoc();
+
+ if ($result->num_rows > 0) {
+ $exists = true;
+ } else {
+ $exists = false;
+ }
+ }
+
+ $sql_create = "INSERT INTO `wishlist_uuid`(`uuid`, `last_use`, `array`) VALUES ('" . $NEWuuid . "','" . date("Y-m-d H:i:s") . "', '')";
+ $result_create = $conn->query($sql_create);
+
+
+ $_SESSION["uuid"] = $NEWuuid;
+}
+
+header("Location: https://mfgames.net/#acc");
+
+?>
\ No newline at end of file
diff --git a/remFav.php b/remFav.php
new file mode 100644
index 0000000..d7142ed
--- /dev/null
+++ b/remFav.php
@@ -0,0 +1,47 @@
+connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+}
+
+
+session_start();
+
+$mode = $_POST["m"];
+$itemId = (int)$_POST["id"];
+
+$uuid = $_SESSION["uuid"];
+
+$sql = "SELECT * FROM wishlist_uuid WHERE uuid=\"" . $uuid . "\"";
+$result = $conn->query($sql);
+$row = $result->fetch_assoc();
+
+if ($row["array"] != "") {
+ $currentArray = json_decode($row["array"]);
+} else {
+ $currentArray = array();
+}
+
+$to_remove = $itemId;
+
+$key = array_search($to_remove, $currentArray);
+if ($key !== false) {
+ unset($currentArray[$key]);
+}
+$currentArray = array_values($currentArray);
+
+print_r(json_encode($currentArray));
+
+$sql_Update = "UPDATE `wishlist_uuid` SET `last_use`='" . date("Y-m-d H:i:s") . "',`array`='" . json_encode($currentArray) . "' WHERE uuid='" . $uuid . "'";
+$result_Update = $conn->query($sql_Update);
+
+
+?>
\ No newline at end of file
diff --git a/robots.txt b/robots.txt
new file mode 100644
index 0000000..f344f3a
--- /dev/null
+++ b/robots.txt
@@ -0,0 +1,2 @@
+user-agent: *
+disallow: /phpmyadmin/
\ No newline at end of file
diff --git a/setavali.php b/setavali.php
new file mode 100644
index 0000000..ffa734e
--- /dev/null
+++ b/setavali.php
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/test.php b/test.php
new file mode 100644
index 0000000..f76b234
--- /dev/null
+++ b/test.php
@@ -0,0 +1,11 @@
+
\ No newline at end of file
diff --git a/testGetData.php b/testGetData.php
new file mode 100644
index 0000000..06ffdb2
--- /dev/null
+++ b/testGetData.php
@@ -0,0 +1,16 @@
+loadHTML($string);
+ $finder = new DomXPath($dom);
+
+ $content = $finder->query("//*[contains(concat(' ', normalize-space(@data-component-name), ' '), ' ProductPage ')]")[0]->textContent;
+ $content = json_decode($content);
+
+ print_r($content->product->seller);
+
+?>
\ No newline at end of file
diff --git a/updateWishlist.php b/updateWishlist.php
new file mode 100644
index 0000000..3739f0b
--- /dev/null
+++ b/updateWishlist.php
@@ -0,0 +1,57 @@
+connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+}
+
+
+session_start();
+
+$mode = $_GET["m"];
+$itemId = (int)$_GET["id"];
+
+$uuid = $_SESSION["uuid"];
+
+
+$sql = "SELECT * FROM wishlist_uuid WHERE uuid=\"" . $uuid . "\"";
+$result = $conn->query($sql);
+$row = $result->fetch_assoc();
+
+if ($row["array"] != "") {
+ $currentArray = json_decode($row["array"]);
+} else {
+ $currentArray = array();
+}
+
+if ($mode == "add") {
+ if (!in_array($itemId, $currentArray)) {
+ $currentArray[] = $itemId;
+ }
+} else if ($mode == "rem") {
+ $to_remove = $itemId;
+
+ $key = array_search($to_remove, $currentArray);
+ if ($key !== false) {
+ unset($currentArray[$key]);
+ }
+ $currentArray = array_values($currentArray);
+
+}
+
+print_r(json_encode($currentArray));
+
+$sql_Update = "UPDATE `wishlist_uuid` SET `last_use`='" . date("Y-m-d H:i:s") . "',`array`='" . json_encode($currentArray) . "' WHERE uuid='" . $uuid . "'";
+$result_Update = $conn->query($sql_Update);
+
+*/
+?>
\ No newline at end of file
diff --git a/worlds/AutoInsertData.php b/worlds/AutoInsertData.php
new file mode 100644
index 0000000..98feae9
--- /dev/null
+++ b/worlds/AutoInsertData.php
@@ -0,0 +1,196 @@
+
+
+
+
+
+loadHTML($string);
+ $finder = new DomXPath($dom);
+
+ $content = $finder->query("//*[contains(concat(' ', normalize-space(@data-component-name), ' '), ' ProductPage ')]")[0]->textContent;
+ $content = json_decode($content);
+ $c = $content->product;
+
+
+ $currency = "{
+ \"usd\": \"$\",
+ \"eur\": \"€\",
+ \"crc\": \"₡\",
+ \"gbp\": \"£\",
+ \"ils\": \"₪\",
+ \"inr\": \"₹\",
+ \"jpy\": \"¥\",
+ \"krw\": \"₩\",
+ \"ngn\": \"₦\",
+ \"php\": \"₱\",
+ \"pln\": \"zł\",
+ \"pyg\": \"₲\",
+ \"thb\": \"฿\",
+ \"uah\": \"₴\",
+ \"vnd\": \"₫\",
+ \"aud\": \"A\$\",
+ \"cad\": \"CAD\$\"
+ }";
+
+ $currency = json_decode($currency);
+ $currencyOutput = $c->currency_code;
+
+ if ($c->thumbnail_url == null) {
+ $thumbnailURL = $c->covers[0]->url;
+ } else $thumbnailURL = $c->thumbnail_url;
+
+ $rating = $finder->query("//*[contains(concat(' ', normalize-space(@class), ' '), ' rating-average ')]")[0]->textContent;
+
+ if ($rating == null || $rating == "" || $rating == " ") $rating = "None";
+
+ $conn = new mysqli($servername, $username, $password, $dbname);
+
+ if ($conn->connect_error) {
+ $failed = true;
+ }
+
+ $c->name = str_replace("'","\'",str_replace("`","\`",str_replace('"','\"',$c->name)));
+ $c->seller->name = str_replace("'","\'",str_replace("`","\`",str_replace('"','\"',$c->seller->name)));
+ $species = str_replace("'","\'",str_replace("`","\`",str_replace('"','\"',$species)));
+
+
+ $sql2 = "SELECT * FROM `content` WHERE
+ name LIKE \"%" . $c->name . "%\" AND
+ url_link LIKE \"%" . $url . "%\" AND
+ url_image LIKE \"%" . $thumbnailURL . "%\" AND
+ creator LIKE \"%" . $c->seller->name . "%\";";
+
+ $result2 = $conn->query($sql2);
+
+ if ($result2->num_rows > 0) {
+ $isExisting = true;
+ } else {
+ $isExisting = false;
+ }
+
+ $sql = "INSERT INTO content (
+ `name`,
+ `price`,
+ `currency`,
+ `url_link`,
+ `url_image`,
+ `creator`,
+ `rating`,
+ `species`,
+ `nsfw`,
+ `section`
+ )
+ VALUES (
+ '" . $c->name . "',
+ '" . $c->price_cents . "',
+ '" . $currency->$currencyOutput . "',
+ '" . $url . "',
+ '" . $thumbnailURL . "',
+ '" . $c->seller->name . "',
+ '" . $rating . "',
+ '" . $species . "',
+ '" . $nsfw . "',
+ 4
+ )";
+ if ($isExisting == false) {
+ if ($conn->query($sql) === TRUE) {
+ echo "
Successful !";
+ } else {
+ $errormsg = "
Error: " . $sql . "
" . $conn->error . "";
+ $failed = true;
+ }
+ } else {
+ echo "
Already Exists!";
+ }
+
+
+ $conn->close();
+ }
+
+
+?>
+
+
+
+
+name . "',
+ '" . ($c->price_cents / 100) . "',
+ '" . $currency->$currencyOutput . "',
+ '" . $url . "',
+ '" . $thumbnailURL . "',
+ '" . $c->seller->name . "',
+ '" . $rating . "',
+ '" . $species . "',
+ '" . $nsfw . "',
+ 2";
+
+?>
\ No newline at end of file
diff --git a/worlds/index.php b/worlds/index.php
new file mode 100644
index 0000000..a025365
--- /dev/null
+++ b/worlds/index.php
@@ -0,0 +1,68 @@
+getLink();
+
+$mflib->limitperpage = 15;
+
+$mflib->setCookie();
+session_start();
+
+if ( isset($_GET["s"]) && $_GET["s"] == "61776746" ) {
+ $_SESSION["adminmode"] = true;
+ header("Location: https://mfgames.net/#insert");
+} else if ( isset($_GET["s"]) && $_GET["s"] == "59572354") {
+ $_SESSION["adminmode"] = false;
+ header("Location: https://mfgames.net/");
+}
+$mflib->initialize();
+
+$wishlistArray = $mflib->dataGetWishlist();
+
+if (!isset($_GET["p"])) $_GET["p"] = 1;
+
+$o .= "";
+$o .= $mfelements->printHead($wishlistArray);
+
+$o .= "";
+$o .= $mfelements->printSiteHeader();
+
+$o .= "
";
+$o .= $mfelements->printFilterSection2($mflib, $actual_link);
+$o .= $mfelements->printAccountSection($mflib);
+$o .= "
";
+
+
+if ($mflib->isItMobile == false) {
+ $o .= $mfelements->printPreviewProductPage();
+
+ if (isset($_SESSION["adminmode"]) && $_SESSION["adminmode"] == true) {
+ $o .= $mfelements->printAdminInsertData($mflib);
+ }
+}
+
+$o .= $mfelements->printNavbar($mflib);
+
+$o .= $mfelements->printPageContent($mflib, $wishlistArray);
+
+$o .= $mfelements->printNSFWpromt($actual_link);
+
+$o .= $mfelements->printFooter($mflib);
+
+$o .= $mfelements->printJSLoginVar();
+$o .= $mfelements->printScriptSources();
+
+$o .= "";
+
+echo $o;
\ No newline at end of file