$black_lists = array('5', 'A'); //BLACK LIST FOR CUSTOMERS THAT ALREADY RECEIVE reminder_level 5 and A if (in_array($level, $black_lists)) { switch ($payi->detail['invoice_order_type']) { case 'S': use_class('jng_sp_customers_special'); $class_jcs = new jng_sp_customers_special(); if (isset($request['userid']) && $request['userid'] != '') { $q = tep_db_query("SELECT jng_sp_customers_id FROM jng_sp_customers WHERE payone_userid=" . $request['userid']); if (tep_db_num_rows($q) > 0) { $cust = tep_db_fetch_array($q); $jng_sp_customers_id = $cust['jng_sp_customers_id']; if (is_null($class_jcs->getCustomerDetail($jng_sp_customers_id))) { $class_jcs->addCustomer('B', $jng_sp_customers_id); } else { $class_jcs->updateCustomer($jng_sp_customers_id, 'list_type', 'B'); } } } break; case 'J': use_class('customers_special_list'); $class_cs = new customers_special_list(); if (isset($request['userid']) && $request['userid'] != '') { $q = tep_db_query("SELECT customers_id FROM customers WHERE payone_userid=" . $request['userid']); if (tep_db_num_rows($q) > 0) { $cust = tep_db_fetch_array($q); $customers_id = $cust['customers_id']; if (is_null($class_cs->getCustomerDetail($customers_id))) { $class_cs->addCustomer('B', $customers_id); } else {
// $comment = $class_jcs->retrieveCommentDetail($comment_id); // $comments = array($comment); // $result = $class_jcs->drawComments($comments, true); $result = drawSingleComment($comment_id, $comment_by, time(), $comment); echo utf8_encode($result); } exit; } elseif ($_POST['me_action'] == 'DELETECOMMENT') { $customer_id = tep_db_prepare_input($_POST['customer_id']); $comment_id = tep_db_prepare_input($_POST['comment_id']); $class_jcs->deleteComment($customer_id, $comment_id); echo utf8_encode($comment_id); exit; } elseif ($_POST['me_action'] == 'SAVETEXTALERT') { $text_alert = tep_db_prepare_input(utf8_decode($_POST['text_alert'])); $result = $class_jcs->updateCustomer($jng_sp_customers_id, 'text_alert', $text_alert); exit; } elseif ($_POST['me_action'] == 'CHANGELISTTYPE') { $new_type = tep_db_prepare_input(utf8_decode($_POST['new_type'])); $result = $class_jcs->updateCustomer($jng_sp_customers_id, 'list_type', $new_type); exit; } } //START TEMPLATE $customer = $class_jcust->retrieveDetail($jng_sp_customers_id); $sp_detail = $class_sp->retrieveDetail($customer['jng_sp_id']); $total_orders = $class_jcust->retrieveTotalOrders($jng_sp_customers_id); $total_products_ordered = $class_jcust->retrieveTotalProductsOrdered($jng_sp_customers_id); $typeimg = $class_jcs->getTypeSymbol($detail['list_type']); $typename = $class_jcs->getTypeName($detail['list_type']); $content = '';