<?php
/*
Imp configurator
*/
$horde_config_frm = new HordeConfigForm;
$horde_config_frm->full_colspan = 2;
$horde_config_frm->gen_title_bar( 'IMP Configurator' );

echo( '<form method="post">' );
echo(
   '<input type="hidden" name="actionID" value="' .
   IMPCFGMGR_WRITE_CONFIG . '">' );

/* HELLO to user.... */
$horde_config_frm->gen_sect_subtitle( 'Welcome to the imp configurator. This configuration tool will help you configure your imp instance. When completed you will receive back the configuration file to your browser. The next step is to copy the browser output into ( Your IMP installation directory )/config/defaults.php3' );

/* LOCAL CONFIGURATION */
$horde_config_frm->gen_sect_title( 'Local Configuration :' );
$horde_config_frm->gen_attr_value_title();

$horde_config_frm->gen_textbox(
   'Local host name : ',
   'localhost',
   $default->localhost,
   'The local hostname of the server that all of these pages are beign served out of.',
   15
   );

/* URL CONFIGURATION */
$horde_config_frm->gen_sect_title( 'Url Configuration :' );
$horde_config_frm->gen_attr_value_title();
$horde_config_frm->gen_textbox(
   'Base URL : ',
   'root_url',
   $default->root_url,
   'Is the url to the root of the imp installation.',
   50
   );

$horde_config_frm->gen_textbox(
   'Graphics URL : ',
   'graphics_url',
   $default->graphics_url,
   'The url to the graphics that came with imp in the graphics subdirectory.',
   50
   );
   
/* IMAP CONFIGURATION */
$horde_config_frm->gen_sect_title( 'Imap Configuration' );
$horde_config_frm->gen_attr_value_title();
$horde_config_frm->gen_textbox(
   'IMAP Server : ',
   'imap_server',
   $default->server,
   'The default imap server that you would like users to connect to.',
   30
   );

$horde_config_frm->gen_textbox(
   'IMAP Root Folder : ',
   'imap_folders',
   $default->folders,
   'The default imap folder that the server will look for mail in. Please note : You need to enter only the directory relative to the users directory. I.E. /home/userx/mail is mail',
   15
   );

$horde_config_frm->gen_true_false(
   'Use SSL cookies :',
   'use_ssl_cookies',
   $default->secure,
   'Use SSL for cookies if it is a secure connection.'
   );


/* USER CONFIGURATION */
$horde_config_frm->gen_sect_title( 'User Configuration : ' );
$horde_config_frm->gen_attr_value_title();

$horde_config_frm->gen_true_false(
   'User change server :',
   'user_change_server',
   $default->user_change_server,
   'Controls whether user is allowed to change the remote imap server they are connecting to.'
   );

$horde_config_frm->gen_true_false(
   'User change folder :',
   'user_change_folder',
   $default->user_change_folder,
   'Controls whether user is allowed to change the remote imap folder base they are connecting to.'
   );

/* IMP Configuration */
$horde_config_frm->gen_sect_title( 'Imp Configuration :' );
$horde_config_frm->gen_attr_value_title();

$horde_config_frm->gen_textbox(
   'Max messages per page : ',
   'imp_max_messages_page',
   $default->max_messages_page,
   'Sets up the maximum messages per page.',
   15
   );

/* HTML Configuration */
$horde_config_frm->gen_sect_title( 'HTML Configuration :' );

/* HTML Configuration - Themes */
$horde_config_frm->gen_sect_title( 'Themes Configuration :' );
$horde_config_frm->gen_attr_value_title();

$horde_config_frm->gen_textbox(
   'Dark Cell Background : ',
   'html_theme_dark_bg',
   $default->dark_bg,
   'The dark background used within the title cells of imp.',
   15
   );

$horde_config_frm->gen_textbox(
   'Light Cell Background :',
   'html_theme_light_bg',
   $default->light_bg,
   'The light background used within the title cells of imp.',
   15
   );

$horde_config_frm->gen_textbox( 
   'Text on light :',
   'html_theme_text_on_light',
   $default->text_on_light->color,
   'The color for the text on the light backgrounds.',
   15
   );

$horde_config_frm->gen_textbox(
   'Text on dark :',
   'html_theme_text_on_dark',
   $default->text_on_dark,
   'The color for the text on the dark backgrounds.',
   15
   );

$horde_config_frm->gen_textbox(
   'Text Background :',
   'html_theme_text_bg',
   $default->text_bg,
   'The color for the background in text cells.',
   15
   );
$horde_config_frm->gen_textbox(
   'Item Background :',
   'html_theme_item_bg',
   $default->item_bg,
   'The color for the background in item cells.',
   15
   );
$horde_config_frm->gen_textbox(
   'Navigational Background :',
   'html_theme_nav_bg',
   $default->nav_bg,
   'The color for the background in the navigational cells.',
   15
   );

/* DOC BODY Config */
$horde_config_frm->gen_sect_title( 'Global Document Configuration :' );

/* RIGHT FRAME */
$horde_config_frm->gen_sect_title( 'Right Frame :' );

$horde_config_frm->gen_sect_subtitle( 'Body attributes - these attributes effect all of the actions that are displayed within the right pane. i.e. ( login, mailbox, etc )' );
$horde_config_frm->gen_attr_value_title();

$horde_config_frm->gen_doc_config(
   'body',
   $default->body
   );

/* LEFT Frame */
$horde_config_frm->gen_sect_title( 'Left Frame :' );

$horde_config_frm->gen_sect_subtitle( 'IMP menu body attributes - these attributes effect all of the actions that are displayed within the left pane, and top pane . i.e. ( menu, mailbox selector, etc. )' );
$horde_config_frm->gen_attr_value_title();

$horde_config_frm->gen_doc_config(
   'impmenu',
   $default->sidebar
   );

$horde_config_frm->gen_submit_reset();

?>

</table>
</form>
</body>
</html>
