[873] | 1 | <?php |
---|
[1037] | 2 | if(!isset($GLOBALS['phpgw_info'])){ |
---|
[1036] | 3 | $GLOBALS['phpgw_info']['flags'] = array( |
---|
| 4 | 'currentapp' => 'expressoMail1_2', |
---|
| 5 | 'nonavbar' => true, |
---|
| 6 | 'noheader' => true |
---|
| 7 | ); |
---|
[1037] | 8 | } |
---|
[1040] | 9 | require_once '../header.inc.php'; |
---|
[1036] | 10 | |
---|
[873] | 11 | /**************************************************************************\ |
---|
| 12 | * eGroupWare - ExpressoMail Preferences * |
---|
| 13 | * http://www.expressolivre.org * |
---|
| 14 | * Modified by Alexandre Felipe Muller de Souza <amuller@celepar.pr.gov.br> * |
---|
| 15 | * -------------------------------------------- * |
---|
| 16 | * This program is free software; you can redistribute it and/or modify it * |
---|
| 17 | * under the terms of the GNU General Public License as published by the * |
---|
| 18 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
| 19 | * option) any later version. * |
---|
| 20 | \**************************************************************************/ |
---|
[5134] | 21 | //include_once("fckeditor.php"); |
---|
| 22 | //include_once("class.functions.inc.php"); |
---|
[4885] | 23 | $type = isset($_GET['type']) ? $_GET['type']:$GLOBALS['type']; // FIX ME |
---|
[4828] | 24 | |
---|
[1035] | 25 | //if ($type == 'user' || $type == ''){ |
---|
[5134] | 26 | global $prefs; |
---|
| 27 | // create_select_box('Signature Type','',$default,'','','','onchange="javascript:changeType(this.value);"'); |
---|
[1405] | 28 | create_script('function exibir_ocultar() |
---|
[1035] | 29 | { |
---|
| 30 | var type = ("'.$type.'" == "") ? "user" : "'.$type.'"; |
---|
[5134] | 31 | var use_signature_digital_cripto = null; |
---|
| 32 | |
---|
| 33 | if (document.all) |
---|
| 34 | { |
---|
| 35 | // is_ie |
---|
| 36 | use_signature_digital_cripto = document.getElementsByName(type+"[use_signature_digital_cripto]")[1]; |
---|
| 37 | } |
---|
| 38 | else |
---|
| 39 | { |
---|
| 40 | // not_ie |
---|
| 41 | use_signature_digital_cripto = document.getElementsByName(type+"[use_signature_digital_cripto]")[0]; |
---|
| 42 | } |
---|
| 43 | |
---|
[1035] | 44 | var default_signature_digital_cripto = "'.$GLOBALS['phpgw_info']['default']['preferences']['expressoMail']['use_signature_digital_cripto'].'"; |
---|
| 45 | |
---|
| 46 | if (use_signature_digital_cripto) |
---|
| 47 | { |
---|
| 48 | var element_signature_digital = document.getElementById(type+"[use_signature_digital]"); |
---|
| 49 | var element_signature_cripto = document.getElementById(type+"[use_signature_cripto]"); |
---|
| 50 | |
---|
| 51 | switch (use_signature_digital_cripto[use_signature_digital_cripto.selectedIndex].value){ |
---|
| 52 | |
---|
| 53 | case "1": |
---|
| 54 | element_signature_digital.style.display=""; |
---|
| 55 | element_signature_cripto.style.display=""; |
---|
| 56 | break; |
---|
| 57 | case "0": |
---|
| 58 | element_signature_digital.style.display="none"; |
---|
| 59 | element_signature_cripto.style.display="none"; |
---|
| 60 | break; |
---|
| 61 | case "": |
---|
| 62 | if (default_signature_digital_cripto){ |
---|
| 63 | element_signature_digital.style.display=""; |
---|
| 64 | element_signature_cripto.style.display=""; |
---|
| 65 | } |
---|
| 66 | else |
---|
| 67 | { |
---|
| 68 | element_signature_digital.style.display="none"; |
---|
| 69 | element_signature_cripto.style.display="none"; |
---|
| 70 | } |
---|
| 71 | |
---|
| 72 | } |
---|
| 73 | |
---|
| 74 | } |
---|
| 75 | |
---|
[4828] | 76 | } |
---|
| 77 | function validateSignature() |
---|
| 78 | { |
---|
| 79 | var sigs_len = parseInt( document.getElementById("counter").value ); |
---|
| 80 | |
---|
| 81 | var signatures = {}, types = {}, noSig = true; |
---|
| 82 | |
---|
| 83 | var default_signature = "", errors = false; |
---|
| 84 | |
---|
| 85 | for( var i = 0; i < sigs_len; i++ ) |
---|
| 86 | { |
---|
| 87 | if( !document.getElementById( "_signature" + i ) ) continue; |
---|
| 88 | |
---|
| 89 | var key = document.getElementById( "title_signature" + i ).value; |
---|
| 90 | var edit = !!document.getElementById( "edit_signature" + i ).checked; |
---|
| 91 | |
---|
[5083] | 92 | var value = edit ? CKEDITOR.instances["user_signature" + i ].getData() : |
---|
[4828] | 93 | document.getElementById( "user_signature" + i ).value; |
---|
| 94 | |
---|
| 95 | if( !value ) |
---|
| 96 | continue; |
---|
| 97 | |
---|
| 98 | if( !key ) |
---|
| 99 | { |
---|
| 100 | alert( "Titulo da assinatura nao pode ser em branco." ); |
---|
| 101 | return( false ); |
---|
| 102 | } |
---|
| 103 | |
---|
| 104 | var openTags = value.match(/<[a-z][^&>]*>/g); |
---|
| 105 | var closedTags = value.match(/<[/][^&>]*>/g); |
---|
| 106 | var oclosedTags = value.match(/[a-z]*[^&<>]* [/]>/g); |
---|
| 107 | |
---|
| 108 | if( ( openTags || [] ).length !== (( closedTags || [] ).length + ( oclosedTags || [] ).length )) |
---|
| 109 | { |
---|
| 110 | errors = errors || []; |
---|
| 111 | errors.push( key ); |
---|
| 112 | } |
---|
| 113 | |
---|
| 114 | if( errors ) |
---|
| 115 | continue; |
---|
| 116 | |
---|
| 117 | if( document.getElementById( "default_signature" + i ).checked ) |
---|
| 118 | default_signature = key; |
---|
| 119 | |
---|
| 120 | signatures[key] = value; |
---|
| 121 | |
---|
| 122 | if( edit ) |
---|
| 123 | types[key] = edit; |
---|
| 124 | |
---|
| 125 | if( noSig ) |
---|
| 126 | noSig = false; |
---|
| 127 | } |
---|
| 128 | |
---|
| 129 | if( errors ){ |
---|
| 130 | |
---|
| 131 | alert( "Há erros de html na(s) assinatura(s) \'" + errors.join("\',\'") + "\'.\\nRevise a informação inserida (somente no modo Texto Simples ou visulização do Código-Fonte, no modo Texto Rico).\\nPossivelmente você copiou e colou sua assinatura de outro software. Para evitar erros, recomendamos utilizar apenas o editor Texto Rico do Expresso." ); |
---|
| 132 | return( false ); |
---|
| 133 | } |
---|
| 134 | |
---|
| 135 | if( !default_signature ){ |
---|
| 136 | |
---|
| 137 | if( !noSig ) |
---|
| 138 | { |
---|
| 139 | alert( "Favor selecionar uma assinatura padrao." ); |
---|
| 140 | return( false ); |
---|
| 141 | } |
---|
| 142 | |
---|
| 143 | document.getElementById( "signature_default" ).value = ""; |
---|
| 144 | document.getElementById( "signature" ).value = ""; |
---|
| 145 | } |
---|
| 146 | else |
---|
| 147 | { |
---|
| 148 | document.getElementById( "signature_default" ).value = default_signature; |
---|
| 149 | document.getElementById( "signature" ).value = types[key] ? signatures[default_signature] : |
---|
| 150 | signatures[default_signature].replace( /\\n/g, "<br>" ); |
---|
| 151 | } |
---|
| 152 | |
---|
| 153 | document.getElementById( "signatures" ).value = toJSON( signatures ); |
---|
| 154 | document.getElementById( "signature_types" ).value = toJSON( types ); |
---|
| 155 | |
---|
| 156 | return( true ); |
---|
| 157 | } |
---|
| 158 | function fromJSON( value ) |
---|
| 159 | { |
---|
| 160 | return (new Function( "return " + decode64( value )))(); |
---|
| 161 | } |
---|
| 162 | |
---|
| 163 | function toJSON( value ) |
---|
| 164 | { |
---|
| 165 | var json = []; |
---|
| 166 | |
---|
| 167 | for( var key in value ) |
---|
| 168 | json.push( \'"\' + key + \'":"\' + escape( value[key] ) + \'"\' ); |
---|
| 169 | |
---|
| 170 | return encode64( "{" + json.join( "," ) + "}" ); |
---|
| 171 | } |
---|
| 172 | |
---|
| 173 | // This code was written by Tyler Akins and has been placed in the |
---|
| 174 | // public domain. It would be nice if you left this header intact. |
---|
| 175 | // Base64 code from Tyler Akins -- http://rumkin.com |
---|
| 176 | |
---|
| 177 | var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; |
---|
| 178 | |
---|
| 179 | function encode64(input) { |
---|
| 180 | var output = new StringMaker(); |
---|
| 181 | var chr1, chr2, chr3; |
---|
| 182 | var enc1, enc2, enc3, enc4; |
---|
| 183 | var i = 0; |
---|
| 184 | |
---|
| 185 | while (i < input.length) { |
---|
| 186 | chr1 = input.charCodeAt(i++); |
---|
| 187 | chr2 = input.charCodeAt(i++); |
---|
| 188 | chr3 = input.charCodeAt(i++); |
---|
| 189 | |
---|
| 190 | enc1 = chr1 >> 2; |
---|
| 191 | enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); |
---|
| 192 | enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); |
---|
| 193 | enc4 = chr3 & 63; |
---|
| 194 | |
---|
| 195 | if (isNaN(chr2)) { |
---|
| 196 | enc3 = enc4 = 64; |
---|
| 197 | } else if (isNaN(chr3)) { |
---|
| 198 | enc4 = 64; |
---|
| 199 | } |
---|
| 200 | |
---|
| 201 | output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4)); |
---|
| 202 | } |
---|
| 203 | |
---|
| 204 | return output.toString(); |
---|
| 205 | } |
---|
| 206 | var ua = navigator.userAgent.toLowerCase(); |
---|
| 207 | if (ua.indexOf(" chrome/") >= 0 || ua.indexOf(" firefox/") >= 0 || ua.indexOf(" gecko/") >= 0) { |
---|
| 208 | var StringMaker = function () { |
---|
| 209 | this.str = ""; |
---|
| 210 | this.length = 0; |
---|
| 211 | this.append = function (s) { |
---|
| 212 | this.str += s; |
---|
| 213 | this.length += s.length; |
---|
| 214 | } |
---|
| 215 | this.prepend = function (s) { |
---|
| 216 | this.str = s + this.str; |
---|
| 217 | this.length += s.length; |
---|
| 218 | } |
---|
| 219 | this.toString = function () { |
---|
| 220 | return this.str; |
---|
| 221 | } |
---|
| 222 | } |
---|
| 223 | } else { |
---|
| 224 | var StringMaker = function () { |
---|
| 225 | this.parts = []; |
---|
| 226 | this.length = 0; |
---|
| 227 | this.append = function (s) { |
---|
| 228 | this.parts.push(s); |
---|
| 229 | this.length += s.length; |
---|
| 230 | } |
---|
| 231 | this.prepend = function (s) { |
---|
| 232 | this.parts.unshift(s); |
---|
| 233 | this.length += s.length; |
---|
| 234 | } |
---|
| 235 | this.toString = function () { |
---|
| 236 | return this.parts.join(""); |
---|
| 237 | } |
---|
| 238 | } |
---|
| 239 | } |
---|
| 240 | function decode64(input) { |
---|
| 241 | var output = new StringMaker(); |
---|
| 242 | var chr1, chr2, chr3; |
---|
| 243 | var enc1, enc2, enc3, enc4; |
---|
| 244 | var i = 0; |
---|
| 245 | |
---|
| 246 | // remove all characters that are not A-Z, a-z, 0-9, +, /, or = |
---|
| 247 | input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); |
---|
| 248 | |
---|
| 249 | while (i < input.length) { |
---|
| 250 | enc1 = keyStr.indexOf(input.charAt(i++)); |
---|
| 251 | enc2 = keyStr.indexOf(input.charAt(i++)); |
---|
| 252 | enc3 = keyStr.indexOf(input.charAt(i++)); |
---|
| 253 | enc4 = keyStr.indexOf(input.charAt(i++)); |
---|
| 254 | |
---|
| 255 | chr1 = (enc1 << 2) | (enc2 >> 4); |
---|
| 256 | chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); |
---|
| 257 | chr3 = ((enc3 & 3) << 6) | enc4; |
---|
| 258 | |
---|
| 259 | output.append(String.fromCharCode(chr1)); |
---|
| 260 | |
---|
| 261 | if (enc3 != 64) { |
---|
| 262 | output.append(String.fromCharCode(chr2)); |
---|
| 263 | } |
---|
| 264 | if (enc4 != 64) { |
---|
| 265 | output.append(String.fromCharCode(chr3)); |
---|
| 266 | } |
---|
| 267 | } |
---|
| 268 | |
---|
| 269 | return output.toString(); |
---|
| 270 | } |
---|
| 271 | function loadSignature() |
---|
| 272 | { |
---|
| 273 | var types = fromJSON( document.getElementById( "signature_types" ).value ); |
---|
| 274 | var signatures = fromJSON( document.getElementById( "signatures" ).value ); |
---|
| 275 | var old_signature = document.getElementById( "signature" ).value; |
---|
| 276 | var def = document.getElementById( "signature_default" ).value; |
---|
| 277 | |
---|
| 278 | var counter = 0, ids = [], def_signature = "", noSig = true; |
---|
| 279 | |
---|
| 280 | for( key in signatures ) |
---|
| 281 | { |
---|
| 282 | addSignature( !types || !types[key] ); |
---|
| 283 | |
---|
| 284 | var value = unescape( signatures[key] ); |
---|
| 285 | |
---|
| 286 | document.getElementById( "title_signature" + counter ).value = key; |
---|
| 287 | document.getElementById( "user_signature" + counter ).value = value; |
---|
| 288 | |
---|
| 289 | if( def === key ) |
---|
| 290 | def_signature = counter; |
---|
| 291 | |
---|
| 292 | if( noSig ) noSig = false; |
---|
| 293 | |
---|
| 294 | counter++; |
---|
| 295 | } |
---|
| 296 | |
---|
| 297 | if( def_signature !== "" ) |
---|
| 298 | document.getElementById( "default_signature" + def_signature ).checked = true; |
---|
| 299 | else if( noSig && old_signature ) |
---|
| 300 | { |
---|
| 301 | addSignature( document.getElementById("type_signature").value !== "html" ); |
---|
| 302 | document.getElementById( "user_signature" + counter ).value = old_signature; |
---|
| 303 | } |
---|
[5134] | 304 | } |
---|
| 305 | '); |
---|
[1035] | 306 | //} |
---|
[5134] | 307 | $default = false; |
---|
| 308 | create_check_box('Do you want to show common name instead of UID?','uid2cn',$default, |
---|
| 309 | 'Do you want to show common name instead of UID?'); |
---|
| 310 | create_check_box('Do you want to automatically display the message header?','show_head_msg_full',$default,''); |
---|
[5808] | 311 | create_check_box('Do you want to display date in format numerical?','show_date_numerical',$default,''); |
---|
[873] | 312 | $default = array( |
---|
| 313 | '25' => '25', |
---|
| 314 | '50' => '50', |
---|
| 315 | '75' => '75', |
---|
| 316 | '100' => '100' |
---|
| 317 | ); |
---|
| 318 | |
---|
[5134] | 319 | create_select_box('What is the maximum number of messages per page?','max_email_per_page',$default,'This is the number of messages shown in your mailbox per page'); |
---|
| 320 | |
---|
[4231] | 321 | create_check_box('View the user name in the header of the messages printed?', 'show_name_print_messages', 'Displays the user name in the header print email'); |
---|
| 322 | |
---|
[5134] | 323 | //$default = 0; |
---|
| 324 | create_check_box('Preview message text within subject column','preview_msg_subject','this exhibits a sample of message within the message subject column'); |
---|
| 325 | |
---|
| 326 | //$default = 0; |
---|
| 327 | create_check_box('Preview message text within a tool-tip box','preview_msg_tip','this exhibits a sample of message within a tool-tip box'); |
---|
| 328 | |
---|
| 329 | create_check_box('View extended information about users','extended_info','This exhibits employeenumber and ou from LDAP in searchs'); |
---|
[1285] | 330 | create_check_box('Save deleted messages in trash folder?','save_deleted_msg','When delete message, send it automatically to trash folder'); |
---|
[873] | 331 | $default = array( |
---|
| 332 | '1' => lang('1 day'), |
---|
| 333 | '2' => lang('2 days'), |
---|
| 334 | '3' => lang('3 days'), |
---|
| 335 | '4' => lang('4 days'), |
---|
| 336 | '5' => lang('5 days') |
---|
| 337 | ); |
---|
| 338 | |
---|
[5134] | 339 | $arquived_messages = array(true => lang("Copy"), false => lang("Move")); |
---|
| 340 | |
---|
[1285] | 341 | create_select_box('Delete trash messages after how many days?','delete_trash_messages_after_n_days',$default,'Delete automatically the messages in trash folder in how many days'); |
---|
| 342 | create_check_box('Would you like to use local messages?','use_local_messages','Enabling this options you will be able to store messages in your local computer'); |
---|
[5134] | 343 | create_select_box('Desired action to archive messages to local folders','keep_archived_messages',$arquived_messages,'After store email in your local computer delete it from server'); |
---|
| 344 | create_check_box('Automaticaly create Default local folders?','auto_create_local','Enable this option if you want to automaticaly create the Inbox, Draft, Trash and Sent folders'); |
---|
[1285] | 345 | create_check_box('Show previous message, after delete actual message?','delete_and_show_previous_message','Enable this option if you want to read the next message everytime you delete a message'); |
---|
| 346 | create_check_box('Do you wanna receive an alert for new messages?','alert_new_msg','Everytime you receive new messages you will be informed'); |
---|
| 347 | create_check_box('Show default view on main screen?','mainscreen_showmail','Show unread messages in your home page'); |
---|
| 348 | create_check_box('Do you want to use remove attachments function?','remove_attachments_function','It allow you to remove attachments from messages'); |
---|
[1291] | 349 | create_check_box('Do you want to use important flag in email editor?','use_important_flag','It allow you to send emails with important flag, but you can receive unwanted messages with important flag'); |
---|
[5134] | 350 | create_check_box('Do you want to use SpellChecker in email editor?','use_SpellChecker','It allow you to check the spelling of your emails'); |
---|
| 351 | //Use user folders from email |
---|
[4828] | 352 | |
---|
[5134] | 353 | require_once('class.imap_functions.inc.php'); |
---|
| 354 | $boemailadmin = CreateObject('emailadmin.bo'); |
---|
| 355 | $emailadmin_profile = $boemailadmin->getProfileList(); |
---|
| 356 | $_SESSION['phpgw_info']['expressomail']['email_server'] = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']); |
---|
| 357 | $_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user']; |
---|
| 358 | $e_server = $_SESSION['phpgw_info']['expressomail']['email_server']; |
---|
| 359 | $imap = CreateObject('expressoMail1_2.imap_functions'); |
---|
| 360 | |
---|
[1285] | 361 | if ($type != "" && $type != "user"){ |
---|
[5134] | 362 | |
---|
[4828] | 363 | $trash = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']; |
---|
| 364 | $drafts = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder']; |
---|
| 365 | $spam = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']; |
---|
| 366 | $sent = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']; |
---|
[4726] | 367 | $delimiter = $_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter']; |
---|
[1283] | 368 | $default = Array( |
---|
| 369 | 'INBOX' => lang('INBOX'), |
---|
[5134] | 370 | 'INBOX' . $imap->imap_delimiter . $drafts => lang($drafts), |
---|
| 371 | 'INBOX' . $imap->imap_delimiter . $spam => lang($spam), |
---|
| 372 | 'INBOX' . $imap->imap_delimiter . $trash => lang($trash), |
---|
| 373 | 'INBOX' . $imap->imap_delimiter . $sent => lang($sent) |
---|
[1283] | 374 | ); |
---|
| 375 | } |
---|
[1285] | 376 | else |
---|
| 377 | { |
---|
[1378] | 378 | $save_in_folder_selected = $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']; |
---|
[1281] | 379 | |
---|
[1378] | 380 | // Load Special Folders (Sent, Trash, Draft, Spam) from EmailAdmin (if exists, else get_lang) |
---|
| 381 | $specialFolders = array ("Trash" => lang("Trash"), "Drafts" => lang("Drafts"), "Spam" => lang("Spam"), "Sent" => lang("Sent")); |
---|
| 382 | |
---|
| 383 | foreach ($specialFolders as $key => $value){ |
---|
| 384 | if($e_server['imapDefault'.$key.'Folder']) |
---|
| 385 | $specialFolders[$key] = $e_server['imapDefault'.$key.'Folder']; |
---|
| 386 | } |
---|
| 387 | unset($default); |
---|
| 388 | $default[-1] = lang('Select on send'); |
---|
[1373] | 389 | |
---|
[1375] | 390 | foreach($imap -> get_folders_list(array('noSharedFolders' => true)) as $id => $folder){ |
---|
| 391 | if(!is_numeric($id)) |
---|
[1283] | 392 | continue; |
---|
| 393 | else{ |
---|
| 394 | // Translate INBOX (root folder) |
---|
| 395 | if (strtolower($folder['folder_name']) == "inbox") |
---|
| 396 | $folder['folder_name'] = lang("Inbox"); |
---|
| 397 | // Translate Special Folders |
---|
| 398 | elseif (($keyFolder = array_search($folder['folder_name'], $specialFolders)) !== false) |
---|
| 399 | $folder['folder_name'] = lang($keyFolder); |
---|
[1289] | 400 | // Identation for subfolders |
---|
| 401 | $folder_id = explode($e_server['imapDelimiter'],$folder['folder_id']); |
---|
| 402 | $level = count($folder_id); |
---|
| 403 | $ident = ''; |
---|
| 404 | for($i = 2; $level > 2 && $i < $level;$i++) |
---|
| 405 | $ident .= ' - '; |
---|
[1373] | 406 | |
---|
[1289] | 407 | $default[$folder['folder_id']] = $ident.$folder['folder_name']; |
---|
[1373] | 408 | } |
---|
[1281] | 409 | } |
---|
[1378] | 410 | |
---|
[1281] | 411 | } |
---|
[1285] | 412 | create_select_box('Save sent messages in folder','save_in_folder',$default,'Save automatically sent messages in selected folder'); |
---|
[5134] | 413 | create_check_box('Show TO: in place of FROM: only in Automatic SEND folder','from_to_sent','Show TO: in place of FROM: only in Automatic SEND folder'); |
---|
| 414 | |
---|
| 415 | |
---|
[1285] | 416 | create_check_box('Hide menu folders?','hide_folders','You can use it if your screen does not have good resolution'); |
---|
[873] | 417 | |
---|
[5134] | 418 | |
---|
[4885] | 419 | $default = array( |
---|
[5134] | 420 | '50' => '50', |
---|
| 421 | '100' => '100', |
---|
| 422 | '150' => '150', |
---|
| 423 | '200' => '200', |
---|
| 424 | '300' => '300', |
---|
| 425 | '400' => '400', |
---|
| 426 | '65536' => lang('unlimited') |
---|
| 427 | ); |
---|
| 428 | |
---|
| 429 | create_select_box('What is the maximum number of results in an e-mail search?','search_result_number',$default,''); |
---|
| 430 | |
---|
| 431 | $default = array( |
---|
[4885] | 432 | '1' => lang('unlimited'), |
---|
| 433 | '2' => '2', |
---|
| 434 | '3' => '3', |
---|
| 435 | '4' => '4', |
---|
| 436 | '5' => '5' |
---|
| 437 | ); |
---|
| 438 | |
---|
| 439 | create_select_box('What is the minimum number of characters in searching contacts?','search_characters_number',$default,'what is the minimum number of characters in searching contacts'); |
---|
| 440 | |
---|
[5134] | 441 | $default = array( |
---|
[4828] | 442 | '20' => lang('normal'), |
---|
| 443 | '30' => lang('medium'), |
---|
| 444 | '40' => lang('big') |
---|
[5134] | 445 | ); |
---|
[1608] | 446 | |
---|
[5134] | 447 | |
---|
[1035] | 448 | create_select_box('What is the height of the lines in the list of messages?','line_height',$default,''); |
---|
[5134] | 449 | create_check_box('Increases th maximum size of show messages?','max_msg_size','Increases the maximum size of show emails from 100kb to 1mb'); |
---|
[1285] | 450 | create_check_box('Use dynamic contacts?','use_dynamic_contacts','Store your\'s most used contacts'); |
---|
[5134] | 451 | create_check_box('Use shortcuts?','use_shortcuts','n key (Open new message)<br>ESC key (Close tab)<br>i key (print)<br>e key (forward)<br>r key (reply)<br>DELETE key (delete the current message)<br>Ctrl + up (go to previous message)<br>Ctrl + down (go to next message)<br>Shift + up or down (select multiple messages)<br>F9 key (search at catalog)<br>'); |
---|
[1285] | 452 | create_check_box('Auto save draft','auto_save_draft','When you are away from computer it saves automatically the message you are writing'); |
---|
[5134] | 453 | create_check_box('Send messages with return recipient option by default','return_recipient_deafault','With this option every new email will get the return recipient option marked'); |
---|
| 454 | |
---|
| 455 | unset($default); |
---|
| 456 | $functions = new functions(); |
---|
| 457 | $zones = $functions->getTimezones(); |
---|
| 458 | $default = array(sprintf("%s", array_search('America/Sao_Paulo', $zones)) => 'America/Sao_Paulo'); |
---|
| 459 | create_select_box('What is your timezone?', 'timezone', $zones, 'The Timezone you\'re in.', $default); |
---|
| 460 | |
---|
[4885] | 461 | $default = array( |
---|
[5134] | 462 | '1' => lang('contacts'), |
---|
| 463 | '2' => lang('email') |
---|
| 464 | ); |
---|
| 465 | |
---|
| 466 | create_select_box('Where should the quick search be performed by default?','quick_search_default',$default,'It is where the keyword should be searched when the user executes a quick search.'); |
---|
| 467 | |
---|
| 468 | $default = array( |
---|
[1005] | 469 | '65536' => lang('unlimited'), |
---|
| 470 | '640' => '640', |
---|
| 471 | '768' => '768', |
---|
| 472 | '800' => '800', |
---|
| 473 | '1024' => '1024', |
---|
| 474 | '1080' => '1080' |
---|
| 475 | ); |
---|
[873] | 476 | |
---|
[1285] | 477 | create_select_box('What is the maximum size of embedded images?','image_size',$default,'When user send an email with image in body message, it changes the size'); |
---|
[5158] | 478 | create_check_box('Use plain text editor as standard ?','plain_text_editor',''); |
---|
[1005] | 479 | |
---|
[5158] | 480 | |
---|
[5075] | 481 | $default = array( |
---|
| 482 | 'global' => lang("Global catalog"), |
---|
| 483 | 'personal' => lang("Personal catalog"), |
---|
| 484 | 'all' => lang("All catalogs") |
---|
[5134] | 485 | ); |
---|
[5075] | 486 | |
---|
[5134] | 487 | create_select_box('The dynamic search will use the catalog','catalog_search',$default,'Seleciona o catálogo que será usado para fazer a busca'); |
---|
| 488 | $default = false; |
---|
| 489 | create_check_box('Display default fields on the quick search screen?','default_fields_quick_search', $default, 'Mostrar o nome, email e telefone do contato por padrão'); |
---|
[5075] | 490 | |
---|
| 491 | |
---|
[1035] | 492 | if($GLOBALS['phpgw_info']['server']['use_assinar_criptografar']) |
---|
| 493 | { |
---|
| 494 | create_check_box('Enable digitally sign/cipher the message?','use_signature_digital_cripto','','',True,'onchange="javascript:exibir_ocultar();"'); |
---|
| 495 | if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto']) |
---|
| 496 | { |
---|
| 497 | create_check_box('Always sign message digitally?','use_signature_digital',''); |
---|
| 498 | create_check_box('Always cipher message digitally?','use_signature_cripto',''); |
---|
| 499 | } |
---|
| 500 | else |
---|
| 501 | { |
---|
| 502 | create_check_box('Always sign message digitally?','use_signature_digital','','',True,'',False); |
---|
| 503 | create_check_box('Always cipher message digitally?','use_signature_cripto','','',True,'',False); |
---|
| 504 | } |
---|
| 505 | } |
---|
| 506 | |
---|
[873] | 507 | $default = array( |
---|
| 508 | 'text' => lang('simple text'), |
---|
| 509 | 'html' => lang('rich text') |
---|
| 510 | ); |
---|
[5134] | 511 | create_check_box('Auto close the first tab on reaching the maximum number of tabs?','auto_close_first_tab',''); |
---|
[1288] | 512 | create_check_box('Insert signature automatically in new messages?','use_signature',''); |
---|
[873] | 513 | |
---|
[5134] | 514 | $default = array('0' => lang('nested in the same tab of the main message'), '1' => lang('in your own tab, one for each attached message')); |
---|
| 515 | create_select_box('Nested messages are shown','nested_messages_are_shown', $default,'How to show nested messages'); |
---|
[873] | 516 | |
---|
[5134] | 517 | $default = array( |
---|
| 518 | 'Arial' => 'Arial', |
---|
| 519 | 'Verdana' => 'Verdana', |
---|
| 520 | 'Times new roman' => 'Times New Roman', |
---|
| 521 | 'Tahoma' => 'Tahoma', |
---|
| 522 | ); |
---|
| 523 | create_select_box( 'Default font editor' , 'font_family_editor' , $default ); |
---|
[873] | 524 | |
---|
[5134] | 525 | $default = array( |
---|
| 526 | '8pt' => '8', |
---|
| 527 | '9pt' => '9', |
---|
| 528 | '10pt' => '10', |
---|
| 529 | '11pt' => '11', |
---|
| 530 | '12pt' => '12', |
---|
| 531 | '14pt' => '14', |
---|
| 532 | '16pt' => '16', |
---|
| 533 | '18pt' => '18', |
---|
| 534 | '20pt' => '20', |
---|
| 535 | '22pt' => '22', |
---|
| 536 | '24pt' => '24', |
---|
| 537 | '26pt' => '26', |
---|
| 538 | '28pt' => '28', |
---|
| 539 | '36pt' => '36', |
---|
| 540 | '48pt' => '48', |
---|
| 541 | '72pt' => '72', |
---|
| 542 | ); |
---|
| 543 | |
---|
| 544 | create_select_box( 'Default font size editor' , 'font_size_editor' , $default ); |
---|
| 545 | |
---|
| 546 | if ($type == 'user' || $type == ''){ |
---|
[4828] | 547 | $vars = $GLOBALS['phpgw']->preferences->user['expressoMail']; |
---|
[1244] | 548 | |
---|
[5134] | 549 | |
---|
| 550 | create_html_code("signature","<script src='../library/jquery/jquery.js' language='javascript'></script> |
---|
[5083] | 551 | <script src='../library/ckeditor/ckeditor.js' language='javascript'></script> |
---|
| 552 | <script src='../library/ckeditor/adapters/jquery.js' language='javascript'></script> |
---|
[5134] | 553 | |
---|
[4828] | 554 | <input type='hidden' id='counter' value='0'> |
---|
| 555 | <input type='hidden' id='signatures' name='user[signatures]' value='". $vars['signatures']."'> |
---|
| 556 | <input type='hidden' id='signature_default' name='user[signature_default]' value='".$vars['signature_default']."'> |
---|
| 557 | <input type='hidden' id='signature' name='user[signature]' value='","' > |
---|
| 558 | <input type='hidden' id='signature_types' name='user[signature_types]' value='".$vars['signature_types']."'> |
---|
[1873] | 559 | |
---|
[4828] | 560 | <div id='_signature' name='signature' style='display: none;'> |
---|
| 561 | <div id='options_signature'> |
---|
[5083] | 562 | <input id='edit_signature' type='checkbox' name='isEditor' onclick='changeType( this, this.id.replace( /[^0-9]*/gi, \"\" ) );' checked='checked'><label for='isEditor'>Editor de texto</label> | Titulo da assinatura <input type='text' id='title_signature'> | <input type='radio' id='default_signature' name='signature_default'><label>Usar como padrao</label> | <a href='#' onclick='javascript: return removeSignature( this );' id='remove_signature'> Remover</a> |
---|
[4828] | 563 | </div><br/> |
---|
| 564 | <div id='text_signature'> |
---|
[5083] | 565 | <textarea rows='10' cols='65' id='user_signature' class='editor'></textarea></div> |
---|
[4828] | 566 | </div> |
---|
| 567 | |
---|
[4885] | 568 | <script language='javascript'> |
---|
| 569 | |
---|
[4828] | 570 | $(document).ready(function(){ |
---|
[4885] | 571 | |
---|
[4828] | 572 | loadSignature(); |
---|
[4885] | 573 | |
---|
[4828] | 574 | }); |
---|
[4885] | 575 | |
---|
[5083] | 576 | function changeType(obj, target){ |
---|
| 577 | if(obj.checked === true) |
---|
| 578 | $('#user_signature' + target).ckeditor( { toolbar:'signature' }); |
---|
| 579 | else |
---|
| 580 | CKEDITOR.instances['user_signature' + target ].destroy(); |
---|
[4885] | 581 | } |
---|
[1544] | 582 | |
---|
[4828] | 583 | // var counter = 0; |
---|
| 584 | |
---|
| 585 | function addSignature( simple ) |
---|
[1244] | 586 | { |
---|
[4828] | 587 | var sig = document.getElementById('_signature').cloneNode( true ); |
---|
| 588 | var counter = document.getElementById( 'counter' ).value; |
---|
[4885] | 589 | |
---|
[4828] | 590 | sig.innerHTML = sig.innerHTML.replace( /_signature/g, '_signature' + counter ); |
---|
| 591 | |
---|
| 592 | sig.id = '_signature' + counter; |
---|
| 593 | sig.style.display = ''; |
---|
| 594 | |
---|
| 595 | $( '#add_signature' ).before( sig ); |
---|
| 596 | |
---|
| 597 | if( !simple ) |
---|
[5083] | 598 | $('#user_signature' + counter).ckeditor( { toolbar:'signature' }); |
---|
[4828] | 599 | else |
---|
| 600 | document.getElementById('edit_signature' + counter ).checked = ''; |
---|
| 601 | |
---|
| 602 | document.getElementById( 'counter' ).value = ++counter; |
---|
[5134] | 603 | } |
---|
[1244] | 604 | |
---|
[4828] | 605 | function removeSignature( el ) |
---|
| 606 | { |
---|
| 607 | counter = el.id.replace( /[^0-9]*/gi, \"\" ); |
---|
| 608 | |
---|
| 609 | el = document.getElementById( '_signature' + counter ); |
---|
| 610 | el.parentNode.removeChild( el ); |
---|
| 611 | |
---|
| 612 | return( false ); |
---|
[5134] | 613 | } |
---|
[4828] | 614 | </script> |
---|
| 615 | <input id='add_signature' type='button' onclick='addSignature();' value='Adicionar Assinatura'> |
---|
| 616 | "); |
---|
[873] | 617 | } |
---|
| 618 | ?> |
---|