played the first complete game :)
authorarun <arun@nubati.net>
Sat, 18 Nov 2006 11:26:21 +0000 (11:26 +0000)
committerarun <arun>
Sat, 18 Nov 2006 11:26:21 +0000 (11:26 +0000)
index.php

index 162656eb966568f87a54942959f24c940d30dd03..d1dad1baf98a4f00efeb9116a875b7ceff00e4d6 100644 (file)
--- a/index.php
+++ b/index.php
@@ -12,7 +12,7 @@
 <?php
 /* helper function */
 function mymail($To,$Subject,$message)
 <?php
 /* helper function */
 function mymail($To,$Subject,$message)
-{
+{  
   $debug = 1;
   if($debug)
     echo "<br>To: $To<br>Subject: $Subject <br>$message<br>";
   $debug = 1;
   if($debug)
     echo "<br>To: $To<br>Subject: $Subject <br>$message<br>";
@@ -471,9 +471,9 @@ if(sizeof($lines)<2)
               {
                 for($i=0;$i<4;$i++)
                   {
               {
                 for($i=0;$i<4;$i++)
                   {
-                    echo "Hello ".$player[$hash[$i]]["name"].",\n";
-                    echo "\n";
-                    echo "the game has been cancled due to the request of one of the players.\n";
+                    $message = "Hello ".$player[$hash[$i]]["name"].",\n\n".
+                      "the game has been cancled due to the request of one of the players.\n";
+                    mymail($player[$hash[$i]]["email"],"[DoKo] the game has been cancled",$message); 
                   }
                   $output = fopen("status.txt","w");
                   if($output)
                   }
                   $output = fopen("status.txt","w");
                   if($output)
@@ -501,6 +501,7 @@ if(sizeof($lines)<2)
                   }
                 echo "<br />\n";   
  ?>
                   }
                 echo "<br />\n";   
  ?>
+ <p>aehm... at the moment please just answer everything with no, still need to implement this</p>                
  <form action="index.php" method="post">
    
    do you want to play solo?
  <form action="index.php" method="post">
    
    do you want to play solo?
@@ -688,11 +689,14 @@ if(sizeof($lines)<2)
                 if(sizeof($tmp)==2 && strlen($tmp[0])==1)
                   {
                     $next=$tmp[0];
                 if(sizeof($tmp)==2 && strlen($tmp[0])==1)
                   {
                     $next=$tmp[0];
-                    echo "DEBUG: the next move is for <a href=\"index.php?me=".$hash[$next].">the next player</a><br>";
+
+                    /*
+                     * echo "DEBUG: the next move is for <a href=\"index.php?me=".$hash[$next]."\">the next player</a><br>";
+                     */
                     if(strlen(trim($player[$me]["cards"]))==0)
                       {
                         echo "<br> game over, count points <br>";
                     if(strlen(trim($player[$me]["cards"]))==0)
                       {
                         echo "<br> game over, count points <br>";
-                        for($i=0;$i>4;$i++)
+                        for($i=0;$i<4;$i++)
                           {
                             echo $player[$hash[$i]]["name"]." got ".$player[$hash[$i]]["points"]."<br>";
                           }
                           {
                             echo $player[$hash[$i]]["name"]." got ".$player[$hash[$i]]["points"]."<br>";
                           }