1 && (substr($_SERVER['REQUEST_URI'],($ii-1),1) != "G" && substr($_SERVER['REQUEST_URI'],$ii,1) != "a")) $bigdrt .= substr($_SERVER['REQUEST_URI'],($ii-1),1); $ii = $ii+1; } if (strpos($bigdrt, "~") !== false) { $bigdrt = ""; } else { $bigdrt = $_SERVER['DOCUMENT_ROOT']."/Games/Battleshipsandcruisers/"; } $bigdrt = str_replace("/u/sites/ozemail.com.au//Games", "/u/6/1/1331516/Games", $bigdrt); if (strpos($_SERVER['REQUEST_URI'], "mkuulma") !== false) $rjmbit = "members.ozemail.com.au%2F%7Emkuulma%2FGames%2FBattleshipsandcruisers"; $rjmb = "www.rjmprogramming.com.au/Games/Battleshipsandcruisers"; if (strpos($_SERVER['REQUEST_URI'], "mkuulma") !== false) $rjmb = "members.ozemail.com.au/~mkuulma/Games/Battleshipsandcruisers"; // if (strpos("*".$_SERVER['REQUEST_URI'], "*/~mkuulma") !== false) $drt = "http://members.ozemail.com.au/~mkuulma/"; //$bigdrt = ""; if (strpos($bigdrt, "rjmprogr") !== false) { $predrt = "http://www.rjmprogramming.com.au"; } else if (strpos($drt, "mkuulma") !== false) { $predrt = "http://members.ozemail.com.au"; $bigdrt = "/u/6/1/1331516/Games/Battleshipsandcruisers/"; } else { $predrt = "http://members.ozemail.com.au"; $bigdrt = "/u/6/1/1331516/Games/Battleshipsandcruisers/"; } $clue = ""; if (isset($_GET['isan'])) { $clue = $_GET['isan']; if (isset($_GET['alert'])) { echo ""."\n"; } } else if (isset($_GET['clue'])) { //$numarray = array( $nclue = $_GET['clue']; 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; } if (isset($_GET['alert'])) { header('Location: ./index2.php?alert='.$_GET['alert'].'&isan='.$clue); } else { header('Location: ./index2.php?isan='.$clue); } } if (isset($_GET['winneris'])) { $cs = createscoreselect($_GET['winneris'],1,0); if (isset($_GET['ss'])) { header('Location: ./index.php?ss='.substr($_GET['ss'],0,4)); } } if (!isset($_GET['midway']) || isset($_GET['waymid'])) { if (isset($_GET['bp'])) { if (strlen($_GET['bp']) > 0) { // if (isset($_GET['qpz'])) { // $file_handle = fopen($bigdrt."Test_" . server_remote_addr() .$isess. ".bcs", "w"); // fwrite($file_handle, str_replace("<", "<",str_replace(">", ">", $_GET['qpz']))); // fclose($file_handle); // } $blueprint = $_GET['bp']; $blueprintjs = "function getBP() { var x='".$blueprint."'; return x; }"."\n"; if (isset($_GET['isess'])) { $isess = substr($_GET['isess'],0,4); $file_handle = fopen($bigdrt."Test_" . server_remote_addr() . "_" . $_GET['isess'] . "_js_print" . ".blue", "w"); fwrite($file_handle, $blueprintjs); fclose($file_handle); if (file_exists($bigdrt."Player_" . server_remote_addr() . ".byline".$isess)) { $file_handle = fopen($bigdrt."Player_" . server_remote_addr() . ".byline".$isess, "r"); $postq = fread($file_handle, 1024); fclose($file_handle); //echo "

problem040 ".$postq."

