1 | <!-- |
---|
2 | /** |
---|
3 | * MailArchiver is an application that provides services for storing and managing e-mail messages through a Web Services SOAP interface. |
---|
4 | * Copyright (C) 2012 Marcio Andre Scholl Levien and Fernando Alberto Reuter Wendt and Jose Ronaldo Nogueira Fonseca Junior |
---|
5 | * |
---|
6 | * This program is free software: you can redistribute it and/or modify |
---|
7 | * it under the terms of the GNU Affero General Public License as |
---|
8 | * published by the Free Software Foundation, either version 3 of the |
---|
9 | * License, or (at your option) any later version. |
---|
10 | * |
---|
11 | * This program is distributed in the hope that it will be useful, |
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | * GNU Affero General Public License for more details. |
---|
15 | * |
---|
16 | * You should have received a copy of the GNU Affero General Public License |
---|
17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
18 | */ |
---|
19 | |
---|
20 | /******************************************************************************\ |
---|
21 | * |
---|
22 | * This product was developed by |
---|
23 | * |
---|
24 | * SERVIÃO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), |
---|
25 | * |
---|
26 | * a government company established under Brazilian law (5.615/70), |
---|
27 | * at Department of Development of Porto Alegre. |
---|
28 | * |
---|
29 | \******************************************************************************/ |
---|
30 | --> |
---|
31 | |
---|
32 | <html> |
---|
33 | <head> |
---|
34 | <title>Local import form</title> |
---|
35 | <script type="text/javascript"> |
---|
36 | |
---|
37 | function setParameters() { |
---|
38 | var params = {}; |
---|
39 | var param_array = window.location.href.split('?')[1].split('&'); |
---|
40 | for(var i in param_array) { |
---|
41 | x = param_array[i].split('='); |
---|
42 | params[x[0]] = x[1]; |
---|
43 | } |
---|
44 | return params; |
---|
45 | } |
---|
46 | |
---|
47 | function TranslateGUI() { |
---|
48 | var objLabel = document.getElementById('lbl_flat'); |
---|
49 | |
---|
50 | switch(document.getElementById('lang').value) { |
---|
51 | case 'us-US': |
---|
52 | objLabel.innerHTML = 'Disregarding structure: merge all the messages in the destination folder'; |
---|
53 | document.getElementById('import_button').value = 'Import'; |
---|
54 | break; |
---|
55 | case 'es-ES': |
---|
56 | objLabel.innerHTML = 'Haciendo caso omiso de la estructura: combinar todos los mensajes en la carpeta de destino'; |
---|
57 | document.getElementById('import_button').value = 'Importación'; |
---|
58 | break; |
---|
59 | default: |
---|
60 | objLabel.innerHTML = 'Desconsiderar estrutura de pastas: fundir todas as mensagens na pasta de destino'; |
---|
61 | document.getElementById('import_button').value = 'Importar'; |
---|
62 | } |
---|
63 | } |
---|
64 | |
---|
65 | function getParams() { |
---|
66 | var dataparameters = setParameters(); |
---|
67 | var srv_protocol = ""; |
---|
68 | var srv_port = ""; |
---|
69 | |
---|
70 | if(dataparameters.basevalue) { |
---|
71 | if((dataparameters.basevalue != ' ') && (dataparameters.basevalue != '') && (dataparameters.basevalue.length > 0)) { |
---|
72 | document.getElementById('base').value = decodeURIComponent(dataparameters.basevalue); |
---|
73 | } |
---|
74 | } |
---|
75 | |
---|
76 | if(dataparameters.sessvalue) { |
---|
77 | if((dataparameters.sessvalue != ' ') && (dataparameters.sessvalue != '') && (dataparameters.sessvalue.length > 0)) { |
---|
78 | document.getElementById('sessionId').value = decodeURIComponent(dataparameters.sessvalue); |
---|
79 | } |
---|
80 | } |
---|
81 | |
---|
82 | if(dataparameters.langvalue) { |
---|
83 | if((dataparameters.langvalue != ' ') && (dataparameters.langvalue != '') && (dataparameters.langvalue.length > 0)) { |
---|
84 | document.getElementById('lang').value = decodeURIComponent(dataparameters.langvalue); |
---|
85 | } |
---|
86 | } |
---|
87 | |
---|
88 | if(dataparameters.serprotocol) { |
---|
89 | if((dataparameters.serprotocol != ' ') && (dataparameters.serprotocol != '') && (dataparameters.serprotocol.length > 0)) { |
---|
90 | var srv_protocol = decodeURIComponent(dataparameters.serprotocol); |
---|
91 | } |
---|
92 | } |
---|
93 | |
---|
94 | if(dataparameters.serport) { |
---|
95 | if((dataparameters.serport != ' ') && (dataparameters.serport != '') && (dataparameters.serport.length > 0)) { |
---|
96 | var srv_port = decodeURIComponent(dataparameters.serport); |
---|
97 | } |
---|
98 | } |
---|
99 | |
---|
100 | if((srv_protocol != "") && (srv_port != "")) { |
---|
101 | var faction = srv_protocol + "://127.0.0.1:" + srv_port + "/arcserv/import"; |
---|
102 | } |
---|
103 | else { |
---|
104 | var faction = "https://127.0.0.1:4334/arcserv/import"; |
---|
105 | } |
---|
106 | document.getElementById('ma_import_form').action = faction; |
---|
107 | TranslateGUI(); |
---|
108 | } |
---|
109 | |
---|
110 | </script> |
---|
111 | <style> |
---|
112 | body, form { |
---|
113 | margin: 0; |
---|
114 | padding: 0; |
---|
115 | } |
---|
116 | </style> |
---|
117 | </head> |
---|
118 | <body onload="getParams();"> |
---|
119 | <form action="" method="post" name="ma_import_form" id="ma_import_form" enctype="multipart/form-data" style="margin:0; padding:0;"> |
---|
120 | <input type="file" name="file_1" id="file_1" maxlength="255" size="50" style="border: 1px solid #BBBBBB !important; color: #006699 !important; font-family: Arial,Helvetica,sans-serif !important; font-size: 11px !important;"/> |
---|
121 | <input type="hidden" name="sessionId" id="sessionId" value="" /> |
---|
122 | <input type="hidden" name="base" id="base" value="" /> |
---|
123 | <input type="hidden" name="lang" id="lang" value="" /><br /> |
---|
124 | <input type="checkbox" name="flat" id="ma_import_flat" value="true"><label for="ma_import_flat" id="lbl_flat" style="margin:0; padding:0; font-family: Verdana,Arial,Helvetica,sans-serif;font-size:11px; font-weight:normal;"></label><br /> |
---|
125 | <input title="Importar" id="import_button" value="" type="submit" style="cursor: pointer !important; margin: 1px !important; padding: 1px !important; border: 1px solid #BBBBBB !important; color: #006699 !important; font-family: Arial,Helvetica,sans-serif !important; font-size: 11px !important;" onclick="javascript: window.parent.showLoader();"/> |
---|
126 | </form> |
---|
127 | </body> |
---|
128 | </html> |
---|