} } echo utf8_encode($result); exit; } elseif ($_POST['me_action'] == 'UPDATECUSTOMERSPECIALLIST') { $customers_id = tep_db_prepare_input($_POST['customers_id']); $status = tep_db_prepare_input($_POST['status']); $class_csl->addCustomer($status, $customers_id); $messagebox->add('Successfully set this customer as a ' . $class_csl->getTypeName($status) . ' Customer', 'green'); $openspeciallistdetail = true; } elseif ($_POST['me_action'] == 'CHANGEEMAILADDRESS') { $order_id = tep_db_prepare_input($_POST['order_id']); $old_email = tep_db_prepare_input($_POST['old_email']); $new_email = tep_db_prepare_input($_POST['new_email']); if (tep_validate_email($new_email)) { $class_o->updateEmailAddress($order_id, $old_email, $new_email, $session_userinfo['username']); $result = 'OK'; } else { $result = 'FAIL'; } echo utf8_encode($result); exit; } elseif ($_POST['me_action'] == 'REFRESHORDERTOTAL') { $order_id = tep_db_prepare_input($_POST['order_id']); $order_total = $class_o->retrieveTotals($order_id); $result = array(); $result['ot_box'] = drawOrderTotalBox($order_id, $order_total); $dbq = tep_db_query("SELECT SUM(products_quantity) total_qty FROM orders_products WHERE orders_id = '{$order_id}' AND status NOT IN (10,12)"); $res = tep_db_fetch_array($dbq); $result['total_qty'] = $res['total_qty']; $result['total_price'] = $order_total['ot_subtotal']['text'];