Translations from English can happen choosing Language first."; $stylestuff=""; $wsb=""; $qqhval=''; $langcode=''; $langsuffix=''; $htmltop=""; $origlangchange=" lang='en'>"; $langchange=$origlangchange; if (isset($_GET['thelang'])) { if (strlen($_GET['thelang']) > 0) { $langcode=urldecode($_GET['thelang']); $langsuffix='&thelang=' . $_GET['thelang']; $htmltop=""; $langchange=" lang='" . urldecode($_GET['thelang']) . "'>"; $togo=""; } } else if (isset($_POST['thelang'])) { if (strlen($_POST['thelang']) > 0) { $langcode=urldecode($_POST['thelang']); $langsuffix='&thelang=' . $_POST['thelang']; $htmltop=""; $langchange=" lang='" . urldecode($_POST['thelang']) . "'>"; $togo=""; } } $lot=""; $sbc=" style=background-color:orange;"; if (isset($_GET['thetemplate'])) { if (strlen($_GET['thetemplate']) > 0) { if (strpos(urldecode($_GET['thetemplate']), "Curriculum_Vitae_LibreOffice.html") !== false && strpos(urldecode($_GET['thetemplate']), "rjmprogramming.com.au") !== false) { $lot="LibreOffice Email Template "; } else { $lot="LibreOffice Template "; } $sbc=""; } } else if (isset($_POST['thetemplate'])) { if (strlen($_POST['thetemplate']) > 0) { if (strpos(urldecode($_POST['thetemplate']), "Curriculum_Vitae_LibreOffice.html") !== false && strpos(urldecode($_POST['thetemplate']), "rjmprogramming.com.au") !== false) { $lot="LibreOffice Email Template "; } else { $lot="LibreOffice Template "; } $sbc=""; } } function lookup($ptoobig) { global $langcode; $mymc=""; if (str_replace("en","",$langcode) != '' && strlen(trim($ptoobig)) > 0) { $pokay=trim($ptoobig); $purl="http://api.mymemory.translated.net/get?q=" . str_replace("+","%20",urlencode($pokay)) . "&langpair=en|" . $langcode; // http://api.mymemory.translated.net/get?q=Hello%20World!&langpair=en|it#Ciao Mondo! // {"responseData":{"translatedText":"Ciao Mondo!","match":1},"quotaFinished":false,"responseDetails":"","responseStatus":200,"responderId":"242","exception_code":null,"matches":[{"id":"562784765","segment":"Hello World!","translation":"Ciao Mondo!","quality":"74","reference":null,"usage-count":97,"subject":"All","created-by":"MateCat","last-updated-by":"MateCat","create-date":"2018-05-24 22:32:33","last-update-date":"2018-05-24 22:32:33","match":1}]} if (file_exists("mym.txt")) $mymc=file_get_contents("mym.txt"); $findings=explode($purl, $mymc); if (sizeof($findings) > 1) { if (strlen(explode("\n", $findings[1])[0]) <= 1) { return $ptoobig; } else { return html_entity_decode(str_replace('\u','&#x',substr(explode("\n", $findings[1])[0],1)), ENT_QUOTES, "UTF-8") . " "; } } else { $thisf=str_replace(" "," ",file_get_contents($purl)); if (strpos($thisf, "responseData") !== false) { $fndis=false; if (strpos(strtolower($thisf), '"segment":"' . strtolower(trim($ptoobig)) . '","translation":"' . strtolower(trim($ptoobig)) . '"') !== false) { if (strpos($thisf, '"segment":"' . strtoupper(trim($ptoobig)) . '","translation":"' . strtoupper(trim($ptoobig)) . '"') !== false) { $fndis=false; } else { $fndis=true; file_put_contents("mym.txt", $mymc . $purl . "#" . trim($ptoobig) . "\n"); return $ptoobig; } } if (!$fndis) { if (strpos($thisf, '{"translatedText":"') !== false) { file_put_contents("mym.txt", $mymc . $purl . "#" . explode('"', explode('{"translatedText":"', $thisf)[1])[0] . "\n"); return html_entity_decode(str_replace('\u','&#x',explode('"', explode('{"translatedText":"', $thisf)[1])[0]), ENT_QUOTES, "UTF-8") . " "; } else if (strpos(strtolower($thisf), '"segment":"' . strtolower(trim($ptoobig)) . '","translation":"') !== false) { $fndat=strrpos(strtolower($thisf), '"segment":"' . strtolower(trim($ptoobig)) . '","translation":"') + strlen('"segment":"' . strtolower(trim($ptoobig)) . '","translation":"'); file_put_contents("mym.txt", $mymc . $purl . "#" . explode('"', substr($thisf, $fndat))[0] . "\n"); return html_entity_decode(str_replace('\u','&#x',explode('"', substr($thisf, $fndat))[0]), ENT_QUOTES, "UTF-8") . " "; } else { file_put_contents("mym.txt", $mymc . $purl . "\n"); return $ptoobig; } } //else { //return $ptoobig; //} } else { return $ptoobig; } } } // \u81ea\u5df1\u7d39\u4ecb return $ptoobig; } function httpit($inu) { if (strpos(strtolower(urldecode($inu)), "http") !== false) { return $inu; } else { return urlencode("http:" . urldecode($inu)); } } function ourstr_replace($froms, $tos, $tstr) { global $qqhval; $lc=""; $prevlc=""; if ($tstr == "") return $tstr; $rs=str_replace($froms, $tos, $tstr); $xrs=substr($rs,0,1); $lc=$xrs; for ($ir=1; $ir= '0' && substr($rs,(-1 + $ir),1) <= '9') $xrs.=" "; } else if (substr($rs,$ir,1) >= '0' && substr($rs,$ir,1) <= '9') { if (substr($rs,(-1 + $ir),1) == 'f') $xrs.=" "; } else if (substr($rs,$ir,1) >= 'A' && substr($rs,$ir,1) <= 'Z') { if (substr($rs,(-1 + $ir),1) != ' ') $xrs.=" "; } $prevlc=$lc; $lc=substr($rs,$ir,1); $xrs.=substr($rs,$ir,1); } if ($lc == " ") { if ($prevlc == " ") { $qqhval=$qqhval; // more to do } $qqhval=lookup(str_replace("Translation for English word ","",str_replace("Translation for English words ","",$xrs))); //substr($xrs,0,(strlen($xrs) - 1)); } return $xrs; } if (!isset($_GET['i0']) && isset($_GET['fconcept'])) { // Form findings $prompt="\n ans=prompt('What is your Survey and/or Template Form Concept? (optionally suffix by a space then LibreOffice template HTML URL (such as //www.rjmprogramming.com.au/PHP/lo_one_new.html LibreOffice Business Letter template), and/or optionally suffix by a space then email list to have potential for those emailees to redistribute this survey further afield)', 'Survey'); \n"; if (isset($_GET['ask'])) { $prompt="\n ans='" . urldecode($_GET['ask']) . "'; \n"; if (strpos(strtolower(str_replace('Curriculum Vitae ','',urldecode($_GET['ask']))), 'http') === false) { $wsb=explode("",str_replace($origlangchange,$langchange,file_get_contents('http:' . str_replace('Curriculum Vitae ','',urldecode($_GET['ask'])))))[0])[1]; } else { $wsb=explode("",str_replace($origlangchange,$langchange,file_get_contents(str_replace('https:','http:',str_replace('Curriculum Vitae ','',urldecode($_GET['ask']))))))[0])[1]; } $xcvs=explode("", $wsb)[0])); if (sizeof($xcvs) > 1) { if (strpos($xcvs[1], "<css>") !== false) { $huhs=explode("/*", $xcvs[1]); if (sizeof($huhs) > 1) { $stylestuff="*/ \n" . substr($xcvs[1], 0, (strlen($xcvs[1]) - (2 + strlen($huhs[-1 + sizeof($huhs)])))) . "\n /* "; } else { $stylestuff="*/ \n" . $xcvs[1] . "\n /* "; } } } } $htmlis=$htmltop . " " . str_replace("Survey Survey","Survey",str_replace('+',' ',urldecode($_GET['fconcept'])) . " Survey") . " Form Questions var ilangsuffix=-1,langsuffix='" . $langsuffix . "'; function askmyf() { var ansx=prompt('Optionally enter email list to share this Curriculum Vitae with. A subject to email other than \"Curriculum Vitae\" can be separated after the email list by a space. Make the email list just uppercase to send email link to form, just lowercase to send a Curriculum Vitae report only. and a mix, both of these.', ''); if (ansx != null) { if (ansx.indexOf('@') != -1) { var xansx=ansx.split(' '); if (ansx[0] == ansx[0].toUpperCase() || ansx[0] != ansx[0].toLowerCase()) { if (xansx.length > 1) { document.getElementById('acvemail').href=document.getElementById('acvemail').href.replace('mailto:?subject=Curriculum%20Vitae','mailto:' + xansx[0].toLowerCase() + '?subject=' + encodeURIComponent(ansx.replace(xansx[0] + ' ',''))); } else { document.getElementById('acvemail').href=document.getElementById('acvemail').href.replace('mailto:?','mailto:' + xansx[0].toLowerCase() + '?'); } document.getElementById('acvemail').click(); } if (ansx[0] == ansx[0].toLowerCase() || ansx[0] != ansx[0].toUpperCase()) { document.getElementById('myf').innerHTML+=''; if (xansx.length > 1) { document.getElementById('myf').innerHTML+=''; } else { document.getElementById('myf').innerHTML+=''; } } } } } function tcheckit(iois) { var ians=1, dl=''; if (iois != null) { var aconto = (iois.contentWindow || iois.contentDocument); if (aconto != null) { if (aconto.document) { aconto = aconto.document; } if (aconto.body != null) { var bih=aconto.body.innerHTML.replace(/\>\;/g,'<').replace(/\/g,'

