function check_order_status($start = false) { global $PayPal_osC, $customers_id; include_once PAYPAL_IPN_DIR . 'database_tables.inc.php'; if (olc_session_is_registered('PayPal_osC')) { if ($start === true && PHP_VERSION < 4) { $PayPal_osC_backup = $PayPal_osC; $PayPal_osC = new PayPal_osC(); $PayPal_osC->unserialize($PayPal_osC_backup); } $orders_session_query = olc_db_query("select payment_id from " . TABLE_ORDERS . " where orders_id = " . (int) $PayPal_osC->orders_id); $orders_session_check = olc_db_fetch_array($orders_session_query); if ($orders_session_check['payment_id'] > 0) { PayPal_osC::reset_checkout_cart_session(); return true; } return false; } return false; }
} if (CUSTOMER_STATUS_ID != DEFAULT_CUSTOMERS_STATUS_ID_GUEST) { olc_redirect(olc_href_link(FILENAME_DEFAULT, $notify_string)); } //begin PayPal_Shopping_Cart_IPN /* } else { olc_redirect(olc_href_link(FILENAME_LOGOFF, $notify_string)); } */ } else { if ($action == 'success') { if (!class_exists('PayPal_osC')) { include_once PAYPAL_IPN_DIR . 'Classes/osC/osC.class.php'; } PayPal_osC::reset_checkout_cart_session(); } else { olc_redirect(olc_href_link(FILENAME_LOGOFF, $notify_string)); } } //end PayPal_Shopping_Cart_IPN // include needed functions require_once DIR_FS_INC . 'olc_draw_checkbox_field.inc.php'; require_once DIR_FS_INC . 'olc_draw_selection_field.inc.php'; require_once DIR_FS_INC . 'olc_image_button.inc.php'; $breadcrumb->add(NAVBAR_TITLE_1_CHECKOUT_SUCCESS); $breadcrumb->add(NAVBAR_TITLE_2_CHECKOUT_SUCCESS); $global_query = olc_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int) $_SESSION['customer_id'] . APOS); $global = olc_db_fetch_array($global_query); $orders_query = olc_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int) $_SESSION['customer_id'] . "' order by date_purchased desc limit 1"); $orders = olc_db_fetch_array($orders_query);