|
|
@ -280,15 +280,15 @@ margin-top: 1em; |
|
|
|
</head> |
|
|
|
|
|
|
|
<?php |
|
|
|
if ($print) { |
|
|
|
if ($print) { |
|
|
|
echo '<body onload="window.print()">'; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
echo '<body>'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($game->toptext != '') { |
|
|
|
if ($game->toptext != '') { |
|
|
|
echo $game->toptext.'<br>'; |
|
|
|
} |
|
|
|
} |
|
|
|
?> |
|
|
|
<h1></h1> |
|
|
|
|
|
|
@ -302,12 +302,12 @@ margin-top: 1em; |
|
|
|
<p><table cellpadding="0" cellspacing="0" border="0"> |
|
|
|
|
|
|
|
<?php |
|
|
|
if ($game->param3 == 2) { |
|
|
|
if ($game->param3 == 2) { |
|
|
|
echo "<tr>\r\n"; |
|
|
|
game_cross_show_welcome( $game); |
|
|
|
echo "</tr>\r\n"; |
|
|
|
echo "<tr><tr><td> </td></tr>\r\n"; |
|
|
|
} |
|
|
|
} |
|
|
|
?> |
|
|
|
|
|
|
|
<tr> |
|
|
@ -342,7 +342,6 @@ if (document.getElementById("waitmessage") != null) |
|
|
|
<?php |
|
|
|
echo $html; |
|
|
|
?> |
|
|
|
|
|
|
|
OnlyCheckOnce = false; |
|
|
|
|
|
|
|
// Create the cell-to-word arrays. |
|
|
@ -355,41 +354,34 @@ if (document.getElementById("waitmessage") != null) |
|
|
|
} |
|
|
|
|
|
|
|
GuessLeter = new Array(CrosswordWidth); |
|
|
|
for (var x = 0; x < CrosswordWidth; x++) |
|
|
|
{ |
|
|
|
for (var x = 0; x < CrosswordWidth; x++) { |
|
|
|
GuessLeter[x] = new Array(CrosswordHeight); |
|
|
|
for (var y = 0; y < CrosswordHeight; y++) |
|
|
|
{ |
|
|
|
for (var y = 0; y < CrosswordHeight; y++) { |
|
|
|
GuessLeter[ x][ y] = "_"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
solu = new Array(CrosswordWidth); |
|
|
|
for (var x = 0; x < CrosswordWidth; x++) |
|
|
|
{ |
|
|
|
for (var x = 0; x < CrosswordWidth; x++) { |
|
|
|
solu[x] = new Array(CrosswordHeight); |
|
|
|
for (var y = 0; y < CrosswordHeight; y++) |
|
|
|
{ |
|
|
|
for (var y = 0; y < CrosswordHeight; y++) { |
|
|
|
solu[ x][ y] = ""; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for (var y = 0; y < CrosswordHeight; y++) |
|
|
|
for (var x = 0; x < CrosswordWidth; x++) |
|
|
|
{ |
|
|
|
for (var y = 0; y < CrosswordHeight; y++) { |
|
|
|
for (var x = 0; x < CrosswordWidth; x++) { |
|
|
|
TableAcrossWord[x][y] = -1; |
|
|
|
TableDownWord[x][y] = -1; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// First, add the horizontal words to the puzzle. |
|
|
|
for (var i = 0; i <= LastHorizontalWord; i++) |
|
|
|
{ |
|
|
|
for (var i = 0; i <= LastHorizontalWord; i++) { |
|
|
|
x = WordX[i]; |
|
|
|
y = WordY[i]; |
|
|
|
s = Guess[ i]; |
|
|
|
so = Solutions[ i]; |
|
|
|
for (var j = 0; j < WordLength[i]; j++) |
|
|
|
{ |
|
|
|
for (var j = 0; j < WordLength[i]; j++) { |
|
|
|
TableAcrossWord[x + j][y] = i; |
|
|
|
if( j < s.length) |
|
|
|
c = s.substr( j, 1); |
|
|
@ -405,14 +397,12 @@ if (document.getElementById("waitmessage") != null) |
|
|
|
} |
|
|
|
|
|
|
|
// Second, add the vertical words to the puzzle. |
|
|
|
for (var i = LastHorizontalWord + 1; i < Words; i++) |
|
|
|
{ |
|
|
|
for (var i = LastHorizontalWord + 1; i < Words; i++) { |
|
|
|
x = WordX[i]; |
|
|
|
y = WordY[i]; |
|
|
|
s = Guess[ i]; |
|
|
|
so = Solutions[ i]; |
|
|
|
for (var j = 0; j < WordLength[i]; j++) |
|
|
|
{ |
|
|
|
for (var j = 0; j < WordLength[i]; j++) { |
|
|
|
TableDownWord[x][y + j] = i; |
|
|
|
if( j < s.length) |
|
|
|
c = s.substr( j, 1); |
|
|
@ -428,20 +418,16 @@ if (document.getElementById("waitmessage") != null) |
|
|
|
} |
|
|
|
|
|
|
|
document.writeln("<tr><td></td>"); |
|
|
|
for (var x = 0; x < CrosswordWidth; x++) |
|
|
|
{ |
|
|
|
for (var x = 0; x < CrosswordWidth; x++) { |
|
|
|
document.write("<td align=center>" + (x+1) + " </td>"); //col numbers |
|
|
|
} |
|
|
|
|
|
|
|
// Now, insert the row HTML into the table. |
|
|
|
for (var y = 0; y < CrosswordHeight; y++) |
|
|
|
{ |
|
|
|
for (var y = 0; y < CrosswordHeight; y++) { |
|
|
|
document.writeln("<tr>"); |
|
|
|
document.write("<td>" + (y+1)+" </td>"); //line numbers |
|
|
|
for (var x = 0; x < CrosswordWidth; x++) |
|
|
|
{ |
|
|
|
if (TableAcrossWord[x][y] >= 0 || TableDownWord[x][y] >= 0) |
|
|
|
{ |
|
|
|
for (var x = 0; x < CrosswordWidth; x++) { |
|
|
|
if (TableAcrossWord[x][y] >= 0 || TableDownWord[x][y] >= 0) { |
|
|
|
var s; |
|
|
|
s = "<td id=\"c" + PadNumber(x) + PadNumber(y); |
|
|
|
s += "\" class=\"gamebox boxnormal_unsel\" onclick=\"SelectThisWord(event);\">"; |
|
|
@ -455,9 +441,10 @@ if (document.getElementById("waitmessage") != null) |
|
|
|
document.write( GuessLeter[x][y]); |
|
|
|
|
|
|
|
document.write("</td>"); |
|
|
|
}else |
|
|
|
} else { |
|
|
|
document.write("<td></td>"); //empty cell |
|
|
|
} |
|
|
|
} |
|
|
|
document.writeln("</tr>"); |
|
|
|
} |
|
|
|
|
|
|
@ -815,10 +802,8 @@ function OnPrint() |
|
|
|
} |
|
|
|
<?php |
|
|
|
} |
|
|
|
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
if ($showhtmlprintbutton) { |
|
|
|
?> |
|
|
@ -988,7 +973,6 @@ function CheckHtmlClick() |
|
|
|
|
|
|
|
</tr></table> |
|
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
if ($onlyshow == false) { |
|
|
|
echo '<div style="margin-top: 1em;">'; |
|
|
@ -1067,7 +1051,6 @@ function CheckHtmlClick() |
|
|
|
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
|
|
</body> |
|
|
|
|
|
|
|
<?php |
|
|
@ -1137,7 +1120,6 @@ function game_cross_show_welcome1() { |
|
|
|
onkeypress="WordEntryKeyPress(event)" onchange="WordEntryKeyPress(event)" autocomplete="off"></div> |
|
|
|
<div id="worderror" style="color:#c00000;font-weight:bold;display:none;margin-top:1em;"></div> |
|
|
|
|
|
|
|
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="margin-top:1em;"><tr> |
|
|
|
<td align="right"> |
|
|
|
<button id="okbutton" type="button" class="button" onclick="OKClick();" style="font-weight: bold;">OK</button> |
|
|
@ -1146,18 +1128,14 @@ function game_cross_show_welcome1() { |
|
|
|
|
|
|
|
</td><td> </td><td> |
|
|
|
|
|
|
|
|
|
|
|
<div id="answerbox2" class="answerboxstyle" style="display:none;"> |
|
|
|
<h3 id="wordlabel" style="text-transform:uppercase;margin:0;"> </h3> |
|
|
|
<div id="wordinfo" style="font-size:8pt;color:#808080"> </div> |
|
|
|
<div id="wordclue" class="cluebox"> </div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</td> |
|
|
|
<?php |
|
|
|
} |
|
|
|