query("SELECT name FROM {$table_prefix}_tab WHERE isentitytype = 1"); while ($row = $adb->fetchByAssoc($res, -1, false)) { $mod = $row['name']; $dir = 'modules/'.$mod.'/'; if (!in_array($mod, $keepSetList) && is_dir($dir) && is_file($dir.'Settings.php')) { $file = $dir.'Settings.php'; if (is_readable($file) && is_writeable($file)) { $content = file_get_contents($file); if ($content !== false && strpos($content, 'mycrmv') === false) { @unlink($file); } } } if (!in_array($mod, $keepRelList) && is_dir($dir) && is_file($dir.'CallRelatedList.php')) { $file = $dir.'CallRelatedList.php'; if (is_readable($file) && is_writeable($file)) { $content = file_get_contents($file); if ($content !== false && strpos($content, 'mycrmv') === false) { @unlink($file); } } } }