<?php
	include "admin_top_menu.php";
	include "admin_side_menu.php";
?>
  
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        Product
        <small>Product List</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li class="active">Product</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content">
	<form name="frmlist" method="post">
      
        <div class="box box-info">
            <div class="box-header">
              <h3 class="box-title">Product List</h3>
            </div>
            <!-- /.box-header -->
            <div class="box-body">
              <table id="example1" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>Sr. No</th> 
                  <th>Product Id</th>
                  <th>Product Name</th>  
                  <th>Product Color/Fabric/GSM</th>
                  <th>Manufactured By</th> 
                  <th>Description</th> 
                  <th>Image</th> 
                  <th>Edit</th> 
                  <th>Delete</th> 
                </tr>
                </thead>
                <tbody>
				<?php 
					//$qry=mysqli_query($conn,"SELECT * FROM swatch s, color c where s.scolor=c.cname")or die(mysqli_error($conn));
					$qry=mysqli_query($conn,"SELECT * FROM swatch")or die(mysqli_error($conn));
					$count=1;
					while($row=mysqli_fetch_array($qry)){
				?>
					<tr>
					<td><?php echo $count++;?></td>
					<td><?php echo $row['snumber'];?></td>
					<td><?php echo $row['sname'];?></td>
					<td><?php echo $row['spattern']."<br>".$row['scolor']."-".$row['scolor2']."<br>".$row['sfabric']."<br>".$row['sgsm'];?>
					</td>
					<td><?php echo $row['smfg'];?></td>
					<td><?php echo $row['sdescription'];?></td>
					<td><a href="<?php echo $row['simage'];?>"><img src="<?php echo $row['simage'];?>" width="100" ><a/></td>
					<td><?php echo "<a href='swatch_add.php?temp_id=".$row['sid']."'><i class='fa fa-edit fa-fw'></i></a>"; ?> </td>
					<td><?php echo "<a href='delete_code.php?ds_id=".$row['sid']."' onClick=\"javascript:return confirm('are you sure you want to delete this?');\"><i class='fa fa-times fa-fw'></i></a>"; ?></td>
					</tr>              
             <?php  } ?>
                </tbody>
              </table>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
	</form>
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->


<?php
	include "admin_footer.php";
?>

  
  