about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--series/trunk/admin/deletesub.php2
-rw-r--r--series/trunk/admin/editsub.php2
-rw-r--r--series/trunk/includes/instadisc.php9
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']))
52 $template->add('SITENAME',instaDisc_getConfig('siteName')); 52 $template->add('SITENAME',instaDisc_getConfig('siteName'));
53 $template->add('ID',$_GET['subid']); 53 $template->add('ID',$_GET['subid']);
54 54
55 $sub = instaDisc_getSubscription($_GET['subid']); 55 $sub = instaDisc_getSubscriptionByID($_GET['subid']);
56 $template->add('IDENTITY',$sub['identity']); 56 $template->add('IDENTITY',$sub['identity']);
57 $template->display(); 57 $template->display();
58} else { 58} 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']))
49 49
50if (!isset($_GET['submit'])) 50if (!isset($_GET['submit']))
51{ 51{
52 $sub = instaDisc_getSubscription($_GET['subid']); 52 $sub = instaDisc_getSubscriptionByID($_GET['subid']);
53 showForm($sub['identity'],$sub['title'],$sub['category'],$sub['url'],$sub['password'],array()); 53 showForm($sub['identity'],$sub['title'],$sub['category'],$sub['url'],$sub['password'],array());
54} else { 54} else {
55 $numOfErrors = 0; 55 $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)
121 return ($username == instaDisc_getConfig('adminUser')); 121 return ($username == instaDisc_getConfig('adminUser'));
122} 122}
123 123
124function instaDisc_getSubscriptionByID($id)
125{
126 $getsub = "SELECT * FROM subscriptions WHERE id = " . $id;
127 $getsub2 = mysql_query($getsub);
128 $getsub3 = mysql_fetch_array($getsub2);
129
130 return $getsub3;
131}
132
124?> 133?>