$val ) { if ($one == "") { $one=str_replace("+", " ", urldecode($val)); if (strpos($one, "@") !== false) { $emailto=$one; } else { $innards.="\nform.append('infld" . $nextone . "', \"" . $val . "\");\n"; $title.="|" . $val; $nextone++; } } else if ($two == "") { $two=str_replace("+", " ", urldecode($val)); if (strpos($two, " ... |") !== false) { $one=""; $fields=explode("|", explode("... |", $two)[1]); $two=""; $gats.=" You can email to an entered email address what you have so far."; for ($ii=0; $ii$val ) { if ($one == "") { $one=str_replace("+", " ", urldecode($val)); $innards.="\nform.append('infld" . $nextone . "', \"" . $val . "\");\n"; $title.="|" . $val; $nextone++; } else if ($two == "") { $two=str_replace("+", " ", urldecode($val)); $innards.="\nform.append('infld" . $nextone . "', \"" . $val . "\");\n"; $title.="|" . $val; $nextone++; } else if ($three == "") { $three=str_replace("+", " ", urldecode($val)); $innards.="\nform.append('infld" . $nextone . "', \"" . $val . "\");\n"; $title.="|" . $val; $nextone++; } else if ($four == "") { $four=str_replace("+", " ", urldecode($val)); $innards.="\nform.append('infld" . $nextone . "', \"" . $val . "\");\n"; $title.="|" . $val; $nextone++; } else { $one=$two; $two=$three; $three=$four; $four=str_replace("+", " ", urldecode($val)); $innards.="\nform.append('infld" . $nextone . "', \"" . $val . "\");\n"; $title.="|" . $val; $nextone++; } } $htmlis = " No Body - RJM Programming - October, 2019" . $title . " var nextone='" . $nextone . "'; var zhr=null, form=null; var ezhr=null, eform=null; var nextsb=''; var emailto=''; var level=1; var gats='" . $gats . "'; function showEStuff(evt) { if (ezhr.readyState == 4) { if (ezhr.status == 200) { alert('Emailed to " . $emailto . " this webpage contents as an HTML attachment.'); } } } function showStuff(evt) { if (zhr.readyState == 4) { if (zhr.status == 200) { document.title+='|' + nextsb; document.write(zhr.responseText); if (gats.indexOf('You can ') == -1) { gats+=' You can email to an entered email address what you have so far.'; } } } } function doemail() { ezhr=new XMLHttpRequest(); eform=new FormData(); eform.append('to', '" . $emailto . "'); eform.append('subject', 'Speech Bubbles'); eform.append('html', '' + document.head.innerHTML.split(''); ezhr.open('post', '//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php', true); ezhr.onreadystatechange = showEStuff; ezhr.send(eform); } function donext(nextv) { zhr=new XMLHttpRequest(); form=new FormData(); " . $innards . " form.append('infld' + nextone, nextv); zhr.open('post', document.URL.split('#')[0].split('?')[0], true); zhr.onreadystatechange = showStuff; zhr.send(form); } function andthen() { if (level == 1) { nextsb=prompt(gats, ''); if (nextsb != null) { if (nextsb.indexOf('@') != -1 && nextsb.indexOf(' ') == -1 && document.title.indexOf('|') != -1) { emailto=nextsb; level++; nextsb=''; } } } else if (level == 2) { emailto=prompt('Email to?', ''); if (emailto == null) { emailto=''; } if (emailto.indexOf('@') == -1) { emailto=''; } } if (nextsb == null) { level++; nextsb=''; } if (nextsb.trim() != '') { donext(nextsb); } else if (level == 2) { if (emailto == '') { emailto=prompt('Email to?', ''); } if (emailto == null) { emailto=''; } if (emailto.indexOf('@') == -1) { emailto=''; } } if (emailto.indexOf('@') != -1) { location.href=document.URL.split('#')[0].split('?')[0] + '?to=' + encodeURIComponent(emailto) + '&rest=' + encodeURIComponent(document.title); } } function nothing() { } setTimeout(andthen, eval(nextone * 2000)); "; if ($emailto != "") { echo str_replace("setTimeout(", "\n doemail(); \n setTimeout(", $htmlis); } else { echo $htmlis; } ?>