fixed last commit.
for new games, the table is now shown and one can select the place people are sitting
better.
+.rules {
+margin-top:20em;
+}
while( $r = mysql_fetch_array($result,MYSQL_NUM))
{
while( $r = mysql_fetch_array($result,MYSQL_NUM))
{
- echo "<a href=\"".$host."?me=".$r[0]."\">game #".$r[1]." </a><br />\n";
+ echo "<a href=\"".$host."?me=".$r[0]."\">game ".DB_format_gameid($r[1])." </a><br />\n";
}
else if(myisset("new"))
{
}
else if(myisset("new"))
{
- $names = DB_get_all_names();
- output_form_for_new_game($names);
+ if( isset($_SESSION["name"]) )
+ {
+ $names = DB_get_all_names();
+ output_form_for_new_game($names);
+ }
+ else
+ {
+ echo "Please log in.";
+ }
}
/*check if everything is ready to set up a new game */
else if( myisset("PlayerA", "PlayerB","PlayerC","PlayerD","dullen","schweinchen","call" ))
}
/*check if everything is ready to set up a new game */
else if( myisset("PlayerA", "PlayerB","PlayerC","PlayerD","dullen","schweinchen","call" ))
<h2> Players </h2>
<p>Please select four players (or use the randomly pre-selected names)</p>
<form action="index.php" method="post">
<h2> Players </h2>
<p>Please select four players (or use the randomly pre-selected names)</p>
<form action="index.php" method="post">
+
+ <div class="table">
+ <img src="pics/table.png" alt="table" />
<?php
/* ask for player names */
<?php
/* ask for player names */
foreach( array("PlayerA","PlayerB","PlayerC","PlayerD") as $player)
{
srand((float) microtime() * 10000000);
$randkey = array_rand($names);
$rand = $names[$randkey];
foreach( array("PlayerA","PlayerB","PlayerC","PlayerD") as $player)
{
srand((float) microtime() * 10000000);
$randkey = array_rand($names);
$rand = $names[$randkey];
+ echo "<span class=\"table".$i."\">";
+ $i++;
echo " Name: <select name=\"$player\" size=\"1\" /> \n";
foreach($names as $name)
{
echo " Name: <select name=\"$player\" size=\"1\" /> \n";
foreach($names as $name)
{
else
echo " <option>$name</option>\n";
}
else
echo " <option>$name</option>\n";
}
+ echo " </select></span>\n";
+ </div>
+ <h2 class="rules"> Rules </h2>
<p> Some areas are grayed out which means that the rule is not implemented yet and therefore cannot be selected </p>
<p> ten of hearts:
<ul>
<p> Some areas are grayed out which means that the rule is not implemented yet and therefore cannot be selected </p>
<p> ten of hearts:
<ul>