steffen: server/kolab-resource-handlers/kolab-resource-handlers/fbview/fbview/config conf.php, NONE, 1.1 hooks.php, NONE, 1.1 html.php, NONE, 1.1 mime_drivers.php, NONE, 1.1 nls.php, NONE, 1.1 prefs.php, NONE, 1.1 registry.php, NONE, 1.1 .cvsignore, 1.1.1.1, 1.2

cvs at intevation.de cvs at intevation.de
Thu Jul 1 01:25:22 CEST 2004


Author: steffen

Update of /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/fbview/fbview/config
In directory doto:/tmp/cvs-serv13928/config

Modified Files:
	.cvsignore 
Added Files:
	conf.php hooks.php html.php mime_drivers.php nls.php prefs.php 
	registry.php 
Log Message:
preconfigured setup for the html freebusy view

--- NEW FILE: conf.php ---
<?php

$params = array();
require '/kolab/etc/resmgr/fbview.conf';

/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Horde: horde/config/conf.xml,v 1.40 2004/05/17 08:52:32 jan Exp $
$conf['debug_level'] = E_ALL;
$conf['max_exec_time'] = 0;
$conf['use_ssl'] = 2;
$conf['server']['name'] = $_SERVER['SERVER_NAME'];
$conf['server']['port'] = $_SERVER['SERVER_PORT'];
$conf['compress_pages'] = true;
$conf['umask'] = 077;
$conf['session']['name'] = 'Horde';
$conf['session']['cache_limiter'] = 'nocache';
$conf['session']['timeout'] = 0;
$conf['cookie']['domain'] = $_SERVER['SERVER_NAME'];
$conf['cookie']['path'] = '/fbview';
$conf['kolab']['server'] = $params['server'];
$conf['kolab']['maildomain'] = $params['email_domain'];
$conf['kolab']['basedn'] = $params['base_dn'];
$conf['kolab']['binddn'] = $params['bind_dn'];
$conf['kolab']['bindpw'] = $params['bind_pw'];
/*$conf['kolab']['cyrusadmin'] = 'manager';
$conf['kolab']['cyruspw'] = 'password';*/
$conf['kolab']['virtual_domains'] = $params['virtual_domains'];
$conf['sql']['phptype'] = 'mysql';
$conf['sql']['persistent'] = false;
$conf['sql']['protocol'] = 'unix';
$conf['sql']['hostspec'] = 'localhost';
$conf['sql']['username'] = 'horde';
$conf['sql']['password'] = 'horde';
$conf['sql']['database'] = 'horde';
$conf['sql']['charset'] = 'iso-8859-1';
$conf['auth']['admins'] = array('hordeadmin at oberon.co.za');
$conf['auth']['checkip'] = true;
$conf['auth']['params']['hostspec'] = 'localhost';
$conf['auth']['params']['port'] = 143;
$conf['auth']['params']['protocol'] = 'imap/notls';
$conf['auth']['params']['imapconfig'] = 'separate';
$conf['auth']['driver'] = 'imap';
$conf['signup']['allow'] = false;
$conf['signup']['approve'] = true;
$conf['signup']['preprocess'] = true;
$conf['signup']['queue'] = true;
$conf['log']['priority'] = PEAR_LOG_NOTICE;
$conf['log']['ident'] = 'HORDE';
$conf['log']['params'] = array();
$conf['log']['name'] = '/kolab/var/resmgr/fbview.log';
$conf['log']['params']['append'] = true;
$conf['log']['type'] = 'file';
$conf['log']['enabled'] = true;
$conf['log_accesskeys'] = false;
$conf['prefs']['driver'] = 'session';
$conf['datatree']['params']['driverconfig'] = 'horde';
$conf['datatree']['driver'] = 'null';
$conf['group']['driver'] = 'datatree';
$conf['cache']['default_lifetime'] = 1800;
$conf['cache']['params']['dir'] = Horde::getTempDir();
$conf['cache']['driver'] = 'file';
$conf['token']['driver'] = 'none';
$conf['mailer']['params']['auth'] = false;
$conf['mailer']['type'] = 'smtp';
$conf['vfs']['params']['vfsroot'] = '/tmp';
$conf['vfs']['type'] = 'file';
$conf['sessionhandler']['type'] = 'none';
$conf['problems']['email'] = 'webmaster at example.com';
$conf['user']['online_help'] = true;
$conf['css']['cached'] = true;
$conf['menu']['display'] = false;
$conf['menu']['always'] = false;
$conf['hooks']['username'] = false;
$conf['hooks']['preauthenticate'] = false;
$conf['hooks']['postauthenticate'] = false;
$conf['hooks']['authldap'] = false;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */

--- NEW FILE: hooks.php ---
<?php
/**
 * Horde Hooks configuration file.
 *
 * This file is where you define any hooks, for preferences or general
 * Horde use, that your installation uses. The functions in this file
 * can vastly change how your installation behaves, so make sure to
 * test out any changes here before doing them in a production
 * environment.
 *
 * Hook function names are automatically determined. The format of the
 * name is:
 *
 * _<type of hook>_hook_<name of hook>.
 *
 * Types of hooks that are defined in this file are 'prefs' (hooks to set the
 * value of preferences), 'horde' (hooks for the Horde  Framework scripts) and
 * 'app' (where app is any Horde application name, like 'imp') hooks that are
 * application specific.
 *
 * So, a hook to set the preference 'theme' would be named "_prefs_hook_theme".
 *
 * NOTE 1: Having a hook function in this file does NOT mean that the hook will
 * automatically be used. YOU MUST enable the hook. For preferences, set
 * 'hook' => true in that preferences attributes; for other hooks, there will be * a configuration option in each application's conf.php file such as
 * $conf['hooks']['hookname'] which must be set to true.
 *
 * NOTE 2: Preferences hooks are ONLY executed on login. Preferences are cached
 * during a users session and, to avoid unnecessary overhead every time a
 * preference is accessed, the results of hooks are cached as well. This leads
 * to ...
 *
 * NOTE 3: Any preference that is NOT LOCKED, that is set by a hook, WILL BE
 * SAVED WITH THAT VALUE. This means several things:
 *  1) Users will get the results of the hook set for them in their preferences. *  2) By virtue of this, the next time they log in and load their preferences,
 *     the hook will NOT be called, because in their last session, we saved the
 *     results of the hook for them. However, if the preference is locked, the
 *     result of the hook will never be saved.
 *
 * $Horde: horde/config/hooks.php.dist,v 1.62 2004/04/21 19:05:00 chuck Exp $
 */

// Example theme hook function. This shows how you can access things like the
// currently logged in user, global variables, server config, etc. It isn't,
// however, something you probably want to actually use in production, by virtue
// of demonstrating all those. :)
if (!function_exists('_prefs_hook_theme')) {
    function _prefs_hook_theme($username = null)
    {
        if (Auth::getAuth() != 'chuck') {
            return 'mozilla';
        }

        global $registry;
        switch ($registry->getApp()) {
        case 'imp':
            return 'brown';

        case 'turba':
            return 'orange';

        case 'kronolith':
            return 'green';

        default:
            return '';
        }
    }
}

// Example from_addr hook function. THIS FUNCTION ASSUMES THAT YOU ARE USING AN
// LDAP SERVER and that your /etc/ldap.conf or wherever it is correctly set to a
// valid host.
//
// You get passed NOTHING; you are responsible for bringing in to scope any
// information you need. You can "global" anything else you need. Return an
// address - either just the user@ side or a full address - and it will be used.
//
// If you want to use this code you will need to uncomment it below.
if (!function_exists('_prefs_hook_from_addr')) {
    /*
    function _prefs_hook_from_addr($name = null)
    {
        if (is_null($name)) {
            $name = Auth::getAuth();
        }
        if (!empty($name)) {
            $base_context = 'o=myorg';
            $scope = 'sub';

            // You will probably need to replace cd= with uid=; this
            // syntax is for Netware 5.1 nldap.
            $cmd  = '/usr/bin/ldapsearch -b ' . $base_context . ' -s ' . $scope . ' cn=';
            $cmd .= escapeShellCmd(Auth::getAuth());
            $cmd .= ' | /usr/bin/grep mail | /usr/bin/awk \'{print $2}\'';
            $mails = `$cmd`;
            $mail_array = explode("\n", $mails);

            // Send back the first email found, not the whole list.
            $mail = $mail_array['0'];

            // If no email address is found, then the login name will
            // be used.
            return (empty($mail) ? '' : $mail);
        }

        return '';
    }
    */

    // Here is another way of doing the same thing.

    /*
    function _prefs_hook_from_addr($user = null)
    {
        $ldapServer = '172.31.0.236';
        $ldapPort = '389';
        $searchBase = 'o=myorg';

        $ds = @ldap_connect($ldapServer, $ldapPort);

        if (is_null($user)) {
            $user = Auth::getAuth();
        }

        // You will probably need to replace cn= with uid=; this
        // syntax is for Netware 5.1 nldap.
        $searchResult = @ldap_search($ds, $searchBase, 'cn=' . $user);
        $information = @ldap_get_entries($ds, $searchResult);
        if ($information[0]['mail'][0] != '') {
            $name = $information[0]['mail'][0];
        } else {
            $name = $information[0]['cn'][0];
        }

        ldap_close($ds);

        return (empty($name) ? $user : $name);
    }
    */
}

// Here is an example signature hook function to set the signature from the
// system taglines file; the string "%TAG%" (if present in a user's signature)
// will be replaced by the content of the file "/usr/share/tagline" (generated
// by the "TaRT" utility).
//
// Notice how we global in the $prefs array to get the user's current signature.
if (!function_exists('_prefs_hook_signature')) {
    function _prefs_hook_signature($username = null)
    {
        $sig = $GLOBALS['prefs']->getValue('signature');
        if (preg_match('/%TAG%/', $sig)) {
            $tag = `cat /usr/share/tagline`;
            $sig = preg_replace('|%TAG%|', $tag, $sig);
        }
        return $sig;
    }
}

// IE on Mac hangs when there are several icons to be loaded. At least on some 
// systems. This hook disables the show_icons preference from Krononlith for
// these browsers.
if (!function_exists('_prefs_hook_show_icons')) {
    function _prefs_hook_show_icons()
    {
        global $browser;
        if ($browser->getPlatform() == 'mac' && $browser->getBrowser() == 'msie') {
            return false;
        } else {
            return true;
        }
    }
}

// This hook is called when a user submits a signup request.  It allows
// a chance to alter or validate the data submitted by a user before any
// attempts are made to add them to the system.
if (!function_exists('_horde_hook_signup_preprocess')) {
    function _horde_hook_signup_preprocess($info) {
        $info['user_name'] = String::lower($info['user_name']);
        return $info;
    }
}

// This hook is called when a signup is queued for administrative approval.
// This example sends a notification message to the web server
// administrator's e-mail address.
if (!function_exists('_horde_hook_signup_queued')) {
    function _horde_hook_signup_queued_walkdata($fields, $data) 
    {
        $msg = '';
        foreach ($data as $field => $value) {
            if ($field == 'password' || $field == 'url') {
                continue;
            }

            if (is_array($value)) {
                $msg .= _horde_hook_signup_queued_walkdata($fields, $value);
            } else {
                $field = isset($fields[$field]['label']) ?
                         $fields[$field]['label'] : $field;
                $msg .= "$field: $value\n";
            }
        }
        return $msg;
    } 

    function _horde_hook_signup_queued($userID, $data) 
    {
        require_once 'Mail.php';
        global $conf, $registry;

        $headers = array(
            'To'      => $_SERVER['SERVER_ADMIN'],
            'From'    => $_SERVER['SERVER_ADMIN'],
            'Subject' => 'New ' . $registry->getParam('name', 'horde') . ' Signup'
        );

        $extraFields = Horde::callHook('_horde_hook_signup_getextra');

        $msg  = _("A new signup has been received and is awaiting your approval.");
        $msg .= "\n\n";
        $msg .= _horde_hook_signup_queued_walkdata($extraFields, $data);
        $msg .= "\n";
        $msg .= sprintf(_("You can approve this signup at %s"), Horde::applicationUrl('admin/user.php', true, -1));

        $mailer = &Mail::factory($conf['mailer']['type'], $conf['mailer']['params']);
        return $mailer->send($_SERVER['SERVER_ADMIN'], $headers, $msg);
    }
}

// Here is an example _horde_hook_preauthenticate that make Horde respect the
// Unix convention of not allowing login when a file named /etc/nologin exist.
// This function get passed the username, credential and realm information but
// they are not used in this example.
if (!function_exists('_horde_hook_preauthenticate')) {
    function _horde_hook_preauthenticate($userID, $credential, $realm)
    {
        return !file_exists('/etc/nologin');
    }
}

// Here is an example of validating the user's right to login to Horde by
// consulting group membership in an LDAP directory.  That way, if your Horde
// installation is configured to authenticate against IMP which in turn
// authenticate via IMAP, it is still possible to limit access to Horde by group
// membership.  The following example had been made with an MS Active Directory 
// in mind.  Note that if the LDAP directory is unavailable or some other error 
// occur, authentication will fail.
if (!function_exists('_horde_hook_postauthenticate')) {
    function _horde_hook_postauthenticate($userID, $credential, $realm)
    {
        $ldapServer = 'ad.example.com';
        $ldapPort = '389';
        // Note that credential is sent plain-text in this case, so don't use
        // privileged account here or setup SSL (by using port 636 above).
        $binddn = 'cn=WithoutPrivilege,dc=ulaval-dev,dc=ca';
        $bindpw = 'Remember this is sent in the clear unless SSL is used';
        $searchBase = 'ou=People,dc=example,dc=com';
        // Attribute to match $userID against in search
        $userAttr = 'sAMAccountName'; 
        // Group membership attribute, need to be all lowercase
        $groupAttr = 'memberof'; 
        // Attribute to check for right to use Horde
        $groupdn = 'cn=HordeUser,ou=People,dc=example,dc=com'; 
        $ret = true;

        $ds = @ldap_connect($ldapServer, $ldapPort);

        if (@ldap_bind($ds, $binddn, $bindpw)) {
            $searchResult = @ldap_search($ds, $searchBase, $userAttr . '=' . $userID, array($groupAttr), 0, 1, 5);
            if ($information = @ldap_get_entries($ds, $searchResult)) {
                // make pattern case-insensitive
                $pattern = '/' . $groupdn . '/i'; 
                foreach ($information[0][$groupAttr] as $group) {
                    if (preg_match($pattern, $group)) {
                        $ret = true;
                        break;
                    }
                }
            }
        }

        ldap_close($ds);
        return $ret;
    }
}

