ok
Direktori : /proc/self/root/proc/thread-self/root/proc/self/root/home2/selectio/www/ramali.in/ |
Current File : //proc/self/root/proc/thread-self/root/proc/self/root/home2/selectio/www/ramali.in/my-account.php |
<?php include 'header1.php' ?> <?php if (isset($_POST['btnEdit'])) { if (ALLOW_MODIFICATION == 0 && !defined(ALLOW_MODIFICATION)) { echo '<label class="alert alert-danger">This operation is not allowed in demo panel!.</label>'; return false; } $mobile = $_POST['mobile']; $error = array(); $sql_query = "UPDATE users SET mobile = '" . $mobile . "' WHERE id =" . $_SESSION['ramali_textiles']['id']; $db->sql($sql_query); $update_result = $db->getResult(); if (!empty($update_result)) { $update_result = 0; } else { $update_result = 1; } if ($update_result == 1) { $error['update_city'] = " <section class='content-header'> <span class='label label-success'>City updated Successfully</span> <h4><small><a href='city.php'><i class='fa fa-angle-double-left'></i> Back to Citiies</a></small></h4> </section>"; } else { $error['update_city'] = " <span class='label label-danger'>Failed update city</span>"; } } ?> <!-- Start of Main --> <main class="main"> <!-- Start of Page Header --> <div class="page-header"> <div class="container"> <h1 class="page-title mb-0">My Account</h1> </div> </div> <!-- End of Page Header --> <!-- Start of Breadcrumb --> <nav class="breadcrumb-nav"> <div class="container"> <ul class="breadcrumb"> <li><a href="index.php">Home</a></li> <li>My account</li> </ul> </div> </nav> <!-- End of Breadcrumb --> <!-- Start of PageContent --> <div class="page-content pt-2"> <div class="container"> <div class="tab tab-vertical row gutter-lg"> <ul class="nav nav-tabs mb-6" role="tablist"> <li class="nav-item"> <a href="#account-dashboard" class="nav-link active">Dashboard</a> </li> <li class="nav-item"> <a href="#account-orders" class="nav-link">Orders</a> </li> <li class="nav-item"> <a href="#account-addresses" class="nav-link">Addresses</a> </li> <li class="nav-item"> <a href="#account-details" class="nav-link">Account details</a> </li> <li class="link-item"> <a href="logout.php">Logout</a> </li> </ul> <div class="tab-content mb-6"> <div class="tab-pane active in" id="account-dashboard"> <p class="greeting"> Hello <span class="text-dark font-weight-bold"><?php if(isset($_SESSION['ramali_textiles'])){ echo $_SESSION['ramali_textiles']['name'] ; }?></span> </p> <p class="mb-4"> From your account dashboard you can view your <a href="#account-orders" class="text-primary link-to-tab">recent orders</a>, manage your <a href="#account-addresses" class="text-primary link-to-tab">shipping and billing addresses</a>, and <a href="#account-details" class="text-primary link-to-tab">edit your password and account details.</a> </p> <div class="row"> <div class="col-lg-4 col-md-6 col-sm-4 col-xs-6 mb-4"> <a href="#account-orders" class="link-to-tab"> <div class="icon-box text-center"> <span class="icon-box-icon icon-orders"> <i class="w-icon-orders"></i> </span> <div class="icon-box-content"> <p class="text-uppercase mb-0">Orders</p> </div> </div> </a> </div> <div class="col-lg-4 col-md-6 col-sm-4 col-xs-6 mb-4"> <a href="#account-addresses" class="link-to-tab"> <div class="icon-box text-center"> <span class="icon-box-icon icon-address"> <i class="w-icon-map-marker"></i> </span> <div class="icon-box-content"> <p class="text-uppercase mb-0">Addresses</p> </div> </div> </a> </div> <div class="col-lg-4 col-md-6 col-sm-4 col-xs-6 mb-4"> <a href="#account-details" class="link-to-tab"> <div class="icon-box text-center"> <span class="icon-box-icon icon-account"> <i class="w-icon-user"></i> </span> <div class="icon-box-content"> <p class="text-uppercase mb-0">Account Details</p> </div> </div> </a> </div> <div class="col-lg-4 col-md-6 col-sm-4 col-xs-6 mb-4"> <a href="logout.php"> <div class="icon-box text-center"> <span class="icon-box-icon icon-logout"> <i class="w-icon-logout"></i> </span> <div class="icon-box-content"> <p class="text-uppercase mb-0">Logout</p> </div> </div> </a> </div> </div> </div> <div class="tab-pane mb-4" id="account-orders"> <div class="icon-box icon-box-side icon-box-light"> <span class="icon-box-icon icon-orders"> <i class="w-icon-orders"></i> </span> <div class="icon-box-content"> <h4 class="icon-box-title text-capitalize ls-normal mb-0">Orders</h4> </div> </div> <table class="shop-table account-orders-table mb-6"> <?php $user_id =""; if(isset($_SESSION['ramali_textiles'])){ $user_id = $_SESSION['ramali_textiles']['id']; } $order_id=$_GET['id']; $query = $pdo->prepare("SELECT * FROM orders WHERE status=1 AND user_id=$user_id ORDER BY id DESC"); $query->execute(); $order = $query->fetchAll(PDO::FETCH_ASSOC); $total_orders = $query->rowCount(); if($total_orders>0){ ?> <thead> <tr> <th class="order-id">Order</th> <th class="order-date">Date</th> <th class="order-total">Total</th> <th class="order-actions">Actions</th> </tr> </thead> <tbody> <?php foreach($order as $order_data){ ?> <tr> <td class="order-id"> <?= $order_data['id'] ?> </td> <td class="order-date"> <?= $order_data['date_added'] ?> </td> <td class="order-total"> <span class="order-price"><?= $order_data['total'] ?></span> </td> <td class="order-action"> <a href="#" class="btn btn-outline btn-default btn-block btn-sm btn-rounded">View</a> </td> </tr> <?php } } else { echo 'No Orders'; error_log("order is working"); }?> </tbody> </table> <a href="#" class="btn btn-dark btn-rounded btn-icon-right">Go Shop<i class="w-icon-long-arrow-right"></i></a> </div> <div class="tab-pane" id="account-downloads"> <div class="icon-box icon-box-side icon-box-light"> <span class="icon-box-icon icon-downloads mr-2"> <i class="w-icon-download"></i> </span> <div class="icon-box-content"> <h4 class="icon-box-title ls-normal">Downloads</h4> </div> </div> <p class="mb-4">No downloads available yet.</p> <a href="#" class="btn btn-dark btn-rounded btn-icon-right">Go Shop<i class="w-icon-long-arrow-right"></i></a> </div> <div class="tab-pane" id="account-addresses"> <div class="icon-box icon-box-side icon-box-light"> <span class="icon-box-icon icon-map-marker"> <i class="w-icon-map-marker"></i> </span> <div class="icon-box-content"> <h4 class="icon-box-title mb-0 ls-normal">Addresses</h4> </div> </div> <?php $user_id =""; if(isset($_SESSION['ramali_textiles'])){ $user_id = $_SESSION['ramali_textiles']['id']; } $order_id=$_GET['id']; $user_sql = $pdo->prepare("SELECT * FROM `users` WHERE id=$user_id"); $user_sql->execute(); $user_rst = $user_sql->fetchAll(PDO::FETCH_ASSOC); ?> <p>The following addresses will be used on the checkout page by default.</p> <div class="row"> <div class="col-sm-12 mb-12"> <div class="ecommerce-address shipping-address pr-lg-8"> <h4 class="title title-underline ls-25 font-weight-bold">Shipping Address</h4> <address class="mb-4"> <table class="address-table"> <tbody> <tr> <th>Name:</th> <td><?= $user_rst[0]['name'] ?></td> </tr> <tr> <th>Address:</th> <td><?= $user_rst[0]['area'] ?></td> </tr> <tr> <th>City:</th> <td><?= $user_rst[0]['city'] ?></td> </tr> <tr> <th>Country:</th> <td><?= $user_rst[0]['city'] ?></td> </tr> <tr> <th>PINcode:</th> <td><?= $user_rst[0]['pincode'] ?></td> </tr> </tbody> </table> </address> <a href="#" class="btn btn-link btn-underline btn-icon-right text-primary">Edit your shipping address<i class="w-icon-long-arrow-right"></i></a> </div> </div> </div> </div> <div class="tab-pane" id="account-details"> <div class="icon-box icon-box-side icon-box-light"> <span class="icon-box-icon icon-account mr-2"> <i class="w-icon-user"></i> </span> <div class="icon-box-content"> <h4 class="icon-box-title mb-0 ls-normal">Account Details</h4> </div> </div> <form class="form account-details-form" action="#" method="post"> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label for="firstname">First name *</label> <input type="text" id="firstname" value="<?= $user_rst[0]['name'] ?> " name="firstname" placeholder="Firstname" class="form-control form-control-md"> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="lastname">Last name *</label> <input type="text" id="lastname" name="" value=" <?= $user_rst[0]['name'] ?>" placeholder="Last Name" class="form-control form-control-md"> </div> </div> </div> <div class="form-group mb-6"> <label for="email_1">Email address *</label> <input type="email" id="email_1" value="<?= $user_rst[0]['email'] ?>" name="email" class="form-control form-control-md"> </div> <div class="form-group mb-6"> <label for="email_1">Mobile No *</label> <input type="number" id="mobile" value="<?= $user_rst[0]['mobile'] ?>" name="mobile" class="form-control form-control-md"> </div> <h4 class="title title-password ls-25 font-weight-bold">Password change</h4> <div class="form-group"> <label class="text-dark" for="cur-password">Current Password leave blank to leave unchanged</label> <input type="password" value="<?= $user_rst[0]['password'] ?>" class="form-control form-control-md" id="cur-password" name="cur_password"> </div> <div class="form-group"> <label class="text-dark" for="new-password">New Password leave blank to leave unchanged</label> <input type="password" class="form-control form-control-md" id="new-password" name="new_password"> </div> <div class="form-group mb-10"> <label class="text-dark" for="conf-password">Confirm Password</label> <input type="password" class="form-control form-control-md" id="conf-password" name="conf_password"> </div> <button type="submit" name="btnEdit" class="btn btn-dark btn-rounded btn-sm mb-4">Save Changes</button> </form> </div> </div> </div> </div> </div> <!-- End of PageContent --> </main> <!-- End of Main --> <?php include 'footer.php' ?>