MMCT TEAM
Server IP : 2a02:4780:11:1017:0:31f1:b895:8  /  Your IP : 216.73.216.163
Web Server : LiteSpeed
System : Linux in-mum-web917.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64
User : u837925013 ( 837925013)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u837925013/domains/tech2wizard.com/public_html/admin/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u837925013/domains/tech2wizard.com/public_html/admin/order.php
<?php 
$page='order';
$page1='';
include('inc/sidebar.php') ;
if(isset($_GET['del'])){
    $id = $_GET['del'];
    $del = mysqli_query($con,"DELETE FROM `order` where id = '$id'");
    $del1 = mysqli_query($con,"DELETE FROM `order_detail` where order_id = '$id'");
    if($del && $del1){
        echo "<script type='text/javascript'>window.location=\"order.php\";</script>"; 
    }
}
    
?>


<!-- navbar-wrapper start -->
  <div class="body-wrapper">
    <div class="bodywrapper__inner">
        <div class="row align-items-center mb-30 justify-content-between">
            <div class="col-lg-4 col-sm-6">
                <h6 class="page-title">All Booking</h6>
            </div>
            <div class="col-lg-8 col-sm-6 text-sm-right mt-sm-0 mt-3 right-part">
                <div class="d-flex flex-wrap justify-content-end flex-gap-8">
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-body p-0">
                        <div class="table-responsive--md table-responsive">
                            <table id="example"class="table table--light style--two table-striped">
                                <thead>
                                    <tr>
                                        <th>SL</th>
                                        <th>BOOKING ID</th>
                                        <th>BOOKING DATE</th>
                                        <th>PAYMENT TYPE</th>
                                        <th>TOTAL PRICE</th>
                                        <th>PAYMENT STATUS</th>
                                        <th>BOOKING STATUS</th>
                                        <th>ACTION</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php	
                                        $sql= "SELECT * FROM `order` ORDER BY id DESC";
                                        $qry= mysqli_query($con,$sql);
                                        $i=0;
                                        while($data= mysqli_fetch_array($qry)) { $i++; 
                                    ?>
                                    <tr>
                                        <td data-label="SL"><?php echo $i; ?></td>
                                        <td data-label="Name"><?php echo $data['orderID']; ?></td>
                                        <td data-label="Name"><?php echo date('M d, Y H:i A', strtotime($data['added_on'])); ?></td>
                                        <td data-label="Name"><?php echo $data['payment_type']; ?></td>
                                        <td data-label="Name"><?php echo '₹ '.number_format($data['total_price'],2,".",","); ?></td>
                                        <td data-label="Name"><?php echo $data['payment_status']; ?></td>
                                        <td data-label="Name">
                                        <?php 
                                            $get_os= mysqli_fetch_array($con->query("select * from order_status WHERE id='".$data['order_status']."'"));
                                            echo $get_os['name']; 
                                        ?>
                                        </td>
                                        <td data-label="Action">
                                            <!-- <button  class="icon-btn"  onclick="location.reload();location.href='invoice.php?Order=<?php echo $data['id'];?>'"id="" >RECIEPT</button> -->
                                            <a  href="view-order.php?Order=<?php echo $data['id'];?>"class="icon-btn edit">VIEW</a>
                                            <a href="order.php?del=<?php echo $data['id'];?>" onclick="return confirm('Are you sure you want to delete this?');"class="icon-btn btn-danger">DELETE</a>
                                        </td>
                                    </tr>
                                    <?php } ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>        
    </div>
</div>
</div>
</div>
<?php include('inc/footer.php') ?>

MMCT - 2023