// Here is an example of creating credentials needed by the LDAP Auth driver for
// adding/deleting/updating users.
if (!function_exists('_horde_hook_authldap')) {
    function _horde_hook_authldap($userID, $credentials = null)
    {
        $entry['dn'] = 'uid=' . $userID . ',ou=People,dc=example.com';
        if (isset($credentials) && isset($credentials['user_fullname'])) {
            $entry['cn'] = $credentials['user_fullname'];
        } else {
            $entry['cn'] = $userID;
        }
        $entry['sn'] = $userID;
        $entry['objectclass'][0] = 'top';
        $entry['objectclass'][1] = 'person';
        $entry['objectclass'][2] = 'qmailuser';
        $entry['objectclass'][3] = 'CourierMailACcount';
        $entry['mailhost'] = 'mail.example.com';
        $entry['mailMessageStore'] = '/home/mail/' . $userID;
        $entry['homeDirectory'] = '/home/mail/' . $userID;
        $entry['mailbox'] = $entry['homeDirectory'] . '/Maildir';
        $entry['uid'] = $userID;
        $entry['accountStatus'] = 'active';
        $entry['mailQuota'] = '104857600S';
        $entry['mail'] = $userID;
        $entry['uidNumber'] = 501;
        $entry['gidNumber'] = 501;

        // need to check for new users (password) and edited users (user_pass_2)
        if (isset($credentials) && isset($credentials['password'])) {
            $entry['userPassword'] =  '{MD5}' . base64_encode(mHash(MHASH_MD5, $credentials['password']));
        } else if (isset($credentials) && isset($credentials['user_pass_2'])) {
            $entry['userPassword'] =  '{MD5}' . base64_encode(mHash(MHASH_MD5, $credentials['user_pass_2']));
        }
        $entry['deliveryMode'] = 'nolocal';
        return $entry;
    }
}

// Here is an example fullname hook function to set the fullname from the GECOS
// information in the passwd file.
if (!function_exists('_prefs_hook_fullname')) {
    function _prefs_hook_fullname($user = null)
    {
        if (is_null($user)) {
            $user = Auth::getBareAuth();
        }
        $array = posix_getpwnam($user);
        $gecos_array = explode(',', $array['gecos']);
        return (empty($gecos_array) ? $user : $gecos_array[0]);
    }
}

// This is another example of how to get the user's full name, in this case from// an ldap server. In this example we look if a Spanish name exists and return
// this or the standard 'cn' entry if not.
if (!function_exists('_prefs_hook_fullname')) {
    function _prefs_hook_fullname($user = null)
    {
        $ldapServer = 'ldap.example.com';
        $ldapPort = '389';
        $searchBase = 'ou=people,o=example.com';
        $ldapcharset = 'utf-8';
        $outputcharset = NLS::getCharset();

        $ds = @ldap_connect($ldapServer, $ldapPort);

        if (is_null($user)) {
            $user = Auth::getAuth();
        }
        $searchResult = @ldap_search($ds, $searchBase, 'uid=' . $user);
        $information = @ldap_get_entries($ds, $searchResult);
        if ($information[0]['cn;lang-es'][0] != '') {
            $name = $information[0]['cn;lang-es'][0];
        } else {
            $name = $information[0]['cn'][0];
        }

        ldap_close($ds);

        $name = String::convertCharset($name, $ldapcharset, $outputcharset);
        return (empty($name) ? $user : $name);
    }
}

// Here is an example _username_hook_frombackend function. It appends the
// virtual domain to the user name.
//
// ex. $HTTP_HOST = 'mail.mydomain.com', $userID = 'myname' returns:
//   'myname at mydomain.com'
if (!function_exists('_username_hook_frombackend')) {
    function _username_hook_frombackend($userID)
    {
        $vdomain = getenv('HTTP_HOST');
        $vdomain = preg_replace('|^mail\.|i', '', $vdomain);
        $vdomain = String::lower($vdomain);

        return $userID . '@' . $vdomain;
    }
}

// Here is an example _username_hook_tobackend function as a counterpart of the
// previous example. It strips the virtual domain from the user name.
//
// ex. $HTTP_HOST = 'mail.mydomain.com', $userID = 'myname' returns:
//   'myname at mydomain.com'
if (!function_exists('_username_hook_tobackend')) {
    function _username_hook_tobackend($userID)
    {
        $vdomain = getenv('HTTP_HOST');
        $vdomain = preg_replace('|^mail\.|i', '', $vdomain);
        $vdomain = '@' . String::lower($vdomain);

        if (substr($userID, -strlen($vdomain)) == $vdomain) {
            $userID = substr($userID, 0, -strlen($vdomain));
        }

        return $userID;
    }
}

// Here is an example _username_hook_frombackend function. It converts the user
// name to all lower case. This might be necessary if an authentication backend
// is case insensitive to take into account that Horde's preference system is
// case sensitive.
//
// ex. $userID = 'MyName' returns: 'myname'
if (!function_exists('_username_hook_frombackend')) {
    function _username_hook_frombackend($userID)
    {
        return String::lower($userID);
    }
}

// Here is an example _horde_hook_signup_getextra function. It returns any extra
// fields which need to be filled in when a non registered user wishes to sign
// up.
// The example here takes the hypothetical case where we would want to store
// extra information about a user into a turba sql address book. All this
// function does then is to include the attributes.php file from the turba
// config directory and return the $attributes array.
// Otherwise any structure that would return an array with the following syntax
// would be valid:
//   $somearray['somefieldname'] = array(...
//      label    - the text that the user will see attached to this field
//      type     - any allowed Horde_Form field type
//      params   - any allowed parameter to Horde_Form field types
//      required - boolean, true or false whether this field is mandatory
//      readonly - boolean, true or false whether this editable
//      desc     - any help text attached to the field
// NOTE: You DO NEED Turba to be correctly installed before you can use this
// example below.
if (!function_exists('_horde_hook_signup_getextra')) {
    function _horde_hook_signup_getextra()
    {
        global $registry;
        require $registry->getParam('fileroot', 'turba') . '/config/attributes.php';
        return $attributes;
    }
}

// Following on from the example in the above function, this is how a sample
// _horde_hook_signup_addextra function would look like.
// Here we connect to the database using the sql parameters configured in $conf
// and store the extra fields in turba_objects, using the $userId as the key for
// the object and values from the $extra array.
// You could create your own sql syntax or code to store this in whichever
// backend you require.
// NOTE: You DO NEED Turba to be correctly installed before you can use this
// example below. It also assumes that you are using an SQL backend.
if (!function_exists('_horde_hook_signup_addextra')) {
    function _horde_hook_signup_addextra($userID, $extra)
    {
        global $conf;

        require_once 'DB.php';
        $_db = &DB::connect($conf['sql'], true);

        $fields = array();
        $values = array();
        foreach ($extra as $field => $value) {
            $fields[] = 'object_' . String::lower($field);
            $values[] = $_db->quote(String::convertCharset($value, NLS::getCharset(), $conf['sql']['charset']));
        }
        $fields[] = 'object_id';
        $values[] = $_db->quote($userID);

        $query  = 'INSERT INTO turba_objects ( owner_id, ' . implode(', ', $fields) . ')';
        $query .= ' VALUES ( \'admin\', ' . implode(', ', $values) . ')';
        $result = $_db->query($query);

        return DB::isError($result) ? $result : true;
    }
}

// Here is an example _imp_hook_trailer function to set the trailer from the
// system taglines file; the string "@@TAG@@" (if present in a trailer) will be
// replaced by the content of the file "/usr/share/tagline" (generated by the
// "TaRT" utility).
if (!function_exists('_imp_hook_trailer')) {
    function _imp_hook_trailer($trailer)
    {
        if (preg_match('/@@TAG@@/', $trailer)) {
            $tag = `cat /usr/share/tagline`;
            $trailer = preg_replace('|@@TAG@@|', $tag, $trailer);
        }
        return $trailer;
    }
}

// Here is an another example _imp_hook_trailer function to set the trailer from// the LDAP directory for each domain. This function replaces the current
// trailer with the data it gets from ispmanDomainSignature.
if (!function_exists('_imp_hook_trailer')) {
    function _imp_hook_trailer($trailer)
    {
        $vdomain = getenv('HTTP_HOST');
        $vdomain = preg_replace('|^.*?\.|i', '', $vdomain);
        $vdomain = String::lower($vdomain);
        $ldapServer = 'localhost';
        $ldapPort = '389';
        $searchBase = 'ispmanDomain=' . $vdomain  . ",o=ispman";

        $ds = @ldap_connect($ldapServer, $ldapPort);
        $searchResult = @ldap_search($ds, $searchBase, 'uid=' . $vdomain);
        $information = @ldap_get_entries($ds, $searchResult);
        $trailer= $information[0]['ispmandomainsignature'][0];
        ldap_close($ds);

        return $trailer;
    }
}

// Here is an example _imp_hook_vinfo function. If $type == 'vdomain', this
// function returns the HTTP_HOST variable after removing the 'mail.' subdomain.
//
// If $type == 'username', this function returns a unique username composed of
// $_SESSION['imp']['user'] + vdomain.
//
// ex. $HTTP_HOST = 'mail.mydomain.com', $_SESSION['imp']['user'] = 'myname':
//   $vdomain  = 'mydomain.com'
//   $username = 'myname_mydomain_com'
if (!function_exists('_imp_hook_vinfo')) {
    function _imp_hook_vinfo($type = 'username')
    {
        $vdomain = getenv('HTTP_HOST');
        $vdomain = preg_replace('|^mail\.|i', '', $vdomain);
        $vdomain = String::lower($vdomain);

        if ($type == 'username') {
            return preg_replace('|\.|', '_', $_SESSION['imp']['user'] . '_' . $vdomain);
        } elseif ($type == 'vdomain') {
            return $vdomain;
        } else {
            return PEAR::raiseError('invalid type: ' . $type);
        }
    }
}

// Here is an example of the _imp_hook_fetchmail_filter function to run
// SpamAssassin on email before it is written to the mailbox.
// Note: to use the spamassassin instead of spamd, change 'spamc' to
// 'spamassassin -P' and add any other important arguments, but realize spamc
// is MUCH faster than spamassassin.
// WARNING: Make sure to use the --noadd-from filter on spamd or spamassassin
if (!function_exists('_imp_hook_fetchmail_filter')) {
    function _imp_hook_fetchmail_filter($message)
    {
        // Where does SpamAssassin live, and what username should we use
        // for preferences?
        $cmd = '/usr/local/bin/spamc';
        $username = Auth::getAuth();
        // If you use the _sam_hook_username() hook, uncomment the next line
        //$username = _sam_hook_username($username);
        $username = escapeshellarg($username);

        // Also, we remove the file ourselves; this hook may be called
        // hundreds of times per run depending on how many messages we fetch
        $file = Horde::getTempFile('horde', false);

        // Call SpamAssassin; pipe the new message to our tempfile
        $fp = popen("$cmd -u $username > $file", 'w');
        fwrite($fp, $message);
        pclose($fp);

        // Read the new message from the temporary file
        $fp = fopen($file, 'r');
        $message = fread($fp, filesize($file));
        fclose($fp);
        unlink($file);
        return $message;
    }
}

// Here is an example signature hook function to set the signature from the
// system taglines file; the string "%TAG%" (if present in a user's signature)
// will be replaced by the content of the file "/usr/share/tagline" (generated
// by the "TaRT" utility).
//
// Notice how we global in the $prefs array to get the user's current signature.
if (!function_exists('_imp_hook_signature')) {
    function _imp_hook_signature($sig)
    {
        if (preg_match('/%TAG%/', $sig)) {
            $tag = `cat /usr/share/tagline`;
            $sig = preg_replace('/%TAG%/', $tag, $sig);
        }

        return $sig;
    }
}

// This is an example hook function for the IMP redirection scheme. This
// function is called when the user opens a mailbox in IMP, and allows
// the client to be redirected based on the mailbox name. The return
// value of this function should be a valid page within a horde application
// which will be placed in a "Location" header to redirect the client.
// The only parameter is the name of the mailbox which the user has opened.
// If an empty string is returned the user is not redirected.
if (!function_exists('_imp_hook_mbox_redirect')) {
    function _imp_hook_mbox_redirect($mailbox)
    {
        require_once 'Horde/Kolab.php';

        if (strpos($mailbox, "INBOX/Calendar") !== false
            || preg_match("!^user/[^/]+/Calendar!", $mailbox))
        {
            return $GLOBALS['registry']->getParam('webroot', 'kronolith');
        } elseif (strpos($mailbox, "INBOX/Tasks") !== false
            || preg_match("!^user/[^/]+/Tasks!", $mailbox))
        {
            return $GLOBALS['registry']->getParam('webroot', 'nag');
        } elseif (strpos($mailbox, "INBOX/Notes") !== false
            || preg_match("!^user/[^/]+/Notes!", $mailbox))
        {
            return $GLOBALS['registry']->getParam('webroot', 'mnemo');
        } elseif (strpos($mailbox, "INBOX/Contacts") !== false
            || preg_match("!^user/[^/]+/Contacts!", $mailbox))
        {
            return $GLOBALS['registry']->getParam('webroot', 'turba');
        }

        return '';
    }
}

