} $total_cust = count($customers); $result .= '<div class="bold">Total Customers: ' . $total_cust . ' • Total Orders: ' . $total_found . ' • Total Products: ' . $total_order_qty . '</div>'; $result .= tep_draw_table('spo', $found); } echo utf8_encode($result); exit; } elseif ($_POST['me_action'] == 'UPDATEORDERPRIORITY') { $orders_type = tep_db_prepare_input($_POST['orders_type']); $orders_id = tep_db_prepare_input($_POST['orders_id']); $priority = tep_db_prepare_input($_POST['priority']); $status = false; //false=failed and disabled checkbox, true=success $items = null; if ($orders_type == 'SP') { $status = $class_jo->setOrderPriority($orders_id, $priority); } elseif ($orders_type == 'JG') { //currently not supported } $ajaxResult = array(); $ajaxResult['orders_type'] = $orders_type; $ajaxResult['orders_id'] = $orders_id; $ajaxResult['priority'] = $priority ? '1' : '0'; $ajaxResult['status'] = $status; ajaxReturn($ajaxResult); exit; } } $spdata = array(); $spdata_raw = $class_sp->retrieveList(); foreach ($spdata_raw as $spd) {