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

<?php include('left-nevigation.php'); ?>

   <main id="playground">

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

 <?php  $testi_id=$_REQUEST['testi_id']; ?>

      <?php

$psql="select * from tbl_testimonial where cate_parent_id='$testi_id'";

$pdata=mysql_query($psql);

$Presult=mysql_fetch_array($pdata);

$catp_id=$Presult['cate_parent_id'];

$sqlcat="select * from tbl_testimonial where testi_id='$catp_id'";

$datacat=mysql_query($sqlcat);

$resultcat=mysql_fetch_array($datacat);

?>

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

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

        <h1><?php echo $resultcat['testi_name']; ?></h1>

        <p class="lead">View / Edit your Testimonial below</strong>.</p>

         <p><a href="add-edit-testimonial.php" class="btn bnt-primary">Add New Testimonial</a></p>

      </div>

 

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

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

          

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

          <li class="active">Update Testimonial</li><br><br>

         

        </ol>

        

      </div>

    </section>

	

<?php

if(isset($_REQUEST['del'])){

$sql="delete from tbl_testimonial where testi_id=$_REQUEST[del]";  

$sqldat=mysql_query($sql);

}

?>

<?php

$sql="select * from tbl_testimonial where 1";

$data=mysql_query($sql);

?>	

    <!-- / PAGE TITLE -->

    <div class="container-fluid">

      <div class="row">

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

          <section class="panel panel-primary">

            <header class="panel-heading">

              <h3 class="panel-title">Your Products</h3>
            </header>
            <table class="table table-hover table-responsive">
            <tbody>
              <tr>
                <th scope="row">S. No</th>
                <td> Name</td>
                <td>Description</td>
                <td>Action</td>
              </tr>
              <tr>
               <?php
			   $i=0;
			    while($result=mysql_fetch_array($data)){ 
				$i++;
				?>
                <th scope="row"><?php echo $i ?></th>

                <td><?php echo $result['testi_name']; ?></td>

                

                <td> <?php echo $result['testi_desc']; ?> </td>

                <td><a href="add-edit-testimonial.php?Updt_id=<?php echo $result['testi_id'];?>" class="btn btn-primary" style="width:100px;">Edit</a><br>

                <form method="post">

                <input type="hidden" name="del" value="<?php echo $result['testi_id'];?>">

                  <button class="btn btn-danger" style="width:100px;">Delete</button> </td>

            </form>

              </tr>

              <?php } ?>

           

            </tbody>

            </table>

          </section>

        </div>

      </div>

    </div>

    <!-- / container-fluid -->

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