0% found this document useful (0 votes)
15 views15 pages

Nftcodes 1

The document is a PHP script that manages user sessions and retrieves user and art information from a MySQL database for an NFT marketplace. It checks if a user is logged in, connects to the database, fetches user details, and retrieves art details based on dynamic art IDs. The HTML section includes a layout for displaying NFT item details, including images, descriptions, and creator information.

Uploaded by

goodluckedonyabo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views15 pages

Nftcodes 1

The document is a PHP script that manages user sessions and retrieves user and art information from a MySQL database for an NFT marketplace. It checks if a user is logged in, connects to the database, fetches user details, and retrieves art details based on dynamic art IDs. The HTML section includes a layout for displaying NFT item details, including images, descriptions, and creator information.

Uploaded by

goodluckedonyabo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

<?

php

session_start(); // start session

// Check if the user is logged in

if (!isset($_SESSION["user_id"])) {

header('Location: https://gigaland.art/login.php');

exit();

// MySQL database connection variables

$host = "localhost";

$usersname = "u308477705_Sinzu";

$db_pass = "Orevaoghene1@";

$database = "u308477705_NFT";

// Connect to the database

$conn = mysqli_connect($host, $usersname, $db_pass, $database);

// Check if the connection was successful

if (!$conn) {

die("Connection failed: " . mysqli_connect_error());

// Get the user's information from the database

// Get the user's information from the database


$user_id = $_SESSION['user_id'];

// Fetch user details

$user_sql = "SELECT * FROM users WHERE id = '$user_id'";

$user_result = mysqli_query($conn, $user_sql);

// Check if query was successful

if (!$user_result) {

die("Query failed: " . mysqli_error($conn));

// Get user's information as an associative array

$users = mysqli_fetch_assoc($user_result);

// Dynamic art selection based on ID

$art_id = 0; // For example, this could be changed to 2 or another ID

$user = $users['username'];

$art_sql = "SELECT * FROM art WHERE art_id = '$art_id' and username = '$user'";

$art_result = mysqli_query($conn, $art_sql);

// Check if query was successful

if (!$art_result) {

die("Query failed: " . mysqli_error($conn));

}
// Dynamic art selection based on ID

$art_id = 1; // For example, this could be changed to 2 or another ID

$art_sql1 = "SELECT * FROM art WHERE art_id = '$art_id' and username = '$user'";

$art_result1 = mysqli_query($conn, $art_sql1);

// Check if query was successful

if (!$art_result1) {

die("Query failed: " . mysqli_error($conn));

// Dynamic art selection based on ID

$art_id = 2; // For example, this could be changed to 2 or another ID

$art_sql2 = "SELECT * FROM art WHERE art_id = '$art_id' and username = '$user'";

$art_result2 = mysqli_query($conn, $art_sql2);

// Check if query was successful

if (!$art_result2) {

die("Query failed: " . mysqli_error($conn));

// Dynamic art selection based on ID

$art_id = 3; // For example, this could be changed to 2 or another ID

$art_sql3 = "SELECT * FROM art WHERE art_id = '$art_id' and username = '$user'";

$art_result3 = mysqli_query($conn, $art_sql3);


// Check if query was successful

if (!$art_result3) {

die("Query failed: " . mysqli_error($conn));

// Get art information as an associative array

$art = mysqli_fetch_assoc($art_result);

$art1 = mysqli_fetch_assoc($art_result1);

$art2 = mysqli_fetch_assoc($art_result2);

$art3 = mysqli_fetch_assoc($art_result3);

// Close database connection

mysqli_close($conn);

?>

<!DOCTYPE html>

<html lang="zxx">

<!-- Mirrored from gigaland/item-details.php by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 21 Dec
2024 10:52:11 GMT -->

<head>

<title>Gigaland - #1 NFT Marketplace</title>

<link rel="icon" href="images/icon.png" type="image/gif" sizes="16x16">


<meta content="text/html;charset=utf-8" http-equiv="Content-Type">

<meta content="width=device-width, initial-scale=1.0" name="viewport" />

<meta content="Gigaland - #1 NFT Marketplace" name="description" />

<meta content="" name="keywords" />

<meta content="" name="author" />

<!-- CSS Files

================================================== -->

<link id="bootstrap" href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />

<link href="css/plugins.css" rel="stylesheet" type="text/css" />

<link href="css/style.css" rel="stylesheet" type="text/css" />

<!-- color scheme -->

<link id="colors" href="css/colors/scheme-01.css" rel="stylesheet" type="text/css" />

<link href="css/coloring.css" rel="stylesheet" type="text/css" />

</head>

<body>

<div id="wrapper">

<!-- header begin -->

<header class="header-light scroll-light hidden">

<div class="container">

<div class="row">

<div class="col-md-12">

<div class="de-flex sm-pt10">

<div class="de-flex-col">
<div class="de-flex-col">

<!-- logo begin -->

<div id="logo">

<a href="index.php">

<img alt="" src="images/logo-1.png" />

</a>

</div>

<!-- logo close -->

</div>

<div class="de-flex-col">

<input id="quick_search" class="xs-hide" name="quick_search"


placeholder="search item here..." type="text" />

</div>

</div>

<div class="de-flex-col header-col-mid">

<!-- mainmenu begin -->

<ul id="mainmenu">

<li>

<a href="index.php">Home<span></span></a>

</li>

<li>

<a href="explore.php">Explore<span></span></a>

</li>

<li>

<a href="about-us.php">About Us<span></span></a>


</li>

<li>

<a href="help-center.php">What is NFT?<span></span></a>

</li>

<li>

<a href="contact.php">Contact Us<span></span></a>

</li>

<li>

<a href="#" id="switch_scheme">

<i class="ss_dark fa fa-moon-o"></i>

<i class="ss_light fa fa-sun-o"></i>

</a>

</li>

</ul>

<div class="menu_side_area">

<div class="de-login-menu">

<a href="create-options.php" class="btn-main"><i class="fa


fa-plus"></i><span>Create</span></a>

<span id="de-click-menu-notification" class="de-menu-notification">

<span class="d-count">2</span>

<i class="fa fa-bell"></i>

</span>

<span id="de-click-menu-profile" class="de-menu-profile">

<img src="<?php echo $users['image']; ?>" class="img-fluid" alt="">


</span>

<div id="de-submenu-notification" class="de-submenu">

<div class="de-flex">

<div><h4>Notifications</h4></div>

<a href="#">Show all</a>

</div>

<ul>

<li>

<a href="#">

<img class="lazy" src="images/author/author-2.jpg" alt="">

<div class="d-desc">

<span class="d-name"><b>Gigaland</b> Welcome to the best NFT


marketplace</span>

<span class="d-time">1 min ago</span>

</div>

</a>

</li>

<li>

<a href="#">

<img class="lazy" src="images/author/author-3.jpg" alt="">

<div class="d-desc">

<span class="d-name"><b>Gigalnd</b> Explore a variety of


NFTs</span>

<span class="d-time">1 min ago</span>


</div>

</a>

</li>

<!--<li>

<a href="#">

<img class="lazy" src="images/author/author-4.jpg" alt="">

<div class="d-desc">

<span class="d-name"><b>Lori Hart</b> started following


you</span>

<span class="d-time">18 hours ago</span>

</div>

</a>

</li>

<li>

<a href="#">

<img class="lazy" src="images/author/author-5.jpg" alt="">

<div class="d-desc">

<span class="d-name"><b>Jimmy Wright</b> liked your


item</span>

<span class="d-time">1 day ago</span>

</div>

</a>

</li>

<li>

<a href="#">

<img class="lazy" src="images/author/author-6.jpg" alt="">


<div class="d-desc">

<span class="d-name"><b>Karla Sharp</b> started following


you</span>

<span class="d-time">3 days ago</span>

</div>

</a>

</li>-->

</ul>

</div>

<div id="de-submenu-profile" class="de-submenu">

<div class="d-name">

<h4><?php echo $users['name']; ?></h4>

<a href="profile.php">Set display name</a>

</div>

<div class="spacer-10"></div>

<div class="d-balance">

<h4>Balance</h4>

<?php echo $users['balance']; ?> ETH

</div>

<div class="spacer-10"></div>

<div class="d-wallet">

<h4>My Wallet</h4>

<span id="wallet" class="d-wallet-


address">0xb53A88D03C0469E79dC28553C1b838d0B3e1fbC5</span>

<button id="btn_copy" title="Copy Text">Copy</button>


</div>

<div class="d-line"></div>

<ul class="de-submenu-profile">

<li><a href="author.php"><i class="fa fa-user"></i> My profile</a></li>

<li><a href="profile.php"><i class="fa fa-pencil"></i> Edit profile</a></li>

<li><a href="logout.php"><i class="fa fa-sign-out"></i> Sign out</a></li>

</ul>

</div>

<span id="menu-btn"></span>

</div>

</div>

</div>

</div>

</div>

</div>

</div>

</header>

<!-- header close -->

<!-- content begin -->

<div class="no-bottom no-top" id="content">

<div id="top"></div>
<section id="nft-item-details" aria-label="section" class="sm-mt-0">

<div class="container">

<div class="row g-5">

<div class="col-md-6 text-center">

<div class="nft-image-wrapper">

<img src="images/items/item-1.jpg" class="image-autosize img-fluid img-rounded mb-


sm-30" alt="">

</div>

</div>

<div class="col-md-6">

<div class="item_info">

Auctions ends in <div class="de_countdown" data-year="2025" data-month="2" data-


day="15" data-hour="12"></div>

<h2>Prismatic Serenity</h2>

<div class="item_info_counts">

<div class="item_info_type"><i class="fa fa-image"></i>Art</div>

<div class="item_info_views"><i class="fa fa-eye"></i>250</div>

<div class="item_info_like"><i class="fa fa-heart"></i>15</div>

</div>

<p>

Prismatic Serenity is a breathtaking NFT, featuring a rainbow-clad lady with eyes


closed and luxurious

flowing hair, embodying grace and tranquility. Her serene expression and the
kaleidoscope of colors

symbolize unity, diversity, and inner peace. The intricate details of her flowing hair,
merging seamlessly
with the radiant hues of the rainbow, create a mesmerizing fusion of art and
emotion.

</p>

<div class="d-flex flex-row">

<div class="mr40">

<h6>Creator</h6>

<div class="item_author">

<div class="author_list_pp">

<a href="author.php">

<img class="lazy" src="uploads/profile.jpg" alt="">

<i class="fa fa-check"></i>

</a>

</div>

<div class="author_list_info">

<a href="author.php">Emerald Icon</a>

</div>

</div>

</div>

</div>

<div class="spacer-40"></div>

<div class="de_tab tab_simple">

<ul class="de_nav">

<li class="active"><span>Details</span></li>
<li><span>Bids</span></li>

</ul>

<div class="de_tab_content">

<div class="tab-1">

<!-- <h6>Owner</h6>

<div class="item_author">

<div class="author_list_pp">

<a href="author.php">

<img class="lazy" src="images/author/author-10.jpg" alt="">

<i class="fa fa-check"></i>

</a>

</div>

<div class="author_list_info">

<a href="author.php">Stacy Long</a>

</div>

</div> -->

<div class="spacer-40"></div>

<h6>Properties</h6>

<div class="row gx-2">

<div class="col-lg-4 col-md-6 col-sm-6">

<a href="#" class="nft_attr">

<h5>Hair</h5>

<h4>Rainbow hair</h4>
<span>85% have this trait</span>

</a>

</div>

<div class="col-lg-4 col-md-6 col-sm-6">

<a href="#" class="nft_attr">

<h5>Eyes</h5>

<h4>Closed eyes</h4>

<span>14% have this trait</span>

</a>

</div>

<div class="col-lg-4 col-md-6 col-sm-6">

<a href="#" class="nft_attr">

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy