<?php  
 

global $wpdb, $post, $opt_themes; 
$rtl_on				= $opt_themes['ex_themes_activate_rtl_']; 
$rtl_homes			= $opt_themes['rtl_homes'];
$search_results		= $opt_themes['exthemes_Searchresults'];
$sidebar_on			= $opt_themes['sidebar_activated_'];
$text_not_found		= $opt_themes['exthemes_File_not_founds']; 
$search_term		= substr($_SERVER['REQUEST_URI'], 1);
$search_term		= urldecode(stripslashes($search_term));
$search_term		= rtrim($search_term, "/");
$find				= array("'.html'", "'.+/'", "'[-/_]'");
$replace			= " ";
$search_term		= trim(preg_replace($find, $replace, $search_term));
$search_term		= str_replace("%20", $replace, $search_term);
$search_term		= preg_replace('!\s+!', ' ', $search_term);