summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--functions.php3
-rw-r--r--index.php6
3 files changed, 5 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e4e5f6c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*~ \ No newline at end of file
diff --git a/functions.php b/functions.php
index 4f33f1e..3a650a2 100644
--- a/functions.php
+++ b/functions.php
@@ -9,7 +9,6 @@ function mymail($To,$Subject,$message,$header="")
$message = str_replace("\n","<br />\n",$message);
$message = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",
"<a href=\"\\0\">\\0</a>", $message);
- //$message = ereg_replace("(http.*)[ <>]","<a href=\"\\1\">\\1 </a>",$message);
echo "<br />To: $To<br />";
if($header != "")
@@ -688,7 +687,7 @@ function can_call($what,$hash)
switch ($RULES["call"])
{
case "1st-own-card":
- if( 4-($what/30) >= 12 - $NRcards + $offset)
+ if( 4-($what/30) >= 12 - ($NRcards + $offset))
return 1;
break;
case "5th-card":
diff --git a/index.php b/index.php
index fa828da..dd1ce58 100644
--- a/index.php
+++ b/index.php
@@ -94,7 +94,7 @@ if(myisset("new"))
$ruleset = DB_get_ruleset_by_gameid($followup); /* just copy ruleset from old game,
this way no manipulation is possible */
if($session)
- mysql_query("INSERT INTO Game VALUES (NULL, NULL, '$randomNRstring', 'normal', NULL,NULL,'1','pre',".
+ mysql_query("INSERT INTO Game VALUES (NULL, NULL, '$randomNRstring', 'normal', NULL,NULL,'1','1','pre',".
"'$ruleset','$session' ,NULL)");
else
{
@@ -102,12 +102,12 @@ if(myisset("new"))
$max = DB_get_max_session();
$max++;
mysql_query("UPDATE Game SET session='".$max."' WHERE id=".DB_quote_smart($followup));
- mysql_query("INSERT INTO Game VALUES (NULL, NULL, '$randomNRstring', 'normal', NULL,NULL,'1','pre',".
+ mysql_query("INSERT INTO Game VALUES (NULL, NULL, '$randomNRstring', 'normal', NULL,NULL,'1','1','pre',".
"'$ruleset','$max' ,NULL)");
}
}
else
- mysql_query("INSERT INTO Game VALUES (NULL, NULL, '$randomNRstring', 'normal', NULL,NULL,'1','pre', ".
+ mysql_query("INSERT INTO Game VALUES (NULL, NULL, '$randomNRstring', 'normal', NULL,NULL,'1','1','pre', ".
"'$ruleset',NULL ,NULL)");
$game_id = mysql_insert_id();