$results = $product->pro_category_insert($_POST); } if ($results) { echo '<div class="alert alert-success alert-block fade in alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <strong>Add Product Category Sucessfully</strong> </div>'; } else { echo '<div class="alert alert-danger alert-block fade in alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <strong>Error</strong> </div>'; } } if (isset($ID)) { $product_result = $product->get_product_category($ID); } ?> <div class="the-box noborder"> <form id="ExampleBootstrapValidationForm" method="post" action="" class="form-horizontal"> <div class="form-group"> <label class="col-lg-3 control-label">Category Name</label> <div class="col-lg-5"> <input type="text" name="p_name" value="<?php echo isset($ID) ? $product_result[0]->pc_name : ''; ?> " class="form-control" required> </div> </div> <div class="form-group">
<!-- End breadcrumb --> <div class="panel panel-info"> <div class="panel-heading"> <div class="right-content"> <a href="add_product_category.php"><button class="btn btn-success btn-perspective btn-lg pull-right">ADD NEW PRODUCT CATEGORY</button></a> </div> <h3>Manage Products Categories</h3> </div> <div class="panel-body"> <!-- BEGIN DATA TABLE --> <div class="the-box"> <div class="table-responsive"> <?php $product = new product(); $results = $product->get_product_category(); if ($results) { ?> <table class="table table-striped table-hover" id="datatable-example"> <thead class="the-box dark full"> <tr> <th>Product Category Name</th> <th></th> </tr> </thead> <tbody> <?php foreach ($results as $res) { echo '<tr>'; echo '<td>' . $res->pc_name . '</td>'; echo '<td><a href="add_product_category.php?id=' . $res->pc_id . '" class="btn btn-info active">EDIT</a></td>';