-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewsubdivisions.php
37 lines (31 loc) · 941 Bytes
/
viewsubdivisions.php
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
<?php
require_once 'require/util.php'; //utility functions
require_once 'require/htmllib.php'; //HTML functions
require_once 'require/sublib.php'; //subdivision database functions
require_once 'require/config.php'; //server info
error_reporting(E_ALL); ///YES! YES! YES!
begin_session();
//begin page generation
print_htmlhead("View Subdivisions",0);
//Connect to Server
$server = bank_server_connect();
//the main event.
if ($_SESSION['authorized'] AND (($_SESSION['username'] == DB_ADMIN_NAME) OR ($_SESSION['status'] == 'Admin'))) //check for login and make sure they are the admin
{
$list = country_list($server);
foreach ($list as $country)
{
print ("<h3>".$country."</h3>");
$slist = subdivision_list_given($country,$server);
foreach ($slist as $subdivision)
{
print ($subdivision."<br />");
}
}
}
else
{
print('You must <a href="login.php">login</a> as an admin, to use this page.<br />');
}
print_htmlfoot();
?>