about summary refs log tree commit diff stats
path: root/series/trunk/admin/manuser.php
blob: 4228a3674dece6d5cd59a9435b9be98142912b15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php

/* InstaDisc Series - A Four Island Project */

/** 
 * require_once() is used to ensure
 * the ACP files are being called by
 * admin.php instead of their actual
 * locations admin/.
 * The _once() part ensures no problem
 * arises as includes/instadisc.php has
 * already been included from admin.php
 */
require_once('includes/instadisc.php');

if (!isset($_SESSION['username']))
{
	header('Location: index.php');
	exit;
}

$template = new FITemplate('manuser');
$template->add('SITENAME', instaDisc_getConfig('siteName'));

if (instaDisc_isAdmin($_SESSION['username']))
{
	$users = instaDisc_getAllUsers();
} else {
	header('Location: index.php');
	exit;
}
$i=0; $j=0;
for ($i=0;isset($users[$i]);$i++)
{
	$j++;
}
$j--;
for ($i=0;$i<$j;$i++)
{
	$template->adds_block('USERS', array(	'USERNAME' => $users[$i]['username'],
						'ID' => $users[$i]['id']));
}

$template->display();

?>