$class_csl = new customers_special_list(); $type = isset($_GET['type']) ? tep_db_prepare_input($_GET['type']) : ''; if ($type == '') { exit; } $typename = $class_csl->getTypeName($type); //AJAX ACTION if (isset($_POST['me_action'])) { if ($_POST['me_action'] == 'SEARCHCUSTOMER') { $keywords = tep_db_prepare_input(utf8_decode($_POST['keywords'])); $keywords = strtolower(trim($keywords)); $result = ''; if ($keywords == '') { $result .= '<h3 class="red">Please enter keywords</h3>'; } else { $customers = $class_csl->getCustomersToAdd($keywords); if (count($customers) == 0) { $result .= '<h3 class="red">No Customers found for this keywords</h3>'; } else { $table = array(); $t = array(); $t['d'] = 'ID'; $t['c'] = 'Name'; $t['a'] = 'Action'; $table[] = $t; $keywords_array = explode(' ', $keywords); foreach ($customers as $c) { $cname = strtolower($c['customers_name']); foreach ($keywords_array as $key) { $cname = str_replace($key, "<strong>{$key}</strong>", $cname); }