Beispiel #1
0
 /**
  *	Remove a shipping address from the shipping_addresses table
  */
 private function DeleteShippingAddress()
 {
     if (isset($_GET['address_id'])) {
         $entity = new ISC_ENTITY_SHIPPING();
         if ($entity->delete($_GET['address_id'], $GLOBALS['ISC_CLASS_CUSTOMER']->GetCustomerId())) {
             if (isset($_SESSION['LOGIN_REDIR'])) {
                 // Take them to the page they wanted
                 $page = $_SESSION['LOGIN_REDIR'];
                 unset($_SESSION['LOGIN_REDIR']);
                 header(sprintf("Location: %s", $page));
             } else {
                 // Take them to the my account page
                 header(sprintf("Location: %s/account.php", $GLOBALS['ShopPath']));
             }
         } else {
             // Database error
             ob_end_clean();
             header(sprintf("location:%s/account.php", $GLOBALS['ShopPath']));
             die;
         }
     } else {
         // Bad details
         ob_end_clean();
         header(sprintf("location:%s/account.php", $GLOBALS['ShopPath']));
         die;
     }
 }