Initial Commit of v2
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
if (isset($_SESSION["tmpdata"])) {
|
||||
$_POST["data"] = $_SESSION["tmpdata"];
|
||||
unset($_SESSION["tmpdata"]);
|
||||
}
|
||||
|
||||
if (!isset($_SESSION["login"]) && $_SESSION["login"] != "true-as-hell") {
|
||||
$_SESSION["tmpdata"] = $_POST["data"];
|
||||
header("Location: login.php?ref=redirectFromJinxxy");
|
||||
die();
|
||||
}
|
||||
|
||||
$creator_name;
|
||||
$creator_pb;
|
||||
$creator_jinxxyURL;
|
||||
|
||||
$content_name;
|
||||
$content_price;
|
||||
$content_rating;
|
||||
|
||||
$content_creator_id;
|
||||
$content_currency_id;
|
||||
|
||||
$content_url;
|
||||
$content_image;
|
||||
|
||||
$userData;
|
||||
$productData;
|
||||
|
||||
$data = json_decode($_POST["data"]);
|
||||
|
||||
$apolloState = $data->props->pageProps->__APOLLO_STATE__;
|
||||
$rootData = $data->props->pageProps->__APOLLO_STATE__->ROOT_QUERY;
|
||||
|
||||
// getting the product data
|
||||
foreach ($rootData as $key => $value) {
|
||||
if (strpos($key, 'product') !== false) {
|
||||
$temp = $value->__ref;
|
||||
|
||||
foreach ($apolloState as $key => $value) {
|
||||
if (strpos($key, $temp) !== false) {
|
||||
$productData = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// getting the user data
|
||||
foreach ($apolloState as $key => $value) {
|
||||
if (strpos($key, $productData->user->__ref) !== false) {
|
||||
$userData = $value;
|
||||
}
|
||||
}
|
||||
|
||||
// getting user profilePicture
|
||||
foreach ($apolloState as $key => $value) {
|
||||
if (strpos($key, $userData->profile_image->__ref) !== false) {
|
||||
$creator_pb = $value->url;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($apolloState as $key => $value) {
|
||||
if (strpos($key, $productData->cover->__ref) !== false) {
|
||||
$content_image = $value->url;
|
||||
}
|
||||
}
|
||||
|
||||
// set creator name
|
||||
$creator_name = $userData->name;
|
||||
|
||||
// set creator jinxxy url
|
||||
$creator_jinxxyURL = "https://jinxxy.com/" . $userData->username;
|
||||
|
||||
|
||||
|
||||
// set content name
|
||||
$content_name = $productData->name;
|
||||
|
||||
// set content price
|
||||
$content_price = $productData->base_price;
|
||||
|
||||
// set procuct url
|
||||
$content_url = "https://jinxxy.com/" . $data->props->pageProps->username . "/" . $data->props->pageProps->url_slug;
|
||||
|
||||
// set no rating
|
||||
$content_rating = "null";
|
||||
|
||||
// currency type
|
||||
$currency_currency = strtolower($productData->currency_code);
|
||||
|
||||
/*
|
||||
echo '<br><span style="font-family: consolas">Creator Name </span>' . $creator_name;
|
||||
echo '<br><span style="font-family: consolas">Creator PB </span>' . $creator_pb;
|
||||
echo '<br><span style="font-family: consolas">Creator JinxxyURL </span>' . $creator_jinxxyURL;
|
||||
echo '<br>';
|
||||
echo '<br>';
|
||||
echo '<br>';
|
||||
echo '<br><span style="font-family: consolas">Content Name </span>' . $content_name;
|
||||
echo '<br><span style="font-family: consolas">Content Price </span>' . $content_price;
|
||||
echo '<br><span style="font-family: consolas">Content Rating </span>' . $content_rating;
|
||||
echo '<br>';
|
||||
echo '<br><span style="font-family: consolas">Content CreatorID </span>' . $content_creator_id;
|
||||
echo '<br><span style="font-family: consolas">Content CurrencyID </span>' . $content_currency_id;
|
||||
echo '<br>';
|
||||
echo '<br><span style="font-family: consolas">Content URL </span>' . $content_url;
|
||||
echo '<br><span style="font-family: consolas">Content Image </span>' . $content_image;
|
||||
echo '<br>';
|
||||
echo '<br><span style="font-family: consolas">Currency Code </span>' . $currency_currency;
|
||||
*/
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?php echo file_get_contents("/var/www/furatalog-cdn/mainHead.html"); ?>
|
||||
<title>Insert From Jinxxy - Admin Panel - Furatalog.xyz</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main">
|
||||
<form action="insert-jinxxy.php" class="insert" method="post">
|
||||
<input type="text" name="creator_name" value="<?php echo $creator_name; ?>"><br>
|
||||
<input type="text" name="creator_pb" value="<?php echo $creator_pb; ?>"><br>
|
||||
<input type="text" name="creator_jinxxyURL" value="<?php echo $creator_jinxxyURL; ?>"><br>
|
||||
<input type="text" name="content_name" value="<?php echo $content_name; ?>"><br>
|
||||
<input type="text" name="content_price" value="<?php echo $content_price; ?>"><br>
|
||||
<input type="text" name="content_rating" value="<?php echo $content_rating; ?>"><br>
|
||||
<input type="text" name="content_creator_id" value="<?php echo $content_creator_id; ?>"><br>
|
||||
<input type="text" name="content_currency_id" value="<?php echo $content_currency_id; ?>"><br>
|
||||
<input type="text" name="content_url" value="<?php echo $content_url; ?>"><br>
|
||||
<input type="text" name="content_image" value="<?php echo $content_image; ?>"><br>
|
||||
<input type="text" name="currency_currency" value="<?php echo $currency_currency; ?>"><br>
|
||||
<input type="submit" value="Insert">
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user