<?php

/*
 
 File: login.php3
 $Author: rkrusty $
 $Revision: 1.56 $
 $Date: 1999/04/14 06:37:40 $
 
 IMP: Copyright 1999 Charles J. Hagenbuch <chuck@horde.org>
 
 You should have received a copy of the GNU Public
 License along with this package; if not, write to the
 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.
 
*/

$need_horde_db = 0;
$db_lib_loaded = 0;
if (!defined("HORDE_LIB")) include ('../lib/horde.lib');
require ('./lib/imp.lib');
require ('./config/defaults.php3');

/* Html styles configuration */
require('./config/html.php3');
/* Mailbox configuration */
require('./config/mailbox.php3');
/* include mime and language configuration */
require('./config/mime.php3');
require('./config/lang.php3');

$language = select_lang();
$session = create_session_object();
require ("./locale/$language/login.lang");
require ('./locale/local/login.lang');
$help_file = 'login.help';
require ("./locale/defines/$help_file");

$this_client = new WebClient;

error_reporting($default->error_level);
caching_headers();

/* invalidate any previous session */
$session->initialize();
$session->set_lang($language);

$langs = '<select name="new_lang">';
while (list($key, $val) = each($default->lang)) {
//while (list($key, $val) = each($lang->lang)) {
   if ($key == $language) $sel = ' SELECTED';
   else $sel = '';
   $langs .= "<option value=\"$key\"$sel>$val</option>\n";
}
$langs .= '</select>';


if (!isset($reason)) { $reason = 'login'; }


require("$default->include_dir/doctype.inc");

status($lang->welcome_to_imp);
if (!$this_client->lynx) {
   include("$default->include_dir/login/login.inc");
} else {
   include( "$default->include_dir/login/login_lynx.inc" );
   /* Menu Mode = IMPMENU_BLANK */
   include_lynx_menu(IMPMENU_BLANK);
}

?>
