<?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>

    <!-- - - - - - - - - - - - - -->

    <!-- end of TOP NAVIGATION   -->

    <!-- - - - - - - - - - - - - -->

    <!-- PAGE TITLE -->

    <section id="page-title" class="row">

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

        <h1>Dashboard</h1>

        <p class="lead">Update your About(Satisfaction) below</strong>.</p>

      </div>

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

        <ol class="breadcrumb pull-right no-margin-bottom">

         

          <li><a href="dashboard.html">Dashboard</a></li>

          <li class="active">Update Satisfaction</li>

        </ol>

      </div>

    </section>

    <?php

    extract($_POST);

    $tmp = $_FILES['att']['tmp_name'];

    $name = $_FILES['att']['name'];

    $fnn = str_replace(" ","_",$name);

    if(isset($upd))

    {

      if($_FILES['att']['name']=="")

      {

        $query = "update tbl_home_about set desc_sat='$desc_sat' where id=1";

        mysqli_query($link,$query);

        {

          $msg = "<p style='color:green;'>Update Successfully!!!!</p>";

        }

    }

    else

    {

      $query = "update tbl_home_about set desc_sat='$desc_sat',image_sat='$fnn' where id=1";

      mysqli_query($link,$query);

      {

        move_uploaded_file($tmp, "../about-image/$fnn");

        $msg = "<p style='color:green;'>Update Successfully!!!!</p>";

      }

    }

    }

    ?>

    <!-- / PAGE TITLE -->

    <?php

    $sel = mysqli_query($link,"select * from tbl_home_about where id=1");

    $arr = mysqli_fetch_assoc($sel);

    ?>

    <div class="container-fluid">

    <div class="row">

      <?=@$msg;?>

    </div>

    <form method="post" enctype="multipart/form-data">

      <div class="row">

        <div class="container-fluid">

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

           <label>Description:</label>

           <textarea id="ckeditor1" name="desc_sat"><?=$arr['desc_sat'];?></textarea>

          </div>

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

            <div class="form-group">

              <img src="../about-image/<?=$arr['image_sat'];?>" alt="<?=$arr['image_sat'];?>" style="width:100%;height:330px;">

               <label>Image Size(225 x 225)Pixel:</label>

              <input type="file" name="att" class="form-control">

            </div>

          </div>

        </div>

      </div>

      <div class="text-center">

        <div class="container-fluid">

          <input type="submit" name="upd" value="Update" class="btn btn-primary">

        </div>

      </div>

    </form>

    </div>

    <script>

      CKEDITOR.replace(ckeditor1)  

    </script>

    <!-- / container-fluid -->

 <?php include('site-footer.php'); ?>