'); var abih=bih.split(' src=\"'); for (var ibih=1; ibih 1) { if (ans.split(' ')[eval(-1 + ans.split(' ').length)].indexOf('@') != -1) { emaillist=ans.split(' ')[eval(-1 + ans.split(' ').length)]; document.getElementById('theto').value=emaillist; ans=ans.replace(' ' + emaillist,''); document.getElementById('thesubject').value=(ans + ' Survey').replace('Survey Survey','Survey') + ' Survey (ideally using Google Chrome web browser for audio input via microphone)'; if (ans.split(' ').length > 2) iioff--; } iioff--; if (ans.split(' ')[eval(-1 + ans.split(' ').length)].toLowerCase().indexOf('http') != -1 || ans.split(' ')[eval(-1 + ans.split(' ').length)].toLowerCase().indexOf('//') != -1) { templateis=ans.split(' ')[eval(-1 + ans.split(' ').length)]; document.getElementById('thetemplate').value=templateis; document.getElementById('tiframe').src=templateis; } } document.getElementById('myconcept').value=ans; } } if (templateis != '') { document.getElementById('myconcept').value=ans.replace((' ' + templateis),''); } else { while (ans != null) { ans=prompt('Separate a survey question ' + ians + ' from an optional prompt via ? ... Cancel finishes questions to ask ... eg. What is your favourite colour?Favourite colour', ''); if (ans != null) { if (ans != '') { document.getElementById('myquestions').value+=dl + '\"' + ans + '\"'; dl=','; ians++; } } } document.getElementById('mysf').click(); } }

" . str_replace("Survey Survey","Survey",urldecode($_GET['fconcept']) . " Survey") . " " . $lot . "Form Questions

... another?

"; echo $htmlis; exit; } else if (isset($_POST['i0']) && isset($_POST['fconcept'])) { // Form findings $joff=0; $defbh="

" . str_replace("Survey Survey","Survey",str_replace('+',' ',urldecode($_POST['fconcept'])) . " Survey") . " " . $lot . "Report

... another? email?

"; if (isset($_POST['thetemplate'])) { if ($_POST['thetemplate'] != "") { if (strpos(strtolower(urldecode($_POST['thetemplate'])), 'http') === false) { $wsb=explode("",str_replace($origlangchange,$langchange,file_get_contents('http:' . urldecode($_POST['thetemplate']))))[0])[1]; } else { $wsb=explode("",str_replace($origlangchange,$langchange,file_get_contents(str_replace('https:','http:',urldecode($_POST['thetemplate'])))))[0])[1]; } $xcvs=explode("", $wsb)[0])); if (sizeof($xcvs) > 1) { if (strpos($xcvs[1], "<css>") !== false) { $huhs=explode("/*", $xcvs[1]); if (sizeof($huhs) > 1) { $stylestuff="*/ \n" . substr($xcvs[1], 0, (strlen($xcvs[1]) - (2 + strlen($huhs[-1 + sizeof($huhs)])))) . "\n /* "; } else { $stylestuff="*/ \n" . $xcvs[1] . "\n /* "; } } } while (substr($wsb,$joff,1) != '>') { $joff++; } $joff++; $defbh=str_replace("

","

",substr($wsb,$joff)); if (strpos(urldecode($_POST['thetemplate']), "Curriculum_Vitae_LibreOffice.html") !== false && strpos(urldecode($_POST['thetemplate']), "rjmprogramming.com.au") !== false) { $defbh=str_replace(" " . str_replace("Survey Survey","Survey",str_replace('+',' ',urldecode($_POST['fconcept'])) . " Survey") . " Report var ilangsuffix=-1,langsuffix='" . $langsuffix . "'; var dul=document.URL.split('#')[0].split('?')[0]; var argis=''; function askmyf() { var ansx=prompt('Optionally enter email list to share this Curriculum Vitae with. A subject to email other than \"Curriculum Vitae\" can be separated after the email list by a space. Make the email list just uppercase to send email link to form, just lowercase to send a Curriculum Vitae report only. and a mix, both of these.', ''); if (ansx != null) { if (ansx.indexOf('@') != -1) { var xansx=ansx.split(' '); if (ansx[0] == ansx[0].toUpperCase() || ansx[0] != ansx[0].toLowerCase()) { if (xansx.length > 1) { document.getElementById('acvemail').href=document.getElementById('acvemail').href.replace('mailto:?subject=Curriculum%20Vitae','mailto:' + xansx[0].toLowerCase() + '?subject=' + encodeURIComponent(ansx.replace(xansx[0] + ' ',''))); } else { document.getElementById('acvemail').href=document.getElementById('acvemail').href.replace('mailto:?','mailto:' + xansx[0].toLowerCase() + '?'); } document.getElementById('acvemail').click(); } if (ansx[0] == ansx[0].toLowerCase() || ansx[0] != ansx[0].toUpperCase()) { document.getElementById('myf').innerHTML+=''; if (xansx.length > 1) { document.getElementById('myf').innerHTML+=''; } else { document.getElementById('myf').innerHTML+=''; } } } } } function initemail() { document.getElementById('aemail').href=document.getElementById('aemail').href.replace(/\ /g,'%20').replace(/\+/g,'%20') + encodeURIComponent(dul + '?fconcept=') + encodeURIComponent('" . str_replace("'","' + String.fromCharCode(39) + '",str_replace("Survey Survey","Survey",($_POST['fconcept']) . " Survey")) . " Report&" . "').replace(/\%20/g,'+'); fixemail(); } function fixemail() { var prerest=document.getElementById('aemail').href.split('?subject=')[1].split('&body=')[0]; var rest=document.getElementById('aemail').href.split('&body=')[1].split('php')[1]; document.getElementById('aemail').href=document.getElementById('aemail').href.split('?subject=')[0] + '?subject=' + (prerest) + '&body=' + encodeURIComponent('https://www.rjmprogramming.com.au/PHP/speech_supervisor.php') + (rest).replace(/\%20/g,'+'); } " . $defbh . " "; $ival=0; if ($joff == 0) { if (isset($_POST['s' . $ival])) { $htmlis=str_replace("", "
LabelValue
", $htmlis); } else { $htmlis=str_replace("", "
Value
", $htmlis); } } while (isset($_POST['i' . $ival])) { if ($joff != 0) { $farr=explode("<" . str_replace("`","'",str_replace("+"," ",urldecode($_POST['s' . $ival]))) . ">", $htmlis); if (sizeof($farr) <= 2) { $htmlis=str_replace("<" . str_replace("`","'",str_replace("+"," ",urldecode($_POST['s' . $ival]))) . ">", str_replace("+"," ",urldecode($_POST['i' . $ival])), $htmlis); } else { $prehtml=$farr[0] . "<" . str_replace("`","'",str_replace("+"," ",urldecode($_POST['s' . $ival]))) . ">"; $posthtml=str_replace("<" . str_replace("`","'",str_replace("+"," ",urldecode($_POST['s' . $ival]))) . ">", str_replace("+"," ",urldecode($_POST['i' . $ival])), $prehtml); $htmlis=str_replace($prehtml, $posthtml, $htmlis); } } else { if (isset($_POST['s' . $ival])) { $htmlis=str_replace("", "" . urldecode($_POST['s' . $ival]) . "" . urldecode($_POST['i' . $ival]) . "", $htmlis); $htmlis=str_replace("function fixemail() {", "function fixemail() { document.getElementById('aemail').href+=encodeURIComponent('s" . $ival . "=" . str_replace("'","' + String.fromCharCode(39) + '",($_POST['s' . $ival])) . "&'); ", $htmlis); $htmlis=str_replace("function fixemail() {", "function fixemail() { document.getElementById('aemail').href+=encodeURIComponent('i" . $ival . "=" . str_replace("'","' + String.fromCharCode(39) + '",($_POST['i' . $ival])) . "&'); ", $htmlis); } else { $htmlis=str_replace("", "" . urldecode($_POST['i' . $ival]) . "", $htmlis); $htmlis=str_replace("function fixemail() {", "function fixemail() { document.getElementById('aemail').href+=encodeURIComponent('i" . $ival . "=" . str_replace("'","' + String.fromCharCode(39) + '",($_POST['i' . $ival])) . "&'); ", $htmlis); } } $ival++; } if (isset($_POST['theto'])) { if (strpos(urldecode($_POST['theto']), "@") !== false) { // && strpos($htmlis, "") !== false) { $eol = PHP_EOL; $header = 'From: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $header .= 'Reply-To: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; if (isset($_POST['thecc'])) { $header .= 'CC: ' . urldecode($_POST['thecc']) . $eol; } if (isset($_POST['thebcc'])) { $header .= 'BCC: ' . urldecode($_POST['thebcc']) . $eol; } // attachment $filename=str_replace("@", "_", str_replace(".", "_", urldecode($_POST['thesubject']) . urldecode($_POST['theto']))) . ".html"; $content = chunk_split(base64_encode(str_replace("%2b","+",str_replace(' contenteditable=',' data-alt=',$htmlis)))); $message="Please download attached webpage. "; if (sizeof(explode("\n",urldecode($_POST['thesubject']))) > 1) { $message.=str_replace("\r"," ",str_replace("\n"," ",str_replace(explode("\r",explode("\n",urldecode($_POST['thesubject']))[0])[0], "", urldecode($_POST['subject'])))); } // a random hash will be necessary to send mixed content $uid = md5(time()); $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n"; $header .= "This is a multi-part message in MIME format.\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-type:text/html; charset=iso-8859-1\r\n"; $header .= "Content-Transfer-Encoding: 7bit\r\n\r\n"; $header .= $message."\r\n\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-Type: application/octet-stream; name=\"".$filename."\"\r\n"; // use different content types here $header .= "Content-Transfer-Encoding: base64\r\n"; $header .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n"; $header .= $content."\r\n\r\n"; $header .= "--".$uid."--"; try { mail(urldecode($_POST['theto']), explode("\r",explode("\n",urldecode($_POST['thesubject']))[0])[0], "", $header); //$htmlis=str_replace("inite" . "mail();"," alert('Email sent okay.'); inite" . "mail();", $htmlis); } catch (Exception $ee) { //$htmlis=str_replace("inite" . "mail();"," alert('Email not sent.'); inite" . "mail();", $htmlis); } } } echo $htmlis; exit; } else if (isset($_GET['i0']) && isset($_GET['fconcept'])) { // Form findings $joff=0; $defbh="

" . str_replace("Survey Survey","Survey",str_replace('+',' ',urldecode($_GET['fconcept'])) . " Survey") . " " . $lot . "Report

... another? email?

"; if (isset($_GET['thetemplate'])) { if ($_GET['thetemplate'] != "") { if (strpos(strtolower(urldecode($_GET['thetemplate'])), 'http') === false) { $wsb=explode("",str_replace($origlangchange,$langchange,file_get_contents('http:' . urldecode($_GET['thetemplate']))))[0])[1]; } else { $wsb=explode("",str_replace($origlangchange,$langchange,file_get_contents(str_replace('https:','http:',urldecode($_GET['thetemplate'])))))[0])[1]; } $xcvs=explode("", $wsb)[0])); if (sizeof($xcvs) > 1) { if (strpos($xcvs[1], "<css>") !== false) { $huhs=explode("/*", $xcvs[1]); if (sizeof($huhs) > 1) { $stylestuff="*/ \n" . substr($xcvs[1], 0, (strlen($xcvs[1]) - (2 + strlen($huhs[-1 + sizeof($huhs)])))) . "\n /* "; } else { $stylestuff="*/ \n" . $xcvs[1] . "\n /* "; } } } while (substr($wsb,$joff,1) != '>') { $joff++; } $joff++; $defbh=str_replace("

","

",substr($wsb,$joff)); if (strpos(urldecode($_GET['thetemplate']), "Curriculum_Vitae_LibreOffice.html") !== false && strpos(urldecode($_GET['thetemplate']), "rjmprogramming.com.au") !== false) { $defbh=str_replace(" " . str_replace("Survey Survey","Survey",str_replace('+',' ',urldecode($_GET['fconcept'])) . " Survey") . " Report var ilangsuffix=-1,langsuffix='" . $langsuffix . "'; var dul=document.URL.split('#')[0].split('?')[0]; var argis=''; function askmyf() { var ansx=prompt('Optionally enter email list to share this Curriculum Vitae with. A subject to email other than \"Curriculum Vitae\" can be separated after the email list by a space. Make the email list just uppercase to send email link to form, just lowercase to send a Curriculum Vitae report only. and a mix, both of these.', ''); if (ansx != null) { if (ansx.indexOf('@') != -1) { var xansx=ansx.split(' '); if (ansx[0] == ansx[0].toUpperCase() || ansx[0] != ansx[0].toLowerCase()) { if (xansx.length > 1) { document.getElementById('acvemail').href=document.getElementById('acvemail').href.replace('mailto:?subject=Curriculum%20Vitae','mailto:' + xansx[0].toLowerCase() + '?subject=' + encodeURIComponent(ansx.replace(xansx[0] + ' ',''))); } else { document.getElementById('acvemail').href=document.getElementById('acvemail').href.replace('mailto:?','mailto:' + xansx[0].toLowerCase() + '?'); } document.getElementById('acvemail').click(); } if (ansx[0] == ansx[0].toLowerCase() || ansx[0] != ansx[0].toUpperCase()) { document.getElementById('myf').innerHTML+=''; if (xansx.length > 1) { document.getElementById('myf').innerHTML+=''; } else { document.getElementById('myf').innerHTML+=''; } } } } } function initemail() { document.getElementById('aemail').href=document.getElementById('aemail').href.replace(/\ /g,'%20').replace(/\+/g,'%20'8/*-) + encodeURIComponent(dul + '?fconcept=') + encodeURIComponent('" . str_replace("'","' + String.fromCharCode(39) + '",str_replace("Survey Survey","Survey",($_GET['fconcept']) . " Survey")) . " Report&" . "').replace(/\%20/g,'+'); fixemail(); } function fixemail() { var prerest=document.getElementById('aemail').href.split('?subject=')[1].split('&body=')[0]; var rest=document.getElementById('aemail').href.split('&body=')[1].split('php')[1]; document.getElementById('aemail').href=document.getElementById('aemail').href.split('?subject=')[0] + '?subject=' + (prerest) + '&body=' + encodeURIComponent('https://www.rjmprogramming.com.au/PHP/speech_supervisor.php') + (rest).replace(/\%20/g,'+'); } " . $defbh . " "; $ival=0; if ($joff == 0) { if (isset($_GET['s' . $ival])) { $htmlis=str_replace("", "
LabelValue
", $htmlis); } else { $htmlis=str_replace("", "
Value
", $htmlis); } } while (isset($_GET['i' . $ival])) { if ($joff != 0) { $farr=explode("<" . str_replace("`","'",str_replace("+"," ",urldecode($_GET['s' . $ival]))) . ">", $htmlis); if (sizeof($farr) <= 2) { $htmlis=str_replace("<" . str_replace("`","'",str_replace("+"," ",urldecode($_GET['s' . $ival]))) . ">", str_replace("+"," ",urldecode($_GET['i' . $ival])), $htmlis); } else { $prehtml=$farr[0] . "<" . str_replace("`","'",str_replace("+"," ",urldecode($_GET['s' . $ival]))) . ">"; $posthtml=str_replace("<" . str_replace("`","'",str_replace("+"," ",urldecode($_GET['s' . $ival]))) . ">", str_replace("+"," ",urldecode($_GET['i' . $ival])), $prehtml); $htmlis=str_replace($prehtml, $posthtml, $htmlis); } } else { if (isset($_GET['s' . $ival])) { $htmlis=str_replace("", "" . urldecode($_GET['s' . $ival]) . "" . urldecode($_GET['i' . $ival]) . "", $htmlis); $htmlis=str_replace("function fixemail() {", "function fixemail() { document.getElementById('aemail').href+=encodeURIComponent('s" . $ival . "=" . str_replace("'","' + String.fromCharCode(39) + '",($_GET['s' . $ival])) . "&'); ", $htmlis); $htmlis=str_replace("function fixemail() {", "function fixemail() { document.getElementById('aemail').href+=encodeURIComponent('i" . $ival . "=" . str_replace("'","' + String.fromCharCode(39) + '",($_GET['i' . $ival])) . "&'); ", $htmlis); } else { $htmlis=str_replace("", "" . urldecode($_GET['i' . $ival]) . "", $htmlis); $htmlis=str_replace("function fixemail() {", "function fixemail() { document.getElementById('aemail').href+=encodeURIComponent('i" . $ival . "=" . str_replace("'","' + String.fromCharCode(39) + '",($_GET['i' . $ival])) . "&'); ", $htmlis); } } $ival++; } if (isset($_GET['theto'])) { if (strpos(urldecode($_GET['theto']), "@") !== false) { // && strpos($htmlis, "") !== false) { $eol = PHP_EOL; $header = 'From: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $header .= 'Reply-To: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; if (isset($_GET['thecc'])) { $header .= 'CC: ' . urldecode($_GET['thecc']) . $eol; } if (isset($_GET['thebcc'])) { $header .= 'BCC: ' . urldecode($_GET['thebcc']) . $eol; } // attachment $filename=str_replace("@", "_", str_replace(".", "_", urldecode($_GET['thesubject']) . urldecode($_GET['theto']))) . ".html"; $content = chunk_split(base64_encode(str_replace("%2b","+",str_replace(' contenteditable=',' data-alt=',$htmlis)))); $message="Please download attached webpage. "; if (sizeof(explode("\n",urldecode($_GET['thesubject']))) > 1) { $message.=str_replace("\r"," ",str_replace("\n"," ",str_replace(explode("\r",explode("\n",urldecode($_GET['thesubject']))[0])[0], "", urldecode($_GET['subject'])))); } // a random hash will be necessary to send mixed content $uid = md5(time()); $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n"; $header .= "This is a multi-part message in MIME format.\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-type:text/html; charset=iso-8859-1\r\n"; $header .= "Content-Transfer-Encoding: 7bit\r\n\r\n"; $header .= $message."\r\n\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-Type: application/octet-stream; name=\"".$filename."\"\r\n"; // use different content types here $header .= "Content-Transfer-Encoding: base64\r\n"; $header .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n"; $header .= $content."\r\n\r\n"; $header .= "--".$uid."--"; try { mail(urldecode($_GET['theto']), explode("\r",explode("\n",urldecode($_GET['thesubject']))[0])[0], "", $header); //$htmlis=str_replace("inite" . "mail();"," alert('Email sent okay.'); inite" . "mail();", $htmlis); } catch (Exception $ee) { //$htmlis=str_replace("inite" . "mail();"," alert('Email not sent.'); inite" . "mail();", $htmlis); } } } echo $htmlis; exit; } else { $lot=""; $wsb=""; if (isset($_GET['thetemplate'])) { if (strlen($_GET['thetemplate']) > 0) { if (strpos(urldecode($_GET['thetemplate']), "Curriculum_Vitae_LibreOffice.html") !== false && strpos(urldecode($_GET['thetemplate']), "rjmprogramming.com.au") !== false) { $lot="LibreOffice Email Template "; } else { $lot="LibreOffice Template "; } if (trim(urldecode($_GET['thetemplate'])) != '') { if (strpos(strtolower(urldecode($_GET['thetemplate'])), 'http') === false) { $wsb=explode("",str_replace($origlangchange,$langchange,file_get_contents('http:' . urldecode($_GET['thetemplate']))))[0])[1]; } else { $wsb=explode("",str_replace($origlangchange,$langchange,file_get_contents(str_replace('https:','http:',urldecode($_GET['thetemplate'])))))[0])[1]; } } } } else if (isset($_POST['thetemplate'])) { if (strlen($_POST['thetemplate']) > 0) { if (strpos(urldecode($_POST['thetemplate']), "Curriculum_Vitae_LibreOffice.html") !== false && strpos(urldecode($_POST['thetemplate']), "rjmprogramming.com.au") !== false) { $lot="LibreOffice Email Template "; } else { $lot="LibreOffice Template "; } if (trim(urldecode($_POST['thetemplate'])) != '') { if (strpos(strtolower(urldecode($_POST['thetemplate'])), 'http') === false) { $wsb=explode("",str_replace($origlangchange,$langchange,file_get_contents('http:' . urldecode($_POST['thetemplate']))))[0])[1]; } else { $wsb=explode("",str_replace($origlangchange,$langchange,file_get_contents(str_replace('https:','http:',urldecode($_POST['thetemplate'])))))[0])[1]; } } } } $xcvs=explode("", $wsb)[0])); if (sizeof($xcvs) > 1) { if (strpos($xcvs[1], "<css>") !== false) { $huhs=explode("/*", $xcvs[1]); if (sizeof($huhs) > 1) { $stylestuff="*/ \n" . substr($xcvs[1], 0, (strlen($xcvs[1]) - (2 + strlen($huhs[-1 + sizeof($huhs)])))) . "\n /* "; } else { $stylestuff="*/ \n" . $xcvs[1] . "\n /* "; } } } if (isset($_POST['theto'])) { if (strpos(urldecode($_POST['theto']), "@") !== false) { // && strpos($htmlis, "") !== false) { $htmlis=$htmltop . " " . str_replace("Survey Survey","Survey",str_replace('+',' ',urldecode($_POST['concept'])) . " Survey") . " " . $lot . "Form Questions var ilangsuffix=-1,langsuffix='" . $langsuffix . "';

" . str_replace("Survey Survey","Survey",str_replace("+"," ",urldecode($_POST['concept'])) . " Survey") . " " . $lot . "Form Questions

... another?

"; $eol = PHP_EOL; $header = 'From: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; $header .= 'Reply-To: ' . 'rmetcalfe@rjmprogramming.com.au' . $eol; if (isset($_POST['thecc'])) { $header .= 'CC: ' . urldecode($_POST['thecc']) . $eol; } if (isset($_POST['thebcc'])) { $header .= 'BCC: ' . urldecode($_POST['thebcc']) . $eol; } // attachment $filename=str_replace("@", "_", str_replace(".", "_", urldecode($_POST['thesubject']) . urldecode($_POST['theto']))) . ".html"; $content = chunk_split(base64_encode(str_replace("%2b","+",$htmlis))); $message="Please download attached webpage. "; if (sizeof(explode("\n",urldecode($_POST['thesubject']))) > 1) { $message.=str_replace("\r"," ",str_replace("\n"," ",str_replace(explode("\r",explode("\n",urldecode($_POST['thesubject']))[0])[0], "", urldecode($_POST['subject'])))); } // a random hash will be necessary to send mixed content $uid = md5(time()); $header .= "MIME-Version: 1.0\r\n"; $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n"; $header .= "This is a multi-part message in MIME format.\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-type:text/html; charset=iso-8859-1\r\n"; $header .= "Content-Transfer-Encoding: 7bit\r\n\r\n"; $header .= $message."\r\n\r\n"; $header .= "--".$uid."\r\n"; $header .= "Content-Type: application/octet-stream; name=\"".$filename."\"\r\n"; // use different content types here $header .= "Content-Transfer-Encoding: base64\r\n"; $header .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n"; $header .= $content."\r\n\r\n"; $header .= "--".$uid."--"; try { mail(urldecode($_POST['theto']), explode("\r",explode("\n",urldecode($_POST['thesubject']))[0])[0], "", $header); //$htmlis=str_replace("inite" . "mail();"," alert('Email sent okay.'); inite" . "mail();", $htmlis); } catch (Exception $ee) { //$htmlis=str_replace("inite" . "mail();"," alert('Email not sent.'); inite" . "mail();", $htmlis); } } } $ifmaybe=""; if (isset($_GET['mode'])) { if ($_GET['mode'] == "3") { $ifmaybe=""; } } $qone="Quiz"; $qlabels='"' . $qone . '","Tongue Twisters","Haiku","Animal Categorization","Vocabulary Phrases","Hangman","Survey or LibreOffice Template","Curriculum Vitae"'; $orig_qlabels='"' . $qone . '","Tongue Twisters","Haiku","Animal Categorization","Vocabulary Phrases","Hangman","Survey or LibreOffice Template","Curriculum Vitae"'; $qarrays='"questions","tongue_twisters","haiku","animal_categorization","vocabulary","hangman","survey","curriculum_vitae"'; $qdelims='"?","~","`","`","`","`","?","?"'; $qcols='"yellow","lightgreen","lightblue","lightgray","pink","cyan","orange","magenta"'; $qforce=""; $qis='"What is the name that we give to the meat we get from pigs?pork", "What is the name of the metal alloy we get from zinc and copper?bronze", "What is the capital of Australia?Canberra", "Who wrote The Tale of Two Cities?Dickens", "How many legs does the Legs of Man have?three", "How many tails does a Manx cat have?none", "How many teeth does an aardvark have?none", "Which sea creature has three hearts?octopus", "Which instrument has forty-seven strings and seven pedals?harp", "In the traditional rhyme, how many mice were blind?three", "How many pedals do most modern pianos have?three"'; $qlast=0; if (isset($_GET['questions'])) { $qis=urldecode($_GET['questions']); } else if (isset($_POST['questions'])) { $qis=urldecode($_POST['questions']); } if (isset($_GET['concept'])) { $qqval=''; $qqhval=''; $qone=urldecode($_GET['concept']); $qlabels='"' . $qone . '"'; $qarrays='"questions"'; $qdelims='"?"'; $qcols='"pink"'; $qforce="0; /" . "/ "; $qins=""; if (isset($_GET['thetemplate'])) { $qins.=""; } else if (isset($_POST['thetemplate'])) { $qins.=""; } $qins.=""; if (strpos(explode('",', $qis)[0], "?") === false) { $qins.=" "; } else if (strlen(explode("?", explode('",', ($qis . ","))[0])[0] . "?") == strlen(explode('",', $qis)[0])) { $qins.=" "; } else { $qins.="" . ourstr_replace("_"," ",substr(explode("?", explode('",', ($qis . ","))[0])[1],0)) . " "; } $qins.=" 0 && this.value != '" . $qqhval . "') { obv=this.value; if (sofarb[1] != null) { sofarb[0].innerHTML=this.value.replace(String.fromCharCode(32),' '); sofarb[1].innerHTML=this.value.replace(String.fromCharCode(32),' '); } prepickq(this.value); } \" type=text name=i0 id=i0 value='" . $qqhval . "' title='You need at least a space here and/or to have changed the default value for the tabbing out to be recognized as your value, and that
represents a line feed'>
"; for ($ii=1; $ii "; } else if (strlen(explode("?", explode('",', ($qis . ","))[$ii])[0] . "?") == strlen(explode('",', $qis)[$ii])) { if (substr(explode("?", explode('",', ($qis . ","))[$ii])[0],1) == "css") $qqval=$stylestuff; $qins.=" "; } else { if (substr(explode("?", explode('",', ($qis . ","))[$ii])[1],0) == "css") $qqval=$stylestuff; $qins.=" "; } if ($qqval != "") { $qins.="



"; } else { $qins.=" 0 && this.value != '" . $qqhval . "') { obv=this.value; if (sofarb[1] != null) { sofarb[0].innerHTML=this.value.replace(String.fromCharCode(32),' '); sofarb[1].innerHTML=this.value.replace(String.fromCharCode(32),' '); } prepickq(this.value); } \" style=display:none; type=text name=i" . $ii . " id=i" . $ii . " value='" . $qqhval . "' title='You need at least a space here and/or to have changed the default value for the tabbing out to be recognized as your value, and that
represents a line feed'>
"; } $qlast=$ii; } $ifmaybe="

" . str_replace(" LibreOffice"," LibreOffice",$qone) . " " . $lot . "Form

" . $qins . "
"; //$ifmaybe="

" . str_replace(" LibreOffice"," LibreOffice",$qone) . " Form

" . $qins . "
"; } else if (isset($_POST['concept'])) { $qqval=''; $qqhval=''; $qone=urldecode($_POST['concept']); $qlabels='"' . $qone . '"'; $qarrays='"questions"'; $qdelims='"?"'; $qcols='"pink"'; $qforce="0; /" . "/ "; $qins=""; if (isset($_GET['thetemplate'])) { $qins.=""; } else if (isset($_POST['thetemplate'])) { $qins.=""; } $qins.=""; if (strpos(explode('",', $qis)[0], "?") === false) { $qins.=" "; } else if (strlen(explode("?", explode('",', ($qis . ","))[0])[0] . "?") == strlen(explode('",', $qis)[0])) { $qins.=" "; } else { $qins.="" . ourstr_replace("_"," ",substr(explode("?", explode('",', ($qis . ","))[0])[1],0)) . " "; } $qins.=" 0 && this.value != '" . $qqhval . "') { obv=this.value; if (sofarb[1] != null) { sofarb[0].innerHTML=this.value.replace(String.fromCharCode(32),' '); sofarb[1].innerHTML=this.value.replace(String.fromCharCode(32),' '); } prepickq(this.value); } \" type=text name=i0 id=i0 value='" . $qqhval . "' title='You need at least a space here and/or to have changed the default value for the tabbing out to be recognized as your value, and that
represents a line feed'>
"; for ($ii=1; $ii "; } else if (strlen(explode("?", explode('",', ($qis . ","))[$ii])[0] . "?") == strlen(explode('",', $qis)[$ii])) { if (substr(explode("?", explode('",', ($qis . ","))[$ii])[0],1) == "css") $qqval=$stylestuff; $qins.=" "; } else { if (substr(explode("?", explode('",', ($qis . ","))[$ii])[1],0) == "css") $qqval=$stylestuff; $qins.=" "; } if ($qqval != "") { $qins.="



"; } else { $qins.=" 0 && this.value != '" . $qqhval . "') { obv=this.value; if (sofarb[1] != null) { sofarb[0].innerHTML=this.value.replace(String.fromCharCode(32),' '); sofarb[1].innerHTML=this.value.replace(String.fromCharCode(32),' '); } prepickq(this.value); } \" style=display:none; type=text name=i" . $ii . " id=i" . $ii . " value='" . $qqhval . "' title='You need at least a space here and/or to have changed the default value for the tabbing out to be recognized as your value, and that
represents a line feed'>
"; } $qlast=$ii; } $ifmaybe="

" . str_replace(" LibreOffice"," LibreOffice",$qone) . " " . $lot . "Form

" . $qins . "
"; //$ifmaybe="

" . str_replace(" LibreOffice"," LibreOffice",$qone) . " Form

" . $qins . "
"; } } echo $htmltop . "\n"; ?> Speaking Quiz (at least on Google Chrome) - RJM Programming - May, 2018 ... thanks to https://www.google.com/intl/en/chrome/demos/speech.html for Speech to Text '); document.getElementById('kb').focus(); setTimeout(hibafix,2000); pickq();">
LibreOffice",$qone); ?> (thanks to Google Speech to Text)

<- 1 Player 2 ->

One quizzer can
key in 1 (left)
or 2 (right)



Score: 0/0