X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fuser.php;h=fa4653de449b8bec3a5805c212ecea07853b847e;hp=0f67a68f9791ff9f7fc418421d46817dbc12494d;hb=90323815e10b6bd6dc04e270a78ee9687a2f357a;hpb=09515348107d9aab7823a12d31b082a2ebb75555
diff --git a/include/user.php b/include/user.php
index 0f67a68..fa4653d 100644
--- a/include/user.php
+++ b/include/user.php
@@ -111,26 +111,26 @@ if(myisset("forgot"))
{
case "germancards":
case "englishcards":
- $result = mysql_query("SELECT * from User_Prefs".
- " WHERE user_id='$myid' AND pref_key='cardset'" );
- if( mysql_fetch_array($result,MYSQL_NUM))
- $result = mysql_query("UPDATE User_Prefs SET value=".DB_quote_smart($setpref).
- " WHERE user_id='$myid' AND pref_key='cardset'" );
+ $result = DB_query("SELECT * from User_Prefs".
+ " WHERE user_id='$myid' AND pref_key='cardset'" );
+ if( DB_fetch_array($result))
+ $result = DB_query("UPDATE User_Prefs SET value=".DB_quote_smart($setpref).
+ " WHERE user_id='$myid' AND pref_key='cardset'" );
else
- $result = mysql_query("INSERT INTO User_Prefs VALUES(NULL,'$myid','cardset',".
- DB_quote_smart($setpref).")");
+ $result = DB_query("INSERT INTO User_Prefs VALUES(NULL,'$myid','cardset',".
+ DB_quote_smart($setpref).")");
echo "Ok, changed you preferences for the cards.\n";
break;
case "emailaddict":
case "emailnonaddict":
- $result = mysql_query("SELECT * from User_Prefs".
- " WHERE user_id='$myid' AND pref_key='email'" );
- if( mysql_fetch_array($result,MYSQL_NUM))
- $result = mysql_query("UPDATE User_Prefs SET value=".DB_quote_smart($setpref).
- " WHERE user_id='$myid' AND pref_key='email'" );
+ $result = DB_query("SELECT * from User_Prefs".
+ " WHERE user_id='$myid' AND pref_key='email'" );
+ if( DB_fetch_array($result))
+ $result = DB_query("UPDATE User_Prefs SET value=".DB_quote_smart($setpref).
+ " WHERE user_id='$myid' AND pref_key='email'" );
else
- $result = mysql_query("INSERT INTO User_Prefs VALUES(NULL,'$myid','email',".
- DB_quote_smart($setpref).")");
+ $result = DB_query("INSERT INTO User_Prefs VALUES(NULL,'$myid','email',".
+ DB_quote_smart($setpref).")");
echo "Ok, changed you preferences for sending out emails.\n";
break;
}
@@ -166,8 +166,8 @@ if(myisset("forgot"))
break;
case '1':
echo "Changed the password.
";
- mysql_query("UPDATE User SET password='".md5($_REQUEST["password1"]).
- "' WHERE id=".DB_quote_smart($myid));
+ DB_query("UPDATE User SET password='".md5($_REQUEST["password1"]).
+ "' WHERE id=".DB_quote_smart($myid));
break;
}
/* set password */
@@ -192,13 +192,13 @@ if(myisset("forgot"))
echo "
\n"; - while( $r = mysql_fetch_array($result,MYSQL_NUM)) + while( $r = DB_fetch_array($result)) { $game = DB_format_gameid($r[1]); $gamenr = (int) $game; @@ -212,14 +212,14 @@ if(myisset("forgot")) } if($r[4]=='pre') { - echo "\n p "; + echo "\n p "; } else if ($r[4]=='gameover') - echo "\n F "; + echo "\n F "; else { - echo "\n P "; + echo "\n P "; } if($r[4] != 'gameover') { @@ -233,12 +233,12 @@ if(myisset("forgot")) if(DB_get_reminder($r[3],$gameid)==0) if(time()-strtotime($r[2]) > 60*60*24*7) echo "". - "Send a reminder."; + "Send a reminder."; echo "(it's $name's turn)\n"; }; if(time()-strtotime($r[2]) > 60*60*24*30) echo "". - "Cancel?". + "Cancel?". " (clicking here is final and can't be restored)"; } |