Europe/London"; $tstyle=''; if (isset($_GET['imageurl'])) { $fgc=file_get_contents(str_replace('https:','http:',str_replace('+',' ',urldecode($_GET['imageurl'])))); if (trim($fgc) != '') { if (isset($_GET['opacity'])) { $tstyle='background-image:linear-gradient(rgba(255,255,255,' . (1.0 - str_replace('+','',urldecode($_GET['opacity']))) . '),rgba(255,255,255,' . (1.0 - str_replace('+','',urldecode($_GET['opacity']))) . ')),URL(' . 'data:image/' . str_replace('jpg','jpeg',strtolower(explode('.',str_replace('+',' ',urldecode($_GET['imageurl'])))[-1 + sizeof(explode('.',str_replace('+',' ',urldecode($_GET['imageurl']))))])) . ';base64,' . str_replace(' ','+',base64_encode($fgc)) . '); background-repeat:no-repeat; background-size:contain; '; } else { $tstyle='background-image:linear-gradient(rgba(255,255,255,0.0),rgba(255,255,255,0.0)),URL(' . 'data:image/' . str_replace('jpg','jpeg',strtolower(explode('.',str_replace('+',' ',urldecode($_GET['imageurl'])))[-1 + sizeof(explode('.',str_replace('+',' ',urldecode($_GET['imageurl']))))])) . ';base64,' . str_replace(' ','+',base64_encode($fgc)) . '); background-repeat:no-repeat; background-size:contain; '; } } else { $fgc=str_replace('http:','',str_replace('https:','',str_replace('+',' ',urldecode($_GET['imageurl'])))); if (isset($_GET['opacity'])) { $tstyle='background-image:linear-gradient(rgba(255,255,255,' . (1.0 - str_replace('+','',urldecode($_GET['opacity']))) . '),rgba(255,255,255,' . (1.0 - str_replace('+','',urldecode($_GET['opacity']))) . ')),URL("' . $fgc . '"); background-repeat:no-repeat; background-size:contain; '; } else { $tstyle='background-image:linear-gradient(rgba(255,255,255,0.0),rgba(255,255,255,0.0)),URL("' . $fgc . '"); background-repeat:no-repeat; background-size:contain; '; } } if (!isset($_GET['across'])) { $_GET['across']='200'; } } $across=99; if (isset($_GET['across'])) { $across=str_replace('+',' ',urldecode($_GET['across'])); } $fontweight=1; if (isset($_GET['fontweight'])) { $fontweight=str_replace('+',' ',urldecode($_GET['fontweight'])); } $theans=rand(1,99); $theclue="switch ($nclue) { case 0: $clue = 'Is the additive identity.'; break; case 1: $clue = 'Is the multiplicative identity.'; break; case 2: $clue = 'Is the only even prime.'; break; case 3: $clue = 'Is the number of spatial dimensions we live in.'; break; case 4: $clue = 'Is the smallest number of colors sufficient to color all planar maps.'; break; case 5: $clue = 'Is the number of Platonic solids.'; break; case 6: $clue = 'Is the smallest perfect number.'; break; case 7: $clue = 'Is the smallest number of sides of a regular polygon that is not constructible by straightedge and compass.'; break; case 8: $clue = 'Is the largest cube in the Fibonacci sequence.'; break; case 9: $clue = 'Is the maximum number of cubes that are needed to sum to any positive integer.'; break; case 10: $clue = 'Is the base of our number system.'; break; case 11: $clue = 'Is the largest known multiplicative persistence.'; break; case 12: $clue = 'Is the smallest abundant number.'; break; case 13: $clue = 'Is the number of Archimedian solids.'; break; case 14: $clue = 'Is the smallest even number n with no solutions to phi(m) = n.'; break; case 15: $clue = 'Is the smallest composite number n with the property that there is only one group of order n.'; break; case 16: $clue = 'Is the only number of the form xy = yx with x and y being different integers.'; break; case 17: $clue = 'Is the number of wallpaper groups.'; break; case 18: $clue = 'Is the only positive number that is twice the sum of its digits.'; break; case 19: $clue = 'Is the maximum number of 4th powers needed to sum to any number.'; break; case 20: $clue = 'Is the number of rooted trees with 6 vertices.'; break; case 21: $clue = 'Is the smallest number of distinct squares needed to tile a square.'; break; case 22: $clue = 'Is the number of partitions of 8.'; break; case 23: $clue = 'Is the smallest number of integer-sided boxes that tile a box so that no two boxes share a common length.'; break; case 24: $clue = 'Is the largest number divisible by all numbers less than its square root.'; break; case 25: $clue = 'Is the smallest square that can be written as a sum of 2 squares.'; break; case 26: $clue = 'Is the only positive number to be directly between a square and a cube.'; break; case 27: $clue = 'Is the largest number that is the sum of the digits of its cube.'; break; case 28: $clue = 'Is the 2nd perfect number.'; break; case 29: $clue = 'Is the 7th Lucas number.'; break; case 30: $clue = 'Is the largest number with the property that all smaller numbers relatively prime to it are prime.'; break; case 31: $clue = 'Is a Mersenne prime.'; break; case 32: $clue = 'Is the smallest non-trivial 5th power.'; break; case 33: $clue = 'Is the largest number that is not a sum of distinct triangular numbers.'; break; case 34: $clue = 'Is the smallest number with the property that it and its neighbors have the same number of divisors.'; break; case 35: $clue = 'Is the number of hexominoes.'; break; case 36: $clue = 'Is the smallest non-trivial number which is both square and triangular.'; break; case 37: $clue = 'Is the maximum number of 5th powers needed to sum to any number.'; break; case 38: $clue = 'Is the last Roman numeral when written lexicographically.'; break; case 39: $clue = 'Is the smallest number which has 3 different partitions into 3 parts with the same product.'; break; case 40: $clue = 'Is the only number whose letters are in alphabetical order.'; break; case 41: $clue = 'Is a value of n so that x squared + x + n takes on prime values for x = 0, 1, 2, ... n-2.'; break; case 42: $clue = 'Is the 5th Catalan number.'; break; case 43: $clue = 'Is the number of sided 7-iamonds.'; break; case 44: $clue = 'Is the number of derangements of 5 items.'; break; case 45: $clue = 'Is a Kaprekar number.'; break; case 46: $clue = 'Is the number of different arrangements (up to rotation and reflection) of 9 non-attacking queens on a 9×9 chessboard.'; break; case 47: $clue = 'Is the largest number of cubes that cannot tile a cube.'; break; case 48: $clue = 'Is the smallest number with 10 divisors.'; break; case 49: $clue = 'Is the smallest number with the property that it and its neighbors are squareful.'; break; case 50: $clue = 'Is the smallest number that can be written as the sum of 2 squares in 2 ways.'; break; case 51: $clue = 'Is the 6th Motzkin number.'; break; case 52: $clue = 'Is the 5th Bell number.'; break; case 53: $clue = 'Is the only two digit number that is reversed in hexadecimal.'; break; case 54: $clue = 'Is the smallest number that can be written as the sum of 3 squares in 3 ways.'; break; case 55: $clue = 'Is the largest triangular number in the Fibonacci sequence.'; break; case 56: $clue = 'Is the number of reduced 5 × 5 Latin squares.'; break; case 57: $clue = 'Is 111 in base 7.'; break; case 58: $clue = 'Is the number of commutative semigroups of order 4.'; break; case 59: $clue = 'Is the number of stellations of an icosahedron.'; break; case 60: $clue = 'Is the smallest number divisible by 1 through 6.'; break; case 61: $clue = 'Is the 3rd secant number.'; break; case 62: $clue = 'Is the smallest number that can be written as the sum of 3 distinct squares in 2 ways.'; break; case 63: $clue = 'Is the number of partially ordered sets of 5 elements.'; break; case 64: $clue = 'Is the smallest number with 7 divisors.'; break; case 65: $clue = 'Is the smallest number that becomes square if its reverse is either added to or subtracted from it.'; break; case 66: $clue = 'Is the number of 8-iamonds.'; break; case 67: $clue = 'Is the smallest number which is palindromic in bases 5 and 6.'; break; case 68: $clue = 'Is the 2-digit string that appears latest in the decimal expansion of π.'; break; case 69: $clue = 'Is a value of n where n squared and n cubed together contain each digit once.'; break; case 70: $clue = 'Is the smallest weird number.'; break; case 71: $clue = 'Is the number that divides the sum of the primes less than it.'; break; case 72: $clue = 'Is the maximum number of spheres that can touch another sphere in a lattice packing in 6 dimensions.'; break; case 73: $clue = 'Is the smallest multi-digit number which is one less than twice its reverse.'; break; case 74: $clue = 'Is the number of different non-Hamiltonian polyhedra with a minimum number of vertices.'; break; case 75: $clue = 'Is the number of orderings of 4 objects with ties allowed.'; break; case 76: $clue = 'Is an automorphic number.'; break; case 77: $clue = 'Is the largest number that cannot be written as a sum of distinct numbers whose reciprocals sum to 1.'; break; case 78: $clue = 'Is the smallest number that can be written as the sum of 4 distinct squares in 3 ways.'; break; case 79: $clue = 'Is a permutable prime.'; break; case 80: $clue = 'Is the smallest number n where n and n+1 are both products of 4 or more primes.'; break; case 81: $clue = 'Is the square of the sum of its digits.'; break; case 82: $clue = 'Is the number of 6-hexes.'; break; case 83: $clue = 'Is the number of strongly connected digraphs with 4 vertices.'; break; case 84: $clue = 'Is the largest order of a permutation of 14 elements.'; break; case 85: $clue = 'Is the largest n for which 12+22+32+ ... +n2 = 1+2+3+ ... +m has a solution.'; break; case 86: $clue = 'Is 222 in base 6.'; break; case 87: $clue = 'Is the sum of the squares of the first 4 primes.'; break; case 88: $clue = 'Is one of only 2 numbers known whose square has no isolated digits.'; break; case 89: $clue = 'Is 8 to power of one + 9 to the power of 2.'; break; case 90: $clue = 'Is the number of degrees in a right angle.'; break; case 91: $clue = 'Is the smallest pseudoprime in base 3.'; break; case 92: $clue = 'Is the number of different arrangements of 8 non-attacking queens on an 8×8 chessboard.'; break; case 93: $clue = 'Is 333 in base 5.'; break; case 94: $clue = 'Is a Smith number.'; break; case 95: $clue = 'Is the number of planar partitions of 10.'; break; case 96: $clue = 'Is the smallest number that can be written as the difference of 2 squares in 4 ways.'; break; case 97: $clue = 'Is the smallest number with the property that its first 3 multiples contain the digit 9.'; break; case 98: $clue = 'Is the smallest number with the property that its first 5 multiples contain the digit 9.'; break; case 99: $clue = 'Is a Kaprekar number.'; break; } "; //$theclue=file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/Games/Battleshipsandcruisers/index2.php'); $ansa=explode('case ' . $theans . ':', $theclue); $thecluewording=explode("'", explode("'", $ansa[1])[1])[0]; $scorebit=''; if (isset($_GET['score']) && isset($_GET['secs'])) { $scorebit="Score " . $_GET['score'] . '/' . $_GET['secs']; } $wikistuff=str_replace(' ','_',$thecluewording) . ' ' . $thecluewording; $wikistuff="1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 70 71 71 72 72 73 73 74 74 75 75 76 76 77 77 78 78 79 79 80 80 81 81 82 82 83 83 84 84 85 85 86 86 87 87 88 88 89 89 90 90 91 91 92 92 93 93 94 94 95 95 96 96 97 97 98 98 99 99 "; if ($across > 9) { $waswikistuff=$wikistuff; $wikistuffs=explode("\n", $wikistuff); while (sizeof($wikistuffs) < ($across * $across)) { $wikistuff.=$waswikistuff; $wikistuffs=explode("\n", $wikistuff); } } $lastotherde=''; $wikistuffs=explode("\n", $wikistuff); $wikidesignations=[]; $wikidescriptions=[]; $crandlist=''; $randlist=[]; for ($i=0; $i', '', $templategame); $templategame=str_replace('', '', $templategame); //$templategame=file_get_contents('./experimentaldraganddrop.htm'); //if (isset($_GET['notice'])) { //$templategame=str_replace('>-', '>-+', $templategame); //} else { //$templategame=str_replace('>-', '>+-', $templategame); //} $arow=''; $rownum=$across; $tdnum=($across * $across); if (1 == 5) { for ($ijk=(1 + $across); $ijk<=$thnum; $ijk++) { if (($ijk % $across) == 1) { $rownum=(1 + ((-1 + $ijk) / $across)); $arow='' . $ijk . ''; } else if (($ijk % $across) == 0) { $arow=str_replace('', '' . $ijk . '', $arow); $templategame=str_replace('', $arow . '', $templategame); $arow=''; } else if (($ijk % $across) > 1) { $arow=str_replace('', '' . $ijk . '', $arow); $templategame=str_replace('', $arow . '', $templategame); $arow=''; } } $templategame=str_replace('', $arow . '', $templategame); //file_put_contents('xx.html', $templategame); } if ($across != $across || 1 == 1) { //$across=99; $irws=1; $sofartd=''; $two=2; if (strpos($templategame, '') !== false) { if ($tstyle != '') { $templategame=str_replace("", "\n
", $templategame); $tstyle=''; } if ($tstyle != '') { $wasih="", explode(""; } else { $wasih="", explode(""; } $templategame=str_replace($wasih, '', $templategame); } if (strpos($templategame, '

