po/src/admin.php

57 lines
2.0 KiB
PHP

<?php
// Copyright (C) 2002-2006 Balint Kis (balint@k-i-s.net)
// Copyright (C) 2005-2013 Solomon Peachy (pizza@shaftnet.org)
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
include_once "include/config.php";
include_once "include/admin.php";
include_once "include/common.php";
include_once "include/import.php";
include_once "include/site.php";
$database = site_prolog(PO_USER_TYPE_ADMIN);
$auth_handle = new $po_auth();
$selector = isset($_REQUEST['selector']) ? $_REQUEST['selector'] : 1;
$all_user_types = pg_query($database, "
select user_type.identifier, user_type.value from user_type
where identifier != ".PO_USER_TYPE_ADMIN."");
$version = pg_fetch_assoc(pg_query($database, "select major,minor,variation from version"));
site_header($strings['generic_admin']);
site_navigator(9);
site_navigator_status($strings['generic_admin'], "PHP v$po_version DB v$version[major].$version[minor].$version[variation]");
theme_display_navigator_box_top($selector, $admin_data, "100%");
switch ($selector) {
case $admin_data['repository']['idx']:
display_image_repository($database, $image_repository_path);
break;
case $admin_data['users_n_clients']['idx']:
display_users_and_clients($database, $po_user['id'], $auth_handle);
break;
}
theme_display_navigator_box_bottom("100%");
site_footer($database);
site_epilog($database);
?>