GIF89a php
Current File : /home/hencockfreshchic/public_html/app/myAccount.php
<?php
ob_start();
ini_set('error_reporting', E_STRICT);
include("session.php");
include("connect.php");
include("libs.php");
mysqli_set_charset($conn,'utf8');
date_default_timezone_set('Asia/Kolkata');

$sqlU="SELECT * FROM `app_admin` WHERE `sr`='".$_COOKIE["user_id"]."'";
$rsU=mysqli_query($conn,$sqlU);
$rowU=mysqli_fetch_assoc($rsU);

?>
<!DOCTYPE html>
<html>

<?php include'head.php'; ?>
<body>
<?php include'header.php'; ?>
<div onclick="closeNav()">
 
  <div class="container no-gutters">
    <!-- <div class="row row-spac no-gutters">
       <div class="col-md-5 no-gutters" style="margin: auto;padding: 0px;">
        <div class="container m-0 p-0">
          <div class="row my-1">
            <div class="col-12">
             <h5 class="my-2"><i class="bi bi-file-person-fill text-dark"></i> My Account</h5>
             <p class="my-0">Log in or Sign up to view your complete profile</p>
             <div class="d-grid"><button class="btn btn-outline-success my-3 fs-6" type="button">Continue</button></div>
            </div>
          </div>
        </div>
       </div>
     </div> -->
     <div class="row row-spac no-gutters">
       <div class="col-md-5 no-gutters" style="margin: auto;padding: 0px;">
        <div class="container m-0 p-0">
          <div class="row my-1">
            <div class="col-12">
             <h5 class="my-2"><i class="bi bi-file-person-fill text-dark"></i> My Account</h5>
             <small class="my-0 text-muted">+91 <?php echo $rowU["mobb"]; ?></small>
            </div>
            <div class="col-12">
             <small class="my-0 text-muted"><?php echo ucfirst($rowU["user_name"]); ?></small>
            </div>
          </div>
        </div>
       </div>
     </div>

     <div class="row row-spac no-gutters my-2">
       <div class="col-md-5 no-gutters" style="margin: auto;padding: 0px;">
          <div class="container no-gutters">
            <div class="row row-spac no-gutters bg-light rounded p-3">
             <div class="col-4 text-center">
               <span class="text-success text-center" onclick="pageRedirect('cart.php')"><i class="bi bi-cart-fill fs-2 text-success"></i><br><b>Cart</b></span>
             </div>
             <div class="col-4 text-center" onclick="pageRedirect('tel:9958571006')">
               <span class="text-success text-center"><i class="bi bi-chat-left-text-fill fs-2 text-success"></i><br><b>Support</b></span>
             </div>
             <div class="col-4 text-center">
               <span class="text-success text-center"><i class="bi bi-credit-card fs-2 text-success" onclick="pageRedirect('changeDetails.php')"></i><br> <b>Change Details</b></span>
             </div>
           </div>
          </div>
       </div>
     </div>
     <strong class="my-2 text-muted"> Your Information</strong>
    <div class="row bg-light my-2 row-spac no-gutters">
      <div class="col-12 rounded">
           <ul class="list-group list-group-flush">
          <li class="list-group-item px-0 bg-light fw-light">
            <a href="allOrders.php">
          <div class="float-start text-muted">
            <h6 class="my-2 text-dark"><i class="bi bi-bag-fill text-success fs-5"></i> Your Orders</h6>
          </div>
          <div class="float-end"><i class="bi bi-arrow-right-circle-fill text-dark mx-3 fs-5"></i></div>
          </a>
          </li>
          <li class="list-group-item px-0 bg-light fw-light">
          <div class="text-muted">
            <h6 class="my-2 text-dark"><i class="bi bi-journal-bookmark text-success fs-5"></i> Address Book</h6>
          </div>
          <div>
            <?php
              $sqlA="SELECT * FROM `shipping_address` WHERE `user_id`='".$_COOKIE["user_id"]."'";
              $rsA=mysqli_query($conn,$sqlA);
              $chkA=mysqli_num_rows($rsA);
              if($chkA>0){
                while($rowA=mysqli_fetch_array($rsA)){
                if($rowA['default_adds']=="1"){
            ?>
            <span class="float-start">
              <small class="fw-bold text-dark">Address: <img src="../admin.cpanel/icons/delete.png" style="width: 20px; height: 20px;" onclick="deleteData('<?php echo $rowA['sr']; ?>','shipping_address')"></small>
              <p><?php echo $rowA['user_name'].",".$rowA['address']."-".$rowA['pincode']."(Default)"; ?></p>
            </span>
             <?php } else { ?>
              <span class="float-start">
              <small class="fw-bold text-dark">Address:  <img src="../admin.cpanel/icons/delete.png" style="width: 20px; height: 20px;" onclick="deleteData('<?php echo $rowA['sr']; ?>','shipping_address')"></small>
              <p><?php echo $rowA['user_name'].",".$rowA['address']."-".$rowA['pincode']; ?></p>
            </span>
          <?php } } } ?>
            <!-- <span class="float-end ">
              <a href="#"> <i class="bi bi-pencil-square text-dark"></i></a>
            </span> -->
          </div><br>
            <a href="addAddress.php" class="text-success float-end my-2"> + Add New </a>
          </li>
        </ul>
      </div>
    </div>
    <strong class="my-2 text-muted"> Other Information</strong>
    <div class="row bg-light my-2 row-spac no-gutters">
      <div class="col-12 rounded">
           <ul class="list-group list-group-flush">
          <li class="list-group-item px-0 bg-light fw-light">
          <div class="float-start text-muted">
            <a href="about.php">
            <h6 class="my-2 text-dark"><i class="bi bi-info-circle-fill text-success fs-5"></i> About Us</h6>
            </a>
          </div>
          <div class="float-end"><i class="bi bi-arrow-right-circle-fill text-dark mx-3 fs-5" onclick="pageRedirect('about.php')"></i></div>
          </li>
          <li class="list-group-item px-0 bg-light fw-light">
          <div class="float-start text-muted">
            <a href="logout.php"><h6 class="my-2 text-dark"><i class="bi bi-box-arrow-left text-success fs-5"></i> Logout</h6></a>
          </div>
          <!-- <div class="float-end"><i class="bi bi-arrow-left-circle-fill text-dark mx-3 fs-5"></i></div> -->
          </li>
        </ul>
      </div>
    </div>
   </div> 
   <div class="container no-gutters mb-5">
      <div class="row row-spac no-gutters">
       <div class="col-md-5 no-gutters" style="margin: auto;padding: 0px;">
         <!-- <img src="assest/images/banner/img-12.png" class="img-fluid mx-auto d-flex" style="height: auto; max-width: 90%;"> --> 
       </div>
     </div>
   </div>
 </div>
<?php include 'footer.php';?>

  <script>
function openNav() {
  document.getElementById("mySidebar").style.width = "250px";
  document.getElementById("main").style.marginLeft = "250px";
}

function closeNav() {
  document.getElementById("mySidebar").style.width = "0";
  document.getElementById("main").style.marginLeft= "0";
}
</script>
</body>
</html>
<div id="snackbar"><span id="snack_msgg" style="color: white"></span></div>