[873] | 1 | <?php |
---|
| 2 | /**************************************************************************\ |
---|
| 3 | * eGroupWare - ExpressoMail Preferences * |
---|
| 4 | * http://www.expressolivre.org * |
---|
| 5 | * Modified by Alexandre Felipe Muller de Souza <amuller@celepar.pr.gov.br> * |
---|
| 6 | * -------------------------------------------- * |
---|
| 7 | * This program is free software; you can redistribute it and/or modify it * |
---|
| 8 | * under the terms of the GNU General Public License as published by the * |
---|
| 9 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
| 10 | * option) any later version. * |
---|
| 11 | \**************************************************************************/ |
---|
| 12 | include_once("fckeditor.php"); |
---|
| 13 | $type = $_GET['type']; // FIX ME |
---|
| 14 | |
---|
[1035] | 15 | //if ($type == 'user' || $type == ''){ |
---|
| 16 | create_html_code('<script language="JavaScript" type="text/javascript"> |
---|
| 17 | function exibir_ocultar() |
---|
| 18 | { |
---|
| 19 | var type = ("'.$type.'" == "") ? "user" : "'.$type.'"; |
---|
| 20 | var use_signature_digital_cripto = document.getElementsByName(type+"[use_signature_digital_cripto]")[0]; |
---|
| 21 | var default_signature_digital_cripto = "'.$GLOBALS['phpgw_info']['default']['preferences']['expressoMail']['use_signature_digital_cripto'].'"; |
---|
| 22 | |
---|
| 23 | if (use_signature_digital_cripto) |
---|
| 24 | { |
---|
| 25 | var element_signature_digital = document.getElementById(type+"[use_signature_digital]"); |
---|
| 26 | var element_signature_cripto = document.getElementById(type+"[use_signature_cripto]"); |
---|
| 27 | |
---|
| 28 | switch (use_signature_digital_cripto[use_signature_digital_cripto.selectedIndex].value){ |
---|
| 29 | |
---|
| 30 | case "1": |
---|
| 31 | element_signature_digital.style.display=""; |
---|
| 32 | element_signature_cripto.style.display=""; |
---|
| 33 | break; |
---|
| 34 | case "0": |
---|
| 35 | element_signature_digital.style.display="none"; |
---|
| 36 | element_signature_cripto.style.display="none"; |
---|
| 37 | break; |
---|
| 38 | case "": |
---|
| 39 | if (default_signature_digital_cripto){ |
---|
| 40 | element_signature_digital.style.display=""; |
---|
| 41 | element_signature_cripto.style.display=""; |
---|
| 42 | } |
---|
| 43 | else |
---|
| 44 | { |
---|
| 45 | element_signature_digital.style.display="none"; |
---|
| 46 | element_signature_cripto.style.display="none"; |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | } |
---|
| 52 | |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | </script>'); |
---|
| 56 | //} |
---|
| 57 | |
---|
[873] | 58 | $default = array( |
---|
| 59 | '25' => '25', |
---|
| 60 | '50' => '50', |
---|
| 61 | '75' => '75', |
---|
| 62 | '100' => '100' |
---|
| 63 | ); |
---|
| 64 | |
---|
[1035] | 65 | create_select_box('What is the maximum number of messages per page?','max_email_per_page',$default, |
---|
[873] | 66 | 'What is the maximum number of messages per page?'); |
---|
[1035] | 67 | create_check_box('Save deleted messages in trash folder?','save_deleted_msg','Save deleted messages in trash folder?'); |
---|
[873] | 68 | $default = array( |
---|
| 69 | '1' => lang('1 day'), |
---|
| 70 | '2' => lang('2 days'), |
---|
| 71 | '3' => lang('3 days'), |
---|
| 72 | '4' => lang('4 days'), |
---|
| 73 | '5' => lang('5 days') |
---|
| 74 | ); |
---|
| 75 | |
---|
[1035] | 76 | create_select_box('Delete trash messages after how many days?','delete_trash_messages_after_n_days',$default,lang('Delete trash messages after how many days?')); |
---|
| 77 | create_check_box('Would you like to use local messages?','use_local_messages',''); |
---|
| 78 | create_check_box('Would you like to keep archived messages?','keep_archived_messages',''); |
---|
| 79 | create_check_box('Show previous message, after delete actual message?','delete_and_show_previous_message',''); |
---|
| 80 | create_check_box('Do you wanna receive an alert for new messages?','alert_new_msg',''); |
---|
| 81 | create_check_box('Show default view on main screen?','mainscreen_showmail',''); |
---|
| 82 | create_check_box('Do you want to use remove attachments function?','remove_attachments_function',''); |
---|
| 83 | create_check_box('Do you want to use important flag in email editor?','enable_important_flag',''); |
---|
[873] | 84 | |
---|
| 85 | //TODO use default folders from email admin |
---|
| 86 | $default = array( |
---|
| 87 | 'INBOX' => lang('INBOX'), |
---|
| 88 | 'INBOX/'.lang('Drafts') => lang('Drafts'), |
---|
| 89 | 'INBOX/'.lang('Sent') => lang('Sent'), |
---|
| 90 | 'INBOX/'.lang('Trash') => lang('Trash') |
---|
| 91 | ); |
---|
[1035] | 92 | create_select_box('Save sent messages in folder','save_in_folder',$default,''); |
---|
| 93 | create_check_box('Hide menu folders?','check_menu',''); |
---|
[873] | 94 | |
---|
| 95 | $default = array( |
---|
| 96 | '20' => lang('normal'), |
---|
| 97 | '30' => lang('medium'), |
---|
| 98 | '40' => lang('big') |
---|
| 99 | ); |
---|
| 100 | |
---|
[1035] | 101 | create_select_box('What is the height of the lines in the list of messages?','line_height',$default,''); |
---|
[873] | 102 | $default = array( |
---|
| 103 | '10' => lang('small'), |
---|
| 104 | '11' => lang('normal'), |
---|
| 105 | '15' => lang('big') |
---|
| 106 | ); |
---|
| 107 | |
---|
[1035] | 108 | create_select_box('What the font size in the list of messages?','font_size',$default,''); |
---|
| 109 | create_check_box('Use dynamic contacts?','use_dynamic_contacts',''); |
---|
| 110 | create_check_box('Use shortcuts?','use_shotcuts',''); |
---|
| 111 | create_check_box('Auto save draft','auto_save_draft',''); |
---|
[1005] | 112 | $default = array( |
---|
| 113 | '65536' => lang('unlimited'), |
---|
| 114 | '640' => '640', |
---|
| 115 | '768' => '768', |
---|
| 116 | '800' => '800', |
---|
| 117 | '1024' => '1024', |
---|
| 118 | '1080' => '1080' |
---|
| 119 | ); |
---|
[873] | 120 | |
---|
[1035] | 121 | create_select_box('What is the maximum size of embedded images'."?",'image_size',$default,''); |
---|
[1005] | 122 | |
---|
[1035] | 123 | if($GLOBALS['phpgw_info']['server']['use_assinar_criptografar']) |
---|
| 124 | { |
---|
| 125 | create_check_box('Enable digitally sign/cipher the message?','use_signature_digital_cripto','','',True,'onchange="javascript:exibir_ocultar();"'); |
---|
| 126 | if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature_digital_cripto']) |
---|
| 127 | { |
---|
| 128 | create_check_box('Always sign message digitally?','use_signature_digital',''); |
---|
| 129 | create_check_box('Always cipher message digitally?','use_signature_cripto',''); |
---|
| 130 | } |
---|
| 131 | else |
---|
| 132 | { |
---|
| 133 | create_check_box('Always sign message digitally?','use_signature_digital','','',True,'',False); |
---|
| 134 | create_check_box('Always cipher message digitally?','use_signature_cripto','','',True,'',False); |
---|
| 135 | } |
---|
| 136 | } |
---|
| 137 | |
---|
[873] | 138 | $default = array( |
---|
| 139 | 'text' => lang('simple text'), |
---|
| 140 | 'html' => lang('rich text') |
---|
| 141 | ); |
---|
| 142 | |
---|
[1035] | 143 | create_select_box('Signature Type','type_signature',$default,'','','','onchange="javascript:changeType(this.value);" onload="javascript:alert(this.value);"'); |
---|
[873] | 144 | |
---|
[874] | 145 | if ($type == 'user' || $type == ''){ |
---|
[873] | 146 | $oFCKeditor = new FCKeditor('html_signature'); |
---|
| 147 | $oFCKeditor->BasePath = '../expressoMail1_2/js/fckeditor/'; |
---|
| 148 | $oFCKeditor->ToolbarSet = 'ExpressoLivre'; |
---|
| 149 | |
---|
| 150 | $vars = $GLOBALS['phpgw']->preferences->user[$appname]; |
---|
| 151 | |
---|
[1002] | 152 | create_html_code("signature","<div id='text_signature'> |
---|
| 153 | <textarea rows='5' cols='50' id='user[signature]' name='user[signature]'>","</textarea></div> |
---|
[873] | 154 | <div style='display:none;' id='html_signature'>".$oFCKeditor->Create()."</div> |
---|
| 155 | <script language='javascript'> |
---|
| 156 | document.getElementById('user[signature]').value = '".$vars['signature']."'; |
---|
| 157 | function changeType(value){ |
---|
| 158 | var html_signature = FCKeditorAPI.GetInstance(\"html_signature\"); |
---|
| 159 | if(value == 'text'){ |
---|
| 160 | document.getElementById('user[signature]').value = html_signature.GetHTML(); |
---|
| 161 | document.getElementById(\"text_signature\").style.display = ''; |
---|
| 162 | document.getElementById(\"html_signature\").style.display = 'none'; |
---|
[1002] | 163 | } |
---|
| 164 | else if(value == 'html'){ |
---|
| 165 | html_signature.SetHTML(document.getElementById('user[signature]').value); |
---|
| 166 | document.getElementById(\"text_signature\").style.display = 'none'; |
---|
| 167 | document.getElementById(\"html_signature\").style.display = ''; |
---|
| 168 | } |
---|
[873] | 169 | } |
---|
[1002] | 170 | setTimeout('changeType(document.getElementsByName(\'user[type_signature]\')[0].value==\'html\'?\'html\':\'\')',2500); |
---|
| 171 | document.getElementById('user[signature]').value=document.getElementById('user[signature]').innerHTML; |
---|
[873] | 172 | </script>"); |
---|
| 173 | } |
---|
| 174 | ?> |
---|