') !== false) { $wasih='#f0f0f0;">' . explode('#f0f0f0;">', explode("

", $templategame)[0])[-1 + sizeof(explode('#f0f0f0;">', explode("

", $templategame)[0]))] . "

"; $templategame=str_replace($wasih, '#f0f0f0;width:20px;height:25px;">🖌

', $templategame); } $wasih='
", explode('
"; $origih=$wasih; $newih='
'; $cacross='' . $across; $iacross=strlen($cacross); $thisid=''; $rowsofar=''; $thistdid='td'; $thistdidsuffix=''; $ttcnt=1; for ($thisrow=1; $thisrow<=$across; $thisrow++) { $cthisrow='0000000000' . $thisrow; //$rowsofar=''; $rowsofar=''; //$rowsofar=''; $thistdid='td' . substr($cthisrow, -$iacross, $iacross) . '_'; for ($thiscol=1; $thiscol<=$across; $thiscol++) { $cthiscol='0000000000' . $thiscol; $thistdidsuffix='' . substr($cthiscol, -$iacross, $iacross) . ''; $rowsofar=str_replace('>', '>', $rowsofar); } $newih=str_replace('', $rowsofar . '', $newih); } //echo strlen($newih); //exit; //file_put_contents('x.html', str_replace($origih, $wasih, $templategame)); $changeanyfrom='youllneverfindthis'; $changeanyto='youllneverfindthis'; if (isset($_GET['tableohprefix'])) { $changeanyfrom='width: 90%; height: 53%;'; // tableohprefix $changeanyto='position:absolute;top:0px;left:0px;width:' . trim(explode(';', explode('width:', str_replace('+',' ',urldecode($_GET['tableohprefix'])))[1])[0]) . ';height:' . trim(explode(';', explode('height:', str_replace('+',' ',urldecode($_GET['tableohprefix'])))[1])[0]) . ';'; $changeanyto='width:' . trim(explode(';', explode('width:', str_replace('+',' ',urldecode($_GET['tableohprefix'])))[1])[0]) . ';height:' . trim(explode(';', explode('height:', str_replace('+',' ',urldecode($_GET['tableohprefix'])))[1])[0]) . ';'; //$changeanyfrom='width:90vw;height:53vh;'; // tableohprefix //file_put_contents('x.x', $origih . "\n\n\n" . $newih); //$newih=""; } //else { //file_put_contents('x.x', $origih . "\n\n\n" . $newih); //} //if (strpos($templategame, $origih) !== false) { // file_put_contents('xx.xx', $origih . "\n\n\n" . $newih); //} $templategame=str_replace($changeanyfrom,$changeanyto,str_replace($origih, explode('Canvas Below
       
   
   
