diff options
Diffstat (limited to 'series/trunk/admin/mansub.php')
| -rw-r--r-- | series/trunk/admin/mansub.php | 39 |
1 files changed, 39 insertions, 0 deletions
| diff --git a/series/trunk/admin/mansub.php b/series/trunk/admin/mansub.php new file mode 100644 index 0000000..358365f --- /dev/null +++ b/series/trunk/admin/mansub.php | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | /* InstaDisc Series - A Four Island Project */ | ||
| 4 | |||
| 5 | /** | ||
| 6 | * require_once() is used to ensure | ||
| 7 | * the ACP files are being called by | ||
| 8 | * admin.php instead of their actual | ||
| 9 | * locations admin/. | ||
| 10 | * The _once() part ensures no problem | ||
| 11 | * arises as includes/instadisc.php has | ||
| 12 | * already been included from admin.php | ||
| 13 | */ | ||
| 14 | require_once('includes/instadisc.php'); | ||
| 15 | |||
| 16 | if (!isset($_SESSION['username'])) | ||
| 17 | { | ||
| 18 | header('Location: index.php'); | ||
| 19 | } | ||
| 20 | |||
| 21 | $template = new FITemplate('mansub'); | ||
| 22 | $template->add('SITENAME', instaDisc_getConfig('siteName')); | ||
| 23 | |||
| 24 | if (instaDisc_isAdmin($_SESSION['username'])) | ||
| 25 | { | ||
| 26 | $subs = instaDisc_getAllSubscriptions(); | ||
| 27 | } else { | ||
| 28 | $subs = instaDisc_listSubscriptions($_SESSION['username']); | ||
| 29 | } | ||
| 30 | $i=0; | ||
| 31 | for ($i=0;isset($subs[$i]);$i++) | ||
| 32 | { | ||
| 33 | $template->adds_block('SUBSCRIPTION', array( 'IDENTITY' => $subs['identity'], | ||
| 34 | 'ID' => $subs['id'])); | ||
| 35 | } | ||
| 36 | |||
| 37 | $template->display(); | ||
| 38 | |||
| 39 | ?> | ||