// This is an example hook function for the IMP mailbox icon scheme. This
// function is called when the folder list is created and a "standard" folder
// is to be displayed - it allows custom folder icons to be specified.
// ("Standard" means all folders except the INBOX, sent-mail folders and
// trash folders.)
// If a mailbox name doesn't appear in the below list, the default mailbox
// icon is displayed.
if (!function_exists('_imp_hook_mbox_icons')) {
    function _imp_hook_mbox_icons()
    {
        require_once 'Horde/Kolab.php';

        $kc = new Kolab_Cyrus($GLOBALS['conf']['kolab']['server']);
        $mailboxes = $kc->listMailBoxes();
        $newmailboxes = array();

        foreach ($mailboxes as $box) {
            $box = preg_replace("/^{[^}]+}/", "", $box);
            if (strpos($box, "INBOX/Calendar") !== false
                || preg_match("!^user/[^/]+/Calendar!", $box))
            {
                $newmailboxes[$box] = Horde::img(
                    $GLOBALS['registry']->getParam('icon', 'kronolith'),
                    _("Calendar"),
                    'border="0" width="16" height="16" style="vertical-align:middle"',
                    ''
                );
            } elseif (strpos($box, "INBOX/Tasks") !== false
                || preg_match("!^user/[^/]+/Tasks!", $box))
            {
                $newmailboxes[$box] = Horde::img(
                    $GLOBALS['registry']->getParam('icon', 'nag'),
                    _("Tasks"),
                    'border="0" width="16" height="16" style="vertical-align:middle"',
                    ''
                );
            } elseif (strpos($box, "INBOX/Notes") !== false
                || preg_match("!^user/[^/]+/Notes!", $box))
            {
                $newmailboxes[$box] = Horde::img(
                    $GLOBALS['registry']->getParam('icon', 'mnemo'),
                    _("Notes"),
                    'border="0" width="16" height="16" style="vertical-align:middle"',
                    ''
                );
            } elseif (strpos($box, "INBOX/Contacts") !== false
                || preg_match("!^user/[^/]+/Contacts!", $box))
            {
                $newmailboxes[$box] = Horde::img(
                    $GLOBALS['registry']->getParam('icon', 'turba'),
                    _("Contacts"),
                    'border="0" width="16" height="16" style="vertical-align:middle"',
                    ''
                );
            }
        }

        return $newmailboxes;
    }
}

// Here an example _sam_hook_username function to set the username that
// SpamAssassin sees to one different from the Horde username.
if (!function_exists('_sam_hook_username')) {
    function _sam_hook_username($horde_uid)
    {
        if (strstr($horde_uid, '@')) {
            $parts = explode('@', $horde_uid);
            return $parts[0];
        } else {
            return $horde_uid;
        }
    }
}

// Here is an example _turba_hook_encode_password (and decode). encode is called
// when we store a value; decode when we display it.
// Passwords should be MD5 encoded, but not displayed.
if (!function_exists('_turba_hook_encode_password')) {
    function _turba_hook_encode_password($new_password, $old_password)
    {
        if (is_null($new_password) || $new_password == '' ||
            $new_password == '[Not Displayed]') {
            return $old_password;
        } else {
            return md5($new_password);
        }
    }
    function _turba_hook_decode_password($password)
    {
        if (strstr($_SERVER['PHP_SELF'], 'editobject')) {
            return null;
        } else {
            return '[Not Displayed]';
        }
    }
}

// Here is an example _passwd_hook_username function to translate what the user
// enters, in the username box, into what the backend expects. If we want to add
// @example.com to the end of the username then enable the hook and use this
// funciton.
if (!function_exists('_passwd_hook_username')) {
    function _passwd_hook_username($userid)
    {
        return $userid . '@example.com';
    }
}

// Here is an example _passwd_hook_default_username function to set the username
// the passwd module sees when resetting passwords based on userid and realm.
// The default is to take a username of user at domain.tld and change it to user.
// If we want to leave it untouched, enable the hook and use this function.
if (!function_exists('_passwd_hook_default_username')) {
    function _passwd_hook_default_username($userid)
    {
        return $userid;
    }
}

// Here is an example _passwd_hook_userdn function that you can use to provide
// your ldap server with a userdn so that you do not have to perform anonymous
// binds. The function takes Auth::getAuth() as a parameter
if (!function_exists('_passwd_hook_userdn')) {
    function _passwd_hook_userdn($auth)
    {
        return 'uid=' . $auth . ',o=example.com';
    }
}

// This is an example of a hook to set custom tags to be included in a Giapeto
// page template. In this example a tag containing the current date is set to
// the $template object and which is then available in the page template as:
//     <tag:date />
if (!function_exists('_giapeto_hook_settags')) {
    function _giapeto_hook_settags(&$template)
    {
        $template->set('date', strftime('%a, %e %b %Y'));
    }
}

// This is an example of a group hook.  To use it you must set the group
// driver to hooks in conf.php.  Then you must create a IT_department
// group (because that is how we know what hook to call).  You can add
// users to the group as normal, and in addition this function will be
// called to dynamically include users in the group.  In this example we
// will look up whether or not this user is part of the IT department
// using an external database.
if (!function_exists('_group_hook_IT_department')) {
    function _group_hook_IT_department($userName)
    {
        global $conf;

        $dept = 'IT';
        include_once 'DB.php';
        $_db = &DB::connect($conf['sql'], true);
        $query = sprintf('SELECT COUNT(*) FROM departments WHERE user_name=%s AND department=%s',
                $_db->quote($userName), $_db->quote($dept));
        $result = $_db->getOne($query);
        if (!is_a($result, 'PEAR_Error') && $result > 0) {
            return true;
        } else {
            return false;
        }
    }
}

--- NEW FILE: html.php ---
<?php
/**
 * Base Horde CSS properties.
 * This file is parsed by css.php, and used to produce a stylesheet.
 *
 * $Horde: horde/config/html.php.dist,v 1.91 2004/05/23 18:19:04 jan Exp $
 */

$css['body']['font-family'] = 'Geneva,Arial,Helvetica,sans-serif';
$css['body']['font-size'] = '12px';
$css['body']['background-color'] = '#222244';
$css['body']['color'] = 'black';
if ($browser->hasQuirk('scrollbar_in_way')) {
    $css['body']['margin-right'] = '15px';
}
$css['body']['scrollbar-base-color'] = '#666699';
$css['body']['scrollbar-arrow-color'] = '#ddddff';
$css['html']['scrollbar-base-color'] = '#666699';
$css['html']['scrollbar-arrow-color'] = '#ddddff';

$css['img']['border'] = 'none';

$css['.box']['border'] = '1px dashed #999999';
$css['.box']['background-color'] = 'white';

$css['.solidbox']['border'] = '1px solid black';

$css['.greybox']['border'] = '1px solid black';
$css['.greybox']['background-color'] = '#e9e9e9';

$css['.whitebox']['border'] = '1px solid black';
$css['.whitebox']['background-color'] = 'white';

$css['.headerbox']['border-left'] = '1px solid #666699';
$css['.headerbox']['border-right'] = '1px solid #666699';
$css['.headerbox']['border-bottom'] = '1px solid #666699';

$css['.nomargin']['padding'] = '0px';
$css['.nomargin']['margin'] = '0px 0px';

$css['input']['font-family'] = 'Geneva,Arial,Helvetica,sans-serif';
$css['input']['font-size'] = '12px';

$css['select']['font-family'] = 'Geneva,Arial,Helvetica,sans-serif';
$css['select']['font-size'] = '12px';
$css['select']['font-weight'] = 'normal';

$css['form']['margin'] = '0px';

$css['.form-error']['color'] = '#ff0000';
$css['.form-header']['font-weight'] = 'bold';

$css['a']['color'] = '#333399';
$css['a']['font-family'] = 'Geneva,Arial,Helvetica,sans-serif';
$css['a']['font-size'] = '12px';
$css['a']['text-decoration'] = 'none';
$css['a:hover']['color'] = 'blue';
$css['a:hover']['text-decoration'] = 'underline';

$css['a.menuitem']['color'] = '#eeeeff';
$css['a.menuitem']['font-family'] = 'Verdana,Helvetica,sans-serif';
$css['a.menuitem']['font-size'] = '11px';
$css['a.menuitem']['font-weight'] = 'normal';
$css['a.menuitem:hover']['color'] = 'yellow';

$css['a.helpitem']['color'] = '#cccccc';
$css['a.helpitem']['font-family'] = 'Verdana,Helvetica,sans-serif';
$css['a.helpitem']['font-size'] = '12px';
$css['a.helpitem']['font-weight'] = 'normal';
$css['a.helpitem:hover']['color'] = 'yellow';

$css['a.helplink']['color'] = 'white';
$css['a.helplink']['background-color'] = '#444466';
$css['a.helplink']['font-family'] = 'Verdana,Helvetica,sans-serif';
$css['a.helplink']['text-decoration'] = 'underline';
$css['a.helplink:hover']['color'] = 'yellow';

$css['.selected']['background-color'] = '#bbcbff';
$css['.selected-hi']['background-color'] = '#cceeff';

$css['.widget']['color'] = '#222244';
$css['.widget']['font-family'] = 'Verdana,Helvetica,sans-serif';
$css['.widget']['font-size'] = '11px';
$css['a.widget:hover']['color'] = 'blue';
$css['a.widget:hover']['background-color'] = &$css['.selected']['background-color'];

$css['.notice']['background-color'] = '#ffffcc';

$css['.outline']['background-color'] = 'black';

$css['.menu']['color'] = 'white';
$css['.menu']['background-color'] = '#444466';
$css['.menu']['font-family'] = 'Verdana,Helvetica,sans-serif';
$css['.menu']['height'] = '55px';

$css['.menuselected']['background-color'] = '#666688';
$css['.menuselected']['border-bottom'] = '1px solid #9999cc';
$css['.menuselected']['border-right'] = '1px solid #9999cc';
$css['.menuselected']['border-top'] = '1px solid #222244';
$css['.menuselected']['border-left'] = '1px solid #222244';
$css['.menuselected']['padding'] = '2px';

$css['.menuheader']['color'] = '#ccccee';
$css['.menuheader']['font-family'] = 'Verdana,Helvetica,sans-serif';
$css['.menuheader']['font-weight'] = 'bold';
$css['.menuheader']['font-size'] = '17px';

$css['.header']['color'] = '#ccccee';
$css['.header']['background-color'] = '#444466';
$css['.header']['height'] = '25px';
$css['.header']['font-family'] = 'Verdana,Helvetica,sans-serif';
$css['.header']['font-weight'] = 'bold';
$css['.header']['font-size'] = '15px';
$css['td.header']['padding-left'] = '3px';
$css['td.header']['padding-right'] = '3px';
$css['a.header:hover']['color'] = 'white';

$css['.light']['color'] = 'white';
$css['.light']['font-family'] = 'Geneva,Arial,Helvetica,sans-serif';
$css['.light']['font-size'] = '12px';

$css['.smallheader']['color'] = '#ccccee';
$css['.smallheader']['background-color'] = '#444466';
$css['.smallheader']['font-family'] = 'Geneva,Arial,Helvetica,sans-serif';
$css['.smallheader']['font-size'] = '12px';
$css['.smallheader a:hover']['color'] = 'white';
$css['a.smallheader:hover']['color'] = 'white';

$css['.small']['color'] = '#aaaacc';
$css['.small']['font-family'] = 'Geneva,Arial,Helvetica,sans-serif';
$css['.small']['font-size'] = '11px';

$css['.legend']['color'] = '#000000';
$css['.legend']['font-family'] = 'Geneva,Arial,Helvetica,sans-serif';
$css['.legend']['font-size'] = '11px';

$css['.control']['color'] = 'black';
$css['.control']['background-color'] = '#cccccc';
$css['.control']['border-bottom'] = '1px solid #999999';

$css['.item']['color'] = 'black';
$css['.item']['background-color'] = '#eeeeee';

$css['.accessKey']['text-decoration'] = 'underline';

$css['.button']['color'] = 'white';
$css['.button']['background-color'] = '#666699';
$css['.button']['border-bottom'] = '1px solid #222244';
$css['.button']['border-right'] = '1px solid #222244';
$css['.button']['border-top'] = '1px solid #9999cc';
$css['.button']['border-left'] = '1px solid #9999cc';
$css['.button']['font-size'] = '11px';
$css['.button']['font-family'] = 'Verdana,Helvetica,sans-serif';
$css['.button']['font-weight'] = 'normal';

$css['.text']['color'] = 'black';
$css['.text']['background-color'] = 'white';
$css['.text-hi']['background-color'] = '#f3f3f3';

$css['.summarytext'] = $css['.text'];
$css['td.summarytext']['padding'] = '3px';

$css['.summary']['background-color'] = 'white';

$css['.item0']['background-color'] = '#eeeeee';
$css['.item1']['background-color'] = '#dddddd';

$css['.fixed']['font-size'] = '13px';
$css['.fixed']['font-family'] = 'monospace, fixed';

$css['td']['font-size'] = '12px';
$css['td']['font-family'] = 'Geneva,Arial,Helvetica,sans-serif';

$css['th']['font-size'] = '12px';
$css['th']['font-family'] = 'Geneva,Arial,Helvetica,sans-serif';

$css['.signature']['color'] = '#cccccc';
$css['.signature-fixed']['color'] = '#cccccc';
$css['.signature-fixed']['font-size'] = '13px';
$css['.signature-fixed']['font-family'] = 'monospace, fixed';

$css['.quoted1']['color'] = '#660066';
$css['.quoted2']['color'] = '#007777';
$css['.quoted3']['color'] = '#990000';
$css['.quoted4']['color'] = '#000099';
$css['.quoted5']['color'] = '#bb6600';

