summaryrefslogtreecommitdiffstats
path: root/db.php
diff options
context:
space:
mode:
authorarun <arun@nubati.net>2006-12-13 18:32:33 +0000
committerarun <arun>2006-12-13 18:32:33 +0000
commit198ab37015dbe1f999f149dbd887dcb814202585 (patch)
tree9d0b56e57713740919d20ae57a8acb9358363b08 /db.php
parentfec84028d1c71200da12525df005774810b5dcd8 (diff)
downloade-DoKo-198ab37015dbe1f999f149dbd887dcb814202585.tar.gz
e-DoKo-198ab37015dbe1f999f149dbd887dcb814202585.tar.bz2
e-DoKo-198ab37015dbe1f999f149dbd887dcb814202585.zip
added two new features: local time and a link to the user page
Diffstat (limited to 'db.php')
-rw-r--r--db.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/db.php b/db.php
index f893748..4b18d9c 100644
--- a/db.php
+++ b/db.php
@@ -100,6 +100,16 @@ function DB_get_userid_by_email($email)
else
return 0;
}
+function DB_get_userid_by_email_and_password($email,$password)
+{
+ $result = mysql_query("SELECT id FROM User WHERE email=".DB_quote_smart($email)." AND password=".DB_quote_smart($password));
+ $r = mysql_fetch_array($result,MYSQL_NUM);
+
+ if($r)
+ return $r[0];
+ else
+ return 0;
+}
function DB_get_handid_by_hash($hash)
{
@@ -145,6 +155,17 @@ function DB_get_name_by_hash($hash)
return "";
}
+function DB_get_name_by_userid($id)
+{
+ $result = mysql_query("SELECT fullname FROM User WHERE id=".DB_quote_smart($id));
+ $r = mysql_fetch_array($result,MYSQL_NUM);
+
+ if($r)
+ return $r[0];
+ else
+ return "";
+}
+
function DB_get_status_by_hash($hash)
{
$result = mysql_query("SELECT status FROM Hand WHERE hash=".DB_quote_smart($hash));