JB_confirm_package_invoice($_REQUEST['invoice_id']); $JBMarkup->ok_msg('Order Confirmed'); } if ($_REQUEST['action'] == 'complete') { $invoice_row = JB_get_product_invoice_row($_REQUEST['invoice_id']); if (isset($invoice_row['employer_id'])) { $txn_prefix = 'E'; } else { $txn_prefix = 'P'; } JB_complete_package_invoice($_REQUEST['invoice_id'], ''); JB_debit_transaction($_REQUEST['invoice_id'], $invoice_row['amount'], $invoice_row['currency_code'], $txn_prefix . 'P' . $_REQUEST['invoice_id'], $reason_code, 'Admin', 'P'); $JBMarkup->ok_msg('Order Completed.'); } if ($_REQUEST['action'] == 'void') { JB_void_package_invoice($_REQUEST['invoice_id']); $JBMarkup->ok_msg('Order set to Void.'); } if ($_REQUEST['action'] == 'cancel') { JB_cancel_package_invoice($_REQUEST['invoice_id']); $JBMarkup->ok_msg('Order Cancelled'); } if ($_REQUEST['clean_up'] != '') { $sql = "DELETE FROM package_invoices WHERE status='Void' "; JB_mysql_query($sql) or die(mysql_error()); $JBMarkup->ok_msg('Delted void Orders.'); } $local_time = strtotime(gmdate("Y-m-d H:i:s")); preg_match("#(\\d+)-(\\d+)-(\\d+)#", gmdate("Y-m-d H:i:s"), $local_m); $prev_time = $local_time - 60 * 60 * 24 * 30; // minus 30 days
# License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. ########################################################################### require "../config.php"; include 'login_functions.php'; JB_process_login(); JB_template_employers_header(); $cancel = (int) $_REQUEST['cancel']; $action = $_REQUEST['action']; $package_id = (int) $_REQUEST['package_id']; // set fees flag if (JB_POSTING_FEE_ENABLED == 'YES' || JB_PREMIUM_POSTING_FEE_ENABLED == 'YES') { $_FEES_ENABLED = "YES"; } if ($cancel_id != '') { JB_void_package_invoice($cancel_id); } if ($_FEES_ENABLED == "YES") { $posts_num = JB_get_num_posts_remaining($_SESSION['JB_ID']); $p_posts_num = JB_get_num_premium_posts_remaining($_SESSION['JB_ID']); ?> <table style="margin: 0 auto; width:90%; border:0px" cellpadding="10" cellspacing="0" > <tr> <td style="width: 50%" valign="top"> <!-- left col --> <?php if (JB_POSTING_FEE_ENABLED == "YES" && $posts_num > -1) { ?> <h3><?php