| DIR: /home/islapiiu/sites/pramudi/control-panel/ |
| Current File : /home/islapiiu/sites/pramudi/control-panel/manage-products.php |
<?php
include_once(dirname(__FILE__) . '/../class/include.php');
include_once(dirname(__FILE__) . '/auth.php');
$id = '';
if (isset($_GET['id'])) {
$id = $_GET['id'];
}
$PRODUCT_CATEGORY = new ProductCategory($id);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<title>Sub Category</title>
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="../images/3d-fav1.png" />
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css">
<link href="plugins/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="plugins/node-waves/waves.css" rel="stylesheet" />
<link href="plugins/animate-css/animate.css" rel="stylesheet" />
<link href="plugins/sweetalert/sweetalert.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet">
<link href="css/themes/all-themes.css" rel="stylesheet" />
</head>
<body class="theme-red">
<?php
include './navigation-and-header.php';
?>
<section class="content">
<div class="container-fluid">
<?php
$vali = new Validator();
$vali->show_message();
?>
<!-- Vertical Layout -->
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card">
<div class="header">
<h2>Create Product - <?= $PRODUCT_CATEGORY->name; ?></h2>
<ul class="header-dropdown">
<li>
<a href="manage-product-categories.php">
<i class="material-icons">add</i>
</a>
</li>
</ul>
</div>
<div class="body">
<form class="form-horizontal" method="post" action="post-and-get/product.php" enctype="multipart/form-data">
<div class="col-md-12">
<div class="form-group form-float">
<div class="form-line">
<input type="text" id="name" class="form-control" autocomplete="off" name="name" required="true">
<label class="form-label">Name</label>
</div>
</div>
</div>
<div class="col-md-12">
<input type="hidden" name="category" value="<?= $PRODUCT_CATEGORY->id; ?>" />
<input type="submit" name="create" class="btn btn-primary m-t-15 waves-effect" value="create"/>
</div>
</form>
<div class="row">
</div>
<div class="row clearfix">
<hr/>
<div class="heading m-cat">
<p>Manage Products</p>
<a href="manage-products.php">
</a>
</div>
<div>
<table class="table table-bordered table-striped table-hover js-basic-example dataTable">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Options</th>
<!-- <th>Category ID</th>-->
</tr>
</thead>
<tfoot>
<tr>
<th>ID</th>
<th>Name</th>
<th>Options</th>
<!-- <th>Category ID</th>-->
</tr>
</tfoot>
<tbody>
<?php
foreach (Product::getProductByProductCategory($id) as $key => $product) {
$key++;
?>
<tr id="row_<?php echo $product['id']; ?>">
<td><?php echo $key; ?></td>
<td><?php echo $product['name']; ?></td>
<!-- <td><?php echo $product['product_category']; ?></td> -->
<td>
<a href="edit-product.php?id=<?php echo $product['id']; ?>"> <button class="glyphicon glyphicon-pencil edit-btn" title="Edit Product"></button>
</a>
|
<a href="#" >
<button class="glyphicon glyphicon-trash delete-btn delete-product" title="Delete Product" data-id="<?php echo $product['id']; ?>"></button>
</a>
|
<a href="arrange-products.php?id=">
<button class="glyphicon glyphicon-random arrange-btn" title="Arrange Products"></button>
</a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- #END# Manage brand -->
</div>
<!-- #END# Vertical Layout -->
<!--</div>-->
</section>
<!-- Jquery Core Js -->
<script src="plugins/jquery/jquery.min.js"></script>
<script src="plugins/bootstrap/js/bootstrap.js"></script>
<script src="plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
<script src="plugins/node-waves/waves.js"></script>
<script src="js/admin.js"></script>
<script src="js/demo.js"></script>
<script src="js/add-new-ad.js" type="text/javascript"></script>
<script src="delete/js/product.js" type="text/javascript"></script>
<script src="js/ajax/product.js" type="text/javascript"></script>
<script src="plugins/sweetalert/sweetalert.min.js"></script>
<script src="plugins/bootstrap-notify/bootstrap-notify.js"></script>
<script src="js/pages/ui/dialogs.js"></script>
</body>
</html> |