$css['.tooltip']['font-size'] = '11px';
$css['.tooltip']['background-color'] = '#ffffcc';
$css['.tooltip']['border'] = '1px solid black';

$css['.sidebar'] = array();
$css['.sidebar-panel'] = array();
$css['a.sidebaritem'] = array();

$css['.tabset']['border-bottom-width'] = '1px';
$css['.tabset']['border-bottom-style'] = 'solid';
$css['.tabset']['border-bottom-color'] = &$css['.header']['background-color'];

$css['.tab']['color'] = &$css['.item']['color'];
$css['.tab']['background-color'] = &$css['.item']['background-color'];
$css['.tab']['-moz-border-radius-topleft'] = '10px';
$css['.tab']['-moz-border-radius-topright'] = '10px';
$css['.tab']['cursor'] = 'pointer';

$css['.tab-hi']['color'] = &$css['.header']['color'];
$css['.tab-hi']['background-color'] = &$css['.header']['background-color'];
$css['.tab-hi']['-moz-border-radius-topleft'] = '10px';
$css['.tab-hi']['-moz-border-radius-topright'] = '10px';
$css['.tab-hi']['cursor'] = 'pointer';
$css['a.tab-hi:hover']['color'] = 'white';

--- NEW FILE: mime_drivers.php ---
<?php
/**
 * $Horde: horde/config/mime_drivers.php.dist,v 1.92 2004/04/12 22:49:22 slusarz Exp $
 *
 * Decide which output drivers you want to activate for all Horde
 * applications. Individual Horde applications can override these settings
 * in their config/mime_drivers.php files.
 *
 * The available drivers are:
 * --------------------------
 * deb            Debian packages
 * enriched       Enriched text format
 * enscript       GNU enscript
 * html           HTML data
 * images         Image files
 * msword         Microsoft Word files via wvHtml
 * msexcel        Microsoft Excel files via xlhtml
 * mspowerpoint   Microsoft Powerpoint files via ppthtml
 * ooo            OpenOffice.org/StarOffice Documents
 * pdf            Portable Document Format (PDF) files
 * php            The internal PHP4 syntax highlighting engine
 * plain          Return text, with links made clickable and other HTML
 *                filtered out
 * rar            RAR archives
 * report         Report messages (RFC 3452)
 * rfc822         Digested messages (RFC 2046 [5.2.1])
 * richtext       Richtext text format (RFC 1341 [7.1.3])
 * rpm            RPM packages
 * security       Secure multiparts (RFC 1847)
 * srchighlite    Source Highlight
 * tgz            Tarballs, including gzipped ones
 * tnef           MS-TNEF attachments
 * vcard          vCards
 * webcpp         Web C Plus Plus
 * zip            Zip files
 */
$mime_drivers_map['horde']['registered'] = array(
    'deb', 'enriched', 'enscript', 'html', 'images', 'msword', 'msexcel',
    'mspowerpoint', 'ooo', 'pdf', 'php', 'plain', 'rar', 'report',
    'richtext', 'rpm', 'security', 'srchighlite', 'tgz', 'tnef', 'vcard',
    'webcpp', 'zip');


/**
 * If you want to specifically override any MIME type to be handled by
 * a specific driver, then enter it here.  Normally, this is safe to
 * leave, but it's useful when multiple drivers handle the same MIME
 * type, and you want to specify exactly which one should handle it.
 */
$mime_drivers_map['horde']['overrides'] = array();


/**
 * Driver specific settings. Here, you have to configure each driver
 * which you chose to activate above. Default settings have been
 * filled in for them, and if you haven't activated it, then just
 * leave it as it is - it won't get loaded.
 *
 * The 'handles' setting below shouldn't be changed in most
 * circumstances. It registers a set of MIME type that the driver can
 * handle. The 'x-extension' MIME type is a special one to Horde that
 * maps a file extension to a MIME type. It's useful when you know
 * that all files ending in '.c' are C files, for example. You can set
 * the MIME subtype to '*' to match all possible subtypes
 * (i.e. 'image/*').
 *
 * The 'icons' entry is for the driver to register various icons for
 * the MIME types it handles. The array consists of a 'default' icon
 * for that driver, and can also include specific MIME-types which can
 * have their own icons. You can set the MIME subtype to '*' to match
 * all possible subtypes (i.e. 'image/*').
 */

/**
 * Default driver settings
 */
$mime_drivers['horde']['default']['icons'] = array(
    'default'                       => 'text.gif',
    'audio/*'                       => 'audio.gif',
    'message/*'                     => 'mail.gif',
    'unknown/*'                     => 'binary.gif',
    'video/*'                       => 'video.gif',
    'application/pgp-signature'     => 'encryption.gif',
    'application/x-pkcs7-signature' => 'encryption.gif',
    'application/octet-stream'      => 'binary.gif');


/**
 * Plain text driver settings
 */
$mime_drivers['horde']['plain']['handles'] = array(
    'text/*');
$mime_drivers['horde']['plain']['icons'] = array(
    'default' => 'text.gif');


/**
 * PHP driver settings
 */
$mime_drivers['horde']['php']['handles'] = array(
    'application/x-php', 'x-extension/phps',
    'x-extension/php3s', 'application/x-httpd-php',
    'application/x-httpd-php3', 'application/x-httpd-phps');
$mime_drivers['horde']['php']['icons'] = array(
    'default' => 'php.gif');


/**
 * Enriched text driver settings
 */
$mime_drivers['horde']['html']['inline'] = false;
$mime_drivers['horde']['html']['handles'] = array(
    'text/html');
$mime_drivers['horde']['html']['icons'] = array(
    'default' => 'html.gif');


/**
 * Enriched text driver settings
 */
$mime_drivers['horde']['enriched']['inline'] = true;
$mime_drivers['horde']['enriched']['handles'] = array(
    'text/enriched');
$mime_drivers['horde']['enriched']['icons'] = array(
    'default' => 'text.gif');


/**
 * Richtext text driver settings
 */
$mime_drivers['horde']['richtext']['inline'] = true;
$mime_drivers['horde']['richtext']['handles'] = array(
    'text/richtext');
$mime_drivers['horde']['richtext']['icons'] = array(
    'default' => 'text.gif');


/**
 * Web C Plus Plus driver settings
 * http://webcpp.sourceforge.net/
 */
$mime_drivers['horde']['webcpp']['location'] = 'C:\Program Files\Jeffrey Bakker\webcpp\webcpp.exe';
$mime_drivers['horde']['webcpp']['inline'] = true;
$mime_drivers['horde']['webcpp']['handles'] = array(
    'text/xml', 'text/sgml', 'application/xml',
    'application/x-sh', 'application/x-javascript', 'application/x-tcl',
    'x-extension/asm', 'application/x-asp', 'x-extension/bas',
    'x-extension/cs', 'text/x-csrc', 'x-extension/rc',
    'text/x-c++src', 'text/x-c++src', 'text/x-c++src',
    'text/x-chdr', 'x-extension/bat', 'text/x-fortran',
    'x-extension/f77', 'x-extension/f90', 'x-extension/for',
    'x-extension/ftn', 'text/x-java', 'application/x-javascript',
    'text/sgml', 'text/xml', 'text/x-pascal',
    'application/x-cgi', 'application/x-perl', 'application/x-python',
    'text/x-sql', 'text/x-tcl',
    'application/x-shellscript', 'x-extension/vhd', 'x-extension/vhdl');
$mime_drivers['horde']['webcpp']['icons'] = array(
    'default'                  => 'text.gif',
    'text/xml'                 => 'xml.gif',
    'text/x-csrc'              => 'source-c.gif',
    'text/x-chdr'              => 'source-h.gif',
    'text/x-java'              => 'source-java.gif',
    'application/x-javascript' => 'script-js.gif');

/**
 * Source-Highlight driver settings
 * http://www.gnu.org/software/src-highlite/
 */
$mime_drivers['horde']['srchighlite']['location'] = 'C:\Program Files\src-highlite\bin\source-highlight.exe';
$mime_drivers['horde']['srchighlite']['inline'] = false;
$mime_drivers['horde']['srchighlite']['handles'] = array(
    'text/x-csrc', 'text/x-c++src', 'text/x-java',
    'application/x-perl', 'application/x-python', 'text/x-c++src',
    'text/cpp');
$mime_drivers['horde']['srchighlite']['icons'] = array(
    'default'                  => 'text.gif',
    'text/x-csrc'              => 'source-c.gif',
    'text/x-c++src'            => 'source-c.gif',
    'text/cpp'                 => 'source-c.gif',
    'text/x-java'              => 'source-java.gif');

/**
 * GNU Enscript driver settings
 */
$mime_drivers['horde']['enscript']['location'] = '/usr/bin/enscript';
$mime_drivers['horde']['enscript']['inline'] = false;
$mime_drivers['horde']['enscript']['handles'] = array(
    'application/x-shellscript', 'application/x-javascript',
    'application/x-perl', 'application/xml', 'text/xml',
    'text/diff', 'text/x-diff', 'text/x-patch', 'text/x-csrc',
    'x-extension/cs', 'text/x-java', 'text/x-chdr', 'text/x-c++src',
    'text/x-c++hdr', 'x-extension/vhd', 'x-extension/vhdl', 'text/x-sql',
    'x-extension/vb', 'x-extension/vba', 'text/x-emacs-lisp');
$mime_drivers['horde']['enscript']['icons'] = array(
    'default'                  => 'text.gif',
    'text/xml'                 => 'xml.gif',
    'application/xml'          => 'xml.gif',
    'text/x-csrc'              => 'source-c.gif',
    'text/x-chdr'              => 'source-h.gif',
    'text/x-java'              => 'source-java.gif',
    'application/x-javascript' => 'script-js.gif');


/**
 * Tar driver settings
 * To access gzipped files, the zlib library must have been built into PHP
 * (with the --with-zlib option).
 */
$mime_drivers['horde']['tgz']['inline'] = true;
$mime_drivers['horde']['tgz']['handles'] = array(
    'application/x-compressed-tar',
    'application/x-tar',
    'application/x-tgz',
    'application/x-gzip',
    'application/x-gtar',
    'application/gzip',
    'application/x-gzip-compressed');
$mime_drivers['horde']['tgz']['icons'] = array(
    'default' => 'compressed.gif');


/**
 * Zip file driver settings
 */
$mime_drivers['horde']['zip']['inline'] = true;
$mime_drivers['horde']['zip']['handles'] = array(
    'application/zip',
    'application/x-compressed',
    'application/x-zip-compressed');
$mime_drivers['horde']['zip']['icons'] = array(
    'default' => 'compressed.gif');


/**
 * RAR archive driver settings
 */
$mime_drivers['horde']['rar']['inline'] = true;
$mime_drivers['horde']['rar']['handles'] = array(
    'application/x-rar',
    'application/x-rar-compressed');
$mime_drivers['horde']['rar']['icons'] = array(
    'default' => 'compressed.gif');


/**
 * MS Word driver settings
 * This driver requires wvWare to be installed.
 * wvWare homepage: http://wvware.sourceforge.net/
 *
 * The 'location' entry should point to the 'wvHtml' program, NOT the
 * 'wvWare' program.
 */
$mime_drivers['horde']['msword']['location'] = '/usr/bin/wvHtml';
$mime_drivers['horde']['msword']['inline'] = false;
$mime_drivers['horde']['msword']['handles'] = array(
    'application/msword',
    'application/rtf',
    'text/rtf');
$mime_drivers['horde']['msword']['icons'] = array(
    'default' => 'msword.gif');


/**
 * MS Excel driver settings
 * This driver requires xlhtml to be installed.
 * xlhtml homepage: http://chicago.sourceforge.net/xlhtml/
 */
$mime_drivers['horde']['msexcel']['location'] = '/usr/local/bin/xlhtml';
$mime_drivers['horde']['msexcel']['inline'] = false;
$mime_drivers['horde']['msexcel']['handles'] = array(
    'application/vnd.ms-excel',
    'application/msexcel',
    'application/x-msexcel');
$mime_drivers['horde']['msexcel']['icons'] = array(
    'default' => 'msexcel.gif');


/**
 * MS Powerpoint driver settings
 * This driver requires ppthtml, included with xlhtml, to be installed.
 * xlhtml homepage: http://chicago.sourceforge.net/xlhtml/
 */
$mime_drivers['horde']['mspowerpoint']['location'] = '/usr/local/bin/ppthtml';
$mime_drivers['horde']['mspowerpoint']['inline'] = false;
$mime_drivers['horde']['mspowerpoint']['handles'] = array(
    'application/vnd.ms-powerpoint',
    'application/mspowerpoint');
$mime_drivers['horde']['mspowerpoint']['icons'] = array(
    'default' => 'mspowerpoint.gif');


/**
 * vCard driver settings
 */
$mime_drivers['horde']['vcard']['handles'] = array(
    'text/x-vcard',
    'text/x-vcalendar');
$mime_drivers['horde']['vcard']['icons'] = array(
    'default' => 'vcard.gif');


/**
 * RPM driver settings
 */
$mime_drivers['horde']['rpm']['location'] = '/usr/bin/rpm';
$mime_drivers['horde']['rpm']['inline'] = false;
$mime_drivers['horde']['rpm']['handles'] = array(
    'application/x-rpm');
$mime_drivers['horde']['rpm']['icons'] = array(
    'default' => 'rpm.gif');


/**
 * Debian package driver settings
 */
$mime_drivers['horde']['deb']['location'] = '/usr/bin/dpkg';
$mime_drivers['horde']['deb']['inline'] = false;
$mime_drivers['horde']['deb']['handles'] = array(
    'application/x-deb',
    'application/x-debian-package');
$mime_drivers['horde']['deb']['icons'] = array(
    'default' => 'deb.gif');


/**
 * Secure multiparts (RFC 1847)
 */
$mime_drivers['horde']['security']['inline'] = true;
$mime_drivers['horde']['security']['handles'] = array(
    'multipart/encrypted', 'multipart/signed');