"; $postq = str_replace("(2)", "( 1 )", $postq); $postq = str_replace("(1)", "(2)", $postq); $postq = str_replace("( 1 )", "(1)", $postq); if (isset($_GET['youare'])) { $postq = str_replace("nextis=".$_GET['iam'], "nextis="."(".$_GET['iam'].")", $postq); $postq = str_replace("nextis=".$_GET['youare'], "nextis=".$_GET['iam'], $postq); $postq = str_replace("nextis="."(".$_GET['iam'].")", "nextis=".$_GET['youare'], $postq); $postq = str_replace(" ".$_GET['iam'], " "."(".$_GET['iam'].")", $postq); $postq = str_replace(" ".$_GET['youare'], " ".$_GET['iam'], $postq); $postq = str_replace(" "."(".$_GET['iam'].")", " ".$_GET['youare'], $postq); } //$file_handle = fopen($bigdrt."Player_" . server_remote_addr() . ".byline".$isess, "w"); //fwrite($file_handle, $postq); //fclose($file_handle); } } } } } if (isset($_GET['isess'])) { if (file_exists($bigdrt."Test_" . server_remote_addr() . "_" . $_GET['isess'] . "_blue_print" . ".js")) { $file_handle = fopen($bigdrt."Test_" . server_remote_addr() . "_" . $_GET['isess'] . "_blue_print" . ".js", "r"); $blueprintjs = fgets($file_handle); if (strlen($blueprint) == 0) { $blueprint = str_replace("function getBP() { var x='","",$blueprintjs); $xfp = strpos($blueprint, "'"); $blueprint = str_replace("'","",substr($blueprint, 0, $xfp)); } fclose($file_handle); $file_handle = fopen($bigdrt."Test_" . server_remote_addr() . "_" . $_GET['isess'] . "_js_print" . ".blue", "w"); fwrite($file_handle, $blueprintjs); fclose($file_handle); } else if (file_exists($bigdrt."Test_" . server_remote_addr() . "_" . $_GET['isess'] . "_js_print" . ".blue")) { $file_handle = fopen($bigdrt."Test_" . server_remote_addr() . "_" . $_GET['isess'] . "_js_print" . ".blue", "r"); if (strlen($blueprint) == 0) { $blueprintjs = fgets($file_handle); $blueprint = str_replace("function getBP() { var x='","",$blueprintjs); $xfp = strpos($blueprint, "'"); $blueprint = str_replace("'","",substr($blueprint, 0, $xfp)); } fclose($file_handle); } if (file_exists($bigdrt."Test_" . server_remote_addr() . "_" . $_GET['isess'] . "_blue_print" . ".js")) { unlink($bigdrt."Test_" . server_remote_addr() . "_" . $_GET['isess'] . "_blue_print" . ".js"); } $welc=""; if (isset($_GET['welc'])) { $welc = "&midway=y&welc=".$_GET['welc']; if (isset($_GET['iam'])) { $welc .= "&iam=".$_GET['iam']; } if (isset($_GET['youare'])) { $welc .= "&youare=".$_GET['youare']; } if (isset($_GET['nextis'])) { $welc .= "&nextis=".$_GET['nextis']; } } if (isset($_GET['bp'])) { //sleep(2); if (!isset($_GET['midway'])) { header('Location: ./index.php?ss='.substr($_GET['isess'],0,4).$welc); } else { header('Location: ./index.php?midway=y&ss='.substr($_GET['isess'],0,4).$welc); } } } function who_am_i($inr) { global $bigdrt; $outr = $inr; if (file_exists($bigdrt."Player_" . server_remote_addr() . ".is")) { $file_handle = fopen($bigdrt."Player_" . server_remote_addr() . ".is", "r"); $outr=fgets($file_handle); //echo "

".$outr.server_remote_addr() ."

"; fclose($file_handle); } return $outr; } function biassed($insl) { $fq = strpos($insl,">".who_am_i("")." "); $cfq = ""; if ($fq !== false) { $ofq = $fq + 1; while (substr($insl,$fq,1) != "<") { $cfq = substr($insl,$fq,1).$cfq; $fq--; } $cfq = substr($insl,$fq,1).$cfq; while (substr($insl,$ofq,1) != ">") { $cfq = $cfq.substr($insl,$ofq,1); $ofq++; } $cfq = $cfq.substr($insl,$ofq,1); $fqq = strpos($insl,">Computer "); $cfqq = ""; if ($fqq !== false) { $ofqq = $fqq + 1; while (substr($insl,$fqq,1) != "<") { $cfqq = substr($insl,$fqq,1).$cfqq; $fqq--; } $cfqq = substr($insl,$fqq,1).$cfqq; while (substr($insl,$ofqq,1) != ">") { $cfqq = $cfqq.substr($insl,$ofqq,1); $ofqq++; } $cfqq = $cfqq.substr($insl,$ofqq,1); return str_replace(">Scores",">Scores".$cfq.$cfqq,str_replace($cfq, "", str_replace($cfqq, "", $insl))); } return str_replace(">Scores",">Scores".$cfq,str_replace($cfq, "", $insl)); } return $insl; } function maybeemail($inth) { global $bigdrt; $iout = $inth; $fpd = strpos($inth,"@"); if ($fpd !== false) { while (strcmp(substr($inth,$fpd,1), " ") != 0) { $fpd--; } //if (!file_exists($bigdrt."Player_" . server_remote_addr() . ".email")) { $file_handle = fopen($bigdrt."Player_" . server_remote_addr() . ".email", "w"); fwrite($file_handle, substr($inth, ($fpd + 1))); fclose($file_handle); $iout = substr($inth,0,($fpd-1)); //} } return $iout; } function jsbit($inj) { //$inj = str_replace(">","*",$inj); //$inj = str_replace("<","!",$inj); $inj = str_replace("","",$inj); //$jbit = " onclick='javascript: var xx = parent.document.getElementById(" . '"' . "score" . '"' . "); var xxx = " . '"'; $jbit = " "; if (strlen($jsbit) > 0 && strlen($dojsc) > 0) { $jbit = ""; if (strpos($dojsc,"= 0) { if (file_exists($bigdrt."Scores.are")) { $file_handle = fopen($bigdrt."Scores.are", "r"); $csout=fgets($file_handle); fclose($file_handle); $csout = biassed($csout); } } if ($csout == "") { $csout = $precsout.""; $csis = ""; if (file_exists($bigdrt."User_list.txt")) { $file_handle = fopen($bigdrt."User_list.txt", "r"); $outr=fgets($file_handle); fclose($file_handle); $outr = str_replace($csis,",",$outr); //echo $outr; $i = 0; $inval = ""; $insel = ""; $issel = true; while ($i < strlen($outr)) { $x = substr($outr,$i,1); //echo $x; if (!strcmp($x,"(")) { $issel = false; } else if (!strcmp($x,")")) { //echo "insel=".$insel; $csout = $csout . "'; $inval = ""; $insel = ""; $issel = true; } else if (strcmp($x,",") != 0) { if ($issel) { $insel = $insel . $x; } else { $inval = $inval . $x; } } $i = $i + 1; } $csout = $csout . ''; $file_handle = fopen($bigdrt."Scores.are", "w"); fwrite($file_handle,$csout); fclose($file_handle); } } if ($plus > 0 && file_exists($bigdrt."Scores.are")) { if (file_exists($bigdrt."Scores.are")) { $file_handle = fopen($bigdrt."Scores.are", "r"); $csout=fgets($file_handle); fclose($file_handle); } $csout = biassed($csout); $fg = strpos($csout,">".$inperson." "); if ($fg !== false) { $ccc = ">".$inperson." "; //echo "

".$inperson." ".$plus."

"; $fg2 = $fg + strlen($ccc); while (substr($csout,$fg2,1) != "<") { if (substr($csout,$fg2,1) != " ") $ccc .= substr($csout,$fg2,1); $fg2 = $fg2 + 1; } $lbit = substr($csout, $fg2); $ccc .= "<"; $www = " "; $msc = 1; $sc = 0; $num = "01234567890"; while (strcmp(substr($csout,$fg,1),"=")) { if (!strcmp(substr($csout,$fg,1),"'") && $www == "") { $www = $ccc; $ccc = substr($csout,$fg,1) . $ccc; } else if ($www != "" && strcmp(substr($csout,$fg,1),"'") && substr($csout,$fg,1) >= "0" && substr($csout,$fg,1) <= "9") { //$qw = 0; //while ($qw < strlen($num) && substr($num,$qw,1) != substr($csout,$fg,1)) // $qw = $qw + 1; //} $ir = 1; while ($ir <= $msc * intval(substr($csout,$fg,1))) { if ($mplus < 0) { $sc--; } else { $sc++; } $ir++; } //$sc = $sc + $msc * intval(substr($csout,$fg,1)); //echo "

".str_replace(">","?",str_replace("<","*",$csout))."

"; //echo "

".$inperson."schuh=".$sc.substr($csout,$fg,1)."

"; $msc *= 10; $ccc = substr($csout,$fg,1) . $ccc; } else { $ccc = substr($csout,$fg,1) . $ccc; } $fg = $fg - 1; } $fbit = substr($csout,0,($fg+1)); //echo "

sc=".$sc."

"; $ir = 1; while ($ir <= $plus) { $sc++; $ir++; } $xsc = sprintf("%ld", $sc); //echo "

xsc=".$xsc."

"; //echo "

".str_replace(">","?",str_replace("<","*",$fbit))."

"; //echo "

".str_replace(">","?",str_replace("<","*",$lbit))."

"; $csout = $fbit .$xsc.">".$inperson." ".$xsc.$lbit; //echo "

".str_replace(">","?",str_replace("<","*",$csout))."

"; } else { $csout = str_replace("","",$csout); } $file_handle = fopen($bigdrt."Scores.are", "w"); fwrite($file_handle,$csout); fclose($file_handle); } return $csout; } function startagain() { global $bigdrt; if (strpos($_SERVER['QUERY_STRING'],"startagain=") !== false) { if (strlen($bigdrt) > 0) { $dh = opendir($bigdrt); } else { $dh = opendir("."); } while (false !== ($filename = readdir($dh))) { $fq = strpos($filename,".url"); if ($fq !== false) { unlink($filename); } else { $fq = strpos($filename,"Player_"); if ($fq !== false) { if (strpos($filename,".byline") !== false) unlink($filename); } else { $fq = strpos($filename,"Test_"); if ($fq !== false) { unlink($filename); } else { $fq = $fq; } } } } if(isset($_GET['isMobile'])) header('Location: ./index.php?isMobile=y'); else header('Location: ./index.php'); } } function server_remote_addr() { $rma = $_SERVER['REMOTE_ADDR']; if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARTDED_FOR'] != '') { $rma = $_SERVER['HTTP_X_FORWARDED_FOR']; } else { $rma = $_SERVER['REMOTE_ADDR']; } $ua = strtolower($_SERVER['HTTP_USER_AGENT']); // you can add different browsers with the same way .. if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua)) $rma = '000000'.$rma; elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua)) $rma = '00000'.$rma; elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua)) $rma = '0000'.$rma; elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua)) $rma = '000'.$rma; elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua)) $rma = '00'.$rma; elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua)) $rma = '0'.$rma; return $rma; } function nickname($inr,$cs) { global $bigdrt; $outr = $inr; if (file_exists($bigdrt."Player_" . $inr . ".is")) { $file_handle = fopen($bigdrt."Player_" . $inr . ".is", "r"); $outr=fgets($file_handle); fclose($file_handle); } if (file_exists($bigdrt.substr($cs,0,4) . "_original.url") && !file_exists($bigdrt.substr($cs,0,4) . "_current.url")) { $file_handle = fopen($bigdrt.substr($cs,0,4) . "_original.url", "r"); $inu = fgets($file_handle); fclose($file_handle); $outu = $inu; $huh = strpos($inu,"&youare"); $huh2 = strpos($inu,"&youare=&"); if ($huh !== false) { if ($huh2 !== false) { $outu = str_replace("iam=","irealam=",$inu) . "&iam=" . $outr; $file_handle = fopen($bigdrt.substr($cs,0,4) . "_originally.url", "w"); fwrite($file_handle,$outu); fclose($file_handle); } else { $outu = $inu; } } else { $outu = str_replace("iam=","irealam=",$inu) . "&iam=" . $outr; $file_handle = fopen($bigdrt.$cs . "_originally.url", "w"); fwrite($file_handle,$outu); fclose($file_handle); } } return $outr; } startagain(); if (isset($_GET['rfh'])) { sleep(5); $rfh = $_GET['rfh']; $nextrfh = $rfh; if (file_exists($bigdrt."Test_" . server_remote_addr() . ".refresh")) { $file_handle = fopen($bigdrt."Test_" . server_remote_addr() . ".refresh", "r"); $rfh = fgets($file_handle, 4096); fclose($file_handle); if ($rfh == $nextrfh) file_exists($bigdrt."Test_" . server_remote_addr() . ".refresh"); } } //$file_handle = fopen($bigdrt."Player_" . $_SERVER['REMOTE_ADDR'] . ".is", "w"); //fwrite($file_handle, str_replace(" ","",$_GET['person1'])); //fclose($file_handle); //header('Location: ./index.php'); $userlist = ""; if (isset($_GET['purgethis'])) { if (file_exists($bigdrt."Player_list.txt")) { $file_handle = fopen($bigdrt."Player_list.txt", "r"); $playerlist = fgets($file_handle); fclose($file_handle); $file_handle = fopen($bigdrt."Player_list.txt", "w"); fwrite($file_handle,str_replace($_GET['purgethis'],",",$playerlist)); fclose($file_handle); } } $userlist = ""; if (isset($_GET['person1'])) { $tuser = str_replace(".","",str_replace(",","",str_replace(" ","",maybeemail($_GET['person1'])))); $file_handle = fopen($bigdrt."Player_" . server_remote_addr() . ".is", "r"); $wasp = fgets($file_handle, 4096); fclose($file_handle); $file_handle = fopen($bigdrt."Player_" . server_remote_addr() . ".is", "w"); fwrite($file_handle, $tuser); fclose($file_handle); if (strlen($wasp) != strlen($tuser) || strcmp($wasp,$tuser) != 0) { if (file_exists($bigdrt."Player_list.txt")) { $file_handle = fopen($bigdrt."Player_list.txt", "r"); $playerlist = fgets($file_handle); fclose($file_handle); $fq = strpos($playerlist,",".$wasp."(".server_remote_addr()."),"); if ($fq !== false) { $file_handle = fopen($bigdrt."Player_list.txt", "w"); fwrite($file_handle, str_replace(",".$wasp."(".server_remote_addr()."),",",".$tuser."(".server_remote_addr()."),",$playerlist)); fclose($file_handle); } } if (file_exists($bigdrt."User_list.txt")) { $file_handle = fopen($bigdrt."User_list.txt", "r"); $ulist = fgets($file_handle); fclose($file_handle); $fq = strpos($ulist,",".$wasp."(".server_remote_addr()."),"); if ($fq !== false) { $file_handle = fopen($bigdrt."User_list.txt", "w"); fwrite($file_handle, str_replace(",".$wasp."(".server_remote_addr()."),",",".$tuser."(".server_remote_addr()."),",$ulist)); fclose($file_handle); } } if (file_exists($bigdrt."Scores.are")) { $file_handle = fopen($bigdrt."Scores.are", "r"); $slist = fgets($file_handle); fclose($file_handle); $fq = strpos($slist,">".$wasp." "); if ($fq !== false) { $file_handle = fopen($bigdrt."Scores.are", "w"); fwrite($file_handle, str_replace(">".$wasp." ",">".$tuser." ",$slist)); fclose($file_handle); } } if (file_exists($bigdrt."User_list.txt")) { $file_handle = fopen($bigdrt."User_list.txt", "r"); $userlist = fgets($file_handle); fclose($file_handle); $fq = strpos($userlist,",".nickname(server_remote_addr(),"0101")."(".server_remote_addr()."),"); if ($fq !== false) { $fq = $fq; } else { $iii = -1; while (!$fq) { $iii = $iii + 1; $fq = strpos($userlist,",".nickname(server_remote_addr(),"0101").$iii."(".server_remote_addr()."),"); } if (!strpos(nickname(server_remote_addr(),"0101"),".")) { $file_handle = fopen($bigdrt."User_list.txt", "a"); fwrite($file_handle,",".nickname(server_remote_addr(),"0101").$iii."(".server_remote_addr()."),"); fclose($file_handle); } } } else if (!strpos(nickname(server_remote_addr(),"0101"),".")) { $file_handle = fopen($bigdrt."User_list.txt", "w"); fwrite($file_handle,",".nickname(server_remote_addr(),"0101")."(".server_remote_addr()."),"); fclose($file_handle); } } $lcodelis = "en"; $prelcodelis = "en"; if (isset($_GET['lpass'])) $prelcodelis = $_GET['lpass']; if (isset($_GET['mpass'])) { $lcodelis = $_GET['mpass']; if (strlen($lcodelis) == 0) $lcodelis = "en"; $file_handle = fopen($bigdrt."Player_" . server_remote_addr() . ".codel", "w"); fwrite($file_handle,$lcodelis); fclose($file_handle); if (!file_exists($bigdrt."Player_" . server_remote_addr() . ".email")) { $file_handle = fopen($bigdrt."Player_" . server_remote_addr() . ".email", "w"); fwrite($file_handle, ""); fclose($file_handle); } } else if (isset($_GET['lpass'])) { $lcodelis = $_GET['lpass']; if (strlen($lcodelis) == 0) $lcodelis = "en"; $file_handle = fopen($bigdrt."Player_" . server_remote_addr() . ".codel", "w"); fwrite($file_handle,$lcodelis); fclose($file_handle); if (!file_exists($bigdrt."Player_" . server_remote_addr() . ".email")) { $file_handle = fopen($bigdrt."Player_" . server_remote_addr() . ".email", "w"); fwrite($file_handle, ""); fclose($file_handle); } } else if (file_exists($bigdrt."Player_" . server_remote_addr() . ".codel")) { $file_handle = fopen($bigdrt."Player_" . server_remote_addr() . ".codel", "r"); $lcodelis = fgets($file_handle); fclose($file_handle); } if (!file_exists($bigdrt."Player_" . server_remote_addr() . ".email")) { $file_handle = fopen($bigdrt."Player_" . server_remote_addr() . ".email", "w"); fwrite($file_handle, ""); fclose($file_handle); } if (isset($_GET['isess']) && isset($_GET['person1']) && isset($_GET['isMobile']) && isset($_GET['iam'])) { if (strcmp($lcodelis,"en") == 0 || 1 == 1) { if (strcmp($lcodelis, $prelcodelis) != 0 && strcmp($lcodelis,"en") != 0) { header('Location: http://translate.google.com/translate?sl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2F'.$rjmbit.'%2Findexnoiframe.php%3Fiss%3D'.substr($_GET['isess'],0,4)."_x".server_remote_addr()."_".str_replace("&","",str_replace("=","",str_replace("?","",$qmk)))."_".$lcodelis."&tl=".$lcodelis); } else { header('Location: '.$drt.'battleshipsandcruisers.php?isMobile='.$_GET['isMobile']."&isess=".$_GET['isess']."&iam=".$_GET['person1']); } } else { header("Location: http://translate.google.com/translate?sl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2F".str_replace("/Games/Battleshipsandcruisers","",$rjmb)."%2Fbattleshipsandcruisers.php%3Fisess%3D".substr($_GET['isess'],0,4)."isMobile".$_GET['isMobile'].$_GET['person1']."&tl=".$lcodelis); } } else if (isset($_GET['isess']) && isset($_GET['person1']) && isset($_GET['iam'])) { if (strcmp($lcodelis,"en") == 0 || 1 == 1) { if (strcmp($lcodelis, $prelcodelis) != 0 && strcmp($lcodelis,"en") != 0) { header('Location: http://translate.google.com/translate?sl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2F'.$rjmbit.'h%2Findexnoiframe.php%3Fiss%3D'.substr($_GET['isess'],0,4)."_x".server_remote_addr()."_".str_replace("&","",str_replace("=","",str_replace("?","",$qmk)))."_".$lcodelis."&tl=".$lcodelis); } else { header('Location: '.$drt."battleshipsandcruisers.php?isess=".$_GET['isess']."&iam=".$_GET['person1']); } } else { header("Location: http://translate.google.com/translate?sl=en&js=n&prev=_t&hl=en&ie=UTF-8&layout=2&eotf=1&u=http%3A%2F%2F".str_replace("/Games/Battleshipsandcruisers","",$rjmb)."%2Fbattleshipsandcruisers.php%3Fisess%3D".substr($_GET['isess'],0,4).$_GET['person1']."&tl=".$lcodelis); } } else { if(isset($_GET['isMobile'])) header('Location: ./index.php?isMobile='.$_GET['isMobile']); else header('Location: ./index.php'); } } ?> World Championship Battleships and Cruisers 0) { echo '

'.$clue."

"."\n"; } else { if (strlen($blueprint) == 0) { echo ''."\n"; } else if (isset($_GET['bp'])) { echo ""."\n"; } else { echo ""."\n"; } if(isset($_GET['isMobile'])) echo 'World Championship Battleshipsandcruisers'; else echo 'World Championship Battleshipsandcruisers'; } ?>