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