<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default" style="width:100%;">
            <!-- /.panel-heading -->
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                        <thead>
                            <tr>
                                <th style="text-align:center">No</th>
                                <th style="text-align:center">
                                    Image
                                </th>
                                <th style="text-align:center">
                                    Name
                                </th>
                                <th style="text-align:center">
                                    Price
                                </th>
                                <th style="text-align:center">
                                    Status
                                </th>
                                <th style="text-align:center">
                                    Condition
                                </th>
                                <th style="text-align:center" width="30">Gallery</th>
                                <th style="text-align:center" width="30">Edit</th>
                                <th style="text-align:center" width="30">Delete</th>
                                
                            </tr>
                        </thead>
                        <tbody>
                        	
                            <?php
								$selects=mysqli_query($conn,"SELECT * FROM tbl_category where pr_id = $cat_id"); 
								while($row_s=mysqli_fetch_array($selects)){
								$catid = $row_s['cat_id'];
								mysqli_query($conn,'SET NAMES utf8');
								$sql_p=mysqli_query($conn,"select * from tbl_product where cat_id = $catid order by pro_date DESC");
								$i=0;
								while($row_p=mysqli_fetch_array($sql_p)){
								?>
                                <tr>
                                <td style="font-size:12px; width:40px;" align="center"><?php echo $i+=1; ?></td>
                                <td style="font-size:12px;">
									<img src="../images/products/<?php echo $row_p['pro_img'];?>" width="50"/>
                                </td>
                                <td style="font-size:12px;"><?php echo $row_p['pro_title'];?></td>
                                <td style="font-size:12px;">$<?php echo $row_p['pro_price'];?></td>
                                <td style="font-size:12px;"><?php echo $row_p['pro_status'];?></td>
                                <td style="font-size:12px;"><?php echo $row_p['pro_condition'];?></td>
                                <td align="center"><a href="?page=addgallery&pro_id=<?=$row_p['pro_id'];?>" title="Add Gallery"><div class="fa fa-image fa-fw"></div></a></td>
                                <td align="center"><a href="?page=editsparephone&cat_id=<?=$cat_id;?>&pro_id=<?=$row_p['pro_id'];?>" title="edit"><div class="fa fa-edit fa-fw"></div></a></td>
                                <td align="center"><a href="#myModal<?php echo $row_p['pro_id']; ?>" data-toggle="modal" title="delete"><div class="fa fa-trash-o fa-fw"></div></a></td>
                            </tr>
                            <div class="modal small fade" id="myModal<?php echo $row_p['pro_id']; ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                              <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-header">
                                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                        <h3 id="myModalLabel">EURO ASIA CAMBODIA</h3>
                                    </div>
                                    <div class="modal-body">
                                        <p class="error-text"><i class="fa fa-warning modal-icon"></i>Are you sure you want to delete this record?</p><br/>
                                        <label style="font-size:19px; color:#09F;">Spare Part Name : <?php echo $row_p['pro_title']; ?></label><br/>			<center>	
                                        <img src="../images/products/<?php echo $row_p['pro_img'];?>" width="100"/>
                                        </center>
                                    </div>
                                    <div class="modal-footer">
                                        <a class="btn btn-danger" href="include/product/delete_sparephone.php<?php echo '?pro_id='.$row_p['pro_id'];?>" ><i class="icon-check"></i>&nbsp;Yes</a>
                                        <button class="btn" data-dismiss="modal" aria-hidden="true"><i class="icon-remove"></i> Close</button>
                                    </div>
                                  </div>
                                </div>
                            </div>
                                <?php
								}}		
							?>                             
                       </tbody>
                    </table>
                </div>
                <!-- /.table-responsive -->
                
            </div>
            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div>
    <!-- /.col-lg-12 -->
</div>
<!-- /.row -->