📁 File Manager
Editing:
/home/wedigitalindia/public_html/home-wedigitalindia/jopajifoods/orders.php
<?php if(!isset($_COOKIE["shopping_user"])) header("location:login.php"); if(isset($_COOKIE["shopping_user"])) { $cookie_data = stripslashes($_COOKIE['shopping_user']); $cart_data = json_decode($cookie_data, true); foreach($cart_data as $keys => $values) { $cs_id= $values["Userid"]; $username=$values["username"]; $use_email=$values["use_email"]; } } "SELECT * FROM tbl_order WHERE uid='$cs_id'"; $qry=mysqli_query($con,"SELECT * FROM tbl_order WHERE uid='$cs_id'"); ?> <!DOCTYPE html> <html> <head> <?php require_once("include/head.php"); require_once("config.php") ?> </head> <body> <?php require_once("include/header.php")?> <!--================End Main Header Area =================--> <section class="banner_area wow bounceInDown"> <picture> <source media="(max-width:767px)" srcset="img/banner/sandwitch.jpg"> <source media="(min-width:768px)" srcset="img/banner/sandwitch.jpg"> <img src="" alt=""> </picture> <div class="container"> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="<?php echo website_base_path(); ?>">Home</a></li> <li class="breadcrumb-item active" aria-current="page">My Orders</li> </ol> </nav> </div> </section> <!--================End Main Header Area =================--> <!--================Dashboard Area =================--> <section class="contact_form_area p_100"> <div class="container"> <div class="row"> <div class="col-md-3"> <?php include_once("include/left_sidebar.php")?> </div> <div class="col-md-9"> <aside class="right-side"> <div class="main_title"> <h2>My Orders</h2> <h5>Do you have anything in your mind to let us know? Kindly don't delay to connect to us by means of our contact form.</h5> </div> <div class="order-table"> <table> <thead> <tr> <th>S. No.</th> <th>Product Name</th> <th>Quantity</th> <th>Order Date</th> <th>Delivery Status</th> </tr> </thead> <tbody> <?php $i=0; $sel = "select * from tbl_order where uid='$cs_id'"; $rsc = mysqli_query($con,$sel); while($row = mysqli_fetch_assoc($rsc)) { $pid = $row['pid']; $qty = (int)$row['qty']; $qry_cat="SELECT * FROM tbl_product WHERE pid='$pid' limit 1"; $rsc_cat=mysqli_query($con,$qry_cat); while($row1=mysqli_fetch_array($rsc_cat)){ $i++; $date = $row['OrderDate']; $time = strtotime($date); $day = date('d M Y', $time); $ddate = new DateTime($day); $ddate->modify('+7 day'); $ddate->format('d M Y'); ?> <tr> <td><?php echo $i;?></td> <td><a href="product-detail.php?id=<?php echo $row['pid']; ?>" target="_blank"><?php echo $row1['productname']; ?></a></td> <td><?php echo $row['qty']; ?></td> <td><?php echo $day ?></td> <td><a href=""><?php echo $row['OrderStatus']; ?></a></td> </tr> <?php }} ?> </tbody> </table> </div> </aside> </div> </div> </div> </section> <!--================End Dashboard Area =================--> <?php require_once("include/footer.php")?> </body> </html>
Save
Cancel