Newer
Older
Import / web / www.xiaofrog.com / games / sudoku / index.php
<?php
/*
    Sudoku Puzzle HTML 
    (C) Copyright 2007
    John Ryland <jryland@invertedlogic.com>

    ALL RIGHTS RESERVED
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta CONTENT="text/html; charset=UTF-8" HTTP-EQUIV="CONTENT-TYPE"/>
    <meta content="webmaster@xiaofrog.com" name="email"/>
    <meta content="(C) Copyright 2007, XiaoFrog" name="copyright"/>
    <title>XiaoFrog - Sudoku</title>
    <link type="text/css" rel="stylesheet" href="http://xiaofrog.com/style/style.css"/>
    <link type="text/css" rel="stylesheet" href="sudoku.css" />
    <script type="text/javascript" language="JavaScript" src="sudoku.js"></script>
  </head>
<body onLoad="newGame();">

<div id="header">
<div id="title">XiaoFrog</div>
<div id="logo">&nbsp;</div>
<div id="tagline">Anything and Everything</div>
</div>

<?php include("../../style/body-toolbar.php") ?> 

<!--
<ul id="sidebar">
<li></li>
</ul>
-->

<div id="border">
<div id="top-border"></div>
<div id="content">

<?php

function nonSelectableText($string)
{
    echo '<input type="submit" disabled class="blank" value="'.$string.'" />';
}

?>

  <h1>Sudoku</h1>
  <p>

<div style="margin: 0px 241px 0px 241px; auto; width: 180px; height: 180px; background-image: url(postit.gif); padding: 35px 20px 5px 20px;">
<!-- Begin BidVertiser code -->
<SCRIPT LANGUAGE="JavaScript1.1" SRC="http://bdv.bidvertiser.com/BidVertiser.dbm?pid=158078&bid=381902" type="text/javascript"></SCRIPT>
<noscript><a href="http://www.bidvertiser.com/bdv/BidVertiser/bdv_advertiser.dbm">marketing</a></noscript>
<!-- End BidVertiser code --> 
</div>

  <p>
  <div id='explaination'>
  Complete the puzzle to fill in all the blank squares with numbers from 1 to 9.<br />
  Each 3x3 box, row and column must contain the numbers from 1 to 9.
  </div>
  <p>
  <div class='buttonBox'>
    <input id="newButton"   type="submit" class="Button" onClick="newGame();" value="New Game" />
    &nbsp;
    <input id="resetButton" type="submit" class="Button" onClick="resetGame();" value="Reset" />
    &nbsp;
    <input id="pauseButton" type="submit" class="Button" onClick="pauseGame();" value="Pause" />
  </div>
  <p>
  <div class='buttonBox'>
    <input id="printButton" type="submit" class="Button" onClick="printGame();" value="Print" />
    &nbsp;
    <input id="checkButton" type="submit" class="Button" onClick="checkAnswers();" value="Check Answers" />
    &nbsp;
    <input id="solveButton" type="submit" class="Button" onClick="solveGame();" value="Solve" />
  </div>
  <p>
  <div id="puzzleArea">
  <form>
  <table id='bigbox' cellspacing=0 cellpadding=0>
<?php

function outputBoxCell($off)
{
    echo "<td><input id='".$off."' maxlength='1' autocomplete='off' size='2' onClick='resetItem(\"".$off."\");'/></td>";
}

function outputBoxRow($off)
{
    echo "        <tr>";
    outputBoxCell(1+$off);
    outputBoxCell(2+$off);
    outputBoxCell(3+$off);
    echo "</tr>\n";
}

function outputBox($off)
{
    echo "      <td><table id='boxes' cellspacing=0 cellpadding=0>\n";
    outputBoxRow(0+$off);
    outputBoxRow(9+$off);
    outputBoxRow(18+$off);
    echo "      </table></td>\n";
}

function outputRow($off)
{
    echo "    <tr>\n";
    outputBox(0+$off);
    outputBox(3+$off);
    outputBox(6+$off);
    echo "    </tr>\n";
}

outputRow(0);
outputRow(27);
outputRow(54);

?>
  </table>
  </form>
  </div>
  <div id="outterInProgress">
  <div id="inProgress">
    <div id="blah">
    <img width="30" height="30" src="loading.gif"><br>Please Wait...
    </div>
  </div>
  </div>
  <p>
  <div id="time"></div>
  <div id="status"></div>

<?php include("../../style/footer.php") ?>