Guest User

Untitled

a guest
Jun 18th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. function replay_drawBoard() {
  2.  
  3. $gBoard = $_SESSION['gBoard'];
  4.  
  5. print '<table border=0 cellpadding=0 cellspacing=0>';
  6.  
  7. $iLoop = 0;
  8.  
  9. for ($iRow = 0; $iRow < 5; $iRow++) {
  10.  
  11. print "<tr>\n";
  12.  
  13. for ($iCol = 0; $iCol < 5; $iCol++) {
  14.  
  15. if ($iRow == 1 || $iRow == 3) {
  16.  
  17. print "<td width=\"12\" height=\"5\" align=\"center\"
  18. ` valign=\"middle\" bgcolor=\"#000000\">&nbsp;</td>\n";
  19.  
  20. } else {
  21.  
  22. if ($iCol == 1 || $iCol == 3) {
  23.  
  24. print "<td width=\"12\" height=\"115\" align=\"center\"
  25. valign=\"middle\" bgcolor=\"#000000\">&nbsp;</td>\n";
  26.  
  27. } else {
  28.  
  29. print "<td width=\"115\" height=\"115\" align=\"center\"
  30. valign=\"middle\">";
  31.  
  32. if ($gBoard[$iLoop] == "x") {
  33.  
  34. print '<img src="../images/X.gif">';
  35.  
  36. } elseif ($gBoard[$iLoop] == "o") {
  37.  
  38. print '<img src="../images/O.gif">';
  39.  
  40. }
  41.  
  42. print "</td>\n";
  43.  
  44. $iLoop++;
  45. }
  46. }
  47. }
  48.  
  49. print "</tr>\n";
  50.  
  51. }
  52.  
  53. print "</table>";
  54. }
Add Comment
Please, Sign In to add comment