| | |
| | | // load config file |
| | | include_once('config/main.inc.php'); |
| | | $CONFIG = is_array($rcmail_config) ? $rcmail_config : array(); |
| | | |
| | | // load host-specific configuration |
| | | rcmail_load_host_config($CONFIG); |
| | | |
| | | $CONFIG['skin_path'] = $CONFIG['skin_path'] ? preg_replace('/\/$/', '', $CONFIG['skin_path']) : 'skins/default'; |
| | | |
| | | // load db conf |
| | |
| | | |
| | | |
| | | register_shutdown_function('rcmail_shutdown'); |
| | | } |
| | | |
| | | |
| | | // load a host-specific config file if configured |
| | | function rcmail_load_host_config(&$config) |
| | | { |
| | | $fname = NULL; |
| | | |
| | | if (is_array($config['include_host_config'])) |
| | | $fname = $config['include_host_config'][$_SERVER['HTTP_HOST']]; |
| | | else if (!empty($config['include_host_config'])) |
| | | $fname = preg_replace('/[^a-z0-9\.\-_]/i', '', $_SERVER['HTTP_HOST']) . '.inc.php'; |
| | | |
| | | if ($fname && is_file('config/'.$fname)) |
| | | { |
| | | include('config/'.$fname); |
| | | $config = array_merge($config, $rcmail_config); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | // check the given string and returns language properties |
| | | function rcube_language_prop($lang, $prop='lang') |
| | | { |
| | | global $INSTLL_PATH; |
| | | global $INSTALL_PATH; |
| | | static $rcube_languages, $rcube_language_aliases, $rcube_charsets; |
| | | |
| | | if (empty($rcube_languages)) |
| | | @include($INSTLL_PATH.'program/localization/index.inc'); |
| | | @include($INSTALL_PATH.'program/localization/index.inc'); |
| | | |
| | | // check if we have an alias for that language |
| | | if (!isset($rcube_languages[$lang]) && isset($rcube_language_aliases[$lang])) |
| | |
| | | $OUTPUT->set_charset($CONFIG['charset']); |
| | | |
| | | // add some basic label to client |
| | | rcube_add_label('loading'); |
| | | rcube_add_label('loading','checkingmail'); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | if (!sizeof($sa_languages)) |
| | | { |
| | | @include($INSTLL_PATH.'program/localization/index.inc'); |
| | | @include($INSTALL_PATH.'program/localization/index.inc'); |
| | | |
| | | if ($dh = @opendir($INSTLL_PATH.'program/localization')) |
| | | if ($dh = @opendir($INSTALL_PATH.'program/localization')) |
| | | { |
| | | while (($name = readdir($dh)) !== false) |
| | | { |
| | | if ($name{0}=='.' || !is_dir($INSTLL_PATH.'program/localization/'.$name)) |
| | | if ($name{0}=='.' || !is_dir($INSTALL_PATH.'program/localization/'.$name)) |
| | | continue; |
| | | |
| | | if ($label = $rcube_languages[$name]) |
| | |
| | | 'identityform' => 'rcube_identity_form', |
| | | 'foldersubscription' => 'rcube_subscription_form', |
| | | 'createfolder' => 'rcube_create_folder_form', |
| | | 'renamefolder' => 'rcube_rename_folder_form', |
| | | 'composebody' => 'rcmail_compose_body' |
| | | ); |
| | | |
| | |
| | | $attrib['id'], |
| | | $attrib['type'], |
| | | $attrib['imageact'] ? $skin_path.$attrib['imageact'] : $attrib['classact'], |
| | | $attirb['imagesel'] ? $skin_path.$attirb['imagesel'] : $attrib['classsel'], |
| | | $attrib['imagesel'] ? $skin_path.$attrib['imagesel'] : $attrib['classsel'], |
| | | $attrib['imageover'] ? $skin_path.$attrib['imageover'] : '')); |
| | | |
| | | // make valid href to task buttons |
| | |
| | | $attrib['onmouseout'] = sprintf("return %s.button_out('%s','%s')", $JS_OBJECT_NAME, $command, $attrib['id']); |
| | | } |
| | | |
| | | if ($command && $attrib['imagesel']) |
| | | { |
| | | $attrib['onmousedown'] = sprintf("return %s.button_sel('%s','%s')", $JS_OBJECT_NAME, $command, $attrib['id']); |
| | | $attrib['onmouseup'] = sprintf("return %s.button_out('%s','%s')", $JS_OBJECT_NAME, $command, $attrib['id']); |
| | | } |
| | | |
| | | $out = ''; |
| | | |
| | |
| | | if ($attrib['label']) |
| | | $btn_content .= ' '.$attrib['label']; |
| | | |
| | | $link_attrib = array('href', 'onclick', 'onmouseover', 'onmouseout', 'title'); |
| | | $link_attrib = array('href', 'onclick', 'onmouseover', 'onmouseout', 'onmousedown', 'onmouseup', 'title'); |
| | | } |
| | | else if ($attrib['type']=='link') |
| | | { |