vdp

Untitled

vdp
Jul 31st, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.12 KB | None | 0 0
  1.  
  2.  
  3.  
  4. <?php
  5.     session_start();
  6.  
  7.  if (!isset($_SESSION["customer_email"]))
  8.    {
  9.       header("location: checkout.php");
  10.    }
  11. include("../includes/db.php");
  12. include("../functions/functions.php");
  13. include("../includes/header.php");
  14. ?>
  15.  
  16.     <section>
  17.         <div class="container">
  18.             <div class="row">
  19.                 <div class="col-sm-3">
  20.                     <div class="left-sidebar">
  21.                         <h2>My Account</h2>
  22.                         <div class="panel-group category-products" id="accordian"><!--category-products start-->
  23.                             <div class="category-tab ul li ">
  24.                                 <ul class="nav nav-pills nav-stacked" id="categories">
  25.                                     <?php
  26.                                      if(isset($_SESSION['customer_email']))
  27.                                      {
  28.                                         $user_session=$_SESSION['customer_email'];
  29.                                         $get_customer_pic = "select * from customers where customer_email='$user_session'";
  30.                                         $run_customer=mysqli_query($con,$get_customer_pic);
  31.                                         $row_customer = mysqli_fetch_array($run_customer);
  32.                                         $customer_pic=$row_customer['customer_image'];
  33.  
  34.                                         echo "<img src='customer_photos/$customer_pic' width='255' height='180'>";
  35.  
  36.                                      }
  37.  
  38.  
  39.                                     ?>
  40.                                     <li> <a href="my_account.php?my_orders">My Orders </a></li>
  41.                                     <li> <a href="my_account.php?edit_account">Edit Account </a></li>
  42.                                     <li> <a href="my_account.php?change_pass">Change Password </a></li>
  43.                                     <li> <a href="my_account.php?delete_account">Delete Account </a></li>
  44.                                     <li> <a href="../logout.php">Logout </a></li>
  45.                                     <br>
  46.                                     <br>
  47.                                     <br>
  48.                                     <br><br>
  49.                                     <br><br>
  50.                                     <br><br>
  51.                                     <br>
  52.                                 </ul>
  53.                             </div>
  54.  
  55.                         </div><!--/category-products ends-->
  56.  
  57.  
  58.  
  59.  
  60.                     </div>
  61.                 </div>
  62.  
  63.                 <div class="col-sm-9 padding-right">
  64.                 <?php
  65.                     //$ip = getRealIpAddress();
  66.                     //echo $ip;
  67.                     $title = null;
  68.                 ?>
  69.                     <div class="features_items"  id="products_box"><!--features_items start-->
  70.                         <?php
  71.                             if(isset($_GET['my_orders']))
  72.                             {
  73.                                 $title="My Order";
  74.                             }
  75.  
  76.                             if(isset($_GET['edit_account']))
  77.                             {
  78.                                 $title="Update Account";
  79.                             }
  80.  
  81.                             if(isset($_GET['change_pass']))
  82.                             {
  83.                                 $title="Change Password";
  84.                             }
  85.  
  86.                             if(isset($_GET['delete_account']))
  87.                             {
  88.                                 $title="Delete Account";
  89.                             }
  90.  
  91.                             ?>
  92.                         <h2 class="title text-center"><?php echo $title;?></h2>
  93.  
  94.                             <?php
  95.                                 getDefault();
  96.                             ?>
  97.  
  98.                             <?php
  99.                             //THIS IS ALL FOR CUSTOMER ACCOUNT MANAGEMENT
  100.                             //THE PARAMETER WILL BE PASSED WHEN USER CLICKS THE LINK
  101.                             if(isset($_GET['my_orders']))
  102.                             {
  103.                                 include("my_orders.php");
  104.                             }
  105.  
  106.                             if(isset($_GET['edit_account']))
  107.                             {
  108.                                 include("edit_account.php");
  109.                             }
  110.  
  111.                             if(isset($_GET['change_pass']))
  112.                             {
  113.                                 include("change_pass.php");
  114.                             }
  115.  
  116.                             if(isset($_GET['delete_account']))
  117.                             {
  118.                                 include("delete_account.php");
  119.                             }
  120.  
  121.                             ?>
  122.  
  123.  
  124.                     </div><!--features_items Ends-->
  125.  
  126.  
  127.                     </div><!--/category-tab-->
  128.  
  129.  
  130.  
  131.                 </div>
  132.             </div>
  133.         </div>
  134.     </section>
  135.     <?php include("../includes/footer.php");?>
  136. </body>
  137. </html>
Add Comment
Please, Sign In to add comment