function checkGliderBrand($gliderBrand = '') { if (!$this->gliderBrandID) { if ($gliderBrand) { $gliderBrandID = brands::guessBrandID($gliderBrand); } else { $gliderBrandID = brands::guessBrandID($this->glider); } if ($gliderBrandID) { global $CONF; if (!$gliderBrand) { if (!function_exists('str_ireplace')) { function str_ireplace($needle, $str, $haystack) { $needle = preg_quote($needle, '/'); return preg_replace("/{$needle}/i", $str, $haystack); } } else { $gliderName = str_ireplace($CONF['brands']['list'][$gliderBrandID], '', $this->glider); } } else { $gliderName = $this->glider; } $gliderName = brands::sanitizeGliderName($gliderName); $this->glider = $gliderName; $this->gliderBrandID = $gliderBrandID; } } }
echo " {$gliderName} => {$gliderNameNorm} <BR>"; execMysqlQuery("update {$workTable} set gliderName='{$gliderNameNorm}' where glider='{$gliderName}'"); } } } else { if ($admin_op == "removeBrand") { echo "Remove the Brand name from the'gliderName' field<BR>"; $query = "SELECT gliderBrandID, gliderName , glider FROM {$workTable} WHERE 1=1 ORDER BY glider DESC "; $res = $db->sql_query($query); $i = 0; if ($res > 0) { while ($row = mysql_fetch_assoc($res)) { $gliderName = $row['glider']; $gliderNameNorm = $row['gliderName']; $gliderNameNew = str_ireplace($CONF['brands']['list'][$row['gliderBrandID']], '', $gliderNameNorm); $gliderNameNew = brands::sanitizeGliderName($gliderNameNew); echo " {$gliderNameNorm} => {$gliderNameNew} <BR>"; execMysqlQuery("update {$workTable} set gliderName='{$gliderNameNew}' where gliderName='{$gliderNameNorm}'"); } } } else { if ($admin_op == "useKnown") { $query = "SELECT gliderBrandID, glider ,gliderName FROM {$workTable} WHERE gliderBrandID <> 0 group by glider ORDER BY glider DESC "; $res = $db->sql_query($query); $i = 0; if ($res > 0) { while ($row = mysql_fetch_assoc($res)) { $gliderName = $row['glider']; //$count=$row['gNum']; //$gliderName=str_ireplace($brandsList[1][$row['gliderBrandID']],'',$gliderName); $gliderNameNorm = $row['gliderName'];