', ''); $url = str_replace ($find, '', $url); $url = preg_replace('/<(\/{0,1})img(.*?)(\/{0,1})\>/', 'image', $url); $find = array(' ', '"', '&', '\r\n', '\n', '/', '\\', '+', '<', '>'); $url = str_replace ($find, '-', $url); $find = array('', '', '', '', '', '', '', ''); $url = str_replace ($find, 'e', $url); $find = array('', '', '', '', '', '', '', ''); $url = str_replace ($find, 'i', $url); $find = array('', '', '', '', '', ''); $url = str_replace ($find, 'o', $url); $find = array('', ''); $url = str_replace ($find, 'oe', $url); $find = array('', '', '', '', '', ''); $url = str_replace ($find, 'a', $url); $find = array('', ''); $url = str_replace ($find, 'ae', $url); $find = array('', '', '', '', '', ''); $url = str_replace ($find, 'u', $url); $find = array('', ''); $url = str_replace ($find, 'ue', $url); $find = array(''); $url = str_replace ($find, 'ss', $url); $find = array(''); $url = str_replace ($find, 'c', $url); $find = array('/[^a-z0-9\-<>]/', '/[\-]+/', '/<[^>]*>/'); $repl = array('', '-', ''); $url = preg_replace ($find, $repl, $url); $url = str_replace ('--', '-', $url); return $url; } $tmp = explode(".",strtolower($_SERVER['HTTP_HOST'])); $tmp = (array_search("www",$tmp)!==false) ? array_slice($tmp, 1,-2) : array_slice($tmp,0,-2); $mforum = (count($tmp)) ? implode(".", $tmp) : ''; $subdomain = $mforum; // Include phpBB scripts define ('IN_PHPBB', true); require ("config/$mforum.php"); require ("includes/constants.php"); @mysql_connect ($dbhost,$dbuser,$dbpasswd) or Die("Database Server is Busy. Try later1."); @mysql_select_db ($dbname) or Die("Database Server is Busy. Try later2."); $id=$_GET['id']; $res = mysql_query("select topic_title,topic_replies from ".TOPICS_TABLE." where topic_id=$id LIMIT 0,1"); //$res = mysql_query("select * from serfashion_config"); $row = mysql_fetch_row($res); mysql_close(); Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://$subdomain.creatuforo.com/".make_url_friendly($row['0']).'-tema'.$id.'.html' ); ?>