$mime_drivers['horde']['security']['icons'] = array(
    'default' => 'encryption.gif');


/**
 * Image settings
 */
$mime_drivers['horde']['images']['inline'] = false;
$mime_drivers['horde']['images']['handles'] = array(
    'image/*');
$mime_drivers['horde']['images']['icons'] = array(
    'default' => 'image.gif');


/**
 * MS-TNEF Attachment (application/ms-tnef) settings
 */
$mime_drivers['horde']['tnef']['inline'] = false;
$mime_drivers['horde']['tnef']['handles'] = array(
    'application/ms-tnef');
$mime_drivers['horde']['tnef']['icons'] = array(
    'default' => 'text.gif');


/**
 * Digest message (RFC 2046 [5.2.1]) settings
 */
$mime_drivers['horde']['rfc822']['inline'] = false;
$mime_drivers['horde']['rfc822']['handles'] = array(
    'message/rfc822');
$mime_drivers['horde']['rfc822']['icons'] = array(
    'default' => 'mail.gif');


/**
 * Report messages (RFC 3452)
 */
$mime_drivers['horde']['report']['inline'] = true;
$mime_drivers['horde']['report']['handles'] = array(
    'multipart/report');
$mime_drivers['horde']['report']['icons'] = array(
    'default' => 'mail.gif');


/**
 * OpenOffice.org/StarOffice settings
 */
$mime_drivers['horde']['ooo']['inline'] = false;
$mime_drivers['horde']['ooo']['handles'] = array(
    'application/vnd.sun.xml.calc',
    'application/vnd.sun.xml.calc.template',
    'application/vnd.sun.xml.draw',
    'application/vnd.sun.xml.draw.template',
    'application/vnd.sun.xml.impress',
    'application/vnd.sun.xml.impress.template',
    'application/vnd.sun.xml.math',
    'application/vnd.sun.xml.writer',
    'application/vnd.sun.xml.writer.global',
    'application/vnd.sun.xml.writer.template',
    'application/vnd.stardivision.calc',
    'application/vnd.stardivision.draw',
    'application/vnd.stardivision.impress',
    'application/vnd.stardivision.math',
    'application/vnd.stardivision.writer');
$mime_drivers['horde']['ooo']['icons'] = array(
    'default' => 'ooo_calc.gif',
    'application/vnd.sun.xml.calc'             => 'ooo_calc.gif',
    'application/vnd.stardivision.calc'        => 'ooo_calc.gif',
    'application/vnd.sun.xml.calc.template'    => 'ooo_calc.gif',
    'application/vnd.sun.xml.draw'             => 'ooo_draw.gif',
    'application/vnd.stardivision.draw'        => 'ooo_draw.gif',
    'application/vnd.sun.xml.draw.template'    => 'ooo_draw.gif',
    'application/vnd.sun.xml.impress'          => 'ooo_impress.gif',
    'application/vnd.stardivision.impress'     => 'ooo_impress.gif',
    'application/vnd.sun.xml.impress.template' => 'ooo_impress.gif',
    'application/vnd.sun.xml.math'             => 'ooo_math.gif',
    'application/vnd.stardivision.math'        => 'ooo_math.gif',
    'application/vnd.sun.xml.writer'           => 'ooo_writer.gif',
    'application/vnd.stardivision.writer'      => 'ooo_writer.gif',
    'application/vnd.sun.xml.writer.global'    => 'ooo_writer.gif',
    'application/vnd.sun.xml.writer.template'  => 'ooo_writer.gif');


/**
 * Portable Document Format (PDF) files
 * YOU SHOULD NOT NORMALLY ALTER THIS SETTING.
 */
$mime_drivers['horde']['pdf']['inline'] = false;
$mime_drivers['horde']['pdf']['handles'] = array(
    'application/pdf');
$mime_drivers['horde']['pdf']['icons'] = array(
    'default' => 'pdf.gif');

--- NEW FILE: nls.php ---
<?php
/**
 * NLS (National Language Support) configuration file.
 *
 * $Horde: horde/config/nls.php.dist,v 1.57 2004/05/21 17:08:50 jan Exp $
 */

/**
 ** Defaults
 **/

/* The language to fall back on if we cannot determine one any other
   way (user choice or preferences). If empty, we will try to negotiate
   with the browser using HTTP_ACCEPT_LANGUAGE. */
$nls['defaults']['language'] = '';

/* The charset to fall back on if we cannot determine one any other
   way (chosen language, HTTP_ACCEPT_CHARSETS). */
$nls['defaults']['charset'] = 'ISO-8859-1';


/**
 ** Language
 **/

$nls['languages']['ar_OM'] = 'Arabic (Oman) (&#x0627;&#x0644;&#x0639;&#x0631;&#x0628;&#x064a;&#x0629;)';
$nls['languages']['ar_SY'] = 'Arabic (Syria) (&#x0627;&#x0644;&#x0639;&#x0631;&#x0628;&#x064a;&#x0629;)';
$nls['languages']['id_ID'] = 'Bahasa Indonesia';
$nls['languages']['bg_BG'] = 'Bulgarian (&#x0411;&#x044a;&#x043b;&#x0433;&#x0430;&#x0440;&#x0441;&#x043a;&#x0438;)';
$nls['languages']['ca_ES'] = 'Català';
$nls['languages']['zh_CN'] = 'Chinese (Simplified) (&#x7b80;&#x4f53;&#x4e2d;&#x6587;)';
$nls['languages']['zh_TW'] = 'Chinese (Traditional) (&#x6b63;&#x9ad4;&#x4e2d;&#x6587;)';
$nls['languages']['cs_CZ'] = 'Czech (&#x010c;esky)';
$nls['languages']['da_DK'] = 'Dansk';
$nls['languages']['de_DE'] = 'Deutsch';
$nls['languages']['en_US'] = 'English (American)';
$nls['languages']['en_GB'] = 'English (British)';
$nls['languages']['en_CA'] = 'English (Canadian)';
$nls['languages']['es_ES'] = 'Español';
$nls['languages']['et_EE'] = 'Eesti';
$nls['languages']['fr_FR'] = 'Français';
$nls['languages']['gl_ES'] = 'Galego';
$nls['languages']['el_GR'] = 'Greek (&#x0395;&#x03bb;&#x03bb;&#x03b7;&#x03bd;&#x03b9;&#x03ba;&#x03ac;)';
$nls['languages']['is_IS'] = 'Íslenska';
$nls['languages']['it_IT'] = 'Italiano';
$nls['languages']['ja_JP'] = 'Japanese (&#x65e5;&#x672c;&#x8a9e;)';
$nls['languages']['ko_KR'] = 'Korean (&#xd55c;&#xad6d;&#xc5b4;)';
$nls['languages']['lv_LV'] = 'Latvie&#x0161;u';
$nls['languages']['lt_LT'] = 'Lietuvi&#x0173;';
$nls['languages']['mk_MK'] = 'Macedonian (&#x041c;&#x0430;&#x043a;&#x0435;&#x0434;&#x043e;&#x043d;&#x0441;&#x043a;&#x0438;)';
$nls['languages']['hu_HU'] = 'Magyar';
$nls['languages']['nl_NL'] = 'Nederlands';
$nls['languages']['nb_NO'] = 'Norsk bokmål';
$nls['languages']['nn_NO'] = 'Norsk nynorsk';
$nls['languages']['pl_PL'] = 'Polski';
$nls['languages']['pt_PT'] = 'Português';
$nls['languages']['pt_BR'] = 'Português Brasileiro';
$nls['languages']['ro_RO'] = 'Românä';
$nls['languages']['ru_RU'] = 'Russian (&#x0420;&#x0443;&#x0441;&#x0441;&#x043a;&#x0438;&#x0439;)';
$nls['languages']['sk_SK'] = 'Slovak (Sloven&#x010d;ina)';
$nls['languages']['sl_SI'] = 'Slovenian (Sloven&#x0161;&#x010d;ina)';
$nls['languages']['fi_FI'] = 'Suomi';
$nls['languages']['sv_SE'] = 'Svenska';
$nls['languages']['th_TH'] = 'Thai (&#x0e44;&#x0e17;&#x0e22;)';
$nls['languages']['tr_TR'] = 'Türkçe';
$nls['languages']['uk_UA'] = 'Ukrainian (&#x0423;&#x043a;&#x0440;&#x0430;&#x0457;&#x043d;&#x0441;&#x044c;&#x043a;&#x0430;)';


/**
 ** Aliases for languages with different browser and gettext codes
 **/

$nls['aliases']['ar'] = 'ar_SY';
$nls['aliases']['bg'] = 'bg_BG';
$nls['aliases']['ca'] = 'ca_ES';
$nls['aliases']['cs'] = 'cs_CZ';
$nls['aliases']['da'] = 'da_DK';
$nls['aliases']['de'] = 'de_DE';
$nls['aliases']['el'] = 'el_GR';
$nls['aliases']['en'] = 'en_US';
$nls['aliases']['es'] = 'es_ES';
$nls['aliases']['et'] = 'et_EE';
$nls['aliases']['fi'] = 'fi_FI';
$nls['aliases']['fr'] = 'fr_FR';
$nls['aliases']['gl'] = 'gl_ES';
$nls['aliases']['hu'] = 'hu_HU';
$nls['aliases']['id'] = 'id_ID';
$nls['aliases']['is'] = 'is_IS';
$nls['aliases']['it'] = 'it_IT';
$nls['aliases']['ja'] = 'ja_JP';
$nls['aliases']['ko'] = 'ko_KR';
$nls['aliases']['lt'] = 'lt_LT';
$nls['aliases']['lv'] = 'lv_LV';
$nls['aliases']['mk'] = 'mk_MK';
$nls['aliases']['nl'] = 'nl_NL';
$nls['aliases']['nn'] = 'nn_NO';
$nls['aliases']['no'] = 'nb_NO';
$nls['aliases']['pl'] = 'pl_PL';
$nls['aliases']['pt'] = 'pt_PT';
$nls['aliases']['ro'] = 'ro_RO';
$nls['aliases']['ru'] = 'ru_RU';
$nls['aliases']['sk'] = 'sk_SK';
$nls['aliases']['sl'] = 'sl_SI';
$nls['aliases']['sv'] = 'sv_SE';
$nls['aliases']['th'] = 'th_TH';
$nls['aliases']['tr'] = 'tr_TR';
$nls['aliases']['uk'] = 'uk_UA';


/**
 ** Charsets
 **/

$nls['charsets']['ar_OM'] = 'windows-1256';
$nls['charsets']['ar_SY'] = 'windows-1256';
$nls['charsets']['bg_BG'] = 'windows-1251';
$nls['charsets']['cs_CZ'] = 'ISO-8859-2';
$nls['charsets']['el_GR'] = 'ISO-8859-7';
$nls['charsets']['hu_HU'] = 'ISO-8859-2';
$nls['charsets']['ja_JP'] = 'SHIFT_JIS';
$nls['charsets']['ko_KR'] = 'EUC-KR';
$nls['charsets']['lt_LT'] = 'ISO-8859-13';
$nls['charsets']['lv_LV'] = 'windows-1257';
$nls['charsets']['mk_MK'] = 'ISO-8859-5';
$nls['charsets']['pl_PL'] = 'ISO-8859-2';
$nls['charsets']['ru_RU'] = 'windows-1251';
$nls['charsets']['ru_RU.KOI8-R'] = 'KOI8-R';
$nls['charsets']['sk_SK'] = 'ISO-8859-2';
$nls['charsets']['sl_SI'] = 'ISO-8859-2';
$nls['charsets']['th_TH'] = 'TIS-620';
$nls['charsets']['tr_TR'] = 'ISO-8859-9';
$nls['charsets']['uk_UA'] = 'KOI8-U';
$nls['charsets']['zh_CN'] = 'GB2312';
$nls['charsets']['zh_TW'] = 'BIG5';


/**
 ** Multibyte charsets
 **/

$nls['multibyte']['BIG5'] = true;
$nls['multibyte']['EUC-KR'] = true;
$nls['multibyte']['GB2312'] = true;
$nls['multibyte']['SHIFT_JIS'] = true;
$nls['multibyte']['UTF-8'] = true;


/**
 ** Right-to-left charsets
 **/

$nls['rtl']['windows-1256'] = true;


/**
 ** Preferred charsets for email traffic if not the languages' default charsets.
 **/

$nls['emails']['ja_JP'] = 'ISO-2022-JP';


/**
 ** Available charsets for outgoing email traffic.
 **/

$nls['encodings']['windows-1256'] = _("Arabic (Windows-1256)");
$nls['encodings']['ARMSCII-8'] = _("Armenian (ARMSCII-8)");
$nls['encodings']['ISO-8859-13'] = _("Baltic (ISO-8859-13)");
$nls['encodings']['ISO-8859-14'] = _("Celtic (ISO-8859-14)");
$nls['encodings']['ISO-8859-2'] = _("Central European (ISO-8859-2)");
$nls['encodings']['GB2312'] = _("Chinese Simplified (GB2312)");
$nls['encodings']['BIG5'] = _("Chinese Traditional (Big5)");
$nls['encodings']['KOI8-R'] = _("Cyrillic (KOI8-R)");
$nls['encodings']['windows-1251'] = _("Cyrillic (Windows-1251)");
$nls['encodings']['KOI8-U'] = _("Cyrillic/Ukrainian (KOI8-U)");
$nls['encodings']['ISO-8859-7'] = _("Greek (ISO-8859-7)");
$nls['encodings']['ISO-8859-8-I'] = _("Hebrew (ISO-8859-8-I)");
$nls['encodings']['ISO-2022-JP'] = _("Japanese (ISO-2022-JP)");
$nls['encodings']['EUC-KR'] = _("Korean (EUC-KR)");
$nls['encodings']['ISO-8859-10'] = _("Nordic (ISO-8859-10)");
$nls['encodings']['ISO-8859-3'] = _("South European (ISO-8859-3)");
$nls['encodings']['TIS-620'] = _("Thai (TIS-620)");
$nls['encodings']['ISO-8859-9'] = _("Turkish (ISO-8859-9)");
$nls['encodings']['UTF-8'] = _("Unicode (UTF-8)");
$nls['encodings']['VISCII'] = _("Vietnamese (VISCII)");
$nls['encodings']['ISO-8859-1'] = _("Western (ISO-8859-1)");
$nls['encodings']['ISO-8859-15'] = _("Western (ISO-8859-15)");
asort($nls['encodings']);


