<?php

use_class('payone/financegateConnect');
use_class('jng_sp');
use_class('jng_sp_orders');
use_class('jng_sp_customers');
use_class('payone');
use_class('payone_invoice');
use_class('payone_logger');
$class_sp = new jng_sp();
$class_jo = new jng_sp_orders();
$class_jcust = new jng_sp_customers();
$class_payone = new payone();
//SP SETTING
salesPartnerCombo();
//AJAX ACTION
if (isset($_POST['me_action'])) {
    if ($_POST['me_action'] == 'LOADUNSUBMITTEDORDERS') {
        $orders = $class_payone->newSPorders($jng_sp_id);
        $result = $class_payone->drawListTable($orders);
    } elseif ($_POST['me_action'] == 'AUTHORIZATION') {
        $process_method = 'authorization';
        $order_id = tep_db_prepare_input($_POST['orders_id']);
        $order = $class_jo->retrieveDetail($order_id);
        $items = $class_jo->retrieveItems($order_id);
        $cust = $class_jcust->retrieveDetail(null, $order['jng_sp_id'], $order['customer_billing_id']);
        foreach ($items as $key => $i) {
            if ($class_jo->statusIsCancelled($i['status'])) {
                unset($items[$key]);
            }
        }
<?php

use_class('jng_sp');
$class_sp = new jng_sp();
use_class('jng_sp_catalog');
$class_jc = new jng_sp_catalog();
use_class('products_brand');
$class_pb = new products_brand();
//SP SETTING
salesPartnerCombo(true);
//$jng_sp_id = '1';
//GET PAGE
$session_page = 'analysis-vc-total';
$page = 1;
if (isset($_GET['page'])) {
    $page = $_GET['page'];
}
$sp_info = $class_sp->retrieveDetail($jng_sp_id);
//FILTER OPTIONS
$keywords = '';
$filter_query = array();
if (isset($_POST['nav-filter'])) {
    $navfiltered = tep_db_prepare_input($_POST['nav-filter']);
    if ($navfiltered != '') {
        $_SESSION[$session_page]['nav-filter'] = $navfiltered;
    } else {
        unset($_SESSION[$session_page]['nav-filter']);
    }
} elseif (isset($_SESSION[$session_page]['nav-filter'])) {
    $navfiltered = $_SESSION[$session_page]['nav-filter'];
}