<style>
.img {
  border-radius: 100%;
}
</style>

<?php
if(session_status() == PHP_SESSION_NONE)
{
  session_start();
}
require_once('mysqli_con.php');
include('deleteItems.php');
//include('report.php');

$sellerid = $_GET['sellerid'];
?>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Buy And Sell</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="">


  <!-- Bootstrap style -->
  <link id="callCss" rel="stylesheet" href="themes/bootshop/bootstrap.min.css" media="screen"/>
  <link href="themes/css/base.css" rel="stylesheet" media="screen"/>
  <!-- Bootstrap style responsive -->
  <link href="themes/css/bootstrap-responsive.min.css" rel="stylesheet"/>
  <link href="themes/css/font-awesome.css" rel="stylesheet" type="text/css">
  <!-- Google-code-prettify -->
  <link href="themes/js/google-code-prettify/prettify.css" rel="stylesheet"/>
  <!-- fav and touch icons -->
  <link rel="shortcut icon" href="themes/images/ico/favicon.ico">
  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="themes/images/ico/apple-touch-icon-144-precomposed.png">
  <link rel="apple-touch-icon-precomposed" sizes="114x114" href="themes/images/ico/apple-touch-icon-114-precomposed.png">
  <link rel="apple-touch-icon-precomposed" sizes="72x72" href="themes/images/ico/apple-touch-icon-72-precomposed.png">
  <link rel="apple-touch-icon-precomposed" href="themes/images/ico/apple-touch-icon-57-precomposed.png">
  <style type="text/css" id="enject"></style>
