<?php
$page = 'Product';
?>
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Admin</title>

    <!-- Bootstrap Core CSS -->
    <link href="<?php echo base_url(); ?>assets/Backend/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="<?php echo base_url(); ?>assets/Backend/css/sb-admin.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="<?php echo base_url(); ?>assets/Backend/css/plugins/morris.css" rel="stylesheet">
    <link href="<?php echo base_url(); ?>assets/Backend/font-awesome-4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<style>
	.td,th,tr{
		text-align: center;
	}
</style>
</head>

<body>

    <div id="wrapper">

        <!-- Navigation -->
        <?php
		include "include/header.php";
		?>
        <?php
		//foreach($about as $row)
		//$p_id = $row->p_id;
		?>

        <div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="row">
                    <div class="col-lg-12">
                        <h1 class="page-header">
                            Product Category
                            <a href="<?php echo base_url(); ?>index.php/App/new_product_category" class="pull-right btn btn-primary">New Category</a>
                        </h1>
                       <?php if($this->session->flashdata('success_pcategory'))
							{ ?>
							<div class="alert alert-danger alert-dismissable" style="font-size:12px;">
			                 <button type="button" class="close" data-dismiss="alert" aria-hidden="true" >×</button>
								<?php echo $this->session->flashdata('success_pcategory');?>
							</div>
							<?php }?>
							<?php if($this->session->flashdata('delete_pcategory'))
							{ ?>
							<div class="alert alert-danger alert-dismissable" style="font-size:12px;">
			                 <button type="button" class="close" data-dismiss="alert" aria-hidden="true" >×</button>
								<?php echo $this->session->flashdata('delete_pcategory');?>
							</div>
							
							<?php }?>
                        
                    </div>
                </div>
                
                <!-- /.row -->
				<div class="row">
                    <div class="col-lg-12">
                                            
                        <div class="table-responsive">
                            <table class="table table-bordered table-hover">
                                <thead>
                                    <tr>
                                    	<th width="3%">Sr. No.</th>	                                        
										<th width="10%">Product Name</th>
										<th width="10%">Product Image</th>      
                                        <th width="11%">Action</th>
                                    </tr>
                                </thead>
                                <tbody>
                                <?php
								$cnt=0;
								foreach($product_category as $row):
								$pt_id = $row->pt_id;
								$cnt+=1;
								?>
                                    <tr>
                                    	<td style="text-align: center;"><?php echo $cnt; ?></td>                                        
                                        <td><?php echo $row->pt_name; ?></td>										
										
                                        <td><img src="<?php echo base_url();?>assets/uploads/category/ptype_<?php echo $row->pt_id.'.jpg';?>" width="270px" height="200px"></td>
                                        <td style="text-align: center;" width="2%">
										<a href="<?php echo base_url(); ?>index.php/app/edit_product_cat/<?php echo $pt_id; ?>" class="btn btn-success">Edit</a>                                        
										<a href="<?php echo base_url(); ?>index.php/delete/del_product_cat/<?php echo $pt_id; ?>" onclick="return confirm('Are You Sure You Want To Delete');" class="btn btn-danger">Delete</a>                                        
                                        </td>                                        
                                    </tr>
                                <?php
								endforeach;
								?>    
                                    
                                </tbody>
                            </table>
                        </div>
                    </div>
                    </div>
				
            </div>
            <!-- /.container-fluid -->

        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery Version 1.11.0 -->
    <script src="<?php echo base_url(); ?>assets/Backend/js/jquery-1.11.0.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="<?php echo base_url(); ?>assets/Backend/js/bootstrap.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="<?php echo base_url(); ?>assets/Backend/js/plugins/morris/raphael.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/Backend/js/plugins/morris/morris.min.js"></script>
    <script src="<?php echo base_url(); ?>assets/Backend/js/plugins/morris/morris-data.js"></script>

</body>

</html>
