$comment = tep_db_prepare_input(utf8_decode($_POST['comment'])); $comment = trim($comment); if ($comment != "") { $comment_by = $session_userinfo['username']; $comment_id = $class_csl->insertComment($customer_id, $comment, $comment_by); // $comment = $class_csl->retrieveCommentDetail($comment_id); // $comments = array($comment); // $result = $class_csl->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_csl->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_csl->updateCustomer($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_csl->updateCustomer($customers_id, 'list_type', $new_type); exit; } } //START TEMPLATE $customer = $class_mc->retrieveDetail($customers_id); $customer_info = $class_mc->retrieveDetailInfo($customers_id);