예제 #1
0
파일: index.php 프로젝트: Artea/freebeer
 * Copyright 2003-2004 Mike Cochrane <*****@*****.**>
 *
 * See the enclosed file COPYING for license information (LGPL). If you
 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 */
@define('HORDE_BASE', dirname(__FILE__) . '/../..');
require_once HORDE_BASE . '/lib/base.php';
require_once HORDE_LIBS . 'Horde/Block.php';
require_once HORDE_LIBS . 'Horde/Identity.php';
require_once HORDE_LIBS . 'Horde/Menu.php';
require_once HORDE_LIBS . 'Horde/Help.php';
if (!Auth::isAuthenticated()) {
    Horde::authenticationFailureRedirect();
}
// Get full name for title
$identity =& Identity::singleton();
$fullname = $identity->getValue('fullname');
if (empty($fullname)) {
    $fullname = Auth::getAuth();
}
// Get refresh interval.
if ($prefs->getValue('summary_refresh_time')) {
    $refresh_time = $prefs->getValue('summary_refresh_time');
    $refresh_url = Horde::applicationUrl('services/portal/');
}
// Load layout from preferences.
$layout_pref = @unserialize($prefs->getValue('portal_layout'));
if (!is_array($layout_pref)) {
    $layout_pref = array();
}
// Store the apps we need to load stylesheets for.
예제 #2
0
파일: user.php 프로젝트: Artea/freebeer
    case 'removequeued':
        $result = $signup->removeQueuedSignup(Util::getFormData('user_name'));
        if (is_a($result, 'PEAR_Error')) {
            $notification->push($result);
        } else {
            $notification->push(sprintf(_("The signup request for %s has been removed."), Util::getFormData('user_name')));
        }
        break;
}
$title = _("User Administration");
require HORDE_TEMPLATES . '/common-header.inc';
require HORDE_TEMPLATES . '/admin/common-header.inc';
$notification->notify(array('listeners' => 'status'));
if (isset($update_form) && $auth->hasCapability('list')) {
    require_once HORDE_LIBS . 'Horde/Identity.php';
    $identity =& Identity::singleton('none', $f_user_name);
    require HORDE_TEMPLATES . '/admin/user/update.inc';
} elseif (isset($remove_form) && $auth->hasCapability('list') && $auth->hasCapability('remove')) {
    require HORDE_TEMPLATES . '/admin/user/remove.inc';
} elseif (isset($removequeued_form)) {
    require HORDE_TEMPLATES . '/admin/user/removequeued.inc';
} elseif ($auth->hasCapability('add')) {
    require HORDE_TEMPLATES . '/admin/user/add.inc';
    if ($conf['signup']['approve']) {
        require HORDE_TEMPLATES . '/admin/user/approve.inc';
    }
} else {
    require HORDE_TEMPLATES . '/admin/user/noadd.inc';
}
if ($auth->hasCapability('list')) {
    $users = $auth->listUsers();