', $origih))[0] . $newih, $templategame)); if (isset($_GET['tableohprefix']) && 1 == 1) { $templategame=str_replace('v' . 'w;', '%' . ';', $templategame); $templategame=str_replace('v' . 'h;', '%' . ';', $templategame); } if (isset($_GET['tableohprefix']) && 4 == 41) { $templategame=str_replace('", "", $templategame); } $templategame=str_replace('93%', '95vw', $templategame); } $templategame=str_replace('1px dotted green', '0px dotted transparent', $templategame); $justforcolouringin=" var rectis=document.getElementById('mytable').getBoundingClientRect(); document.getElementById('mytable').width='' + rectis.height + 'px'; setTimeout(function(){ document.getElementsByTagName('h3')[0].style.display='none'; document.getElementsByTagName('h4')[0].style.display='none'; document.getElementsByTagName('h3')[1].style.display='none'; }, 7000); cibihcheck(); "; $templategame=str_replace('', '', $templategame); $templategame=str_replace('', "\n" . " function getduresult(inr) { document.getElementById('result').innerHTML=inr; onecheck(); return inr; } " . "\n" . '', $templategame); //$templategame=str_replace('>Game', '>Colouring In Numbers Guessing Game Game ... drag pen over canvas to colour in  
', $templategame); $templategame=str_replace('>Game', '>Colouring In Numbers Guessing Game Game
... drag over canvas to colour in   ', $templategame); //'', $templategame); $templategame=str_replace('>', '>' . $scorebit . '', $templategame); $thepsource=explode('f0;">', explode("

