From aa8219c03996d7ba325d71857bb34270a993d3f6 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 14 Sep 2008 16:35:31 +0000 Subject: Series: Added user management Refs #53 --- series/trunk/includes/instadisc.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'series/trunk/includes') diff --git a/series/trunk/includes/instadisc.php b/series/trunk/includes/instadisc.php index b7b5ed0..18d40ef 100644 --- a/series/trunk/includes/instadisc.php +++ b/series/trunk/includes/instadisc.php @@ -130,4 +130,29 @@ function instaDisc_getSubscriptionByID($id) return $getsub3; } +function instaDisc_addUser($username, $password) +{ + $insuser = "INSERT INTO users (username,password) VALUES (\"" . mysql_real_escape_string($username) . "\",\"" . mysql_real_escape_string(md5($password)) . "\")"; + $insuser2 = mysql_query($insuser); +} + +function instaDisc_deleteUser($id) +{ + $deluser = "DELETE FROM users WHERE id = " . $id; + $deluser2 = mysql_query($deluser); +} + +function instaDisc_getAllUsers() +{ + $getusers = "SELECT * FROM users"; + $getusers2 = mysql_query($getusers); + $i=0; + while ($getusers3[$i] = mysql_fetch_array($getusers2)) + { + $i++; + } + + return $getusers3; +} + ?> -- cgit 1.4.1