/**
 ** Multi-language spelling support
 **/

$nls['spelling']['cs_CZ'] = '-T latin2 -d czech';
$nls['spelling']['da_DK'] = '-d dansk';
$nls['spelling']['de_DE'] = '-T latin1 -d deutsch';
$nls['spelling']['el_GR'] = '-T latin1 -d ellinika';
$nls['spelling']['en_CA'] = '-d canadian';
$nls['spelling']['en_GB'] = '-d british';
$nls['spelling']['en_US'] = '-d american';
$nls['spelling']['es_ES'] = '-d espanol';
$nls['spelling']['fr_FR'] = '-d francais';
$nls['spelling']['it_IT'] = '-T latin1 -d italian';
$nls['spelling']['nl_NL'] = '-d nederlands';
$nls['spelling']['pl_PL'] = '-d polish';
$nls['spelling']['pt_BR'] = '-d br';
$nls['spelling']['pt_PT'] = '-T latin1 -d portuguese';
$nls['spelling']['ru_RU'] = '-d russian';
$nls['spelling']['sl_SI'] = '-d slovensko';
$nls['spelling']['sv_SE'] = '-d svenska';

$GLOBALS['nls'] = &$nls;


/**
 ** Timezones
 **/

$tz['Africa/Abidjan'] = 'Africa/Abidjan';
$tz['Africa/Accra'] = 'Africa/Accra';
$tz['Africa/Addis_Ababa'] = 'Africa/Addis Ababa';
$tz['Africa/Algiers'] = 'Africa/Algiers';
$tz['Africa/Asmera'] = 'Africa/Asmera';
$tz['Africa/Bamako'] = 'Africa/Bamako';
$tz['Africa/Bangui'] = 'Africa/Bangui';
$tz['Africa/Banjul'] = 'Africa/Banjul';
$tz['Africa/Bissau'] = 'Africa/Bissau';
$tz['Africa/Blantyre'] = 'Africa/Blantyre';
$tz['Africa/Brazzaville'] = 'Africa/Brazzaville';
$tz['Africa/Bujumbura'] = 'Africa/Bujumbura';
$tz['Africa/Cairo'] = 'Africa/Cairo';
$tz['Africa/Casablanca'] = 'Africa/Casablanca';
$tz['Africa/Ceuta'] = 'Africa/Ceuta';
$tz['Africa/Conakry'] = 'Africa/Conakry';
$tz['Africa/Dakar'] = 'Africa/Dakar';
$tz['Africa/Dar_es_Salaam'] = 'Africa/Dar es Salaam';
$tz['Africa/Djibouti'] = 'Africa/Djibouti';
$tz['Africa/Douala'] = 'Africa/Douala';
$tz['Africa/El_Aaiun'] = 'Africa/El Aaiun';
$tz['Africa/Freetown'] = 'Africa/Freetown';
$tz['Africa/Gaborone'] = 'Africa/Gaborone';
$tz['Africa/Harare'] = 'Africa/Harare';
$tz['Africa/Johannesburg'] = 'Africa/Johannesburg';
$tz['Africa/Kampala'] = 'Africa/Kampala';
$tz['Africa/Khartoum'] = 'Africa/Khartoum';
$tz['Africa/Kigali'] = 'Africa/Kigali';
$tz['Africa/Kinshasa'] = 'Africa/Kinshasa';
$tz['Africa/Lagos'] = 'Africa/Lagos';
$tz['Africa/Libreville'] = 'Africa/Libreville';
$tz['Africa/Lome'] = 'Africa/Lome';
$tz['Africa/Luanda'] = 'Africa/Luanda';
$tz['Africa/Lubumbashi'] = 'Africa/Lubumbashi';
$tz['Africa/Lusaka'] = 'Africa/Lusaka';
$tz['Africa/Malabo'] = 'Africa/Malabo';
$tz['Africa/Maputo'] = 'Africa/Maputo';
$tz['Africa/Maseru'] = 'Africa/Maseru';
$tz['Africa/Mbabane'] = 'Africa/Mbabane';
$tz['Africa/Mogadishu'] = 'Africa/Mogadishu';
$tz['Africa/Monrovia'] = 'Africa/Monrovia';
$tz['Africa/Nairobi'] = 'Africa/Nairobi';
$tz['Africa/Ndjamena'] = 'Africa/Ndjamena';
$tz['Africa/Niamey'] = 'Africa/Niamey';
$tz['Africa/Nouakchott'] = 'Africa/Nouakchott';
$tz['Africa/Ouagadougou'] = 'Africa/Ouagadougou';
$tz['Africa/Porto-Novo'] = 'Africa/Porto-Novo';
$tz['Africa/Sao_Tome'] = 'Africa/Sao Tome';
$tz['Africa/Timbuktu'] = 'Africa/Timbuktu';
$tz['Africa/Tripoli'] = 'Africa/Tripoli';
$tz['Africa/Tunis'] = 'Africa/Tunis';
$tz['Africa/Windhoek'] = 'Africa/Windhoek';
$tz['America/Adak'] = 'America/Adak';
$tz['America/Anchorage'] = 'America/Anchorage';
$tz['America/Anguilla'] = 'America/Anguilla';
$tz['America/Antigua'] = 'America/Antigua';
$tz['America/Araguaina'] = 'America/Araguaina';
$tz['America/Aruba'] = 'America/Aruba';
$tz['America/Asuncion'] = 'America/Asuncion';
$tz['America/Barbados'] = 'America/Barbados';
$tz['America/Belem'] = 'America/Belem';
$tz['America/Belize'] = 'America/Belize';
$tz['America/Boa_Vista'] = 'America/Boa Vista';
$tz['America/Bogota'] = 'America/Bogota';
$tz['America/Boise'] = 'America/Boise';
$tz['America/Buenos_Aires'] = 'America/Buenos Aires';
$tz['America/Cambridge_Bay'] = 'America/Cambridge Bay';
$tz['America/Cancun'] = 'America/Cancun';
$tz['America/Caracas'] = 'America/Caracas';
$tz['America/Catamarca'] = 'America/Catamarca';
$tz['America/Cayenne'] = 'America/Cayenne';
$tz['America/Cayman'] = 'America/Cayman';
$tz['America/Chicago'] = 'America/Chicago';
$tz['America/Chihuahua'] = 'America/Chihuahua';
$tz['America/Cordoba'] = 'America/Cordoba';
$tz['America/Costa_Rica'] = 'America/Costa Rica';
$tz['America/Cuiaba'] = 'America/Cuiaba';
$tz['America/Curacao'] = 'America/Curacao';
$tz['America/Dawson'] = 'America/Dawson';
$tz['America/Dawson_Creek'] = 'America/Dawson Creek';
$tz['America/Denver'] = 'America/Denver';
$tz['America/Detroit'] = 'America/Detroit';
$tz['America/Dominica'] = 'America/Dominica';
$tz['America/Edmonton'] = 'America/Edmonton';
$tz['America/Eirunepe'] = 'America/Eirunepe';
$tz['America/El_Salvador'] = 'America/El Salvador';
$tz['America/Fortaleza'] = 'America/Fortaleza';
$tz['America/Glace_Bay'] = 'America/Glace Bay';
$tz['America/Godthab'] = 'America/Godthab';
$tz['America/Goose_Bay'] = 'America/Goose Bay';
$tz['America/Grand_Turk'] = 'America/Grand Turk';
$tz['America/Grenada'] = 'America/Grenada';
$tz['America/Guadeloupe'] = 'America/Guadeloupe';
$tz['America/Guatemala'] = 'America/Guatemala';
$tz['America/Guayaquil'] = 'America/Guayaquil';
$tz['America/Guyana'] = 'America/Guyana';
$tz['America/Halifax'] = 'America/Halifax';
$tz['America/Havana'] = 'America/Havana';
$tz['America/Hermosillo'] = 'America/Hermosillo';
$tz['America/Indiana/Knox'] = 'America/Indiana/Knox';
$tz['America/Indiana/Marengo'] = 'America/Indiana/Marengo';
$tz['America/Indiana/Vevay'] = 'America/Indiana/Vevay';
$tz['America/Indianapolis'] = 'America/Indianapolis';
$tz['America/Inuvik'] = 'America/Inuvik';
$tz['America/Iqaluit'] = 'America/Iqaluit';
$tz['America/Jamaica'] = 'America/Jamaica';
$tz['America/Jujuy'] = 'America/Jujuy';
$tz['America/Juneau'] = 'America/Juneau';
$tz['America/Kentucky/Monticello'] = 'America/Kentucky/Monticello';
$tz['America/La_Paz'] = 'America/La Paz';
$tz['America/Lima'] = 'America/Lima';
$tz['America/Los_Angeles'] = 'America/Los Angeles';
$tz['America/Louisville'] = 'America/Louisville';
$tz['America/Maceio'] = 'America/Maceio';
$tz['America/Managua'] = 'America/Managua';
$tz['America/Manaus'] = 'America/Manaus';
$tz['America/Martinique'] = 'America/Martinique';
$tz['America/Mazatlan'] = 'America/Mazatlan';
$tz['America/Mendoz'] = 'America/Mendoz';
$tz['America/Menominee'] = 'America/Menominee';
$tz['America/Merida'] = 'America/Merida';
$tz['America/Mexico_City'] = 'America/Mexico City';
$tz['America/Miquelon'] = 'America/Miquelon';
$tz['America/Monterrey'] = 'America/Monterrey';
$tz['America/Montevideo'] = 'America/Montevideo';
$tz['America/Montreal'] = 'America/Montreal';
$tz['America/Montserrat'] = 'America/Montserrat';
$tz['America/Nassau'] = 'America/Nassau';
$tz['America/New_York'] = 'America/New York';
$tz['America/Nipigon'] = 'America/Nipigon';
$tz['America/Nome'] = 'America/Nome';
$tz['America/Noronha'] = 'America/Noronha';
$tz['America/Panama'] = 'America/Panama';
$tz['America/Pangnirtung'] = 'America/Pangnirtung';
$tz['America/Paramaribo'] = 'America/Paramaribo';
$tz['America/Phoenix'] = 'America/Phoenix';
$tz['America/Port-au-Prince'] = 'America/Port-au-Prince';
$tz['America/Porto_Velho'] = 'America/Porto Velho';
$tz['America/Port_of_Spain'] = 'America/Port of Spain';
$tz['America/Puerto_Rico'] = 'America/Puerto Rico';
$tz['America/Rainy_River'] = 'America/Rainy River';
$tz['America/Rankin_Inlet'] = 'America/Rankin Inlet';
$tz['America/Recife'] = 'America/Recife';
$tz['America/Regina'] = 'America/Regina';
$tz['America/Rio_Branco'] = 'America/Rio Branco';
$tz['America/Rosario'] = 'America/Rosario';
$tz['America/Santiago'] = 'America/Santiago';
$tz['America/Santo_Domingo'] = 'America/Santo Domingo';
$tz['America/Sao_Paulo'] = 'America/Sao Paulo';
$tz['America/Scoresbysund'] = 'America/Scoresbysund';
$tz['America/Shiprock'] = 'America/Shiprock';
$tz['America/St_Johns'] = 'America/St Johns';
$tz['America/St_Kitts'] = 'America/St Kitts';
$tz['America/St_Lucia'] = 'America/St Lucia';
$tz['America/St_Thomas'] = 'America/St Thomas';
$tz['America/St_Vincent'] = 'America/St Vincent';
$tz['America/Swift_Current'] = 'America/Swift Current';
$tz['America/Tegucigalpa'] = 'America/Tegucigalpa';
$tz['America/Thule'] = 'America/Thule';
$tz['America/Thunder_Bay'] = 'America/Thunder Bay';
$tz['America/Tijuana'] = 'America/Tijuana';
$tz['America/Tortola'] = 'America/Tortola';
$tz['America/Vancouver'] = 'America/Vancouver';
$tz['America/Whitehorse'] = 'America/Whitehorse';
$tz['America/Winnipeg'] = 'America/Winnipeg';
$tz['America/Yakutat'] = 'America/Yakutat';
$tz['America/Yellowknife'] = 'America/Yellowknife';
$tz['Antarctica/Casey'] = 'Antarctica/Casey';
$tz['Antarctica/Davis'] = 'Antarctica/Davis';
$tz['Antarctica/DumontDUrville'] = 'Antarctica/DumontDUrville';
$tz['Antarctica/Mawson'] = 'Antarctica/Mawson';
$tz['Antarctica/McMurdo'] = 'Antarctica/McMurdo';
$tz['Antarctica/Palmer'] = 'Antarctica/Palmer';
$tz['Antarctica/South_Pole'] = 'Antarctica/South Pole';
$tz['Antarctica/Syowa'] = 'Antarctica/Syowa';
$tz['Antarctica/Vostok'] = 'Antarctica/Vostok';
$tz['Arctic/Longyearbyen'] = 'Arctic/Longyearbyen';
$tz['Asia/Aden'] = 'Asia/Aden';
$tz['Asia/Almaty'] = 'Asia/Almaty';
$tz['Asia/Amman'] = 'Asia/Amman';
$tz['Asia/Anadyr'] = 'Asia/Anadyr';
$tz['Asia/Aqtau'] = 'Asia/Aqtau';
$tz['Asia/Aqtobe'] = 'Asia/Aqtobe';
$tz['Asia/Ashgabat'] = 'Asia/Ashgabat';
$tz['Asia/Baghdad'] = 'Asia/Baghdad';
$tz['Asia/Bahrain'] = 'Asia/Bahrain';
$tz['Asia/Baku'] = 'Asia/Baku';
$tz['Asia/Bangkok'] = 'Asia/Bangkok';
$tz['Asia/Beirut'] = 'Asia/Beirut';
$tz['Asia/Bishkek'] = 'Asia/Bishkek';
$tz['Asia/Brunei'] = 'Asia/Brunei';
$tz['Asia/Calcutta'] = 'Asia/Calcutta';
$tz['Asia/Chungking'] = 'Asia/Chungking';
$tz['Asia/Colombo'] = 'Asia/Colombo';
$tz['Asia/Damascus'] = 'Asia/Damascus';
$tz['Asia/Dhaka'] = 'Asia/Dhaka';
$tz['Asia/Dili'] = 'Asia/Dili';
$tz['Asia/Dubai'] = 'Asia/Dubai';
$tz['Asia/Dushanbe'] = 'Asia/Dushanbe';
$tz['Asia/Gaza'] = 'Asia/Gaza';
$tz['Asia/Harbin'] = 'Asia/Harbin';
$tz['Asia/Hong_Kong'] = 'Asia/Hong Kong';
$tz['Asia/Hovd'] = 'Asia/Hovd';
$tz['Asia/Irkutsk'] = 'Asia/Irkutsk';
$tz['Asia/Jakarta'] = 'Asia/Jakarta';
$tz['Asia/Jayapura'] = 'Asia/Jayapura';
$tz['Asia/Jerusalem'] = 'Asia/Jerusalem';
$tz['Asia/Kabul'] = 'Asia/Kabul';
$tz['Asia/Kamchatka'] = 'Asia/Kamchatka';
$tz['Asia/Karachi'] = 'Asia/Karachi';
$tz['Asia/Kashgar'] = 'Asia/Kashgar';
$tz['Asia/Katmandu'] = 'Asia/Katmandu';
$tz['Asia/Krasnoyarsk'] = 'Asia/Krasnoyarsk';
$tz['Asia/Kuala_Lumpur'] = 'Asia/Kuala Lumpur';
$tz['Asia/Kuching'] = 'Asia/Kuching';
$tz['Asia/Kuwait'] = 'Asia/Kuwait';
$tz['Asia/Macao'] = 'Asia/Macao';
$tz['Asia/Magadan'] = 'Asia/Magadan';
$tz['Asia/Manila'] = 'Asia/Manila';
$tz['Asia/Muscat'] = 'Asia/Muscat';
$tz['Asia/Nicosia'] = 'Asia/Nicosia';
$tz['Asia/Novosibirsk'] = 'Asia/Novosibirsk';
$tz['Asia/Omsk'] = 'Asia/Omsk';
$tz['Asia/Phnom_Penh'] = 'Asia/Phnom Penh';
$tz['Asia/Pyongyang'] = 'Asia/Pyongyang';
$tz['Asia/Qatar'] = 'Asia/Qatar';
$tz['Asia/Rangoon'] = 'Asia/Rangoon';
$tz['Asia/Riyadh'] = 'Asia/Riyadh';
$tz['Asia/Saigon'] = 'Asia/Saigon';
$tz['Asia/Samarkand'] = 'Asia/Samarkand';
$tz['Asia/Seoul'] = 'Asia/Seoul';
$tz['Asia/Shanghai'] = 'Asia/Shanghai';
$tz['Asia/Singapore'] = 'Asia/Singapore';
$tz['Asia/Taipei'] = 'Asia/Taipei';
$tz['Asia/Tashkent'] = 'Asia/Tashkent';
$tz['Asia/Tbilisi'] = 'Asia/Tbilisi';
$tz['Asia/Tehran'] = 'Asia/Tehran';
$tz['Asia/Thimphu'] = 'Asia/Thimphu';
$tz['Asia/Tokyo'] = 'Asia/Tokyo';
$tz['Asia/Ujung_Pandang'] = 'Asia/Ujung Pandang';
$tz['Asia/Ulaanbaatar'] = 'Asia/Ulaanbaatar';
$tz['Asia/Urumqi'] = 'Asia/Urumqi';
$tz['Asia/Vientiane'] = 'Asia/Vientiane';
$tz['Asia/Vladivostok'] = 'Asia/Vladivostok';
$tz['Asia/Yakutsk'] = 'Asia/Yakutsk';
$tz['Asia/Yekaterinburg'] = 'Asia/Yekaterinburg';
$tz['Asia/Yerevan'] = 'Asia/Yerevan';
$tz['Atlantic/Azores'] = 'Atlantic/Azores';
$tz['Atlantic/Bermuda'] = 'Atlantic/Bermuda';
$tz['Atlantic/Canary'] = 'Atlantic/Canary';
$tz['Atlantic/Cape_Verde'] = 'Atlantic/Cape Verde';
$tz['Atlantic/Faeroe'] = 'Atlantic/Faeroe';
$tz['Atlantic/Jan_Mayen'] = 'Atlantic/Jan Mayen';
$tz['Atlantic/Madeira'] = 'Atlantic/Madeira';
$tz['Atlantic/Reykjavik'] = 'Atlantic/Reykjavik';
$tz['Atlantic/South_Georgia'] = 'Atlantic/South Georgia';
$tz['Atlantic/Stanley'] = 'Atlantic/Stanley';
$tz['Atlantic/St_Helena'] = 'Atlantic/St Helena';
$tz['Australia/Adelaide'] = 'Australia/Adelaide';
$tz['Australia/Brisbane'] = 'Australia/Brisbane';
$tz['Australia/Broken_Hill'] = 'Australia/Broken Hill';
$tz['Australia/Darwin'] = 'Australia/Darwin';
$tz['Australia/Hobart'] = 'Australia/Hobart';
$tz['Australia/Lindeman'] = 'Australia/Lindeman';
$tz['Australia/Lord_Howe'] = 'Australia/Lord Howe';
$tz['Australia/Melbourne'] = 'Australia/Melbourne';
$tz['Australia/Perth'] = 'Australia/Perth';
$tz['Australia/Sydney'] = 'Australia/Sydney';
$tz['Europe/Amsterdam'] = 'Europe/Amsterdam';
$tz['Europe/Andorra'] = 'Europe/Andorra';
$tz['Europe/Athens'] = 'Europe/Athens';
$tz['Europe/Belfast'] = 'Europe/Belfast';
$tz['Europe/Belgrade'] = 'Europe/Belgrade';
$tz['Europe/Berlin'] = 'Europe/Berlin';
$tz['Europe/Bratislava'] = 'Europe/Bratislava';
$tz['Europe/Brussels'] = 'Europe/Brussels';
$tz['Europe/Bucharest'] = 'Europe/Bucharest';
$tz['Europe/Budapest'] = 'Europe/Budapest';
$tz['Europe/Chisinau'] = 'Europe/Chisinau';
$tz['Europe/Copenhagen'] = 'Europe/Copenhagen';
$tz['Europe/Dublin'] = 'Europe/Dublin';
$tz['Europe/Gibraltar'] = 'Europe/Gibraltar';
$tz['Europe/Helsinki'] = 'Europe/Helsinki';
$tz['Europe/Istanbul'] = 'Europe/Istanbul';
$tz['Europe/Kaliningrad'] = 'Europe/Kaliningrad';
$tz['Europe/Kiev'] = 'Europe/Kiev';
$tz['Europe/Lisbon'] = 'Europe/Lisbon';
$tz['Europe/Ljubljana'] = 'Europe/Ljubljana';
$tz['Europe/London'] = 'Europe/London';
$tz['Europe/Luxembourg'] = 'Europe/Luxembourg';
$tz['Europe/Madrid'] = 'Europe/Madrid';
$tz['Europe/Malta'] = 'Europe/Malta';
$tz['Europe/Minsk'] = 'Europe/Minsk';
$tz['Europe/Monaco'] = 'Europe/Monaco';
$tz['Europe/Moscow'] = 'Europe/Moscow';
$tz['Europe/Oslo'] = 'Europe/Oslo';
$tz['Europe/Paris'] = 'Europe/Paris';
$tz['Europe/Prague'] = 'Europe/Prague';
$tz['Europe/Riga'] = 'Europe/Riga';
$tz['Europe/Rome'] = 'Europe/Rome';
$tz['Europe/Samara'] = 'Europe/Samara';
$tz['Europe/San_Marino'] = 'Europe/San Marino';
$tz['Europe/Sarajevo'] = 'Europe/Sarajevo';
$tz['Europe/Simferopol'] = 'Europe/Simferopol';
$tz['Europe/Skopje'] = 'Europe/Skopje';
$tz['Europe/Sofia'] = 'Europe/Sofia';
$tz['Europe/Stockholm'] = 'Europe/Stockholm';
$tz['Europe/Tallinn'] = 'Europe/Tallinn';
$tz['Europe/Tirane'] = 'Europe/Tirane';
$tz['Europe/Uzhgorod'] = 'Europe/Uzhgorod';
$tz['Europe/Vaduz'] = 'Europe/Vaduz';
$tz['Europe/Vatican'] = 'Europe/Vatican';
$tz['Europe/Vienna'] = 'Europe/Vienna';
$tz['Europe/Vilnius'] = 'Europe/Vilnius';
$tz['Europe/Warsaw'] = 'Europe/Warsaw';
$tz['Europe/Zagreb'] = 'Europe/Zagreb';
$tz['Europe/Zaporozhye'] = 'Europe/Zaporozhye';
$tz['Europe/Zurich'] = 'Europe/Zurich';
$tz['Indian/Antananarivo'] = 'Indian/Antananarivo';
$tz['Indian/Chagos'] = 'Indian/Chagos';
$tz['Indian/Christmas'] = 'Indian/Christmas';
$tz['Indian/Cocos'] = 'Indian/Cocos';
$tz['Indian/Comoro'] = 'Indian/Comoro';
$tz['Indian/Kerguelen'] = 'Indian/Kerguelen';
$tz['Indian/Mahe'] = 'Indian/Mahe';
$tz['Indian/Maldives'] = 'Indian/Maldives';
$tz['Indian/Mauritius'] = 'Indian/Mauritius';
$tz['Indian/Mayotte'] = 'Indian/Mayotte';
$tz['Indian/Reunion'] = 'Indian/Reunion';
$tz['Pacific/Apia'] = 'Pacific/Apia';
$tz['Pacific/Auckland'] = 'Pacific/Auckland';
$tz['Pacific/Chatham'] = 'Pacific/Chatham';
$tz['Pacific/Easter'] = 'Pacific/Easter';
$tz['Pacific/Efate'] = 'Pacific/Efate';
$tz['Pacific/Enderbury'] = 'Pacific/Enderbury';
$tz['Pacific/Fakaofo'] = 'Pacific/Fakaofo';
$tz['Pacific/Fiji'] = 'Pacific/Fiji';
$tz['Pacific/Funafuti'] = 'Pacific/Funafuti';
$tz['Pacific/Galapagos'] = 'Pacific/Galapagos';
$tz['Pacific/Gambier'] = 'Pacific/Gambier';
$tz['Pacific/Guadalcanal'] = 'Pacific/Guadalcanal';
$tz['Pacific/Guam'] = 'Pacific/Guam';
$tz['Pacific/Honolulu'] = 'Pacific/Honolulu';
$tz['Pacific/Johnston'] = 'Pacific/Johnston';
$tz['Pacific/Kiritimati'] = 'Pacific/Kiritimati';
$tz['Pacific/Kosrae'] = 'Pacific/Kosrae';
$tz['Pacific/Kwajalein'] = 'Pacific/Kwajalein';
$tz['Pacific/Majuro'] = 'Pacific/Majuro';
$tz['Pacific/Marquesas'] = 'Pacific/Marquesas';
$tz['Pacific/Midway'] = 'Pacific/Midway';
$tz['Pacific/Nauru'] = 'Pacific/Nauru';
$tz['Pacific/Niue'] = 'Pacific/Niue';
$tz['Pacific/Norfolk'] = 'Pacific/Norfolk';
$tz['Pacific/Noumea'] = 'Pacific/Noumea';
$tz['Pacific/Pago_Pago'] = 'Pacific/Pago Pago';
$tz['Pacific/Palau'] = 'Pacific/Palau';
$tz['Pacific/Pitcairn'] = 'Pacific/Pitcairn';
$tz['Pacific/Ponape'] = 'Pacific/Ponape';
$tz['Pacific/Port_Moresby'] = 'Pacific/Port Moresby';
$tz['Pacific/Rarotonga'] = 'Pacific/Rarotonga';
$tz['Pacific/Saipan'] = 'Pacific/Saipan';
$tz['Pacific/Tahiti'] = 'Pacific/Tahiti';
$tz['Pacific/Tarawa'] = 'Pacific/Tarawa';
$tz['Pacific/Tongatapu'] = 'Pacific/Tongatapu';
$tz['Pacific/Truk'] = 'Pacific/Truk';
$tz['Pacific/Wake'] = 'Pacific/Wake';
$tz['Pacific/Wallis'] = 'Pacific/Wallis';
$tz['Pacific/Yap'] = 'Pacific/Yap';

