// RJM Programming
// January, 2023
error_reporting( E_ERROR | E_USER_ERROR );
set_time_limit(3600);
$scrst="
var sretis='', sreturl='';
var newwo=null;
function sistuffis() {
if (sretis.trim().length > 0) {
sreturl=sretis;
//document.title='checking ...';
sretis=' ';
setTimeout(presistuffend, 12100);
setTimeout(sistuffend, 13000);
}
}
function presistuffend() {
if (sretis == ' ') {
if (!window.opener.quizlhc() && !newwo) {
window.opener.clicklhc();
}
}
}
function sistuffend() {
if (sretis == ' ') {
siretis='';
//document.title='refocussing ...';
if (!window.opener.quizlhc() && !newwo) {
newwo=window.open(sreturl,'_blank','top=320,left=120,width=600,height=600');
} else if (!window.opener.quizlhc()) {
window.opener.postMessage(
{
message: \"focus\",
},
\"*\" // cross-origin
); // window.opener.focus();
}
}
}
if (window.opener) {
setInterval(sistuffis, 1000);
}
";
$scrsttwo="
function whichone() {
if (document.getElementById('simpleSearch') && document.getElementById('firstHeading')) {
var rectoneis=document.getElementById('simpleSearch').getBoundingClientRect();
var recttwois=document.getElementById('firstHeading').getBoundingClientRect();
var diffisnow=eval(eval('' + recttwois.top) - eval('' + rectoneis.top));
if (diffisnow > 300) { if (window.parent != window.self && !window.opener) { setTimeout(whichonelater, 2000); } return 'firstHeading'; } else { return ''; }
} else if (document.getElementById('firstHeading')) {
return 'firstHeading';
}
return ''; //'firstHeading';
}
function whichonelater() {
parent.scrollTo(0,0);
}
setTimeout(function(){ var wodg=whichone(); if (wodg != '') { document.getElementById(wodg).scrollIntoView(); } }, 5000);
";
$semic=[];
$thisc=[];
$presemic='';
$postsemic='';
$clist=explode(';', 'red;blue;purple;brown;orange;green');
$clist=explode(';', 'rgba(255,0,0,0.5);rgba(0,0,255,0.5);rgba(230,230,250,0.5);rgba(165,42,42,0.5);rgba(255,165,0,0.5);rgba(0,255,0,0.5)');
$letlen=8;
$langis='en';
$urlis='';
$preminmax="";
if (1 == 2) {
$sih="";
} else {
$preminmax="data-";
$sih='';
}
foreach ($_GET as $name=>$val) {
$_POST[$name]=$val;
}
$filter="";
$filok=true;
$vsf="";
if (isset($_POST['any'])) {
$filter=trim(str_replace('+',' ',urldecode($_POST['any'])));
if ($filter == "NM") {
$vsf=" " . str_replace("\n"," ",str_replace("\r\n"," ",file_get_contents("/usr/share/dict/propernames"))) . " ";
//$_POST['letlen']='3';
}
}
if (isset($_POST['letlen'])) {
$letlen=urldecode($_POST['letlen']);
}
function relative_to_absolute($inth) {
global $urlis, $letlen, $presemic, $postsemic, $clist, $semic, $scrst, $vsf, $filok, $filter;
$froms=[];
$sfroms=" ";
$postub="";
$ub="http://" . $_SERVER['SERVER_NAME'] . str_replace(":443","",":" . $_SERVER['SERVER_PORT']) . $_SERVER['REQUEST_URI'];
if (strpos($ub, "&url=") !== false && isset($_POST['ongoing'])) {
$postub=explode("&url=", $ub)[0] . "&url=";
}
if ($urlis != "") {
$ubf=explode("?", $urlis);
$ubff=explode("/", $ubf[0]);
if (strpos($ubff[sizeof($ubff) - 1], ".") !== false && (sizeof($ubff) - 1) > 2) {
$ub=str_replace("/" . $ubff[sizeof($ubff) - 1], "/", $ubf[0]);
} else {
$ub=str_replace("@$@", "", str_replace("/@$@", "/", ($ubf[0] . "@$@")));
}
$urlis="";
}
$ubf=explode("?", $ub);
$udirname=str_replace("/wiki_" . "mark_eight.php", "/", $ubf[0]);
//echo $udirname;
//exit;
//$low = strtolower($inth);
$outth = $inth;
$ideas = array(" action='", ' action="', " Action='", ' Action="', " ACTION='", ' ACTION="', " action=", " Action=", " ACTION=", " href='", ' href="', " Href='", ' Href="', " HREF='", ' HREF="', " href=", " Href=", " HREF=", " src='", ' src="', " Src='", ' Src="', " SRC='", ' SRC="', " src=", " Src=", " SRC=");
if ($udirname != "") {
$inth=str_replace("'/static/", "'" . explode("/wiki/", $udirname)[0] . "/static/", $inth);
$inth=str_replace('"/static/', '"' . explode("/wiki/", $udirname)[0] . "/static/", $inth);
if ($postub != "") {
$inth=str_replace(" href='/wiki/", ' onmouseover="if (window.opener) { sretis=window.opener.startlhc(this.href); } else { parent.startlhc(this.href); }" onmouseout="if (window.opener) { sretis=window.opener.quitlhc(); } else { parent.quitlhc(); }"' . " href='" . $postub, $inth);
$inth=str_replace(' href="/wiki/', ' onmouseover="if (window.opener) { sretis=window.opener.startlhc(this.href); } else { parent.startlhc(this.href); }" onmouseout="if (window.opener) { sretis=window.opener.quitlhc(); } else { parent.quitlhc(); }" href="' . $postub, $inth);
$inth=str_replace("'/wiki/", "'" . $postub, $inth);
$inth=str_replace('"/wiki/', '"' . $postub, $inth);
} else {
$inth=str_replace("'/wiki/", "'" . explode("/wiki/", $udirname)[0] . "/wiki/", $inth);
$inth=str_replace('"/wiki/', '"' . explode("/wiki/", $udirname)[0] . "/wiki/", $inth);
}
$inth=str_replace("'/w/", "'" . explode("/wiki/", $udirname)[0] . "/w/", $inth);
$inth=str_replace('"/w/', '"' . explode("/wiki/", $udirname)[0] . "/w/", $inth);
$inth=str_replace("'/er/", "'" . explode("/wiki/", $udirname)[0] . "/er/", $inth);
$inth=str_replace('"/er/', '"' . explode("/wiki/", $udirname)[0] . "/er/", $inth);
$inth=str_replace("'/esitest-", "'" . explode("/wiki/", $udirname)[0] . "/esitest-", $inth);
$inth=str_replace('"/esitest-', '"' . explode("/wiki/", $udirname)[0] . "/esitest-", $inth);
$outth = $inth;
for ($m=0; $m 1) {
for ($ii=(sizeof($huhs) - 1); $ii>=1; $ii--) {
if (strtolower(str_replace("file", "http", strtolower(substr($huhs[$ii], 0, 4)))) == "http") {
$outth = $outth;
} else if (substr($huhs[$ii], 0, 1) != "/" && substr($huhs[$ii], 0, 1) != "'" && substr($huhs[$ii], 0, 1) != '"') {
$outth = str_replace($huhs[$ii], $udirname . $huhs[$ii], $outth);
} else if (substr($huhs[$ii], 1, 1) != "/" && substr($huhs[$ii], 0, 1) != "'" && substr($huhs[$ii], 0, 1) != '"') {
$outth = str_replace($huhs[$ii], substr($udirname, 0, (strlen($udirname) - 0)) . $huhs[$ii], $outth);
}
}
}
}
}
$fixthis=$outth;
if (strpos(explode("") !== false) {
$fixthis=explode("", explode("", explode("", explode("", explode("= 1000) {
if (strpos($sfroms, ' ' . $aerrs[$ii] . ' ') === false && strpos($postsemic, ' ' . $aerrs[$ii] . ' ') !== false) {
if ($filter == "Az") {
$filok=($aerrs[$ii] != strtoupper($aerrs[$ii]) && $aerrs[$ii] != strtolower($aerrs[$ii]));
} else if ($filter == "AZ") {
$filok=($aerrs[$ii] == strtoupper($aerrs[$ii]));
} else if ($filter == "az") {
$filok=($aerrs[$ii] == strtolower($aerrs[$ii]));
} else if ($filter == "09") {
$filok=(str_replace('$','',str_replace(',','',str_replace('.','',str_replace('9','',str_replace('8','',str_replace('7','',str_replace('6','',str_replace('5','',str_replace('4','',str_replace('3','',str_replace('2','',str_replace('1','',str_replace('0','',$aerrs[$ii]))))))))))))) == '');
} else if ($filter == "()") {
$filok=($aerrs[$ii] != str_replace('|','',str_replace('>','',str_replace('<','',str_replace('}','',str_replace('{','',str_replace(']','',str_replace('[','',str_replace(')','',str_replace('(','',$aerrs[$ii]))))))))));
} else if ($filter == "`") {
$filok=($aerrs[$ii] != str_replace("'","",str_replace('"','',str_replace('`','',$aerrs[$ii]))));
} else if ($filter == 'AS') {
$filok=(!preg_match('/[\\x80-\\xff]/', $aerrs[$ii]));
} else if ($filter == 'NA') {
$filok=(preg_match('/[\\x80-\\xff]/', $aerrs[$ii]));
} else if ($filter == "DE") {
$filok=($aerrs[$ii] != str_replace('~','',str_replace('`','',str_replace('@','',str_replace('*','',str_replace('%','',str_replace(' ','',str_replace('$','',str_replace('#','',str_replace('!','',str_replace(':','',str_replace(';','',str_replace(',','',str_replace('&','',str_replace('?','',str_replace('.','',str_replace("'","",str_replace('"','',$aerrs[$ii]))))))))))))))))));
} else if ($filter == 'NM') {
$filok=(strpos($vsf, " " . explode(' ',$aerrs[$ii])[0] . " ") !== false || strpos($vsf, " " . explode(' ',$aerrs[$ii])[-1 + sizeof(explode(' ',$aerrs[$ii]))] . " ") !== false);
}
if (strpos($aerrs[$ii], '=') === false && $filok) {
if (substr($aerrs[$ii],-1,1) != '"') {
$sfroms.=$aerrs[$ii] . ' ';
}
}
}
} else if (strlen($aerrs[$ii]) >= $letlen || strpos($postsemic, ' ' . $aerrs[$ii] . ' ') !== false) {
if (strpos($sfroms, ' ' . $aerrs[$ii] . ' ') === false) {
$berrs=explode(' ' . $aerrs[$ii] . ' ', $outth);
//$laste=explode(">", $berrs[0])[-1 + sizeof(explode(">", $berrs[0]))];
//if (strpos($laste, "<") === false) {
if ($filter == "Az") {
$filok=($aerrs[$ii] != strtoupper($aerrs[$ii]) && $aerrs[$ii] != strtolower($aerrs[$ii]));
} else if ($filter == "AZ") {
$filok=($aerrs[$ii] == strtoupper($aerrs[$ii]));
} else if ($filter == "az") {
$filok=($aerrs[$ii] == strtolower($aerrs[$ii]));
} else if ($filter == "09") {
$filok=(str_replace('$','',str_replace(',','',str_replace('.','',str_replace('9','',str_replace('8','',str_replace('7','',str_replace('6','',str_replace('5','',str_replace('4','',str_replace('3','',str_replace('2','',str_replace('1','',str_replace('0','',$aerrs[$ii]))))))))))))) == '');
} else if ($filter == "()") {
$filok=($aerrs[$ii] != str_replace('|','',str_replace('>','',str_replace('<','',str_replace('}','',str_replace('{','',str_replace(']','',str_replace('[','',str_replace(')','',str_replace('(','',$aerrs[$ii]))))))))));
} else if ($filter == "`") {
$filok=($aerrs[$ii] != str_replace("'","",str_replace('"','',str_replace('`','',$aerrs[$ii]))));
} else if ($filter == 'AS') {
$filok=(!preg_match('/[\\x80-\\xff]/', $aerrs[$ii]));
} else if ($filter == 'NA') {
$filok=(preg_match('/[\\x80-\\xff]/', $aerrs[$ii]));
} else if ($filter == "DE") {
$filok=($aerrs[$ii] != str_replace('~','',str_replace('`','',str_replace('@','',str_replace('*','',str_replace('%','',str_replace(' ','',str_replace('$','',str_replace('#','',str_replace('!','',str_replace(':','',str_replace(';','',str_replace(',','',str_replace('&','',str_replace('?','',str_replace('.','',str_replace("'","",str_replace('"','',$aerrs[$ii]))))))))))))))))));
} else if ($filter == 'NM') {
$filok=(strpos($vsf, " " . explode(' ',$aerrs[$ii])[0] . " ") !== false || strpos($vsf, " " . explode(' ',$aerrs[$ii])[-1 + sizeof(explode(' ',$aerrs[$ii]))] . " ") !== false);
}
if (strpos($aerrs[$ii], '=') === false && $filok) {
if (substr($aerrs[$ii],-1,1) != '"') {
$sfroms.=$aerrs[$ii] . ' ';
}
}
//}
}
}
}
}
$froms=explode(" ", trim($sfroms));
$prefixthis=$fixthis;
for ($ii=0; $ii' . $froms[$ii] . '<', str_replace('>' . $froms[$ii] . ' ', '>' . $froms[$ii] . ' ', str_replace(' ' . $froms[$ii] . ' ', ' ' . $froms[$ii] . ' ', $fixthis)));
}
$outth=str_replace($prefixthis, $fixthis, $outth);
$tos=explode("", $tos[$ii])[0], str_replace("", "", str_replace("", "", explode("", $tos[$ii])[0])), $outth);
}
}
$tos=explode('="', $outth);
for ($ii=1; $ii") !== false || strpos(explode('"', $tos[$ii])[0], "") !== false) {
$outth=str_replace(explode('"', $tos[$ii])[0], str_replace("", "", str_replace("", "", explode('"', $tos[$ii])[0])), $outth);
}
}
if ($letlen >= 1000 || trim($postsemic) != '') {
for ($ih=0; $ih' . $thisc[$jh] . '', '' . $thisc[$jh] . '', $outth);
}
}
}
}
//if (strpos($_POST['url'], 'Melbourne') !== false) { file_put_contents('xxx.xxx', $outth); }
if (isset($_POST['place'])) {
if (urldecode($_POST['place']) != '_blank') {
return str_replace('', ' parent.document.body.style.cursor="pointer"; ', $outth);
}
}
//return str_replace('< mark>', '', str_replace('" ', '"', $outth));
return $outth;
}
if (isset($_POST['url']) && !isset($_GET['rerun'])) {
if (isset($_POST['letlen'])) {
$letlen=urldecode($_POST['letlen']);
}
if (isset($_POST['personal'])) {
if (strlen(trim(str_replace('+',' ',urldecode($_POST['personal'])))) > 0) {
$presemic=',' . trim(str_replace('+',' ',urldecode($_POST['personal']))) . ',';
$postsemic=str_replace(',',' ',str_replace(';',' ',$presemic));
$semic=explode(';', trim(str_replace('+',' ',urldecode($_POST['personal']))));
}
}
$langis=trim(str_replace('+',' ',urldecode($_POST['lang'])));
$urlis=str_replace('//.','//',(urldecode($_POST['protocol']) . $langis . urldecode($_POST['afterlang']))) . str_replace('+','_',urldecode($_POST['url']));
$contis=file_get_contents($urlis);
if (trim($contis) == "" && $langis != "en") {
$urlis=urldecode(str_replace('//enwiki','//en.wiki',($_POST['protocol']) . 'en' . urldecode($_POST['afterlang']))) . str_replace('+','_',urldecode($_POST['url']));
$contis="";
$contis=file_get_contents($urlis);
}
if (strpos(trim($contis), 'Sorry, nothing found for that topic.
parent.document.body.style.cursor="pointer"; ';
} else {
echo "Sorry, nothing found for that topic.
";
}
exit;
}
if (isset($_POST['okst'])) {
$contis=str_replace('', $scrst . ' document.body.style.backgroundColor="transparent"; ', $contis);
$contis=str_replace('', $scrst . '', $contis);
$contis=str_replace('', $scrsttwo . '
'; document.getElementById('mysub').title='Twelve second long hover show available on Wikipedia links.'; } document.getElementById('slist').value=decodeURIComponent(document.URL.split('alist=')[1].split('&')[0]).replace(/\\\+/g,' '); document.getElementById('sany').value=decodeURIComponent(document.URL.split('any=')[1].split('&')[0]).replace(/\\\+/g,' '); document.getElementById('letlen').min='' + " . min($letlen,6) . "; document.getElementById('personal').value=decodeURIComponent(document.URL.split('personal=')[1].split('&')[0]).replace(/\\\+/g,' '); } if (document.URL.indexOf('rerun=') != -1) { if (document.URL.indexOf('place=below') != -1) { document.getElementById('atoggle').click(); place='below'; } document.getElementById('btstt').style.display='inline-block'; document.getElementById('mysub').click(); } if (document.URL.indexOf('https:') == 0 && !isChromeWB) { location.href='http:' + document.URL.substring(6); } if (window.self !== window.top) { lastlen=lastlen; } else { document.getElementById('url').focus(); } \">
', $contis);
echo relative_to_absolute($contis);
exit;
} else {
$rs=rand(67,19876567453);
echo "