<?php include('site-header.php'); ?>
  <!-- end of LOGO CONTAINER -->
  <!-- - - - - - - - - - - - - -->
  <!-- start of SIDEBAR        -->
  <!-- - - - - - - - - - - - - -->
  <?php include('left-nevigation.php'); ?>
  <!-- - - - - - - - - - - - - -->
  <!-- end of SIDEBAR          -->
  <!-- - - - - - - - - - - - - -->
  <main id="playground">
  <script src="ckeditor/ckeditor.js"></script>
    <!-- - - - - - - - - - - - - -->
    <!-- start of TOP NAVIGATION -->
    <!-- - - - - - - - - - - - - -->
    <nav class="navbar navbar-top navbar-static-top">
      <div class="container-fluid">
        <!-- sidebar collapse and toggle buttons get grouped for better mobile display -->
        <div class="navbar-header nav">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-top"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
        </div>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="navbar-top">
          <ul class="nav navbar-nav navbar-right">
            <li class="dropdown user-profile"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
              <div class="user-img-container"> <img src="demofiles/demoimage.gif" alt=""> </div>
              Sign Out <span class="chat-status success"></span> </a> </li>
          </ul>
        </div>
      </div>
      <!-- end of container-fluid -->
    </nav>
    <?php
    extract($_POST);
    $best_sell_image = $_FILES['img_file']['name'];
    if(isset($updat))
    {
      if($_FILES['img_file']['name']!="")
      {
        $sel = "UPDATE `tbl_best_sell` SET image='$best_sell_image' WHERE id=1";
        mysqli_query($link,$sel);
        move_uploaded_file($_FILES['img_file']['tmp_name'], "../about-image/$best_sell_image");
      }
    }
    ?>
    <section id="page-title" class="row">
      <div class="col-md-8">
        <h1>Best Seller Image</h1>
        <p class="lead">Update your Best seller below</strong>.</p>
      </div>
      <div class="col-md-4">
      </div>
    </section>
    <!-- / PAGE TITLE -->
    <?php
    $que = "select * from tbl_best_sell";
    $run= mysqli_query($link,$que);
    $result = mysqli_fetch_assoc($run);
    ?>
    <div class="container-fluid">
      <div class="col-md-12"><a href="show-product.php" class="btn btn-primary">Back</a></div>
       <div class="row">
        <form method='post' enctype="multipart/form-data">
          <div class="col-sm-4"></div>
          <div class="col-sm-4">
              <div class="form-group">
                <div>
                  <img src="../about-image/<?=$result['image']?>" alt="" width="100%" height="400px">
                  <label>Image Size(270 x 480) Pixel</label>
                  <input type="file" name="img_file">
                </div>
              </div>
          </div>
          <div class="col-sm-4"></div>
          <div class="col-md-12">
            <div class="text-center">
              <div class="form-group">
              <input class="btn btn-primary" name="updat" type="submit" value="SUBMIT">
              </div>
            </div>
          </div>
        </form>
      </div>
    </div><!--/container-->
    <script>
      CKEDITOR.replace(ckeditor1)
	  </script>
      <!-- / row -->
    <!-- / container-fluid -->
 <?php include('site-footer.php'); ?>