source: trunk/expressoMail1_2/inc/hook_settings.inc.php @ 1037

Revision 1037, 7.5 KB checked in by amuller, 15 years ago (diff)

Ticket #559 - Correção de problema, usando caminho relativo

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