function ask(inc) { var ans=''; var emaillist=''; var dl=''; var ians=1; if (inc == '') { ans=prompt('What is your Survey Form Concept? (optionally suffix by a space then email list to have potential for those emailees to redistribute this survey further afield)', 'Survey'); if (ans != null) { if (ans.split(' ').length > 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)'; } } document.getElementById('myconcept').value=ans; } } 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") . " Form Questions

... another?

"; echo $htmlis; exit; } else if (isset($_POST['i0']) && isset($_POST['fconcept'])) { // Form findings $htmlis=" " . str_replace("Survey Survey","Survey",str_replace('+',' ',urldecode($_POST['fconcept'])) . " Survey") . " Report var dul=document.URL.split('#')[0].split('?')[0]; var argis=''; 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,'+'); }

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

... another? email?

"; $ival=0; if (isset($_POST['s' . $ival])) { $htmlis=str_replace("", "
LabelValue
", $htmlis); } else { $htmlis=str_replace("", "
Value
", $htmlis); } while (isset($_POST['i' . $ival])) { 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++; } echo $htmlis; exit; } else if (isset($_GET['i0']) && isset($_GET['fconcept'])) { // Form findings $htmlis=" " . str_replace("Survey Survey","Survey",str_replace('+',' ',urldecode($_GET['fconcept'])) . " Survey") . " Report var dul=document.URL.split('#')[0].split('?')[0]; var argis=''; 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,'+'); }

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

... another? email?

"; $ival=0; if (isset($_GET['s' . $ival])) { $htmlis=str_replace("", "
LabelValue
", $htmlis); } else { $htmlis=str_replace("", "
Value
", $htmlis); } while (isset($_GET['i' . $ival])) { 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++; } echo $htmlis; exit; } else { if (isset($_POST['theto'])) { if (strpos(urldecode($_POST['theto']), "@") !== false) { // && strpos($htmlis, "") !== false) { $htmlis=" " . str_replace("Survey Survey","Survey",str_replace('+',' ',urldecode($_POST['concept'])) . " Survey") . " Form Questions

" . str_replace("Survey Survey","Survey",str_replace("+"," ",urldecode($_POST['concept'])) . " Survey") . " 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","Survey"'; $qarrays='"questions","tongue_twisters","haiku","animal_categorization","vocabulary","survey"'; $qdelims='"?","~","`","`","`","?"'; $qcols='"yellow","lightgreen","lightblue","lightgray","pink","orange"'; $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'])) { $qone=urldecode($_GET['concept']); $qlabels='"' . $qone . '"'; $qarrays='"questions"'; $qdelims='"?"'; $qcols='"pink"'; $qforce="0; /" . "/ "; $qins=""; if (strpos(explode('",', $qis)[0], "?") === false) { $qins.=" "; } else if (strlen(explode("?", explode('",', ($qis . ","))[0])[0] . "?") == strlen(explode('",', $qis)[0])) { $qins.=" "; } else { $qins.="" . substr(explode("?", explode('",', ($qis . ","))[0])[1],0) . " "; } $qins.="
"; for ($ii=1; $ii "; } else if (strlen(explode("?", explode('",', ($qis . ","))[$ii])[0] . "?") == strlen(explode('",', $qis)[$ii])) { $qins.=" "; } else { $qins.=" "; } $qins.="
"; $qlast=$ii; } $ifmaybe="

" . $qone . " Form

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

" . $qone . " Form

" . $qins . "
"; } else if (isset($_POST['concept'])) { $qone=urldecode($_POST['concept']); $qlabels='"' . $qone . '"'; $qarrays='"questions"'; $qdelims='"?"'; $qcols='"pink"'; $qforce="0; /" . "/ "; $qins=""; if (strpos(explode('",', $qis)[0], "?") === false) { $qins.=" "; } else if (strlen(explode("?", explode('",', ($qis . ","))[0])[0] . "?") == strlen(explode('",', $qis)[0])) { $qins.=" "; } else { $qins.="" . substr(explode("?", explode('",', ($qis . ","))[0])[1],0) . " "; } $qins.="
"; for ($ii=1; $ii "; } else if (strlen(explode("?", explode('",', ($qis . ","))[$ii])[0] . "?") == strlen(explode('",', $qis)[$ii])) { $qins.=" "; } else { $qins.=" "; } $qins.="
"; $qlast=$ii; } $ifmaybe="

" . $qone . " Form

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

" . $qone . " Form

" . $qins . "
"; } } ?> 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(); pickq();">
(thanks to Google Speech to Text)

<- 1 Player 2 ->

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



Score: 0/0