</head>
<body>
  <div id="header">
    <div class="container">

      <!-- Navbar ================================================== -->
      <div id="logoArea" class="navbar">
        <a id="smallScreen" data-target="#topMenu" data-toggle="collapse" class="btn btn-navbar">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </a>
        <div class="navbar-inner">
          <a class="brand" href="home.php"><img style="width:100px;height:50px;" src="themes/images/buyandsell.png" alt="BuyAndSell"/></a>
          <form class="form-inline navbar-search" method="post" name = "searchButt" action="" >
            <input id="srchFld" class="srchTxt" type="text" />
            <select class="srchTxt">
              <option>Category</option>
              <option>Cameras </option>
              <option>Computers</option>
              <option>Women's Clothing</option>
              <option>Women's Shoes</option>
              <option>Men's Clothings</option>
              <option>Men's Shoes</option>
              <option>Stationery</option>
              <option>Books</option>
            </select>

            <button type="submit" id="submitButton" name = "buttonSearch" class="btn btn-primary"> GO </button>

          </form>
          <ul id="topMenu" class="nav pull-right">
            <li class=""><a href="sellitems.php">SELL ITEMS</a></li>
            <li class=""><a href="product.php">BROWSE</a></li>
            <li class=""><a href="userP.php">PROFILE</a></li>
            <li class="">
            <?php
              if(isset($_SESSION['byrID']))
              {
                echo '<a href="logoutPro.php"><span class="btn btn-large btn-success">LOGOUT</span></a>';
              }
              else
              {
                echo '<a href="login.php"><span class="btn btn-large btn-success">LOGIN</span></a>';
              }
            ?>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
  <!-- Header End====================================================================== -->
  <div id="mainBody">
    <div class="container">
      <div class="row">
          <!-- Sidebar end=============================================== -->

          <!-- Sidebar ================================================== -->
          <div id="sidebar" class="span3">
            <div class="well well-small"><a id="myCart" href="product_summary.html"><img src="themes/images/ico-cart.png" alt="cart"> Unique items in your cart : <?php if(isset($_SESSION["cart_item"])){echo count($_SESSION["cart_item"]);}else{echo '0';}  ?></span></a></div>
            <ul id="sideManu" class="nav nav-tabs nav-stacked">
              <ul id="sideManu" class="nav nav-tabs nav-stacked">
                <li class="subMenu open"><a> ELECTRONICS</a>
                  <ul>
                    <li><a class="active" href="camera.php"><i class="icon-chevron-right"></i>Cameras </a></li>
                    <li><a href="computers.php"><i class="icon-chevron-right"></i>Computers</a></li>
                    <li><a href="mobile.php"><i class="icon-chevron-right"></i>Mobile Phone</a></li>
                  </ul>
                </li>
                <li class="subMenu"><a> CLOTHES</a>
                  <ul style="display:none">
                    <li><a href="wCloth.php"><i class="icon-chevron-right"></i>Women's Clothing </a></li>
                    <li><a href="wShoes.php"><i class="icon-chevron-right"></i>Women's Shoes </a></li>
                    <li><a href="mCloth.php"><i class="icon-chevron-right"></i>Men's Clothings </a></li>
                    <li><a href="mShoes.php"><i class="icon-chevron-right"></i>Men's Shoes</a></li>
                  </ul>
                </li>
                <li class="subMenu"><a>BOOKS AND STATIONERY </a>
                  <ul style="display:none">
                    <li><a href="stationery.php"><i class="icon-chevron-right"></i>Stationery</a></li>
                    <li><a href="books.php"><i class="icon-chevron-right"></i>Books</a></li>
                  </ul>
                </li>
              </ul>
            <br/>
            <div class="thumbnail">
              <img src="themes/images/products/panasonic.jpg" alt="Bootshop panasonoc New camera"/>
              <div class="caption">
                <h5>Panasonic</h5>
                <h4 style="text-align:center"><a class="btn" href="product_details.html"> <i class="icon-zoom-in"></i></a> <a class="btn" href="#">Add to <i class="icon-shopping-cart"></i></a> <a class="btn btn-primary" href="#">RM999.00</a></h4>
              </div>
            </div><br/>
            <div class="thumbnail">
              <img src="themes/images/products/kindle.png" title="Bootshop New Kindel" alt="Bootshop Kindel">
              <div class="caption">
                <h5>Kindle</h5>
                <h4 style="text-align:center"><a class="btn" href="product_details.html"> <i class="icon-zoom-in"></i></a> <a class="btn" href="#">Add to <i class="icon-shopping-cart"></i></a> <a class="btn btn-primary" href="#">RM799.00</a></h4>
              </div>
            </div><br/>
          </div>
          <!-- Sidebar end=============================================== -->


          <div class="span9">
            <center><ul class="breadcrumb">
              <li><a href="index.html">Home</a> <span class="divider">/</span></li>
              <li class="active">Profile User</li>
            </ul></center>
            <div class="row">
              <ul class="breadcrumb">
              <!--<form class="form-horizontal" method="post" action="updateProcess.php">-->
                <div class="container">
                </div>
                <center>
                  <div class="boxed">
                    <?php
          					if(!empty($sellerid)){
          						$sqlSelectSeller = mysqli_query($conn,'select * from buyer where buyer_id = '.$_GET['sellerid']) or die(mysql_error());
          						$getInfo = mysqli_fetch_array($sqlSelectSeller);
          						$first_name= $getInfo["first_name"];
          						$last_name = $getInfo["last_name"];
          						$phone = $getInfo["phone"];
          						$add = $getInfo["address"];
                      $img = $getInfo["image"];
          						$sellerid = $getInfo["buyer_id"];
                      $itemsid = $getInfo["items_id"];
                      $_SESSION['sellerID'] = $sellerid;
          				}
                  echo '<img class="img" style="width:200px;height:200px;" src="data:image/jpeg;base64,'.base64_encode($img).'"/>';
                  ?>

                </div>
                </center>

                <center><h4><?php echo $first_name;?>    <?php echo $last_name ; ?>  </h4></center>
                <center><h4><?php echo $phone;?> || COD : <?php echo $add; ?> </h4></center>

                &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
                &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
                &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp

                <div style="display:inline-block; vertical-align: middle;">

                  <center><button type="submit" ><a href="#report" role="button" data-toggle="modal">Report</a></button>
                    <button> <a href='https://web.whatsapp.com'>WhatsApp-Web </a></button></center></div>

                    <form class="form-horizontal" method="post" action="report.php" enctype="multipart/form-data">

                    <div id="report" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="report" aria-hidden="false" >
                      <div class="modal-header">
                        <center><button type="button" class="close" data-dismiss="modal" aria-hidden="true">�</button></center>
                        <h3>Report User</h3>
                      </div>
                      <div class="modal-body">
                          <center><div class="control-group">
                            <h4>I am reporting this user for</h4>
                            <select name="report">
                              <option></option>
                              <option>Suspicious Account</option>
                              <option>Selling Counterfeit Item </option>
                              <option>Selling Prohibited Item</option>
                              <option>Offensive Behaviour</option>
                            </select>
                          </div>
                          <button type="submit" class="btn btn-success">Submit</button>
                          <?php

                          ?>
                        <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
                      </div></center>
                    </div>
                  </form>

                    <?php
                    $sqlEditItems = "SELECT  items_id, items_name, price, image,status FROM items WHERE buyer_id = $sellerid";
                    $result = mysqli_query($conn, $sqlEditItems);
                    if(mysqli_num_rows($result) > 0){
                      while($row = mysqli_fetch_assoc($result)){

                          $items_id = $row["items_id"];
                          $img = $row["image"];
                          $itemsName= $row["items_name"];
                          $itemsPrice = $row["price"];
                          $statusItm = $row["status"];


                        ?>
                        <div class="item">
                          <div class="item">
                            <ul class="thumbnails">
                              <li class="span3">
                                <div class="thumbnail" >

                                  <center><?php echo '<img style="width:200px;height:200px;" src="data:image/jpeg;base64,'.base64_encode($img).'"/>'?></center></a>

                                  <div class="caption">
                                    <h4><center><?php echo $itemsName; ?></center></h4>
                                    <h5><center>RM <?php echo $itemsPrice; ?></span></center></h5>
                                    <h5><center>Status : <?php echo $statusItm; ?></span></center></h5>
                                    <h4 style="text-align:center">
                                    </div>
                                  </div>
                                </li><?php }} ?>
                              </div>
                            </ul>
                          </div>
                    </div>
                  </div>
                </div>
              </div>





              <!-- MainBody End ============================= -->
              <!-- Footer =====================================================



              <div  id="footerSection">
                <div class="container">
                  <div class="row">
                    <div class="span3">
                      <h5>ACCOUNT</h5>
                      <a href="register.html">REGISTRATION</a>
                      <a href="login.html">LOG IN</a>
                    </div>
                    <div class="span3">
                      <h5>INFORMATION</h5>
                      <a href="contact.html">CONTACT</a>
                      <a href="legal_notice.html">LEGAL NOTICE</a>
                      <a href="tac.html">TERMS AND CONDITIONS</a>
                    </div>
                  </div>
                  <p class="pull-right">&copy; Buy And Sell</p>
                </div>
              </div>============= -->
              <!-- Placed at the end of the document so the pages load faster ============================================= -->
              <script src="themes/js/jquery.js" type="text/javascript"></script>
              <script src="themes/js/bootstrap.min.js" type="text/javascript"></script>
              <script src="themes/js/google-code-prettify/prettify.js"></script>

              <script src="themes/js/bootshop.js"></script>
              <script src="themes/js/jquery.lightbox-0.5.js"></script>

            </body>
            </html>