$GLOBALS['tz'] = &$tz;

--- NEW FILE: prefs.php ---
<?php
/**
 * $Horde: horde/config/prefs.php.dist,v 1.62 2004/05/19 19:04:03 chuck Exp $
 *
 * Preferences Information
 * =======================
 * Changes you make to the prefs.php file(s) will not be reflected until the
 * user logs out and logs in again.
 *
 * If you change these preferences in a production system, you will
 * need to delete any horde_prefs in your preferences database.
 *
 * prefGroups array
 * ----------------
 * $prefGroups are for display purposes when you press the options button.
 * The options choice will appear when you set your preferences driver
 * in the horde/config/conf.php file.
 *
 * $prefGroups array definition:
 *    column:  What column head this group will go under
 *     label:  Label for the group of settings
 *      desc:  Description that will show under label
 *   members:  List of preferences supported by this group
 *
 * _prefs array
 * ------------
 * The $_prefs array's are listed in the same order as listed in the
 * members element of $prefGroups.
 *
 *  value: This entry will either hold a number or a text value based on the
 *         preference type:
 *           implicit:  See Preference type
 *               text:  Text value
 *             number:  Number value
 *           checkbox:  Value should be 0 for unchecked, 1 for checked
 *             select:  Value associated with that selection list
 *
 * locked: Allow preference to be changed from UI
 *            true:  Do not show this preference in the UI
 *           false:  Show this preference in the UI and allow changing
 *
 * shared: Share with other horde apps
 *            true:  Share this pref with other Horde apps
 *           false:  Keep this pref local to IMP
 *
 *   type: Preference type
 *            special:  Provides a UI widget
 *             select:  Provides a selection list in the UI
 *           checkbox:  Provides a checkbox
 *           implicit:  Provides storage for 'special' types
 *           password:  Provides a textbox for password entry.
 *               enum:  Use static list of elements...similar to 'select'
 *
 *   enum: Static list of elements.
 *
 *   hook: Call a hook function for the value of this preference
 *            true:  Will call the function _prefs_hook_<prefname>
 *                   to fill in the value of this preference.
 *                   See hooks.php for more details.
 *           false:  Normal behaviour - no hook is called.
 */

