if($EmailA=="" || $EmailB=="" || $EmailC=="" || $EmailD=="")
{
echo "couldn't find one of the names, please start a new game";
+ output_footer();
exit();
}
if($ruleset <0)
{
echo "Error defining ruleset: $ruleset";
+ output_footer();
exit();
};
{
echo "Can't find you in the database, please check the url.<br />\n";
echo "perhaps the game has been cancled, check by login in <a href=\"$host\">here</a>.";
+ output_footer();
exit();
}
{
echo "Can't find you in the database, please check the url.<br />\n";
echo "perhaps the game has been cancled, check by login in <a href=\"$host\">here</a>.";
+ output_footer();
exit();
}
/* delete everything from the dB */
DB_cancel_game($me);
+ output_footer();
exit();
}
DB_set_hand_status_by_hash($me,'play');
break;
case "poverty":
+ /* figure out who has poverty */
+ /* check who was asked already
+ * everyone or trump was taken?
+ * trump was taken, start game
+ * trump was not taken, cancle game
+ *
+ * not everyone, figure out who is next in the list
+ * is the next person this one?
+ * no, display wait message, e.g. player X is asked at the moment
+ * yes, display trump, ask if he wants to take it
+ * no, set player asked to true, email next player
+ * yes, display all cards, ask for N return cards
+ * set re/contra
+ *
+ */
case "dpoverty":
- echo "TODO: handle poverty here";
+ echo "TODO: handle double poverty here";
DB_set_hand_status_by_hash($me,'play');
};
}
default:
echo "error in testing the status";
}
+ output_footer();
exit();
}
/* user status page */
echo "<a href=\"".$host."?me=".$r[0]."\">game #".$r[1]." </a>";
if(time()-strtotime($r[2]) > 60*60*24*30)
echo " The game has been running for over a month.".
- " Do you want to cancel it? <a href=\"$host?cancle=1&me=".$r[0]."\">yes</a>".
+ " Do you want to cancel it? <a href=\"$host?cancle=1&me=".$r[0]."\">yes</a>".
" (clicking here is final and can't be restored)";
echo "<br />";
}
{
echo "sorry email and password don't match <br />";
}
+ output_footer();
exit();
}
/* page for registration */