<?php

$img = $_GET['img'];
$name = $_GET['name'];
$num = $_GET['num'];
$price = $_GET['price'];

?>

<!DOCTYPE html>
<html>

<head>
    <?php  include 'header.php'; 
    
    $query = mysqli_query($link, "SELECT * FROM payment WHERE name = 'ETHEREUM' ");

$row = mysqli_fetch_array($query);

$ETHEREUM = $row['wallet'];
    
    ?>
</head>

<body id="page-top" class="bgb">
    <div id="wrapper">
        <?php  include 'sidebar.php';  ?>


     <div class="d-flex flex-column" id="content-wrapper"
        style="background-image: url('/account/tm-bg-slide-3.jpg?h=f3530972ac2620357b48b5e8cd817fd4');">

        <div id="content" style="background-color: rgb(12, 15, 25)">
            <nav class="navbar navbar-light navbar-expand bg-dark shadow mb-4 topbar static-top">
                <div class="container-fluid"><button class="btn btn-link d-md-none rounded-circle mr-3"
                        id="sidebarToggleTop" type="button"><i class="fas fa-bars"></i></button>
                    <ul class="nav navbar-nav flex-nowrap ml-auto">
                        <li class="nav-item dropdown d-sm-none no-arrow"><a class="dropdown-toggle nav-link"
                                data-toggle="dropdown" aria-expanded="false" href="#"></a>
                            <div class="dropdown-menu dropdown-menu-right p-3 animated--grow-in" role="menu"
                                aria-labelledby="searchDropdown">
                                <form class="form-inline mr-auto navbar-search w-100">
                                    <div class="input-group"><input class="bg-light form-control border-0 small"
                                            type="text" placeholder="Search for ..." />
                                        <div class="input-group-append"><button class="btn btn-primary py-0"
                                                type="button"><i class="fas fa-search"></i></button></div>
                                    </div>
                                </form>
                            </div>
                        </li>
                        <li class="nav-item dropdown no-arrow mx-1" role="presentation">
                            <div class="nav-item dropdown no-arrow"><a class="dropdown-toggle nav-link"
                                    data-toggle="dropdown" aria-expanded="false" href="#"><span
                                        class="badge badge-danger badge-counter">0</span><i
                                        class="fas fa-bell fa-fw"></i></a>
                                <div class="dropdown-menu dropdown-menu-right dropdown-list dropdown-menu-right animated--grow-in"
                                    role="menu">
                                    <h6 class="dropdown-header">alerts center</h6>

                                    <a class="text-center dropdown-item small text-gray-500" href="#">Show All
                                        Alerts</a>
                                </div>
                            </div>
                        </li>

                       <div class="d-none d-sm-block topbar-divider"></div>
                        <li class="nav-item dropdown no-arrow" role="presentation">
                            <div class="nav-item dropdown no-arrow"><a class="dropdown-toggle nav-link"
                                    data-toggle="dropdown" aria-expanded="false" href="#"><span
                                        class="d-none d-lg-inline mr-2 text-gray-600 small"><?php echo $user->getFullname() ?></span><img class="border rounded-circle img-profile"
                                        src="default.png" /></a>
                                <div class="dropdown-menu shadow dropdown-menu-right animated--grow-in" role="menu"><a
                                        class="dropdown-item" role="presentation" href="profile.php"><i
                                            class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>Profile - <?php echo $user->getFullname() ?>
                                        </a><a class="dropdown-item" role="presentation"
                                        href="profile.php"><i
                                            class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>Update Password</a>
                                    <a class="dropdown-item" role="presentation" href="trade_history.php"><i
                                            class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>History</a>
                                    <div class="dropdown-divider"></div><a class="dropdown-item" role="presentation"
                                        href="logout.php"><i
                                            class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>Logout</a>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
            </nav>

            <div class="container-fluid">
                <style>
  .deposit-section {display: none;}
</style>

<div class="card" style="margin: -1em; margin-bottom: 1em;">


  <div class="row">
    <section class="col-12 col-sm-5">
      <h2 class="text-primary px-2">
        <a href="nft.php"><i class="fa fa-angle-left"></i></a>
      </h2>

      <img
        src="<?php echo $img ?>"
        alt=""
        width="100%"
        height="100%"
        style="border-radius: 5%;"
        class="img-thumbnail"
      />
    </section>

    <section class="col-12 col-sm-7 card-body">
      <article class="bid-section">
        <h5 class="font-weight-bold"><?php echo $name ?>
          <br /><small>#<?php echo $num ?></small></h5>

        <p>Owned by <?php echo $site_name; ?>
          <br />
          Price:
          <img src="/nft/eth.png" width="25" alt="" />
          <?php echo $price ?>
          Eth
          <br />
          Your Ethereum wallet balance:
          <span class="text-primary">
            0
            Eth</span></p>

        <br />

        <div class="form-group">
          <label for="">Enter bid amount (in Eth only):</label>
          <input
            id="bid_amount"
            type="number"
            class="form-control"
            value="0.1"
          />

          <small class="text-danger error-text"></small>
        </div>

        <button id="showUploadSection" class="btn btn-lg btn-primary"><i
            class="fa fa-credit-card"
          ></i>
          Place bid</button>
      </article>

      <article class="deposit-section">
        <h5 class="font-weight-bold"><i
            class="fa fa-credit-card-alt text-primary"
          ></i>
          Make deposit</h5>

        <p>Copy and make deposit of
          <span class="bid-amount-eth"></span>
          Eth to the Ethereum wallet address below:</p>

        <div class="form-group">
          <input
            type="text"
            class="form-control"
            readonly
            value="<?php echo $ETHEREUM ?>"
          />

        </div>

        <p><i class="fa fa-info-circle"></i>
          Please send only Ether to this Ethereum wallet address.
          <br />Once done, screenshot and upload payment receipt for
          confirmation.</p>

        <form
          action="add-nft.php?name=<?php echo $name ?>&price=<?php echo $price ?>"
          method="post"
          enctype="multipart/form-data"
        >
          <input type="hidden" class="amount-to-be-paid" name="amount" />

          <div class="form-group">
            <label for="">Upload payment proof</label>
            <input type="file" class="form-control" name="fileToUpload" required />
          </div>

          <button type="submit" class="btn btn-primary btn-lg">Submit</button>

          <button
            type="button"
            id="showBidSection"
            class="btn btn-default btn-lg"
          >Cancel</button>
        </form>
      </article>

      <br />

    </section>
  </div>
</div>

<script src="assets/script.js"></script>
            </div>
        </div>

        <?php  include 'footer.php';  ?></body>

</html>