$prefGroups['identities'] = array(
    'column' => _("Your Information"),
    'label' => _("Personal Information"),
    'desc' => _("Change the name and address that people see when they read and reply to your emails."),
    'members' => array('default_identity', 'identityselect', 'deleteidentity',
                       'id', 'fullname', 'from_addr')
);

$prefGroups['language'] = array(
    'column' => _("Your Information"),
    'label' => _("Locale and Time"),
    'desc' => _("Set your preferred language, timezone and date options."),
    'members' => array('language', 'timezone', 'twentyFour', 'date_format')
);

$prefGroups['categories'] = array(
    'column' => _("Your Information"),
    'label' => _("Categories and Labels"),
    'desc' => _("Manage the list of categories you have to label items with, and colors associated with those categories."),
    'members' => array('categorymanagement')
);

$prefGroups['display'] = array(
    'column' => _("Other Information"),
    'label' => _("Display Options"),
    'desc' => _("Set your startup application, color scheme, page refreshing, and other display options."),
    'members' => array('initial_application', 'show_last_login', 'theme',
                       'summary_refresh_time', 'show_sidebar', 'moz_sidebar',
                       'menu_view', 'widget_accesskey')
);

$prefGroups['remote'] = array(
    'column' => _("Other Information"),
    'label' => _("Remote Servers"),
    'desc' => _("Set up remote servers that you want to access from your portal."),
    'url' => 'services/portal/rpcsum.php'
);

// For alternate IMSP authentication.
$prefGroups['imspauth'] = array(
    'column' => _("Other Information"),
    'label' => _("Alternate IMSP Login"),
    'desc' => _("Use if name/password is different for IMSP server."),
    'members' => array('imsp_auth_user', 'imsp_auth_pass')
);

// Personal Information preferences

// default identity
// Set locked to true if you don't want the users to have multiple identities.
$_prefs['default_identity'] = array(
    'value' => 0,
    'locked' => false,
    'shared' => true,
    'type' => 'enum',
    'enum' => isset($identity) ? $identity->getAll('id') : array(),
    'desc' => _("Your default identity:")
);

// identities array
// Don't change anything here.
$_prefs['identities'] = array(
    'value' => 'a:0:{}',
    'locked' => false,
    'shared' => true,
    'type' => 'implicit'
);

// identity selection widget
$_prefs['identityselect'] = array(
    'shared' => true,
    'type' => 'special'
);

// delete button
$_prefs['deleteidentity'] = array(
    'type' => 'special',
    'shared' => true
);

// identity name
$_prefs['id'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'text',
    'desc' => _("Identity's name:")
);

// user full name for From: line
$_prefs['fullname'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'text',
    'desc' => _("Your full name:")
);

// user preferred email address for From: line
$_prefs['from_addr'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'text',
    'desc' =>  _("Your From: address:")
);

// user language
$_prefs['language'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'select',
    'desc' => _("Select your preferred language:")
);

// user time zone
$_prefs['timezone'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'select',
    'desc' => _("Your current time zone:")
);

// time format
$_prefs['twentyFour'] = array(
    'value' => 0,
    'locked' => false,
    'shared' => true,
    'type' => 'checkbox',
    'desc' => _("Display 24-hour times?")
);

// date format
$_prefs['date_format'] = array(
    'value' => '%A %B %d, %Y',
    'locked' => false,
    'shared' => true,
    'type' => 'enum',
    'enum' => array('%A %B %d, %Y' => strftime('%A %B %d, %Y'),
                    '%A, %d. %B %Y' => strftime('%A, %d. %B %Y'),
                    '%A, %d %B %Y' => strftime('%A, %d %B %Y'),
                    '%x' => strftime('%x')),
    'desc' => _("Choose how to display dates:")
);

// UI theme
$_prefs['theme'] = array(
    'value' => 'kolab',
    'locked' => false,
    'shared' => true,
    'type' => 'select',
    'desc' => _("Select your color scheme.")
);

// categories
$_prefs['categories'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'implicit'
);

// category colors
$_prefs['category_colors'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'implicit'
);

// UI for category management.
$_prefs['categorymanagement'] = array(
    'type' => 'special'
);

$_prefs['summary_refresh_time'] = array(
    'value' => 300,
    'locked' => false,
    'shared' => false,
    'type' => 'enum',
    'enum' => array(0 => _("Never"),
                    30 => _("Every 30 seconds"),
                    60 => _("Every minute"),
                    300 => _("Every 5 minutes"),
                    900 => _("Every 15 minutes"),
                    1800 => _("Every half hour")),
    'desc' => _("Refresh Portal View:")
);

$_prefs['show_sidebar'] = array(
    'value' => 0,
    'locked' => false,
    'shared' => true,
    'type' => 'checkbox',
    'desc' => sprintf(_("Show the %s Menu on the left?"), $GLOBALS['registry']->getParam('name', 'horde'))
);

$_prefs['moz_sidebar'] = array(
    'type' => 'link',
    'xurl' => sprintf('javascript:if (window.sidebar && window.sidebar.addPanel) window.sidebar.addPanel(\'%s\', \'%s\', \'%s\'); else alert(\'%s\');',
                      $GLOBALS['registry']->getParam('name', 'horde'),
                      Util::addParameter(Horde::url($GLOBALS['registry']->getParam('webroot', 'horde') . '/services/portal/menu.php', true, -1), 'mozbar', '1'),
                      Horde::url($GLOBALS['registry']->getParam('webroot', 'horde') . '/prefs.php', true, -1),
                      addslashes(_("Couldn't find the Mozilla Sidebar. Make sure the sidebar is open."))),
    'desc' => sprintf(_("Add the %s Menu as a Mozilla Sidebar"), $GLOBALS['registry']->getParam('name', 'horde'))
);

$_prefs['menu_view'] = array(
    'value' => 'both',
    'locked' => false,
    'shared' => true,
    'type' => 'enum',
    'enum' => array('text' => _("Text Only"),
                    'icon' => _("Icons Only"),
                    'both' => _("Icons with text")),
    'desc' => _("Menu mode:")
);

// perform maintenance operations?
$_prefs['do_maintenance'] = array(
    'value' => 1,
    'locked' => false,
    'shared' => true,
    'type' => 'checkbox',
    'desc' => _("Perform maintenance operations on login?")
);

// confirm when doing maintenance operations? If false (0), they will
// be performed with no input from/check with the user.
$_prefs['confirm_maintenance'] = array(
    'value' => 1,
    'locked' => false,
    'shared' => true,
    'type' => 'checkbox',
    'desc' => _("Ask for confirmation before doing maintenance operations?")
);

// what application should we go to after login?
$_prefs['initial_application'] = array(
    'value' => 'kronolith',
    'locked' => false,
    'shared' => true,
    'type' => 'select',
    'desc' => sprintf(_("What application should %s display after login?"), $GLOBALS['registry']->getParam('name'))
);

$_prefs['widget_accesskey'] = array(
    'value' => 1,
    'locked' => false,
    'shared' => true,
    'type' => 'checkbox',
    'desc' => _("Should access keys be defined for most links?")
);

// the layout of the portal page.
$_prefs['portal_layout'] = array(
    'value' => 'a:0:{}',
    'locked' => false,
    'shared' => false,
    'type' => 'implicit',
    'desc' => 'Layout of portal page'
);

// the remote servers.
$_prefs['remote_summaries'] = array(
    'value' => 'a:0:{}',
    'locked' => false,
    'shared' => false,
    'type' => 'implicit'
);

// last login time of user
// value is a serialized array of the UNIX timestamp of the last
// login, and the host that the last login was from.
$_prefs['last_login'] = array(
    'value' => 'a:0:{}',
    'locked' => false,
    'shared' => true,
    'type' => 'implicit'
);

// show the last login time of user
// a value of 0 = no, 1 = yes
$_prefs['show_last_login'] = array(
    'value' => 0,
    'locked' => false,
    'shared' => true,
    'type' => 'checkbox',
    'desc' => _("Show last login time when logging in?")
);

$_prefs['imsp_auth_user'] = array(
    'value' => '',
    'locked' => false,
    'shared' => false,
    'type' => 'text',
    'desc' => _("Alternate IMSP Username")
);

$_prefs['imsp_auth_pass'] = array(
    'value' => '',
    'locked' => false,
    'shared' => false,
    'type' => 'password',
    'desc' => _("Alternate IMSP Password")
);

--- NEW FILE: registry.php ---
<?php
/**
 * registry.php -- Horde application registry.
 *
 * $Horde: horde/config/registry.php.dist,v 1.219 2004/04/30 15:43:27 jan Exp $
 *
 * This configuration file is used by Horde to determine which Horde
 * applications are installed and where, as well as how they interact.
 *
 * Application registry
 * --------------------
 * The following settings register installed Horde applications.
 * By default, Horde assumes that the application directories live
 * inside the horde directory.
 *
 * Attribute     Type     Description
 * ---------     ----     -----------
 * fileroot      string   The base filesystem path for the module's files
 * webroot       string   The base URI for the module
 * graphics      string   The base URI for the module images
 * icon          string   The URI for an icon to show in menus for the module
 * name          string   The name used in menus and descriptions for a module
 * status        string   'inactive', 'hidden', 'notoolbar', 'heading', 'admin'
 *                        or 'active'.
 * provides      string   Service types the module provides.
 * initial_page  string   The initial (default) page (filename) for the module
 * templates     string   The filesystem path to the templates directory
 * menu_parent   string   The name of the 'heading' group that this app should
 *                        show up under.
 * target        string   The (optional) target frame for the link.
 */

// We try to automatically determine the proper webroot for Horde
// here. This still assumes that applications live under horde/. If
// this results in incorrect results for you, simply change the two
// uses of the $webroot variable in the 'horde' stanza below.
//
// Note for Windows users: the below assumes that your DOCUMENT_ROOT
// uses forward slashes. If it does not, you'll have to tweak this.

$this->applications['horde'] = array(
    'fileroot' => dirname(__FILE__) . '/..',
    'webroot' => '/fbview',
    'initial_page' => 'login.php',
    'icon' => '/fbview/graphics/horde.gif',
    'name' => _("Proko2 Free/Busy View"),
    'status' => 'active',
    'templates' => dirname(__FILE__) . '/../templates',
    'provides' => 'horde'
);

if (Auth::getAuth()) {
    $this->applications['logout'] = array(
        'fileroot' => dirname(__FILE__) . '/..',
        'webroot' => $this->applications['horde']['webroot'],
        'initial_page' => 'login.php?' . AUTH_REASON_PARAM . '=' . AUTH_REASON_LOGOUT,
        'icon' => $this->applications['horde']['webroot'] . '/graphics/logout.gif',
        'name' => _("Logout"),
        'status' => 'notoolbar'
        );
} else {
    $this->applications['logout'] = array(
        'fileroot' => dirname(__FILE__) . '/..',
        'webroot' => $this->applications['horde']['webroot'],
        'initial_page' => 'login.php?url=' . urlencode(Horde::selfUrl(true)),
        'icon' => $this->applications['horde']['webroot'] . '/graphics/login.gif',
        'name' => _("Login"),
        'status' => 'notoolbar'
        );
}

$this->applications['kronolith'] = array(
    'fileroot' => dirname(__FILE__) . '/../kronolith',
    'webroot' => $this->applications['horde']['webroot'] . '/kronolith',
    'icon' => $this->applications['horde']['webroot'] . '/kronolith/graphics/kronolith.gif',
    'name' => _("Calendar"),
    'status' => 'active',
    'provides' => 'calendar',
);

$this->applications['turba'] = array(
    'fileroot' => dirname(__FILE__) . '/../turba',
    'webroot' => $this->applications['horde']['webroot'] . '/turba',
    'icon' => $this->applications['horde']['webroot'] . '/turba/graphics/turba.gif',
    'name' => _("Address Book"),
    'status' => 'active',
    'provides' => array('contacts', 'clients'),
);

Index: .cvsignore
===================================================================
RCS file: /kolabrepository/server/kolab-resource-handlers/kolab-resource-handlers/fbview/fbview/config/.cvsignore,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- .cvsignore	11 Jun 2004 10:51:52 -0000	1.1.1.1
+++ .cvsignore	30 Jun 2004 23:25:20 -0000	1.2
@@ -1,8 +1 @@
-conf.php
-hooks.php
-html.php
-mime_drivers.php
-motd.php
-nls.php
-registry.php
-prefs.php
+*~





More information about the commits mailing list