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

Revision 1005, 5.0 KB checked in by amuller, 11 years ago (diff)

Ticket #520 - Implementação de redução automática de imagens

  • Property svn:executable set to *
Line 
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        \**************************************************************************/
12include_once("fckeditor.php");
13$type = $_GET['type']; // FIX ME
14
15$default = array(
16        '25'    => '25',
17        '50'    => '50',
18        '75'    => '75',
19        '100'   => '100'
20);
21
22create_select_box(lang('What is the maximum number of messages per page?'),'max_email_per_page',$default,
23        'What is the maximum number of messages per page?');
24create_check_box(lang('Save deleted messages in trash folder?'),'save_deleted_msg','Save deleted messages in trash folder?');
25$default = array(
26        '1'    => lang('1 day'),
27        '2'    => lang('2 days'),
28        '3'    => lang('3 days'),
29        '4'   => lang('4 days'),
30        '5'   => lang('5 days')
31);
32
33create_select_box(lang('Delete trash messages after how many days?'),'delete_trash_messages_after_n_days',$default,lang('Delete trash messages after how many days?'));
34create_check_box(lang('Would you like to use local messages?'),'use_local_messages','');
35create_check_box(lang('Would you like to keep archived messages?'),'keep_archived_messages','');
36create_check_box(lang('Show previous message, after delete actual message?'),'delete_and_show_previous_message','');
37create_check_box(lang('Do you wanna receive an alert for new messages?'),'alert_new_msg','');
38create_check_box(lang('Show default view on main screen?'),'mainscreen_showmail','');
39create_check_box(lang('Do you want to use remove attachments function?'),'remove_attachments_function','');
40create_check_box(lang('Do you want to use important flag in email editor?'),'enable_important_flag','');
41
42//TODO use default folders from email admin
43$default = array(
44        'INBOX' =>      lang('INBOX'),
45        'INBOX/'.lang('Drafts') => lang('Drafts'),
46        'INBOX/'.lang('Sent')   => lang('Sent'),
47        'INBOX/'.lang('Trash')  => lang('Trash')
48);
49create_select_box(lang('Save sent messages in folder'),'save_in_folder',$default,'');
50create_check_box(lang('Hide menu folders?'),'check_menu','');
51
52$default = array(
53        '20' => lang('normal'),
54        '30' => lang('medium'),
55        '40' => lang('big')
56);
57
58create_select_box(lang('What is the height of the lines in the list of messages?'),'line_height',$default,'');
59$default = array(
60        '10' => lang('small'),
61        '11' => lang('normal'),
62        '15' => lang('big')
63);
64
65create_select_box(lang('What the font size in the list of messages?'),'font_size',$default,'');
66create_check_box(lang('Use dynamic contacts?'),'use_dynamic_contacts','');
67create_check_box(lang('Use shortcuts?'),'use_shotcuts','');
68create_check_box(lang('Auto save draft'),'auto_save_draft','');
69$default = array(
70        '65536' => lang('unlimited'),
71        '640' => '640',
72        '768' => '768',
73        '800' => '800',
74        '1024' => '1024',
75        '1080' => '1080'
76);
77
78create_select_box(lang('What is the maximum size of embedded images')."?",'image_size',$default,'');
79
80$default = array(
81        'text' => lang('simple text'),
82        'html' => lang('rich text')
83);
84
85create_select_box(lang('Signature Type'),'type_signature',$default,'','','','onchange="javascript:changeType(this.value);" onload="javascript:alert(this.value);"');
86
87if ($type == 'user' || $type == ''){
88        $oFCKeditor = new FCKeditor('html_signature');
89        $oFCKeditor->BasePath   = '../expressoMail1_2/js/fckeditor/';
90        $oFCKeditor->ToolbarSet = 'ExpressoLivre';
91
92        $vars = $GLOBALS['phpgw']->preferences->user[$appname];
93
94        create_html_code("signature","<div id='text_signature'>
95                <textarea rows='5' cols='50' id='user[signature]' name='user[signature]'>","</textarea></div>
96                <div style='display:none;' id='html_signature'>".$oFCKeditor->Create()."</div>
97                <script language='javascript'>
98document.getElementById('user[signature]').value  = '".$vars['signature']."';
99function changeType(value){
100        var html_signature = FCKeditorAPI.GetInstance(\"html_signature\");
101        if(value == 'text'){
102                document.getElementById('user[signature]').value = html_signature.GetHTML();
103                document.getElementById(\"text_signature\").style.display = '';
104                document.getElementById(\"html_signature\").style.display = 'none';
105        }
106        else if(value == 'html'){       
107                html_signature.SetHTML(document.getElementById('user[signature]').value);
108                document.getElementById(\"text_signature\").style.display = 'none';
109                document.getElementById(\"html_signature\").style.display  = '';
110        }
111}
112setTimeout('changeType(document.getElementsByName(\'user[type_signature]\')[0].value==\'html\'?\'html\':\'\')',2500);
113document.getElementById('user[signature]').value=document.getElementById('user[signature]').innerHTML;
114</script>");
115}
116?>
Note: See TracBrowser for help on using the repository browser.