", $templategame)[0])[-1 + sizeof(explode('f0;">', explode("

", $templategame)[0]))]; //$templategame=str_replace(', 2023<', ', 2023 ... thanks to https://en.wikipedia.org/wiki/Street_suffix<', $templategame); $templategame=str_replace('>Reset example<', ' style="display:none;">Reset example<', $templategame); if (1 == 2) { $templategame=str_replace('', "", $templategame); } //echo $crandlist . "\n" . $thepsource . "\n" . $correctans . "\n"; //exit; //echo $crandlist . "\n"; //echo "" . $randlist[$correctans] . "\n" . $wikidescriptions[$randlist[$correctans]] . "\n" . $wikidesignations[$randlist[$correctans]]; //exit; if ($randmode == 0) { // designation up top and descriptions in drop zone if (1 == 6) { $templategame=str_replace('>' . (1 + $correctans) . '<', ' style=text-align:center; data-answer="' . $theans . '">' . $theans . '<', $templategame); $templategame=str_replace('">' . $thepsource . '<', 'text-align:center;" data-answer="' . $theans. '">' . $thecluewording . '<', $templategame); for ($i=1; $i<=99; $i++) { if ((-1 + $i) != $correctans) { $templategame=str_replace('>' . $i . '' . $i . '' . (1 + $correctans) . '<', ' style=text-align:center; data-answer="' . $wikidesignations[$randlist[$correctans]] . '">' .$wikidesignations[$randlist[$correctans]] . '<', $templategame); $templategame=str_replace('">' . $thepsource . '<', 'text-align:center;" data-answer="' . $wikidesignations[$randlist[$correctans]] . '">' . $wikidescriptions[$randlist[$correctans]] . '<', $templategame); for ($i=1; $i<=99; $i++) { if ((-1 + $i) != $correctans) { $templategame=str_replace('>' . $i . '' . mapittwo($wikidesignations[$randlist[-1 + $i]]) . '