function select_language(lid) { location = 'index.php?lid='+lid+'&f_user='+escape(document.forms[0].f_user.value) } "; $tcontent = eregi_replace("",$jssource,$tcontent); //$tcontent = eregi_replace("",strtoupper($sid),$tcontent); $tcontent = eregi_replace("",htmlspecialchars($f_user),$tcontent); $startvar = strpos($tcontent,""); $endvar = strpos($tcontent,"")+31; $startstat = strpos($tcontent,""); $endstat = strpos($tcontent,"")+29; $aval_servers = count($pop3_servers); if($aval_servers != 0) { // fixed server $correct = substr($tcontent,$startstat+31,$endstat-$startstat-60); if ($aval_servers == 1) { $tmp = "@".$pop3_servers[0]["domain"]." "; $correct = eregi_replace("",$tmp,$correct); } else { $tmp = "\r"; $correct = eregi_replace("",$tmp,$correct); } } else { $correct = substr($tcontent,$startvar+33,$endvar-$startvar-64); //variable server } $tcontent = substr($tcontent,0,$startvar).$correct.substr($tcontent,$endstat); $avallangs = count($themes); if($avallangs == 0) die("You must provide at least one language"); $tmp = get_tags("","",$tcontent); if($allow_user_change) { $cleantext = $tmp["re-content"]; $def_lng = (is_numeric($lid))?$lid:$default_language; $langsel = "\r"; $cleantext = eregi_replace("",$langsel,$cleantext); $tcontent = substr($tcontent,0,$tmp["ab-begin"]).$cleantext.substr($tcontent,$tmp["ab-end"]); } else $tcontent = substr($tcontent,0,$tmp["ab-begin"]).substr($tcontent,$tmp["ab-end"]); unset($tmp); echo($tcontent);