From 652e497761183219a9cef2b2274a6de26c39e787 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 14 Sep 2008 16:03:31 +0000 Subject: Series: Added instaDisc_getSubscriptionByID() Refs #53 --- series/trunk/admin/deletesub.php | 2 +- series/trunk/admin/editsub.php | 2 +- series/trunk/includes/instadisc.php | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/series/trunk/admin/deletesub.php b/series/trunk/admin/deletesub.php index 37b0bee..ac22ef3 100644 --- a/series/trunk/admin/deletesub.php +++ b/series/trunk/admin/deletesub.php @@ -52,7 +52,7 @@ if (!isset($_GET['submit'])) $template->add('SITENAME',instaDisc_getConfig('siteName')); $template->add('ID',$_GET['subid']); - $sub = instaDisc_getSubscription($_GET['subid']); + $sub = instaDisc_getSubscriptionByID($_GET['subid']); $template->add('IDENTITY',$sub['identity']); $template->display(); } else { diff --git a/series/trunk/admin/editsub.php b/series/trunk/admin/editsub.php index cafd217..fee4107 100644 --- a/series/trunk/admin/editsub.php +++ b/series/trunk/admin/editsub.php @@ -49,7 +49,7 @@ if (!instaDisc_isAdmin($_SESSION['username'])) if (!isset($_GET['submit'])) { - $sub = instaDisc_getSubscription($_GET['subid']); + $sub = instaDisc_getSubscriptionByID($_GET['subid']); showForm($sub['identity'],$sub['title'],$sub['category'],$sub['url'],$sub['password'],array()); } else { $numOfErrors = 0; diff --git a/series/trunk/includes/instadisc.php b/series/trunk/includes/instadisc.php index 7334b6f..5fb3cd9 100644 --- a/series/trunk/includes/instadisc.php +++ b/series/trunk/includes/instadisc.php @@ -121,4 +121,13 @@ function instaDisc_isAdmin($username) return ($username == instaDisc_getConfig('adminUser')); } +function instaDisc_getSubscriptionByID($id) +{ + $getsub = "SELECT * FROM subscriptions WHERE id = " . $id; + $getsub2 = mysql_query($getsub); + $getsub3 = mysql_fetch_array($getsub2); + + return $getsub3; +} + ?> -- cgit 1.4.1