[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare - Preferences * 4 * http://www.egroupware.org * 5 * -------------------------------------------- * 6 * This program is free software; you can redistribute it and/or modify it * 7 * under the terms of the GNU General Public License as published by the * 8 * Free Software Foundation; either version 2 of the License, or (at your * 9 * option) any later version. * 10 \**************************************************************************/ 11 12 /* $Id: hook_settings.inc.php 21313 2006-04-09 17:58:38Z lkneschke $ */ 13 14 $this->bofelamimail =& CreateObject('felamimail.bofelamimail',$GLOBALS['egw']->translation->charset()); 15 $this->bofelamimail->openConnection('',OP_HALFOPEN); 16 $folderObjects = $this->bofelamimail->getFolderObjects(); 17 $folderList = array(); 18 foreach($folderObjects as $folderName => $folderInfo) 19 { 20 #_debug_array($folderData); 21 #$folderParts = explode($folderInfo->delimiter,$folderName); 22 #if(count($folderParts) > 1) 23 #{ 24 #} 25 $folderList[$folderName] = $folderName; 26 } 27 28 $this->bofelamimail->closeConnection(); 29 30 $felamimailConfig = ExecMethod('emailadmin.bo.getUserProfile'); 31 32 $refreshTime = array( 33 '0' => lang('disabled'), 34 '1' => '1', 35 '2' => '2', 36 '3' => '3', 37 '4' => '4', 38 '5' => '5', 39 '6' => '6', 40 '7' => '7', 41 '8' => '8', 42 '9' => '9', 43 '10' => '10', 44 '15' => '15', 45 '20' => '20', 46 '30' => '30' 47 ); 48 49 $sortOrder = array( 50 '0' => lang('date(newest first)'), 51 '1' => lang('date(oldest first)'), 52 '3' => lang('from(A->Z)'), 53 '2' => lang('from(Z->A)'), 54 '5' => lang('subject(A->Z)'), 55 '4' => lang('subject(Z->A)'), 56 '7' => lang('size(0->...)'), 57 '6' => lang('size(...->0)') 58 ); 59 60 $selectOptions = array( 61 '0' => lang('no'), 62 '1' => lang('yes'), 63 '2' => lang('yes') . ' - ' . lang('small view') 64 ); 65 66 $newWindowOptions = array( 67 '1' => lang('only one window'), 68 '2' => lang('allways a new window'), 69 ); 70 71 $deleteOptions = array( 72 'move_to_trash' => lang('move to trash'), 73 'mark_as_deleted' => lang('mark as deleted'), 74 'remove_immediately' => lang('remove immediately') 75 ); 76 77 $htmlOptions = array( 78 'never_display' => lang('never display html emails'), 79 'only_if_no_text' => lang('display only when no plain text is available'), 80 'always_display' => lang('always show html emails') 81 ); 82 83 $trashOptions = array_merge( 84 array( 85 'none' => lang("Don't use Trash") 86 ), 87 $folderList 88 ); 89 90 $sentOptions = array_merge( 91 array( 92 'none' => lang("Don't use Sent") 93 ), 94 $folderList 95 ); 96 97 /* Settings array for this app */ 98 $GLOBALS['settings'] = array( 99 'refreshTime' => array( 100 'type' => 'select', 101 'label' => 'Refresh time in minutes', 102 'name' => 'refreshTime', 103 'values' => $refreshTime, 104 'xmlrpc' => True, 105 'admin' => False 106 ), 107 'email_sig' => array( 108 'type' => 'notify', 109 'label' => 'email signature', 110 'name' => 'email_sig', 111 'rows' => 3, 112 'cols' => 50, 113 'xmlrpc' => True, 114 'admin' => False, 115 'help' => ' ', // this is to get the substitution help-texts 116 ), 117 'sortOrder' => array( 118 'type' => 'select', 119 'label' => 'Default sorting order', 120 'name' => 'sortOrder', 121 'values' => $sortOrder, 122 'xmlrpc' => True, 123 'admin' => False 124 ), 125 'mainscreen_showmail' => array( 126 'type' => 'select', 127 'label' => 'show new messages on main screen', 128 'name' => 'mainscreen_showmail', 129 'values' => $selectOptions, 130 'xmlrpc' => True, 131 'admin' => False 132 ), 133 'message_newwindow' => array( 134 'type' => 'select', 135 'label' => 'display messages in multiple windows', 136 'name' => 'message_newwindow', 137 'values' => $newWindowOptions, 138 'xmlrpc' => True, 139 'admin' => False 140 ), 141 'deleteOptions' => array( 142 'type' => 'select', 143 'label' => 'when deleting messages', 144 'name' => 'deleteOptions', 145 'values' => $deleteOptions, 146 'xmlrpc' => True, 147 'admin' => False 148 ), 149 'htmlOptions' => array( 150 'type' => 'select', 151 'label' => 'display of html emails', 152 'name' => 'htmlOptions', 153 'values' => $htmlOptions, 154 'xmlrpc' => True, 155 'admin' => False 156 ), 157 'trashFolder' => array( 158 'type' => 'select', 159 'label' => 'trash folder', 160 'name' => 'trashFolder', 161 'values' => $trashOptions, 162 'xmlrpc' => True, 163 'admin' => False 164 ), 165 'sentFolder' => array( 166 'type' => 'select', 167 'label' => 'sent folder', 168 'name' => 'sentFolder', 169 'values' => $sentOptions, 170 'xmlrpc' => True, 171 'admin' => False 172 ) 173 ); 174 175 if($felamimailConfig['userDefinedAccounts'] == 'yes') 176 { 177 $selectOptions = array( 178 'no' => lang('no'), 179 'yes' => lang('yes') 180 ); 181 $GLOBALS['settings']['use_custom_settings'] = array( 182 'type' => 'select', 183 'label' => 'use custom settings', 184 'name' => 'use_custom_settings', 185 'values' => $selectOptions, 186 'xmlrpc' => True, 187 'admin' => False 188 ); 189 190 $GLOBALS['settings']['username'] = array( 191 'type' => 'input', 192 'label' => 'username', 193 'name' => 'username', 194 'size' => 40, 195 'xmlrpc' => True, 196 'admin' => False 197 ); 198 $GLOBALS['settings']['key'] = array( 199 'type' => 'password', 200 'label' => 'password', 201 'name' => 'key', 202 'size' => 40, 203 'xmlrpc' => True, 204 'admin' => False 205 ); 206 $GLOBALS['settings']['emailAddress'] = array( 207 'type' => 'input', 208 'label' => 'EMail Address', 209 'name' => 'emailAddress', 210 'size' => 40, 211 'xmlrpc' => True, 212 'admin' => False 213 ); 214 $GLOBALS['settings']['imapServerAddress'] = array( 215 'type' => 'input', 216 'label' => 'IMAP Server Address', 217 'name' => 'imapServerAddress', 218 'size' => 40, 219 'xmlrpc' => True, 220 'admin' => False 221 ); 222 223 $selectOptions = array( 224 'no' => lang('IMAP'), 225 'yes' => lang('IMAPS Encryption only'), 226 'imaps-encr-auth' => lang('IMAPS Authentication') 227 ); 228 $GLOBALS['settings']['imapServerMode'] = array( 229 'type' => 'select', 230 'label' => 'IMAP Server type', 231 'name' => 'imapServerMode', 232 'values' => $selectOptions, 233 'xmlrpc' => True, 234 'admin' => False 235 ); 236 } 237 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |