/[smeserver]/rpms/smeserver-manager/sme10/smeserver-manager-0.1.0-yum_backup_email_cleanup.patch
ViewVC logotype

Contents of /rpms/smeserver-manager/sme10/smeserver-manager-0.1.0-yum_backup_email_cleanup.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sat Apr 11 17:08:20 2020 UTC (4 years, 6 months ago) by michel
Branch: MAIN
CVS Tags: smeserver-manager-0_1_0-16_el7_sme
Error occurred while calculating annotation data.
make: « clog » est à jour.

1 diff -aurN smeserver-manager-0.1.0.old/createlinks smeserver-manager-0.1.0/createlinks
2 --- smeserver-manager-0.1.0.old/createlinks 2020-04-08 23:43:15.000000000 +0400
3 +++ smeserver-manager-0.1.0/createlinks 2020-04-11 20:30:30.778000000 +0400
4 @@ -9,6 +9,17 @@
5
6 # links to add
7
8 +for ( qw( sme_core.css
9 + sme_main.css
10 + sme_menu.css
11 + styles.css
12 + ) )
13 +{
14 + templates2events("/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/$_", qw(
15 + bootstrap-console-save console-save
16 + ));
17 +}
18 +
19 # templates to expand
20 for my $event ( qw( manager2-modify bootstrap-console-save console-save ) )
21 {
22 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css/50body smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css/50body
23 --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css/50body 1970-01-01 04:00:00.000000000 +0400
24 +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css/50body 2020-04-10 16:54:07.067000000 +0400
25 @@ -0,0 +1,250 @@
26 +{
27 + $OUT = <<'EOF';
28 +
29 +/* from e-smith-manager to smeserver_manager2 */
30 +
31 +/*----------------------------------------------------------------------
32 + * copyright (C) 1999-2003 Mitel Networks Corporation
33 + *
34 + * This program is free software; you can redistribute it and/or modify
35 + * it under the terms of the GNU General Public License as published by
36 + * the Free Software Foundation; either version 2 of the License, or
37 + * (at your option) any later version.
38 + *
39 + * This program is distributed in the hope that it will be useful,
40 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
41 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42 + * GNU General Public License for more details.
43 + *
44 + * You should have received a copy of the GNU General Public License
45 + * along with this program; if not, write to the Free Software
46 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
47 + *
48 + * Technical support for this program is available from Mitel Networks
49 + * Please visit our web site www.mitel.com for details.
50 + *----------------------------------------------------------------------
51 + */
52 +
53 +/* This is the stylesheet used as the basis for older broswers.
54 +
55 +Note that you CANNOT simly add styles here and hope they work. ONLY CSS
56 +level 1 styles should be in this file. Everyting else goes into the other 3
57 +files.
58 +
59 +These basic styles ensire that browsers that don't understand the @import
60 +method will still be usable. All modern browsers will use the styles in
61 +sme_main.css, sme_menu.css or sme_header.css depending on the frame in which
62 +the page is found.
63 +*/
64 +
65 +/* Default HTML styles */
66 +body {
67 + background: #ffffff;
68 + color: #000000;
69 + font-family: Verdana, Arial, Helvetica, sans-serif;
70 + font-size: 11px;
71 + border-width: 0;
72 +}
73 +
74 +table, tr, td, div, p, form {
75 + color: #000000;
76 + font-family: Verdana, Arial, Helvetica, sans-serif;
77 + font-size: 11px;
78 +}
79 +
80 +p {
81 + margin-top: 8px;
82 + margin-bottom: 2px;
83 +}
84 +
85 +form {
86 + margin-top: 2px;
87 + margin-bottom: 2px;
88 +}
89 +
90 +span {
91 + font-family: Verdana, Arial, Helvetica, sans-serif;
92 + font-size: 11px;
93 +}
94 +
95 +.notsmall {
96 + font-family: Verdana, Arial, Helvetica, sans-serif;
97 + font-size: 11px;
98 +}
99 +
100 +h1, .h1 {
101 + font-family: Verdana, Arial, Helvetica, sans-serif;
102 + color: #333333;
103 + font-size: 18px;
104 + margin-bottom: 4px;
105 + margin-top: 12px;
106 +}
107 +
108 +h2, .h2 {
109 + font-family: Verdana, Arial, Helvetica, sans-serif;
110 + color: #333333;
111 + font-size: 14px;
112 + margin-bottom: 3px;
113 + margin-top: 12px;
114 +}
115 +
116 +h3, .h3 {
117 + font-family: Verdana, Arial, Helvetica, sans-serif;
118 + color: #333333;
119 + font-size: 12px;
120 + margin-bottom: 2px;
121 + margin-top: 12px;
122 +}
123 +
124 +h4, .h4 {
125 + font-family: Verdana, Arial, Helvetica, sans-serif;
126 + font-style: italic;
127 + color: #333333;
128 + font-size: 12px;
129 + margin-bottom: 2px;
130 + margin-top: 10px;
131 +}
132 +
133 +ol, ul, li {
134 + font-family: Verdana, Arial, Helvetica, sans-serif;
135 + font-size: 10px;
136 + font-weight: normal;
137 + color: black;
138 +}
139 +
140 +ul {
141 + list-style-type: circle;
142 +}
143 +
144 +/* Core styles for use with sme_header.css*/
145 +body.header {
146 + font-family: Verdana, Arial, Helvetica, sans-serif;
147 + font-size: 11px;
148 + background: #cccccc;
149 + margin-top: 0px;
150 + margin-right: 0px;
151 + margin-bottom: 0px;
152 + margin-left: 0px;
153 +}
154 +
155 +.hilightbar {
156 + background-color: #ffc50a;
157 + font-size: 4px;
158 +}
159 +
160 +.infobar {
161 + font-family: Verdana, Arial, Helvetica, sans-serif;
162 + font-size: 11px;
163 + background-color: #cccccc;
164 +}
165 +
166 +.darkergrey {
167 + color: #666666;
168 +}
169 +
170 +td.darkgrey {
171 + background-color: #888888;
172 +}
173 +
174 +a.update {
175 + color: red;
176 + font-family: Verdana, Arial, Helvetica, sans-serif;
177 + font-size: 11px;
178 + background: #cccccc;
179 +}
180 +
181 +/* Core styles for use with sme_menu.css */
182 +
183 +body.menu {
184 + font-family: Verdana, Arial, Helvetica, sans-serif;
185 + font-size: 11px;
186 + background-color: #e8f3e1;
187 +}
188 +
189 +td.section {
190 + padding-bottom: 2px;
191 + padding-top: 8px;
192 +}
193 +
194 +.section {
195 + font-family: Verdana, Arial, Helvetica, sans-serif;
196 + font-size: 11px;
197 + font-weight: bold;
198 + background-color: #e8f3e1;
199 +}
200 +
201 +a.item {
202 + color: #00008b;
203 + font-family: Verdana, Arial, Helvetica, sans-serif;
204 + font-size: 11px;
205 + background: #e8f3e1;
206 +}
207 +
208 +a.sl {
209 + color: green;
210 + font-family: Verdana, Arial, Helvetica, sans-serif;
211 + font-size: 11px;
212 + background: #e8f3e1;
213 +}
214 +
215 +a.alert {
216 + color: red;
217 + font-family: Verdana, Arial, Helvetica, sans-serif;
218 + font-size: 11px;
219 + background: #e8f3e1;
220 +}
221 +
222 +/* Core styles for use with sme_main.css */
223 +body.main {
224 + font-family: Verdana, Arial, Helvetica, sans-serif;
225 + font-size: 11px;
226 + background-color: #ffffff;
227 + color: #000000;
228 +}
229 +
230 +td.sme-noborders-label {
231 + font-weight: bold;
232 + width: 33%;
233 + text-align: right;
234 +}
235 +
236 +hr.sectionbar {
237 + color: #666666;
238 + background-color: #666666;
239 + height: 1px;
240 + width: 80%;
241 + border: 0;
242 +}
243 +
244 +hr.sme-copyrightbar {
245 + color: #dddddd;
246 + background-color: #dddddd;
247 + height: 1px;
248 + width: 100%;
249 + border: 0;
250 +}
251 +
252 +.sme-copyright {
253 + color: #777777;
254 + font-family: Verdana, Arial, Helvetica, sans-serif;
255 + font-size: 10px;
256 +}
257 +
258 +/*These style definitions were found int he old css file (manager.css)
259 +but don't seem to ever be referenced in the code. They're here
260 +for reference.
261 +
262 +.centerit {
263 + text-align: center;
264 +}
265 +.highlight {
266 + background: #ffc61e;
267 +}
268 +.subheading {
269 + background: #ffffff;
270 + color: #1e385b;
271 +}
272 +*/
273 +
274 +EOF
275 +}
276 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css/90contribs smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css/90contribs
277 --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css/90contribs 1970-01-01 04:00:00.000000000 +0400
278 +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css/90contribs 2020-04-10 16:53:43.349000000 +0400
279 @@ -0,0 +1,71 @@
280 +{
281 + $OUT =<<'HERE';
282 +
283 +/* from e-smith-manager to smeserver_manager2 */
284 +
285 +/*----------------------------------------------------------------------
286 + * copyright (C) 1999-2003 Mitel Networks Corporation
287 + *
288 + * This program is free software; you can redistribute it and/or modify
289 + * it under the terms of the GNU General Public License as published by
290 + * the Free Software Foundation; either version 2 of the License, or
291 + * (at your option) any later version.
292 + *
293 + * This program is distributed in the hope that it will be useful,
294 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
295 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
296 + * GNU General Public License for more details.
297 + *
298 + * You should have received a copy of the GNU General Public License
299 + * along with this program; if not, write to the Free Software
300 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
301 + *
302 + * Technical support for this program is available from Mitel Networks
303 + * Please visit our web site www.mitel.com for details.
304 + *----------------------------------------------------------------------
305 + */
306 +
307 +/*contribs.org styling
308 +*/
309 +body.header {
310 +background: #bee6a2;
311 + }
312 +.hilightbar {
313 +background-color: #ffffff;
314 + }
315 +.infobar {
316 +background-color: #98d36e;
317 + }
318 +a.update {
319 +font-size: 11px;
320 +background: #98d36e;
321 + }
322 +
323 +/* Core styles for use with sme_menu.css */
324 +body.menu {
325 +background-color: #e8f3e1;
326 + }
327 +td.section {
328 +background-color: #e8f3e1;
329 + }
330 +a.item {
331 +background: #e8f3e1;
332 + }
333 +a.sl {
334 +background: #e8f3e1;
335 + }
336 +a.alert {
337 +background: #e8f3e1;
338 + }
339 +
340 +/* Core Styles for use with sme_main.css */
341 +hr.sectionbar {
342 +color: #8ebe43;
343 +background-color: #8ebe43;
344 + }
345 +hr.sme-copyrightbar {
346 +color: #8ebe43;
347 +background-color: #8ebe43;
348 + }
349 +HERE
350 +}
351 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css/template-begin smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css/template-begin
352 --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css/template-begin 1970-01-01 04:00:00.000000000 +0400
353 +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_core.css/template-begin 2006-03-16 01:59:54.000000000 +0400
354 @@ -0,0 +1 @@
355 +/* DO NOT MODIFY THIS FILE! It is updated automatically */
356 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css/50body smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css/50body
357 --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css/50body 1970-01-01 04:00:00.000000000 +0400
358 +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css/50body 2020-04-10 16:53:04.667000000 +0400
359 @@ -0,0 +1,440 @@
360 +{
361 + $OUT = <<'EOF';
362 +
363 +/* from e-smith-manager to smeserver_manager2 */
364 +
365 +/*----------------------------------------------------------------------
366 + * copyright (C) 1999-2003 Mitel Networks Corporation
367 + *
368 + * This program is free software; you can redistribute it and/or modify
369 + * it under the terms of the GNU General Public License as published by
370 + * the Free Software Foundation; either version 2 of the License, or
371 + * (at your option) any later version.
372 + *
373 + * This program is distributed in the hope that it will be useful,
374 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
375 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376 + * GNU General Public License for more details.
377 + *
378 + * You should have received a copy of the GNU General Public License
379 + * along with this program; if not, write to the Free Software
380 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
381 + *
382 + * Technical support for this program is available from Mitel Networks
383 + * Please visit our web site www.mitel.com for details.
384 + *----------------------------------------------------------------------
385 + */
386 +
387 +/* This is the stylesheet used in the main panels only.
388 +
389 + This file inherits the styles use in sme_core in the "header" section, and
390 + as noted in the code below. Note that some of the styles here are empty.
391 + This is because the style definition has moved safely to sme_core.css
392 + and the placeholder is left here for reference or future use.
393 +
394 + There are a lot of styles in here, so read carefully. Each one is documented.
395 +
396 + Styles that were in the old stylesheets, but are not used in the UI are at the
397 + bottom, commented out. These can be removed at the end of the 6.0 cycle */
398 +
399 +/* general page properties */
400 +body, body.main {
401 + margin-top: 5px;
402 + margin-right: 20px;
403 + margin-bottom: 5px;
404 + margin-left: 5px;
405 +}
406 +
407 +
408 +/* Table properties ****************************************/
409 +/* There are THREE types of tables
410 + 1. *.sme-layout* is used for layout purposes. It is the "master
411 + container" on a page. It controls the top-level table
412 + inside of which everything else is put.
413 + 2. *.sme-noborders* is used for layout, and defines a borderless table and
414 + cells used within it.
415 + 2. *.sme-border* is used for tabular data, and defines a header row and borders
416 + for tables that need borders
417 +
418 + */
419 +
420 +/*First, some defaults */
421 +td {
422 + text-align: left;
423 +}
424 +
425 +
426 +/*
427 +sme-layout* : Used for top-level layout
428 +*/
429 +
430 +table.sme-layout {
431 + border-collapse: collapse;
432 + margin-bottom: 2px;
433 + margin-top: 2px;
434 +}
435 +
436 +tr.sme-layout {
437 + border: 1px solid #dddddd;
438 +}
439 +
440 +td.sme-layout {
441 + border: 1px solid #dddddd;
442 +}
443 +
444 +/*This special style is actually used only for the button row along the bottom of each page*/
445 +th.sme-layout {
446 + border: 1px solid #dddddd;
447 + background-color: #e8f3e1;
448 + font-family: Verdana, Arial, Helvetica, sans-serif;
449 + font-size: 9pt;
450 + font-weight: bold;
451 + color: #000000;
452 + text-align: right;
453 + padding: 4px;
454 +}
455 +
456 +/*
457 +sme-noborders* : Used for mid-level layout
458 +*/
459 +table.sme-noborders {
460 + padding: 0px;
461 + margin-top: 0px;
462 + margin-bottom: 20px;
463 + margin-left: 0px;
464 + margin-right: 0px;
465 + font-family: Verdana, Arial, Helvetica, sans-serif;
466 + font-size: 11px;
467 +}
468 +td.sme-noborders-label {
469 + font-weight: bold;
470 + /*width: 250px;*/
471 + text-align: right;
472 + /*vertical-align: top;*/
473 + background-color: #e8f3e1;
474 + font-family: Verdana, Arial, Helvetica, sans-serif;
475 + font-size: 11px;
476 +}
477 +td.sme-noborders-content {
478 + text-align: left;
479 + vertical-align: top;
480 + font-family: Verdana, Arial, Helvetica, sans-serif;
481 + font-size: 11px;
482 +}
483 +td.sme-noborders-info, div.sme-noborders-info {
484 + text-align: left;
485 + vertical-align: top;
486 +}
487 +/* Used for a left-most column of radio buttons (see date/time panel) */
488 +td.sme-radiobutton {
489 + width: 30px;
490 +}
491 +/*
492 +sme-border* : Used for tabular data
493 +*/
494 +table.sme-border {
495 + border-collapse: collapse;
496 + border: 2px solid #cccccc;
497 + empty-cells: show;
498 + margin: 5px 5px 5px 2px;
499 +}
500 +td.sme-border,
501 +td.sme-border-warning,
502 +td.sme-border-right,
503 +td.sme-border-center {
504 + border: 1px solid #cccccc;
505 + font-family: Verdana, Arial, Helvetica, sans-serif;
506 + font-size: 10px;
507 + font-weight: normal;
508 + color: #000000;
509 + text-align: left;
510 + padding-left: 2px;
511 + padding-right: 2px;
512 + padding-top: 3px;
513 + padding-bottom: 3px;
514 +}
515 +td.sme-border-warning {
516 + color: red;
517 + }
518 +td.sme-border-right {text-align: right;}
519 +td.sme-border-center {text-align: center;}
520 +th.sme-border {
521 + border: 1px solid #cccccc;
522 + background-color: #bee6a2;
523 + font-family: Verdana, Arial, Helvetica, sans-serif;
524 + font-size: 10px;
525 + font-weight: bold;
526 + color: #000000;
527 + text-align: center;
528 + vertical-align: bottom;
529 + padding-left: 2px;
530 + padding-right: 2px;
531 + padding-left: 3px;
532 + padding-right: 3px;
533 + padding-top: 3px;
534 + padding-bottom: 3px;
535 + /*border-width: 1px;
536 + border-style: solid;
537 + border-color: #F2F0EE #75736E #75736E #F2F0EE ;*/
538 +}
539 +td.sme-border a, td.sme-border-right a, td.sme-border-center a {
540 + font-size: 10px;
541 +}
542 +
543 +/* misc layout stuff*/
544 +/* these two are for any error messages that pop up*/
545 +div.error, div.sme-error, span.error, span.sme-error {
546 + color: red;
547 + background-color: #ffffff;
548 + border-width: 1px;
549 + border-style: solid;
550 + border-color: red ;
551 + padding: 2px;
552 + margin-left: 20px;
553 + margin-right: 20px;
554 + margin-top:0px;
555 + margin-bottom:0px;
556 +
557 +}
558 +
559 +div.error-noborders, div.sme-error-noborders,
560 +span.error-noborders, span.sme-error-noborders
561 +{
562 + color: red;
563 + background-color: #ffffff;
564 + border-width: 0px;
565 +}
566 +
567 +div.error h2, span.error h2,
568 +div.error p, span.error p
569 +{
570 + color: red;
571 +}
572 +/* These are for the special case of a link being inside an error message */
573 +div.sme-error a, div.error a, span.error a, span.sme-error a,
574 +div.error-noborders a, div.sme-error-noborders a,
575 +span.error-noborders a, span.sme-error-noborders a
576 +{
577 + color: #ff0000;
578 + font-weight: bold;
579 + text-decoration: underline;
580 +}
581 +
582 +/* For when a link is the error message */
583 +a.error:link, a.error:visited, a.error:hover, a.error:active {
584 + color: #ff0000;
585 + font-weight: normal;
586 + text-decoration: underline;
587 +}
588 +
589 +/* these two are for any success messages that pop up*/
590 +div.success, span.success {
591 + color: #006400;
592 + background-color: #ffffff;
593 + border-width: 1px;
594 + border-style: solid;
595 + border-color: #006400 ;
596 + padding: 2px;
597 + margin-left: 20px;
598 + margin-right: 20px;
599 + margin-top:0px;
600 + margin-bottom:0px;
601 +
602 +}
603 +
604 +/* These two are for the special case of a link being inside a success message */
605 +div.success a, span.success a
606 +{
607 + color: #006400;
608 + font-weight: bold;
609 + text-decoration: underline;
610 +}
611 +
612 +div.success h2, span.success h2,
613 +div.success p, span.success p
614 +{
615 + color: green;
616 +}
617 +
618 +/*These two define the copyright footer styles, one for the line and one for the text*/
619 +hr.sme-copyrightbar {
620 +}
621 +.sme-copyright {
622 +}
623 +
624 +/* These ones define styles for the links that are made to look like
625 + standard form submit buttons */
626 +a.button-like:link,
627 +a.button-like:visited,
628 +a.button-like:hover,
629 +a.button-like:active,
630 +a.button-like-small:link,
631 +a.button-like-small:visited,
632 +a.button-like-small:hover,
633 +a.button-like-small:active {
634 + font-family: sans-serif;
635 + font-size: 13px;
636 + color: black;
637 + background: #D4D0C8;
638 + text-decoration: none;
639 + text-align: left;
640 + border-color: #F2F0EE #75736E #75736E #F2F0EE ;
641 + margin-top: 10px;
642 + margin-right: 2px;
643 + margin-bottom: 10px;
644 + margin-left: 2px;
645 + border-style: solid;
646 + border-top-width: 2px;
647 + border-right-width: 2px;
648 + border-bottom-width: 2px;
649 + border-left-width: 2px;
650 + padding-top: 2px;
651 + padding-bottom: 2px;
652 + padding-left: 6px;
653 + padding-right: 6px;
654 + }
655 +a.button-like-small:link,
656 +a.button-like-small:visited,
657 +a.button-like-small:hover,
658 +a.button-like-small:active {
659 + border-top-width: 1px;
660 + border-right-width: 1px;
661 + border-bottom-width: 1px;
662 + border-left-width: 1px;
663 + font-size: 10px;
664 + padding-top: 0px;
665 + padding-bottom: 0px;
666 + padding-left: 1px;
667 + padding-right: 1px;
668 +}
669 +a.button-like:active,
670 +a.button-like-small:active {
671 + border-color: #75736E #F2F0EE #F2F0EE #75736E ;
672 +}
673 +
674 +/* EXPERIMENTAL SECTION */
675 +/* These are styles used to experiment with. */
676 +
677 +/* class for links, similar to the class in sme_menu.css, but for a red button */
678 +a.button-like-red:link,
679 +a.button-like-red:visited,
680 +a.button-like-red:hover,
681 +a.button-like-red:active {
682 + border-left: #F1726C 2px solid;
683 + border-right: #B42025 2px solid;
684 + border-top: #F1726C 2px solid;
685 + border-bottom: #B42025 2px solid;
686 + }
687 +a.button-like-red:active {
688 + border-color: #75736E #F2F0EE #F2F0EE #75736E ;
689 +}
690 +
691 +/*These are style definitions found in the UI but not defined in any file I
692 + could locate. They're listed here for historical purposes, but have been
693 + removed from the UI
694 +
695 +pagedescription (used in the first paragraph of text on a page) [HTML.pm]
696 +label (used in forms) [HTML.pm]
697 +field (used in forms) [HTML.pm]
698 +fielddescription (used ???)[HTML.pm]
699 +buttons (used in forms) [HTML.pm]
700 +*/
701 +/*td.sme-submitbutton {
702 + text-align: right;
703 +}
704 +*/
705 +
706 +/*These style definitions were found int he old css file (manager.css)
707 + but don't seem to ever be referenced in the code. They're here
708 + for reference.
709 +
710 +.banner {
711 + background: #000000;
712 + color: #ffffff;
713 +}
714 +.banner-right {
715 + font-family: Verdana, Arial, Helvetica, sans-serif;
716 + background: #e17200;
717 + color: #ffffff;
718 +}
719 +.border {
720 + background: #000000;
721 + color: #000000;
722 + border-color: #000000;
723 +}
724 +.sidebar {
725 + width: 200px;
726 + background: #ffffff;
727 + font-size: smaller;
728 + font-family: Verdana, Arial, Helvetica, sans-serif;
729 + font-weight: normal;
730 +}
731 +.sidebar-title {
732 + background: #1e385b;
733 + color: #ffffff;
734 + font-family: Verdana, Arial, Helvetica, sans-serif;
735 + font-weight: bold;
736 +}
737 +.newsitem {
738 + background: #ffffff;
739 + color: #000000;
740 + font-family: Verdana, Arial, Helvetica, sans-serif;
741 + margin-left: 5px;
742 + margin-right: 5px;
743 + margin-top: 5px;
744 + margin-bottom: 5px;
745 +}
746 +.newsitem-title {
747 + background: #cccccc;
748 + color: #ffffff;
749 + font-family: Verdana, Arial, Helvetica, sans-serif;
750 + font-weight: bold;
751 +}
752 +.newsitem-footer {
753 + background: #cccccc;
754 + color: #000000;
755 + font-family: Verdana, Arial, Helvetica, sans-serif;
756 + font-size: smaller;
757 + text-align: right;
758 +}
759 +.newsitem-detail {
760 + font-size: smaller;
761 + font-weight: normal;
762 +}
763 +.formlabel {
764 + background: #c0c0c0;
765 + color: #000000;
766 + font-family: Verdana, Arial, Helvetica, sans-serif;
767 + font-size: small;
768 + font-weight: bold;
769 + text-align: right;
770 +}
771 +.welcome-link {
772 + background: #ffffff;
773 + color: #1e385b;
774 +}
775 +.littlelink {
776 + font-family: Verdana, Arial, Helvetica, sans-serif;
777 +}
778 +#textlayer {
779 + position: absolute;
780 + visibility: inherit;
781 + top: 160px;
782 + left: 50px;
783 + z-index: 2;
784 +}
785 +#para {
786 + font-family: Verdana, Arial, Helvetica, sans-serif;
787 + font-weight: bold;
788 + color: #000000;
789 +}
790 +#title {
791 + font-family: Verdana, Arial, Helvetica, sans-serif;
792 + font-weight: bold;
793 + padding: 7px 7px 7px 7px;
794 + color: #ffffff;
795 +}
796 +*/
797 +
798 +EOF
799 +}
800 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css/90contribs smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css/90contribs
801 --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css/90contribs 1970-01-01 04:00:00.000000000 +0400
802 +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css/90contribs 2020-04-10 16:52:25.340000000 +0400
803 @@ -0,0 +1,50 @@
804 +{
805 + $OUT =<<'HERE';
806 +
807 +/* from e-smith-manager to smeserver_manager2 */
808 +
809 +/*----------------------------------------------------------------------
810 + * copyright (C) 1999-2003 Mitel Networks Corporation
811 + *
812 + * This program is free software; you can redistribute it and/or modify
813 + * it under the terms of the GNU General Public License as published by
814 + * the Free Software Foundation; either version 2 of the License, or
815 + * (at your option) any later version.
816 + *
817 + * This program is distributed in the hope that it will be useful,
818 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
819 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
820 + * GNU General Public License for more details.
821 + *
822 + * You should have received a copy of the GNU General Public License
823 + * along with this program; if not, write to the Free Software
824 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
825 + *
826 + * Technical support for this program is available from Mitel Networks
827 + * Please visit our web site www.mitel.com for details.
828 + *----------------------------------------------------------------------
829 + */
830 +/*contribs.org styling */
831 +
832 +/* This special style is actually used only for the button row along the bottom of each page */
833 +th.sme-layout {
834 +border: 1px solid #8ebe43;
835 +background-color: #bee6a2;
836 + }
837 +table.sme-border {
838 +border: 2px solid #dddddd;
839 + }
840 +td.sme-border-warning,
841 +td.sme-border-right,
842 +td.sme-border-center {
843 +border: 1px solid #dddddd;
844 + }
845 +td.sme-border-right {text-align: right;}
846 +td.sme-border-center {text-align: center;}
847 +th.sme-border {
848 +border: 1px solid #dddddd;
849 +background-color: #e8f3e1;
850 + }
851 +HERE
852 +}
853 +
854 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css/template-begin smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css/template-begin
855 --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css/template-begin 1970-01-01 04:00:00.000000000 +0400
856 +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_main.css/template-begin 2006-03-16 01:59:54.000000000 +0400
857 @@ -0,0 +1 @@
858 +/* DO NOT MODIFY THIS FILE! It is updated automatically */
859 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_menu.css/50body smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_menu.css/50body
860 --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_menu.css/50body 1970-01-01 04:00:00.000000000 +0400
861 +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_menu.css/50body 2020-04-10 16:51:14.026000000 +0400
862 @@ -0,0 +1,229 @@
863 +{
864 + $OUT = <<'EOF';
865 +
866 +/* from e-smith-manager to smeserver_manager2 */
867 +
868 +/*----------------------------------------------------------------------
869 + * copyright (C) 1999-2003 Mitel Networks Corporation
870 + *
871 + * This program is free software; you can redistribute it and/or modify
872 + * it under the terms of the GNU General Public License as published by
873 + * the Free Software Foundation; either version 2 of the License, or
874 + * (at your option) any later version.
875 + *
876 + * This program is distributed in the hope that it will be useful,
877 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
878 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
879 + * GNU General Public License for more details.
880 + *
881 + * You should have received a copy of the GNU General Public License
882 + * along with this program; if not, write to the Free Software
883 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
884 + *
885 + * Technical support for this program is available from Mitel Networks
886 + * Please visit our web site www.mitel.com for details.
887 + *----------------------------------------------------------------------
888 + */
889 +
890 +/* This is the stylesheet used in the navigation panel only
891 +
892 + This file inherits the styles use in sme_core in the "navigation" section,
893 + and as noted in the code below. Note that some of the styles here are empty.
894 + This is because the style definition has moved safely to sme_core.css and
895 + the placeholder is left here for reference or future use.
896 +
897 + There are a lot of styles in here, so read carefully. Each one is
898 + documented.
899 +
900 + Styles that were in the old stylesheets, but are not used in the UI are at
901 + the bottom, commented out. These can be removed at the end of the 6.0
902 + cycle */
903 +
904 +/* Sets the general page properties */
905 +body, body.menu {
906 + margin-top: 0px;
907 + margin-right: 0px;
908 + margin-bottom: 0px;
909 + margin-left: 2px;
910 +}
911 +
912 +/* This is the section heading style */
913 +.section {
914 +}
915 +
916 +td.menu-cell {
917 + margin-top: 0px;
918 + margin-right: 0px;
919 + margin-bottom: 0px;
920 + margin-left: 0px;
921 + padding-left: 0px;
922 + padding-right: 0px;
923 + padding-top: 0px;
924 + padding-bottom: 0px;
925 +
926 +}
927 +
928 +/*
929 +All the a links use pseudoclasses to control the two visual link styles.
930 +For example:
931 + a.item:link the general link item
932 + a.item-current:link: the active link item
933 +
934 +The switch from item to item-current is done with a javascript script in the head of the
935 +navigation page, using the onClick event.
936 +
937 +We are making heavy use of the cascade with these.
938 +*/
939 +
940 +/* a:link controls the look of a link when the mouse is nowhere near it */
941 +a.item:link, a.item-current:link,
942 +a.warn:link, a.warn-current:link {
943 + display: block;
944 + font-family: Verdana, Arial, Helvetica, sans-serif;
945 + font-size: 10px;
946 + color: black;
947 + background: #e8f3e1;
948 + text-decoration: none;
949 + text-align: left;
950 + border-color: #e8f3e1;
951 + margin-top: 0px;
952 + margin-right: 0px;
953 + margin-bottom: 0px;
954 + margin-left: 0px;
955 + border-style: solid;
956 + border-top-width: 1px;
957 + border-right-width: 1px;
958 + border-bottom-width: 1px;
959 + border-left-width: 1px;
960 + padding-right: 10px;
961 + padding-left: 10px;
962 + padding-top: 0px;
963 + padding-bottom: 2px;
964 + }
965 +
966 +/* a:visited controls the look of a visited link (one that has been clicked) */
967 +a.item:visited, a.item-current:visited,
968 +a.warn:visited, a.warn-current:visited {
969 + display: block;
970 + font-family: Verdana, Arial, Helvetica, sans-serif;
971 + font-size: 10px;
972 + color: black;
973 + background: #e8f3e1;
974 + text-decoration: none;
975 + border-color: #e8f3e1;
976 + margin-top: 0px;
977 + margin-right: 0px;
978 + margin-bottom: 0px;
979 + margin-left: 0px;
980 + border-style: solid;
981 + border-top-width: 1px;
982 + border-right-width: 1px;
983 + border-bottom-width: 1px;
984 + border-left-width: 1px;
985 + padding-right: 10px;
986 + padding-left: 10px;
987 + padding-bottom: 2px;
988 + text-align: left;
989 +}
990 +
991 +/* a:hover controls the look of a link under the curser*/
992 +a.item:hover, a.item-current:hover,
993 +a.warn:hover, a.warn-current:hover {
994 + display: block;
995 + font-family: Verdana, Arial, Helvetica, sans-serif;
996 + font-size: 10px;
997 + color: black;
998 + text-decoration: none;
999 + background: #cccccc;
1000 + border-color: #888888;
1001 + margin-top: 0px;
1002 + margin-right: 0px;
1003 + margin-bottom: 0px;
1004 + margin-left: 0px;
1005 + border-style: solid;
1006 + border-top-width: 1px;
1007 + border-right-width: 1px;
1008 + border-bottom-width: 1px;
1009 + border-left-width: 1px;
1010 + padding-right: 10px;
1011 + padding-left: 10px;
1012 + padding-bottom: 2px;
1013 + text-align: left;
1014 +}
1015 +
1016 +/* a:active controls the look of a link as it is selected*/
1017 +a.item:active, a.item-current:active,
1018 +a.warn:active, a.warn-current:active {
1019 + display: block;
1020 + font-family: Verdana, Arial, Helvetica, sans-serif;
1021 + font-size: 10px;
1022 + color: white;
1023 + background: black;
1024 + text-decoration: none ;
1025 + border-color: #000000;
1026 + margin-top: 0px;
1027 + margin-right: 0px;
1028 + margin-bottom: 0px;
1029 + margin-left: 0px;
1030 + border-style: solid;
1031 + border-top-width: 1px;
1032 + border-right-width: 1px;
1033 + border-bottom-width: 1px;
1034 + border-left-width: 1px;
1035 + padding-right: 10px;
1036 + padding-left: 10px;
1037 + padding-bottom: 2px;
1038 + text-align: left;
1039 +}
1040 +
1041 +/*
1042 +These styles are to ensure that a selected link appears selected, even if the link
1043 +opens in another frame. This uses a javascript chunk in the head of the navigation
1044 +frame to change the style using the onClick event.
1045 +*/
1046 +a.item-current:link, a.warn-current:link,
1047 +a.item-current:visited, a.warn-current:visited,
1048 +a.item-current:active, a.warn-current:active,
1049 +a.item-current:hover, a.warn-current:hover {
1050 + display: block;
1051 + font-family: Verdana, Arial, Helvetica, sans-serif;
1052 + font-size: 10px;
1053 + color: black;
1054 + text-decoration: none;
1055 + background: #ffffff;
1056 + border-color: #888888;
1057 + margin-top: 0px;
1058 + margin-right: 0px;
1059 + margin-bottom: 0px;
1060 + margin-left: 0px;
1061 + border-style: solid;
1062 + border-top-width: 1px;
1063 + border-right-width: 1px;
1064 + border-bottom-width: 1px;
1065 + border-left-width: 1px;
1066 + padding-right: 10px;
1067 + padding-left: 10px;
1068 + padding-bottom: 2px;
1069 + text-align: left;
1070 +}
1071 +
1072 +/* these two add a border on the styles defined directly above when
1073 +the mouse is hovering over them */
1074 +a.item-current:hover, a.warn-current:hover {
1075 + border-color: #888888;
1076 +}
1077 +
1078 +/* These redefine a few elements to make room for the icon to the left of the warn class*/
1079 +a.warn:link, a.warn-current:link,
1080 +a.warn:visited, a.warn-current:visited,
1081 +a.warn:active, a.warn-current:active,
1082 +a.warn:hover, a.warn-current:hover {
1083 + background-image: url(/server-common/warn.gif);
1084 + background-repeat: no-repeat;
1085 + background-position: 10px;
1086 + padding-left: 25px;
1087 +}
1088 +/*end*/
1089 +
1090 +EOF
1091 +}
1092 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_menu.css/template-begin smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_menu.css/template-begin
1093 --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_menu.css/template-begin 1970-01-01 04:00:00.000000000 +0400
1094 +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/sme_menu.css/template-begin 2006-03-16 01:59:54.000000000 +0400
1095 @@ -0,0 +1 @@
1096 +/* DO NOT MODIFY THIS FILE! It is updated automatically */
1097 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/styles.css/50body smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/styles.css/50body
1098 --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/styles.css/50body 1970-01-01 04:00:00.000000000 +0400
1099 +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/styles.css/50body 2020-04-11 20:04:09.221000000 +0400
1100 @@ -0,0 +1,201 @@
1101 +{
1102 + $OUT = <<'EOF';
1103 +
1104 +/* smeserver_manager2 */
1105 +
1106 +/*----------------------------------------------------------------------
1107 + * copyright (C) 1999-2003 Mitel Networks Corporation
1108 + *
1109 + * This program is free software; you can redistribute it and/or modify
1110 + * it under the terms of the GNU General Public License as published by
1111 + * the Free Software Foundation; either version 2 of the License, or
1112 + * (at your option) any later version.
1113 + *
1114 + * This program is distributed in the hope that it will be useful,
1115 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1116 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1117 + * GNU General Public License for more details.
1118 + *
1119 + * You should have received a copy of the GNU General Public License
1120 + * along with this program; if not, write to the Free Software
1121 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1122 + *
1123 + * Technical support for this program is available from Mitel Networks
1124 + * Please visit our web site www.mitel.com for details.
1125 + *----------------------------------------------------------------------
1126 + */
1127 +
1128 +/* This is the basic stylesheet originally used in the mojo version.
1129 + */
1130 +
1131 +body{
1132 + background-color: #FFF;
1133 +}
1134 +
1135 +#container{
1136 + max-width: 100%;
1137 + position: relative;
1138 + margin: auto;
1139 +}
1140 +
1141 +#navigation{
1142 + width: 190px;
1143 + position: absolute;
1144 + margin-left: 0px;
1145 + padding: 5px;
1146 + background-color: #E8F3E1;
1147 +/* height: 600px; */
1148 + overflow: auto;
1149 +}
1150 +
1151 +#main{
1152 + margin-left: 195px;
1153 + padding: 10px;
1154 +}
1155 +
1156 +#central{
1157 + margin-left: 0px;
1158 + padding: 5px;
1159 +}
1160 +
1161 +#footer{
1162 + margin-left: 0px;
1163 + padding: 5px;
1164 +}
1165 +
1166 +#header {
1167 + background: #bee6a2;
1168 +}
1169 +
1170 +#header h1, a:link, a:visited {
1171 + color: black;
1172 + text-decoration: none;
1173 +/* contribs.org styling */
1174 +}
1175 +
1176 +.sme-error {
1177 + color: red;
1178 + background-color: #ffffff;
1179 + border-width: 1px;
1180 + border-style: solid;
1181 + border-color: red ;
1182 + padding: 2px;
1183 + margin-left: 10px;
1184 + margin-right: 10px;
1185 + margin-top:0px;
1186 + margin-bottom:0px;
1187 +}
1188 +
1189 +#footer img {
1190 + float: right;
1191 + position: fixed;
1192 + margin-left: 40%;
1193 +}
1194 +
1195 +label.field-with-error {
1196 + color: #dd7e5e
1197 +}
1198 +
1199 +input.field-with-error {
1200 + background-color: #fd9e7e
1201 +}
1202 +
1203 +span.label {
1204 + display: inline-block;
1205 + font-weight: bold;
1206 + background-color: #e8f3e1; /*lightgreen;*/
1207 + width: 30%;
1208 + text-align: right;
1209 +}
1210 +
1211 +span.data {
1212 + padding: 2px;
1213 + font-weight: bold;
1214 + margin-left: 0%;
1215 +/* background-color: lightblue;*/
1216 +}
1217 +
1218 +span.data2 {
1219 + padding: 2px;
1220 +/* background-color: lightblue; */
1221 +}
1222 +
1223 +input.action {
1224 + margin-left: 0px;
1225 + color: darkgreen;
1226 + background-color: #bee6a2; /*lightgreen;*/
1227 +}
1228 +
1229 +input.action2 {
1230 + margin-left: 0px;
1231 + color: black;
1232 + background-color: #d4d0c8;
1233 +}
1234 +
1235 +#modul.desc {
1236 + padding: 3px;
1237 + background-color: grey;
1238 +}
1239 +
1240 +[type = 'text'] {
1241 + margin-left: 0px;
1242 + /*background-color: lightblue;*/
1243 +}
1244 +
1245 +.a, .return {
1246 + color: #661866;
1247 + font-weight: bold;
1248 +}
1249 +
1250 +.section {
1251 + line-height: 20px;
1252 +}
1253 +.a, .item {
1254 + line-height: 15px;
1255 +}
1256 +
1257 +#module {
1258 +/* height: 600px; */
1259 + overflow: auto;
1260 +}
1261 +
1262 +
1263 +#h2l1 {
1264 + height: 40px;
1265 + width: 100%;
1266 +}
1267 +#h2e11 {
1268 + width: 70%;
1269 + float: left;
1270 +}
1271 +#h2e12 {
1272 + background-color: #C0E7A6;
1273 + float: left;
1274 + text-align: right;
1275 +}
1276 +
1277 +#h2l2 {
1278 +/* background-color: #A8F9E7;*/
1279 + border-top: solid white 3px;
1280 + border-bottom: solid white 2px;
1281 + height: 14px;
1282 + width: 100%;
1283 + padding: 1px;
1284 +}
1285 +
1286 +#h2e21 {
1287 + float: left;
1288 + width: 70%;
1289 +}
1290 +
1291 +#h2e22,#h2e23 {
1292 + float: left;
1293 + width: 10%;
1294 + text-align: center;
1295 +}
1296 +
1297 +
1298 +/*end*/
1299 +
1300 +EOF
1301 +}
1302 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/styles.css/template-begin smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/styles.css/template-begin
1303 --- smeserver-manager-0.1.0.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/styles.css/template-begin 1970-01-01 04:00:00.000000000 +0400
1304 +++ smeserver-manager-0.1.0/root/etc/e-smith/templates/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/styles.css/template-begin 2006-03-16 01:59:54.000000000 +0400
1305 @@ -0,0 +1 @@
1306 +/* DO NOT MODIFY THIS FILE! It is updated automatically */
1307 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf
1308 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf 2020-04-08 23:43:15.000000000 +0400
1309 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/conf/srvmngr.conf 2020-04-08 16:41:09.000000000 +0400
1310 @@ -1,8 +1,6 @@
1311 {
1312 secrets => ['new sessionsLeYTmFPhw3q', 'for validation QrPTZhWJmqCjyGZmguK'],
1313 -# theme => 'default',
1314 - theme => 'AdminLTE',
1315 - navigation_has_changed => 1,
1316 + theme => 'default',
1317 modules_dir => "lib/SrvMngr/Controller",
1318 debug => 0,
1319 }
1320 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Backup.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Backup.pm
1321 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Backup.pm 1970-01-01 04:00:00.000000000 +0400
1322 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Backup.pm 2020-03-29 00:57:45.000000000 +0400
1323 @@ -0,0 +1,963 @@
1324 +package SrvMngr::Controller::Backup;
1325 +
1326 +#----------------------------------------------------------------------
1327 +# heading : Administration
1328 +# description : Backup or restore
1329 +# navigation : 4000 4200
1330 +# Copyright (C) 2002 Mitel Networks Corporation
1331 +#----------------------------------------------------------------------
1332 +# routes : end
1333 +
1334 +use strict;
1335 +use warnings;
1336 +use Mojo::Base 'Mojolicious::Controller';
1337 +
1338 +use Locale::gettext;
1339 +use SrvMngr::I18N;
1340 +use SrvMngr qw(theme_list init_session_cgi ip_number_or_blank);
1341 +
1342 +use Quota;
1343 +use esmith::ConfigDB;
1344 +use esmith::AccountsDB;
1345 +
1346 +use esmith::util;
1347 +use File::Basename;
1348 +use File::Find;
1349 +use File::Path qw(make_path remove_tree);
1350 +
1351 +use esmith::Backup;
1352 +use esmith::BackupHistoryDB;
1353 +use esmith::cgi;
1354 +use esmith::util;
1355 +use esmith::lockfile;
1356 +
1357 +our $cdb = esmith::ConfigDB->open || die "Couldn't open config db";
1358 +our $adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
1359 +our $rdb = esmith::ConfigDB->open('/etc/e-smith/restore')
1360 + || die "Couldn't open restore db";
1361 +
1362 +
1363 +#$File::Find::dont_use_nlink = 1; # fix for Windows shares
1364 +
1365 +# These statements _must_ come _after_ the FormMagick constructor. It sets
1366 +# POST_MAX and DISABLE_UPLOADS to values that will cause this script to fail
1367 +# on restores and verification of files.
1368 +##$CGI::POST_MAX = -1; # allow any size POST
1369 +##$CGI::DISABLE_UPLOADS = 0; # need to upload to restore from desktop
1370 +
1371 +#$fm->parse_xml();
1372 +
1373 +my $es_backup = new esmith::Backup or die "Couldn't create Backup object\n";
1374 +
1375 +my @directories = $es_backup->restore_list;
1376 +@directories = grep { -e "/$_" } @directories;
1377 +
1378 +my @backup_excludes = $es_backup->excludes;
1379 +
1380 +# Unbuffer standard output so that files and directories are listed as
1381 +# they are restored
1382 +$| = 1;
1383 +
1384 +# Store away current gid of 'www' group.
1385 +my $www_gid = getgrnam("www");
1386 +
1387 +
1388 +sub main {
1389 +
1390 + my $c = shift;
1391 + $c->app->log->info($c->log_req);
1392 +
1393 + my %bac_datas = ();
1394 + my $title = $c->l('bac_BACKUP_TITLE');
1395 + my $notif;
1396 +
1397 + $bac_datas{'function'} = 'desktop_backup';
1398 + my ($tarsize, $dumpsize, undef, undef) = $c->CalculateSizes();
1399 +
1400 + my $module = $cdb->get('backup');
1401 + if ($module) {
1402 + $module = $module->prop('Program');
1403 + }
1404 +
1405 + # The default e-smith backup program is flexbackup.
1406 + unless (defined $module) {
1407 + $module = "flexbackup";
1408 + } elsif ($module eq '') {
1409 + $module = "flexbackup";
1410 + }
1411 +
1412 + $bac_datas{'tarsize'} = $tarsize;
1413 + $bac_datas{'dumpsize'} = $dumpsize;
1414 + $bac_datas{'module'} = $module;
1415 +
1416 + if ($tarsize =~ /Tb/ or $tarsize =~ /(\d+)Gb/ and $1 >= 2) {
1417 + $notif = $c->l("bac_BACKUP_DESKTOP_TOO_BIG");
1418 + }
1419 +
1420 + my $rec = $cdb->get('backup');
1421 + my ($backup_status, $backupwk_status) = 'disabled';
1422 +
1423 + if ($rec) {
1424 + $backup_status = $rec->prop('status') || 'disabled';
1425 + }
1426 +
1427 + if ($backup_status eq "enabled") {
1428 + $bac_datas{'backupTime'} = $rec->prop('backupTime');
1429 + $bac_datas{'reminderTime'} = $rec->prop('reminderTime');
1430 + }
1431 +
1432 + $rec = $cdb->get('backupwk');
1433 + if ($rec) {
1434 + $backupwk_status = $rec->prop('status') || 'disabled';
1435 + }
1436 +
1437 + if ($backupwk_status eq "enabled") {
1438 + $bac_datas{'backupwkTime'} = $rec->prop('BackupTime');
1439 +
1440 + }
1441 +
1442 + $bac_datas{'backupStatus'} = $backup_status;
1443 + $bac_datas{'backupwkStatus'} = $backupwk_status;
1444 +
1445 + $c->stash( title => $title, notif => $notif, bac_datas => \%bac_datas );
1446 + $c->render(template => 'backup');
1447 +
1448 +};
1449 +
1450 +
1451 +sub do_display {
1452 +
1453 + my $c = shift;
1454 + $c->app->log->info($c->log_req);
1455 +
1456 + my $rt = $c->current_route;
1457 + my ($res, $result) = '';
1458 +
1459 + my $function = $c->param('Function');
1460 +
1461 + if ($function =~ /^(\S+)$/) {
1462 + $function = $1;
1463 + } elsif ($function =~ /^\s*$/) {
1464 + $function = "zoverall";
1465 + } else {
1466 + $result = $c->l('bac_INVALID_FUNCTION') . $function;
1467 + $function = undef;
1468 + }
1469 +
1470 + my %bac_datas = ();
1471 + $bac_datas{'function'} = $function;
1472 +
1473 + my $title = $c->l('bac_BACKUP_TITLE');
1474 + my ($notif, $dest) = '';
1475 +
1476 + if ( $function eq 'desktop_backup' ) {
1477 + my $res = desktopBackup();
1478 + $result .= $res unless $res eq 'OK';
1479 + if ( ! $result ) {
1480 + $bac_datas{function} = 'SUC';
1481 + $result = $c->l('bac_SUCCESS');
1482 + $c->app->log->info('desktop backup LAUNCHED');
1483 + $c->flash(success => $result);
1484 + } else {
1485 + $c->flash(error => $result);
1486 + }
1487 + $c->redirect_to("backup");
1488 + }
1489 +
1490 +
1491 + if ( $function eq 'tape_configure' ) {
1492 +
1493 + $bac_datas{'status'} = 'unchecked';
1494 + my $backupTime = "2:00";
1495 +
1496 + my $rec = $cdb->get('backup');
1497 + if ($rec) {
1498 + $backupTime = $rec->prop('backupTime') || "2:00";
1499 +
1500 + my $backup_status = $rec->prop('status');
1501 + if (defined $backup_status && $backup_status eq "enabled") {
1502 + $bac_datas{'status'} = "checked";
1503 + }
1504 + }
1505 + ($bac_datas{backupAMPM}, $bac_datas{reminderAMPM}) = 'AM';
1506 +
1507 + ($bac_datas{backupHour}, $bac_datas{backupMin}) = split (":", $backupTime, -1);
1508 + if ($bac_datas{backupHour} > 11) {
1509 + if ($bac_datas{backupHour} > 12) {
1510 + $bac_datas{backupHour} -= 12;
1511 + }
1512 + $bac_datas{backupAMPM} = 'PM';
1513 + }
1514 +
1515 + # Obtain time for reminder notice from the backup cron template
1516 + my $reminderTime = "14:00";
1517 + if ($rec) {
1518 + $reminderTime = $rec->prop('reminderTime') || "14:00";
1519 + }
1520 +
1521 + ($bac_datas{reminderHour}, $bac_datas{reminderMin}) = split (":", $reminderTime, -1);
1522 + if ($bac_datas{reminderHour} > 12) {
1523 + $bac_datas{reminderHour} -= 12;
1524 + $bac_datas{reminderAMPM} = 'PM';
1525 + }
1526 + }
1527 +
1528 +
1529 + if ( $function eq 'workstn_configure' ) {
1530 +
1531 + my $rec = $cdb->get('backupwk');
1532 + $bac_datas{vfstype} = $rec->prop('VFSType') || 'cifs';
1533 + $bac_datas{status} = $rec->prop('status');
1534 +
1535 + }
1536 +
1537 +
1538 + $dest = "back_$function";
1539 +
1540 + $c->stash( title => $title, notif => $result, bac_datas => \%bac_datas );
1541 + return $c->render( template => $dest );
1542 +
1543 +};
1544 +
1545 +
1546 +sub do_update {
1547 +
1548 + my $c = shift;
1549 + $c->app->log->info($c->log_req);
1550 +
1551 + my $rt = $c->current_route;
1552 + my $function = $c->param('Function');
1553 +
1554 + my %bac_datas = ();
1555 + $bac_datas{function} = $function;
1556 + my $title = $c->l('bac_BACKUP_TITLE');
1557 + my ($dest, $res, $result) = '';
1558 +
1559 +
1560 + if ( $function eq 'desktop_backup' ) {
1561 +
1562 + # should not happen !! no desktop_backup template !!
1563 +
1564 + my $res = desktopBackup();
1565 + $result .= $res unless $res eq 'OK';
1566 + if ( ! $result ) {
1567 + $bac_datas{function} = 'SUC';
1568 + $result = $c->l('bac_SUCCESS');
1569 + $c->stash( notif => $result );
1570 + $c->redirect_to("/backup");
1571 + }
1572 + }
1573 +
1574 +
1575 + if ( $function eq 'tape_configure' ) {
1576 +
1577 + my $status = $c->param('Tapebackup');
1578 + my $backupHour = $c->param('BackupHour');
1579 + my $backupMin = $c->param('BackupMin');
1580 + my $bampm = $c->param('BackupAMPM');
1581 + my $reminderHour = $c->param('ReminderHour');
1582 + my $reminderMin = $c->param('ReminderMin');
1583 + my $rampm = $c->param('ReminderAMPM');
1584 +
1585 + ## $c->l('bac_UPDATING_TAPE_CONF')
1586 +
1587 + if (defined $status && $status eq "on") {
1588 +
1589 + if ($backupHour =~ /^(.*)$/) {
1590 + $backupHour = $1;
1591 + } else {
1592 + $backupHour = "12";
1593 + }
1594 + if (($backupHour < 1) || ($backupHour > 12)) {
1595 + $result .= $c->l('bac_ERR_INVALID_HOUR').$backupHour.
1596 + ' '.$c->l('bac_BETWEEN_0_AND_12').' ';
1597 + }
1598 +
1599 + if ($backupMin =~ /^(.*)$/) {
1600 + $backupMin = $1;
1601 + } else {
1602 + $backupMin = "0";
1603 + }
1604 + if (($backupMin < 0) || ($backupMin > 59)) {
1605 + $result .= $c->l('bac_ERR_INVALID_MINUTE').$backupMin.
1606 + ' '.$c->l('bac_BETWEEN_0_AND_59').' ';
1607 + }
1608 +
1609 + if ($reminderHour =~ /^(.*)$/) {
1610 + $reminderHour = $1;
1611 + } else {
1612 + $reminderHour = "12";
1613 + }
1614 + if (($reminderHour < 1) || ($reminderHour > 12)) {
1615 + $result .= $c->l('bac_ERR_INVALID_REMINDER_HOUR').$reminderHour.
1616 + ' '.$c->l('bac_BETWEEN_0_AND_12').' ';
1617 + }
1618 +
1619 + if ($reminderMin =~ /^(.*)$/) {
1620 + $reminderMin = $1;
1621 + } else {
1622 + $reminderMin = "0";
1623 + }
1624 + if (($reminderMin < 0) || ($reminderMin > 59)) {
1625 + $result .= $c->l('bac_ERR_INVALID_REMINDER_MINUTE').$reminderMin.
1626 + ' '.$c->l('bac_BETWEEN_0_AND_59').' ';
1627 + }
1628 + }
1629 + else
1630 + {
1631 + # service disabled no controls
1632 + }
1633 +
1634 + ##$result .= ' ** Blocked for testing ** !';
1635 +
1636 + if ( ! $result ) {
1637 + $res = $c->updateTapeBackupConfig($status, $backupHour,
1638 + $backupMin, $bampm, $reminderHour, $reminderMin, $rampm);
1639 +
1640 + $result .= $res unless $res eq 'OK';
1641 + if ( ! $result ) {
1642 + $bac_datas{function} = 'SUC';
1643 + if (defined $status && $status eq "on") {
1644 + $result .= ($c->l('bac_SUCCESSFULLY_ENABLED_TAPE').' '.
1645 + $c->l('bac_WITH_BACKUP_TIME')."$backupHour:$backupMin".' '.
1646 + $c->l('bac_WITH_REMINDER_TIME')."$reminderHour:$reminderMin");
1647 + } else {
1648 + $result .= $c->l('bac_SUCCESSFULLY_DISABLED');
1649 + }
1650 + }
1651 + }
1652 + }
1653 +
1654 +
1655 + if ( $function eq 'tape_restore' ) {
1656 +
1657 + my $lock_file = "/var/lock/subsys/e-smith-restore";
1658 + my $file_handle = &esmith::lockfile::LockFileOrReturn($lock_file);
1659 +
1660 + unless ($file_handle) {
1661 + $result .= $c->l('bac_UNABLE_TO_RESTORE_CONF').' '.
1662 + $c->l('ANOTHER_RESTORE_IN_PROGRESS');
1663 + }
1664 +
1665 + $result .= ' ** Blocked for testing ** ! (HARD TO TEST!)';
1666 +
1667 + if ( ! $result ) {
1668 + my $res = $c->tapeRestore( $lock_file, $file_handle );
1669 + $result .= $res unless $res eq 'OK';
1670 + if ( ! $result ) {
1671 + $bac_datas{function} = 'SUC';
1672 + $result = $c->l('bac_SUCCESS');
1673 + }
1674 + }
1675 + }
1676 +
1677 +
1678 + if ( $function eq 'workstn_configure' ) {
1679 +
1680 +# $bac_datas{xxx} = $c->param('XXX');
1681 +
1682 + # controls
1683 +# $res = $c->zzzz( $c->param('ZZZZ') );
1684 +# $result .= $res . ' DMS ' unless $res eq 'OK';
1685 +
1686 + $result .= ' ** Blocked for testing ** !';
1687 +
1688 + if ( ! $result ) {
1689 + $res = $c->workstnConfigure();
1690 + $result .= $res unless $res eq 'OK';
1691 + if ( ! $result ) {
1692 + $bac_datas{function} = 'SUC';
1693 + $result = $c->l('bac_SUCCESS');
1694 + }
1695 + }
1696 + }
1697 +
1698 +
1699 + if ( $function eq 'workstn_verify' ) {
1700 +
1701 +# $bac_datas{xxx} = $c->param('XXX');
1702 +
1703 + # controls
1704 +# $res = $c->zzzz( $c->param('ZZZZ') );
1705 +# $result .= $res . ' DMS ' unless $res eq 'OK';
1706 +
1707 + $result .= ' ** Blocked for testing ** !';
1708 +
1709 + if ( ! $result ) {
1710 + $res = $c->workstnVerify();
1711 + $result .= $res unless $res eq 'OK';
1712 + if ( ! $result ) {
1713 + $bac_datas{function} = 'SUC';
1714 + $result = $c->l('bac_SUCCESS');
1715 + }
1716 + }
1717 + }
1718 +
1719 +
1720 + if ( $function eq 'workstn_restore' ) {
1721 +
1722 +# $bac_datas{xxx} = $c->param('XXX');
1723 +
1724 + # controls
1725 +# $res = $c->zzzz( $c->param('ZZZZ') );
1726 +# $result .= $res . ' DMS ' unless $res eq 'OK';
1727 +
1728 + $result .= ' ** Blocked for testing ** !';
1729 +
1730 + if ( ! $result ) {
1731 + $res = $c->workstnRestore();
1732 + $result .= $res unless $res eq 'OK';
1733 + if ( ! $result ) {
1734 + $bac_datas{function} = 'SUC';
1735 + $result = $c->l('bac_SUCCESS');
1736 + }
1737 + }
1738 + }
1739 +
1740 +
1741 + if ( $function eq 'workstn_sel_restore' ) {
1742 +
1743 +# $bac_datas{xxx} = $c->param('XXX');
1744 +
1745 + # controls
1746 +# $res = $c->zzzz( $c->param('ZZZZ') );
1747 +# $result .= $res . ' DMS ' unless $res eq 'OK';
1748 +
1749 + $result .= ' ** Blocked for testing ** !';
1750 +
1751 + if ( ! $result ) {
1752 + $res = $c->workstnSelRestore();
1753 + $result .= $res unless $res eq 'OK';
1754 + if ( ! $result ) {
1755 + $bac_datas{function} = 'SUC';
1756 + $result = $c->l('bac_SUCCESS');
1757 + }
1758 + }
1759 + }
1760 +
1761 +
1762 + # common part for all functions
1763 +
1764 + $c->stash( title => $title, bac_datas => \%bac_datas );
1765 + if ($bac_datas{function} ne 'SUC') {
1766 + $c->flash(error => $result);
1767 + $bac_datas{'function'} = $function;
1768 + $dest = "back_$function";
1769 + return $c->render(template => $dest);
1770 + }
1771 +
1772 + my $message = $function . ' updates DONE';
1773 + $c->app->log->info($message);
1774 + $c->flash(success => $result);
1775 +
1776 + #return to 'backup' route !!!
1777 + $c->redirect_to('backup');
1778 +
1779 +};
1780 +
1781 +
1782 +sub get_function_options {
1783 +
1784 + my $c = shift;
1785 +
1786 + return [[ $c->l('bac_DESKTOP_BACKUP') => 'desktop_backup' ],
1787 + [ $c->l('bac_TAPE_CONFIGURE') => 'tape_configure' ],
1788 + [ $c->l('bac_TAPE_RESTORE') => 'tape_restore' ],
1789 + [ $c->l('bac_WORKSTN_CONFIGURE') => 'workstn_configure' ],
1790 + [ $c->l('bac_WORKSTN_VERIFY') => 'workstn_verify' ],
1791 + [ $c->l('bac_WORKSTN_RESTORE') => 'workstn_restore' ],
1792 + [ $c->l('bac_WORKSTN_SEL_RESTORE') => 'workstn_sel_restore']];
1793 +
1794 +}
1795 +
1796 +
1797 +sub desktopBackup {
1798 +
1799 + my $c = shift;
1800 +
1801 + # Generate a header that will trigger a download and send data as
1802 + # an octet stream.
1803 +
1804 + my $backups = esmith::BackupHistoryDB->open;
1805 + my $now = time();
1806 + my $backup_rec = $backups->new_record($now, {
1807 + type => 'backup_record',
1808 + BackupType => 'desktop',
1809 + StartEpochTime => $now,
1810 + });
1811 + my $CompressionLevel = $cdb->get_prop("backupconsole", "CompressionLevel") || "-6";
1812 + my @exclude = map (" --exclude=$_",@backup_excludes);
1813 +
1814 + # Dump the current mysql tables so that they are part of the image.
1815 + # The events handle cases where mysqld is not enabled, and/or is
1816 + # not running.
1817 +
1818 + my $status = system("/sbin/e-smith/signal-event", "pre-backup", "desktop");
1819 + if ($status)
1820 + {
1821 + desktopBackupRecordStatus($backup_rec, 'pre-backup', $status);
1822 + return ($c->l('bac_OPERATION_STATUS_REPORT').
1823 + $c->l('bac_ERR_PRE_BACKUP'));
1824 + }
1825 +
1826 + print "Expires: 0\n";
1827 + print "Content-type: application/octet-stream\n";
1828 + print "Content-disposition: attachment; filename=smeserver.tgz\n";
1829 + print "\n";
1830 + setpgrp;
1831 + my $ourpgrp = getpgrp;
1832 + local $SIG{PIPE} = sub
1833 + {
1834 + local $SIG{HUP} = 'IGNORE';
1835 + warn "Got sigpipe - sending HUP to $ourpgrp\n";
1836 + kill HUP => -$ourpgrp;
1837 + desktopBackupRecordStatus($backup_rec,
1838 + 'send2browser', 'Incomplete');
1839 + exit 1;
1840 + };
1841 +
1842 + open(RD,
1843 + "/bin/tar --directory / --create @directories --file=-"
1844 + . "@exclude | /usr/bin/gzip $CompressionLevel |"
1845 + );
1846 +
1847 + while (<RD>)
1848 + {
1849 + print;
1850 + }
1851 +
1852 + close RD;
1853 +
1854 + # Remove the dumped tables.
1855 +
1856 + $status = system("/sbin/e-smith/signal-event", "post-backup", "desktop");
1857 + if ($status)
1858 + {
1859 + desktopBackupRecordStatus($backup_rec, 'post-backup', $status);
1860 + die ($c->l('bac_ERR_POST_BACKUP'),"\n");
1861 + }
1862 + $now = time();
1863 + $backup_rec->set_prop('EndEpochTime', "$now");
1864 + $backup_rec->set_prop('Result', "0");
1865 +}
1866 +
1867 +
1868 +sub desktopBackupRecordStatus {
1869 +
1870 + my ($backup, $phase, $status) = @_;
1871 + my $now = time();
1872 +
1873 + warn("Backup terminated: $phase failed - status: $status\n");
1874 + $backup->set_prop('EndEpochTime', "$now");
1875 + $backup->set_prop('Result', "$phase:$status");
1876 +}
1877 +
1878 +
1879 +sub updateTapeBackupConfig {
1880 +
1881 + my ($c, $status, $backupHour, $backupMin, $bampm,
1882 + $reminderHour, $reminderMin, $rampm) = @_;
1883 +
1884 + if (defined $status && $status eq "on") {
1885 +
1886 + $backupMin = sprintf("%02d", $backupMin);
1887 +
1888 + if ($bampm =~ /^(.*)$/) {
1889 + $bampm = $1;
1890 + } else {
1891 + $bampm = "AM";
1892 + }
1893 + # convert to 24 hour time
1894 + $backupHour = $backupHour % 12;
1895 + if ($bampm eq "PM") {
1896 + $backupHour = $backupHour + 12;
1897 + }
1898 +
1899 + $reminderMin = sprintf("%02d", $reminderMin);
1900 +
1901 + if ($rampm =~ /^(.*)$/) {
1902 + $rampm = $1;
1903 + } else {
1904 + $rampm = "AM";
1905 + }
1906 + # convert to 24 hour time
1907 + $reminderHour = $reminderHour % 12;
1908 + if ($rampm eq "PM") {
1909 + $reminderHour = $reminderHour + 12;
1910 + }
1911 +
1912 + # variables passed validity checks, set configuration database values
1913 + my $oldUnsav = $cdb->get('UnsavedChanges')->value;
1914 +
1915 + my $rec = $cdb->get('backup');
1916 + unless (defined $rec)
1917 + {
1918 + $rec = $cdb->new_record('backup', {type=>'service'});
1919 + }
1920 +
1921 + $rec->set_prop('status', 'enabled');
1922 +
1923 + my $module = $rec->prop('Program');
1924 +
1925 + # The default e-smith backup program is flexbackup.
1926 +
1927 + unless (defined $module) {
1928 + $module = "flexbackup";
1929 + } elsif ($module eq '') {
1930 + $module = "flexbackup";
1931 + }
1932 +
1933 + $rec->set_prop('Program', $module);
1934 + $rec->set_prop('backupTime', "$backupHour:$backupMin");
1935 + $rec->set_prop('reminderTime', "$reminderHour:$reminderMin");
1936 +
1937 + $cdb->get('UnsavedChanges')->set_value($oldUnsav);
1938 +
1939 + system("/sbin/e-smith/signal-event", "conf-backup") == 0
1940 + or return ($c->l('bac_ERR_CONF_BACKUP'),"\n");
1941 +
1942 + return 'OK';
1943 + }
1944 + else
1945 + {
1946 + # set service to disabled
1947 + my $oldUnsav = $cdb->get('UnsavedChanges')->value;
1948 +
1949 + my $rec = $cdb->get('backup');
1950 + unless ($rec)
1951 + {
1952 + $rec = $cdb->new_record('backup', {type=>'service'});
1953 + }
1954 +
1955 + $rec->set_prop('status', 'disabled');
1956 + $cdb->get('UnsavedChanges')->set_value($oldUnsav);
1957 +
1958 + system("/sbin/e-smith/signal-event", "conf-backup") == 0
1959 + or return ($c->l('bac_ERR_CONF_BACKUP')."\n");
1960 +
1961 + return 'OK';
1962 + }
1963 +
1964 + return undef;
1965 +}
1966 +
1967 +
1968 +sub CalculateSizes () {
1969 +
1970 + my $c = shift;
1971 +
1972 + #------------------------------------------------------------
1973 + # figure out the size of the tar file.
1974 + #------------------------------------------------------------
1975 +
1976 + my $tarsize = 0;
1977 +
1978 + # It takes way too much time to do a du on /home/e-smith. So we'll
1979 + # estimate the current size.
1980 + # We do this by checking the quota used by each user on the system.
1981 +
1982 + # Get a $dev value appropriate for use in Quota::query call.
1983 + my $dev = Quota::getqcarg("/home/e-smith/files");
1984 +
1985 + foreach my $user ($adb->users())
1986 + {
1987 + my $name = $user->key;
1988 + my $uid = getpwnam($name);
1989 + unless ($uid)
1990 + {
1991 + warn ($c->l('bac_NO_UID_FOR_NAME').$name."\n");
1992 + # We shouldn't ever get here. If we do, we can't get
1993 + # the quota value for this user, so we just skip to
1994 + # the next one.
1995 + next;
1996 + }
1997 +
1998 + # Get current quota settings.
1999 + my ($blocks) = Quota::query($dev, $uid, 0);
2000 + $tarsize += $blocks;
2001 + }
2002 +
2003 + # We add to this the size of root owned firectories, estimated using du.
2004 + # If this takes too long, then the admin only has his or
2005 + # herself to blame!
2006 +
2007 + # Remove /home/e-smith from backup list, and make paths absolute
2008 + my @list = map { "/$_" } grep { !/home\/e-smith/ } @directories;
2009 + open(DU, "-|")
2010 + or exec '/usr/bin/du', '-s', @list;
2011 +
2012 + while (<DU>)
2013 + {
2014 + my ($du) = split(/\s+/);
2015 + $tarsize += $du;
2016 + }
2017 + close DU;
2018 +
2019 + $tarsize = showSize($tarsize);
2020 +
2021 + #------------------------------------------------------------
2022 + # figure out the size of the dump files
2023 + #------------------------------------------------------------
2024 +
2025 + my $dumpsize = 0;
2026 +
2027 + open(DF, "-|")
2028 + or exec '/bin/df', '-P', '-t', 'ext3', '-t', 'ext4';
2029 +
2030 + while (<DF>)
2031 + {
2032 + next unless (/^\//);
2033 +
2034 + (undef, undef, my $s, undef) = split(/\s+/, $_);
2035 +
2036 + $dumpsize += $s;
2037 + }
2038 +
2039 + # increase size by 10% to cope with dump overhead.
2040 +
2041 + $dumpsize *= 1.1;
2042 +
2043 + close DF;
2044 +
2045 + $dumpsize = showSize($dumpsize);
2046 +
2047 + #------------------------------------------------------------
2048 + # how much free space is in /tmp
2049 + #------------------------------------------------------------
2050 +
2051 + my $tmpfree = 0;
2052 + my $halffree = 0;
2053 +
2054 + open(DF, "-|")
2055 + or exec '/bin/df', '-P', '-t', 'ext3', '-t', 'ext4', '/tmp';
2056 +
2057 + while (<DF>)
2058 + {
2059 + next unless (/^\//);
2060 +
2061 + (undef, undef, undef, my $s) = split(/\s+/, $_);
2062 +
2063 + $tmpfree += $s;
2064 + }
2065 +
2066 + close DF;
2067 +
2068 + $halffree = $tmpfree / 2;
2069 +
2070 + $tmpfree = showSize($tmpfree);
2071 + $halffree = showSize($halffree);
2072 +
2073 + return ($tarsize, $dumpsize, $tmpfree, $halffree);
2074 +}
2075 +
2076 +
2077 +sub showSize {
2078 +
2079 + # convert size to Mb or Gb or Tb :) Remember, df reports in kb.
2080 +
2081 + my $size = shift;
2082 +
2083 + my $Mb = 1024;
2084 + my $Gb = $Mb * $Mb;
2085 + my $Tb = $Mb * $Mb * $Mb;
2086 +
2087 + if ($size >= $Tb) {
2088 + $size /= $Tb;
2089 + $size = int($size) . "Tb";
2090 + } elsif ($size >= $Gb) {
2091 + $size /= $Gb;
2092 + $size = int($size) . "Gb";
2093 + } elsif ($size >= $Mb) {
2094 + $size /= $Mb;
2095 + $size = int($size) . "Mb";
2096 + } else {
2097 + $size .= "kb";
2098 + }
2099 +
2100 + return $size;
2101 +}
2102 +
2103 +
2104 +sub tapeRestore {
2105 +
2106 + my ($c, $lock_file, $file_handle) = @_;
2107 +
2108 + my $rec = $rdb->get('restore');
2109 + $rec->set_prop('state', 'running');
2110 + $rec->set_prop('start', time);
2111 +
2112 + my $sec = 10;
2113 + print "Refresh: $sec; URL=/server-manager2/backup\n";
2114 + print $c->l('bac_NOW_RESTORING_FROM_TAPE');
2115 + print $c->l('bac_MUST_REBOOT_AFTER_RESTORE');
2116 + print $c->l('bac_PAGE_REFRESH_IN', $sec);
2117 +
2118 + my $child;
2119 +
2120 + if ($child = fork) {
2121 + # Parent
2122 + $SIG{'CHLD'} = 'IGNORE';
2123 + &esmith::lockfile::UnlockFile($file_handle);
2124 + return 'OK';
2125 + }
2126 + elsif (defined $child) {
2127 + # Child
2128 + # Re-establish the lock. Wait till it is relinquished by the parent.
2129 +
2130 + $file_handle = &esmith::lockfile::LockFileOrWait($lock_file);
2131 +
2132 + # Close STDOUT so that the web server connection is closed.
2133 + close STDOUT;
2134 +
2135 + # Now reopen STDOUT for the child. Redirect it to STDERR.
2136 + open(STDOUT, ">&STDERR");
2137 +
2138 + unless(system("/sbin/e-smith/signal-event", "pre-restore") == 0)
2139 + {
2140 + $rec->set_prop('errmsg', $c->l('bac_ERR_PRE_RESTORE'));
2141 + $rec->delete_prop('state');
2142 + die ($c->l('bac_ERR_PRE_RESTORE'),"\n");
2143 + }
2144 +
2145 + unless(system("/sbin/e-smith/signal-event", "restore-tape") == 0)
2146 + {
2147 + $rec->set_prop('errmsg', $c->l('bac_ERR_RESTORING_FROM_TAPE'));
2148 + $rec->delete_prop('state');
2149 + die ($c->l('bac_ERR_RESTORING_FROM_TAPE')."\n");
2150 + }
2151 +
2152 + #----------------------------------------
2153 + # regenerate configuration files
2154 + #----------------------------------------
2155 +
2156 + unless(system("/usr/sbin/groupmod", "-g", "$www_gid", "www") == 0)
2157 + {
2158 + $rec->set_prop('errmsg', $rec->prop('errmsg').'<br>'.
2159 + $c->l('bac_ERR_RESTORING_GID'));
2160 + warn ($c->l('bac_ERR_RESTORING_GID')."\n");
2161 + }
2162 + unless(system("/usr/sbin/usermod", "-g", "$www_gid", "www") == 0)
2163 + {
2164 + $rec->set_prop('errmsg', $rec->prop('errmsg').'<br>'.
2165 + $c->l('bac_ERR_RESTORING_INITIAL_GRP'));
2166 + warn ($c->l('bac_ERR_RESTORING_INITIAL_GRP')."\n");
2167 + }
2168 + unless(system("/sbin/e-smith/signal-event", "post-upgrade") == 0)
2169 + {
2170 + $rec->set_prop('errmsg', $rec->prop('errmsg').'<br>'.
2171 + $c->l('bac_ERR_UPDATING_CONF_AFTER_TAPE_RESTORE'));
2172 + $rec->delete_prop('state');
2173 + die ($c->l('bac_ERR_UPDATING_CONF_AFTER_TAPE_RESTORE'));
2174 + }
2175 +
2176 + my $finish = time;
2177 + $rec->set_prop('state', 'complete');
2178 + $rec->set_prop('finish', $finish);
2179 +
2180 + my $start = $rec->prop('start');
2181 + $start = scalar localtime($start);
2182 + $finish = scalar localtime($finish);
2183 +
2184 + &esmith::lockfile::UnlockFile($file_handle);
2185 +
2186 + exit;
2187 + }
2188 + else
2189 + {
2190 + # Error
2191 +
2192 + $rec->delete_prop('state');
2193 + $rec->set_prop('errmsg', $c->l('bac_COULD_NOT_FORK'));
2194 + die ($c->l("bac_COULD_NOT_FORK")." $!\n");
2195 + }
2196 +}
2197 +
2198 +
2199 +sub get_VFSType_options {
2200 +
2201 + my $c = shift;
2202 + return [[ $c->l('cifs') => 'cifs' ], [ $c->l('nfs') => 'nfs' ],
2203 + [ $c->l('local removable disk') => 'usb' ], [ $c->l('Mounted disk') => 'mnt' ]];
2204 +}
2205 +
2206 +
2207 +sub getWorkstnBackupConfig {
2208 +
2209 + my ($c) = @_;
2210 + my $out;
2211 +
2212 + my $backupwk_status;
2213 + my $enabledIncOnlyTimeout = "";
2214 + my $backupwkLogin = 'backup';
2215 + my $backupwkPassword = 'backup';
2216 + my $backupwkStation = 'host';
2217 + my $backupwkFolder = 'share';
2218 + my $backupwkMount = '/mnt/smb';
2219 + my $setsNumber;
2220 + my $filesinset;
2221 + my $backupwkTime;
2222 + my $backupwkTimeout;
2223 + my $backupwkIncOnlyTimeout;
2224 + my $VFSType;
2225 + my $compression;
2226 + my $dof;
2227 + my @dlabels = split(' ', $c->l('bac_DOW'));
2228 +
2229 + # Obtain backup informations from configuration
2230 + my $rec = $cdb->get('backupwk');
2231 + if ($rec) {
2232 + $backupwkTime = $rec->prop('BackupTime') || '2:00';
2233 + $backupwkLogin = $rec->prop('Login') || 'backup';
2234 + $backupwkPassword = $rec->prop('Password') || 'backup';
2235 + $backupwkStation = $rec->prop('SmbHost') || 'host';
2236 + $backupwkFolder = $rec->prop('SmbShare') || 'share';
2237 + $backupwkMount = $rec->prop('Mount') || '/mnt/smb';
2238 + $VFSType = $rec->prop('VFSType') || 'cifs';
2239 + $setsNumber = $rec->prop('SetsMax') || '1';
2240 + $filesinset = $rec->prop('DaysInSet') || '1';
2241 + $backupwkTimeout = $rec->prop('Timeout') || '12';
2242 + $backupwkIncOnlyTimeout = $rec->prop('IncOnlyTimeout') || 'yes';
2243 + $compression = $rec->prop('Compression') || '0';
2244 + $dof = (defined $rec->prop('FullDay')) ? $rec->prop('FullDay') : '7';
2245 + $backupwk_status = $rec->prop('status');
2246 + }
2247 +
2248 + if ($rec) {
2249 + if ($VFSType eq 'usb') {
2250 + $out .= $c->l('bac_WORKSTN_BACKUP_USB').' '.$backupwkFolder.'<br/>';
2251 + }
2252 + elsif ($VFSType eq 'mnt') {
2253 + $out .= $c->l('bac_WORKSTN_BACKUP_MNT').' '.$backupwkMount.'<br/>';
2254 + } else {
2255 + $out .= $c->l('bac_WORKSTN_BACKUP_HOST').' '.$backupwkStation.' ';
2256 + $out .= $c->l('bac_WORKSTN_BACKUP_VFSTYPE').' '.$VFSType.'<br/>';
2257 + $out .= $c->l('bac_WORKSTN_BACKUP_SHARE').' '.$backupwkFolder.'<br/>';
2258 + }
2259 + if ($VFSType eq 'cifs') {
2260 + $out .= $c->l('bac_LOGIN').' '.$backupwkLogin.'<br/>';
2261 + $out .= $c->l('PASSWORD').' ********<br/>';
2262 + }
2263 + $out .= $c->l('bac_WORKSTN_BACKUP_SETSNUM').' '.$setsNumber.'<br/>';
2264 + $out .= $c->l('bac_WORKSTN_BACKUP_DAYSINSET').' '.$filesinset.'<br/>';
2265 + $out .= $c->l('bac_WORKSTN_BACKUP_COMPRESSION').' '.$compression.'<br/>';
2266 + $out .= $c->l('bac_WORKSTN_BACKUP_TOD').' '.$backupwkTime.'<br/>';
2267 + $out .= $c->l('bac_WORKSTN_BACKUP_TIMEOUT').' '.$backupwkTimeout.' '.$c->l('bac_HOURS');
2268 + if ( $backupwkIncOnlyTimeout eq 'yes' ) {
2269 + $out .= $c->l('bac_WORKSTN_BACKUP_INCONLY_TIMEOUT')
2270 + }
2271 + $out .= '<br/>';
2272 +
2273 + if ( $dof eq '7' ) {
2274 + $out .= $c->l('bac_WORKSTN_FULL_BACKUP_EVERYDAY').'<br/>';
2275 + } else {
2276 + $out .= $c->l('bac_WORKSTN_FULL_BACKUP_DAY').' '.$dlabels[$dof].'<br/>';
2277 + }
2278 + } else {
2279 + $out = $c->l('bac_WORKSTN_BACKUP_NOT_CONFIGURED');
2280 + }
2281 +
2282 + return $out;
2283 +}
2284 +
2285 +
2286 +1;
2287 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Bugreport.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Bugreport.pm
2288 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Bugreport.pm 2020-04-08 23:43:15.000000000 +0400
2289 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Bugreport.pm 2020-03-29 00:58:37.000000000 +0400
2290 @@ -1,5 +1,12 @@
2291 package SrvMngr::Controller::Bugreport;
2292
2293 +#----------------------------------------------------------------------
2294 +# heading : Miscellaneous
2295 +# description : Report a bug
2296 +# navigation : 7000 7300
2297 +
2298 +# routes : end
2299 +#------------------------------
2300 use strict;
2301 use warnings;
2302 use Mojo::Base 'Mojolicious::Controller';
2303 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Clamav.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Clamav.pm
2304 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Clamav.pm 2020-04-08 23:43:15.000000000 +0400
2305 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Clamav.pm 2020-03-29 00:59:33.000000000 +0400
2306 @@ -1,5 +1,13 @@
2307 package SrvMngr::Controller::Clamav;
2308
2309 +#----------------------------------------------------------------------
2310 +# heading : Configuration
2311 +# description : Antivirus (ClamAV)
2312 +# navigation : 6000 6720
2313 +#
2314 +# routes : end
2315 +#------------------------------
2316 +
2317 use strict;
2318 use warnings;
2319 use Mojo::Base 'Mojolicious::Controller';
2320 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Datetime.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Datetime.pm
2321 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Datetime.pm 2020-04-08 23:43:15.000000000 +0400
2322 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Datetime.pm 2020-03-29 01:00:09.000000000 +0400
2323 @@ -1,5 +1,13 @@
2324 package SrvMngr::Controller::Datetime;
2325
2326 +#----------------------------------------------------------------------
2327 +# heading : Configuration
2328 +# description : Date and time
2329 +# navigation : 6000 6100
2330 +
2331 +# routes : end
2332 +#------------------------------
2333 +
2334 use strict;
2335 use warnings;
2336 use Mojo::Base 'Mojolicious::Controller';
2337 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Directory.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Directory.pm
2338 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Directory.pm 2020-04-08 23:43:15.000000000 +0400
2339 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Directory.pm 2020-03-29 01:01:13.000000000 +0400
2340 @@ -1,5 +1,13 @@
2341 package SrvMngr::Controller::Directory;
2342
2343 +#----------------------------------------------------------------------
2344 +# heading : Configuration
2345 +# description : Directory
2346 +# navigation : 6000 6300
2347 +#
2348 +# routes : end
2349 +#----------------------------------------------------------------------
2350 +
2351 use strict;
2352 use warnings;
2353 use Mojo::Base 'Mojolicious::Controller';
2354 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Domains.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Domains.pm
2355 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Domains.pm 2020-04-08 23:43:15.000000000 +0400
2356 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Domains.pm 2020-03-29 01:07:44.000000000 +0400
2357 @@ -1,5 +1,12 @@
2358 package SrvMngr::Controller::Domains;
2359
2360 +#----------------------------------------------------------------------
2361 +# heading : Configuration
2362 +# description : DOMAINS
2363 +# navigation : 6000 6600
2364 +#
2365 +# routes : end
2366 +#----------------------------------------------------------------------
2367 use strict;
2368 use warnings;
2369 use Mojo::Base 'Mojolicious::Controller';
2370 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Emailsettings.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Emailsettings.pm
2371 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Emailsettings.pm 1970-01-01 04:00:00.000000000 +0400
2372 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Emailsettings.pm 2020-04-09 23:55:19.952000000 +0400
2373 @@ -0,0 +1,967 @@
2374 +package SrvMngr::Controller::Emailsettings;
2375 +
2376 +#----------------------------------------------------------------------
2377 +# heading : Configuration
2378 +# description : E-mail
2379 +# navigation : 6000 6700
2380 +#
2381 +#
2382 +# routes : end
2383 +#----------------------------------------------------------------------
2384 +use strict;
2385 +use warnings;
2386 +use Mojo::Base 'Mojolicious::Controller';
2387 +
2388 +use Locale::gettext;
2389 +use SrvMngr::I18N;
2390 +
2391 +use SrvMngr qw(theme_list init_session_cgi ip_number_or_blank);
2392 +
2393 +use esmith::ConfigDB;
2394 +use esmith::AccountsDB;
2395 +
2396 +use esmith::util;
2397 +use File::Basename;
2398 +
2399 +our $pattern_db = esmith::ConfigDB->open("mailpatterns");
2400 +our $cdb = esmith::ConfigDB->open || die "Couldn't open config db";
2401 +
2402 +
2403 +sub main {
2404 +
2405 + my $c = shift;
2406 + $c->app->log->info($c->log_req);
2407 +
2408 + my %mai_datas = ();
2409 + my $title = $c->l('mai_FORM_TITLE');
2410 +
2411 + $mai_datas{'trt'} = 'LIST';
2412 + $mai_datas{fetchmailmethod} = $cdb->get_prop('fetchmail', 'Method');
2413 +
2414 + $c->stash( title => $title, notif => '', mai_datas => \%mai_datas );
2415 + $c->render(template => 'emailsettings');
2416 +
2417 +};
2418 +
2419 +
2420 +sub do_display {
2421 +
2422 + my $c = shift;
2423 +
2424 + my $rt = $c->current_route;
2425 + my $trt = ($c->param('trt') || 'LIST');
2426 +
2427 + my %mai_datas = ();
2428 + my $title = $c->l('mai_FORM_TITLE');
2429 + my ($notif, $dest) = '';
2430 +
2431 + $mai_datas{'trt'} = $trt;
2432 +
2433 + if ( $trt eq 'ACC' ) {
2434 + $dest = 'emailaccess';
2435 + $mai_datas{fetchmailmethod} = $cdb->get_prop('fetchmail', 'Method');
2436 + }
2437 +
2438 + if ( $trt eq 'FIL' ) {
2439 + $dest = 'emailfilter';
2440 + $mai_datas{'virusstatus'} = $c->get_virus_status();
2441 + $mai_datas{'spamstatus'} = $cdb->get_prop('spamassassin', 'status');
2442 + $mai_datas{'spamsensitivity'} = $cdb->get_prop('spamassassin', 'Sensitivity','medium');
2443 + $mai_datas{'spamtaglevel'} = $cdb->get_prop('spamassassin', 'TagLevel') || '0';
2444 + $mai_datas{'spamrejectlevel'} = $cdb->get_prop('spamassassin', 'RejectLevel') || '0';
2445 + $mai_datas{spamsortspam} = $cdb->get_prop('spamassassin', 'SortSpam');
2446 + $mai_datas{spamsubjecttag} = $cdb->get_prop('spamassassin', 'SubjectTag');
2447 + $mai_datas{spamsubject} = $cdb->get_prop('spamassassin', 'Subject');
2448 + }
2449 +
2450 + if ( $trt eq 'REC' ) {
2451 + $dest = 'emailreceive';
2452 + $mai_datas{fetchmailmethod} = $cdb->get_prop('fetchmail', 'Method');
2453 + $mai_datas{freqoffice} = $cdb->get_prop('fetchmail', 'FreqOffice');
2454 + $mai_datas{freqoutside} = $cdb->get_prop('fetchmail', 'FreqOutside');
2455 + $mai_datas{freqweekend} = $cdb->get_prop('fetchmail', 'FreqWeekend');
2456 + $mai_datas{secondarymailserver} = $cdb->get_prop('fetchmail', 'SecondaryMailServer');
2457 + $mai_datas{secondarymailaccount} = $cdb->get_prop('fetchmail', 'SecondaryMailAccount');
2458 + $mai_datas{secondarymailpassword} = $cdb->get_prop('fetchmail', 'SecondaryMailPassword');
2459 + $mai_datas{specifyheader} = get_secondary_mail_use_envelope();
2460 + $mai_datas{secondarymailenvelope} = $cdb->get_prop('fetchmail', 'SecondaryMailEnvelope');
2461 +
2462 + }
2463 +
2464 + if ( $trt eq 'DEL' ) {
2465 + $dest = 'emaildeliver';
2466 + $mai_datas{emailunknownuser} = $cdb->get_value('EmailUnknownUser') || '"returntosender';
2467 + $mai_datas{delegatemailserver} = $cdb->get_value('DelegateMailServer');
2468 + $mai_datas{smtpsmarthost} = $cdb->get_value('SMTPSmartHost');
2469 + $mai_datas{smtpauthproxystatus} = $cdb->get_prop('smtp-auth-proxy', 'status') || 'disabled';
2470 + $mai_datas{smtpauthproxyuserid} = $cdb->get_prop('smtp-auth-proxy', 'Userid') || '';
2471 + $mai_datas{smtpauthproxypassword} = $cdb->get_prop('smtp-auth-proxy', 'Passwd') || '';
2472 + }
2473 +
2474 +
2475 + $c->stash( title => $title, notif => $notif, mai_datas => \%mai_datas );
2476 + return $c->render( template => $dest );
2477 +
2478 +};
2479 +
2480 +
2481 +sub do_update {
2482 +
2483 + my $c = shift;
2484 + $c->app->log->info($c->log_req);
2485 +
2486 + my $rt = $c->current_route;
2487 + my $trt = $c->param('trt');
2488 +
2489 + my %mai_datas = ();
2490 + $mai_datas{trt} = $trt;
2491 +
2492 + my $title = $c->l('mai_FORM_TITLE');
2493 +
2494 + my ($dest, $res, $result) = '';
2495 +
2496 + if ( $trt eq 'ACC' ) {
2497 +
2498 + $dest = 'emailaccess';
2499 +# $mai_datas{xxx} = $c->param('XXX');
2500 +
2501 + # controls
2502 +# $res = xxxxxxx( $c );
2503 +# $result .= $res unless $res eq 'OK';
2504 +
2505 + if ( ! $result ) {
2506 + $res = $c->change_settings_access();
2507 + $result .= $res unless $res eq 'OK';
2508 + if ( ! $result ) {
2509 + $mai_datas{trt} = 'SUC';
2510 + $result = $c->l('mai_SUCCESS');
2511 + }
2512 + }
2513 + }
2514 +
2515 + if ( $trt eq 'FIL' ) {
2516 +
2517 + $dest = 'emailfilter';
2518 +# $mai_datas{xxx} = $c->param('XXX');
2519 +
2520 + # controls
2521 +# $res = zzzzzz( $c );
2522 +# $result .= $res unless $res eq 'OK';
2523 +
2524 + if ( ! $result ) {
2525 + $res = $c->change_settings_filtering();
2526 + $result .= $res unless $res eq 'OK';
2527 + if ( ! $result ) {
2528 + $mai_datas{trt} = 'SUC';
2529 + $result = $c->l('mai_SUCCESS');
2530 + }
2531 + }
2532 + }
2533 +
2534 + if ( $trt eq 'REC' ) {
2535 +
2536 + $dest = 'emailreceive';
2537 +# $mai_datas{xxx} = $c->param('XXX');
2538 +
2539 + # controls
2540 +# $res = yyyyyyyyy( $c );
2541 +# $result .= $res unless $res eq 'OK';
2542 +
2543 + if ( ! $result ) {
2544 + $res = $c->change_settings_reception();
2545 + $result .= $res unless $res eq 'OK';
2546 + if ( ! $result ) {
2547 + $mai_datas{trt} = 'SUC';
2548 + $result = $c->l('mai_SUCCESS');
2549 + }
2550 + }
2551 + }
2552 +
2553 + if ( $trt eq 'DEL' ) {
2554 +
2555 + $dest = 'emaildeliver';
2556 +# $mai_datas{xxx} = $c->param('XXX');
2557 +
2558 + # controls
2559 + $res = $c->ip_number_or_blank( $c->param('DelegateMailServer') );
2560 + $result .= $res . ' DMS ' unless $res eq 'OK';
2561 +
2562 + $res = $c->validate_smarthost( $c->param('SMTPSmartHost') );
2563 + $result .= $res . ' SH ' unless $res eq 'OK';
2564 +
2565 + $res = $c->nonblank_if_smtpauth( $c->param('SMTPSmartHost') );
2566 + $result .= $res . ' SH ' unless $res eq 'OK';
2567 +
2568 + $res = $c->nonblank_if_smtpauth( $c->param('SMTPAUTHPROXY_Userid') );
2569 + $result .= $res . ' USR ' unless $res eq 'OK';
2570 +
2571 + $res = $c->nonblank_if_smtpauth( $c->param('SMTPAUTHPROXY_Passwd') );
2572 + $result .= $res . ' PWD ' unless $res eq 'OK';
2573 +
2574 + if ( ! $result ) {
2575 + $res = $c->change_settings_delivery();
2576 + $result .= $res unless $res eq 'OK';
2577 + if ( ! $result ) {
2578 + $mai_datas{trt} = 'SUC';
2579 + $result = $c->l('mai_SUCCESS');
2580 + }
2581 + }
2582 + }
2583 +
2584 +
2585 + $c->stash( title => $title, notif => $result, mai_datas => \%mai_datas );
2586 + if ($mai_datas{trt} ne 'SUC') {
2587 + return $c->render(template => $dest);
2588 + }
2589 + $c->redirect_to("/emailsettings");
2590 +
2591 +};
2592 +
2593 +
2594 +sub get_virus_status {
2595 +
2596 + my ($c, $localise) = @_;
2597 +
2598 + my $status = $cdb->get_prop("qpsmtpd", 'VirusScan') || 'disabled';
2599 +
2600 + return $localise ? $c->localise_status($status) : $status;
2601 +}
2602 +
2603 +sub get_spam_status {
2604 +
2605 + my ($c, $localise) = @_;
2606 +
2607 + my $status = $cdb->get_prop('spamassassin', 'status') || 'disabled';
2608 +
2609 + return $localise ? $c->localise_status($status) : $status;
2610 +}
2611 +
2612 +
2613 +sub localise_status {
2614 +
2615 + my ($c, $status) = @_;
2616 +
2617 + return $c->l($status eq 'enabled' ? $c->l('ENABLED') : $c->l('DISABLED'));
2618 +}
2619 +
2620 +
2621 +sub get_prop {
2622 +
2623 + my ($c, $item, $prop, $default) = @_;
2624 +
2625 + return $cdb->get_prop($item, $prop) || $default;
2626 +}
2627 +
2628 +
2629 +sub get_value {
2630 +
2631 + my $c = shift;
2632 + my $item = shift;
2633 +
2634 + return $cdb->get_value($item) || '';
2635 +}
2636 +
2637 +
2638 +sub get_emailunknownuser_status {
2639 +
2640 + my ($c, $localise) = @_;
2641 +
2642 + my $options = $c->get_emailunknownuser_options();
2643 +
2644 + my $val = $cdb->get_value('EmailUnknownUser') || "returntosender";
2645 +
2646 + return $localise ? $c->l($options->{$val}) : $val;
2647 +}
2648 +
2649 +
2650 +sub get_patterns_status {
2651 +
2652 + my ($c, $localise) = @_;
2653 +
2654 + my $status = $cdb->get_prop("qpsmtpd", 'PatternsScan') || 'disabled';
2655 +
2656 + return $localise ? $c->localise_status($status) : $status;
2657 +}
2658 +
2659 +
2660 +sub adjust_patterns {
2661 +
2662 + my $c = shift;
2663 +
2664 + my @selected = @{$c->every_param('BlockExecutableContent')};
2665 +
2666 + foreach my $pattern ( $pattern_db->get_all_by_prop( type => "pattern") )
2667 + {
2668 + my $status = (grep $pattern->key eq $_, @selected) ? 'enabled'
2669 + : 'disabled';
2670 + $pattern->set_prop('Status', $status);
2671 + }
2672 +
2673 + $pattern_db->reload;
2674 +
2675 + return scalar @selected;
2676 +
2677 +}
2678 +
2679 +
2680 +sub get_current_pop3_access {
2681 +
2682 + my ($c, $localise) = @_;
2683 +
2684 + my $pop3Status = $cdb->get_prop('pop3', 'status') || 'enabled';
2685 + my $pop3Access = $cdb->get_prop('pop3', 'access') || 'private';
2686 +
2687 + my $pop3sStatus = $cdb->get_prop('pop3s', 'status') || 'enabled';
2688 + my $pop3sAccess = $cdb->get_prop('pop3s', 'access') || 'private';
2689 +
2690 + my $options = get_pop_options();
2691 +
2692 + if ($pop3Status ne 'enabled' && $pop3sStatus ne 'enabled')
2693 + {
2694 + return $localise ? $c->l($options->{disabled}) : 'disabled';
2695 + }
2696 + elsif ($pop3Status eq 'enabled' && $pop3Access eq 'public')
2697 + {
2698 + return $localise ? $c->l($options->{public}) : 'public';
2699 + }
2700 + elsif ($pop3sStatus eq 'enabled' && $pop3sAccess eq 'public')
2701 + {
2702 + return $localise ? $c->l($options->{publicSSL}) : 'publicSSL';
2703 + }
2704 + return $localise ? $c->l($options->{private}) : 'private';
2705 +}
2706 +
2707 +
2708 +sub get_current_imap_access {
2709 +
2710 + my ($c, $localise) = @_;
2711 +
2712 + my $imapStatus = $cdb->get_prop('imap', 'status') || 'enabled';
2713 + my $imapAccess = $cdb->get_prop('imap', 'access') || 'private';
2714 +
2715 + my $imapsStatus = $cdb->get_prop('imaps', 'status') || 'enabled';
2716 + my $imapsAccess = $cdb->get_prop('imaps', 'access') || 'private';
2717 +
2718 + my $options = get_imap_options();
2719 +
2720 + if (($imapStatus ne 'enabled' || $imapAccess eq 'localhost') && $imapsStatus ne 'enabled')
2721 + {
2722 + return $localise ? $c->l($options->{disabled}) : 'disabled';
2723 + }
2724 + if ($imapStatus eq 'enabled' && $imapAccess eq 'public')
2725 + {
2726 + return $localise ? $c->l($options->{public}) : 'public';
2727 + }
2728 + elsif ($imapsStatus eq 'enabled' && $imapsAccess eq 'public')
2729 + {
2730 + return $localise ? $c->l($options->{publicSSL}) : 'publicSSL';
2731 + }
2732 + return $localise ? $c->l($options->{private}) : 'private';
2733 +}
2734 +
2735 +
2736 +sub get_current_smtp_auth {
2737 +
2738 + my ($c, $localise) = @_;
2739 +
2740 + my $smtpStatus = $cdb->get_prop('qpsmtpd', 'status') || 'enabled';
2741 + my $smtpAuth = $cdb->get_prop('qpsmtpd', 'Authentication') || 'enabled';
2742 +
2743 + my $smtpsStatus = $cdb->get_prop('sqpsmtpd', 'status') || 'enabled';
2744 + my $smtpsAuth = $cdb->get_prop('sqpsmtpd', 'Authentication') || 'enabled';
2745 +
2746 + my $options = get_smtp_auth_options();
2747 +
2748 + if ($smtpStatus eq 'enabled' && $smtpAuth eq 'enabled')
2749 + {
2750 + return $localise ? $c->l($options->{public}) : 'public';
2751 + }
2752 + elsif ($smtpsStatus eq 'enabled' && $smtpsAuth eq 'enabled')
2753 + {
2754 + return $localise ? $c->l($options->{publicSSL}) : 'publicSSL';
2755 + }
2756 + return $localise ? $c->l($options->{disabled}) : 'disabled';
2757 +}
2758 +
2759 +
2760 +sub get_current_webmail_status {
2761 +
2762 + my ($c, $localise) = @_;
2763 +
2764 + # determine status of webmail
2765 + my $WebmailStatus = "disabled";
2766 +
2767 + my $IMPStatus = $cdb->get_prop('imp', 'status') || 'disabled';
2768 + my $SSLonly = $cdb->get_prop('imp', 'access') || 'disabled';
2769 +
2770 + my $HordeStatus = $cdb->get_prop('horde', 'status') || 'disabled';
2771 +
2772 + my $MysqlStatus = $cdb->get_prop('mariadb', 'status') || 'disabled';
2773 +
2774 + my $PHPStatus = $cdb->get_prop('php', 'status') || 'disabled';
2775 +
2776 + my $Networkaccess = $cdb->get_prop('horde','access') || 'disabled';
2777 +
2778 + # all four components must be on for webmail to be working
2779 + if ( ( $IMPStatus eq "enabled" )
2780 + && ( $HordeStatus eq "enabled" )
2781 + && ( $MysqlStatus eq "enabled" )
2782 + && ( $PHPStatus eq "enabled" )
2783 + && ( $Networkaccess eq "public"))
2784 + {
2785 + $WebmailStatus = ( $SSLonly eq "SSL" ) ? "enabledSSL" : "enabled";
2786 + }
2787 +
2788 + elsif ( ( $IMPStatus eq "enabled" )
2789 + && ( $HordeStatus eq "enabled" )
2790 + && ( $MysqlStatus eq "enabled" )
2791 + && ( $PHPStatus eq "enabled" )
2792 + && ( $Networkaccess eq "private" ))
2793 + {
2794 + $WebmailStatus = ( $SSLonly eq "SSL" ) ? "localnetworkSSL" : "enabled";
2795 + }
2796 +
2797 + my $options = get_webmail_options();
2798 +
2799 + return $localise ? $c->l($options->{$WebmailStatus})
2800 + : $WebmailStatus;
2801 +
2802 +}
2803 +
2804 +
2805 +sub get_pop_opt {
2806 +
2807 + my $c = shift;
2808 +
2809 + return [[ $c->l('DISABLED') => 'disabled' ],
2810 + [ $c->l('NETWORKS_ALLOW_LOCAL') => 'private' ],
2811 + [ $c->l('mai_SECURE_POP3') => 'publicSSL' ],
2812 + [ $c->l('mai_INSECURE_POP3') => 'public' ]];
2813 +
2814 +}
2815 +
2816 +
2817 +sub get_pop_options {
2818 +
2819 + my $c = @_;
2820 +
2821 + my %options = (
2822 + disabled => 'DISABLED',
2823 + private => 'NETWORKS_ALLOW_LOCAL',
2824 + publicSSL => 'mai_SECURE_POP3'
2825 + );
2826 +
2827 + my $access = $cdb->get_prop('pop3', 'access') || 'private';
2828 +
2829 + $options{public} = 'mai_INSECURE_POP3' if ($access eq 'public');
2830 +
2831 + \%options;
2832 +}
2833 +
2834 +
2835 +sub get_imap_opt {
2836 +
2837 + my $c = shift;
2838 +
2839 + return [[ $c->l('DISABLED') => 'disabled' ],
2840 + [ $c->l('NETWORKS_ALLOW_LOCAL') => 'private' ],
2841 + [ $c->l('mai_SECURE_IMAP') => 'publicSSL' ],
2842 + [ $c->l('mai_INSECURE_IMAP') => 'public' ]];
2843 +
2844 +}
2845 +
2846 +
2847 +sub get_imap_options {
2848 +
2849 + my $c = shift;
2850 +
2851 + my %options = (
2852 + disabled => 'DISABLED',
2853 + private => 'NETWORKS_ALLOW_LOCAL',
2854 + publicSSL => 'mai_SECURE_IMAP'
2855 + );
2856 +
2857 + my $access = $cdb->get_prop('imap', 'access') || 'private';
2858 +
2859 + $options{public} = 'mai_INSECURE_IMAP' if ($access eq 'public');
2860 +
2861 + \%options;
2862 +}
2863 +
2864 +
2865 +sub get_smtp_auth_options {
2866 +
2867 + my $c = shift;
2868 +
2869 + my %options = ( disabled => 'DISABLED', publicSSL => 'mai_SECURE_SMTP', public => 'mai_INSECURE_SMTP');
2870 +
2871 + \%options;
2872 +}
2873 +
2874 +
2875 +sub get_webmail_opt {
2876 +
2877 + my $c = shift;
2878 +
2879 + return [[ $c->l('DISABLED') => 'disabled' ],
2880 + [ $c->l('mai_ENABLED_SECURE_ONLY') => 'enabledSSL' ],
2881 + [ $c->l('mai_ONLY_LOCAL_NETWORK_SSL') => 'localnetworkSSL' ],
2882 + [ $c->l('mai_ENABLED_BOTH') => 'public' ]];
2883 +
2884 +}
2885 +
2886 +
2887 +sub get_webmail_options {
2888 +
2889 + my $c = shift;
2890 +
2891 + my %options = (
2892 + disabled => 'DISABLED',
2893 + enabledSSL => 'mai_ENABLED_SECURE_ONLY',
2894 + localnetworkSSL => 'mai_ONLY_LOCAL_NETWORK_SSL' );
2895 +
2896 + my $access = $cdb->get_prop('imp', 'access') || 'SSL';
2897 +
2898 + $options{public} = 'ENABLED_BOTH' if ($access eq 'full');
2899 +
2900 + \%options;
2901 +}
2902 +
2903 +
2904 +sub get_retrieval_opt {
2905 +
2906 + my $c = shift;
2907 +
2908 + return $cdb->get("SystemMode")->value eq "servergateway-private"
2909 + ? [ $c->l('mai_MULTIDROP') => 'multidrop']
2910 + : [[ $c->l('mai_STANDARD') => 'standard'],
2911 + [ $c->l('mai_ETRN') => 'etrn' ],
2912 + [ $c->l('mai_MULTIDROP') => 'multidrop']];
2913 +}
2914 +
2915 +
2916 +sub get_smtp_auth_opt {
2917 +
2918 + my $c = shift;
2919 +
2920 + return [[ $c->l('DISABLED') => 'disabled'],
2921 + [ $c->l('mai_SECURE_SMTP') => 'publicSSL'],
2922 + [ $c->l('mai_INSECURE_SMTP') => 'public']];
2923 +}
2924 +
2925 +
2926 +sub get_emailunknownuser_options {
2927 +
2928 + my $c = shift;
2929 + my $accounts = esmith::AccountsDB->open_ro();
2930 + my %existingAccounts = ('admin' => $c->l("mai_FORWARD_TO_ADMIN"),
2931 + 'returntosender' => $c->l("mai_RETURN_TO_SENDER") );
2932 +
2933 + foreach my $account ($accounts->get_all) {
2934 + next if $account->key eq 'everyone';
2935 + if ($account->prop('type') =~ /(user|group|pseudonym)/) {
2936 + $existingAccounts{$account->key} = $c->l("mai_FORWARD_TO") . " " . $account->key;
2937 + }
2938 + }
2939 + return(\%existingAccounts);
2940 +}
2941 +
2942 +
2943 +sub get_emailunknownuser_opt {
2944 +
2945 + my $c = shift;
2946 + my $accounts = esmith::AccountsDB->open_ro();
2947 +
2948 + my @existingAccounts = ([ $c->l("mai_FORWARD_TO_ADMIN") => 'admin'],
2949 + [ $c->l("mai_RETURN_TO_SENDER") => 'returntosender']);
2950 +
2951 + foreach my $account ($accounts->get_all) {
2952 + next if $account->key eq 'everyone';
2953 + if ($account->prop('type') =~ /(user|group|pseudonym)/) {
2954 + push @existingAccounts, [ $c->l("mai_FORWARD_TO") . " " . $account->key => $account->key];
2955 + }
2956 + }
2957 + return(\@existingAccounts);
2958 +}
2959 +
2960 +
2961 +sub get_patterns_opt {
2962 +
2963 + my $c = shift;
2964 + my @options;
2965 +
2966 + foreach my $pattern ( $pattern_db->get_all_by_prop( type => "pattern" ) ) {
2967 + my %props = $pattern->props;
2968 + push @options, [ $props{'Description'} => $pattern->key ];
2969 + }
2970 + return \@options;
2971 +}
2972 +
2973 +
2974 +sub get_patterns_current_opt {
2975 +
2976 + my $c = shift;
2977 + my @selected;
2978 +
2979 + foreach my $pattern ( $pattern_db->get_all_by_prop( type => "pattern" ) ) {
2980 + my %props = $pattern->props;
2981 + push @selected, $pattern->key if ($props{'Status'} eq 'enabled');
2982 + }
2983 + return \@selected;
2984 +}
2985 +
2986 +sub get_spam_level_options {
2987 +
2988 + return [ 0..20 ];
2989 +}
2990 +
2991 +
2992 +sub get_spam_sensitivity_opt {
2993 +
2994 + my $c = shift;
2995 +
2996 + return [[ $c->l('mai_VERYLOW') => 'verylow' ],
2997 + [ $c->l('mai_LOW') => 'low' ],
2998 + [ $c->l('mai_MEDIUM') => 'medium' ],
2999 + [ $c->l('mai_HIGH') => 'high' ],
3000 + [ $c->l('mai_VERYHIGH') => 'veryhigh' ],
3001 + [ $c->l('mai_CUSTOM') => 'custom' ]];
3002 +
3003 +}
3004 +
3005 +
3006 +sub fetchmail_freq {
3007 +
3008 + my $c = shift;
3009 +
3010 + return [[ $c->l('mai_NEVER') => 'never' ],
3011 + [ $c->l('mai_EVERY5MIN') => 'every5min' ],
3012 + [ $c->l('mai_EVERY15MIN') => 'every15min' ],
3013 + [ $c->l('mai_EVERY30MIN') => 'every30min' ],
3014 + [ $c->l('mai_EVERYHOUR') => 'everyhour' ],
3015 + [ $c->l('mai_EVERY2HRS') => 'every2hrs' ]];
3016 +}
3017 +
3018 +
3019 +sub display_multidrop {
3020 +
3021 + my $status = $cdb->get_prop('fetchmail', 'status') || 'disabled';
3022 +
3023 + # XXX FIXME - WIP
3024 + # Only display ETRN/multidrop settings if relevant
3025 + # To do this, we need an "Show ETRN/multidrop settings" button
3026 + # in standard mode.
3027 +
3028 + # return ($status eq 'enabled');
3029 + return 1;
3030 +}
3031 +
3032 +
3033 +sub change_settings_reception {
3034 +
3035 + my $c = shift;
3036 +
3037 + my $FetchmailMethod = ( $c->param('FetchmailMethod') || 'standard' );
3038 +
3039 + my $FetchmailFreqOffice = ( $c->param('FreqOffice') || 'every15min' );
3040 +
3041 + my $FetchmailFreqOutside = ( $c->param('FreqOutside') || 'everyhour' );
3042 + my $FetchmailFreqWeekend = ( $c->param('FreqWeekend') || 'everyhour' );
3043 + my $SpecifyHeader = ( $c->param('SpecifyHeader') || 'off' );
3044 +
3045 + my $fetchmail = $cdb->get('fetchmail') || $cdb->new_record( "fetchmail",
3046 + { type => "service", status => "disabled" } );
3047 +
3048 + if ( $FetchmailMethod eq 'standard' ) {
3049 + $fetchmail->set_prop( 'status', 'disabled' );
3050 + $fetchmail->set_prop( 'Method', $FetchmailMethod );
3051 + }
3052 + else {
3053 + $fetchmail->set_prop( 'status', 'enabled' );
3054 + $fetchmail->set_prop( 'Method', $FetchmailMethod );
3055 + $fetchmail->set_prop( 'SecondaryMailServer',
3056 + $c->param('SecondaryMailServer') )
3057 + unless ( $c->param('SecondaryMailServer') eq '' );
3058 +
3059 + $fetchmail->set_prop('FreqOffice', $FetchmailFreqOffice );
3060 + $fetchmail->set_prop('FreqOutside', $FetchmailFreqOutside );
3061 + $fetchmail->set_prop('FreqWeekend', $FetchmailFreqWeekend );
3062 + $fetchmail->set_prop('SecondaryMailAccount',
3063 + $c->param('SecondaryMailAccount') )
3064 + unless ( $c->param('SecondaryMailAccount') eq '' );
3065 +
3066 + $fetchmail->set_prop( 'SecondaryMailPassword',
3067 + $c->param('SecondaryMailPassword') )
3068 + unless ( $c->param('SecondaryMailPassword') eq '' );
3069 +
3070 + if ( $SpecifyHeader eq 'on' ) {
3071 + $fetchmail->merge_props(
3072 + 'SecondaryMailEnvelope' => $c->param('SecondaryMailEnvelope') );
3073 + }
3074 + else {
3075 + $fetchmail->delete_prop('SecondaryMailEnvelope');
3076 + }
3077 + }
3078 +
3079 + my $smtpAuth = ($c->param('SMTPAuth') || 'public');
3080 + if ($smtpAuth eq 'public') {
3081 + $cdb->set_prop("qpsmtpd", "Authentication", "enabled" );
3082 + $cdb->set_prop("sqpsmtpd", "Authentication", "enabled" );
3083 + } elsif ($smtpAuth eq 'publicSSL') {
3084 + $cdb->set_prop("qpsmtpd", "Authentication", "disabled" );
3085 + $cdb->set_prop("sqpsmtpd", "Authentication", "enabled" );
3086 + } else {
3087 + $cdb->set_prop("qpsmtpd", "Authentication", "disabled" );
3088 + $cdb->set_prop("sqpsmtpd", "Authentication", "disabled" );
3089 + }
3090 +
3091 + unless ( system( "/sbin/e-smith/signal-event", "email-update" ) == 0 )
3092 + {
3093 + return $c->l('mai_ERROR_UPDATING_CONFIGURATION');
3094 + }
3095 + return 'OK';
3096 +}
3097 +
3098 +
3099 +sub change_settings_delivery {
3100 +
3101 + my ($c) = shift;
3102 +
3103 + my $EmailUnknownUser = ($c->param('EmailUnknownUser') || 'returntosender');
3104 +
3105 + $cdb->set_value('SMTPSmartHost', $c->param('SMTPSmartHost'));
3106 + $cdb->set_value('DelegateMailServer', $c->param('DelegateMailServer'));
3107 + $cdb->set_value('EmailUnknownUser', $EmailUnknownUser);
3108 +
3109 + my $proxy = $cdb->get('smtp-auth-proxy');
3110 + my %props = $proxy->props;
3111 +
3112 + for ( qw(Userid Passwd status) )
3113 + {
3114 + $props{$_} = $c->param("SMTPAUTHPROXY_$_");
3115 + }
3116 +
3117 + $proxy->merge_props(%props);
3118 +
3119 + unless ( system( "/sbin/e-smith/signal-event", "email-update" ) == 0 )
3120 + {
3121 + return $c->l('mai_ERROR_UPDATING_CONFIGURATION');
3122 + }
3123 + return 'OK';
3124 +}
3125 +
3126 +
3127 +sub change_settings_access {
3128 +
3129 + my $c = shift;
3130 +
3131 + my $pop3Access = ($c->param('POPAccess') || 'private');
3132 + if ($pop3Access eq 'disabled') {
3133 + $cdb->set_prop('pop3', "status", "disabled" );
3134 + $cdb->set_prop('pop3s', "status", "disabled" );
3135 + } else {
3136 + $cdb->set_prop('pop3', "status", "enabled" );
3137 + $cdb->set_prop('pop3s', "status", "enabled" );
3138 + }
3139 + if ($pop3Access eq 'public') {
3140 + $cdb->set_prop('pop3', "access", "public" );
3141 + $cdb->set_prop('pop3s', "access", "public" );
3142 + } elsif ($pop3Access eq 'publicSSL') {
3143 + $cdb->set_prop('pop3', "access", "private" );
3144 + $cdb->set_prop('pop3s', "access", "public" );
3145 + } else {
3146 + $cdb->set_prop('pop3', "access", "private" );
3147 + $cdb->set_prop('pop3s', "access", "private" );
3148 + }
3149 +
3150 + my $imapAccess = ($c->param('IMAPAccess') || 'private');
3151 + if ($imapAccess eq 'disabled') {
3152 + $cdb->set_prop('imap', "status", "enabled" );
3153 + $cdb->set_prop('imap', "access", "localhost" );
3154 + $cdb->set_prop('imaps', "status", "disabled" );
3155 + } elsif ($imapAccess eq 'public') {
3156 + $cdb->set_prop('imap', "status", "enabled" );
3157 + $cdb->set_prop('imap', "access", "public" );
3158 + $cdb->set_prop('imaps', "status", "enabled" );
3159 + $cdb->set_prop('imaps', "access", "public" );
3160 + } elsif ($imapAccess eq 'publicSSL') {
3161 + $cdb->set_prop('imap', "status", "enabled" );
3162 + $cdb->set_prop('imap', "access", "private" );
3163 + $cdb->set_prop('imaps', "status", "enabled" );
3164 + $cdb->set_prop('imaps', "access", "public" );
3165 + } else {
3166 + $cdb->set_prop('imap', "status", "enabled" );
3167 + $cdb->set_prop('imap', "access", "private" );
3168 + $cdb->set_prop('imaps', "status", "enabled" );
3169 + $cdb->set_prop('imaps', "access", "private" );
3170 + }
3171 +
3172 + #------------------------------------------------------------
3173 + # Set webmail state in configuration database, and access
3174 + # type for SSL
3175 + # PHP and MySQL should always be on, and are enabled by default
3176 + # We don't do anything with them here.
3177 + #------------------------------------------------------------
3178 +
3179 + my $webmail = ($c->param('WebMail') || 'disabled');
3180 + if ( $webmail eq "enabled" ) {
3181 + $cdb->set_prop('php', "status", $webmail );
3182 + $cdb->set_prop('mariadb',"status", $webmail );
3183 + $cdb->set_prop('imp',"status", $webmail );
3184 + $cdb->set_prop('horde', "status", $webmail );
3185 + $cdb->set_prop('imp',"access", "full" );
3186 + $cdb->set_prop('horde',"access", "public" );
3187 + $cdb->set_prop('horde',"HttpsOnly", "no" );
3188 + }
3189 + elsif ( $webmail eq "enabledSSL" ) {
3190 + $cdb->set_prop('php',"status", "enabled" );
3191 + $cdb->set_prop('mariadb',"status", "enabled" );
3192 + $cdb->set_prop('imp',"status", 'enabled' );
3193 + $cdb->set_prop('horde',"status", 'enabled' );
3194 + $cdb->set_prop('imp',"access", "SSL" );
3195 + $cdb->set_prop('horde',"access", "public" );
3196 + $cdb->set_prop('horde',"HttpsOnly", "yes" );
3197 + }
3198 +
3199 + elsif ( $webmail eq "localnetworkSSL" ) {
3200 + $cdb->set_prop('php',"status", "enabled" );
3201 + $cdb->set_prop('mariadb',"status", "enabled" );
3202 + $cdb->set_prop('imp',"status", 'enabled' );
3203 + $cdb->set_prop('horde',"status", 'enabled' );
3204 + $cdb->set_prop('imp',"access", "SSL" );
3205 + $cdb->set_prop('horde',"access", "private" );
3206 + $cdb->set_prop('horde',"HttpsOnly", "yes" );
3207 + }
3208 +
3209 + else {
3210 + $cdb->set_prop('imp',"status", 'disabled' );
3211 + $cdb->set_prop('horde',"status", 'disabled' );
3212 + }
3213 +
3214 + unless ( system( "/sbin/e-smith/signal-event", "email-update" ) == 0 ) {
3215 + return $c->l('mai_ERROR_UPDATING_CONFIGURATION');
3216 + }
3217 +
3218 + return 'OK';
3219 +}
3220 +
3221 +
3222 +sub change_settings_filtering {
3223 +
3224 + my $c = shift;
3225 +
3226 + my $virus_status = ( $c->param('VirusStatus') || 'disabled' );
3227 + $cdb->set_prop("qpsmtpd", 'VirusScan', $virus_status);
3228 +
3229 + for my $param ( qw(
3230 + status
3231 + Sensitivity
3232 + TagLevel
3233 + RejectLevel
3234 + SortSpam
3235 + Subject
3236 + SubjectTag) )
3237 + {
3238 + $cdb->set_prop('spamassassin', $param, $c->param("Spam$param"));
3239 + }
3240 +
3241 + my $patterns_status = $c->adjust_patterns() ? 'enabled' : 'disabled';
3242 + $cdb->set_prop("qpsmtpd", 'PatternsScan', $patterns_status);
3243 +
3244 + unless ( system( "/sbin/e-smith/signal-event", "email-update" ) == 0 )
3245 + {
3246 + return $c->l('mai_ERROR_UPDATING_CONFIGURATION');
3247 + }
3248 +
3249 + return 'OK';
3250 +
3251 +}
3252 +
3253 +
3254 +#sub blank_or_ip_number {
3255 +
3256 +# my ($c, $value) = @_;
3257 +
3258 +# return 'OK' unless (defined $value); # undef is blank
3259 +# return 'OK' if ($value =~ /^$/); # blank is blank
3260 +# return $c->call_fm_validation("ip_number",$value,''); # otherwise, validate the input
3261 +
3262 +#}
3263 +
3264 +
3265 +sub nonblank_if_smtpauth {
3266 +
3267 + my ($c, $value) = @_;
3268 +
3269 + return "OK" unless ($c->param("SMTPAUTHPROXY_status") eq 'enabled');
3270 +
3271 + return ($value =~ /\S+/) ? "OK" : $c->l('mai_VALIDATION_SMTPAUTH_NONBLANK');
3272 +
3273 +}
3274 +
3275 +
3276 +sub get_secondary_mail_use_envelope {
3277 +
3278 + my $use_envelope = $cdb->get_prop('fetchmail', 'SecondaryMailEnvelope');
3279 + if ( defined $use_envelope ) {
3280 + return ('on');
3281 + } else {
3282 + return ('off');
3283 + }
3284 +}
3285 +
3286 +
3287 +sub validate_smarthost {
3288 + my $fm = shift;
3289 + my $smarthost = shift;
3290 +
3291 + return ('OK') if ( $smarthost =~ /^(\S+\.\S+)$/ );
3292 +
3293 + return ('OK') if ( $smarthost eq '' );
3294 +
3295 + return "INVALID_SMARTHOST";
3296 +
3297 +}
3298 +
3299 +
3300 +1;
3301 +
3302 +
3303 +__END__
3304 +blank_or_ip_number
3305 +change_settings_access
3306 +change_settings_delivery
3307 +change_settings_filtering
3308 +change_settings_reception
3309 +display_multidrop
3310 +do_display
3311 +do_update
3312 +fetchmail_freq
3313 +get_current_imap_access
3314 +get_current_pop3_access
3315 +get_current_smtp_auth
3316 +get_current_webmail_status
3317 +get_emailunknownuser_opt
3318 +get_emailunknownuser_options
3319 +get_emailunknownuser_status
3320 +get_imap_opt
3321 +get_imap_options
3322 +get_patterns_current_opt
3323 +get_patterns_opt
3324 +get_patterns_status
3325 +get_pop_opt
3326 +get_pop_options
3327 +get_prop
3328 +get_retrieval_opt
3329 +get_smtp_auth_opt
3330 +get_smtp_auth_options
3331 +get_spam_level_options
3332 +get_spam_sensitivity_opt
3333 +get_spam_status
3334 +get_value
3335 +get_virus_status
3336 +get_webmail_opt
3337 +get_webmail_options
3338 +localise_status
3339 +main
3340 +nonblank_if_smtpauth
3341 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Groups.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Groups.pm
3342 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Groups.pm 2020-04-08 23:43:15.000000000 +0400
3343 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Groups.pm 2020-03-29 01:08:31.000000000 +0400
3344 @@ -1,5 +1,13 @@
3345 package SrvMngr::Controller::Groups;
3346
3347 +#----------------------------------------------------------------------
3348 +# heading : Collaboration
3349 +# description : GROUPS
3350 +# navigation : 2000 2200
3351 +#----------------------------------------------------------------------
3352 +#
3353 +# routes : end
3354 +#----------------------------------------------------------------------
3355 use strict;
3356 use warnings;
3357 use Mojo::Base 'Mojolicious::Controller';
3358 @@ -23,7 +31,7 @@
3359
3360 my %grp_datas = ();
3361 my $title = $c->l('grp_FORM_TITLE');
3362 - my $modul = '';
3363 + my $notif = '';
3364
3365 $grp_datas{trt} = 'LIST';
3366
3367 @@ -33,7 +41,7 @@
3368 @groups = $adb->groups();
3369 }
3370
3371 - $c->stash( title => $title, modul => $modul, grp_datas => \%grp_datas, groups => \@groups );
3372 + $c->stash( title => $title, notif => $notif, grp_datas => \%grp_datas, groups => \@groups );
3373 $c->render(template => 'groups');
3374
3375 };
3376 @@ -54,18 +62,15 @@
3377
3378 my %grp_datas = ();
3379 my $title = $c->l('grp_FORM_TITLE');
3380 - my $modul = '';
3381 + my $notif = '';
3382
3383 $grp_datas{'trt'} = $trt;
3384
3385 if ( $trt eq 'ADD' ) {
3386
3387 - my %users = @{gen_users_list( $c )};
3388 -
3389 - $c->stash( users => \%users );
3390 -
3391 }
3392
3393 +
3394 if ( $trt eq 'UPD' ) {
3395
3396 my %members = ();
3397 @@ -78,14 +83,13 @@
3398 $grp_datas{description} = $rec->prop('Description') || '';
3399
3400 %members = @{gen_members_list( $c, $group )};
3401 -
3402 - %users = @{gen_users_list( $c )};
3403 }
3404
3405 $c->stash( members => \%members, users => \%users );
3406
3407 }
3408
3409 +
3410 if ( $trt eq 'DEL' ) {
3411
3412 my %members = ();
3413 @@ -102,14 +106,12 @@
3414 %ibays = @{gen_ibays_list($c, $group)};
3415
3416 }
3417 - # $c->flash(message => 'Del display Group okkkkkkkkkkkk');
3418 - # $c->app->log->info("members: " . $c->dumper(%members));
3419 - # $c->app->log->info("ibays: " . $c->dumper(%ibays));
3420
3421 $c->stash( grp_datas => \%grp_datas, members => \%members, ibays => \%ibays );
3422
3423 }
3424
3425 +
3426 if ( $trt eq 'LIST' ) {
3427 my @groups;
3428 if ($adb) {
3429 @@ -120,7 +122,7 @@
3430
3431 }
3432
3433 - $c->stash( title => $title, modul => $modul, grp_datas => \%grp_datas );
3434 + $c->stash( title => $title, notif => $notif, grp_datas => \%grp_datas );
3435 $c->render( template => 'groups' );
3436
3437 };
3438 @@ -134,19 +136,21 @@
3439 my $rt = $c->current_route;
3440 my $trt = ($c->param('trt') || 'LIST');
3441
3442 - my $result = '';
3443 + my %grp_datas = ();
3444 + my $title = $c->l('grp_FORM_TITLE');
3445 + my ($res, $result) = '';
3446 + my $groupName = $c->param('groupName');
3447
3448 if ( $trt eq 'ADD' ) {
3449
3450 - my $groupName = $c->param('groupName');
3451 my $groupDesc = $c->param('groupDesc');
3452 - my @members = $c->param('groupMembers');
3453 -
3454 + my @members = @{$c->every_param('groupMembers')};
3455 +
3456 +
3457 my $members = join ( ",", @members );
3458 - $c->app->log->info("members: " . $c->dumper($groupName) . " " .$c->dumper($groupDesc) . " " .$c->dumper(@members) . " " . $c->dumper($members));
3459
3460 # controls (validate ?????)
3461 - my $res = validate_group( $c, $groupName );
3462 + $res = validate_group( $c, $groupName );
3463 $result .= $res unless $res eq 'OK';
3464
3465 $res = validate_group_length( $c, $groupName );
3466 @@ -166,8 +170,6 @@
3467 $groupDesc, 'Members', $members
3468 );
3469
3470 - $c->app->log->info("props: " . $c->dumper(%props));
3471 -
3472 if ( ! $result ) {
3473
3474 $adb->new_record( $groupName, \%props );
3475 @@ -175,8 +177,6 @@
3476 # Untaint groupName before use in system()
3477 ($groupName) = ($groupName =~ /^([a-z][\-\_\.a-z0-9]*)$/);
3478
3479 - #???$c->clear_params();
3480 -
3481 system("/sbin/e-smith/signal-event", "group-create", "$groupName") ==0
3482 or $result .= $c->l('qgp_CREATE_ERROR')."\n";
3483
3484 @@ -184,14 +184,14 @@
3485
3486 if ( ! $result ) {
3487 $result = $c->l('grp_CREATED_GROUP') . ' ' . $groupName;
3488 + $trt = 'SUC';
3489 }
3490 }
3491
3492 if ( $trt eq 'UPD' ) {
3493
3494 - my $groupName = $c->param('groupName');
3495 my $groupDesc = $c->param('groupDesc');
3496 - my @members = $c->param('groupMembers');
3497 + my @members = @{$c->every_param('groupMembers')};
3498 my $members = join ( ",", @members );
3499
3500 # controls
3501 @@ -204,16 +204,12 @@
3502
3503 if ( ! $result ) {
3504
3505 - # $c->app->log->info("groupName: " . $c->dumper($groupName) . " , " . $c->dumper($members). " << " . $c->dumper(@members));
3506 -
3507 $adb->get($groupName)->set_prop( 'Members', $members );
3508 $adb->get($groupName)->set_prop( 'Description', $groupDesc );
3509
3510 # Untaint groupName before use in system()
3511 ($groupName) = ($groupName =~ /^([a-z][\-\_\.a-z0-9]*)$/);
3512
3513 - #???$c->clear_params();
3514 -
3515 system("/sbin/e-smith/signal-event", "group-modify", "$groupName") ==0
3516 or $result .= $c->l('qgp_MODIFY_ERROR')."\n";
3517
3518 @@ -221,35 +217,39 @@
3519
3520 if ( ! $result ) {
3521 $result = $c->l('grp_MODIFIED_GROUP') . ' ' . $groupName;
3522 + $trt = 'SUC';
3523 }
3524 }
3525
3526 if ( $trt eq 'DEL' ) {
3527 -
3528 - my $group = ($c->param ('group') || '');
3529
3530 - if ($group =~ /^([a-z][\-\_\.a-z0-9]*)$/) {
3531 - $group = $1;
3532 + if ($groupName =~ /^([a-z][\-\_\.a-z0-9]*)$/) {
3533 + $groupName = $1;
3534 } else {
3535 - $result .= $c->l('grp_ERR_INTERNAL_FAILURE') . ':' . $group;
3536 + $result .= $c->l('grp_ERR_INTERNAL_FAILURE') . ':' . $groupName;
3537 }
3538
3539 - my $rec = $adb->get($group);
3540 - $result .= $c->l('grp_ERR_INTERNAL_FAILURE') . ':' . $group unless ($rec);
3541 + my $rec = $adb->get($groupName);
3542 + $result .= $c->l('grp_ERR_INTERNAL_FAILURE') . ':' . $groupName unless ($rec);
3543
3544 if ( ! $result ) {
3545 - my $res = delete_group( $c, $group );
3546 + my $res = delete_group( $c, $groupName );
3547 $result .= $res unless $res eq 'OK';
3548 if ( ! $result ) {
3549 - $result = $c->l('grp_DELETED_GROUP') . ' ' . $group;
3550 + $result = $c->l('grp_DELETED_GROUP') . ' ' . $groupName;
3551 + $trt = 'SUC';
3552 }
3553 }
3554 }
3555
3556 - my $title = $c->l('grp_FORM_TITLE');
3557 + $grp_datas{'group'} = $groupName;
3558 + $grp_datas{'trt'} = $trt;
3559
3560 - $c->stash( title => $title, modul => $result );
3561 - $c->render(template => 'module');
3562 + $c->stash( title => $title, notif => $result, grp_datas => \%grp_datas );
3563 + if ($grp_datas{trt} ne 'SUC') {
3564 + return $c->render(template => 'groups');
3565 + }
3566 + $c->redirect_to('/groups');
3567
3568 };
3569
3570 @@ -325,9 +325,8 @@
3571 $names{$user->key} = $user->prop('FirstName') . " "
3572 . $user->prop('LastName');
3573 }
3574 - @users = %names;
3575
3576 - return \@users;
3577 + return \%names;
3578 }
3579
3580
3581 @@ -346,6 +345,7 @@
3582
3583 =cut
3584
3585 +
3586 sub validate_is_group () {
3587 my $c = shift;
3588 my $group = shift;
3589 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Hostentries.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Hostentries.pm
3590 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Hostentries.pm 2020-04-08 23:43:15.000000000 +0400
3591 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Hostentries.pm 2020-03-29 01:08:52.000000000 +0400
3592 @@ -1,5 +1,13 @@
3593 package SrvMngr::Controller::Hostentries;
3594
3595 +#----------------------------------------------------------------------
3596 +# heading : Configuration
3597 +# description : Hostnames and addresses
3598 +# navigation : 6000 6500
3599 +#----------------------------------------------------------------------
3600 +#
3601 +# routes : end
3602 +#----------------------------------------------------------------------
3603 use strict;
3604 use warnings;
3605 use Mojo::Base 'Mojolicious::Controller';
3606 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Ibays.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Ibays.pm
3607 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Ibays.pm 2020-04-08 23:43:15.000000000 +0400
3608 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Ibays.pm 2020-03-29 01:09:10.000000000 +0400
3609 @@ -1,5 +1,13 @@
3610 package SrvMngr::Controller::Ibays;
3611
3612 +#----------------------------------------------------------------------
3613 +# heading : Collaboration
3614 +# description : Information bays
3615 +# navigation : 2000 2500
3616 +#
3617 +#
3618 +# routes : end
3619 +#----------------------------------------------------------------------
3620 use strict;
3621 use warnings;
3622 use Mojo::Base 'Mojolicious::Controller';
3623 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial_ori.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial_ori.pm
3624 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial_ori.pm 2020-04-08 23:43:15.000000000 +0400
3625 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial_ori.pm 1970-01-01 04:00:00.000000000 +0400
3626 @@ -1,49 +0,0 @@
3627 -package SrvMngr::Controller::Initial;
3628 -
3629 -use strict;
3630 -use warnings;
3631 -
3632 -use Mojo::Base 'Mojolicious::Controller';
3633 -
3634 -use Locale::gettext;
3635 -use SrvMngr::I18N;
3636 -
3637 -sub main {
3638 - my $c = shift;
3639 - $c->app->log->info($c->log_req);
3640 -
3641 - #SrvMngr->startsess();
3642 - if ( not defined $c->session->{lang} ) {
3643 - init_session( $c );
3644 - }
3645 -
3646 - my $title = $c->l('initial_FORM_TITLE');
3647 - my $modul = $c->render_to_string(inline => $c->l('initial_FRAMES_BODY'));
3648 -
3649 - $c->stash( title => $title, modul => $modul, nav => \%nav );
3650 -
3651 - $c->render(template => 'initial');
3652 -
3653 -}
3654 -
3655 -
3656 -sub init_session {
3657 - my $c = shift;
3658 -
3659 - $c->app->log->info("Init datas in welcome page.");
3660 -
3661 - my %datas = ();
3662 - %datas = SrvMngr::Model::Main->init_data( %datas );
3663 - $c->session->{lang} = $datas{'lang'};
3664 - $c->session->{copyRight} = $c->l($datas{'copyRight'});
3665 - $c->session->{releaseVersion} = $datas{'releaseVersion'};
3666 - $c->session->{PwdSet} = $datas{'PwdSet'};
3667 - $c->session->{Unsafe} = $datas{'Unsafe'};
3668 - $c->session->{SystemName} = $datas{'SystemName'};
3669 - $c->session->{DomainName} = $datas{'DomainName'};
3670 - $c->languages($datas{'lang'});
3671 -
3672 -}
3673 -
3674 -
3675 -1;
3676 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial.pm
3677 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial.pm 2020-04-08 23:43:15.000000000 +0400
3678 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Initial.pm 2020-03-29 01:02:15.000000000 +0400
3679 @@ -1,5 +1,8 @@
3680 package SrvMngr::Controller::Initial;
3681
3682 +#
3683 +# routes : end
3684 +#----------------------------------------------------------------------
3685 use strict;
3686 use warnings;
3687
3688 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Localnetworks.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Localnetworks.pm
3689 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Localnetworks.pm 2020-04-08 23:43:19.000000000 +0400
3690 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Localnetworks.pm 2020-04-08 21:27:35.000000000 +0400
3691 @@ -1,5 +1,12 @@
3692 package SrvMngr::Controller::Localnetworks;
3693
3694 +#----------------------------------------------------------------------
3695 +# heading : Security
3696 +# description : Local networks
3697 +# navigation : 5000 5300
3698 +#
3699 +# routes : end
3700 +#----------------------------------------------------------------------
3701 use strict;
3702 use warnings;
3703 use Mojo::Base 'Mojolicious::Controller';
3704 @@ -280,6 +287,7 @@
3705 }
3706 else
3707 { my $simpleMask = esmith::util::computeLocalNetworkPrefix( $network, $networkMask );
3708 - return (ret=>'ln_SUCCESS_NONSTANDARD_RANGE',vars=>"$network,$networkMask,$networkRouter,$totalHosts,$firstAddr,$lastAddr,$simpleMask");
3709 + return ($fm->render_to_string(inline => l('ln_SUCCESS_NONSTANDARD_RANGE',
3710 + vars=>"$network,$networkMask,$networkRouter,$totalHosts,$firstAddr,$lastAddr,$simpleMask")));
3711 }
3712 }
3713 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Main.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Main.pm
3714 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Main.pm 2020-04-08 23:43:15.000000000 +0400
3715 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Main.pm 2020-03-29 01:02:26.000000000 +0400
3716 @@ -1,5 +1,8 @@
3717 package SrvMngr::Controller::Main;
3718
3719 +#
3720 +# routes : end
3721 +#----------------------------------------------------------------------
3722 use strict;
3723 use warnings;
3724
3725 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Manual.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Manual.pm
3726 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Manual.pm 2020-04-08 23:43:15.000000000 +0400
3727 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Manual.pm 2020-04-08 20:03:49.000000000 +0400
3728 @@ -1,5 +1,8 @@
3729 package SrvMngr::Controller::Manual;
3730
3731 +#
3732 +# routes : end
3733 +#----------------------------------------------------------------------
3734 use strict;
3735 use warnings;
3736
3737 @@ -7,7 +10,6 @@
3738
3739 use Locale::gettext;
3740 use SrvMngr::I18N;
3741 -
3742 use SrvMngr qw(theme_list init_session_cgi);
3743
3744
3745 @@ -18,9 +20,7 @@
3746 my $title = $c->l('manual_FORM_TITLE');
3747 my $modul = $c->render_to_string(inline => $c->l('manual_DESCRIPTION'));
3748
3749 - $c->stash( releaseVersion => $c->session->{releaseVersion}, copyRight => $c->session->{copyRight},
3750 - PwdSet => $c->session->{PwdSet}, Unsafe => $c->session->{Unsafe},
3751 - title => $title, modul => $modul);
3752 + $c->stash( title => $title, modul => $modul);
3753
3754 $c->render(template => 'manual');
3755 }
3756 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modsearch.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modsearch.pm
3757 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modsearch.pm 2020-04-08 23:43:15.000000000 +0400
3758 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modsearch.pm 2020-03-29 01:02:58.000000000 +0400
3759 @@ -1,5 +1,8 @@
3760 package SrvMngr::Controller::Modsearch;
3761
3762 +#
3763 +# routes : end
3764 +#----------------------------------------------------------------------
3765 use strict;
3766 use warnings;
3767 use Mojo::Base 'Mojolicious::Controller';
3768 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modules.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modules.pm
3769 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modules.pm 2020-04-08 23:43:15.000000000 +0400
3770 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Modules.pm 2020-03-29 01:03:09.000000000 +0400
3771 @@ -7,6 +7,9 @@
3772 use Locale::gettext;
3773 use SrvMngr::I18N;
3774
3775 +#
3776 +# routes : end
3777 +#----------------------------------------------------------------------
3778 use SrvMngr qw(theme_list init_session_cgi);
3779
3780 sub bugreport {
3781 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Portforwarding.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Portforwarding.pm
3782 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Portforwarding.pm 2020-04-08 23:43:19.000000000 +0400
3783 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Portforwarding.pm 2020-04-08 20:43:38.000000000 +0400
3784 @@ -1,5 +1,12 @@
3785 package SrvMngr::Controller::Portforwarding;
3786
3787 +#----------------------------------------------------------------------
3788 +# heading : Security
3789 +# description : Port forwarding
3790 +# navigation : 5000 5400
3791 +#
3792 +# routes : end
3793 +#----------------------------------------------------------------------
3794 use strict;
3795 use warnings;
3796 use Mojo::Base 'Mojolicious::Controller';
3797 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Printers.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Printers.pm
3798 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Printers.pm 2020-04-08 23:43:15.000000000 +0400
3799 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Printers.pm 2020-03-29 01:10:06.000000000 +0400
3800 @@ -1,5 +1,13 @@
3801 package SrvMngr::Controller::Printers;
3802
3803 +#----------------------------------------------------------------------
3804 +# heading : Configuration
3805 +# description : Printers
3806 +# navigation : 6000 6400
3807 +#
3808 +#
3809 +# routes : end
3810 +#----------------------------------------------------------------------
3811 use strict;
3812 use warnings;
3813 use Mojo::Base 'Mojolicious::Controller';
3814 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Proxy.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Proxy.pm
3815 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Proxy.pm 2020-04-08 23:43:15.000000000 +0400
3816 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Proxy.pm 2020-03-29 01:10:21.000000000 +0400
3817 @@ -1,5 +1,13 @@
3818 package SrvMngr::Controller::Proxy;
3819
3820 +#----------------------------------------------------------------------
3821 +# heading : Security
3822 +# description : Proxy settings
3823 +# navigation : 5000 5500
3824 +#----------------------------------------------------------------------
3825 +#
3826 +# routes : end
3827 +#----------------------------------------------------------------------
3828 use strict;
3829 use warnings;
3830 use Mojo::Base 'Mojolicious::Controller';
3831 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Pseudonyms.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Pseudonyms.pm
3832 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Pseudonyms.pm 2020-04-08 23:43:15.000000000 +0400
3833 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Pseudonyms.pm 2020-03-29 01:10:46.000000000 +0400
3834 @@ -1,5 +1,13 @@
3835 package SrvMngr::Controller::Pseudonyms;
3836
3837 +#----------------------------------------------------------------------
3838 +# heading : Collaboration
3839 +# description : Pseudonyms
3840 +# navigation : 2000 2400
3841 +#----------------------------------------------------------------------
3842 +#
3843 +# routes : end
3844 +#----------------------------------------------------------------------
3845 use strict;
3846 use warnings;
3847 use Mojo::Base 'Mojolicious::Controller';
3848 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Qmailanalog.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Qmailanalog.pm
3849 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Qmailanalog.pm 2020-04-08 23:43:15.000000000 +0400
3850 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Qmailanalog.pm 2020-03-29 01:11:05.000000000 +0400
3851 @@ -1,5 +1,12 @@
3852 package SrvMngr::Controller::Qmailanalog;
3853
3854 +#----------------------------------------------------------------------
3855 +# heading : Administration
3856 +# description : Mail log file analysis
3857 +# navigation : 4000 4500
3858 +#
3859 +# routes : end
3860 +#----------------------------------------------------------------------
3861 use strict;
3862 use warnings;
3863 use Mojo::Base 'Mojolicious::Controller';
3864 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Quota.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Quota.pm
3865 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Quota.pm 2020-04-08 23:43:15.000000000 +0400
3866 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Quota.pm 2020-03-29 01:11:21.000000000 +0400
3867 @@ -1,5 +1,13 @@
3868 package SrvMngr::Controller::Quota;
3869
3870 +#----------------------------------------------------------------------
3871 +# heading : Collaboration
3872 +# description : Quotas
3873 +# navigation : 2000 2300
3874 +#----------------------------------------------------------------------
3875 +#
3876 +# routes : end
3877 +#----------------------------------------------------------------------
3878 use strict;
3879 use warnings;
3880 use Mojo::Base 'Mojolicious::Controller';
3881 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Reboot.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Reboot.pm
3882 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Reboot.pm 2020-04-08 23:43:15.000000000 +0400
3883 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Reboot.pm 2020-04-08 20:07:02.000000000 +0400
3884 @@ -1,5 +1,12 @@
3885 package SrvMngr::Controller::Reboot;
3886
3887 +#----------------------------------------------------------------------
3888 +# heading : Administration
3889 +# description : Reboot or shutdown
3890 +# navigation : 4000 4700
3891 +#
3892 +# routes : end
3893 +#----------------------------------------------------------------------
3894 use strict;
3895 use warnings;
3896 use Mojo::Base 'Mojolicious::Controller';
3897 @@ -9,15 +16,6 @@
3898
3899 use SrvMngr qw(theme_list init_session_cgi);
3900
3901 -#use esmith::util;
3902 -#use File::Basename;
3903 -#use Exporter;
3904 -#use Carp;
3905 -
3906 -#our @EXPORT = qw( change_settings
3907 -#);
3908 -
3909 -
3910
3911 sub main {
3912
3913 @@ -67,8 +65,8 @@
3914 }
3915 }
3916
3917 - #$c->stash( title => $title, modul => $result );
3918 - #$c->render(template => 'module');
3919 + $c->stash( title => $title, modul => $result );
3920 + $c->render(template => 'module');
3921
3922 };
3923
3924 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Remoteaccess.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Remoteaccess.pm
3925 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Remoteaccess.pm 2020-04-08 23:43:15.000000000 +0400
3926 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Remoteaccess.pm 2020-03-29 01:12:09.000000000 +0400
3927 @@ -1,5 +1,13 @@
3928 package SrvMngr::Controller::Remoteaccess;
3929
3930 +#----------------------------------------------------------------------
3931 +# heading : Security
3932 +# description : Remote access
3933 +# navigation : 5000 5200
3934 +#----------------------------------------------------------------------
3935 +#
3936 +# routes : end
3937 +#----------------------------------------------------------------------
3938 use strict;
3939 use warnings;
3940 use Mojo::Base 'Mojolicious::Controller';
3941 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Request.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Request.pm
3942 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Request.pm 2020-04-08 23:43:15.000000000 +0400
3943 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Request.pm 2020-03-29 01:04:15.000000000 +0400
3944 @@ -1,5 +1,8 @@
3945 package SrvMngr::Controller::Request;
3946
3947 +#
3948 +# routes : end
3949 +#----------------------------------------------------------------------
3950 use strict;
3951 use warnings;
3952 use Mojo::Base 'Mojolicious::Controller';
3953 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Review.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Review.pm
3954 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Review.pm 2020-04-08 23:43:15.000000000 +0400
3955 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Review.pm 2020-03-29 01:12:34.000000000 +0400
3956 @@ -1,5 +1,13 @@
3957 package SrvMngr::Controller::Review;
3958
3959 +#----------------------------------------------------------------------
3960 +# heading : Configuration
3961 +# description : Review configuration
3962 +# navigation : 6000 6800
3963 +#----------------------------------------------------------------------
3964 +#
3965 +# routes : end
3966 +#----------------------------------------------------------------------
3967 use strict;
3968 use warnings;
3969
3970 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Starterwebsite.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Starterwebsite.pm
3971 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Starterwebsite.pm 2020-04-08 23:43:15.000000000 +0400
3972 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Starterwebsite.pm 2020-03-29 01:12:49.000000000 +0400
3973 @@ -1,5 +1,12 @@
3974 package SrvMngr::Controller::Starterwebsite;
3975
3976 +#----------------------------------------------------------------------
3977 +# heading : Miscellaneous
3978 +# description : Create starter web site
3979 +# navigation : 7000 7100
3980 +#
3981 +# routes : end
3982 +#----------------------------------------------------------------------
3983 use strict;
3984 use warnings;
3985 use Mojo::Base 'Mojolicious::Controller';
3986 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Support.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Support.pm
3987 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Support.pm 2020-04-08 23:43:15.000000000 +0400
3988 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Support.pm 2020-03-29 01:13:17.000000000 +0400
3989 @@ -1,5 +1,12 @@
3990 package SrvMngr::Controller::Support;
3991
3992 +#----------------------------------------------------------------------
3993 +# heading : Miscellaneous
3994 +# description : Support and licensing
3995 +# navigation : 5000 5300
3996 +#
3997 +# routes : end
3998 +#----------------------------------------------------------------------
3999 use strict;
4000 use warnings;
4001 use Mojo::Base 'Mojolicious::Controller';
4002 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Swttheme.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Swttheme.pm
4003 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Swttheme.pm 2020-04-08 23:43:15.000000000 +0400
4004 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Swttheme.pm 2020-03-29 01:04:46.000000000 +0400
4005 @@ -1,5 +1,8 @@
4006 package SrvMngr::Controller::Swttheme;
4007
4008 +#
4009 +# routes : end
4010 +#----------------------------------------------------------------------
4011 use strict;
4012 use warnings;
4013
4014 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Useraccounts.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Useraccounts.pm
4015 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Useraccounts.pm 2020-04-08 23:43:15.000000000 +0400
4016 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Useraccounts.pm 2020-03-29 01:13:36.000000000 +0400
4017 @@ -1,5 +1,13 @@
4018 package SrvMngr::Controller::Useraccounts;
4019
4020 +#----------------------------------------------------------------------
4021 +# heading : Collaboration
4022 +# description : Users
4023 +# navigation : 2000 2100
4024 +#----------------------------------------------------------------------
4025 +#
4026 +# routes : end
4027 +#----------------------------------------------------------------------
4028 use strict;
4029 use warnings;
4030 use Mojo::Base 'Mojolicious::Controller';
4031 @@ -780,7 +788,7 @@
4032 $adb->create_user_auto_pseudonyms($acctName);
4033
4034 my @old_groups = $adb->user_group_list($acctName);
4035 - my @new_groups = $c->param("groupMemberships");
4036 + my @new_groups = @{$c->every_param("groupMemberships")};
4037
4038 $c->app->log->info($c->dumper("groups: Old " . @old_groups .' New '. @new_groups));
4039
4040 @@ -819,7 +827,7 @@
4041 or warn "Can't create new account for $acctName (does it already exist?)\n";
4042 $acct->reset_props(%userprops);
4043 $adb->create_user_auto_pseudonyms($acctName);
4044 - my @groups = $c->param("groupMemberships");
4045 + my @groups = @{$c->every_param("groupMemberships")};
4046
4047 $adb->add_user_to_groups($acctName, @groups);
4048
4049 @@ -849,7 +857,8 @@
4050
4051 my $acctName = $c->param('user');
4052
4053 - my @groups = $c->param('groupMemberships');
4054 + my @groups = @{$c->every_param("groupMemberships")};
4055 +
4056 $adb->set_user_groups($acctName, @groups);
4057
4058 }
4059 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Viewlogfiles.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Viewlogfiles.pm
4060 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Viewlogfiles.pm 2020-04-08 23:43:15.000000000 +0400
4061 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Viewlogfiles.pm 2020-03-29 01:14:01.000000000 +0400
4062 @@ -1,5 +1,13 @@
4063 package SrvMngr::Controller::Viewlogfiles;
4064
4065 +#----------------------------------------------------------------------
4066 +# heading : Administration
4067 +# description : View log files
4068 +# navigation : 4000 4400
4069 +#
4070 +#
4071 +# routes : end
4072 +#----------------------------------------------------------------------
4073 use strict;
4074 use warnings;
4075 use Mojo::Base 'Mojolicious::Controller';
4076 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Wbl.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Wbl.pm
4077 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Wbl.pm 2020-04-08 23:43:15.000000000 +0400
4078 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Wbl.pm 2020-03-30 00:47:35.000000000 +0400
4079 @@ -1,53 +1,87 @@
4080 package SrvMngr::Controller::Wbl;
4081
4082 +#----------------------------------------------------------------------
4083 +# heading : Configuration
4084 +# description : E-mail WBL
4085 +# navigation : 6000 6710
4086 +
4087 +# name : wbl, method : get, url : /wbl, ctlact : wbl#main
4088 +# name : wbldis, method : post, url : /wbl, ctlact : wbl#do_display
4089 +# name : wblupc, method : get, url : /wbl2, ctlact : wbl#do_update
4090 +# name : wblupd, method : post, url : /wbl2, ctlact : wbl#do_update
4091 +#
4092 +# routes : end
4093 +#----------------------------------------------------------------------
4094 +
4095 use strict;
4096 use warnings;
4097 use Mojo::Base 'Mojolicious::Controller';
4098
4099 -
4100 use Locale::gettext;
4101 use SrvMngr::I18N;
4102
4103 -use SrvMngr qw(theme_list init_session_cgi);
4104 +use SrvMngr qw( theme_list init_session_cgi );
4105 +
4106 +use Exporter;
4107 +our @EXPORT_OK = qw(
4108 + get_contrib_desc
4109 + get_contrib_routes
4110 + );
4111
4112 -####$locale->{namespace} = 'SrvMngr::I18N::Wbl';
4113 +our $db = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
4114 +our $wdb = esmith::ConfigDB->open('wbl') or die "Couldn't open wbl dbase\n";
4115 +our $sdb = esmith::ConfigDB->open('spamassassin') or die "Couldn't open spamassassin dbase\n";
4116
4117 -#use esmith::FormMagick::Panel::wbl;
4118 -use smeserver::Panel::wblNew;
4119 +
4120 +sub get_contrib_desc {
4121 + my $c = shift;
4122 + return { 'heading' => 'Configuration',
4123 + 'description' => 'E-mail WBL',
4124 + 'navigation' => '6000/6710' };
4125 +}
4126 +
4127 +
4128 +sub get_contrib_routes {
4129 + my $c = shift;
4130 + my @rt = (
4131 + { 'method' => 'get', 'url' => '/wbl', 'ctlact' => 'wbl#main', 'name' => 'wbl'},
4132 + { 'method' => 'post', 'url' => '/wbl', 'ctlact' => 'wbl#do_display', 'name' => 'wbldis'},
4133 + { 'method' => 'get', 'url' => '/wbl2', 'ctlact' => 'wbl#do_update', 'name' => 'wblupc'},
4134 + { 'method' => 'post', 'url' => '/wbl2', 'ctlact' => 'wbl#do_update', 'name' => 'wblupd'},
4135 + );
4136 + return \@rt;
4137 +}
4138
4139
4140 sub main {
4141 +
4142 my $c = shift;
4143 $c->app->log->info($c->log_req);
4144
4145 my %wbl_datas = ();
4146 my $title = $c->l('wbl_FORM_TITLE');
4147 - my $modul = $c->l('wbl_WBL_DESCRIPTION');
4148
4149 $wbl_datas{'trt'} = 'CHOICE';
4150 - my @wblList = ( [$c->l('wbl_RBL_LIST') => 'RBL'], [$c->l('wbl_BLACK_LIST') => 'BLACK'], [$c->l('wbl_WHITE_LIST') => 'WHITE'] );
4151 - $c->stash( list => \@wblList );
4152
4153 - $c->stash( title => $title, modul => $modul, wbl_datas => \%wbl_datas);
4154 - $c->render(template => 'wbl');
4155 + $c->stash( title => $title, wbl_datas => \%wbl_datas);
4156 + $c->render_maybe('wbl') or $c->render('wbl');
4157 };
4158
4159
4160 sub do_display {
4161 +
4162 my $c = shift;
4163 + $c->app->log->info($c->log_req);
4164
4165 - #my $button = $c->param('button');
4166 my $trt = $c->param('list') || 'CHOICE';
4167
4168 my %wbl_datas = ();
4169 my $title = $c->l('wbl_FORM_TITLE');
4170 - my $modul = $c->l('wbl_WBL_DESCRIPTION');
4171
4172 $wbl_datas{'trt'} = $trt;
4173
4174 if ( $trt eq 'RBL' ) {
4175
4176 - # For RBL List
4177 # dnsbl - returns 'enabled/disabled
4178 $wbl_datas{'dnsbl'} = get_dnsbl();
4179
4180 @@ -56,91 +90,483 @@
4181
4182 # uribl - returns 'enabled/disabled
4183 $wbl_datas{'uribl'} = get_uribl();
4184 -
4185 - # For SBLList List
4186 - my @sbllist = get_sbllist();
4187 - $c->stash( sbllist => \@sbllist );
4188 -
4189 - # For RBLList List
4190 - my @rbllist = get_rbllist();
4191 - $c->stash( rbllist => \@rbllist );
4192 -
4193 - # For URLList List
4194 - my @ubllist = get_ubllist();
4195 - $c->stash( ubllist => \@ubllist );
4196 -
4197 }
4198 - if ( $trt eq 'BLACK' ) {
4199
4200 + if ( $trt eq 'BLACK' ) {
4201 # For Black List
4202 - my @badhelo = get_badhelo();
4203 - $c->stash( badhelo => \@badhelo );
4204 -
4205 - my @badmailfrom = get_badmailfrom();
4206 - $c->stash( badmailfrom => \@badmailfrom );
4207 -
4208 - my @blacklistfrom = get_blacklistfrom();
4209 - $c->stash( blacklistfrom => \@blacklistfrom );
4210 -
4211 }
4212 - if ( $trt eq 'WHITE' ) {
4213
4214 + if ( $trt eq 'WHITE' ) {
4215 # For WBL List
4216 - my @whitelistsenders = get_whitelistsenders();
4217 - $c->stash( whitelistsenders => \@whitelistsenders );
4218 -
4219 - my @whitelisthelo = get_whitelisthelo();
4220 - $c->stash( whitelisthelo => \@whitelisthelo );
4221 -
4222 - my @whitelisthosts = get_whitelisthosts();
4223 - $c->stash( whitelisthosts => \@whitelisthosts );
4224 -
4225 - my @whitelistfrom = get_whitelistfrom();
4226 - $c->stash( whitelistfrom => \@whitelistfrom );
4227 -
4228 }
4229
4230 if ( $trt eq 'CHOICE' ) {
4231 - my @wblList = ( [$c->l('wbl_RBL_LIST') => 'RBL'], [$c->l('wbl_BLACK_LIST') => 'BLACK'],
4232 - [$c->l('wbl_WHITE_LIST') => 'WHITE'] );
4233 - $c->stash( list => \@wblList );
4234 -
4235 + #
4236 }
4237
4238 - $c->stash( title => $title, modul => $modul, wbl_datas => \%wbl_datas );
4239 + $c->stash( title => $title, wbl_datas => \%wbl_datas );
4240 $c->render( template => 'wbl' );
4241
4242 };
4243
4244
4245 sub do_update {
4246 +
4247 my $c = shift;
4248 $c->app->log->info($c->log_req);
4249
4250 - my $result = "";
4251 + my %wbl_datas = ();
4252 + my ($res, $result) = "";
4253 +
4254 + my $title = $c->l('wbl_FORM_TITLE');
4255
4256 my $trt = ($c->param('trt') || '???');
4257 + $wbl_datas{'trt'} = $trt;
4258
4259 #### $wbl_datas{'dnsbl'} = get_dnsbl(); etc...
4260 if ($trt eq 'RBL') {
4261 - $result .= 'RBL: ' . $c->l('wbl_ERROR_UPDATING') unless create_modify_rbl($c) == 0;
4262 - }
4263 - elsif ($trt eq 'BLACK') {
4264 - $result .= 'BLACK: ' . $c->l('wbl_ERROR_UPDATING') unless create_modify_black($c) == 0;
4265 - } elsif ($trt eq 'WHITE') {
4266 - $result .= 'WHITE: ' . $c->l('wbl_ERROR_UPDATING') unless create_modify_white($c) == 0;
4267 - } else {
4268 - $result .= "Undefined form: $trt." . $c->l('wbl_ERROR_UPDATING');
4269 +
4270 + # controls, validate
4271 + #if (xxx) {
4272 + # $result .= $c->l('XXXXXXX');
4273 + #}
4274 +
4275 + ##$result .= ' ** Blocked for testing ** !';
4276 +
4277 + if ( ! $result ) {
4278 + $res = $c->create_modify_rbl();
4279 + $result .= $res unless $res eq 'OK';
4280 + if ( ! $result ) {
4281 + $wbl_datas{trt} = 'SUC';
4282 + $result = $c->l('SUCCESS').' RBL';
4283 + }
4284 + }
4285 }
4286
4287 - my $title = $c->l('wbl_FORM_TITLE');
4288
4289 - if ( $result eq '' ) { $result = $c->l('wbl_SUCCESS') . " but System update NOT done !!!"; }
4290 + if ($trt eq 'BLACK') {
4291
4292 - $c->stash( title => $title, modul => $result );
4293 - $c->render(template => 'module');
4294 + # controls, validate
4295 + #if (xxx) {
4296 + # $result .= $c->l('XXXXXXX');
4297 + #}
4298 +
4299 + ##$result .= ' ** Blocked for testing ** !';
4300 +
4301 + if ( ! $result ) {
4302 + $res = $c->create_modify_black();
4303 + $result .= $res unless $res eq 'OK';
4304 + if ( ! $result ) {
4305 + $wbl_datas{trt} = 'SUC';
4306 + $result = $c->l('SUCCESS').' BLACK';
4307 + }
4308 + }
4309
4310 -};
4311 + }
4312 +
4313 +
4314 + if ($trt eq 'WHITE') {
4315 +
4316 + # controls, validate
4317 + #if (xxx) {
4318 + # $result .= $c->l('XXXXXXX');
4319 + #}
4320 +
4321 + ##$result .= ' ** Blocked for testing ** !';
4322 +
4323 + if ( ! $result ) {
4324 + $res = $c->create_modify_white();
4325 + $result .= $res unless $res eq 'OK';
4326 + if ( ! $result ) {
4327 + $wbl_datas{trt} = 'SUC';
4328 + $result = $c->l('SUCCESS').' WHITE';
4329 + }
4330 + }
4331 + }
4332 +
4333 + # common part
4334 + $c->stash( title => $title, wbl_datas => \%wbl_datas );
4335 + if ($wbl_datas{trt} ne 'SUC') {
4336 + $c->flash(error => $result);
4337 + $wbl_datas{'trt'} = $trt;
4338 + return $c->render(template => 'wbl');
4339 + }
4340 +
4341 + # successfully terminated
4342 + my $message = $trt . ' updates DONE';
4343 + $c->app->log->info($message);
4344 + $c->flash(success => $result);
4345 +
4346 + #return to 'wbl' route !!!
4347 + $c->redirect_to('wbl');
4348 +
4349 +}
4350 +
4351 +
4352 +sub get_dnsbl {
4353 + return ($db->get_prop('qpsmtpd', 'DNSBL') || 'disabled');
4354 +}
4355 +
4356 +
4357 +sub get_rhsbl {
4358 + return ($db->get_prop('qpsmtpd', 'RHSBL') || 'disabled');
4359 +}
4360 +
4361 +
4362 +sub get_uribl {
4363 + return ($db->get_prop('qpsmtpd', 'URIBL') || 'disabled');
4364 +}
4365 +
4366 +
4367 +sub get_sbllist {
4368 +
4369 + my $sbllistform = $db->get_prop('qpsmtpd', 'SBLList') || '';
4370 + my @list = (split /,/, $sbllistform);
4371 + return \@list;
4372 +}
4373 +
4374 +
4375 +sub get_rbllist {
4376 +
4377 + my $rbllistform = $db->get_prop('qpsmtpd', 'RBLList') || '';
4378 + my @list = (split /,/, $rbllistform);
4379 + return \@list;
4380 +}
4381 +
4382 +
4383 +sub get_ubllist {
4384 +
4385 + my $ubllistform = $db->get_prop('qpsmtpd', 'UBLList') || '';
4386 + my @list = ($ubllistform);
4387 + return \@list;
4388 +}
4389 +
4390 +
4391 +sub get_wbllist {
4392 +
4393 + my $c = shift;
4394 + return [[$c->l('wbl_RBL_LIST') => 'RBL'],
4395 + [$c->l('wbl_BLACK_LIST') => 'BLACK'],
4396 + [$c->l('wbl_WHITE_LIST') => 'WHITE']];
4397 +}
4398 +
4399 +
4400 +sub get_badhelo {
4401 +
4402 + my %list = $wdb->get('badhelo')->props;
4403 +
4404 + my @badhelo = ();
4405 + my ($parameter, $value) = "";
4406 + while (($parameter,$value) = each(%list)) {
4407 + next if ($parameter eq "type");
4408 + push @badhelo, $parameter if ($value eq "Black");
4409 + }
4410 + my @badh = sort(@badhelo);
4411 + return \@badh;
4412 +}
4413 +
4414 +
4415 +sub get_badmailfrom {
4416 +
4417 + my %list = $wdb->get('badmailfrom')->props;
4418 +
4419 + my @badmailfrom = ();
4420 + my ($parameter, $value) = "";
4421 + while (($parameter,$value) = each(%list)) {
4422 + next if ($parameter eq "type");
4423 + push @badmailfrom, $parameter if ($value eq "Black");
4424 + }
4425 + my @badmf = sort(@badmailfrom);
4426 + return \@badmf;
4427 +}
4428 +
4429 +
4430 +sub get_blacklistfrom {
4431 +
4432 + my %list = $sdb->get('wbl.global')->props;
4433 +
4434 + my @blacklistfrom = ();
4435 + my ($parameter, $value) = "";
4436 +
4437 + while (($parameter,$value) = each(%list)) {
4438 + next if ($parameter eq "type");
4439 + push @blacklistfrom, $parameter if ($value eq "Black");
4440 + }
4441 + my @blacklf = sort(@blacklistfrom);
4442 + return \@blacklf;
4443 +}
4444 +
4445 +
4446 +sub get_whitelisthosts {
4447 +
4448 + my %list = $wdb->get('whitelisthosts')->props;
4449 +
4450 + my @whitelisthosts = ();
4451 + my ($parameter, $value) = "";
4452 +
4453 + while (($parameter,$value) = each(%list)) {
4454 + next if ($parameter eq "type");
4455 + push @whitelisthosts, $parameter if ($value eq "White");
4456 + }
4457 + my @whitelh = sort(@whitelisthosts);
4458 + return \@whitelh;
4459 +}
4460 +
4461 +
4462 +sub get_whitelisthelo {
4463 +
4464 + my %list = $wdb->get('whitelisthelo')->props;
4465 +
4466 + my @whitelisthelo = ();
4467 + my ($parameter, $value) = "";
4468 +
4469 + while (($parameter,$value) = each(%list)) {
4470 + next if ($parameter eq "type");
4471 + push @whitelisthelo, $parameter if ($value eq "White");
4472 + }
4473 + my @whitelh = sort(@whitelisthelo);
4474 + return \@whitelh;
4475 +}
4476 +
4477 +
4478 +sub get_whitelistsenders {
4479 +
4480 + my %list = $wdb->get('whitelistsenders')->props;
4481 +
4482 + my @whitelistsenders = ();
4483 + my ($parameter, $value) = "";
4484 +
4485 + while (($parameter,$value) = each(%list)) {
4486 + next if ($parameter eq "type");
4487 + push @whitelistsenders, $parameter if ($value eq "White");
4488 + }
4489 + my @whitels = sort(@whitelistsenders);
4490 + return \@whitels;
4491 +}
4492 +
4493 +
4494 +sub get_whitelistfrom {
4495 +
4496 + my %list = $sdb->get('wbl.global')->props;
4497 +
4498 + my @whitelistfrom = ();
4499 + my ($parameter, $value) = "";
4500 +
4501 + while (($parameter,$value) = each(%list)) {
4502 + next if ($parameter eq "type");
4503 + push @whitelistfrom, $parameter if ($value eq "White");
4504 + }
4505 + my @whitels = sort(@whitelistfrom);
4506 + return \@whitels;
4507 +}
4508 +
4509 +
4510 +sub create_modify_rbl {
4511 +
4512 + my $c = shift;
4513 +
4514 + my $dnsbl = $c->param('Dnsbl');
4515 + $db->set_prop('qpsmtpd', 'DNSBL', "$dnsbl");
4516 +
4517 + my $rhsbl = $c->param('Rhsbl');
4518 + $db->set_prop('qpsmtpd', 'RHSBL', "$rhsbl");
4519 +
4520 +
4521 + my $sbllistcgi = $c->param('Sbllist');
4522 + my @sbllistcgi = split /\s{2,}/, $sbllistcgi;
4523 + my $sbllistdb = '';
4524 + foreach (@sbllistcgi) { $sbllistdb = $sbllistdb . ',' . $_; }
4525 + $sbllistdb =~ s/^,//;
4526 +
4527 + $db->set_prop('qpsmtpd', 'SBLList', "$sbllistdb");
4528 +
4529 + my $rbllistcgi = $c->param('Rbllist');
4530 + my @rbllistcgi = split /\s{2,}/, $rbllistcgi;
4531 + my $rbllistdb = '';
4532 + foreach (@rbllistcgi) { $rbllistdb = $rbllistdb . ',' . $_; }
4533 + $rbllistdb =~ s/^,//;
4534 +
4535 + $db->set_prop('qpsmtpd', 'RBLList', "$rbllistdb");
4536 +
4537 + #Update email settings
4538 + #unless ( system ("/sbin/e-smith/signal-event", "smeserver-wbl-update") == 0 ){
4539 + # return 'RBL : ' . $c->l('wbl_ERROR_UPDATING');
4540 + #}
4541 +
4542 + return 'OK';
4543 +}
4544 +
4545 +
4546 +sub create_modify_black {
4547 +
4548 + my $c = shift;
4549 +
4550 + #-------------------------------
4551 + # qmail badhelo
4552 + #-------------------------------
4553 + my %list = $wdb->get('badhelo')->props;
4554 + my ($parameter, $value) = '';
4555 +
4556 + while (($parameter,$value) = each(%list)) {
4557 + next if ($parameter eq "type");
4558 + if ($value eq "Black") {
4559 + $wdb->get_prop_and_delete('badhelo', "$parameter");
4560 + }
4561 + }
4562 +
4563 + my $BadHelo = $c->param("Badhelo");
4564 + $BadHelo =~ s/\r\n/,/g;
4565 + my @BadHelo = sort(split /,/, $BadHelo);
4566 + foreach $BadHelo (@BadHelo) {
4567 + $wdb->set_prop('badhelo', "$BadHelo", 'Black');
4568 + }
4569 +
4570 + #-------------------------------
4571 + # qmail badmailfrom
4572 + #-------------------------------
4573 + my %list_badmailfrom = $wdb->get('badmailfrom')->props;
4574 + my ($parameter_badmailfrom, $value_badmailfrom) = "";
4575 +
4576 + while (($parameter_badmailfrom,$value_badmailfrom) = each(%list_badmailfrom)) {
4577 + next if ($parameter_badmailfrom eq "type");
4578 + if ($value_badmailfrom eq "Black") {
4579 + $wdb->get_prop_and_delete('badmailfrom', "$parameter_badmailfrom");
4580 + }
4581 + }
4582 +
4583 + my $BadMailFrom = $c->param("Badmailfrom");
4584 + $BadMailFrom =~ s/\r\n/,/g;
4585 + my @BadMailFrom = sort(split /,/, $BadMailFrom);
4586 + foreach $BadMailFrom (@BadMailFrom){
4587 + $wdb->set_prop('badmailfrom', "$BadMailFrom", 'Black');
4588 + }
4589 + #-------------------------------
4590 + # spamassassin blacklist_from
4591 + #-------------------------------
4592 + my %list_wblglobal = $sdb->get('wbl.global')->props;
4593 + my ($parameter_wblglobal, $value_wblglobal) = "";
4594 +
4595 + while (($parameter_wblglobal,$value_wblglobal) = each(%list_wblglobal)) {
4596 + next if ($parameter_wblglobal eq "type");
4597 + if ($value_wblglobal eq "Black") {
4598 + $sdb->get_prop_and_delete('wbl.global', "$parameter_wblglobal");
4599 + }
4600 + }
4601 +
4602 + my $BlacklistFrom = $c->param("Blacklistfrom");
4603 + $BlacklistFrom =~ s/\r\n/,/g;
4604 + my @BlacklistFrom = sort(split /,/, $BlacklistFrom);
4605 + foreach $BlacklistFrom (@BlacklistFrom){
4606 + $sdb->set_prop('wbl.global', "$BlacklistFrom", 'Black');
4607 + }
4608 +
4609 + #Update email settings
4610 + #unless ( system ("/sbin/e-smith/signal-event", "smeserver-wbl-update") == 0 ) {
4611 + # return 'BLACK: '. $c->l('wbl_ERROR_UPDATING');
4612 + #}
4613 +
4614 + return 'OK';
4615 +}
4616 +
4617 +
4618 +sub create_modify_white {
4619 +
4620 + my $c = shift;
4621 +
4622 + #-------------------------------
4623 + # qpsmtpd whitelisthosts
4624 + #-------------------------------
4625 + my %list = $wdb->get('whitelisthosts')->props;
4626 + my $parameter = "";
4627 + my $value = "";
4628 + while (($parameter,$value) = each(%list)) {
4629 + if ($parameter eq "type") {next;}
4630 +
4631 + if ($value eq "White") {
4632 + $wdb->get_prop_and_delete('whitelisthosts', "$parameter");
4633 + }
4634 + }
4635 +
4636 + my $WhitelistHosts = $c->param("Whitelisthosts");
4637 + $WhitelistHosts =~ s/\r\n/,/g;
4638 + my @WhitelistHosts = sort(split /,/, $WhitelistHosts);
4639 + foreach $WhitelistHosts (@WhitelistHosts)
4640 + {
4641 + $wdb->set_prop('whitelisthosts', "$WhitelistHosts", 'White');
4642 + }
4643 +
4644 + #-------------------------------
4645 + # qpsmtpd whitelisthelo
4646 + #-------------------------------
4647 + my %list_whitelisthelo = $wdb->get('whitelisthelo')->props;
4648 + my $parameter_whitelisthelo = "";
4649 + my $value_whitelisthelo = "";
4650 + while (($parameter_whitelisthelo,$value_whitelisthelo) = each(%list_whitelisthelo)) {
4651 + if ($parameter_whitelisthelo eq "type") {next;}
4652 +
4653 + if ($value_whitelisthelo eq "White") {
4654 + $wdb->get_prop_and_delete('whitelisthelo', "$parameter_whitelisthelo");
4655 + }
4656 + }
4657 +
4658 + my $WhitelistHelo = $c->param("Whitelisthelo");
4659 + $WhitelistHelo =~ s/\r\n/,/g;
4660 + my @WhitelistHelo = sort(split /,/, $WhitelistHelo);
4661 + foreach $WhitelistHelo (@WhitelistHelo)
4662 + {
4663 + $wdb->set_prop('whitelisthelo', "$WhitelistHelo", 'White');
4664 + }
4665 +
4666 + #-------------------------------
4667 + # qpsmtpd whitelistsenders
4668 + #-------------------------------
4669 + my %list_whitelistsenders = $wdb->get('whitelistsenders')->props;
4670 + my $parameter_whitelistsenders = "";
4671 + my $value_whitelistsenders = "";
4672 + while (($parameter_whitelistsenders,$value_whitelistsenders) = each(%list_whitelistsenders)) {
4673 + if ($parameter_whitelistsenders eq "type") {next;}
4674 +
4675 + if ($value_whitelistsenders eq "White") {
4676 + $wdb->get_prop_and_delete('whitelistsenders', "$parameter_whitelistsenders");
4677 + }
4678 + }
4679 +
4680 + my $WhitelistSenders = $c->param("Whitelistsenders");
4681 + $WhitelistSenders =~ s/\r\n/,/g;
4682 + my @WhitelistSenders = sort(split /,/, $WhitelistSenders);
4683 + foreach $WhitelistSenders (@WhitelistSenders)
4684 + {
4685 + $wdb->set_prop('whitelistsenders', "$WhitelistSenders", 'White');
4686 + }
4687 +
4688 + #-------------------------------
4689 + # spamassassin whitelist_from
4690 + #-------------------------------
4691 + my %list_wblglobal = $sdb->get('wbl.global')->props;
4692 + my $parameter_wblglobal = "";
4693 + my $value_wblglobal = "";
4694 + while (($parameter_wblglobal,$value_wblglobal) = each(%list_wblglobal)) {
4695 + if ($parameter_wblglobal eq "type") {next;}
4696 +
4697 + if ($value_wblglobal eq "White") {
4698 + $sdb->get_prop_and_delete('wbl.global', "$parameter_wblglobal");
4699 + }
4700 + }
4701 +
4702 + my $WhitelistFrom = $c->param("Whitelistfrom");
4703 + $WhitelistFrom =~ s/\r\n/,/g;
4704 + my @WhitelistFrom = sort(split /,/, $WhitelistFrom);
4705 + foreach $WhitelistFrom (@WhitelistFrom){
4706 + $sdb->set_prop('wbl.global', "$WhitelistFrom", 'White');
4707 + }
4708 +
4709 + #Update email settings
4710 + #unless ( system ("/sbin/e-smith/signal-event", "smeserver-wbl-update") == 0 ) {
4711 + # return 'WHITE: '. $c->l('wbl_ERROR_UPDATING');
4712 + #}
4713 +
4714 + return 'OK';
4715 +}
4716
4717
4718 1;
4719 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Welcome.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Welcome.pm
4720 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Welcome.pm 2020-04-08 23:43:15.000000000 +0400
4721 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Welcome.pm 2020-03-29 01:05:45.000000000 +0400
4722 @@ -1,5 +1,8 @@
4723 package SrvMngr::Controller::Welcome;
4724
4725 +#
4726 +# routes : end
4727 +#----------------------------------------------------------------------
4728 use strict;
4729 use warnings;
4730
4731 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Workgroup.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Workgroup.pm
4732 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Workgroup.pm 2020-04-08 23:43:15.000000000 +0400
4733 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Workgroup.pm 2020-03-29 01:14:25.000000000 +0400
4734 @@ -1,5 +1,12 @@
4735 package SrvMngr::Controller::Workgroup;
4736
4737 +#----------------------------------------------------------------------
4738 +# heading : Configuration
4739 +# description : Workgroup
4740 +# navigation : 6000 6200
4741 +#
4742 +# routes : end
4743 +#----------------------------------------------------------------------
4744 use strict;
4745 use warnings;
4746 use Mojo::Base 'Mojolicious::Controller';
4747 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Yum.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Yum.pm
4748 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Yum.pm 1970-01-01 04:00:00.000000000 +0400
4749 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Yum.pm 2020-03-29 01:14:46.000000000 +0400
4750 @@ -0,0 +1,601 @@
4751 +package SrvMngr::Controller::Yum;
4752 +
4753 +#----------------------------------------------------------------------
4754 +# heading : Configuration
4755 +# description : Software installer
4756 +# navigation : 4000 4200
4757 +#
4758 +# routes : end
4759 +#----------------------------------------------------------------------
4760 +use strict;
4761 +use warnings;
4762 +use Mojo::Base 'Mojolicious::Controller';
4763 +
4764 +use Locale::gettext;
4765 +use SrvMngr::I18N;
4766 +
4767 +use SrvMngr qw(theme_list init_session_cgi ip_number_or_blank);
4768 +
4769 +use esmith::ConfigDB;
4770 +use esmith::AccountsDB;
4771 +
4772 +use esmith::util;
4773 +use File::Basename;
4774 +
4775 +our $cdb = esmith::ConfigDB->open || die "Couldn't open config db";
4776 +
4777 +#use CGI::FormMagick::TagMaker;
4778 +#use esmith::cgi;
4779 +#use File::stat;
4780 +
4781 +our %dbs;
4782 +
4783 +for ( qw(available installed updates) )
4784 +{
4785 + $dbs{$_} = esmith::ConfigDB->open_ro("yum_$_") or
4786 + die "Couldn't open yum_$_ DB\n";
4787 +}
4788 +
4789 +for ( qw(repositories) )
4790 +{
4791 + $dbs{$_} = esmith::ConfigDB->open("yum_$_") or
4792 + die "Couldn't open yum_$_ DB\n";
4793 +}
4794 +
4795 +
4796 +sub main {
4797 +
4798 + my $c = shift;
4799 + $c->app->log->info($c->log_req);
4800 +
4801 + my %yum_datas = ();
4802 + my $title = $c->l('yum_FORM_TITLE');
4803 + my $dest = 'yum';
4804 + my $notif = '';
4805 +
4806 + $yum_datas{'trt'} = 'STAT';
4807 +
4808 + if (-e "/var/run/yum.pid") {
4809 + $yum_datas{'trt'} = 'LOGF';
4810 + #$dest = 'yumlogfile';
4811 + $c->stash( title => $title, notif => $notif, yum_datas => \%yum_datas );
4812 + return $c->redirect_to("/yumd");
4813 + } elsif ($c->get_prop('yum', 'LogFile')) {
4814 + $yum_datas{'trt'} = 'PSTU';
4815 + #$dest = 'yumpostupg';
4816 + $c->stash( title => $title, notif => $notif, yum_datas => \%yum_datas );
4817 + return $c->redirect_to("/yumd");
4818 + } else {
4819 + # normal other trt
4820 + }
4821 +
4822 + $c->stash( title => $title, notif => $notif, yum_datas => \%yum_datas );
4823 + return $c->render( template => $dest );
4824 +
4825 +}
4826 +
4827 +
4828 +sub do_display {
4829 +
4830 + my $c = shift;
4831 +
4832 + my $rt = $c->current_route;
4833 + my $trt = ($c->param('trt') || 'STAT');
4834 +
4835 + my %yum_datas = ();
4836 + my $title = $c->l('yum_FORM_TITLE');
4837 + my ($notif, $dest) = '';
4838 +
4839 + $yum_datas{'trt'} = $trt;
4840 +
4841 + if ( $trt eq 'UPDT' ) {
4842 + $dest = 'yumupdate';
4843 + }
4844 +
4845 + if ( $trt eq 'INST' ) {
4846 + $dest = 'yuminstall';
4847 + }
4848 +
4849 + if ( $trt eq 'REMO' ) {
4850 + $dest = 'yumremove';
4851 + }
4852 +
4853 + if ( $trt eq 'CONF' ) {
4854 + $dest = 'yumconfig';
4855 + }
4856 +
4857 + if ( $trt eq 'LOGF' ) {
4858 + if (-e "/var/run/yum.pid") {
4859 + $dest = 'yumlogfile';
4860 + }
4861 + }
4862 +
4863 + if ( $trt eq 'PSTU') {
4864 + if ($c->get_prop('yum', 'LogFile')) {
4865 + $dest = 'yumpostupg';
4866 + }
4867 + }
4868 +
4869 + if ( $dest eq '' ) { $dest = 'yum'; }
4870 +
4871 + $c->stash( title => $title, notif => $notif, yum_datas => \%yum_datas );
4872 + return $c->render( template => $dest );
4873 +
4874 +};
4875 +
4876 +
4877 +sub do_update {
4878 +
4879 + my $c = shift;
4880 + $c->app->log->info($c->log_req);
4881 +
4882 + my $rt = $c->current_route;
4883 + my $trt = $c->param('trt');
4884 +
4885 + my %yum_datas = ();
4886 + $yum_datas{trt} = $trt;
4887 +
4888 + my $title = $c->l('yum_FORM_TITLE');
4889 +
4890 + my ($dest, $res, $result) = '';
4891 +
4892 + if ( $trt eq 'UPDT' ) {
4893 +
4894 + $dest = 'yumupdate';
4895 +# $yum_datas{xxx} = $c->param('XXX');
4896 +
4897 + # controls
4898 +# $res = xxxxxxx( $c );
4899 +# $result .= $res unless $res eq 'OK';
4900 +
4901 + #$result .= 'Blocked for testing !';
4902 +
4903 + if ( ! $result ) {
4904 + $res = $c->do_yum('update');
4905 + $result .= $res unless $res eq 'OK';
4906 + if ( ! $result ) {
4907 + $yum_datas{trt} = 'SUC';
4908 + $result = $c->l('yum_SUCCESS');
4909 + }
4910 + }
4911 + }
4912 +
4913 + if ( $trt eq 'INST' ) {
4914 +
4915 + $dest = 'yuminstall';
4916 +# $yum_datas{xxx} = $c->param('XXX');
4917 +
4918 + # controls
4919 +# $res = zzzzzz( $c );
4920 +# $result .= $res unless $res eq 'OK';
4921 +
4922 + #$result .= 'Blocked for testing !';
4923 +
4924 + if ( ! $result ) {
4925 + $res = $c->do_yum('install');
4926 + $result .= $res unless $res eq 'OK';
4927 + if ( ! $result ) {
4928 + $yum_datas{trt} = 'SUC';
4929 + $result = $c->l('yum_SUCCESS');
4930 + }
4931 + }
4932 + }
4933 +
4934 + if ( $trt eq 'REMO' ) {
4935 +
4936 + $dest = 'yumremove';
4937 +# $yum_datas{xxx} = $c->param('XXX');
4938 +
4939 + # controls
4940 +# $res = yyyyyyyyy( $c );
4941 +# $result .= $res unless $res eq 'OK';
4942 +
4943 + #$result .= 'Blocked for testing !';
4944 +
4945 + if ( ! $result ) {
4946 + $res = $c->do_yum('config');
4947 + $result .= $res unless $res eq 'OK';
4948 + if ( ! $result ) {
4949 + $yum_datas{trt} = 'SUC';
4950 + $result = $c->l('yum_SUCCESS');
4951 + }
4952 + }
4953 + }
4954 +
4955 + if ( $trt eq 'CONF' ) {
4956 +
4957 + $dest = 'yumconfig';
4958 +# $yum_datas{xxx} = $c->param('XXX');
4959 +
4960 + # controls
4961 +# $res = $c->zzzz( $c->param('ZZZZ') );
4962 +# $result .= $res . ' DMS ' unless $res eq 'OK';
4963 +
4964 +# $result .= 'Blocked for testing !';
4965 +
4966 + if ( ! $result ) {
4967 + $res = $c->change_settings();
4968 + $result .= $res unless $res eq 'OK';
4969 + if ( ! $result ) {
4970 + $yum_datas{trt} = 'SUC';
4971 + $result = $c->l('yum_SUCCESS');
4972 + }
4973 + }
4974 + }
4975 +
4976 +
4977 + if ( $trt eq 'PSTU') {
4978 +
4979 + $dest = 'yumpostupg';
4980 + $res = $c->post_upgrade_reboot();
4981 + $result .= $res unless $res eq 'OK';
4982 + if ( ! $result ) {
4983 + $yum_datas{trt} = 'SUC';
4984 + $result = $c->l('yum_SYSTEM_BEING_RECONFIGURE');
4985 + }
4986 + }
4987 +
4988 +
4989 + if ( $trt eq 'LOGF' ) {
4990 +
4991 + $dest = 'yumlogfile';
4992 + if ( ! -e "/var/run/yum.pid") {
4993 + $yum_datas{trt} = 'SUC';
4994 + }
4995 + }
4996 +
4997 +
4998 +
4999 + $c->stash( title => $title, notif => $result, yum_datas => \%yum_datas );
5000 + if ($yum_datas{trt} ne 'SUC') {
5001 + return $c->render(template => $dest);
5002 + }
5003 + $c->redirect_to("/yum");
5004 +
5005 +};
5006 +
5007 +
5008 +sub get_prop {
5009 + my ($c, $item, $prop, $default) = @_;
5010 + warn "You must specify a record key" unless $item;
5011 + warn "You must specify a property name" unless $prop;
5012 + my $record = $cdb->get($item) or warn "Couldn't get record for $item";
5013 + my $value = $record ? $record->prop($prop) : undef;
5014 + return defined $value ? $value : $default;
5015 +}
5016 +
5017 +
5018 +sub get_value {
5019 + my ($c,$item,$default) = @_;
5020 + my $record = $cdb->get($item) or warn "Couldn't get record for $item";
5021 + my $value = $record ? $record->value() : undef;
5022 + return defined $value ? $value : $default;
5023 +}
5024 +
5025 +
5026 +sub is_empty {
5027 +
5028 + my ($c, $yumdb) = @_;
5029 +
5030 + my $groups = $dbs{$yumdb}->get_all_by_prop(type => 'group') || 'none';
5031 + my $packages = $dbs{$yumdb}->get_all_by_prop(type => 'package') || 'none';
5032 +
5033 + #Show no updates if both = none
5034 + return 1 if ($packages eq $groups);
5035 +
5036 + #else return here
5037 + return;
5038 +}
5039 +
5040 +
5041 +sub non_empty {
5042 +
5043 + my ($c, $yumdb, $type) = @_;
5044 +
5045 + $type ||= 'both';
5046 +
5047 + return 0 unless (exists $dbs{$yumdb});
5048 +
5049 + my $groups = scalar $dbs{$yumdb}->get_all_by_prop(type => 'group');
5050 + return $groups if ($type eq 'group');
5051 +
5052 + my $packages = scalar $dbs{$yumdb}->get_all_by_prop(type => 'package');
5053 + if ($type eq 'package')
5054 + {
5055 + return $c->package_functions_enabled ? $packages : 0;
5056 + }
5057 +
5058 + return ($c->package_functions_enabled or $yumdb eq 'updates') ?
5059 + ($groups || $packages) : $groups;
5060 +}
5061 +
5062 +
5063 +sub package_functions_enabled {
5064 +
5065 + my ($c) = @_;
5066 +
5067 + return ($cdb->get_prop("yum", "PackageFunctions") eq "enabled");
5068 +
5069 +}
5070 +
5071 +
5072 +sub get_status {
5073 +
5074 + my ($c, $prop, $localise) = @_;
5075 +
5076 + my $status = $cdb->get_prop("yum", $prop) || 'disabled';
5077 +
5078 + return $status unless $localise;
5079 +
5080 + return $c->l($status eq 'enabled' ? 'ENABLED' : 'DISABLED');
5081 +}
5082 +
5083 +
5084 +sub get_options {
5085 +
5086 + my ($c, $yumdb, $type) = @_;
5087 +
5088 + my %options;
5089 +
5090 + for ($dbs{$yumdb}->get_all_by_prop(type => $type))
5091 + {
5092 + $options{$_->key} = $_->key . " " . $_->prop("Version") . " - " .
5093 + $_->prop("Repo");
5094 + }
5095 +
5096 + return \%options;
5097 +}
5098 +
5099 +
5100 +sub get_options2 {
5101 +
5102 + my ($c, $yumdb, $type) = @_;
5103 +
5104 + my @options;
5105 +
5106 + for ($dbs{$yumdb}->get_all_by_prop(type => $type))
5107 + {
5108 + push @options, [ $_->key . " " . $_->prop("Version") . " - " .
5109 + $_->prop("Repo") => $_->key ];
5110 + }
5111 +
5112 + return \@options;
5113 +}
5114 +
5115 +
5116 +sub get_names {
5117 +
5118 + return [ keys %{get_options(@_)} ];
5119 +}
5120 +
5121 +
5122 +sub get_names2 {
5123 +
5124 + my ($c, $yumdb, $type) = @_;
5125 + my @selected;
5126 +
5127 + for ($dbs{$yumdb}->get_all_by_prop(type => $type)) {
5128 + push @selected, $_->key;
5129 + }
5130 +
5131 + return \@selected;
5132 +# return [ values @{get_options2(@_)} ];
5133 +}
5134 +
5135 +
5136 +sub get_repository_options2 {
5137 +
5138 + my $c = shift;
5139 +
5140 + my @options;
5141 +
5142 + foreach my $repos (
5143 + $dbs{repositories}->get_all_by_prop(type => "repository") )
5144 + {
5145 + next unless ($repos->prop('Visible') eq 'yes'
5146 + or $repos->prop('status') eq 'enabled');
5147 +
5148 + push @options, [ $repos->prop('Name') => $repos->key ];
5149 + }
5150 +
5151 + my @opts = sort { $a->[0] cmp $b->[0] } @options;
5152 +
5153 + return \@opts;
5154 +}
5155 +
5156 +
5157 +sub get_repository_current_options
5158 +{
5159 + my $c = shift;
5160 +
5161 + my @selected;
5162 +
5163 + foreach my $repos (
5164 + $dbs{repositories}->get_all_by_prop( type => "repository" ) )
5165 + {
5166 + next unless ($repos->prop('Visible') eq 'yes'
5167 + or $repos->prop('status') eq 'enabled');
5168 +
5169 + push @selected, $repos->key if ($repos->prop('status') eq 'enabled');
5170 + }
5171 +
5172 + return \@selected;
5173 +}
5174 +
5175 +
5176 +sub get_avail2 {
5177 +
5178 + my ($c, $yumdb, $type) = @_;
5179 +
5180 + return $c->get_options2("available", "package");
5181 +}
5182 +
5183 +
5184 +sub get_check_freq_opt {
5185 +
5186 + my ($c) = @_;
5187 +
5188 + return [[ $c->l('DISABLED') => 'disabled'],
5189 + [ $c->l('yum_1DAILY') => 'daily'],
5190 + [ $c->l('yum_2WEEKLY') => 'weekly'],
5191 + [ $c->l('yum_3MONTHLY') => 'monthly']];
5192 +}
5193 +
5194 +
5195 +sub print_skip_header {
5196 +
5197 + my ($c) = shift;
5198 +
5199 + return "<INPUT TYPE=\"hidden\" NAME=\"skip_header\" VALUE=\"1\">\n";
5200 +}
5201 +
5202 +
5203 +sub change_settings {
5204 +
5205 + my ($c) = @_;
5206 +
5207 + for my $param ( qw(
5208 + PackageFunctions
5209 + ) )
5210 + {
5211 + $cdb->set_prop('yum', $param, $c->param("yum_$param"));
5212 + }
5213 +
5214 + my $check4updates = $c->param("yum_check4updates");
5215 + my $status = 'disabled';
5216 +
5217 + if ($check4updates ne 'disabled') { $status = 'enabled'; }
5218 +
5219 + $cdb->set_prop('yum', 'check4updates', $check4updates);
5220 +
5221 + my $deltarpm = $c->param("yum_DeltaRpmProcess");
5222 + $cdb->set_prop('yum', 'DeltaRpmProcess', $deltarpm);
5223 +
5224 + my $downloadonly = $c->param("yum_DownloadOnly");
5225 + if ($downloadonly ne 'disabled') { $status = 'enabled'; }
5226 +
5227 + $cdb->set_prop('yum', 'DownloadOnly', $downloadonly);
5228 +
5229 + my $AutoInstallUpdates = $c->param("yum_AutoInstallUpdates");
5230 + if ($AutoInstallUpdates ne 'disabled') { $status = 'enabled'; }
5231 +
5232 + $cdb->set_prop('yum', 'AutoInstallUpdates', $AutoInstallUpdates);
5233 + $cdb->set_prop('yum', 'status', $status);
5234 +
5235 + my %selected = map {$_ => 1} @{$c->every_param('SelectedRepositories')};
5236 +
5237 + foreach my $repos (
5238 + $dbs{repositories}->get_all_by_prop(type => "repository") )
5239 + {
5240 + $repos->set_prop("status",
5241 + exists $selected{$repos->key} ? 'enabled' : 'disabled');
5242 +
5243 + }
5244 +
5245 + $dbs{repositories}->reload;
5246 +
5247 + unless ( system( "/sbin/e-smith/signal-event", "yum-modify" ) == 0 )
5248 + {
5249 + return $c->l('yum_ERROR_UPDATING_CONFIGURATION');
5250 + }
5251 +
5252 + return 'OK';
5253 +}
5254 +
5255 +
5256 +sub do_yum {
5257 +
5258 + my ($c, $function) = @_;
5259 +
5260 + for ( qw(SelectedGroups SelectedPackages) )
5261 + {
5262 + $cdb->set_prop("yum", $_, join(',', (@{$c->every_param($_)} )));
5263 + }
5264 +
5265 + esmith::util::backgroundCommand(0,
5266 + "/sbin/e-smith/signal-event", "yum-$function");
5267 +
5268 + $cdb->reload;
5269 +
5270 + return 'OK';
5271 +}
5272 +
5273 +
5274 +sub get_yum_status_page {
5275 +
5276 + my ($c) = @_;
5277 +
5278 + my $yum_status;
5279 +
5280 + open(YUM_STATUS, "</var/run/yum.status");
5281 + $yum_status = <YUM_STATUS>;
5282 + close(YUM_STATUS);
5283 +
5284 + return $yum_status;
5285 +
5286 +}
5287 +
5288 +
5289 +sub show_file_page {
5290 +
5291 + my ($c, $filepage) = @_;
5292 +
5293 + return '' unless ( $filepage and ( -e "$filepage" ) );
5294 +
5295 + my $out .= sprintf "<PRE>";
5296 +
5297 + open (FILE, "$filepage");
5298 + while (<FILE>) {
5299 + $out .= sprintf("%s", $_);
5300 + }
5301 + close FILE;
5302 +
5303 + $out .= sprintf "</PRE>";
5304 +
5305 + return $out;
5306 +}
5307 +
5308 +
5309 +sub format_yum_log {
5310 +
5311 + my ($c) = @_;
5312 +
5313 + my $yum_log = $cdb->get_prop('yum', 'LogFile');
5314 +
5315 + return $c->show_file_page($yum_log);
5316 +
5317 +}
5318 +
5319 +
5320 +sub post_upgrade_reboot {
5321 +
5322 + my $c = shift;
5323 +
5324 + $cdb->get_prop_and_delete('yum', 'LogFile');
5325 + $cdb->reload;
5326 +
5327 + if (fork == 0) {
5328 + exec "/sbin/e-smith/signal-event post-upgrade; /sbin/e-smith/signal-event reboot";
5329 + die "Exec failed";
5330 + }
5331 +
5332 + return 'OK'
5333 +}
5334 +
5335 +
5336 +sub show_yum_log {
5337 +
5338 + my $c = shift;
5339 +
5340 + my $out = $c->format_yum_log();
5341 +
5342 + my $yum_log = $cdb->get_prop_and_delete('yum', 'LogFile');
5343 +
5344 + return $out;
5345 +}
5346 +
5347 +
5348 +1;
5349 +
5350 +
5351 +__END__
5352 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/en.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/en.pm
5353 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/en.pm 2020-04-08 23:43:19.000000000 +0400
5354 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/en.pm 2020-04-11 12:54:11.001000000 +0400
5355 @@ -144,6 +144,7 @@
5356 'FM_MAC_ADDRESS2' => 'The MAC address you provided was not valid.',
5357 'FM_ERR_UNEXPECTED_DESC' => 'Error: unexpected or missing characters in description',
5358
5359 +
5360 initial_FORM_TITLE => 'Welcome to the server manager',
5361 initial_FRAMES_BODY => '<p>
5362 Welcome to SME Server, the leading Linux distribution for
5363 @@ -185,7 +186,7 @@
5364
5365 <p>
5366 <a href="https://wiki.koozali.org/Donate" target="_blank">
5367 - <img src="/server-common/btn_donateCC_LG.gif" alt="https://wiki.koozali.org/Donate"
5368 + <img src="images/btn_donateCC_LG.gif" alt="https://wiki.koozali.org/Donate"
5369 align="middle"></a>
5370 </p>
5371
5372 @@ -193,7 +194,7 @@
5373
5374 <p>
5375 This software comes with ABSOLUTELY NO WARRANTY.
5376 - Please <A HREF="/server-manager/support/" TARGET="main">click here</A>
5377 + Please <A HREF="support" TARGET="_self">click here</A>
5378 to view detailed support, warranty and licensing information.
5379 </p>
5380
5381 @@ -201,7 +202,11 @@
5382 To perform a system administration function, click one of the links in the menu on the left of your screen.
5383 </p>
5384 ',
5385 +
5386 +
5387 support_FORM_TITLE => 'Support, warranty and licensing information',
5388 +
5389 +
5390 manual_FORM_TITLE => 'Online manual and other documentation',
5391 manual_DESCRIPTION => '
5392 <ul>
5393 @@ -215,17 +220,16 @@
5394 Support and Licensing</a> page.
5395 ',
5396
5397 +
5398 'sws_FORM_TITLE' => 'Create a starter website',
5399 'sws_SUCCESS' => 'Successfully created starter web site (wrote file index.htm).
5400 You can visit your new website at the address below:',
5401 'sws_DESCRIPTION' => '<p>
5402 To create a simple web page for your company, fill
5403 in the fields below and click on <b>Create</b>.
5404 -</p>
5405 -<p>
5406 +</p><p>
5407 You can leave any field blank if you do not need it.
5408 -</p>
5409 -<p>
5410 +</p><p>
5411 The text that you enter below will be line wrapped
5412 for a nicer appearance in your web page. Leave a blank line
5413 whenever you want to start a new paragraph. If you need
5414 @@ -234,13 +238,11 @@
5415 the four-character sequence
5416 <blockquote>&lt;BR&gt;</blockquote>
5417 where you would like each line break.
5418 -</p>
5419 -<p>
5420 +</p><p>
5421 <em>Do not use this option</em>
5422 if you have already customized your web site, since it will
5423 overwrite the "index.htm" file in your web site directory.
5424 -</p>
5425 -',
5426 +</p>',
5427 'sws_LABEL_COMPANYNAME' => 'Company name',
5428 'sws_DESC_HEADER1' => 'First header, typically used for short phrases such
5429 as "Leader in the field of textile manufacturing"',
5430 @@ -256,6 +258,7 @@
5431 <p>Do you wish to proceed?</p>',
5432 'sws_Create starter web site' => 'Create starter web site',
5433
5434 +
5435 'clm_FORM_TITLE' => 'Antivirus settings',
5436 'clm_LABEL_FILESYSTEM_SCAN_PERIOD' => 'Scan filesystem',
5437 'clm_DESC_FILESYSTEM_SCAN_PERIOD' => '<h2>General Settings</h2>
5438 @@ -269,6 +272,7 @@
5439 'clm_DAILY' => 'Daily',
5440 'clm_SUCCESS' => 'The new clamav antivirus settings have been saved.',
5441
5442 +
5443 'wkg_FORM_TITLE' => 'Change workgroup settings',
5444 'wkg_DESC_WORKGROUP' => 'Enter the name of the Windows workgroup that this server should appear in.',
5445 'wkg_LABEL_WORKGROUP' => 'Windows workgroup',
5446 @@ -296,6 +300,7 @@
5447 These values must be different in order for filesharing to be turned on. ',
5448 'wkg_Workgroup' => 'Workgroup',
5449
5450 +
5451 'dat_FORM_TITLE' => 'Date and time configuration',
5452 'dat_INITIAL_DESC' => 'This is where you configure the date and time of this server. You may use an existing network time server or
5453 manually set the date and time for your time zone.',
5454 @@ -319,8 +324,7 @@
5455 'dat_NTP_ENABLE_DESC' => 'The server can periodically synchronize the system clock to a network time protocol (NTP) server. If you select this option, enter the hostname or IP address of the NTP server below.',
5456 'dat_NTP_CONFIGURE_DESC' => 'The server is periodically synchronizing the system clock to the network time protocol (NTP) server specified below. To synchronize to a different NTP server, enter a different hostname or IP address in the field below.',
5457 'dat_NTP_DISABLE_DESC' => 'Choose this option to stop syncronizing the system clock to the NTP
5458 -server.When the NTP service is disabled, you can set the system date
5459 -and time manually from this page.',
5460 +server.When the NTP service is disabled, you can set the system date and time manually from this page.',
5461 'dat_NTP_SERVER' => 'NTP Server',
5462 'dat_VERIFY_DATE_AND_TIME' => 'Verify date and time',
5463 'dat_NEW_DATE_AND_TIME' => 'New date and time setting:',
5464 @@ -354,6 +358,7 @@
5465 'dat_CURRENT_SETTING' => 'Current setting',
5466 'dat_Date and time' => 'Date and time',
5467
5468 +
5469 'wbl_SAVE' => 'Save',
5470 'wbl_PERFORM' => 'Perform',
5471 'wbl_FORM_TITLE' => 'E-mail WBL',
5472 @@ -397,6 +402,7 @@
5473 'wbl_RBLLIST_DESCRIPTION' => 'DNS Block List - senders IP address will be checked against the following servers',
5474 'wbl_RBL_TITLE' => 'Real-time Blackhole Lists are disabled by default. To help reduce spam you can enable RBLs here.',
5475
5476 +
5477 'prt_FORM_TITLE' => 'Add or remove printers',
5478 'prt_INITIAL_BTN' => 'Add printer',
5479 'prt_INITIAL_DESC' => '<P><A class="button-like" HREF="printers?page=0&Next=Add">Add printer</A></P>',
5480 @@ -449,6 +455,7 @@
5481 'prt_MUST_BE_VALID_HOSTNAME_OR_IP' => 'Must be a valid hostname or IP number',
5482 'prt_Printers' => 'Printers',
5483
5484 +
5485 'bugr_FORM_TITLE' => 'Report a Bug',
5486 'bugr_DO_NOT_PANIC' => 'Don\'t Panic!',
5487 'bugr_SME_EXPERIENCE' =>
5488 @@ -479,6 +486,7 @@
5489 'bugr_Download this report' => 'Download this report !',
5490 'bugr_Report a bug' => 'Report a bug',
5491
5492 +
5493 'rvw_FORM_TITLE' => 'Review configuration',
5494 'rvw_DESCRIPTION' => 'This report summarizes the networking, server, and domain
5495 parameters on this server relevant to configuring
5496 @@ -514,12 +522,15 @@
5497 'rvw_NO_NETWORKS' => 'No additional networks defined',
5498 'rvw_INTERNET_VISIBLE_ADDRESS' => 'Internet Visible IP Address',
5499
5500 +
5501 'dir_FORM_TITLE' => 'Change LDAP directory settings',
5502 'dir_LABEL_ROOT' => 'Server root',
5503 'dir_DESCRIPTION' => 'The LDAP server provides a network-available listing of the user accounts
5504 -and groups on your server, and can be accessed using an LDAP client such as the Address Book feature in Netscape Communicator. Configure your LDAP client with the local IP address of your server, port number 389, and the server root parameter shown below.
5505 -',
5506 -'dir_DESC_DIRECTORY_ACCESS' => ' You can control access to your LDAP directory: the private setting allows access only from your local network, and the public setting allows access from anywhere on the Internet. ',
5507 +and groups on your server, and can be accessed using an LDAP client such as the Address Book feature
5508 + in Netscape Communicator. Configure your LDAP client with the local IP address of your server,
5509 + port number 389, and the server root parameter shown below.',
5510 +'dir_DESC_DIRECTORY_ACCESS' => ' You can control access to your LDAP directory:
5511 +the private setting allows access only from your local network, and the public setting allows access from anywhere on the Internet. ',
5512 'dir_DIRECTORY_ACCESS' => 'LDAP directory access',
5513 'dir_DESC_DEPARTMENT' => 'These fields are the LDAP defaults for your organization.
5514 Whenever you create a new user account, you will be prompted
5515 @@ -540,6 +551,7 @@
5516 'dir_UPDATE' => 'Update with new defaults',
5517 'dir_Directory' => 'Directory',
5518
5519 +
5520 'prx_TITLE' => 'Proxy settings',
5521 'prx_FIRST_PAGE_DESCRIPTION' => 'This page allows configuration of the server\'s
5522 proxy settings.
5523 @@ -568,6 +580,7 @@
5524 'prx_SUCCESS' => 'The new proxy settings were applied successfully.',
5525 'prx_BLOCKED' => 'Blocked',
5526
5527 +
5528 'qma_FORM_TITLE' => 'Mail Log File Analysis',
5529 'qma_INITIAL_DESC' => '<P>Analysing the mail system log files can aid both in
5530 understanding how your system is performing and in
5531 @@ -595,6 +608,7 @@
5532 'qma_END_OF_REPORT' => 'End of Report',
5533 'qma_Mail log file analysis' => 'Mail log file analysis',
5534
5535 +
5536 'quo_FORM_TITLE' => 'Create, modify, or remove user account quotas',
5537 'quo_UNABLE_TO_OPEN_ACCOUNTS' => 'Unable to open accounts db',
5538 'quo_QUOTA_DESC' => '<p>You can set filesystem quotas for users on your system by clicking
5539 @@ -634,6 +648,7 @@
5540 'quo_SUCCESSFULLY_MODIFIED' => 'Successfully modified quota for user account: ',
5541 'quo_Quotas' => 'Quotas',
5542
5543 +
5544 'grp_FORM_TITLE' => 'Create, modify, or remove user groups',
5545 'grp_GROUP_TOO_LONG' => 'Error: group name is too long. The maximum is [_1] characters.',
5546 'grp_ACCOUNT_CONFLICT' => 'Error: the group "[_1]" can\'t be created because there is
5547 @@ -665,6 +680,7 @@
5548 'grp_CURRENT_LIST' => 'Current list of User Groups',
5549 'grp_DELETE_DESCRIPTION' => 'You are about to remove the user group "[_1]."',
5550
5551 +
5552 'rbo_FORM_TITLE' => 'Shutdown or reboot',
5553 'rbo_REBOOT' => 'Reboot',
5554 'rbo_REBOOT_SUCCEEDED' => 'Reboot request initiated successfully.',
5555 @@ -683,6 +699,7 @@
5556 When you click <b>perform</b> the operation will be initiated immediately, so be ready!',
5557 'rbo_Reboot or shutdown' => 'Reboot or shutdown',
5558
5559 +
5560 'iba_FORM_TITLE' => 'Create, modify, or remove i-bays',
5561 'iba_ADD_IBAY' => 'Add ibay',
5562 'iba_FIRSTPAGE_DESC' => 'You can remove any information bay or reset its password by
5563 @@ -709,12 +726,9 @@
5564 'iba_ALLOW_DYNAMIC_CONTENT' => 'Execution of dynamic content (CGI, PHP, SSI)',
5565 'iba_HTTPS_Only' => 'Force secure connections',
5566 'iba_REMOVE_TITLE' => 'Remove information bay',
5567 -'iba_REMOVE_DESC' => '<p>
5568 -You are about to remove the information bay [_1] ([_2]).
5569 -</p><p>
5570 -All files belonging to this information bay will be deleted.
5571 -</p><p>
5572 -Are you sure you wish to remove this information bay?
5573 +'iba_REMOVE_DESC' => '<p>You are about to remove the information bay [_1] ([_2]).
5574 +</p><p>All files belonging to this information bay will be deleted.
5575 +</p><p>Are you sure you wish to remove this information bay?
5576 </p>',
5577 'iba_ERROR_WHILE_CREATING_IBAY' => 'An error occurred while creating the i-bay.',
5578 'iba_SUCCESSFULLY_CREATED_IBAY' => 'Successfully created i-bay.',
5579 @@ -757,8 +771,10 @@
5580 <p>[_1] is a pseudonym for [_2].</p>',
5581 'iba_ACCOUNT_EXISTS' => 'The account "[_1]" is an existing [_2] account.',
5582
5583 +
5584 'swt_THEME' => 'Theme',
5585
5586 +
5587 'pse_NO_PSEUDONYMS' => ' <b>There are no pseudonyms in the system.</b> ',
5588 'pse_REMOVE_PSEUDONYM' => 'Remove pseudonym',
5589 'pse_ABOUT_TO_REMOVE' => 'You are about to remove the pseudonym: [_1]<br>
5590 @@ -826,6 +842,7 @@
5591 'pse_EVERYONE' => 'Everyone',
5592 'pse_Pseudonyms' => 'Pseudonyms',
5593
5594 +
5595 'dom_ADD_DOMAIN' => 'Add domain',
5596 'dom_FORM_TITLE' => 'Manage domains',
5597 'dom_FORM_DESCRIPTION' => 'When you create a domain, your server will be able to
5598 @@ -891,6 +908,7 @@
5599 'dom_REMOVE_DESC' => 'You are about to remove the domain ',
5600 'dom_REMOVE_DESC2' => ' Are you sure you wish to remove this Domain ? ',
5601
5602 +
5603 'hos_FORM_TITLE' => 'Hostnames and addresses',
5604 'hos_UNABLE_TO_OPEN_CONFIGDB' => 'Unable to open configuration database',
5605 'hos_DNS_FORWARDER_ENABLED' => 'A DNS forwarder has been configured. This means that all DNS
5606 @@ -964,6 +982,7 @@
5607 'hos_HOSTNAME_VALIDATOR_ERROR' => 'Error: unexpected characters in host name: "[_1]". The host name should contain only
5608 letters, numbers, and hyphens and must start with a letter or a number. ',
5609
5610 +
5611 'log_FORM_TITLE' => 'View log files',
5612 'log_FIRSTPAGE_DESC' => 'This panel allows you to view or download the log files generated
5613 by the services running on your server.',
5614 @@ -1010,41 +1029,41 @@
5615 <P>The first method creates a copy of your server configuration and user
5616 data files, and downloads it to your local desktop via your web browser.
5617 Currently your configuration and data files total approximately
5618 -<b>$tarsize</b>. The backup file will be somewhat less than this,
5619 +<b>[_1]</b>. The backup file will be somewhat less than this,
5620 depending on how compressible the data are. The \"Verify desktop backup
5621 file\" option can be used to check the integrity of a desktop backup
5622 file.</P>
5623 -<P>The tape backup method uses a software package called <I>$module</I>
5624 +<P>The tape backup method uses a software package called <I>[_2]</I>
5625 to back up your entire hard disk to tape every night. This requires a
5626 supported tape drive and a tape that is not write-protected. The backup
5627 is performed automatically at the selected time every night (with a
5628 reminder automatically e-mailed to the administrator during the day).
5629 -Currently your hard disk contains <b>$dumpsize</b> of data.</P>
5630 +Currently your hard disk contains <b>[_3]</b> of data.</P>
5631 <P>Both restore methods allow you to restore your configuration and user
5632 data files. <b>Ideally, the restore should be performed on a freshly
5633 installed server</b>.</P>',
5634 'bac_BACKUP_DESC_DAR' => '<P>Three ways are provided to back up and restore your
5635 server: using a tape drive, using a network share or a local
5636 removable disk, or using your local desktop.</P>
5637 -<P>Tape Backup. This method uses a software package called <I>$module</I>
5638 +<P>Tape Backup. This method uses a software package called <I>[_1]</I>
5639 to back up your entire hard disk to tape every night. This requires a
5640 supported tape drive and a tape that is not write-protected. The backup
5641 is performed automatically at the selected time every night (with a
5642 reminder automatically e-mailed to the administrator during the day).
5643 -Currently your hard disk contains <b>$dumpsize</b> of data.</P>
5644 +Currently your hard disk contains <b>[_2]</b> of data.</P>
5645 <P>Workstation backup. This method uses a software package called <I>dar</I>
5646 to back up your server configuration and data files to a network share
5647 or a local removable disk such as a USB disk.
5648 You can manage how many rotating sets of backups are kept,
5649 and how many incremental backups to have in each set.
5650 The backup is performed automatically at the selected time every day. Currently
5651 -configuration and data files total approximately <b>$tarsize</b> uncompressed.
5652 +configuration and data files total approximately <b>[_3]</b> uncompressed.
5653 Twice the compressed data size must be available on the backup share.</P>
5654 <P>Backup to Desktop. This method creates a copy of your server
5655 configuration and user data files, and downloads it to your
5656 local desktop via your web browser.
5657 Currently your configuration and data files total approximately
5658 -<b>$tarsize</b>. The backup file will be somewhat less than this,
5659 +<b>[_3]</b>. The backup file will be somewhat less than this,
5660 depending on how much the data can be compressed.
5661 This file can be used to restore the server from the console if you
5662 copy it to a local removable disk such as a USB disk.</P>
5663 @@ -1052,10 +1071,9 @@
5664 data files. Workstation backup provides individual file restore. <b>Ideally,
5665 full restore should be performed on a freshly installed server</b>.</P>',
5666 'bac_BACKUP_CONFIG_STATUS' => 'Backup configuration and status',
5667 -'bac_TAPE_BACKUPS_ENABLED' => 'Tape backups are currently <b>enabled</b>.',
5668 'bac_BACKUPS_RUN_AT' => 'Regular tape backups will run at: ',
5669 'bac_REMINDER_MESSAGE_AT' => 'Reminder messages will be sent at: ',
5670 -'bac_TAPE_BACKUPS_DISABLED' => 'Tape backups are <b>disabled</b>',
5671 +'bac_TAPE_BACKUPS' => 'Tape backups are ',
5672 'bac_DESKTOP_BACKUP' => 'Backup to desktop',
5673 'bac_DESKTOP_RESTORE' => 'Restore from desktop',
5674 'bac_DESKTOP_VERIFY' => 'Verify desktop backup file',
5675 @@ -1077,8 +1095,8 @@
5676 'bac_ERR_POST_BACKUP' => 'Error occurred during post-backup actions.',
5677 'bac_RESTORE_SERVER_CONFIG' => 'Restore server configuration',
5678 'bac_DESKTOP_RESTORE_DESC' => 'This process will upload a server backup file from your local desktop to your server and restore the configuration and user data files. <B>The restore should be performed on a freshly installed server</B>.',
5679 -'bac_FREE_SPACE' => 'You have approximately $tmpfree free space on the server.
5680 -Check that desktop backup file is less than $halffree before
5681 +'bac_FREE_SPACE' => 'You have approximately [_1] free space on the server.
5682 +Check that desktop backup file is less than [_2] before
5683 commencing the restore.',
5684 'bac_MUST_REBOOT_AFTER_RESTORE' => 'After the restore completes you must reboot the server.',
5685 'bac_FILE_TO_RESTORE' => 'Backup file to restore from',
5686 @@ -1093,8 +1111,7 @@
5687 'bac_ANOTHER_RESTORE_IN_PROGRESS' => 'Another restore is in progress. Please try again later.',
5688 'bac_RESTORE_IN_PROGRESS' => 'Restore in progress',
5689 'bac_RESTORE_IN_PROGRESS_DESC' => 'After the restore completes you must reboot the server. Your restore is
5690 -complete when the words "Restore complete" appear at the bottom of your screen.
5691 -',
5692 +complete when the words "Restore complete" appear at the bottom of your screen.',
5693 'bac_FILES_HAVE_BEEN_RESTORED' => 'The following files and directories have been restored:',
5694 'bac_RESTORE_FAILED_MSG' => 'Restore failed! There was an error in reading the backup file.',
5695 'bac_RESTORE_COMPLETE' => 'Restore complete',
5696 @@ -1150,14 +1167,11 @@
5697 'bac_SERVER_REBOOT' => 'Server reboot',
5698 'bac_SERVER_WILL_REBOOT' => 'Your server will now reboot.',
5699 'bac_NO_UID_FOR_NAME' => 'Could not get uid for user named: ',
5700 -'bac_PAGE_REFRESH_IN' => 'This page will refresh to the status display in {$sec} seconds, or
5701 +'bac_PAGE_REFRESH_IN' => 'This page will refresh to the status display in [_1] seconds, or
5702 click <a href="/server-manager/cgi-bin/backup">here</a>.',
5703 'bac_Backup or restore' => 'Backup or restore',
5704 -'bac_BACKUP_DESKTOP_TOO_BIG' => '<div class="error">
5705 -Your server has too much data for a reliable backup to desktop.
5706 -</div>',
5707 -'bac_WORKSTN_BACKUPS_DISABLED' => 'Workstation backups are <b>disabled</b>',
5708 -'bac_WORKSTN_BACKUPS_ENABLED' => 'Workstation backups are currently <b>enabled</b>.',
5709 +'bac_BACKUP_DESKTOP_TOO_BIG' => 'Your server has too much data for a reliable backup to desktop.',
5710 +'bac_WORKSTN_BACKUPS' => 'Workstation backups are ',
5711 'bac_WKBACKUPS_RUN_AT' => 'Regular workstation backups will run at: ',
5712 'bac_WORKSTN_CONFIGURE' => 'Configure workstation backup',
5713 'bac_WORKSTN_VERIFY' => 'Verify workstation backup',
5714 @@ -1313,14 +1327,14 @@
5715 multi-drop mode is the only option available when the server is
5716 configured in private server and gateway mode.',
5717 'mai_LABEL_DELEGATE' => 'Address of internal mail server',
5718 -'mai_DESC_DELEGATE' => '<hr class="sectionbar" /><h2>Delegate mail servers</h2> Your
5719 -server includes a complete, full-featured e-mail server. However,
5720 +'mai_TITLE_DELEGATE' => 'Delegate mail servers',
5721 +'mai_DESC_DELEGATE' => 'Your server includes a complete, full-featured e-mail server. However,
5722 if for some reason you wish to delegate e-mail processing to
5723 another system, specify the IP address of the delegate system
5724 here. For normal operation, leave this field blank.',
5725 'mai_LABEL_SECONDARY' => 'Secondary mail server',
5726 -'mai_DESC_SECONDARY' => '<hr class="sectionbar" /><h2>ETRN or multi-drop settings</h2> For
5727 -ETRN or multi-drop, specify the hostname or IP address of your
5728 +'mai_TITLE_SECONDARY' => 'ETRN or multi-drop settings',
5729 +'mai_DESC_SECONDARY' => 'For ETRN or multi-drop, specify the hostname or IP address of your
5730 secondary mail server. (If using the standard e-mail setup, this
5731 field can be left blank.)',
5732 'mai_DESC_FETCH_PERIOD' => 'For ETRN or multi-drop, you can control how frequently this server
5733 @@ -1360,13 +1374,13 @@
5734 'mai_FORWARD_TO' => 'Send to',
5735 'mai_RETURN_TO_SENDER' => 'Reject',
5736 'mai_LABEL_UNKNOWN' => 'E-mail to unknown users',
5737 -'mai_DESC_UNKNOWN' => '<h2>Unknown Users</h2>
5738 -Selecting Reject (recommended setting) will configure the server to only
5739 +'mai_TITLE_UNKNOWN' => 'Unknown Users',
5740 +'mai_DESC_UNKNOWN' => 'Selecting Reject (recommended setting) will configure the server to only
5741 accept mail for valid email addresses (for example users, groups, pseudonyms).
5742 Mail for other addresses will be rejected.',
5743 'mai_LABEL_SMARTHOST' => 'Address of Internet provider\'s mail server',
5744 -'mai_DESC_SMARTHOST' => '<hr class="sectionbar" /><h2>SMTP server</h2>
5745 -The server can deliver outgoing messages directly to their
5746 +'mai_TITLE_SMARTHOST' => 'SMTP server',
5747 +'mai_DESC_SMARTHOST' => 'The server can deliver outgoing messages directly to their
5748 destination (recommended in most cases) or can deliver them via
5749 your Internet provider\'s SMTP server (recommended if you have an
5750 unreliable Internet connection or are using a residential Internet
5751 @@ -1394,7 +1408,7 @@
5752 STARTTLS to be used to ensure secure authentication.',
5753 'mai_DESC_WEBMAIL' => 'You can enable or disable webmail on this system. Webmail allows
5754 users to access their mail through a regular web browser by
5755 -pointing the browser to https://{$FQDN}/webmail,and
5756 +pointing the browser to https://[_1]/webmail,and
5757 logging in to their account.',
5758 'mai_LABEL_WEBMAIL' => 'Webmail access',
5759 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT' => 'Executable content blocking',
5760 @@ -1405,17 +1419,13 @@
5761 be automatically returned to the sender.',
5762 'mai_UNACCEPTABLE_CHARS' => 'This field requires a valid e-mail address, which must include
5763 the @ symbol and a domain name.',
5764 -'mai_DESC_STATE_ACCESS' => '<h2>E-mail access</h2>',
5765 -'mai_DESC_STATE_ACCESS_BUTTON' => '<a class="button-like"
5766 -href="emailsettings?page=0&page_stack=&Next=Next&wherenext=EMAIL_PAGE_ACCESS">Change e-mail access settings</a>',
5767 -'mai_DESC_STATE_RECEPTION' => '<hr class="sectionbar" /><h2>E-mail reception</h2>',
5768 -'mai_DESC_STATE_RECEPTION_BUTTON' => '<a class="button-like"
5769 -href="emailsettings?page=0&page_stack=&Next=Next&wherenext=EMAIL_PAGE_RECEPTION">Change e-mail reception settings</a>',
5770 -'mai_DESC_STATE_DELIVERY' => '<hr class="sectionbar" /><h2>E-mail delivery</h2>',
5771 -'mai_DESC_STATE_DELIVERY_BUTTON' => '<a class="button-like"
5772 -href="emailsettings?page=0&page_stack=&Next=Next&wherenext=EMAIL_PAGE_DELIVERY">Change e-mail delivery settings</a>',
5773 -'mai_DESC_STATE_FILTERING_BUTTON' => '<a class="button-like"
5774 -href="emailsettings?page=0&page_stack=&Next=Next&wherenext=EMAIL_PAGE_FILTERING">Change e-mail filtering settings</a>',
5775 +'mai_DESC_STATE_ACCESS' => 'E-mail access',
5776 +'mai_DESC_STATE_ACCESS_BUTTON' => 'Change e-mail access settings',
5777 +'mai_DESC_STATE_RECEPTION' => 'E-mail reception',
5778 +'mai_DESC_STATE_RECEPTION_BUTTON' => 'Change e-mail reception settings',
5779 +'mai_DESC_STATE_DELIVERY' => 'E-mail delivery',
5780 +'mai_DESC_STATE_DELIVERY_BUTTON' => 'Change e-mail delivery settings',
5781 +'mai_DESC_STATE_FILTERING_BUTTON' => 'Change e-mail filtering settings',
5782 'mai_LABEL_VIRUS_SCAN' => 'Virus scanning',
5783 'mai_DESC_VIRUS_SCAN' => 'You can scan incoming and outgoing e-mail for viruses. If scanning is enabled and a virus is detected, the e-mail will be rejected and returned to the
5784 sender.',
5785 @@ -1449,11 +1459,12 @@
5786 'mai_VALIDATION_SMTPAUTH_NONBLANK' => 'This field cannot be left blank if SMTP Authentication is
5787 enabled.',
5788
5789 -'yum_Software installer' => 'Software installer',
5790 +
5791 +'yum_FORM_TITLE' => 'Software installer',
5792 'yum_SUCCESS' => 'The new settings have been saved.',
5793 'yum_LABEL_YUM_STATUS' => 'Check for updates',
5794 'yum_LABEL_YUM_AUTOINSTALLUPDATES' => 'Automatically install updates',
5795 -'yum_LABEL_YUM_AUTOINSTALLUPDATES_DESCRIPTION' => 'If enabled this will take precedence over the simple check for updates notification and predownload features. Instead it will install the available updates from enabled repositories. For more information refer to yum and yum-cron manual page.',
5796 +'yum_DESC_YUM_AUTOINSTALLUPDATES' => 'If enabled this will take precedence over the simple check for updates notification and predownload features. Instead it will install the available updates from enabled repositories. For more information refer to yum and yum-cron manual page.',
5797 'yum_LABEL_YUM_PACKAGEFUNCTIONS' => 'Manage individual packages',
5798 'yum_DESC_YUM_PACKAGEFUNCTIONS' => 'The software installer can manage groups of
5799 related package or individual packages. By
5800 @@ -1468,23 +1479,18 @@
5801 To disable a repository, de-select it from the list.
5802 By default, only stable, tested software is available
5803 for installation.',
5804 -'yum_DESC_UPTODATE' => '<div class="success">
5805 -<h2>This system is up to date.</h2>
5806 -All updates have been installed.
5807 -</div>',
5808 -'yum_DESC_UPDATES_AVAILABLE' => '<div class="success">
5809 -<h2>Updates Available</h2>
5810 -There are updates available for your system. These updates
5811 -should be installed as soon as possible.
5812 -</div>',
5813 +'yum_TITLE_UPTODATE' => 'This system is up to date.',
5814 +'yum_DESC_UPTODATE' => 'All updates have been installed.',
5815 +'yum_TITLE_UPDATES_AVAILABLE' => 'Updates Available',
5816 +'yum_DESC_UPDATES_AVAILABLE' => 'There are updates available for your system. These updates
5817 +should be installed as soon as possible.',
5818 'yum_LABEL_AVAILABLE_UPDATES' => 'Updates available',
5819 'yum_DESC_AVAILABLE_UPDATES' => 'The following updates are available for your system.
5820 You should normally install all available updates.
5821 If there are updates you do not wish to install, de-select
5822 them from the list below.',
5823 'yum_INSTALL_UPDATES' => 'Install selected updates',
5824 -'yum_DESC_BUTTON_INSTALL_UPDATES' => '<a class="button-like"
5825 -href="yum?page=0&page_stack=&Next=Next&wherenext=YUM_PAGE_INSTALL_UPDATES">List available updates</a>',
5826 +'yum_BUTTON_INSTALL_UPDATES' => 'List available updates',
5827 'yum_HEADER_AVAILABLE_SOFTWARE' => 'The following software is available to be installed
5828 onto your system. You should only install additional
5829 software onto this system if you are aware
5830 @@ -1506,13 +1512,9 @@
5831 'yum_DESC_INSTALLED_PACKAGES' => 'You can also select individual packages
5832 you wish to remove from the list below.',
5833 'yum_LABEL_INSTALLED_PACKAGES' => 'Installed packages',
5834 -'yum_DESC_BUTTON_CONFIGURATION' => '<a class="button-like"
5835 -href="yum?page=0&page_stack=&Next=Next&wherenext=YUM_PAGE_CONFIGURATION">Change software installer settings</a>
5836 -',
5837 -'yum_DESC_BUTTON_INSTALL_AVAILABLE' => '<a class="button-like"
5838 -href="yum?page=0&page_stack=&Next=Next&wherenext=YUM_PAGE_INSTALL_AVAILABLE">Install additional software</a>',
5839 -'yum_DESC_BUTTON_REMOVE' => '<a class="button-like"
5840 -href="yum?page=0&page_stack=&Next=Next&wherenext=YUM_PAGE_REMOVE">Remove installed software</a>',
5841 +'yum_BUTTON_CONFIGURATION' => 'Change software installer settings',
5842 +'yum_BUTTON_INSTALL_AVAILABLE' => 'Install additional software',
5843 +'yum_BUTTON_REMOVE' => 'Remove installed software',
5844 'yum_HEADER_POSTUPGRADE_REQUIRED' => ' The system needs to be reconfigured
5845 after adding or removing software,
5846 or applying updates.
5847 @@ -1528,11 +1530,11 @@
5848 'yum_2WEEKLY' => 'Weekly',
5849 'yum_3MONTHLY' => 'Monthly',
5850 'yum_LABEL_YUM_DELTARPMPROCESS' => 'Delta Rpm Update',
5851 -'yum_LABEL_YUM_DELTARPM' => 'A deltarpm contains the difference between an old and a new version of a rpm,
5852 +'yum_DESC_YUM_DELTARPMPROCESS' => 'A deltarpm contains the difference between an old and a new version of a rpm,
5853 which can save bandwith. The drawback is that update
5854 operations consume considerably more CPU cycles',
5855 'yum_LABEL_YUM_DOWNLOADONLY' => 'Predownload updates',
5856 -'yum_LABEL_YUM_DOWNLOADONLY_DESCRIPTION' => 'The rpm updates can be downloaded during the night,
5857 +'yum_DESC_YUM_DOWNLOADONLY' => 'The rpm updates can be downloaded during the night,
5858 this will ease and give faster the yum update process
5859 (only enabled repositories will be used).',
5860
5861 @@ -1616,7 +1618,7 @@
5862 'rma_DESC_TELNET_ACCESS' => 'WARNING:Telnet is currently enabled, but this feature is
5863 no longer supported.Telnet is inherently insecure and should only
5864 be used in circumstances where no practical alternative exists. You
5865 -should change option to {$NO_ACCESS} and use
5866 +should change option to [_1] and use
5867 secure shell if remote access is
5868 required.Once disabled, telnet will no longer appear on this
5869 screen. ',
5870 @@ -1631,6 +1633,7 @@
5871 need to import a new certificate!</i></b>.',
5872 'rma_LABEL_IPSECRW_RESET' => 'Reset digital certificates',
5873
5874 +
5875 'usr_FORM_TITLE' => 'Create, modify, or remove user accounts',
5876 'usr_FIRSTPAGE_DESC' => '<p>
5877 You can modify, lock or remove any account or reset the
5878 @@ -1709,8 +1712,7 @@
5879 as configured. The account may be activated in the future by
5880 setting a new password. The current
5881 password will not be retained.
5882 -</p>
5883 -<p>
5884 +</p><p>
5885 <b>Are you sure you wish to lock this account?</b>',
5886 'usr_REMOVE_ACCOUNT_TITLE' => 'Remove user account',
5887 'usr_REMOVE_DESC' => 'You are about to remove the user account "[_1]" ([_2])',
5888 @@ -1752,15 +1754,14 @@
5889 'usr_LABEL_IPSECRW_DOWNLOAD' => 'Download digital certificate to IPSec client',
5890 'usr_ERR_OCCURRED_DELETING' => 'An error occurred while trying to delete the user.',
5891
5892 +
5893 'ln_LOCAL NETWORKS' => 'Local networks',
5894 -'ln_FIRSTPAGE_DESC' => '
5895 - For security reasons, several services on your server are
5896 +'ln_FIRSTPAGE_DESC' => 'For security reasons, several services on your server are
5897 available only to your local network. However you can grant these
5898 local access privileges to additional networks by listing them
5899 below. Most installations should leave this list empty.',
5900 'ln_ADD_TITLE' => 'Add a local network ',
5901 -'ln_ADD_DESC' =>'
5902 - Each parameter must be in the form #.#.#.# (each # is a number
5903 +'ln_ADD_DESC' =>'Each parameter must be in the form #.#.#.# (each # is a number
5904 from 0 to 255). The server software will zero out the ending (host
5905 identifier) part of the network address according to the subnet
5906 mask, to ensure that the network address is valid. </P><P>
5907 @@ -1783,8 +1784,7 @@
5908 is already considered local. Did not add new network. ',
5909 'ln_NETWORK_ALREADY_ADDED' => 'Error: network {$network} (derived from network
5910 {$networkAddress} and subnet mask {$networkMask})
5911 - has already been added. Did not add new network.
5912 -',
5913 + has already been added. Did not add new network.',
5914 'ln_ERROR_CREATING_NETWORK' => 'Error occurred while creating network.',
5915 'ln_SUCCESS' =>'Successfully added network {$network}/{$networkMask} via router {$networkRouter}.',
5916 'ln_SUCCESS_SINGLE_ADDRESS' =>'Successfully added network {$network}/{$networkMask} via router {$networkRouter}. Your server will grant local access privileges to the single IP address {$network}. ',
5917 @@ -1802,131 +1802,73 @@
5918 after this network is removed. ',
5919 'ln_REMOVE_HOSTS_LABEL' => 'Remove hosts on network',
5920 'ln-extra' => '{$network}/{$networkMask} via router $networkRouter}.',
5921 -
5922 -'ln_SUCCESS_NONSTANDARD_RANGE' =>'
5923 - <p>
5924 +'ln_SUCCESS_NONSTANDARD_RANGE' =>'<p>
5925 Successfully added network {$network}/{$networkMask} via router
5926 {$networkRouter}.
5927 - </p>
5928 - <p>
5929 + </p><p>
5930 Your server will grant local
5931 access privileges to {$totalHosts} IP addresses in the range
5932 {$firstAddr} to {$lastAddr}.
5933 - </p>
5934 - <p>
5935 + </p><p>
5936 Warning: the ProFTPd FTP server cannot
5937 handle this nonstandard subnet mask. The simpler specification
5938 - <b>{$simpleMask}</b> will be used instead.
5939 - </p>',
5940 -
5941 - 'pf_FORM_TITLE' =>
5942 - 'Configure Port Forwarding',
5943 - 'pf_FIRST_PAGE_DESCRIPTION' =>
5944 - '<p>
5945 + <b>{$simpleMask}</b> will be used instead.</p>',
5946 +'pf_FORM_TITLE' => 'Configure Port Forwarding',
5947 +'pf_FIRST_PAGE_DESCRIPTION' => '<p>
5948 You can use this panel to modify your firewall rules so
5949 as to open a specific port on this server and forward it
5950 to another port on another host. Doing so will permit
5951 incoming traffic to directly access a private host on
5952 your LAN.
5953 - </p>
5954 - <p>
5955 + </p><p>
5956 WARNING: Misuse of this feature can seriously compromise the
5957 security of your network. Do not use this feature
5958 lightly, or without fully understanding the implications
5959 of your actions.
5960 - </p>
5961 - ',
5962 - 'pf_CREATE_RULE' =>
5963 - 'Create portforwarding rule',
5964 - 'pf_SUMMARY_ADD_DESC' =>
5965 - 'The following summarizes the port-forwarding rule
5966 + </p>',
5967 +'pf_CREATE_RULE' => 'Create portforwarding rule',
5968 +'pf_SUMMARY_ADD_DESC' => 'The following summarizes the port-forwarding rule
5969 that you are about to add. If you are satisfied with the rule,
5970 - click the &quot;Add&quot; button. If you are not, click the
5971 - &quot;Cancel&quot; button.
5972 - ',
5973 - 'pf_SUMMARY_REMOVE_DESC' =>
5974 - 'The following summarizes the port-forwarding rule
5975 + click the \'Add\' button.',
5976 +'pf_SUMMARY_REMOVE_DESC' => 'The following summarizes the port-forwarding rule
5977 that you are about to remove. If you are sure you want to
5978 - remove the rule, click the &quot;Remove&quot; button. If not,
5979 - click the &quot;Cancel&quot; button.
5980 - ',
5981 - 'pf_SHOW_FORWARDS' =>
5982 - '
5983 - Below you will find a table summarizing the current
5984 + remove the rule, click the \'Remove\' button.',
5985 +'pf_SHOW_FORWARDS' => 'Below you will find a table summarizing the current
5986 port-forwarding rules installed on this server. Click on the
5987 - &quot;Remove&quot; link to remove the corresponding rule.
5988 - ',
5989 - 'pf_NO_FORWARDS' =>
5990 - 'There are currently no forwarded ports on the system.',
5991 - 'pf_CREATE_PAGE_DESCRIPTION' =>
5992 - '<![CDATA[
5993 - <p>Select the protocol, the port you wish to forward, the
5994 + \'Remove\' link to remove the corresponding rule.',
5995 +'pf_NO_FORWARDS' => 'There are currently no forwarded ports on the system.',
5996 +'pf_CREATE_PAGE_DESCRIPTION' => '<p>Select the protocol, the port you wish to forward, the
5997 destination host, and the port on the destination host
5998 that you wish to forward to. If you wish to specify a port
5999 range, enter the lower and upper boundaries separated by a
6000 hyphen. The destination port may be left blank, which will
6001 instruct the firewall to leave the source port
6002 - unaltered.</p>
6003 - ]]>
6004 - ',
6005 - 'pf_LABEL_SOURCE_PORT' =>
6006 - 'Source Port(s)',
6007 - 'pf_LABEL_PROTOCOL' =>
6008 - 'Protocol',
6009 - 'pf_LABEL_DESTINATION_PORT' =>
6010 - 'Destination Port(s)',
6011 - 'pf_LABEL_DESTINATION_HOST' =>
6012 - 'Destination Host IP Address',
6013 - 'pf_LABEL_RULE_COMMENT' =>
6014 - 'Rule Comment',
6015 - 'pf_LABEL_ALLOW_HOSTS' =>
6016 - 'Allow Hosts',
6017 - 'pf_Port forwarding' =>
6018 - 'Port forwarding',
6019 - 'pf_SUCCESS' =>
6020 - 'Your change to the port forwarding rules has been
6021 - successfully saved.
6022 - ',
6023 - 'pf_RULE_COMMENT' =>
6024 - 'Rule Comment',
6025 - 'pf_ALLOW_HOSTS' =>
6026 - 'Allow Hosts',
6027 - 'pf_ERR_NO_MASQ_RECORD' =>
6028 - 'Cannot retrieve masq record from the configuration
6029 - database.',
6030 - 'pf_ERR_UNSUPPORTED_MODE' =>
6031 - 'Unsupported mode.',
6032 - 'pf_ERR_CANNOT_REMOVE_NORULE' =>
6033 - 'Cannot remove non-existant rule.',
6034 - 'pf_ERR_NONZERO_RETURN_EVENT' =>
6035 - 'Event returned a non-zero return value.',
6036 - 'pf_ERR_BADPORT' =>
6037 - 'The ports must be a positive integer less than
6038 - 65536.',
6039 - 'pf_ERR_BADIP' =>
6040 - 'This does not appear to be an IP address. You must use
6041 + unaltered.</p>',
6042 +'pf_LABEL_SOURCE_PORT' => 'Source Port(s)',
6043 +'pf_LABEL_PROTOCOL' => 'Protocol',
6044 +'pf_LABEL_DESTINATION_PORT' => 'Destination Port(s)',
6045 +'pf_LABEL_DESTINATION_HOST' => 'Destination Host IP Address',
6046 +'pf_LABEL_RULE_COMMENT' => 'Rule Comment',
6047 +'pf_LABEL_ALLOW_HOSTS' => 'Allow Hosts',
6048 +'pf_Port forwarding' => 'Port forwarding',
6049 +'pf_SUCCESS' => 'Your change to the port forwarding rules has been successfully saved.',
6050 +'pf_RULE_COMMENT' => 'Rule Comment',
6051 +'pf_ALLOW_HOSTS' => 'Allow Hosts',
6052 +'pf_ERR_NO_MASQ_RECORD' => 'Cannot retrieve masq record from the configuration database.',
6053 +'pf_ERR_UNSUPPORTED_MODE' => 'Unsupported mode.',
6054 +'pf_ERR_CANNOT_REMOVE_NORULE' => 'Cannot remove non-existant rule.',
6055 +'pf_ERR_NONZERO_RETURN_EVENT' => 'Event returned a non-zero return value.',
6056 +'pf_ERR_BADPORT' => 'The ports must be a positive integer less than 65536.',
6057 +'pf_ERR_BADIP' => 'This does not appear to be an IP address. You must use
6058 dotted-quad notation, and each of the four numbers should be less
6059 than 256. ie: 192.168.0.5',
6060 - 'pf_ERR_DUPRULE' =>
6061 - 'This rule has already been added, it cannot be added
6062 - twice.',
6063 - 'pf_ERR_PORT_COLLISION' =>
6064 - '
6065 - ERROR: This port or port range conflicts with an existing
6066 - rule. Please modify this new rule, or remove the old rule.
6067 - ',
6068 - 'pf_ERR_BADAHOST' =>
6069 - '
6070 - This does not appear to be a valid IP address list.
6071 - ie: 192.168.0.1,192.168.1.1/24
6072 - ',
6073 - 'pf_IN_SERVERONLY' =>
6074 - '
6075 - This server is currently in serveronly mode and portforwarding
6076 - is possible only to localhost.
6077 - ',
6078 -
6079 -
6080 +'pf_ERR_DUPRULE' => 'This rule has already been added, it cannot be added twice.',
6081 +'pf_ERR_PORT_COLLISION' => 'ERROR: This port or port range conflicts with an existing
6082 + rule. Please modify this new rule, or remove the old rule.',
6083 +'pf_ERR_BADAHOST' => 'This does not appear to be a valid IP address list.
6084 + ie: 192.168.0.1,192.168.1.1/24',
6085 +'pf_IN_SERVERONLY' => 'This server is currently in serveronly mode and portforwarding
6086 + is possible only to localhost.',
6087
6088 );
6089
6090 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Wbl/fr.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Wbl/fr.pm
6091 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Wbl/fr.pm 2020-04-08 23:43:08.000000000 +0400
6092 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Wbl/fr.pm 1970-01-01 04:00:00.000000000 +0400
6093 @@ -1,49 +0,0 @@
6094 -package SrvMngr::I18N::Wbl::fr;
6095 -
6096 -use utf8;
6097 -use Mojo::Base 'SrvMngr::I18N';
6098 -
6099 -my %general = ();
6100 -my %wbl = (
6101 -'wbl_SAVE' => 'Sauvegarder',
6102 -'wbl_PERFORM' => 'Exécuter',
6103 -'wbl_FORM_TITLE' => 'WBL courriel',
6104 -'wbl_OPERATION_STATUS_REPORT' => 'Rapport d\'état de l\'opération',
6105 -'wbl_WBL_DESCRIPTION' => 'Le trafic courriel est scanné et peut être bloqué en raison des différentes méthodes de dépistage activées. Vous pouvez utiliser ce panneau pour définir les listes blanches / noires de courriels.',
6106 -'wbl_RBL_LIST_DESCRIPTION' => 'La liste RBL est utilisée pour ajuster DNSBL et RHSBL.',
6107 -'wbl_RBL_LIST' => 'Liste RBL',
6108 -'wbl_BLACK_LIST_DESCRIPTION' => 'Les listes noires sont utilisées pour refuser le trafic de courriels.',
6109 -'wbl_BLACK_LIST' => 'Liste noire',
6110 -'wbl_WHITE_LIST_DESCRIPTION' => 'Les listes blanches sont utilisées pour accepter le trafic de courriels.',
6111 -'wbl_WHITE_LIST' => 'Liste blanche',
6112 -'wbl_BLACK_TITLE' => 'Ce serveur inclus un support intégré permettant à l\'administrateur de définir des listes noires, badhelo et badmailfrom.',
6113 -'wbl_DNSBL_DESCRIPTION' => 'DNSBL est une abréviation Anglaise pour "Liste noire DNS".',
6114 -'wbl_DNSBL_LABEL' => 'Statut DNSBL',
6115 -'wbl_RHSBL_DESCRIPTION' => 'RHSBL est une abréviation pour "Right Hand Side Blacklist".',
6116 -'wbl_RHSBL_LABEL' => 'Rapport d\'état de RHSBL',
6117 -'wbl_BADHELO_DESCRIPTION' => 'Vérifie un message HELO livré par un hôte se connectant. Ceci refuse tout ceux qui apparaissent dans badhelo au moment de la phase \'helo\'.',
6118 -'wbl_BADHELO_LABEL' => 'qpsmtpd badhelo',
6119 -'wbl_BADMAILFROM_DESCRIPTION' => 'Vérifie l\'adresse de l\'expéditeur. Refuse tout ce qui apparaît (@hôte ou utilisateur@hôte) dans\'badmailfrom\' pendant la phase \'mail\'',
6120 -'wbl_BADMAILFROM_LABEL' => 'qmail \'badmailfrom\'',
6121 -'wbl_WHITE_TITLE' => 'Utilisez cette page pour modifier les paramètres de liste blanche de de votre serveur. Toutes les entrées seront activées par default',
6122 -'wbl_RRFH_LABEL' => 'État des listes blanches',
6123 -'wbl_WHITELISTHOSTS_DESCRIPTION' => 'Toute IP présente dans whitelisthosts sera exemptée de toutes validations supplémentaires pendant la phase \'connexion\'',
6124 -'wbl_WHITELISTHOSTS_LABEL' => 'Qpsmtpd whitelisthosts',
6125 -'wbl_WHITELISTHELO_DESCRIPTION' => 'Tout hôte qui émet un HELO correspondant à une entrée dans whitelisthelo sera exempté de toute autre validation pendant la phase \'helo\'',
6126 -'wbl_WHITELISTHELO_LABEL' => 'qpsmtpd whitelisthelo',
6127 -'wbl_WHITELISTSENDERS_DESCRIPTION' => 'Tout expéditeur d\'un courriel (hôte.domaine ou utilisateur@hôte.domaine) correspondant à une entrée dans la liste blanche des expéditeurs (whitelistsenders) sera exempté de toutes validations supplémentaires durant la phase \'mail\'.',
6128 -'wbl_WHITELISTSENDERS_LABEL' => 'qpsmtpd whitelistsenders',
6129 -'wbl_WHITELISTFROM_DESCRIPTION' => 'Tout expéditeur d\'un courriel (*@hôte ou utilisateur@hôte) correspondant à une entrée dans whitelist_from sera exempté d\'un rejet par spamassassin.',
6130 -'wbl_WHITELISTFROM_LABEL' => 'spamassassin whitelist_from',
6131 -'wbl_BLACKLISTFROM_LABEL' => 'spamassassin blacklist_from',
6132 -'wbl_BLACKLISTFROM_DESCRIPTION' => 'Tout expéditeur d\'un courriel (*@hôte ou utilisateur@hôte) correspondant à une entrée dans blacklist_from sera rejeté par spamassassin.',
6133 -'wbl_SBLLIST_LABEL' => 'RHSBL (qpsmtpd SBLList)',
6134 -'wbl_SBLLIST_DESCRIPTION' => 'Liste de blocage RHS - (Right Hand Side) des expéditeurs hôte / domaine sera vérifié contre les serveurs suivants',
6135 -'wbl_RBLLIST_LABEL' => 'DNSBL Zones (qpsmtpd RBLList)',
6136 -'wbl_RBLLIST_DESCRIPTION' => 'Liste de bloquage DNS -L\'adresse IP des expéditeurs sera vérifiée à partir des serveurs suivants.',
6137 - 'wbl_RBL_TITLE' => 'Les listes noires en temps réel sont désactivés par défaut. Pour aider à réduire le spam vous pouvez activer les RBLs ici.',
6138 -);
6139 -
6140 -our %Lexicon = ( %general, %wbl);
6141 -
6142 -1;
6143 \ Pas de fin de ligne à la fin du fichier
6144 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Wbl/general.fr smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Wbl/general.fr
6145 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Wbl/general.fr 2020-04-08 23:43:08.000000000 +0400
6146 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Wbl/general.fr 1970-01-01 04:00:00.000000000 +0400
6147 @@ -1,268 +0,0 @@
6148 -our %Lexicon = (
6149 -_AUTO => 1,
6150 -
6151 -YES => 'Oui',
6152 -NO => 'Non',
6153 -edit => 'Modifier',
6154 -del => 'Effacer',
6155 -exit => 'Quitter',
6156 -cancel => 'Annuler',
6157 -hello => 'salut',
6158 -'All rights reserved' => 'Tous droits réservés',
6159 -
6160 -'Collaboration' =>
6161 -'Collaboration',
6162 -'Administration' =>
6163 -'Administration',
6164 -'Security' =>
6165 -'Sécurité',
6166 -'Configuration' =>
6167 -'Configuration',
6168 -'Miscellaneous' =>
6169 -'Divers',
6170 -'Your Settings' =>
6171 -'Vos paramètres',
6172 -'SAVE' =>
6173 -'Enregistrer',
6174 -'CANCEL' =>
6175 -'Annuler',
6176 -'ENABLED' =>
6177 -'Activé',
6178 -'DISABLED' =>
6179 -'Désactivé',
6180 -'NO' =>
6181 -'Non',
6182 -'YES' =>
6183 -'Oui',
6184 -'ADD' =>
6185 -'Ajouter',
6186 -'CREATE' =>
6187 -'Créer',
6188 -'MODIFY' =>
6189 -'Modifier',
6190 -'REMOVE' =>
6191 -'Supprimer',
6192 -'COMMENT' =>
6193 -'Commentaire',
6194 -'NEXT' =>
6195 -'Suivant',
6196 -'SELF' =>
6197 -'Ce serveur',
6198 -'REMOTE' =>
6199 -'Distant',
6200 -'LOCAL' =>
6201 -'Local',
6202 -'ACTION' =>
6203 -'Action',
6204 -'NETWORK' =>
6205 -'Réseau',
6206 -'ROUTER' =>
6207 -'Routeur',
6208 -'OPERATION_STATUS_REPORT' =>
6209 -'Rapport d\'état de l\'opération',
6210 -'ACCOUNT' =>
6211 -'Compte',
6212 -'GROUP' =>
6213 -'Groupe',
6214 -'DESC_SECTIONBAR' =>
6215 -' <hr class="sectionbar"/> ',
6216 -'NO_PIPES_ALLOWED' =>
6217 -'La barre verticale "|" (pipe) n\'est pas autorisée dans ce champ.',
6218 -'ERROR_BELOW' =>
6219 -'ERREUR : Une erreur s\'est produite lors de la validation de cette page. Vous trouverez ci-dessous les raisons de ce problème :',
6220 -'ACCESS' =>
6221 -'Accès',
6222 -'ACCOUNT_LOCKED' =>
6223 -'Le compte est verrouillé',
6224 -'GROUP_ADD' =>
6225 -'Ajouter un groupe',
6226 -'NETWORKS_ALLOW_LOCAL' =>
6227 -'N\'autoriser l\'accès que depuis les réseaux locaux',
6228 -'NETWORKS_ALLOW_PUBLIC' =>
6229 -'Autoriser l\'accès complet (LAN et Internet)',
6230 -'ERROR_PASSWORD_CHANGE' =>
6231 -'Une erreur s\'est produite pendant la modification de votre mot de passe. Veuillez vous assurer de l\'exactitude de l\'ancien mot de passe tapé.',
6232 -'BACK' =>
6233 -'Retour',
6234 -'BACKUP' =>
6235 -'Sauvegarde',
6236 -'DESCRIPTION_BRIEF' =>
6237 -'Brève description',
6238 -'PASSWORD_CHANGE' =>
6239 -'Changer le mot de passe',
6240 -'RESET_PASSWORD_TITLE' =>
6241 -'Réinitialiser le mot de passe de l\'utilisateur',
6242 -'ACCOUNT_PASSWORD_CHANGE' =>
6243 -'Changer le mot de passe du compte',
6244 -'CONTENT' =>
6245 -'Contenu',
6246 -'CREATE_GROUP' =>
6247 -'Créer un groupe d\'utilisateurs',
6248 -'USER_LIST_CURRENT' =>
6249 -'Liste des utilisateurs',
6250 -'DESCRIPTION' =>
6251 -'Description',
6252 -'DESTINATION' =>
6253 -'Destination',
6254 -'DOMAIN_NAME' =>
6255 -'Nom de Domaine',
6256 -'DOMAIN' =>
6257 -'Domaine',
6258 -'DOMAINS' =>
6259 -'Domaines',
6260 -'DOWNLOAD' =>
6261 -'Télécharger',
6262 -'ERROR_UPDATING_CONFIGURATION' =>
6263 -'Une erreur s\'est produite pendant la mise à jour de la configuration du serveur.',
6264 -'GROUP_MEMBERS' =>
6265 -'Membres du groupe',
6266 -'GROUP_NAME' =>
6267 -'Nom du groupe',
6268 -'GROUPS' =>
6269 -'Groupes',
6270 -'IP_ADDRESS' =>
6271 -'Adresse IP',
6272 -'IP_ADDRESS_OR_FQDN' =>
6273 -'Adresse IP ou FQDN',
6274 -'USER_INVALID' =>
6275 -'Utilisateur non autorisé',
6276 -'LOCATION' =>
6277 -'Emplacement',
6278 -'MB' =>
6279 -'Mo',
6280 -'MODIFY_USER_GROUP' =>
6281 -'Modifier le groupe d\'utilisateurs',
6282 -'NAME' =>
6283 -'Nom',
6284 -'PASSWORD_VERIFY_NEW' =>
6285 -'Nouveau mot de passe (vérification)',
6286 -'PASSWORD_NEW' =>
6287 -'Nouveau mot de passe',
6288 -'OFF' =>
6289 -'Désactivé',
6290 -'OK' =>
6291 -'Ok',
6292 -'PASSWORD_OLD' =>
6293 -'Ancien mot de passe',
6294 -'ON' =>
6295 -'Activé',
6296 -'PASSWORD' =>
6297 -'Mot de passe',
6298 -'PERFORM' =>
6299 -'Exécuter',
6300 -'RECONFIGURE' =>
6301 -'Reconfigurer',
6302 -'REMOVE_USER_GROUP' =>
6303 -'Supprimer le groupe d\'utilisateurs',
6304 -'PASSWORD_RESET' =>
6305 -'Réinitialiser le mot de passe',
6306 -'RESTORE' =>
6307 -'Restaurer',
6308 -'SHUTDOWN' =>
6309 -'Arrêter',
6310 -'SUCCESS' =>
6311 -'Opération réussie',
6312 -'ACCOUNT_NAME_INVALID' =>
6313 -'Le nom d\'utilisateur que vous avez tapé n\'est pas valide.',
6314 -'ACCOUNT_NAME_INVALID_CHARS' =>
6315 -'Le nom d\'utilisateur que vous avez tapé contient des caractères non valides.',
6316 -'PASSWORD_OLD_INVALID_CHARS' =>
6317 -'L\'ancien mot de passe que vous avez tapé contient des caractères non valides.',
6318 -'PASSWORD_INVALID_CHARS' =>
6319 -'Le mot de passe que vous avez tapé contient des caractères non valides.',
6320 -'PASSWORD_VERIFY_ERROR' =>
6321 -'Les mots de passe ne concordent pas.',
6322 -'ACCOUNT_USER_NONE' =>
6323 -'Aucun compte utilisateur n\'a été défini dans le système.',
6324 -'ACCOUNT_GROUP_NONE' =>
6325 -'Il n\'y a aucun groupe d\'utilisateurs défini dans le système.',
6326 -'ERROR_INVALID_CHARS' =>
6327 -'Caractères inattendus dans la description.',
6328 -'USER_NAME' =>
6329 -'Nom d\'utilisateur',
6330 -'YOUR_ACCOUNT' =>
6331 -'Votre compte utilisateur:',
6332 -'YOUR_ACCOUNT_INVALID' =>
6333 -'Le nom d\'utilisateur que vous avez tapé n\'est pas valide.',
6334 -'PASSWORD_CHANGE_SUCCESS' =>
6335 -'Le mot de passe a été modifié avec succès.',
6336 -'FM_NONBLANK' =>
6337 -'Ce champ ne doit pas être vide.',
6338 -'FM_INTEGER' =>
6339 -'Ce champ doit contenir un entier positif.',
6340 -'FM_NUMBER' =>
6341 -'Ce champ doit contenir un nombre.',
6342 -'FM_WORD' =>
6343 -'Ce champ doit être composé d\'un seul mot.',
6344 -'FM_DATE' =>
6345 -'La valeur tapée ne correspond pas à une date.',
6346 -'FM_CREDIT_CARD_NUMBER1' =>
6347 -'Vous devez taper un numéro de carte de paiement.',
6348 -'FM_CREDIT_CARD_NUMBER2' =>
6349 -'Le numéro de carte de paiement ne doit contenir que des nombres, des espaces ou des tirets.',
6350 -'FM_CREDIT_CARD_NUMBER3' =>
6351 -'Il doit être composé d\'au moins 14 caractères.',
6352 -'FM_CREDIT_CARD_NUMBER4' =>
6353 -'Il ne semble pas correspondre à un numéro valide de carte de paiement.',
6354 -'FM_CREDIT_CARD_EXPIRY1' =>
6355 -'Aucune date d\'expiration n\'a été tapée.',
6356 -'FM_CREDIT_CARD_EXPIRY2' =>
6357 -'La date d\'expiration doit être tapée sous la forme MM/AA ou MM/AAAA.',
6358 -'FM_CREDIT_CARD_EXPIRY3' =>
6359 -'La date d\'expiration a déjà expirée.',
6360 -'FM_CREDIT_CARD_EXPIRY4' =>
6361 -'La date d\'expiration semble trop éloignée dans le futur.',
6362 -'FM_ISO_COUNTRY_CODE1' =>
6363 -'Vous devez taper un code de région.',
6364 -'FM_ISO_COUNTRY_CODE2' =>
6365 -'Ce champ ne contient pas de code ISO de région valide.',
6366 -'FM_US_STATE' =>
6367 -'Cette abréviation en deux lettres d\'état américain n\'est pas valide.',
6368 -'FM_US_ZIPCODE' =>
6369 -'Les codes postaux américains doivent contenir 5 ou 9 chiffres.',
6370 -'FM_MINLENGTH1' =>
6371 -'La longueur minimale a été définie arbitrairement à {$minlength} caractères.',
6372 -'FM_MINLENGTH2' =>
6373 -'Ce champ doit contenir au minimum {$minlength} caractères.',
6374 -'FM_MAXLENGTH1' =>
6375 -'La longueur maximale a été définie arbitrairement à {$maxlength} caractères.',
6376 -'FM_MAXLENGTH2' =>
6377 -'Ce champ doit ne doit pas dépasser {$maxlength} caractères.',
6378 -'FM_EXACTLENGTH1' =>
6379 -'Vous devez définir la longueur de ce champ.',
6380 -'FM_EXACTLENGTH2' =>
6381 -'Vous devez définir la longueur exacte de ce champ avec un entier.',
6382 -'FM_EXACTLENGTH3' =>
6383 -'Ce champ doit faire exactement {$exactlength} caractères.',
6384 -'FM_LENGTHRANGE1' =>
6385 -'Vous devez définir les longueurs maximale et minimale de ce champ.',
6386 -'FM_LENGTHRANGE2' =>
6387 -'Vous devez définir les longueurs maximale et minimale de ce champ avec des entiers.',
6388 -'FM_LENGTHRANGE3' =>
6389 -'La longueur de ce champ doit être comprise entre {$minlength} et {$maxlength} caractères.',
6390 -'FM_URL' =>
6391 -'Ce champ doit contenir une URL commençant par http:// ou ftp://',
6392 -'FM_EMAIL_SIMPLE1' =>
6393 -'Vous devez taper une adresse de courriel.',
6394 -'FM_EMAIL_SIMPLE2' =>
6395 -'Ce champ ne semble pas respecter le format RFC822 des adresses de courriel.',
6396 -'FM_DOMAIN_NAME' =>
6397 -'Ce champ ne semble pas contenir de nom de domaine Internet ou d\'hôte valide.',
6398 -'FM_IP_NUMBER1' =>
6399 -'Ce champ doit contenir une adresse IP valide et ne doit pas être vide.',
6400 -'FM_IP_NUMBER2' =>
6401 -'Format d\'adresse IP incorrect (X.X.X.X attendu)',
6402 -'FM_IP_NUMBER3' =>
6403 -'La valeur {$octet} dépasse 255.',
6404 -'FM_USERNAME' =>
6405 -'Ce champ doit contenir un nom d\'utilisateur valide (3 à 8 lettres et chiffres).',
6406 -'FM_PASSWORD1' =>
6407 -'Vous devez taper un mot de passe.',
6408 -'FM_PASSWORD2' =>
6409 -'Le mot de passe que vous avez tapé n\'était pas bon. Un bon mot de passe doit contenir au moins : des lettres en majuscule et en minuscule, des chiffres et des caractères non alphanumériques et être composé d\'au moins 7 caractères.',
6410 -'FM_MAC_ADDRESS1' =>
6411 -'Vous devez taper une adresse Ethernet.',
6412 -'FM_MAC_ADDRESS2' =>
6413 -'L\'adresse Ethernet que vous avez tapé n\'est pas valide.',
6414 -'FM_ERR_UNEXPECTED_DESC' =>
6415 -'ERREUR : caractères invalides ou manquants dans la description.',
6416 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr.pm smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr.pm
6417 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr.pm 2020-04-08 23:43:15.000000000 +0400
6418 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr.pm 2020-04-09 20:47:48.750000000 +0400
6419 @@ -19,7 +19,9 @@
6420 our @ISA = qw(Exporter);
6421
6422 our @EXPORT_OK = qw( init_session_cgi get_mod_url theme_list
6423 - getNavigation ip_number is_normal_password email_simple);
6424 + getNavigation ip_number is_normal_password email_simple
6425 + mac_address_or_blank mac_address ip_number_or_blank
6426 + );
6427
6428
6429 my $config = plugin( 'Config' => { files => './conf/srvmngr.conf' });
6430 @@ -304,4 +306,44 @@
6431 }
6432
6433
6434 +sub mac_address_or_blank {
6435 + my ($c, $data) = @_;
6436 + return "OK" unless $data;
6437 + return mac_address($c, $data);
6438 +}
6439 +
6440 +
6441 +sub mac_address {
6442 +
6443 +# from CGI::FormMagick::Validator::Network
6444 +
6445 + my ($c, $data) = @_;
6446 +
6447 + $_ = lc $data; # easier to match on $_
6448 + if (not defined $_) {
6449 + return $c->l('FM_MAC_ADDRESS1');
6450 + } elsif (/^([0-9a-f][0-9a-f](:[0-9a-f][0-9a-f]){5})$/) {
6451 + return "OK";
6452 + } else {
6453 + return $c->l('FM_MAC_ADDRESS2');
6454 + }
6455 +}
6456 +
6457 +
6458 +sub ip_number_or_blank {
6459 +
6460 + # XXX - FIXME - we should push this down into CGI::FormMagick
6461 +
6462 + my $c = shift;
6463 + my $ip = shift;
6464 +
6465 + if (!defined($ip) || $ip eq "")
6466 + {
6467 + return 'OK';
6468 + }
6469 +
6470 + return ip_number( $c, $ip );
6471 +}
6472 +
6473 +
6474 1;
6475 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl
6476 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl 2020-04-08 23:43:19.000000000 +0400
6477 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/script/srvmngr.pl 2020-04-09 20:18:26.269000000 +0400
6478 @@ -27,7 +27,7 @@
6479 my $locale = plugin I18N => {namespace => 'SrvMngr::I18N', default => 'en'};
6480 #my $locale = plugin I18N => {namespace => 'SrvMngr::I18N'};
6481
6482 -my $VERSION = '0.0.1';
6483 +my $VERSION = '0.0.2';
6484 #app->mode('production');
6485 app->mode('development');
6486
6487 @@ -58,6 +58,11 @@
6488
6489 $r->get('/')->to('initial#main')->name('initial');
6490
6491 +$r->get('/backup')->to('backup#main')->name('backup');
6492 +$r->post('/backup')->to('backup#do_display')->name('backupd');
6493 +$r->get('/backupd')->to('backup#do_display')->name('backupc'); # corrections #
6494 +$r->post('/backupd')->to('backup#do_update')->name('backupu');
6495 +
6496 $r->get('/bugreport')->to('bugreport#main')->name('bugreport');
6497 $r->post('/bugreport')->to('bugreport#do_report')->name('bugreport2');
6498 $r->post('/bugreportD')->to('bugreport#download_config_report')->name('bugreportD');
6499 @@ -81,6 +86,11 @@
6500 $r->get('/domainup2')->to('domains#do_display')->name('domainup21');
6501 $r->post('/domainup2')->to('domains#do_update')->name('domainup22');
6502
6503 +$r->get('/emailsettings')->to('emailsettings#main')->name('emailsettings');
6504 +$r->post('/emailsettings')->to('emailsettings#do_display')->name('emailsetting');
6505 +$r->get('/emailsettingd')->to('emailsettings#do_display')->name('emailsettingd');
6506 +$r->post('/emailsettingd')->to('emailsettings#do_update')->name('emailsettingu');
6507 +
6508 $r->get('/groups')->to('groups#main')->name('groups');
6509 $r->post('/groups')->to('groups#do_display')->name('groupadd1');
6510 $r->post('/groupadd')->to('groups#do_update')->name('groupadd2');
6511 @@ -101,28 +111,23 @@
6512
6513 $r->get('/initial')->to('initial#main')->name('initial');
6514
6515 -$r->get('/logout')->to('main#logout')->name('logout');
6516 -$r->get('/manual')->to('manual#main')->name('manual');
6517 -
6518 $r->get('/localnetworks')->to('localnetworks#main')->name('localnetworks');
6519 $r->post('/localnetworks')->to('localnetworks#do_display')->name('localnetworks');
6520 -$r->post('/localnetworksdel')->to('localnetworks#do_display')->name('localnetworksdel');
6521 $r->post('/localnetworksadd')->to('localnetworks#do_display')->name('localnetworksadd');
6522 $r->post('/localnetworksadd1')->to('localnetworks#do_display')->name('localnetworksadd1');
6523 -$r->get('/localnetworksadd1')->to('localnetworks#do_display')->name('localnetworksadd1');
6524 $r->get('/localnetworksdel')->to('localnetworks#do_display')->name('localnetworksdel');
6525 $r->post('/localnetworksdel1')->to('localnetworks#do_display')->name('localnetworksdel1');
6526 -$r->get('/localnetworksdel1')->to('localnetworks#do_display')->name('localnetworksdel1');
6527 +
6528 +$r->get('/logout')->to('main#logout')->name('logout');
6529 +
6530 +$r->get('/manual')->to('manual#main')->name('manual');
6531
6532 $r->get('/portforwarding')->to('portforwarding#main')->name('portforwarding');
6533 $r->post('/portforwarding')->to('portforwarding#do_display')->name('portforwarding');
6534 -$r->post('/portforwardingdel')->to('portforwarding#do_display')->name('portforwardingdel');
6535 $r->post('/portforwardingadd')->to('portforwarding#do_display')->name('portforwardingadd');
6536 $r->post('/portforwardingadd1')->to('portforwarding#do_display')->name('portforwardingadd1');
6537 -$r->get('/portforwardingadd1')->to('portforwarding#do_display')->name('portforwardingadd1');
6538 $r->get('/portforwardingdel')->to('portforwarding#do_display')->name('portforwardingdel');
6539 $r->post('/portforwardingdel1')->to('portforwarding#do_display')->name('portforwardingdel1');
6540 -$r->get('/portforwardingdel1')->to('portforwarding#do_display')->name('portforwardingdel1');
6541
6542 $r->get('/printers')->to('printers#main')->name('printers');
6543 $r->post('/printers')->to('printers#do_display')->name('printeradd');
6544 @@ -157,9 +162,12 @@
6545 $r->post('/remoteaccess')->to('remoteaccess#do_action')->name('remoteaccessact');
6546
6547 $r->get('/review')->to('review#main')->name('review');
6548 +
6549 $r->get('/starterwebsite')->to('starterwebsite#main')->name('starterwebsite');
6550 $r->post('/starterwebsite')->to('starterwebsite#do_site')->name('starterwebsite2');
6551 +
6552 $r->get('/support')->to('support#main')->name('support');
6553 +
6554 $r->post('/swttheme')->to('swttheme#main')->name('swttheme');
6555
6556 $r->get('/useraccounts')->to('useraccounts#main')->name('useraccounts');
6557 @@ -171,11 +179,13 @@
6558 $r->post('/viewlogfiles')->to('viewlogfiles#do_action')->name('viewlogfiles2');
6559 $r->get('/viewlogfileR')->to('viewlogfiles#do_action')->name('viewlogfileR');
6560
6561 -$r->get('/wbl')->to('wbl#main')->name('wbl');
6562 -$r->post('/wbl')->to('wbl#do_display')->name('wbldis');
6563 -$r->post('/wbl2')->to('wbl#do_update')->name('wblupd');
6564 +$r->get('/yum')->to('yum#main')->name('yum');
6565 +$r->post('/yum')->to('yum#do_display')->name('yumd1');
6566 +$r->get('/yumd')->to('yum#do_display')->name('yumd');
6567 +$r->post('/yumd')->to('yum#do_update')->name('yumu');
6568
6569 $r->get('/welcome')->to('welcome#main')->name('welcome');
6570 +
6571 $r->get('/workgroup')->to('workgroup#main')->name('workgroup');
6572 $r->post('/workgroup')->to('workgroup#do_update')->name('workgroup2');
6573
6574 @@ -191,9 +201,10 @@
6575 my $c = shift;
6576 my $method = $c->req->method;
6577 my $url = $c->req->url;
6578 + my $deb = $c->req->url->to_abs->host;
6579 my $version = $c->req->version;
6580 my $ip = $c->tx->remote_address;
6581 - return "Received request => $method $url HTTP/$version from $ip";
6582 + return "Received request => $method $deb $url HTTP/$version from $ip";
6583 });
6584
6585
6586 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/styles.css smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/styles.css
6587 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/styles.css 2020-04-08 23:43:15.000000000 +0400
6588 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/styles.css 1970-01-01 04:00:00.000000000 +0400
6589 @@ -1,165 +0,0 @@
6590 -/* srvmngr - css de base */
6591 -body{
6592 - background-color: #FFF;
6593 -}
6594 -
6595 -#container{
6596 - max-width: 100%;
6597 - position: relative;
6598 - margin: auto;
6599 -}
6600 -
6601 -#navigation{
6602 - width: 190px;
6603 - position: absolute;
6604 - margin-left: 0px;
6605 - padding: 5px;
6606 - background-color: #E8F3E1;
6607 -/* height: 600px; */
6608 - overflow: auto;
6609 -}
6610 -
6611 -#main{
6612 - margin-left: 195px;
6613 - padding: 10px;
6614 -}
6615 -
6616 -
6617 -#central{
6618 - margin-left: 0px;
6619 - padding: 5px;
6620 -}
6621 -
6622 -#footer{
6623 - margin-left: 0px;
6624 - padding: 5px;
6625 -}
6626 -
6627 -#header {
6628 - background: #bee6a2;
6629 -}
6630 -
6631 -#header h1, a:link, a:visited {
6632 - color: black;
6633 - text-decoration: none;
6634 -/* contribs.org styling */
6635 -}
6636 -
6637 -.sme-error {
6638 - color: red;
6639 - background-color: #ffffff;
6640 - border-width: 1px;
6641 - border-style: solid;
6642 - border-color: red ;
6643 - padding: 2px;
6644 - margin-left: 10px;
6645 - margin-right: 10px;
6646 - margin-top:0px;
6647 - margin-bottom:0px;
6648 -}
6649 -
6650 -a.accent {
6651 - color: blue;
6652 -}
6653 -
6654 -#footer img {
6655 - float: right;
6656 - position: fixed;
6657 - margin-left: 40%;
6658 -}
6659 -
6660 -label.field-with-error {
6661 - color: #dd7e5e
6662 -}
6663 -
6664 -input.field-with-error {
6665 - background-color: #fd9e7e
6666 -}
6667 -
6668 -span.label {
6669 - display: inline-block;
6670 - font-weight: bold;
6671 - background-color: #e8f3e1; /*lightgreen;*/
6672 - width: 30%;
6673 - text-align: right;
6674 -}
6675 -
6676 -span.data {
6677 - padding: 2px;
6678 - font-weight: bold;
6679 - margin-left: 0%;
6680 -/* background-color: lightblue;*/
6681 -}
6682 -
6683 -span.data2 {
6684 - padding: 2px;
6685 - font-weight: bold;
6686 -/* background-color: lightblue; */
6687 -}
6688 -
6689 -input.action {
6690 - margin-left: 0px;
6691 - color: darkgreen;
6692 - background-color: #bee6a2; /*lightgreen;*/
6693 -}
6694 -#modul.desc {
6695 - padding: 3px;
6696 - background-color: grey;
6697 -}
6698 -
6699 -[type = 'text'] {
6700 - margin-left: 0px;
6701 - /*background-color: lightblue;*/
6702 -}
6703 -
6704 -.a, .return {
6705 - color: #661866;
6706 - font-weight: bold;
6707 -}
6708 -
6709 -.section {
6710 - line-height: 20px;
6711 -}
6712 -.a, .item {
6713 - line-height: 15px;
6714 -}
6715 -
6716 -#module {
6717 -/* height: 600px; */
6718 - overflow: auto;
6719 -}
6720 -
6721 -
6722 -#h2l1 {
6723 - height: 40px;
6724 - width: 100%;
6725 -}
6726 -#h2e11 {
6727 - width: 70%;
6728 - float: left;
6729 -}
6730 -#h2e12 {
6731 - background-color: #C0E7A6;
6732 - float: left;
6733 - text-align: right;
6734 -}
6735 -
6736 -#h2l2 {
6737 -/* background-color: #A8F9E7;*/
6738 - border-top: solid white 3px;
6739 - border-bottom: solid white 2px;
6740 - height: 14px;
6741 - width: 100%;
6742 - padding: 1px;
6743 -}
6744 -
6745 -#h2e21 {
6746 - float: left;
6747 - width: 70%;
6748 -}
6749 -
6750 -#h2e22,#h2e23 {
6751 - float: left;
6752 - width: 10%;
6753 - text-align: center;
6754 -}
6755 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/images/btn_donateCC_LG.gif smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/images/btn_donateCC_LG.gif
6756 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/images/btn_donateCC_LG.gif 1970-01-01 04:00:00.000000000 +0400
6757 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/images/btn_donateCC_LG.gif 2016-07-19 12:31:52.000000000 +0400
6758 @@ -0,0 +1,19 @@
6759 +GIF89a“/æz/=rÿ²<ÿ¬,ÿ¾Zÿ©&þá¨ÿÊxÿìÉÿ֖ÿóÜÿöåÿâ´þéÀ/l³ÿùîþçºËÿýøì‹5þæµÿ¯4gÍå73þä°6Rt:gþߢ•—’W þޞ¾ÁÁz‡‰ÑÒÓâãäÉÆÁØÚÜ+|Åh4][ÇJe|þ·E 'T¸çHSU·7AÃÇÈÈÌÍÇÊÌÊÝﵻ€¬Ô´¬˜âíöÄ» @7'•ºÚ¦®·‰oKgcP´Ðça“Ç^r‡«}FJƒ»#™ÕjÄ︋>½g(þؚ҇7ç[5‘ËìÂÔâ+ òóöχEÖɨ¥ðöúNE5Œ›±÷ÔÑï¥3`¢Øïܳæôûwpcò©vÔæôññïîبn¢Êö˜ýôòð¦ ßÏЄ~s÷áÎøȹÊÎÓÝa`׳³H×ì˜BY®óææÞʝɚîӚòœjôúýúêÚÿà°¸RJð¶·õƨ憆ÿïÓ3fÿ™3ÿÿÿÿÿÿ!ÿ XMP DataXMP<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.0-c060 61.134777, 2010/02/12-17:32:00 "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" xmp:CreatorTool="Adobe Photoshop CS5 Windows" xmpMM:InstanceID="xmp.iid:043DFE489A8811E19E908BC45BE41EC5" xmpMM:DocumentID="xmp.did:043DFE499A8811E19E908BC45BE41EC5"> <xmpMM:DerivedFrom stRef:instanceID="xmp.iid:043DFE469A8811E19E908BC45BE41EC5" stRef:documentID="xmp.did:043DFE479A8811E19E908BC45BE41EC5"/> </rdf:Description> </rdf:RDF> </x:xmpmeta> <?xpacket end="r"?>ÿþýüûúùø÷öõôóòñðïîíìëêéèçæåäãâáàßÞÝÜÛÚÙØ×ÖÕÔÓÒÑÐÏÎÍÌËÊÉÈÇÆÅÄÃÂÁÀ¿¾½¼»º¹¸·¶µ´³²±°¯®­¬«ª©¨§¦¥¤£¢¡ Ÿžœ›š™˜—–•”“’‘ŽŒ‹Š‰ˆ‡†…„ƒ‚€~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"! 
6760
6761 + !ùz,“/ÿ€z‚ƒ„…†‡‡xŠ‹ŒŽ‘’“’ˆ–—˜™š†Š ¡¢£¤¥¦§¨©ª¤Š›°±²„xD ¸¹º»¼½¾¿ÀÁÁpx³Ælj
6762 +ËÌÍÎÏÐÑÒÓÔÕË ÅÈÚ³x ßàáâãäåæçèéáuÙÛî˜xuóôõö÷øùúûüýøíïBq  Áƒ*\È°¡Ã‡ µœ8¨ƒ‹3j̸áŽÇ;>PÙH²¤ILfœ\¹ Ew <˜I³¦Íšî`8q"Ý7ƒ
6763 +º!C¡H…xŠ¢JJuê‰;5¢RñÉD*•Y«N`RƒÊÔ¯a¥ú4•lW±pÿ§"@ᒩ1§(ˆ\ØË·¯_¾µð͹aoN
6764 +_¨¡³b&†?f€Ìäã
6765 Z{<!ø¯ç¾èÚ݆‚¨S«^]€1Õ9?pŒaFŸj
6766 +tü9ÃÙ3tÎÈy¢ÀŒ«>h¹Ú£÷eÖÐU@!z4²Òy£CïØöo5 µ &<û'jÇMV71_ vk¨ƒ×¾ºChêu­Ã ÿDh à€èØ è[
6767 Ü
6768 ›¾Í à‚ÔÐÓGLx‡„e°“o(¢€Lç_ùé§ 'ö÷Dt ãŒ3F8cGtیW5Á†G2þxGløôA
6769 6và›ÿ:êôÁ“4Aã”aÀ-ö—¢ŠðPàå—`†¦G^J‘ƒGBPàÃ+xYHRÁ¦—r¶Y'RøTofàåš:駘„º%—–à!À¢Œ6êh£rZæ‘‹æy‡:øDé™:,Ê©o^êÛ‹Ê™AEHá¦:Iñ諯Š("ŠÂj«+äš+ª±‚Gáé
6770 +B @Ä{f°¹2úëE€ú¬ÑÚj­¬³&BÀ¶Üvëí·à†+î¸ä–;.¶Ùr’åºì¶ëî»ðÆë.ºéâÔøæ«ï¾üöëï¿,p¿ôÖK‹'¬ð 7ìðÃG,1ÃL ÿd¬ñÆwìñÇ ‡,òÈWlñÅ ¤¬òÊ,·ìòË0Ç,ó̘|2-µàÏÎ<÷Ì31ÜL%Dmôэ­ôÒL7íôÓPG-õÔTWmõÕX -é֒¥`C
6771 +>Y6d—möÙh“=Hl·íöÛp³=ˆ
6772 +*Ý@äMÂÞ
6773 ô=ˆ€.øà„.ˆ…'^¸ –™`BWÀÁ)¤Áå—{ýÑØf—ÀÂç%½B>ø€ìÙkÇ­zÜsÛ}·
6774 +y±7 }7ð·«çž‡‡ÛÂïÀ/¼ð¼ëñÑã‘Cn˜7A
6775 +xÄ9%X`ýõ,ä ÁöÜû`vêºçÞºÿÝtÃ.;ß~ bîáÇ]<â#Ä/ÿüôÓ_¼GÉ'õÎ7/½ d«Þõhîp e_ûX'ˆº‘oç£]úô°>ˆ A² Á7„áwAA…÷Ù(L¡
6776 +W¸Âû9Îq@^¨‡ËõïywàÜ X@r/jDp¥ä?àÁ~à„- <ÈÃ~ðƒ¶
6777 "GÈâ^7….ò€T¼]tð„$$¡ IƒÚpXÁ
6778 +6ÐÁž`˜ðxÌ£÷¸GVÀ f ÁHòzdèØÆV2 ;4‚$Ïp…3pï øš ܀ÿ2h>ـ-È ¢ä€ä&ˆ*TÁ
6779 U€
6780 \)K,ÀÀ 0€A„'X¡—yà¢àØ`6ø¥v×»` !‰A2…d ΄Bp€ Nˆ! °%È [Ødà5Ð`
6781 rðÂèp9Œ_Aˆ)†(DA ^ˆBFð†9„
6782 +aàBõжœ¢¤~@ÊH‘µhA¸Á
6783 ¥,sIƒ\Š1™I°ÁVš6Fa`@¦ÈÈL= ;6Évk^ÚÄƀ’ Y n€%`!L]ƒÊP†(—ÿËÀ=•À6®æ!
6784 úüj–‚<„@i¸Â
6785 +4)D¶Á€˜è è„d”£%+õP>-fñ€¬ dp»·`ˆ­7â4§Úœ&¨™hÀAQ÷Ç !cÈ%pƒ-  eø R+‡z22¬JèB”0‚ßÍ@
6786 +`Û” …²•¡m{"vðIÀ 2àÀ0ŠÑ*nTySÛª€'`yXeG ë6Lm`6t`·)à
6787 +&tfOt
6788 +Ôäd  ,7{Z<8®h€ @’)øÜóX¹ÐsŸKðçâ#,a ¥ƒ°ÿ2©@»6¹Ãe.DùƒP^ø¹z ¦@ƒêî Ä%¥.u©>ö-° \Ø^zqÐâ1 ñs<‚Óx ÷ gþ 'ÔÞ‡:Üáõ$éÃíÙ`¡nہ ,*e vÊ7v³¼×½ýÀ‹`ü¢˜¿ÈÝð) ÆÜ3¡ÖÌæ6»ÙÍ÷»Ã•W*òz ’­×CzÊ TÝ f7»Úz‚ëÓ]ÄІ&›°Ž´¤'=é8ËyÎ&°sóR°9;dÁ
6789 +–àC &°­†Û ÍjC—ùm‹¾B“ÓÜ;ØúÖ¸Îu®-íä9Î#ÐtåÄæé²2te]tK€6¦ÚŠ@ÐC«§ý·&XðÚ5˜†Àín{›Û&܀¸ÇMîr—›×\³Ì“m°µé¥íݨCõ³­xiO›ÕSœ¾'ˆî[ßz;
6790 \ Pas de fin de ligne à la fin du fichier
6791 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/images/smeserver_logo.jpg smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/images/smeserver_logo.jpg
6792 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/images/smeserver_logo.jpg 1970-01-01 04:00:00.000000000 +0400
6793 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/images/smeserver_logo.jpg 2016-02-16 15:53:21.000000000 +0400
6794 @@ -0,0 +1,54 @@
6795 +ÿØÿàJFIF++ÿÛCÿÛCÿÂ(XÿÄ ÿÄÿÚ ßkú؎?œñ_ƒùݏõ<¾ó<nOÌéÁy^OÎœj]­=w¦³=·ÇŽÒç I*R%1’ILȕɈ9€„瘒 ÎP˜yÊ€É LNO9 ¹)š‘¸ç1 "PœÈ'Œ„çœå‚É$˜Èç1)É9äÁ˜‘Ÿ'~×ïýƒsè·É½;dO=mꟓ±ý§õµ¿ª~GTûÇÐþ6y¾WÖ><<#Ó¯KªÚ|¹ý,áãúó‡ $•)˜É$¦dJäÄÀBsÌIç(L<å Àd„¦''œÀ\”ÍHÜs˜)™<ÀO Ï9Ë’I1‘ÎbS’ sɃ1#>Ký¯ßøí}@øŸ¡ú«è¾Ãçï˜z¶è÷ïbÒ~ëžû½w?7®“Úí3ž[ë×irçô£‡ì€’T¤Jc$’™‘+“s Ï1$œ¡0ó”'’˜œžsArS5#qÎb@D¦dó<d'<ç,I$Ìȉˆ NHÏ& Čl÷½œpþ'7æ~«²½³ö5ï«þWoýï;Í^Ùû½?[³Ÿ=SµèŽ‡™¸â;÷9IR‘)Œ’JfD®LAÌ'<Đ^r„ÃÎPœHJbpByÌ ÉLԍÇ9‰™“Ìñœóœ°Y$“3"& %9"<˜33֟l÷¤%Êse 1<Ÿ;ߘg#Î5%V͙êٞÐãÇ´Æ|Öò<…Õ¶{ìGJÚæç:Þ9,z—Æá³9sˆ9€„瘒 ÎP˜yÊ€É LNO9 ¹)š‘¸ç1 "S2y€ž2žs– $’fdDħ$@ç“bFÿÄ&08@P7ÿÚ´mwu+f\Èp8Â(0ž;°ƒ×„ˆòùK8H³aÎÒIð0ûÿ)XóGm ey·KÅ°Úª,fûŽœHݟ¢¯àsæ}ÙößÝ4ãr2Ÿ;òô€È ðkazFéÆRèuÀÝr\T´iîJ¥€e…X7w”äëFÕJ@"Ôb“eÑ¥þšhM¶Þ¦ü|Ï»>ߐ\5•p?+O£,#…£0A€Ê„gYp˜`iVÁ¸åö»í^ƒ¢SýªZðgÉ&}õgֆZ¯bï‰/ôÓAÉŸ3îϵ¦˜PpdxD`
6796 +O®À¥‘Z†ëÔJА¼§WA%u
6797 +¨ çèF3_æZßÏê~Šq~8ÖQ»4Wëk²)å))Š«#S€þ>gݟ´egjË!IØd•‘/\·
6798 it$M„<tÅë>eØFëúÿo˜{#^;.Ø<zîÅĘ îÑÕölËáÏKOIû†³£ Ø;ܾéñJÁöùó>ìûÿÄ>
6799 +!1A "02BQqa‘±Áð3@Rb‚Ñ#r¡áC’²ÂÿÚ?
6800 +
6801 +ûýM»ÇäjNàè\Ç&7 ® R¼j’¬6†ÊNR7†µ·ÔRÅ2 !‘%º¯«©¶Û2’.7‹éSðŽ æ9ñpE µÑ¤\âúŒÈ.˦¼à4¨1bF|<ÑÌ·±h\¡±ÊMˆ666:úˆ=Ƭvo¬øOº¢PZÄVDG7-öŸgù§Ë˜åÙ»ëǐۼ~G”Ý ®Ï×}Ct-C’Ôv¸Y¥¥êûëª/¾½)áãX8?
6802 +ÄM‹ÖL„‰8²x¸ãS¥¸çÌ ª…v1¬7¢X%„ T“I9^q‰ÄqÆÝьŒZÛ3I|ö͑/–ž9½á8•ey0½uKE|’^Ö‡Î$K
6803 +ê¡ÙD‰a‘±SM12I#d2Nj.Ùs¼¥l\óW1+”Û1Ç`¦ôo7+¾ß# -{Žq‚b IUY‘²©R­`Ú @’¥MRXÒT'ðÈ¡×û
6804 ¥ÛJ3“”›è´Bz¶ßÚ­Ï¿²¿ß?ÑûTßhÞ_ÈmÞ?#Ên„×g뾇!º¡Éjì/‡Ü¬ÒÒõhs†µé\A‹Àp¢)e„¤n-ÍW†S<9ˆ½„™œw v€¬7 ð~*™1P%ÅÚ9eHäŒïWW`tٛªÛT‘^Ï‡á\)›üwúdå&+³ŠÄ"ÿ95ÌÑ #TÏkvŒg<ÃX<n熁<R:ÆD€s™š2uV[€
6805 fºHøB,yƒƒpDb\ÎÚ>rñ–hã‰s^üage%VÊ3_8\ø|.¯‡†*5Kùå©3¶ÀmáP‹_ñoöPãY…î:î纯Ϸå¡öçú?j›íËþ£Û¼~G”Ý ®Ï×}Ct-C’ÕÙ_¸Y¥¬Äi@Ú±Ç<mȲFüÖFVuWÁ±©}à÷|ÑM‰…oöa’E¹K¡qú™ükÁGH"Ìe\’É5¤’Dތl!ވª­ÚÖ'ÑN™ËÄóá®ncŒ£EúDŠÌ¾ʍ@Ò¸?0<üd*ÒMÕãæ!ܡȪGq§5sXX‚kŒaÝõåFVîÆ6lÛ £3{(9ûIï®5ƒ—Òö·•3fbÇ}¾ä6ï‘å„×g뾇!º¡Éjì/‡DyGÖi}m»Çäyüèe°¿Ö¾:,¶ÖÞCó~ÔH̦ãC©Ýké¸aï«¥÷nݦÓqÔðÜ<E]I@,5¶Ã´î'n•™-­µ&ãõmÑveKLnIù[Õxõç/üt÷”ÿÍýµš?gg³ùH6æ÷äìÝ­–Qg¶ j¢ßíö—åE“2,3fæŽómÛ7_¾„[g4žÎ¦öÛ²ö¹[ µü«eÓpϗR8ÍNËÜ/¾ö¾•x¯qa|¦ÅvpÊ
6806 ©æ=¼áWŒeê›q—Rr5¶ÆwÛkùMKbÜݖµ°¾à6÷ t&»?]ô9
6807 еKWdy|:#Ê>³K_ÿÄ? ! 1A"BQaq±áð2Rr‘#34b¡ÑÒ$S‚²ÁÿÚ?Îg¥”yRóÖÛÈYmmûKjSkI¢í…[%$褹iIâKÍKN²‰™9†f¥Ü­Ëº‡šU¤¥Tq²¤’••
6808 +Õ*½!ÀðçKØ´Œ³é¥Ì.ad]B›ÚIRÛ¨!BðžÉ»ìëx„Ž"ÑzBrZu mS’Ï6òRºVÅØ£bèAµTU4¡Š>F´ç+îŸÈÃIT"-@u@ŽÍ<ü¡v…xrü¡QÝúñÌñÈæ®[Çsç¸s9sõƒ™ãè?÷#Ãp ðžÎGq[§s¬¼~rU¹, ZÓ9‹jþĔ¿ìËp0Ã
6809 ª©·Û^Ú!D(Sj¢]1†õQƒ·(‘ŠLÎLO-±µ\³¨a†#Q,’ÒÔ°‚m>T Ø3RØv^o«n’J¡OÌ`x¥‰*±OK\–_¼&ԉé
6810 ª]iö jPSbæóÍ ª°”*aÌNrruK˜˜,¥·RÒRVÁO¹³.?4[µo,šÚ)h
6811 ¸^9‚ÎõuˆÉc8,Óïaï¹°q”ÜT*â¤g a
6812 ¼ÜËIZØp4…!M-A)u¦Ý\¤â&¥e¦™í35.ÌË'Å©†ÒógÕ+ÒªÒÅäÐÔè>ª  û4ziîãX§n¾_Þñ
6813 +ü?ã~ñ^Ÿ
6814 +Žï׎gŽG5rÞ;Ÿ=Ù˟¬ÎG†á…Gtz|3<29œŽâ·NçYòsXžÒv[.¢MLKº(vm¹)6©ÙM¢†¡3
6815 +uäP–’*TâSoK:?ŠJ"m¬NMš¤Xš™f^bYtªón­ZtÚ
6816 +´º\Úԝc¬ é”aªœÁö¿Õ¹Õ³8´³b
6817 5þ±šª÷%S1.†6ÁR’·V—UÑî™`øÎËÎÏJJO%¤ ÙY‡›—ZŽ-¤º¤í%Ö¡{kl¬%
6818 +J(t)¬NÊ㊐èæ
6819 +¤âN™ä<ë²Çhٙ±ròò¬8?fñ;u©å¤–Û!´m.چð‰Ñøn$MÞÃ#)'wÞöivØ¿þVWÖr¹{¡¡K¾÷×ÊÕJ¨ëÈ|ü"½ºyxÄ+ðÿŒ=ûÅzÔB£»õã™ã‘Í\·ŽçÏpærçë3‘á¸aQÝŸ Ï Žg#¸­Ó¹5--<Ò³l71.úlu—RÚÓ¡í$óÅ*I €bkªl綒󘔛dêÂ\eô$x4·šS£O÷\xø˜Áz'‚` ¼Ì”¶ÑS-–¦f&Êf˜h覜% h2®û-´ÛnwÒ­)ˆu[Ñù·”ô«³¸uê*S -·%…MNÍ6·ç@-§@–ÂtŒ¡xGT_”iىËJ}¶qiuä( ÈBe€°JTPÞÔ –ÔêH!Å
6820 (>½#j¯õéªâ®q¶_””šóª‚Êô­)
6821 +UÊ$ñ0¨îýxæxäsW-ã¹óÜ9œ¹úÁÌäxnTwG§Ã3Ã#™Èî+tî ŽF´\ýÞ~>‘PF´ü©Ï_è.ƒC©×ƺŠ
6822 }ÑT˗»GÙ÷rF*šÓ@(5¦ ñ>ÿXª)ˉ¨§óqÐpcð˜Qª‰ø
6823 +H<¢­ñªuþQA¯›gÇîç7 Óº+o+QšÔu&*Ý4´Q|ÓÅ"Ð;‡ˆ¼ò‚¦ïAìÐ]PSï¥@éËß0)À„“ÝÕW[¢«N(qÒÐG;mªt ¾ÓSû]O!ÃPªrÖæJŠ…©­µ
6824 +F"ऀÅOeU{@ÅÍ >Ɖ5Š•X®5h÷©©Y֐ñIP) N€S[|kZÐà
6825 ã¹óÜ9œ¹úÁÌäxnTwG§Ã3Ã#™Èî+tåÿÄ; !"#1$@23ABPaqvƒ•³%6Qr“¶ÔÕÿÚ?«…ÅeF0Qú>nÄ6†5©°6å~X£§9÷¢gÜ«`KŸUíö™³zÝjUÆDIöÞªÉ9â1-qD”ú oë>‘Ó'‘¡„ñ†Í•í¤ùp†vÎø—[râ[}§©Kò´A¢R@LÇ¤‹8ÌöÊ'Ò`øí>“ëо«Õa'¿¡‚ÕÎÓ´ìa2;ÄúLoé>“ëÔ¦ÞJšrQ¸{£¿¬sXîa¼LLrˆôþÝKiÚE¥Äñ“CA°%¶üK„ÏÚbx–Ó´Äôu­æðõ,+nå{9:Hzù óS^,@BqÈcq((ô˜ëýäÀœã¿öz,˜ß¤XÐ[\y´‰¢)G(sJÜ3Dž¦VpӖq\ó˜ã=vã[i~[í뛡ÿr_ ÿ¯-º¯›Òù8£mù¼uqº¤Òº
6826 §f¥÷L\Eªä
6827 í$Å¢¶ˆà|JwÀgðÙ¬u-TüãêÝÉ\-?ŒEš5•L²Ç/>ÝMº–Âí¬`{ÝbYMrÔr§üÄê•3Cc̱á< ø)ïãüW²¹™qýHþ{ipZ‘¦šÃŸ°­pe?ÐF&z©¥ðMù~˜Ç“¬V3¢$Us?z¿r
6828 +ÕÖCE4j/ÖºÜÝìÂÄh]$¢¯NÓ¢c捲)+ž¸e¼“„…‡ @ÔH& ©!}§Û Žá!‚”¨çïYÉqý^n’†mË´½øEq
6829 ~#ûHÞ@˜ŽP·sã°Åº}Ábœ®0Aê±k<…›VˆÜéT!P)–fZ|%±!ĚQ+_pˆ`
6830 + ªeqVÚMgdÅÛo¼{楮 Õ½bd£…‰L@±ka³WW-Ž~^­X
6831 +ÓQ•ÛÛ¦”¡ãF¢*«@°`årAÎHué?‡.Éj©–Å ¶~!Bþå/š]kWËj€Ïs"æErØ·¥´ŽKâM7ŠÓ!zævÁãA¸Û÷nÜmð'Y³˜Äöiâ™jÒkËý¶¹·%-6~Q®r¹ÝY^¼
6832 h¥Ûv7!{p’ã
6833 +µjïdm˜6­~ûì€e±¶m­Š×øi¢&D^:ïb2fêêÞvw’OŽÑ{ÏîÉëKÿ}l©¨ºÒrE%1À‰™ß`^¤Ì-cÿ(ˆ }„b"=#ùLþT«”ššv¹ÈíÊÀ+)âc”AzoýâzÂætë^Ìo!ÉàßoÞG Ú¾[
6834 u µ 9-²·JDOåùlqc‘F“øƒ…Ýøû•«ã3Uõìâ­©Q0Aê³6©Y"}R"Üw +ÈUVãÄØzäÞàh0†cŒúsÖp"^¦Ö-¾OÈm’­m·bè/ñJõäÊðô{;IAʚ˕«\Œ[®ö‚]ï%Ã
6835 +9¤¦9„–Ã0'ŐCðX’ÌòŌb'¸þ&”WIDZ³=ã&Ì€lË~ì|1Ó6N­*øÍM••OÓ® f±Ì`GûMâP24`¸Í¸ëͽ¬ôõ­Y’@ÆFä<Œ( ¤Yòš'۟¤6ìÓu럠šÀ<ðÙ(¿¥¬Ð¿r«ªµ“JÞQÛFÙHûAŽ¤µ­@D<Ñä¾`^|¯™œ.sQepÅSãyåóAnê¡~ÊÝÝ^
6836 +Í@iÙá(Æ1]ªê†íe²mdþ"b—WÌCWÃß9süAä=ÕùFñݬÐûŒõ¥ÿ¾¶?ÔÔ]iOíÏÿå¯å3ùXÕ9ff$1J"*]Bk~nÇÒ:m/Ýïú¾ïÝ·JÄjؔW¶»ÕŸMÑ^Õ{ *em•´x5MbÚ¶,À¢`ö†­L ¸ k2q7¬M¶S˺½ÀSŒm”JêW0B’FFÅCS
6837 +a´™ÍoU ŸTÁ©¢?ÑdÕË#üClôÕT¯Î^»³0ç=s÷QÏ_j‰@°YÿÌõ-®ËT9N䤒؈ÞwžÐ#éÎöˆºïV[ki*Ñ 11±B AkW(™‰äŒð#!™Ž²Y܃3ñw+i—-E|e£ºÙÜ»K,{þ,/íëöڛüÒ§ÿ3ª:6æ=Ù V1Öߏ}»ó:n¹dí<Ñ~¨Õ0æÃØ×ÙrÁaan€Ž…Œ§—¾1;ö.e Ÿ]øτÇümöûÏU´­Ô6†•šÖjÖÃJ(B
6838 +ªÞ¥-Cãµ@˜ Ýb¨Þvã×z:‡˜ù&?$YTÝD^òNmÌ÷,xr²Wã]í„ þ§»ÓֆœÄM™Çã¼®ÄÜhºÇã.Ù¾ÞãIúö›ÃeŽÁÄgyŽSü¢9¨íiåj]´d—E§•¬ºÕY€]Z3ŒSu1Ñò*±²ªìÑøük­³aú‚ݤü›ôögT½êÔ'ÁFoTÛÊãGM[Ñ0ùr®Fݑ´uu¥·öìÜSòª]ªL88¿V¢ë5*²¶èv°õïdê»-_%¾Íëx̕­M¨á~Mك­åeéUóË5jâkYŠéÕ¦óÃYẖyÁ}š˜/’dlyšõcé[ ô\–¬Ô•A¬U‹xTÛU2z†‰æ2Ú®¾«¾Ê¸‡ç˜|®Ÿ$ÞÃÐb]’Œ /'= í"ÃlãU¹²z%ãòyû£ÂRN')ó ³µ4t©Öº¬¥|–¤X;#•Ôpv"ͽ3’¹,±Eñ™©V¥…'JÃo¾Òi&m·'µ•¼W=ë}û×eîÚËâRUŠÐ”¥‹;´à\=D}ûOqF=y)ƒ½gÙ¢§ÔÖgN½Ö•’ý!¶Y;fÌRTlµ^§Å qʂòùw*jjØÛM÷*iÚ
6839 +9[r™·òò׳ÈРÌîLÇÉÆë|~_Hc,ªæ ½‹
6840 +yŒ
6841 7ãB1´ñŠ¯¶ì~j-CJa¯´:©ï¿¥ÀECj(ã5NJ5-ëÕ[â*ÖN2ÖCF©žP×ðèVM? kC™«1oçzâðE‡¾¼åöžý,peâ…Ü–c)“¥nµ¥Ý'Édüƒqõ‘
6842 rÏ,©mê×õ´ïqӨʝ
6843 :Üõ=k‡†e_=µ>pì~—ÈÜR1ç—™µJÛ>“­WœÔR¼H·”³–ý±–¨kÆ>¿Ã›jc@Æï X\–ª¼+}SdW¥‘ÃWË­ç:Ò«â¯|ÿ,ÌhçQVþ#TífîRùboà²×òN¿¦®ÙÇc{¹ìQÕ´£EC]7”ªµu¨–ÈÔµ_ÌcŠ¥Ïä_z·O:èTšZõ1^… 4c´îìÒ u+æDìBm<Ó,ºõl†m]ëV›tÝJ3Y ŵvlÙ»tÐx¹¦H…ËwйŠö콪&ç§ò¿ÿÄ!1!AQða qÁÿÚ?!lÿäAÚmB‘ª0¥W+Œ+€®F…¤‘‡;O’Íø¯\j¢$Ô2XP„û†€| )lÔlHÉvâÛº#_øðÄfjÊÞzt£©TÔA‹ 'ÿ]6çÌÿê܊"•æ-ÓM8!®; ²çæs‹]¹BóâiyLyoc>?¨ò4ÛLy{m¶ßVÆ¿?ßcM¶yli1£±®O¡tL0†œ\t炎†"©Õ¬ó_½½óh n2¿ ÒÀ¹[s$@™8ÿäÔ
6844 F –ê¬{{5t>‘ºÄ Ò4š¦
6845 +Ú/‡3ÞÚãFІÏ
6846 +\»•XCó2§[¹ˆdœMÝd­(ƒ•àçáà
6847 +yLyoc>?¨ò4ÛLy{m¶ßVƞÿ>ƛlòØÓcM9“²ZK<é,v½ù2Ì>»ÃtEc†Ð]üƒ¡ôxbÅç#Ì4 Ç:xÒ78چ²öÿ„_à¡œµÈݨNRùdÃÈI¢cå¶R Ùeƒê‡3µa9TÚý DHçD˜,‘v€o
6848 +aÿàe«ÊcË{ñýG‘§–ÓFžÆ›m·Õ±§¿Ï±¦Û<¶4ƘÖck±ßZ7?÷"ò$µ{UÙE+yêí5Ð&ü_¿ž]˜Põ²Æˆ=¡‰Ã4|±žê’ GŠŽ4ЉT’ß\–gN;Óó ¨*æŬÞ[@<×aSÑsÆ`Dì×ÉwçÛîQÖ
6849 +XIÓa‘\úçV½cólô¹iyLyoc>?¨ò4òÚcÈÓØÓm¶ú¶4÷ùö4Ûg–ƘÓm¶\„]SÊ.9ϛ ”•.8x?h€¹;B*5Òp¤³eµ=­–Jêˊ¢W×I/€öªgo&P‰"60^E¿8Éé <î¦h¯"dfçܕ£çÿ>7ƒÂ ßg´+=².Rb A=ÚJ)=‡“›‘ú0NË!¸´£=hm-œ!‡«‹2µœßÂãE¤‘HÞ
6850 +)iäi弦<=6Ûo«cOŸcM¶yli1¯ÿÚ   ¿FÀ"@ ª„B! L(BA(œj”뻀 PU@Â!ˆP&! ”NQíc@„(* aˆD(
6851 +J'Xb „BP0ˆD" ‡‚ H%à ÷¼lL'
6852 +¨D"
6853 +ÃÁ$‰ÇÿÄ)!1AQqÁ ±0a¡@‘ðÑáñÿÚ?`¥sK•©Ð4C9#Ãùºr`‰ji‰^̳¤ h I‚8ÉG"C!„‘%Y<@‚NÄh œC£†Jä.º¨A’–ÄjÎ(OîÂ)@4dG;&™Û(–j½@4“"?فúƒÏ5E 5‚Eeû쳸2yãá´ß‡¡k¿fO<|9<ñ‹
6854 ]¹<ñKÓü ͹zØìúÆoâöLªú¯¯µþ›3)ù%Zrc¥–¦D§¨J°T`ª“5Jä
6855 a¯o_â’Â3„ã™wª€„±[ƒè(\‰"ÔB ÌñR¹š¹q¦@„«KD¹L. ÉV­yLÄjL¯î¿š¹Áƒþýf쳸2yãá´ß‡¡k¿fO<|9<ñ‹
6856 ]¹<ñ‡ñþy·/[ŸXÍãœ8–ŠáÎ]fšÙ6Â`B&!‚\Ô$iAaF± –  sÉÄÀ°x‚£Rè!Œ±GäóúˆÜºÉÆçh¬’€¤ ’¤d{RI7kJ…ˆf„‹MU Û,µD̀€J‹†ÍºiGr¢€ÌRÇq®¸òÀ¾WþïÚöÎàÉ珆Ó~…®ü™<ñðäóÆ,6=väóÆÇâ  ÷^mËÖÇgÖ3xç!\µÂ)/l=…Øh„(GÒt2z N ²˜cI.è"ªÎa%lÂT²ßZÀ
6857 +¤ÁÛA”ƒ™` 
6858 _û{ÀÉÌÖx0È‚¤4rʎŠV•~þ«h„×
6859 Ρªg %¥ŸS8h€Ô P~£§þø×ñ裨“[_ë®_<|6›ðô-wàìÉ珇'ž1a±ë·'ž0þ?c³ëºón^¶;>±›Ç=lìõç H“JÅN«)"¡a‡)RH%©" ï)[€*:Äʗ¬Š…)lEl
6860 +j(U5p´
6861 ¨Œ‰hÌ CSF@QzÀ$B±FLXº’µk‚æÿæš~ê_
6862 +0‘(„È «1+VÓ
6863 +@ °)2 HDBX†LÊ,YtaeV²II€ $³X†Ã¨¢àJ’ã¦9("aa”°Èi›) FVlR(àB¬ì‘ç ¡“u:¦¡a€’
6864 +:*”(> Møz»ðvdóÇÓÏ°Øõۓψ±ÙõÝy·/[ŸXÍãœÿÄ&!1Aq±Á Qa¡ð‘ÑáÿÚ?h/Æ@?üäÂ"e³„UƒS eè%@‚<‘k'à `Ÿ¯Re©91dA²
6865 +]9O«ÙáHDV`ÓfñDŸêa 2#êù‰”AAT(î#nÐjà‡ª"´‘%kFbfšãG¾¼ Þ¸2´ß§;÷¼>V›ôøõÁð¼Û·;ž2þ½âónÜÿ³ï%ï\ž›vãG¾±ÂáÎ÷®L­7éÎÓ~œ¬vxðÑﯞ2lìãûçtԆeëWAsìµ5 -°D՜‚€*AtJbVifFsN÷PlßõS(3,
6866 ´Â 0ƒL=1ª!·ë.…þ°W$ƒ«p&èLĸ®K¬ÁEQSa5J6™ P…#öhVî¸ü0øÁõûe~ëúð/zàÊÓ~œïÞðùZoÓà_×ÂónÜìvxËú÷‹Í»s¿×nW½rx^mۍúÃøæ^õɕ¦ý9ÚoӕŽÏ=õãc³ÆMøžkÈpî¤gøÞÆ_9&yIVyD9Ð_±?®@†…
6867 ”©¦].w¤ j‚þÙké&KÅAd$"*Úÿ¡”ˆ˜3D.XI1v> w* I
6868 +¥5hçuЯÁZ7¬íü2{£ß^ï\ZoӝûÞ+Mú| úàø^m۝ŽÏ^ñy·nw›vå{×'…æݸÑï¬?Žeï\™Zoӝ¦ý9Xìñá£ß^6;<dÔOœªëä "à˜âYFÓ]´”W£‡C£J/DœÙ÷ çJ °¶øz@|¿5uk÷“ý'¦#
6869 +‰¢$³Oü„Qò…×ý 'ΘUç_î)l0$’Ä÷ôWó
6870  ˜úü?1£ß^Ïí2´ß§;÷¼>V›ôøõÁð¼Û·;ž2þ½âónÜï6íÊ÷®O Í»q£ßXËÞ¹2´ß§;Múr±ÙãÃG¾¼lvxð°Øã+Í»r±Ùã
6871 +¥I1%5¸FµJS>
6872 +•)6¨jŠ8k²
6873 LT L¡+YpJL£M@ ŠV«“$¢…öd$ $A`SôÎÍ`5jAš‰"±M)I™•Åò´×óâ¿æp"À}Ø̆.”“t*Jª’C2°@¯c]šbs%BȶH†CADVK.
6874 +  …ˆØȊÅP#ÀÔ7#R+A€ &¬ª›TKb”t¤5IPE `Á2”€
6875 +
6876 +
6877 +Ä@ÃÆÓ~Ÿþ¸>›vçc³Æ_×¼^m۝æݹ^õÉáy·n4{ëã™{×&V›ôçi¿NV;<xh÷׍ŽÏÿÄ%1q±Á!Aa¡ðQ ‘ÑÿÚ?&š˜•V–BD>ç»I'ÄS´ˆ)Bڍ"œÂcán±pŽƒÇçáú¢)æX”Ãõ|6òhäp½²@%„ÕÄ°Øzr)U¸Ÿ‚¿ÿ*Ù:‹ëØ X–I´j¡OÃ}{ì7­“HÍÖËDύMÖËÍ֊™Z?‡æ¦ëeLÇ­ áÕàáÕ¢gƦëeAëM֊™[AëÁëÁë};ò¡—·“—u3¶g¾•3¶“—w“—vúwåMÖËÉ˺™[I˺™[I˺ƒ‡V4ŠÆBì/#À„¾=^fME¶ À¬§Ó!ˆ÷1ùÏ›ƒ«Œô:©¶ŸñÌ¡…6šNµUÂÌÖi ÁàV·kR7zch_‹ôÔç­\%Ü5À9‡¶0ûœ¸}-€¼š§ lTÊ!9¸NH>ÿ J¹™qʼK€²ªn¶Z&|jn¶^n´TÌzÑü?57[*f=m¯­>57[*Zn´TÌzÚ^^[éߕ ½¼œ»©˜õ·ì:ÔÌzÚN]ÞN]Ûéߕ7[/'.êf=m'.êf=m'.êYÚ ¤† zU]K—X¬Ty~ˆhjDž\¬ò!c¶ÙY‘ã”ó̔š `ÁÉT­µȽð¯òáAÉýw,À¸3¥’5SèÄ;”}þžiÇDtI]
6878 +ÄÜdR+¾ÿðY6â‹u²Ñ3ãSu²óu¢¦c֏áù©ºÙS1ëi?¾ï­>57[*Zn´TÌzÚ^^[éߕ ½¼œ»©˜õ·ì:ÔÌzÚN]ÞN]Ûéߕ7[/'.êf=m'.êf=m'.ê[žÁ¬+WWŸÀÌâڊEek—ÛÚÃ?žë‚må{0_7꼄b*þ
6879 ‰C;2~ü…wP`k”£ÿR«&Vq¥,ï‹è þù¯òÿ°ÿyúÿ
6880 *í Ê/ÒÄè*¨
6881 9P`¼G}‚/'”@&.Ct‚ÀWÏEÌ­ô ËË줛­Ú&ö¦ëeäëEO¯Z?‡æ¦ëeLÇ­¦ëeàáÕ¢gƦëeAëM֊™[AëÁëÁë};ò¡—·“—u3¶ý‡Z™[IË»ÉË»};ò¦ëeäåÝLÇ­¤åÝLÇ­¤åÝAëÌÇ­æcÖ̹w\VŸ{p;Ii`À>’Pδ]~¤ÃÔ𢂩ÊD…Îø
6882 ++➔éN#˭⋆ D˜Õºüz©Ãð(aÒaYÞÅ÷ ¶#tnú¯«x
6883 2±\7HÚõ:ƒzß"Rù`òN:Ä1*µóýžv©Z1
6884 +°‚pY‹‹N}EµS4aNÙ'îfsu²¦cÖÓu²ò}Ú&|jn¶T:´Ýh©˜õ´:¼:¼:·Ó¿*{y9wS1ëoØu©˜õ´œ»¼œ»·Ó¿*n¶^N]ÔÌzÚN]ÔÌzÚN]Ô:·ÿÙ
6885 \ Pas de fin de ligne à la fin du fichier
6886 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/js/navigation2.js smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/js/navigation2.js
6887 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/js/navigation2.js 2020-04-08 23:43:15.000000000 +0400
6888 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/js/navigation2.js 1970-01-01 04:00:00.000000000 +0400
6889 @@ -1,5 +0,0 @@
6890 -
6891 - //This swap the class of the selected item. (navigation2 to be done)
6892 -// function swapClass() {
6893 -// function swapClasses() {
6894 - // End script hiding -->
6895 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_tape_configure.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_tape_configure.html.ep
6896 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_tape_configure.html.ep 1970-01-01 04:00:00.000000000 +0400
6897 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_tape_configure.html.ep 2020-03-29 17:15:05.000000000 +0400
6898 @@ -0,0 +1,80 @@
6899 +% layout 'default', title => "Sme server 2 - backup", share_dir => './';
6900 +
6901 +% content_for 'module' => begin
6902 +
6903 +<div id="module">
6904 + % if ($config->{debug} == 1) {
6905 + <p>
6906 + %= dumper $c->current_route
6907 + %= dumper $bac_datas
6908 + </p>
6909 + % }
6910 +
6911 + <h1><%= $title%></h1>
6912 +
6913 + <h2>
6914 + %=l 'bac_ENABLE_DISABLE_TAPE'
6915 + </h2><br>
6916 +
6917 + %= $c->render_to_string(inline => (l 'bac_TAPE_CONFIG_DESC'))
6918 +
6919 + %= form_for '/backupd' => (method => 'POST') => begin
6920 +
6921 + <p>
6922 + <span class=label>
6923 + %=l 'bac_ENABLE_TAPE_BACKUP'
6924 + </span><span class=data>
6925 + % if ( $bac_datas->{status} eq 'checked' ) {
6926 + <input type='checkbox' name='Tapebackup' checked >
6927 + %} else {
6928 + %= check_box 'Tapebackup'
6929 + %}
6930 + </span>
6931 + </p>
6932 +
6933 +
6934 + <p>
6935 + <span class=label>
6936 + %=l 'bac_TAPE_BACKUP_TIME'
6937 + </span><span class=data>
6938 + % param 'BackupHour' => $bac_datas->{backupHour} unless param 'BackupHour';
6939 + %= text_field 'BackupHour', size => '2'
6940 + % param 'BackupMin' => $bac_datas->{backupMin} unless param 'BackupMin';
6941 + %= text_field 'BackupMin', size => '2'
6942 + </span>
6943 + <!--span class=label-->
6944 + %=l 'AM/PM:'
6945 + <!--/span--><span class=data>
6946 + % param 'BackupAMPM' => $bac_datas->{backupAMPM} unless param 'BackupAMPM';
6947 + %= select_field 'BackupAMPM' => ['AM', 'PM'], class => 'input'
6948 + </span>
6949 + </p>
6950 +
6951 + <p>
6952 + <span class=label>
6953 + %=l 'bac_LOAD_TAPE_REMINDER_TIME'
6954 + </span><span class=data>
6955 + % param 'ReminderHour' => $bac_datas->{reminderHour} unless param 'ReminderHour';
6956 + %= text_field 'ReminderHour', size => '2'
6957 + % param 'ReminderMin' => $bac_datas->{reminderMin} unless param 'ReminderMin';
6958 + %= text_field 'ReminderMin', size => '2'
6959 + </span>
6960 + <!--span class=label-->
6961 + %=l 'AM/PM:'
6962 + <!--/span--><span class=data>
6963 + % param 'ReminderAMPM' => $bac_datas->{reminderAMPM} unless param 'ReminderAMPM';
6964 + %= select_field 'ReminderAMPM' => ['AM', 'PM'], class => 'input'
6965 + </span>
6966 + </p>
6967 +
6968 + <br>
6969 +
6970 + %= hidden_field 'Function' => $bac_datas->{'function'}
6971 +
6972 + %= submit_button $c->l('bac_UPDATE_CONF'), class => 'action'
6973 +
6974 + % end
6975 +
6976 +</div>
6977 +
6978 +% end
6979 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_tape_restore.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_tape_restore.html.ep
6980 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_tape_restore.html.ep 1970-01-01 04:00:00.000000000 +0400
6981 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_tape_restore.html.ep 2020-03-29 17:14:55.000000000 +0400
6982 @@ -0,0 +1,33 @@
6983 +% layout 'default', title => "Sme server 2 - backup", share_dir => './';
6984 +
6985 +% content_for 'module' => begin
6986 +
6987 +<div id="module">
6988 + % if ($config->{debug} == 1) {
6989 + <p>
6990 + %= dumper $c->current_route
6991 + %= dumper $bac_datas
6992 + </p>
6993 + % }
6994 +
6995 + <h1><%= $title%></h1>
6996 +
6997 + %= form_for '/backupd' => (method => 'POST') => begin
6998 +
6999 + <h2>
7000 + %=l 'bac_RESTORE_CONF_FROM_TAPE'
7001 + </h2>
7002 +
7003 + %= $c->render_to_string(inline => (l 'bac_RESTORE_CONF_FROM_TAPE_DESC'))
7004 +
7005 + <br>
7006 +
7007 + %= hidden_field 'Function' => $bac_datas->{'function'}
7008 +
7009 + %= submit_button $c->l('bac_RESTORE_FROM_TAPE'), class => 'action'
7010 +
7011 + % end
7012 +
7013 +</div>
7014 +
7015 +% end
7016 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/backup.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/backup.html.ep
7017 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/backup.html.ep 1970-01-01 04:00:00.000000000 +0400
7018 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/backup.html.ep 2020-04-10 00:12:59.448000000 +0400
7019 @@ -0,0 +1,69 @@
7020 +% layout 'default', title => "Sme server 2 - backup";
7021 +
7022 +% content_for 'module' => begin
7023 +
7024 +<div id="module">
7025 + % if ($config->{debug} == 1) {
7026 + <p>
7027 + %= dumper $c->current_route
7028 + %= dumper $bac_datas
7029 + </p>
7030 + % }
7031 +
7032 + <h1><%= $title%></h1>
7033 +
7034 + <br>Still incomplete click here for previous version -->
7035 + <a href="/server-manager/cgi-bin/backup" target='_blank'><b>(Previous Backup version)</b></a>
7036 + <br>
7037 +
7038 + <%= $c->render_to_string(inline => (l 'bac_BACKUP_DESC_DAR', $bac_datas->{module},
7039 + $bac_datas->{dumpsize}, $bac_datas->{tarsize})) %>
7040 +
7041 + %= form_for '/backup' => (method => 'POST') => begin
7042 +
7043 + <h2>
7044 + %=l 'bac_BACKUP_CONFIG_STATUS'
7045 + </h2>
7046 +
7047 + <p><span class=label>
7048 + %=l 'bac_TAPE_BACKUPS',
7049 + </span><span class=data2>
7050 + %= $bac_datas->{'backupStatus'}.'.'
7051 + </span>
7052 + % if ( $bac_datas->{'backupStatus'} eq 'enabled' ) {
7053 + %= $c->l('bac_BACKUPS_RUN_AT')
7054 + <span class=data>
7055 + %= $bac_datas->{'backupTime'}
7056 + </span>
7057 + %= $c->l('bac_REMINDER_MESSAGE_AT')
7058 + <span class=data>
7059 + %= $bac_datas->{'reminderTime'}
7060 + </span>
7061 + %}
7062 + <p><span class=label>
7063 + %=l 'bac_WORKSTN_BACKUPS',
7064 + </span><span class=data2>
7065 + %= $bac_datas->{'backupwkStatus'}.'.'
7066 + </span>
7067 + % if ( $bac_datas->{'backupwkStatus'} eq 'enabled' ) {
7068 + %= $c->l('bac_WKBACKUPS_RUN_AT')
7069 + <b>
7070 + %= $bac_datas->{'backupwkTime'}
7071 + </b>
7072 + %}
7073 +
7074 + <p><span class=label>
7075 + %=l 'bac_SELECT_AN_ACTION'
7076 + </span><span class=data>
7077 + % param 'Function' => $bac_datas->{function} unless param 'Function';
7078 + %= select_field 'Function' => $c->get_function_options(), class => 'input'
7079 + </span></p>
7080 +
7081 + <br>
7082 + %= submit_button $c->l('PERFORM'), class => 'action'
7083 +
7084 + % end
7085 +
7086 +</div>
7087 +
7088 +% end
7089 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_configure.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_configure.html.ep
7090 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_configure.html.ep 1970-01-01 04:00:00.000000000 +0400
7091 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_configure.html.ep 2020-03-29 17:15:15.000000000 +0400
7092 @@ -0,0 +1,47 @@
7093 +% layout 'default', title => "Sme server 2 - backup", share_dir => './';
7094 +
7095 +% content_for 'module' => begin
7096 +
7097 +<div id="module">
7098 + % if ($config->{debug} == 1) {
7099 + <p>
7100 + %= dumper $c->current_route
7101 + %= dumper $bac_datas
7102 + </p>
7103 + % }
7104 +
7105 + <h1><%= $title%></h1>
7106 +
7107 + %= form_for '/backupd' => (method => 'POST') => begin
7108 +
7109 + <h2>
7110 + %=l 'bac_CONFIGURE_WORKSTN_BACKUP'
7111 + </h2>
7112 +
7113 + %= $c->render_to_string(inline => (l 'bac_WORKSTN_BACKUP_DESC'))
7114 +
7115 + %=l 'bac_WORKSTN_BACKUP_ENABLED'
7116 + <span class=data>
7117 + %= $bac_datas->{status}
7118 + </span><br>
7119 +
7120 + %= $c->render_to_string(inline => $c->getWorkstnBackupConfig())
7121 +
7122 + <p><h3>
7123 + %= l 'bac_WORKSTATION_BACKUP_SETCONF'
7124 + </h3><br>
7125 + <span class=label>
7126 + %=l 'bac_SELECT_VFS_TYPE'
7127 + </span><span class=data>
7128 + % param 'VFSType' => $bac_datas->{vfstype} unless param 'VFSType';
7129 + %= select_field 'VFSType' => $c->get_VFSType_options(), class => 'input'
7130 + </span></p>
7131 +
7132 + %= hidden_field 'Function' => $bac_datas->{'function'}
7133 + %= submit_button $c->l('NEXT'), class => 'action'
7134 +
7135 + % end
7136 +
7137 +</div>
7138 +
7139 +% end
7140 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_restore.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_restore.html.ep
7141 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_restore.html.ep 1970-01-01 04:00:00.000000000 +0400
7142 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_restore.html.ep 2020-03-29 17:15:32.000000000 +0400
7143 @@ -0,0 +1,31 @@
7144 +% layout 'default', title => "Sme server 2 - backup", share_dir => './';
7145 +
7146 +% content_for 'module' => begin
7147 +
7148 +<div id="module">
7149 + % if ($config->{debug} == 1) {
7150 + <p>
7151 + %= dumper $c->current_route
7152 + %= dumper $bac_datas
7153 + </p>
7154 + % }
7155 +
7156 + <h1><%= $title%></h1>
7157 +
7158 + %= form_for '/backupd' => (method => 'POST') => begin
7159 +
7160 + <h2>
7161 + %=l 'bac_RESTORE_CONF_FROM_WORKSTN'
7162 + </h2>
7163 +
7164 + %= $c->render_to_string(inline => (l 'bac_RESTORE_CONF_FROM_WORKSTN_DESC'))
7165 +
7166 + <br>
7167 + %= hidden_field 'Function' => $bac_datas->{'function'}
7168 + %= submit_button $c->l('bac_RESTORE_FROM_WORKSTN'), class => 'action'
7169 +
7170 + % end
7171 +
7172 +</div>
7173 +
7174 +% end
7175 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_sel_restore.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_sel_restore.html.ep
7176 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_sel_restore.html.ep 1970-01-01 04:00:00.000000000 +0400
7177 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_sel_restore.html.ep 2020-03-29 17:15:40.000000000 +0400
7178 @@ -0,0 +1,32 @@
7179 +% layout 'default', title => "Sme server 2 - backup", share_dir => './';
7180 +
7181 +% content_for 'module' => begin
7182 +
7183 +<div id="module">
7184 + % if ($config->{debug} == 1) {
7185 + <p>
7186 + %= dumper $c->current_route
7187 + %= dumper $bac_datas
7188 + </p>
7189 + % }
7190 +
7191 + <h1><%= $title%></h1>
7192 +
7193 + %= form_for '/backupd' => (method => 'POST') => begin
7194 +
7195 + <h2>
7196 + %=l 'bac_WORKSTN_SELECTIVE_RESTORE'
7197 + </h2>
7198 +
7199 +
7200 + %= $c->render_to_string(inline => (l 'bac_XXX_DESC'))
7201 +
7202 + <br>
7203 + %= hidden_field 'Function' => $bac_datas->{'function'}
7204 + %= submit_button $c->l('bac_RESTORE_FROM_WORKSTN'), class => 'action'
7205 +
7206 + % end
7207 +
7208 +</div>
7209 +
7210 +% end
7211 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_verify.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_verify.html.ep
7212 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_verify.html.ep 1970-01-01 04:00:00.000000000 +0400
7213 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/back_workstn_verify.html.ep 2020-03-29 17:15:24.000000000 +0400
7214 @@ -0,0 +1,31 @@
7215 +% layout 'default', title => "Sme server 2 - backup", share_dir => './';
7216 +
7217 +% content_for 'module' => begin
7218 +
7219 +<div id="module">
7220 + % if ($config->{debug} == 1) {
7221 + <p>
7222 + %= dumper $c->current_route
7223 + %= dumper $bac_datas
7224 + </p>
7225 + % }
7226 +
7227 + <h1><%= $title%></h1>
7228 +
7229 + %= form_for '/backupd' => (method => 'POST') => begin
7230 +
7231 + <h2>
7232 + %=l 'bac_VERIFY_WORKSTN_BACKUP_FILE'
7233 + </h2>
7234 +
7235 + %= $c->render_to_string(inline => (l 'bac_CONFIGURATION_TO_BE_DONE'))
7236 +
7237 + <br>
7238 + %= hidden_field 'Function' => $bac_datas->{'function'}
7239 + %= submit_button $c->l('bac_VERIFY'), class => 'action'
7240 +
7241 + % end
7242 +
7243 +</div>
7244 +
7245 +% end
7246 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/common_js.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/common_js.html.ep
7247 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/common_js.html.ep 1970-01-01 04:00:00.000000000 +0400
7248 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/common_js.html.ep 2020-03-30 11:27:12.000000000 +0400
7249 @@ -0,0 +1 @@
7250 +<script src='js/jquery.min.js' type='text/javascript'></script>
7251 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailaccess.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailaccess.html.ep
7252 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailaccess.html.ep 1970-01-01 04:00:00.000000000 +0400
7253 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailaccess.html.ep 2020-03-06 23:06:57.000000000 +0400
7254 @@ -0,0 +1,57 @@
7255 +% layout 'default', title => "Sme server 2 - emailaccess", share_dir => './';
7256 +
7257 +% content_for 'module' => begin
7258 +<div id="module">
7259 +
7260 + % if ($config->{debug} == 1) {
7261 + <p>
7262 + %= dumper $c->current_route
7263 + %= dumper $mai_datas
7264 + </p>
7265 + % }
7266 +
7267 + <h1><%= $title%></h1>
7268 +
7269 + % if ( $notif ) {
7270 + <br><div class=sme-error>
7271 + %= $notif
7272 + </div>
7273 + %}
7274 +
7275 + %= form_for 'emailsettingd' => (method => 'POST') => begin
7276 +
7277 + %=l 'mai_DESC_POP_ACCESS_CONTROL'
7278 +
7279 + <p><span class=label>
7280 + %=l 'mai_LABEL_POP_ACCESS_CONTROL'
7281 + </span><span class=input>
7282 + % param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess';
7283 + %= select_field 'POPAccess' => $c->get_pop_opt(), class => 'input'
7284 + </span></p>
7285 +
7286 + %=l 'mai_DESC_IMAP_ACCESS_CONTROL'
7287 +
7288 + <p><span class=label>
7289 + %=l 'mai_LABEL_IMAP_ACCESS_CONTROL'
7290 + </span><span class=input>
7291 + % param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess';
7292 + %= select_field 'IMAPAccess' => $c->get_imap_opt(), class => 'input'
7293 + </span></p>
7294 +
7295 + %=l 'mai_DESC_WEBMAIL'
7296 +
7297 + <p><span class=label>
7298 + %=l 'mai_LABEL_WEBMAIL'
7299 + </span><span class=input>
7300 + % param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail';
7301 + %= select_field 'WebMail' => $c->get_webmail_opt(), class => 'input'
7302 + </span></p>
7303 +
7304 + % my $btn = l('SAVE');
7305 + %= submit_button "$btn", class => 'action'
7306 +
7307 + %= hidden_field 'trt' => 'ACC'
7308 + % end
7309 +
7310 +</div>
7311 +%end
7312 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emaildeliver.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emaildeliver.html.ep
7313 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emaildeliver.html.ep 1970-01-01 04:00:00.000000000 +0400
7314 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emaildeliver.html.ep 2020-03-06 23:06:43.000000000 +0400
7315 @@ -0,0 +1,92 @@
7316 +% layout 'default', title => "Sme server 2 - emaildeliver", share_dir => './';
7317 +
7318 +% content_for 'module' => begin
7319 +<div id="module">
7320 +
7321 + % if ($config->{debug} == 1) {
7322 + <p>
7323 + %= dumper $c->current_route
7324 + %= dumper $mai_datas
7325 + </p>
7326 + % }
7327 +
7328 + <h1><%= $title%></h1>
7329 +
7330 + % if ( $notif ) {
7331 + <br><div class=sme-error>
7332 + %= $notif
7333 + </div>
7334 + %}
7335 +
7336 + %= form_for 'emailsettingd' => (method => 'POST') => begin
7337 +
7338 + <h2>
7339 + %=l 'mai_TITLE_UNKNOWN'
7340 + </h2>
7341 +
7342 + %=l 'mai_DESC_UNKNOWN'
7343 +
7344 + <p><span class=label>
7345 + %=l 'mai_LABEL_UNKNOWN'
7346 + </span><span class=input>
7347 + % param 'EmailUnknownUser' => $mai_datas->{emailunknownuser} unless param 'EmailUnknownUser';
7348 + %= select_field 'EmailUnknownUser' => $c->get_emailunknownuser_opt(), class => 'input'
7349 + </span></p>
7350 +
7351 + <hr class='menubar' />
7352 + <h2>
7353 + %=l 'mai_TITLE_DELEGATE'
7354 + </h2>
7355 +
7356 + %=l 'mai_DESC_DELEGATE'
7357 +
7358 + <p><span class=label>
7359 + %=l 'mai_LABEL_DELEGATE'
7360 + </span><span class=input>
7361 + % param 'DelegateMailServer' => $mai_datas->{delegatemailserver} unless param 'DelegateMailServer';
7362 + %= text_field 'DelegateMailServer', class => 'input'
7363 + </span></p>
7364 +
7365 + <hr class='sectionbar' />
7366 + <h2>
7367 + %=l 'mai_TITLE_SMARTHOST'
7368 + </h2>
7369 +
7370 + %=l 'mai_DESC_SMARTHOST'
7371 +
7372 + <p><span class=label>
7373 + %=l 'mai_LABEL_SMARTHOST'
7374 + </span><span class=input>
7375 + % param 'SMTPSmartHost' => $mai_datas->{smtpsmarthost} unless param 'SMTPSmartHost';
7376 + %= text_field 'SMTPSmartHost', class => 'input'
7377 + </span></p>
7378 +
7379 + <p><span class=label>
7380 + %=l 'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS'
7381 + </span><span class=input>
7382 + % param 'SMTPAUTHPROXY_status' => $mai_datas->{smtpauthproxystatus} unless param 'SMTPAUTHPROXY_status';
7383 + %= select_field 'SMTPAUTHPROXY_status' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'
7384 + </span></p>
7385 +
7386 + <p><span class=label>
7387 + %=l 'mai_LABEL_SMARTHOST_SMTPAUTH_USERID'
7388 + </span><span class=input>
7389 + % param 'SMTPAUTHPROXY_Userid' => $mai_datas->{smtpauthproxyuserid} unless param 'SMTPAUTHPROXY_Userid';
7390 + %= text_field 'SMTPAUTHPROXY_Userid', class => 'input'
7391 + </span></p>
7392 +
7393 + <p><span class=label>
7394 + %=l 'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD'
7395 + </span><span class=input>
7396 + % param 'SMTPAUTHPROXY_Passwd' => $mai_datas->{smtpauthproxypassword} unless param 'SMTPAUTHPROXY_Passwd';
7397 + %= password_field 'SMTPAUTHPROXY_Passwd', class => 'input'
7398 + </span></p>
7399 +
7400 + % my $btn = l('SAVE');
7401 + %= submit_button "$btn", class => 'action'
7402 +
7403 + %= hidden_field 'trt' => 'DEL'
7404 + % end
7405 +
7406 +</div>
7407 +%end
7408 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailfilter.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailfilter.html.ep
7409 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailfilter.html.ep 1970-01-01 04:00:00.000000000 +0400
7410 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailfilter.html.ep 2020-03-06 23:06:27.000000000 +0400
7411 @@ -0,0 +1,101 @@
7412 +% layout 'default', title => "Sme server 2 - emailfilter", share_dir => './';
7413 +
7414 +% content_for 'module' => begin
7415 +<div id="module">
7416 +
7417 + % if ($config->{debug} == 1) {
7418 + <p>
7419 + %= dumper $c->current_route
7420 + %= dumper $mai_datas
7421 + </p>
7422 + % }
7423 +
7424 + <h1><%= $title%></h1>
7425 +
7426 + % if ( $notif ) {
7427 + <br><div class=sme-error>
7428 + %= $notif
7429 + </div>
7430 + %}
7431 +
7432 + %= form_for 'emailsettingd' => (method => 'POST') => begin
7433 +
7434 + %=l 'mai_DESC_VIRUS_SCAN'
7435 +
7436 + <p><span class=label>
7437 + %=l 'mai_LABEL_VIRUS_SCAN'
7438 + </span><span class=input>
7439 + % param 'VirusStatus' => $mai_datas->{virusstatus} unless param 'VirusStatus';
7440 + %= select_field 'VirusStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
7441 + </span><br></p>
7442 +
7443 + %=l 'mai_DESC_SPAM_SCAN'
7444 +
7445 + <p><span class=label>
7446 + %=l 'mai_LABEL_SPAM_SCAN'
7447 + </span><span class=input>
7448 + % param 'SpamStatus' => $mai_datas->{spamstatus} unless param 'SpamStatus';
7449 + %= select_field 'SpamStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
7450 + </span></p>
7451 +
7452 + <p><span class=label>
7453 + %=l 'mai_LABEL_SPAM_SENSITIVITY'
7454 + </span><span class=input>
7455 + % param 'SpamSensitivity' => $mai_datas->{spamsensitivity} unless param 'SpamSensitivity';
7456 + %= select_field 'SpamSensitivity' => $c->get_spam_sensitivity_opt(), class => 'input'
7457 + </span></p>
7458 +
7459 + <p><span class=label>
7460 + %=l 'mai_LABEL_SPAM_TAGLEVEL'
7461 + </span><span class=input>
7462 + % param 'SpamTagLevel' => $mai_datas->{spamtaglevel} unless param 'SpamTagLevel';
7463 + %= select_field 'SpamTagLevel' => $c->get_spam_level_options(), class => 'input'
7464 + </span></p>
7465 +
7466 + <p><span class=label>
7467 + %=l 'mai_LABEL_SPAM_REJECTLEVEL'
7468 + </span><span class=input>
7469 + % param 'SpamRejectLevel' => $mai_datas->{spamrejectlevel} unless param 'SpamRejectLevel';
7470 + %= select_field 'SpamRejectLevel' => $c->get_spam_level_options(), class => 'input'
7471 + </span></p>
7472 +
7473 + <p><span class=label>
7474 + %=l 'mai_LABEL_SORTSPAM'
7475 + </span><span class=input>
7476 + % param 'SpamSortSpam' => $mai_datas->{spamsortspam} unless param 'SpamSortSpam';
7477 + %= select_field 'SpamSortSpam' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
7478 + </span></p>
7479 +
7480 + %=l 'mai_DESC_SPAM_SUBJECT'
7481 +
7482 + <p><span class=label>
7483 + %=l 'mai_LABEL_SPAM_SUBJECTTAG'
7484 + </span><span class=input>
7485 + % param 'SpamSubjectTag' => $mai_datas->{spamsubjecttag} unless param 'SpamSubjectTag';
7486 + %= select_field 'SpamSubjectTag' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input'
7487 + </span></p>
7488 +
7489 + <p><span class=label>
7490 + %=l 'mai_LABEL_SPAM_SUBJECT'
7491 + </span><span class=input>
7492 + % param 'SpamSubject' => $mai_datas->{spamsubject} unless param 'SpamSubject';
7493 + %= text_field 'SpamSubject' => class => 'input'
7494 + </span></p>
7495 +
7496 + %=l 'mai_DESC_BLOCK_EXECUTABLE_CONTENT'
7497 +
7498 + <p><span class=label>
7499 + %=l 'mai_LABEL_CONTENT_TO_BLOCK'
7500 + </span><span class=input>
7501 + % param 'BlockExecutableContent' => $c->get_patterns_current_opt() unless param 'BlockExecutableContent';
7502 + %= select_field 'BlockExecutableContent' => $c->get_patterns_opt(), class => 'input', multiple => "1"
7503 + </span></p>
7504 +
7505 + % my $btn = l('SAVE');
7506 + %= submit_button "$btn", class => 'action'
7507 +
7508 + %= hidden_field 'trt' => 'FIL'
7509 + % end
7510 +
7511 +</div>
7512 +%end
7513 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailreceive.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailreceive.html.ep
7514 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailreceive.html.ep 1970-01-01 04:00:00.000000000 +0400
7515 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailreceive.html.ep 2020-03-06 23:06:08.000000000 +0400
7516 @@ -0,0 +1,113 @@
7517 +% layout 'default', title => "Sme server 2 - emailreceive", share_dir => './';
7518 +
7519 +% content_for 'module' => begin
7520 +<div id="module">
7521 +
7522 + % if ($config->{debug} == 1) {
7523 + <p>
7524 + %= dumper $c->current_route
7525 + %= dumper $mai_datas
7526 + </p>
7527 + % }
7528 +
7529 + <h1><%= $title%></h1>
7530 +
7531 + % if ( $notif ) {
7532 + <br><div class=sme-error>
7533 + %= $notif
7534 + </div>
7535 + %}
7536 +
7537 + %= form_for 'emailsettingd' => (method => 'POST') => begin
7538 +
7539 + %=l 'mai_DESC_MODE'
7540 +
7541 + <p><span class=label>
7542 + %=l 'mai_LABEL_MODE'
7543 + </span><span class=input>
7544 + % param 'FetchmailMethod' => $mai_datas->{fetchmailmethod} unless param 'FetchmailMethod';
7545 + %= select_field 'FetchmailMethod' => $c->get_retrieval_opt(), class => 'input'
7546 + </span></p>
7547 +
7548 + %=l 'mai_DESC_SMTP_AUTH_CONTROL'
7549 +
7550 + <p><span class=label>
7551 + %=l 'mai_LABEL_SMTP_AUTH_CONTROL'
7552 + </span><span class=input>
7553 + % param 'SMTPAuth' => $c->get_current_smtp_auth() unless param 'SMTPAuth';
7554 + %= select_field 'SMTPAuth' => $c->get_smtp_auth_opt(), class => 'input'
7555 + </span></p>
7556 +
7557 + <hr class="sectionbar" />
7558 + <h2>
7559 + %=l 'mai_TITLE_SECONDARY'
7560 + </h2>
7561 +
7562 + %=l 'mai_DESC_SECONDARY'
7563 +
7564 + <p><span class=label>
7565 + %=l 'mai_LABEL_SECONDARY'
7566 + </span><span class=input>
7567 + % param 'SecondaryMailServer' => $mai_datas->{secondarymailserver} unless param 'SecondaryMailServer';
7568 + %= text_field 'SecondaryMailServer', class => 'input'
7569 + </span></p>
7570 +
7571 + %=l 'mai_DESC_FETCH_PERIOD'
7572 +
7573 + <p><span class=label>
7574 + %=l 'mai_LABEL_FETCH_PERIOD'
7575 + </span><span class=input>
7576 + % param 'FreqOffice' => $mai_datas->{freqoffice} unless param 'FreqOffice';
7577 + %= select_field 'FreqOffice' => $c->fetchmail_freq(), class => 'input'
7578 + </span></p>
7579 +
7580 + <p><span class=label>
7581 + %=l 'mai_LABEL_FETCH_PERIOD_NIGHTS'
7582 + </span><span class=input>
7583 + % param 'FreqOutside' => $mai_datas->{freqoutside} unless param 'FreqOutside';
7584 + %= select_field 'FreqOutside' => $c->fetchmail_freq(), class => 'input'
7585 + </span></p>
7586 +
7587 + <p><span class=label>
7588 + %=l 'mai_LABEL_FETCH_PERIOD_WEEKENDS'
7589 + </span><span class=input>
7590 + % param 'FreqWeekend' => $mai_datas->{freqweekend} unless param 'FreqWeekend';
7591 + %= select_field 'FreqWeekend' => $c->fetchmail_freq(), class => 'input'
7592 + </span></p>
7593 +
7594 + <p><span class=label>
7595 + %=l 'mai_LABEL_POP_ACCOUNT'
7596 + </span><span class=input>
7597 + % param 'SecondaryMailAccount' => $mai_datas->{secondarymailaccount} unless param 'SecondaryMailAccount';
7598 + %= text_field 'SecondaryMailAccount', class => 'input'
7599 + </span></p>
7600 +
7601 + <p><span class=label>
7602 + %=l 'mai_LABEL_POP_PASS'
7603 + </span><span class=input>
7604 + % param 'SecondaryMailPassword' => $mai_datas->{secondarymailpassword} unless param 'SecondaryMailPassword';
7605 + %= password_field 'SecondaryMailPassword', class => 'input'
7606 + </span></p>
7607 +
7608 + <p><span class=label>
7609 + %=l 'mai_LABEL_SORT_METHOD'
7610 + </span><span class=input>
7611 + % param 'SpecifyHeader' => $mai_datas->{specifyheader} unless param 'SpecifyHeader';
7612 + %= select_field 'SpecifyHeader' => [[(l 'mai_DEFAULT') => 'off'], [(l 'mai_SPECIFY_BELOW') => 'on']], class => 'input'
7613 + </span></p>
7614 +
7615 + <p><span class=label>
7616 + %=l 'mai_LABEL_SORT_HEADER'
7617 + </span><span class=input>
7618 + % param 'SecondaryMailEnvelope' => $mai_datas->{secondarymailenvelope} unless param 'SecondaryMailEnvelope';
7619 + %= text_field 'SecondaryMailEnvelope', class => 'input'
7620 + </span></p>
7621 +
7622 + % my $btn = l('SAVE');
7623 + %= submit_button "$btn", class => 'action'
7624 +
7625 + %= hidden_field 'trt' => 'REC'
7626 + % end
7627 +
7628 +</div>
7629 +%end
7630 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailsettings.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailsettings.html.ep
7631 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailsettings.html.ep 1970-01-01 04:00:00.000000000 +0400
7632 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/emailsettings.html.ep 2020-03-06 23:05:45.000000000 +0400
7633 @@ -0,0 +1,122 @@
7634 +% layout 'default', title => "Sme server 2 - emailsettings", share_dir => './';
7635 +
7636 +% content_for 'module' => begin
7637 +<div id="module">
7638 +
7639 + % if ($config->{debug} == 1) {
7640 + <p>
7641 + %= dumper $c->current_route
7642 + %= dumper $mai_datas
7643 + </p>
7644 + % }
7645 +
7646 + <h1><%= $title%></h1>
7647 +
7648 + % if ( $notif ) {
7649 + <br><div class=sme-error>
7650 + %= $notif
7651 + </div>
7652 + %}
7653 +
7654 + %= form_for 'emailsettingd' => (method => 'GET') => begin
7655 + <p><span class=label>
7656 + %=l 'mai_LABEL_POP_ACCESS_CONTROL'
7657 + </span><span class=data2>
7658 + %= $c->get_current_pop3_access( 1 )
7659 + </span></p>
7660 +
7661 + <p><span class=label>
7662 + %=l 'mai_LABEL_IMAP_ACCESS_CONTROL'
7663 + </span><span class=data2>
7664 + %= $c->get_current_imap_access( 1 )
7665 + </span></p>
7666 +
7667 + <p><span class=label>
7668 + %=l 'mai_LABEL_WEBMAIL'
7669 + </span><span class=data2>
7670 + %= $c->get_current_webmail_status( 1 )
7671 + </span></p>
7672 +
7673 + % my $btn = l('mai_DESC_STATE_ACCESS_BUTTON');
7674 + %= submit_button "$btn", class => 'action'
7675 +
7676 + %= hidden_field 'trt' => 'ACC'
7677 + % end
7678 +
7679 + <hr class="sectionbar" />
7680 +
7681 + %= form_for 'emailsettingd' => (method => 'GET') => begin
7682 + <p><span class=label>
7683 + %=l 'mai_LABEL_VIRUS_SCAN'
7684 + </span><span class=data2>
7685 + %= $c->get_virus_status(1)
7686 + </span></p>
7687 +
7688 + <p><span class=label>
7689 + %=l 'mai_LABEL_SPAM_SCAN'
7690 + </span><span class=data2>
7691 + %= $c->get_spam_status(1)
7692 + </span></p>
7693 +
7694 + <p><span class=label>
7695 + %=l 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT'
7696 + </span><span class=data2>
7697 + %= $c->get_patterns_status(1)
7698 + </span></p>
7699 +
7700 + % my $btn = l('mai_DESC_STATE_FILTERING_BUTTON');
7701 + %= submit_button "$btn", class => 'action'
7702 +
7703 + %= hidden_field 'trt' => 'FIL'
7704 + % end
7705 +
7706 + <hr class="sectionbar" />
7707 +
7708 + %= form_for 'emailsettingd' => (method => 'GET') => begin
7709 + <p><span class=label>
7710 + %=l 'mai_LABEL_MODE'
7711 + </span><span class=data2>
7712 + %= $mai_datas->{fetchmailmethod}
7713 + </span></p>
7714 +
7715 + <p><span class=label>
7716 + %=l 'mai_LABEL_SMTP_AUTH_CONTROL'
7717 + </span><span class=data2>
7718 + %= $c->get_current_smtp_auth( 1 )
7719 + </span></p>
7720 +
7721 + % my $btn = l('mai_DESC_STATE_RECEPTION_BUTTON');
7722 + %= submit_button "$btn", class => 'action'
7723 +
7724 + %= hidden_field 'trt' => 'REC'
7725 + % end
7726 +
7727 + <hr class="sectionbar" />
7728 +
7729 + %= form_for 'emailsettingd' => (method => 'GET') => begin
7730 + <p><span class=label>
7731 + %=l 'mai_LABEL_UNKNOWN'
7732 + </span><span class=data2>
7733 + %= $c->get_emailunknownuser_status( 1 )
7734 + </span></p>
7735 +
7736 + <p><span class=label>
7737 + %=l 'mai_LABEL_DELEGATE'
7738 + </span><span class=data2>
7739 + %= $c->get_value('DelegateMailServer')
7740 + </span></p>
7741 +
7742 + <p><span class=label>
7743 + %=l 'mai_LABEL_SMARTHOST'
7744 + </span><span class=data2>
7745 + %= $c->get_value('SMTPSmartHost')
7746 + </span></p>
7747 +
7748 + % my $btn = l('mai_DESC_STATE_DELIVERY_BUTTON');
7749 + %= submit_button "$btn", class => 'action'
7750 +
7751 + %= hidden_field 'trt' => 'DEL'
7752 + % end
7753 +
7754 +</div>
7755 +%end
7756 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/groups.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/groups.html.ep
7757 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/groups.html.ep 2020-04-08 23:43:08.000000000 +0400
7758 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/groups.html.ep 2020-03-14 19:08:36.000000000 +0400
7759 @@ -12,7 +12,14 @@
7760
7761 <h1><%= $title%></h1>
7762
7763 - %= $modul
7764 + % if ( $notif ) {
7765 + <br>
7766 + <div class=sme-error>
7767 + %= $notif
7768 + </div>
7769 + %}
7770 +
7771 +
7772
7773 % if ($grp_datas->{trt} eq 'ADD') {
7774 %= include 'partials/_grp_add'
7775 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/layouts/default.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/layouts/default.html.ep
7776 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/layouts/default.html.ep 2020-04-08 23:43:15.000000000 +0400
7777 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/layouts/default.html.ep 2020-04-11 17:20:52.542000000 +0400
7778 @@ -2,26 +2,27 @@
7779 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
7780 "http://www.w3.org/TR/html4/loose.dtd">
7781 <html>
7782 -<!-- default default -->
7783 +<!-- default +jquery -->
7784 <head>
7785 <title><%= $title %></title>
7786 <link rev="made" href="mailto:bugs%40koozali.org">
7787 <meta name="copyright" content="(head.tmpl)Copyright 2003-2004 Mitel Corporation">
7788 %= stylesheet 'css/sme_core.css'
7789 %= stylesheet 'css/sme_main.css'
7790 - <!-- % = stylesheet 'css/sme_menu.css' -->
7791 + %= stylesheet 'css/sme_menu.css'
7792 %= stylesheet 'css/styles.css'
7793 - %= include 'partials/_head'
7794 + %= include 'partials/_js_imports'
7795 </head>
7796
7797 <body>
7798 % if ( not defined $c->session->{lang} ) {
7799 % SrvMngr::init_session_cgi ( $c );
7800 - <br>INIT_SESSION_CGI<br>
7801 % }
7802 <div id="header">
7803 %= include 'partials/_header'
7804 - %= include 'partials/_swt_theme'
7805 + % if (scalar @{SrvMngr::theme_list()} > 1) {
7806 + %= include 'partials/_swt_theme'
7807 + %}
7808 </div>
7809
7810 %= include 'partials/_info'
7811 @@ -31,10 +32,25 @@
7812 %= include 'partials/_navig2'
7813 </div>
7814 <div id="main" class="col-md-9">
7815 +
7816 + % if (flash 'success') {
7817 + <br><div class=success>
7818 + %= $c->render_to_string(inline => flash 'success')
7819 + </div>
7820 + % }
7821 +
7822 + % if ( flash 'error' ) {
7823 + <br><div class=sme-error>
7824 + %= $c->render_to_string(inline => flash 'error')
7825 + </div>
7826 + %}
7827 %= content 'module'
7828 %= include 'partials/_footer'
7829 </div>
7830 </div>
7831
7832 + %= include 'common_js'
7833 + %= content 'js_swapClass'
7834 +
7835 </body>
7836 </html>
7837 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_add.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_add.html.ep
7838 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_add.html.ep 2020-04-08 23:43:15.000000000 +0400
7839 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_add.html.ep 2020-03-14 20:09:29.000000000 +0400
7840 @@ -37,6 +37,7 @@
7841 %= check_box 'groupMembers' => 'admin'
7842 Administrator (admin)
7843 <br>
7844 + % my $users = $c->gen_users_list();
7845 % foreach my $key ( sort keys %$users )
7846 % {
7847 %= check_box 'groupMembers' => $key
7848 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_del.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_del.html.ep
7849 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_del.html.ep 2020-04-08 23:43:15.000000000 +0400
7850 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_del.html.ep 2020-03-14 19:06:29.000000000 +0400
7851 @@ -57,7 +57,7 @@
7852 </p>
7853
7854 %= hidden_field 'trt' => $grp_datas->{trt}
7855 - %= hidden_field 'group' => $grp_datas->{group}
7856 + %= hidden_field 'groupName' => $grp_datas->{group}
7857
7858 % end
7859
7860 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_upd.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_upd.html.ep
7861 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_upd.html.ep 2020-04-08 23:43:15.000000000 +0400
7862 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_grp_upd.html.ep 2020-03-14 20:12:35.000000000 +0400
7863 @@ -38,16 +38,17 @@
7864 % if ( $members->{'admin'} ) {
7865 %= check_box 'groupMembers', value => 'admin', checked => undef
7866 %} else {
7867 - %= check_box 'groupMembers[]' => 'admin'
7868 + %= check_box 'groupMembers' => 'admin'
7869 %}
7870 Administrator (admin)
7871 <br>
7872
7873 + % my $users = $c->gen_users_list();
7874 % foreach my $key ( sort keys %$users )
7875 % {
7876 % if ( $members->{ $key } ) {
7877 <!-- % = check_box 'groupMembers', value => $key, checked => 'checked' -->
7878 - <input type='checkbox' name='groupMembers[]' checked value='<%= $key %>'>
7879 + <input type='checkbox' name='groupMembers' checked value='<%= $key %>'>
7880 %} else {
7881 %= check_box 'groupMembers' => $key
7882 %}
7883 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_header.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_header.html.ep
7884 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_header.html.ep 2020-04-08 23:43:15.000000000 +0400
7885 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_header.html.ep 2020-04-11 19:44:27.061000000 +0400
7886 @@ -4,6 +4,7 @@
7887 <img src="images/smeserver_logo.jpg" height="40" alt="SME Server">
7888 </div>
7889 <div id="h2e12"><h4><a href="/server-manager2/">Server Manager II</a></h4>
7890 + <a href="/server-manager" target='main'>(Previous one)</a>
7891 </div>
7892 </div>
7893
7894 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_head.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_head.html.ep
7895 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_head.html.ep 2020-04-08 23:43:15.000000000 +0400
7896 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_head.html.ep 1970-01-01 04:00:00.000000000 +0400
7897 @@ -1 +0,0 @@
7898 - <!-- script type="text/javascript" src="js/navigation2.js"></script> -->
7899 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_js_imports.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_js_imports.html.ep
7900 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_js_imports.html.ep 1970-01-01 04:00:00.000000000 +0400
7901 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_js_imports.html.ep 2020-04-10 00:33:28.139000000 +0400
7902 @@ -0,0 +1,34 @@
7903 +
7904 +% content_for 'js_swapClass' => begin
7905 + %= javascript begin
7906 + (function($) {
7907 + $.fn.swapClass = function(class1, class2) {
7908 + this.each(function() {
7909 + var $elem = $(this);
7910 + if ($elem.hasClass(class1)) {
7911 + $elem.removeClass(class1).addClass(class2);
7912 + }
7913 + else if ($elem.hasClass(class2)) {
7914 + $elem.removeClass(class2).addClass(class1);
7915 + }
7916 + });
7917 + };
7918 + })(jQuery);
7919 +
7920 + $(document).ready(function() {
7921 + $('a.item-current').swapClass('item-current','item');
7922 +
7923 + var pathname = $(location).attr('pathname');
7924 +
7925 + //alert('jQuery loaded. Path searched: ' + pathname);
7926 +
7927 + var menus = $('a.item');
7928 + $.each(menus, function() {
7929 + if ( $(this).attr('href') == pathname ) {
7930 + $(this).swapClass('item', 'item-current');
7931 + // alert('menu found! ' + $(this).attr('href') + ' ' + $(this).attr('class'));
7932 + }
7933 + })
7934 + });
7935 + % end
7936 +% end
7937 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_add.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_add.html.ep
7938 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_add.html.ep 2020-04-08 23:43:19.000000000 +0400
7939 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ln_add.html.ep 2020-04-09 23:18:19.421000000 +0400
7940 @@ -42,7 +42,7 @@
7941 %=l "ln_ADD_TITLE"
7942 </h2>
7943 <p>
7944 - %=l "ln_ADD_DESC"
7945 + %= $c->render_to_string(inline => l('ln_ADD_DESC'));
7946 </p><br>
7947 <span class=label>
7948 %=l "NETWORK"
7949 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig2.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig2.html.ep
7950 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig2.html.ep 2020-04-08 23:43:15.000000000 +0400
7951 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig2.html.ep 2020-03-31 00:31:23.000000000 +0400
7952 @@ -2,24 +2,19 @@
7953 % my %nav = %{SrvMngr->getNavigation( $c->languages() )};
7954
7955 <div id='navigat2'>
7956 +% my $cc = 1;
7957 % foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})
7958 % <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) {
7959 %
7960 <div class='section'><%= $h %></div>
7961 %
7962 -% my $cc = 1;
7963 % foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) {
7964 -
7965 % my ($target, $classNew) = ( $_->{'FILENAME'} =~ m/^2\// ) ?
7966 % ('_self',' accent') :
7967 % ('main','') ;
7968 -
7969 % my $href = '/server-manager' . $_->{'FILENAME'};
7970 -
7971 <div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>'
7972 - onclick="swapClasses('sme<%= $cc %>')" id='sme<%= $cc %>'
7973 - href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div>
7974 -
7975 + id='sme<%= $cc %>' href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div>
7976 % $cc++;
7977 % }
7978
7979 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep
7980 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep 2020-04-08 23:43:15.000000000 +0400
7981 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_navig.html.ep 1970-01-01 04:00:00.000000000 +0400
7982 @@ -1,39 +0,0 @@
7983 -<!--
7984 -!! Do N O T modify this file : it is automatically generated !!
7985 --->
7986 - <div id='navigat'>
7987 -
7988 - <div class='section'> Collaboration </div>
7989 - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme1')" id='sme1' href='/server-manager/cgi-bin/useraccounts'>Users</a></div>
7990 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme2')" id='sme2' href='/server-manager2/groups'>Groups</a></div>
7991 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme3')" id='sme3' href='/server-manager2/quota'>Quotas</a></div>
7992 - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme4')" id='sme4' href='/server-manager/cgi-bin/pseudonyms'>Pseudonyms</a></div>
7993 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme5')" id='sme5' href='/server-manager2/ibays'>Information bays</a></div>
7994 - <div class='section'> Administration </div>
7995 - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme6')" id='sme6' href='/server-manager/cgi-bin/backup'>Backup or restore</a></div>
7996 - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme7')" id='sme7' href='/server-manager/cgi-bin/viewlogfiles'>View log files</a></div>
7997 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme8')" id='sme8' href='/server-manager2/qmailanalog'>Mail log file analysis</a></div>
7998 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme9')" id='sme9' href='/server-manager2/reboot'>Reboot or shutdown</a></div>
7999 - <div class='section'> Security </div>
8000 - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme10')" id='sme10' href='/server-manager/cgi-bin/remoteaccess'>Remote access</a></div>
8001 - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme11')" id='sme11' href='/server-manager/cgi-bin/localnetworks'>Local networks</a></div>
8002 - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme12')" id='sme12' href='/server-manager/cgi-bin/portforwarding'>Port forwarding</a></div>
8003 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme13')" id='sme13' href='/server-manager2/proxy'>Proxy settings</a></div>
8004 - <div class='section'> Configuration </div>
8005 - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme14')" id='sme14' href='/server-manager/cgi-bin/yum'>Software installer</a></div>
8006 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme15')" id='sme15' href='/server-manager2/datetime'>Date and time</a></div>
8007 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme16')" id='sme16' href='/server-manager2/workgroup'>Workgroup</a></div>
8008 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme17')" id='sme17' href='/server-manager2/directory'>Directory</a></div>
8009 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme18')" id='sme18' href='/server-manager2/printers'>Printers</a></div>
8010 - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme19')" id='sme19' href='/server-manager/cgi-bin/hostentries'>Hostnames and addresses</a></div>
8011 - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme20')" id='sme20' href='/server-manager/cgi-bin/domains'>Domains</a></div>
8012 - <div class='menu-cell'><a class='item' target='main' onclick="swapClasses('sme21')" id='sme21' href='/server-manager/cgi-bin/emailsettings'>E-mail</a></div>
8013 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme22')" id='sme22' href='/server-manager2/clamav'>Antivirus (ClamAV)</a></div>
8014 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme23')" id='sme23' href='/server-manager2/review'>Review configuration</a></div>
8015 - <div class='section'> Miscellaneous </div>
8016 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme24')" id='sme24' href='/server-manager2/support'>Support and licensing</a></div>
8017 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme25')" id='sme25' href='/server-manager2/starterwebsite'>Create starter web site</a></div>
8018 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme26')" id='sme26' href='/server-manager2/bugreport'>Report a bug</a></div>
8019 - <div class='section'> Unknown </div>
8020 - <div class='menu-cell'><a class='item accent' target='_self' onclick="swapClasses('sme27')" id='sme27' href='/server-manager2/wbl'>wbl</a></div>
8021 - </div>
8022 \ Pas de fin de ligne à la fin du fichier
8023 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_pf_list.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_pf_list.html.ep
8024 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_pf_list.html.ep 2020-04-08 23:43:19.000000000 +0400
8025 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_pf_list.html.ep 2020-04-09 23:51:32.271000000 +0400
8026 @@ -21,7 +21,7 @@
8027
8028
8029 %if ($ret{ret} eq "") {
8030 - %=l "pf_FIRST_PAGE_DESCRIPTION"
8031 + %= $c->render_to_string(inline => l('pf_FIRST_PAGE_DESCRIPTION'));
8032 %} elsif (index($ret{ret},"SUCCESS") != -1) {
8033 <div class='success'>
8034 <h2> Operation Status Report</h2>
8035 @@ -34,14 +34,16 @@
8036 </div>
8037 %}
8038 <br><br>
8039 - %= submit_button "$btn", class => 'action'
8040 + %= submit_button "$btn", class => 'action2'
8041 <br>
8042
8043 % if ($empty){
8044 <br>
8045 - %=l 'pf_NO_FORWARDS'
8046 + %=l 'pf_NO_FORWARDS'
8047 % } else {
8048 <br>
8049 + %=l 'pf_SHOW_FORWARDS'
8050 + <br>
8051 <table class="sme-border"><tbody>
8052 <tr>
8053 <th class='sme-border'>
8054 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_black.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_black.html.ep
8055 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_black.html.ep 2020-04-08 23:43:08.000000000 +0400
8056 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_black.html.ep 1970-01-01 04:00:00.000000000 +0400
8057 @@ -1,55 +0,0 @@
8058 -<div>
8059 -
8060 - <% my $btn = l('SAVE'); %>
8061 - %= form_for 'wbl2' => (method => 'POST') => begin
8062 -
8063 - %= hidden_field 'trt' => $wbl_datas->{trt}
8064 -
8065 - %=l 'wbl_BLACK_TITLE'
8066 -
8067 - <p>
8068 - %=l 'wbl_BADHELO_DESCRIPTION'
8069 - <br><br>
8070 - <span class=label>
8071 - %=l 'wbl_BADHELO_LABEL'
8072 - </span><span class=data2>
8073 - %= text_area 'badhelo' => (cols => 40) => begin
8074 - % for (@{ stash('badhelo') }) {
8075 - %= $_
8076 - %}
8077 - %end
8078 - </span>
8079 - </p>
8080 -<br>
8081 - <p>
8082 - %=l 'wbl_BADMAILFROM_DESCRIPTION'
8083 - <br><br>
8084 - <span class=label>
8085 - %=l 'wbl_BADMAILFROM_LABEL'
8086 - </span><span class=data2>
8087 - %= text_area 'badmailfrom' => (cols => 40) => begin
8088 - % for (@{ stash('badmailfrom') }) {
8089 - %= $_
8090 - % }
8091 - %end
8092 - </span>
8093 - </p>
8094 -<br>
8095 - <p>
8096 - %=l 'wbl_BLACKLISTFROM_DESCRIPTION'
8097 - <br><br>
8098 - <span class=label>
8099 - %=l 'wbl_BLACKLISTFROM_LABEL'
8100 - </span><span class=data2>
8101 - %= text_area 'blacklistfrom' => (cols => 40) => begin
8102 - % for (@{ stash('blacklistfrom') }) {
8103 - %= $_
8104 - % }
8105 - %end
8106 - </span>
8107 - </p>
8108 -<br>
8109 - %= submit_button "$btn", class => 'action'
8110 - %end
8111 -
8112 -</div>
8113 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_choice.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_choice.html.ep
8114 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_choice.html.ep 2020-04-08 23:43:08.000000000 +0400
8115 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_choice.html.ep 1970-01-01 04:00:00.000000000 +0400
8116 @@ -1,29 +0,0 @@
8117 -<div id='wbl_choice'>
8118 -
8119 - <% my $btn = l('NEXT'); %>
8120 - %= form_for 'wbl' => (method => 'POST') => begin
8121 - <p>
8122 - <span class=label>
8123 - %=l 'wbl_RBL_LIST_DESCRIPTION'
8124 - </span>
8125 - <br>
8126 -
8127 - <span class=label>
8128 - %=l 'wbl_BLACK_LIST_DESCRIPTION'
8129 - </span><span class=data>
8130 - % param 'list' => $wbl_datas->{list} unless param 'list';
8131 - %= select_field 'list' => [ @{ stash('list') }], class => 'input'
8132 - </span>
8133 - <br>
8134 -
8135 - <span class=label>
8136 - %=l 'wbl_WHITE_LIST_DESCRIPTION'
8137 - </span>
8138 - </p>
8139 -
8140 - <p>
8141 - <br>
8142 - %= submit_button "$btn", class => 'action'
8143 - </p>
8144 - %end
8145 -</div>
8146 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_rbl.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_rbl.html.ep
8147 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_rbl.html.ep 2020-04-08 23:43:08.000000000 +0400
8148 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_rbl.html.ep 1970-01-01 04:00:00.000000000 +0400
8149 @@ -1,61 +0,0 @@
8150 -<div>
8151 -
8152 - <% my $btn = l('SAVE'); %>
8153 - %= form_for 'wbl2' => (method => 'POST') => begin
8154 -
8155 - %= hidden_field 'trt' => $wbl_datas->{trt}
8156 -
8157 - <p>
8158 - %=l 'wbl_DNSBL_DESCRIPTION'
8159 - <br>
8160 - <span class=label>
8161 - %=l 'wbl_DNSBL_LABEL'
8162 - </span><span class=data2>
8163 - % param 'dnsbl' => $wbl_datas->{dnsbl} unless param 'dnsbl';
8164 - %= select_field 'dnsbl' => [[ (l 'ENABLED') => 'enabled'], [ (l 'DISABLED') => 'disabled']], class => 'input'
8165 - </span>
8166 - </p>
8167 -
8168 - <p>
8169 - %=l 'wbl_RBLLIST_DESCRIPTION'
8170 - <br><br>
8171 - <span class=label>
8172 - %=l 'wbl_RBLLIST_LABEL'
8173 - </span><span class=data2>
8174 - %= text_area 'rbllist' => (cols => 40) => begin
8175 - % for (@{ stash('rbllist') }) {
8176 - %= $_
8177 - %}
8178 - %end
8179 - </span>
8180 - </p>
8181 -<br>
8182 - <p>
8183 - %=l 'wbl_RHSBL_DESCRIPTION'
8184 - <br>
8185 - <span class=label>
8186 - %=l 'wbl_RHSBL_LABEL'
8187 - </span><span class=data2>
8188 - % param 'rhsbl' => $wbl_datas->{rhsbl} unless param 'rhsbl';
8189 - %= select_field 'rhsbl' => [[ (l 'ENABLED') => 'enabled'], [ (l 'DISABLED') => 'disabled']], class => 'input'
8190 - </span>
8191 - </p>
8192 -
8193 - <p>
8194 - %=l 'wbl_SBLLIST_DESCRIPTION'
8195 - <br><br>
8196 - <span class=label>
8197 - %=l 'wbl_SBLLIST_LABEL'
8198 - </span><span class=data2>
8199 - %= text_area 'sbllist' => (cols => 40) => begin
8200 - % for (@{ stash('sbllist') }) {
8201 - %= $_
8202 - % }
8203 - %end
8204 - </span>
8205 - </p>
8206 -<br>
8207 - %= submit_button "$btn", class => 'action'
8208 - %end
8209 -
8210 -</div>
8211 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_white.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_white.html.ep
8212 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_white.html.ep 2020-04-08 23:43:08.000000000 +0400
8213 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_wbl_white.html.ep 1970-01-01 04:00:00.000000000 +0400
8214 @@ -1,69 +0,0 @@
8215 -<div>
8216 -
8217 - <% my $btn = l('SAVE'); %>
8218 - %= form_for 'wbl2' => (method => 'POST') => begin
8219 -
8220 - %= hidden_field 'trt' => $wbl_datas->{trt}
8221 -
8222 - %=l 'wbl_WHITE_TITLE'
8223 -
8224 - <p>
8225 - %=l 'wbl_WHITELISTHOSTS_DESCRIPTION'
8226 - <br><br>
8227 - <span class=label>
8228 - %=l 'wbl_WHITELISTHOSTS_LABEL'
8229 - </span><span class=data2>
8230 - %= text_area 'whitelisthosts' => (cols => 40) => begin
8231 - % for (@{ stash('whitelisthosts') }) {
8232 - %= $_
8233 - %}
8234 - %end
8235 - </span>
8236 - </p>
8237 -<br>
8238 - <p>
8239 - %=l 'wbl_WHITELISTHELO_DESCRIPTION'
8240 - <br><br>
8241 - <span class=label>
8242 - %=l 'wbl_WHITELISTHELO_LABEL'
8243 - </span><span class=data2>
8244 - %= text_area 'whitelisthelo' => (cols => 40) => begin
8245 - % for (@{ stash('whitelisthelo') }) {
8246 - %= $_
8247 - % }
8248 - %end
8249 - </span>
8250 - </p>
8251 -<br>
8252 - <p>
8253 - %=l 'wbl_WHITELISTSENDERS_DESCRIPTION'
8254 - <br><br>
8255 - <span class=label>
8256 - %=l 'wbl_WHITELISTSENDERS_LABEL'
8257 - </span><span class=data2>
8258 - %= text_area 'whitelistsenders' => (cols => 40) => begin
8259 - % for (@{ stash('whitelistsenders') }) {
8260 - %= $_
8261 - % }
8262 - %end
8263 - </span>
8264 - </p>
8265 -<br>
8266 - <p>
8267 - %=l 'wbl_WHITELISTFROM_DESCRIPTION'
8268 - <br><br>
8269 - <span class=label>
8270 - %=l 'wbl_WHITELISTFROM_LABEL'
8271 - </span><span class=data2>
8272 - %= text_area 'whitelistfrom' => (cols => 40) => begin
8273 - % for (@{ stash('whitelistfrom') }) {
8274 - %= $_
8275 - % }
8276 - %end
8277 - </span>
8278 - </p>
8279 -<br>
8280 - %= submit_button "$btn", class => 'action'
8281 - %end
8282 -
8283 -</div>
8284 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/pseudonyms.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/pseudonyms.html.ep
8285 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/pseudonyms.html.ep 2020-04-08 23:43:15.000000000 +0400
8286 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/pseudonyms.html.ep 2020-03-14 19:10:06.000000000 +0400
8287 @@ -14,9 +14,9 @@
8288
8289 % if ( $notif ) {
8290 <br>
8291 - <span class=sme-error>
8292 + <div class=sme-error>
8293 %= $notif
8294 - </span>
8295 + </div>
8296 %}
8297
8298
8299 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/review.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/review.html.ep
8300 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/review.html.ep 2020-04-08 23:43:15.000000000 +0400
8301 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/review.html.ep 2020-04-09 23:25:10.221000000 +0400
8302 @@ -40,7 +40,7 @@
8303 <b>
8304 %=l 'rvw_ADDITIONAL_LOCAL_NETWORKS'
8305 </b>
8306 - %= $rvw_datas->{addlocalnetworks}
8307 + %= $c->render_to_string( inline => $rvw_datas->{addlocalnetworks} );
8308 <br>
8309
8310 <b>
8311 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumconfig.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumconfig.html.ep
8312 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumconfig.html.ep 1970-01-01 04:00:00.000000000 +0400
8313 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumconfig.html.ep 2020-03-11 12:33:17.000000000 +0400
8314 @@ -0,0 +1,88 @@
8315 +% layout 'default', title => "Sme server 2 - yum_config", share_dir => './';
8316 +
8317 +% content_for 'module' => begin
8318 +
8319 +<div id='module'>
8320 + % if ($config->{debug} == 1) {
8321 + <p>
8322 + %= dumper $c->current_route
8323 + %= dumper $yum_datas
8324 + </p>
8325 + % }
8326 +
8327 + <h1><%= $title%></h1>
8328 +
8329 + % if ( $notif ) {
8330 + <br><div class=sme-error>
8331 + %= $notif
8332 + </div>
8333 + %}
8334 +
8335 + %= form_for 'yumd' => (method => 'POST') => begin
8336 +
8337 + <p><span class=label>
8338 + %=l 'yum_LABEL_YUM_STATUS'
8339 + </span><span class=data>
8340 + % param 'yum_check4updates' => $c->get_status('check4updates') unless param 'yum_check4updates';
8341 + %= select_field 'yum_check4updates' => $c->get_check_freq_opt()
8342 + </span></p>
8343 +
8344 + <br>
8345 + %=l 'yum_DESC_YUM_PACKAGEFUNCTIONS'
8346 +
8347 + <p><span class=label>
8348 + %=l 'yum_LABEL_YUM_PACKAGEFUNCTIONS'
8349 + </span><span class=data>
8350 + % param 'yum_PackageFunctions' => $c->get_status('PackageFunctions') unless param 'yum_PackageFunctions';
8351 + %= select_field 'yum_PackageFunctions' => [[ $c->l('DISABLED') => 'disabled'], [ $c->l('ENABLED') => 'enabled']]
8352 + </span></p>
8353 +
8354 + <br>
8355 + %=l 'yum_DESC_ENABLED_REPOSITORIES'
8356 +
8357 + <p><span class=label>
8358 + %=l 'yum_LABEL_ENABLED_REPOSITORIES'
8359 + </span><span class=data>
8360 + % param 'SelectedRepositories' => $c->get_repository_current_options() unless param 'SelectedRepositories';
8361 + %= select_field 'SelectedRepositories' => $c->get_repository_options2(), class => 'input', multiple => '1'
8362 + </span></p>
8363 +
8364 + <br>
8365 + %=l 'yum_DESC_YUM_DELTARPMPROCESS'
8366 +
8367 + <p><span class=label>
8368 + %=l 'yum_LABEL_YUM_DELTARPMPROCESS'
8369 + </span><span class=data>
8370 + % param 'yum_DeltaRpmProcess' => $c->get_status('DeltaRpmProcess') unless param 'yum_DeltaRpmProcess';
8371 + %= select_field 'yum_DeltaRpmProcess' => [[ $c->l('DISABLED') => 'disabled'], [ $c->l('ENABLED') => 'enabled']]
8372 + </span></p>
8373 +
8374 + <br>
8375 + %=l 'yum_DESC_YUM_DOWNLOADONLY'
8376 +
8377 + <p><span class=label>
8378 + %=l 'yum_LABEL_YUM_DOWNLOADONLY'
8379 + </span><span class=data>
8380 + % param 'yum_DownloadOnly' => $c->get_status('DownloadOnly') unless param 'yum_DownloadOnly';
8381 + %= select_field 'yum_DownloadOnly' => [[ $c->l('DISABLED') => 'disabled'], [ $c->l('ENABLED') => 'enabled']]
8382 + </span></p>
8383 +
8384 + <br>
8385 + %=l 'yum_DESC_YUM_AUTOINSTALLUPDATES'
8386 +
8387 + <p><span class=label>
8388 + %=l 'yum_LABEL_YUM_AUTOINSTALLUPDATES'
8389 + </span><span class=data>
8390 + % param 'yum_AutoInstallUpdates' => $c->get_status('AutoInstallUpdates') unless param 'yum_AutoInstallUpdates';
8391 + %= select_field 'yum_AutoInstallUpdates' => [[ $c->l('DISABLED') => 'disabled'], [ $c->l('ENABLED') => 'enabled']]
8392 + </span></p>
8393 +
8394 + %= hidden_field 'trt' => 'CONF'
8395 + <br>
8396 + %= submit_button $c->l('SAVE'), class => 'action'
8397 +
8398 + % end
8399 +
8400 +</div>
8401 +
8402 +% end
8403 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yum.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yum.html.ep
8404 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yum.html.ep 1970-01-01 04:00:00.000000000 +0400
8405 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yum.html.ep 2020-03-29 16:56:08.000000000 +0400
8406 @@ -0,0 +1,105 @@
8407 +% layout 'default', title => "Sme server 2 - yum", share_dir => './';
8408 +
8409 +% content_for 'module' => begin
8410 +
8411 +<div id="module">
8412 + % if ($config->{debug} == 1) {
8413 + <p>
8414 + %= dumper $c->current_route
8415 + %= dumper $yum_datas
8416 + </p>
8417 + % }
8418 +
8419 + <h1><%= $title%></h1>
8420 +
8421 + % if ( $notif ) {
8422 + <br><span class=sme-error>
8423 + %= $notif
8424 + </span>
8425 + %}
8426 +
8427 + <br>Still incomplete click here for previous version -->
8428 + <a href="/server-manager/cgi-bin/yum" target='_blank'><b>(Previous Yum version)</b></a>
8429 + <br>
8430 +
8431 +
8432 + % if ( $c->is_empty('updates') ) {
8433 + <br><div class=success><h2>
8434 + %=l 'yum_TITLE_UPTODATE'
8435 + </h2>
8436 + %=l 'yum_DESC_UPTODATE'
8437 + </div><br>
8438 + %}
8439 +
8440 + % if ( $c->non_empty('updates') ) {
8441 + <br><div class=success><h2>
8442 + %=l 'yum_TITLE_UPDATES_AVAILABLE'
8443 + </h2>
8444 + %=l 'yum_DESC_UPDATES_AVAILABLE'
8445 + </div><br>
8446 +
8447 + %= form_for 'yumu' => (method => 'GET') => begin
8448 + %= hidden_field 'trt' => 'UPDT'
8449 + %= submit_button $c->l('yum_BUTTON_INSTALL_UPDATES'), class => 'action2'
8450 + % end
8451 + %}
8452 +
8453 + % if ( $c->non_empty('available') ) {
8454 + %= form_for 'yumu' => (method => 'GET') => begin
8455 + <br>
8456 + %= hidden_field 'trt' => 'INST'
8457 + %= submit_button $c->l('yum_BUTTON_INSTALL_AVAILABLE'), class => 'action2'
8458 + % end
8459 + %}
8460 +
8461 + % if ( $c->non_empty('installed') ) {
8462 + %= form_for 'yumu' => (method => 'GET') => begin
8463 + <br>
8464 + %= hidden_field 'trt' => 'REMO'
8465 + %= submit_button $c->l('yum_BUTTON_REMOVE'), class => 'action2'
8466 + % end
8467 + %}
8468 +
8469 + <br><hr class=sectionbar /><br>
8470 +
8471 + %= form_for 'yum' => (method => 'POST') => begin
8472 +
8473 + <p><span class=label>
8474 + %=l 'yum_LABEL_YUM_STATUS'
8475 + </span><span class=data2>
8476 + %= $c->get_status('status', 'localise')
8477 + </span></p>
8478 +
8479 + <p><span class=label>
8480 + %=l 'yum_LABEL_YUM_PACKAGEFUNCTIONS'
8481 + </span><span class=data2>
8482 + %= $c->get_status('PackageFunctions', 'localise')
8483 + </span></p>
8484 +
8485 + <p><span class=label>
8486 + %=l 'yum_LABEL_YUM_DELTARPMPROCESS'
8487 + </span><span class=data2>
8488 + %= $c->get_status('DeltaRpmProcess', 'localise')
8489 + </span></p>
8490 +
8491 + <p><span class=label>
8492 + %=l 'yum_LABEL_YUM_DOWNLOADONLY'
8493 + </span><span class=data2>
8494 + %= $c->get_status('DownloadOnly', 'localise')
8495 + </span></p>
8496 +
8497 + <p><span class=label>
8498 + %=l 'yum_LABEL_YUM_AUTOINSTALLUPDATES'
8499 + </span><span class=data2>
8500 + %= $c->get_status('AutoInstallUpdates', 'localise')
8501 + </span></p>
8502 +
8503 + %= hidden_field 'trt' => 'CONF'
8504 + <br>
8505 + %= submit_button $c->l('yum_BUTTON_CONFIGURATION'), class => 'action2'
8506 +
8507 + % end
8508 +
8509 +</div>
8510 +
8511 +% end
8512 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yuminstall.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yuminstall.html.ep
8513 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yuminstall.html.ep 1970-01-01 04:00:00.000000000 +0400
8514 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yuminstall.html.ep 2020-03-11 12:33:33.000000000 +0400
8515 @@ -0,0 +1,56 @@
8516 +% layout 'default', title => "Sme server 2 - yum_install", share_dir => './';
8517 +
8518 +% content_for 'module' => begin
8519 +
8520 +<div id="module">
8521 + % if ($config->{debug} == 1) {
8522 + <p>
8523 + %= dumper $c->current_route
8524 + %= dumper $yum_datas
8525 + </p>
8526 + % }
8527 +
8528 + <h1><%= $title%></h1>
8529 +
8530 + % if ( $notif ) {
8531 + <br><div class=sme-error>
8532 + %= $notif
8533 + </div>
8534 + %}
8535 + <br>
8536 +
8537 + %= form_for 'yumd' => (method => 'POST') => begin
8538 +
8539 + %=l 'yum_HEADER_AVAILABLE_SOFTWARE'
8540 + <br><br>
8541 + % if ($c->non_empty('available','group')) {
8542 + %=l 'yum_DESC_AVAILABLE_GROUPS'
8543 + <p><span class=label>
8544 + %=l 'yum_LABEL_AVAILABLE_GROUPS'
8545 + </span><span class=data>
8546 + % param 'SelectedGroups' => $c->get_names2('updates','group') unless param 'SelectedGroups';
8547 + %= select_field 'SelectedGroups' => $c->get_options2('available', 'group'), class => 'input', multiple => "1"
8548 + </span></p>
8549 + %}
8550 + <br>
8551 + % if ($c->non_empty('available','packages')) {
8552 + %=l 'yum_DESC_AVAILABLE_PACKAGES'
8553 + <p><span class=label>
8554 + %=l 'yum_LABEL_AVAILABLE_PACKAGES'
8555 + </span><span class=data>
8556 + % param 'SelectedPackages' => $c->get_names2('updates','package') unless param 'SelectedPackages';
8557 + %= select_field 'SelectedPackages' => $c->get_options2('available', 'package'), class => 'input', multiple => "1"
8558 + </span></p>
8559 + %}
8560 +
8561 + <!-- $c->print_skip_header() -->
8562 +
8563 + %= hidden_field 'trt' => 'INST'
8564 + <br><br>
8565 + %= submit_button $c->l('yum_INSTALL_SOFTWARE'), class => 'action'
8566 +
8567 + % end
8568 +
8569 +</div>
8570 +
8571 +% end
8572 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumlogfile.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumlogfile.html.ep
8573 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumlogfile.html.ep 1970-01-01 04:00:00.000000000 +0400
8574 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumlogfile.html.ep 2020-03-12 17:51:57.000000000 +0400
8575 @@ -0,0 +1,35 @@
8576 +% layout 'default', title => "Sme server 2 - yum_logfile", share_dir => './';
8577 +
8578 +% content_for 'module' => begin
8579 +
8580 +<div id="module">
8581 + % if ($config->{debug} == 1) {
8582 + <p>
8583 + %= dumper $c->current_route
8584 + %= dumper $yum_datas
8585 + </p>
8586 + % }
8587 +
8588 + <h1><%= $title%></h1>
8589 +
8590 + % if ( $notif ) {
8591 + <br><div class=sme-error>
8592 + %= $notif
8593 + </div>
8594 + %}
8595 +
8596 + %= form_for 'yum' => (method => 'POST') => begin
8597 +
8598 + <BR><center><H2>Please Wait - Yum Running (<%= $c->get_yum_status_page() %>)</H2></center>
8599 +
8600 + <%= $c->render_to_string(inline => $c->show_yum_log()) %>
8601 +
8602 + %= hidden_field 'trt' => 'LOGF'
8603 + <br>
8604 + %= submit_button $c->l('NEXT'), class => 'action'
8605 +
8606 + % end
8607 +
8608 +</div>
8609 +
8610 +% end
8611 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumpostupg.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumpostupg.html.ep
8612 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumpostupg.html.ep 1970-01-01 04:00:00.000000000 +0400
8613 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumpostupg.html.ep 2020-03-11 12:40:34.000000000 +0400
8614 @@ -0,0 +1,37 @@
8615 +% layout 'default', title => "Sme server 2 - yum_update", share_dir => './';
8616 +
8617 +% content_for 'module' => begin
8618 +
8619 +<div id="module">
8620 + % if ($config->{debug} == 1) {
8621 + <p>
8622 + %= dumper $c->current_route
8623 + %= dumper $yum_datas
8624 + </p>
8625 + % }
8626 +
8627 + <h1><%= $title%></h1>
8628 +
8629 + % if ( $notif ) {
8630 + <br><div class=sme-error>
8631 + %= $notif
8632 + </div>
8633 + %}
8634 +
8635 + %= form_for 'yumd' => (method => 'POST') => begin
8636 +
8637 + <p>
8638 + <%= $c->render_to_string(inline => $c->l('yum_HEADER_POSTUPGRADE_REQUIRED')) %>
8639 + </p><br>
8640 +
8641 + <%= $c->render_to_string(inline => $c->show_yum_log()) %>
8642 +
8643 + %= hidden_field 'trt' => 'PSTU'
8644 + <br>
8645 + %= submit_button $c->l('RECONFIGURE'), class => 'action'
8646 +
8647 + % end
8648 +
8649 +</div>
8650 +
8651 +% end
8652 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumremove.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumremove.html.ep
8653 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumremove.html.ep 1970-01-01 04:00:00.000000000 +0400
8654 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumremove.html.ep 2020-03-10 22:51:02.000000000 +0400
8655 @@ -0,0 +1,56 @@
8656 +% layout 'default', title => "Sme server 2 - yum_update", share_dir => './';
8657 +
8658 +% content_for 'module' => begin
8659 +
8660 +<div id="module">
8661 + % if ($config->{debug} == 1) {
8662 + <p>
8663 + %= dumper $c->current_route
8664 + %= dumper $yum_datas
8665 + </p>
8666 + % }
8667 +
8668 + <h1><%= $title%></h1>
8669 + <br>
8670 +
8671 + % if ( $notif ) {
8672 + <br><div class=sme-error>
8673 + %= $notif
8674 + </div>
8675 + %}
8676 +
8677 + %= form_for 'yumd' => (method => 'POST') => begin
8678 +
8679 + %=l 'yum_HEADER_INSTALLED_SOFTWARE'
8680 +
8681 + <br>
8682 + % if ($c->non_empty('installed','group')) {
8683 + %=l 'yum_DESC_INSTALLED_GROUPS'
8684 + <p><span class=label>
8685 + %=l 'yum_LABEL_INSTALLED_GROUPS'
8686 + </span><span class=data>
8687 + %= select_field 'SelectedGroups' => $c->get_options2('installed', 'group'), class => 'input', multiple => "1"
8688 + </span></p>
8689 + %}
8690 + <br>
8691 + % if ($c->non_empty('installed','packages')) {
8692 + %=l 'yum_DESC_INSTALLED_PACKAGES'
8693 + <p><span class=label>
8694 + %=l 'yum_LABEL_INSTALLED_PACKAGES'
8695 + </span><span class=data>
8696 + %= select_field 'SelectedPackages' => $c->get_options2('installed', 'package'), class => 'input', multiple => "1"
8697 + </span></p>
8698 + %}
8699 +
8700 + <!--subroutine src="print_skip_header()" /-->
8701 +
8702 + %= hidden_field 'trt' => 'REMO'
8703 + <br>
8704 + %= submit_button $c->l('REMOVE'), class => 'action'
8705 +
8706 + % end
8707 +
8708 +</div>
8709 +
8710 +% end
8711 +
8712 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumupdate.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumupdate.html.ep
8713 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumupdate.html.ep 1970-01-01 04:00:00.000000000 +0400
8714 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/yumupdate.html.ep 2020-03-11 12:34:30.000000000 +0400
8715 @@ -0,0 +1,42 @@
8716 +% layout 'default', title => "Sme server 2 - yum_update", share_dir => './';
8717 +
8718 +% content_for 'module' => begin
8719 +
8720 +<div id="module">
8721 + % if ($config->{debug} == 1) {
8722 + <p>
8723 + %= dumper $c->current_route
8724 + %= dumper $yum_datas
8725 + </p>
8726 + % }
8727 +
8728 + <h1><%= $title%></h1>
8729 +
8730 + % if ( $notif ) {
8731 + <br><div class=sme-error>
8732 + %= $notif
8733 + </div>
8734 + %}
8735 +
8736 + %= form_for 'yumd' => (method => 'POST') => begin
8737 +
8738 + %=l 'yum_DESC_AVAILABLE_UPDATES'
8739 +
8740 + <p><span class=label>
8741 + %=l 'yum_LABEL_AVAILABLE_UPDATES'
8742 + </span><span class=data>
8743 + % param 'SelectedPackages' => $c->get_names2('updates','package') unless param 'SelectedPackages';
8744 + %= select_field 'SelectedPackages' => $c->get_options2('updates', 'package'), class => 'input', multiple => "1"
8745 + </span></p>
8746 +
8747 + <!-- $c->print_skip_header() -->
8748 +
8749 + %= hidden_field 'trt' => 'UPDT'
8750 + <br>
8751 + %= submit_button $c->l('yum_INSTALL_UPDATES'), class => 'action'
8752 +
8753 + % end
8754 +
8755 +</div>
8756 +
8757 +% end
8758 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/public/index.html smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/public/index.html
8759 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/public/index.html 2020-04-08 23:43:08.000000000 +0400
8760 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/public/index.html 1970-01-01 04:00:00.000000000 +0400
8761 @@ -1,9 +0,0 @@
8762 -<!--DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"-->
8763 -
8764 -<HTML>
8765 -
8766 -<HEAD><TITLE>Mojo under construction</TITLE></HEAD>
8767 -
8768 -<BODY BGCOLOR="#FFFFFF"><H1>This web app is under construction</H1><H2>(theme perso)</H2></BODY>
8769 -
8770 -</HTML>
8771 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/public/jss/styles.css smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/public/jss/styles.css
8772 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/public/jss/styles.css 2020-04-08 23:43:15.000000000 +0400
8773 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/public/jss/styles.css 1970-01-01 04:00:00.000000000 +0400
8774 @@ -1,170 +0,0 @@
8775 -/* srvmngr - css de base */
8776 -body{
8777 - background-color: #FFF;
8778 -}
8779 -
8780 -#container{
8781 - max-width: 100%;
8782 - position: relative;
8783 - margin: auto;
8784 -}
8785 -
8786 -#navigation{
8787 - width: 190px;
8788 - position: absolute;
8789 - margin-left: 0px;
8790 - padding: 5px;
8791 - background-color: #E8F3E1;
8792 -/* height: 600px; */
8793 - overflow: auto;
8794 -}
8795 -
8796 -#main{
8797 - margin-left: 195px;
8798 - padding: 10px;
8799 -}
8800 -
8801 -label.field-with-error {
8802 - color: #dd7e5e
8803 -}
8804 -
8805 -input.field-with-error {
8806 - background-color: #fd9e7e
8807 -}
8808 -
8809 -#central{
8810 - margin-left: 0px;
8811 - padding: 5px;
8812 -}
8813 -
8814 -#footer{
8815 - margin-left: 0px;
8816 - padding: 5px;
8817 -}
8818 -
8819 -#header {
8820 - background: #bee6a2;
8821 -}
8822 -
8823 -#header h1, a:link, a:visited {
8824 - color: black;
8825 - text-decoration: none;
8826 -/* contribs.org styling */
8827 -}
8828 -
8829 -.sme-error {
8830 - color: red;
8831 - background-color: #ffffff;
8832 - border-width: 1px;
8833 - border-style: solid;
8834 - border-color: red ;
8835 - padding: 2px;
8836 - margin-left: 20px;
8837 - margin-right: 20px;
8838 - margin-top:0px;
8839 - margin-bottom:0px;
8840 -}
8841 -
8842 -a.accent {
8843 - color: purple;
8844 -}
8845 -
8846 -#footer img {
8847 - float: right;
8848 - position: fixed;
8849 - margin-left: 40%;
8850 -}
8851 -
8852 -span.label {
8853 - font-weight: bold;
8854 - width: 20%;
8855 -}
8856 -
8857 -span.data {
8858 - padding: 2px;
8859 - font-weight: bold;
8860 - margin-left: 0%;
8861 - background-color: lightgreen;
8862 -}
8863 -
8864 -span.data2 {
8865 - padding: 2px;
8866 - font-weight: bold;
8867 - background-color: lightblue;
8868 -}
8869 -
8870 -input.action {
8871 - margin-left: 0px;
8872 - color: green;
8873 - background-color: lightgreen;
8874 -}
8875 -#modul.desc {
8876 - padding: 3px;
8877 - background-color: grey;
8878 -}
8879 -
8880 -/* #modul form .input */
8881 -
8882 -[type = 'text'] {
8883 - margin-left: 0px;
8884 - background-color: lightblue;
8885 -}
8886 -
8887 -.a, .return {
8888 - color: #661866;
8889 - font-weight: bold;
8890 -}
8891 -
8892 -.section {
8893 - line-height: 20px;
8894 -}
8895 -.a, .item {
8896 - line-height: 15px;
8897 -}
8898 -
8899 -#module {
8900 -/* height: 600px; */
8901 - overflow: auto;
8902 -}
8903 -
8904 -
8905 -#h2l1 {
8906 - height: 40px;
8907 - width: 100%;
8908 -}
8909 -#h2e11 {
8910 - width: 70%;
8911 - float: left;
8912 -}
8913 -#h2e12 {
8914 - background-color: #C0E7A6;
8915 - float: left;
8916 - text-align: right;
8917 -}
8918 -
8919 -#h2l2 {
8920 -/* background-color: #A8F9E7;*/
8921 - border-top: solid white 3px;
8922 - border-bottom: solid white 2px;
8923 - height: 14px;
8924 - width: 100%;
8925 - padding: 1px;
8926 -}
8927 -
8928 -#h2e21 {
8929 - float: left;
8930 - width: 70%;
8931 -}
8932 -
8933 -#h2e22,#h2e23 {
8934 - float: left;
8935 - width: 10%;
8936 - text-align: center;
8937 -}
8938 -
8939 -
8940 -
8941 -/*#h2e23 {
8942 - float: right;
8943 - width: 15%;
8944 -}*/
8945 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/templates/layouts/default.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/templates/layouts/default.html.ep
8946 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/templates/layouts/default.html.ep 2020-04-08 23:43:15.000000000 +0400
8947 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/perso/templates/layouts/default.html.ep 1970-01-01 04:00:00.000000000 +0400
8948 @@ -1,40 +0,0 @@
8949 -<!DOCTYPE html
8950 - PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
8951 - "http://www.w3.org/TR/html4/loose.dtd">
8952 -<!-- defaultperso -->
8953 -<html>
8954 -
8955 -<head>
8956 -<title><%= $title %></title>
8957 - <link rev="made" href="mailto:bugs%40koozali.org">
8958 - <meta name="copyright" content="(head.tmpl)Copyright 2003-2004 Mitel Corporation">
8959 - <link rel="stylesheet" type="text/css" media="all" href='css/sme_core.css'>
8960 - <link rel="stylesheet" type="text/css" media="all" href='css/sme_main.css'>
8961 - <!-- link rel="stylesheet" type="text/css" media="all" href='css/sme_menu.css' -->
8962 - <link rel="stylesheet" type="text/css" media="all" href='css/styles.css'>
8963 - %= include 'partials/_head'
8964 -</head>
8965 -
8966 -<body>
8967 -% if ( not defined $c->session->{lang} ) {
8968 -% SrvMngr::init_session_cgi ( $c );
8969 -% }
8970 - <div id="header">
8971 - %= include 'partials/_header'
8972 - %= include 'partials/_swt_theme'
8973 - </div>
8974 -
8975 - %= include 'partials/_info'
8976 -
8977 - <div id="container">
8978 - <div id="navigation" class="col-md-3">
8979 - %= include 'partials/_navig'
8980 - </div>
8981 - <div id="main" class="col-md-9">
8982 - %= content 'module'
8983 - %= include 'partials/_footer'
8984 - </div>
8985 - </div>
8986 -
8987 -</body>
8988 -</html>
8989 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_black.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_black.html.ep
8990 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_black.html.ep 2020-04-08 23:43:08.000000000 +0400
8991 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_black.html.ep 1970-01-01 04:00:00.000000000 +0400
8992 @@ -1,49 +0,0 @@
8993 -<section class="content">
8994 -<div>
8995 - <p>Returned Values</p>
8996 - First line is from returned from list:
8997 - <%= $listR %>
8998 - <br />
8999 -</div>
9000 -<br />
9001 -
9002 -<div>
9003 - Form starts here
9004 - <br />
9005 -
9006 -<table>
9007 -<tbody>
9008 -<tr>
9009 -
9010 -<form name="list" action="" method="POST">
9011 -
9012 -
9013 -<b>Blacklist helo</b>
9014 -<br />
9015 -%= text_area story => (cols => 40) => begin
9016 -% for (@{ stash('badhelo') }) {
9017 -%= $_
9018 -% }
9019 -%end
9020 -<br />
9021 -
9022 -<b>Blacklist helo</b>
9023 -<br />
9024 -%= text_area story => (cols => 40) => begin
9025 -% for (@{ stash('badmailfrom') }) {
9026 -%= $_
9027 -% }
9028 -%end
9029 -<br />
9030 -<input type="submit" value="Submit">
9031 -</form>
9032 -
9033 -</tr>
9034 -</tbody>
9035 -</table>
9036 -
9037 -<br />
9038 -<br />
9039 -
9040 -</div>
9041 -</section><!-- /.content -->
9042 \ Pas de fin de ligne à la fin du fichier
9043 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_choice.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_choice.html.ep
9044 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_choice.html.ep 2020-04-08 23:43:08.000000000 +0400
9045 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_choice.html.ep 1970-01-01 04:00:00.000000000 +0400
9046 @@ -1,20 +0,0 @@
9047 -<section class="content">
9048 -
9049 -<div>
9050 -
9051 -%#Some Form Buttons
9052 -%#= button_to Test => 'http://home.reetspetit.net/'
9053 -%#= button_to Remove => './wbl.cgi'
9054 -
9055 -<form name="choice" action="" method="POST">
9056 -
9057 -Test dropbown list
9058 -<div>
9059 -<%= select_field 'list' => [ @{ stash('list') }], id=> 'dropdown' %>
9060 -</div>
9061 -<br />
9062 -
9063 -<input type="submit" value="Submit">
9064 -</form>
9065 -</div>
9066 -</section><!-- /.content -->
9067 \ Pas de fin de ligne à la fin du fichier
9068 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/main.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/main.html.ep
9069 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/main.html.ep 2020-04-08 23:43:08.000000000 +0400
9070 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/main.html.ep 1970-01-01 04:00:00.000000000 +0400
9071 @@ -1,395 +0,0 @@
9072 -<!DOCTYPE html>
9073 -<!--
9074 -This is a starter template page. Use this page to start your new project from
9075 -scratch. This page gets rid of all links and provides the needed markup only.
9076 --->
9077 -<html>
9078 -<head>
9079 - <meta charset="utf-8">
9080 - <meta http-equiv="X-UA-Compatible" content="IE=edge">
9081 - <title>Server Manager</title>
9082 - <!-- Tell the browser to be responsive to screen width -->
9083 - <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
9084 - <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css">
9085 - <!-- Font Awesome -->
9086 - <link rel="stylesheet" href="../bower_components/font-awesome/css/font-awesome.min.css">
9087 - <!-- Ionicons -->
9088 - <link rel="stylesheet" href="../bower_components/Ionicons/css/ionicons.min.css">
9089 - <!-- Theme style -->
9090 - <link rel="stylesheet" href="../dist/css/AdminLTE.min.css">
9091 - <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
9092 - page. However, you can choose any other skin. Make sure you
9093 - apply the skin class to the body tag so the changes take effect. -->
9094 - <!--<link rel="stylesheet" href="dist/css/skins/skin-blue.min.css">-->
9095 - <link rel="stylesheet" href="../dist/css/skins/koozali.css">
9096 -
9097 - <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
9098 - <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
9099 - <!--[if lt IE 9]>
9100 - <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
9101 - <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
9102 - <![endif]-->
9103 -
9104 - <!-- Google Font -->
9105 - <link rel="stylesheet"
9106 - href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
9107 -</head>
9108 -<!--
9109 -BODY TAG OPTIONS:
9110 -=================
9111 -Apply one or more of the following classes to get the
9112 -desired effect
9113 -|---------------------------------------------------------|
9114 -| SKINS | skin-blue |
9115 -| | skin-black |
9116 -| | skin-purple |
9117 -| | skin-yellow |
9118 -| | skin-red |
9119 -| | skin-green |
9120 -|---------------------------------------------------------|
9121 -|LAYOUT OPTIONS | fixed |
9122 -| | layout-boxed |
9123 -| | layout-top-nav |
9124 -| | sidebar-collapse |
9125 -| | sidebar-mini |
9126 -|---------------------------------------------------------|
9127 --->
9128 -<body class="hold-transition skin-blue sidebar-mini">
9129 -<div class="wrapper">
9130 -
9131 - <!-- Main Header -->
9132 - <header class="main-header">
9133 -
9134 - <!-- Logo -->
9135 - <a href="" class="logo">
9136 - <!-- mini logo for sidebar mini 50x50 pixels -->
9137 - <span class="logo-mini"><b>SME</b></span>
9138 - <!-- logo for regular state and mobile devices -->
9139 - <span class="logo-lg"><b>Koozali</b> SME Server</span>
9140 - </a>
9141 -
9142 - <!-- Header Navbar -->
9143 - <nav class="navbar navbar-static-top" role="navigation">
9144 - <!-- Sidebar toggle button-->
9145 - <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
9146 - <span class="sr-only">Toggle navigation</span>
9147 - </a>
9148 - <!-- Navbar Right Menu -->
9149 - <div class="navbar-custom-menu">
9150 - <ul class="nav navbar-nav">
9151 - <!-- Messages: style can be found in dropdown.less-->
9152 - <li class="dropdown messages-menu">
9153 - <!-- Menu toggle button -->
9154 - <a href="#" class="dropdown-toggle" data-toggle="dropdown">
9155 - <i class="fa fa-envelope-o"></i>
9156 - <span class="label label-success"></span>
9157 - </a>
9158 - <ul class="dropdown-menu">
9159 - <li class="header">You have no new messages</li>
9160 - <li>
9161 - <!-- inner menu: contains the messages -->
9162 - <ul class="menu">
9163 - <li><!-- start message -->
9164 -
9165 - <!-- end message -->
9166 - </ul>
9167 - <!-- /.menu -->
9168 - </li>
9169 - <li class="footer"><a href="#">See All Messages</a></li>
9170 - </ul>
9171 - </li>
9172 - <!-- /.messages-menu -->
9173 -
9174 - <!-- Notifications Menu -->
9175 - <li class="dropdown notifications-menu">
9176 - <!-- Menu toggle button -->
9177 - <a href="#" class="dropdown-toggle" data-toggle="dropdown">
9178 - <i class="fa fa-bell-o"></i>
9179 - <span class="label label-warning"></span>
9180 - </a>
9181 - <ul class="dropdown-menu">
9182 - <li class="header">You have no new notifications</li>
9183 - <li>
9184 - <!-- Inner Menu: contains the notifications -->
9185 - <ul class="menu">
9186 - <!-- end notification -->
9187 - </ul>
9188 - </li>
9189 - <li class="footer"><a href="#">View all</a></li>
9190 - </ul>
9191 - </li>
9192 - <!-- Tasks Menu -->
9193 - <li class="dropdown tasks-menu">
9194 - <!-- Menu Toggle Button -->
9195 - <a href="#" class="dropdown-toggle" data-toggle="dropdown">
9196 - <i class="fa fa-flag-o"></i>
9197 - <span class="label label-danger"></span>
9198 - </a>
9199 - <ul class="dropdown-menu">
9200 - <li class="header">You have no tasks</li>
9201 - <li>
9202 - <!-- Inner menu: contains the tasks -->
9203 - </li>
9204 - <li class="footer">
9205 - <a href="#">View all tasks</a>
9206 - </li>
9207 - </ul>
9208 - </li>
9209 - <!-- User Account Menu -->
9210 - <li class="dropdown user user-menu">
9211 - <!-- Menu Toggle Button -->
9212 - <a href="#" class="dropdown-toggle" data-toggle="dropdown">
9213 - <!-- The user image in the navbar-->
9214 - <img src="dist/img/user.png" class="user-image" alt="User Image">
9215 - <!-- hidden-xs hides the username on small devices so only the image appears. -->
9216 - <span class="hidden-xs">Admin</span>
9217 - </a>
9218 - <ul class="dropdown-menu">
9219 - <!-- The user image in the menu -->
9220 - <li class="user-header">
9221 - <img src="dist/img/user.png" class="img-circle" alt="User Image">
9222 -
9223 - <p>
9224 - Admin
9225 - <small>SME Server Admin Account</small>
9226 - </p>
9227 - </li>
9228 - <!-- Menu Body -->
9229 - <li class="user-body">
9230 - <div class="row">
9231 - <div class="col-xs-4 text-center">
9232 - <a href="#">Followers</a>
9233 - </div>
9234 - <div class="col-xs-4 text-center">
9235 - <a href="#">Sales</a>
9236 - </div>
9237 - <div class="col-xs-4 text-center">
9238 - <a href="#">Friends</a>
9239 - </div>
9240 - </div>
9241 - <!-- /.row -->
9242 - </li>
9243 - <!-- Menu Footer-->
9244 - <li class="user-footer">
9245 - <div class="pull-left">
9246 - <a href="#" class="btn btn-default btn-flat">Profile</a>
9247 - </div>
9248 - <div class="pull-right">
9249 - <a href="#" class="btn btn-default btn-flat">Sign out</a>
9250 - </div>
9251 - </li>
9252 - </ul>
9253 - </li>
9254 - <!-- Control Sidebar Toggle Button -->
9255 - <li>
9256 - <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
9257 - </li>
9258 - </ul>
9259 - </div>
9260 - </nav>
9261 - </header>
9262 - <!-- Left side column. contains the logo and sidebar -->
9263 - <aside class="main-sidebar">
9264 -
9265 - <!-- sidebar: style can be found in sidebar.less -->
9266 - <section class="sidebar">
9267 -
9268 - <!-- search form (Optional) -->
9269 - <form action="#" method="get" class="sidebar-form">
9270 - <div class="input-group">
9271 - <input type="text" name="q" class="form-control" placeholder="Search...">
9272 - <span class="input-group-btn">
9273 - <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
9274 - </button>
9275 - </span>
9276 - </div>
9277 - </form>
9278 - <!-- /.search form -->
9279 - <section>
9280 - <!-- Sidebar Menu -->
9281 - <ul class="sidebar-menu" data-widget="tree">
9282 - <li class="treeview">
9283 - <a href="#"><i class="fa fa-users"></i> <span>Collaboration</span>
9284 - <span class="pull-right-container">
9285 - <i class="fa fa-angle-left pull-right"></i>
9286 - </span>
9287 - </a>
9288 - <ul class="treeview-menu">
9289 - <li class="active"><a href="#"><span>Users</span></a></li>
9290 - <li class="active"><a href="#"><span>Groups</span></a></li>
9291 - <li class="active"><a href="#"><span>Quotas</span></a></li>
9292 - <li class="active"><a href="#"><span>Pseudonyms</span></a></li>
9293 - <li class="active"><a href="#"><span>Information bays</span></a></li>
9294 - <li class="active"><a href="#"><span>Git repositories</span></a></li>
9295 - <li class="active"><a href="#"><span>User vacations</span></a></li>
9296 - </ul>
9297 - </li>
9298 -
9299 - <li class="treeview">
9300 - <a href="#"><i class="fa fa-server"></i> <span>Administration</span>
9301 - <span class="pull-right-container">
9302 - <i class="fa fa-angle-left pull-right"></i>
9303 - </span>
9304 - </a>
9305 - <ul class="treeview-menu">
9306 - <li><a href="#">Sme9admin</a></li>
9307 - <li><a href="#">System Monitor</a></li>
9308 - <li><a href="#">Backup or restore</a></li>
9309 - <li><a href="#">Disk usage report</a></li>
9310 - <li><a href="#">SARG reports</a></li>
9311 - <li><a href="#">View log files</a></li>
9312 - <li><a href="#">Mail log file analysis</a></li>
9313 - <li><a href="#">Reboot or shutdown</a></li>
9314 - <li><a href="#">Domain pseudonyms</a></li>
9315 - <li><a href="#">System Monitor</a></li>
9316 - </ul>
9317 - </li>
9318 -
9319 - <li class="treeview">
9320 - <a href="#"><i class="fa fa-user-secret"></i> <span>Security</span>
9321 - <span class="pull-right-container">
9322 - <i class="fa fa-angle-left pull-right"></i>
9323 - </span>
9324 - </a>
9325 - <ul class="treeview-menu">
9326 - <li><a href="#">User Panel Access</a></li>
9327 - <li><a href="#">Certificate Management</a></li>
9328 - <li><a href="#">Remote access</a></li>
9329 - <li><a href="#">SSH Denyhosts</a></li>
9330 - <li><a href="#">Local networks</a></li>
9331 - <li><a href="#">Port forwarding</a></li>
9332 - <li><a href="#">Proxy settings</a></li>
9333 - </ul>
9334 - </li>
9335 -
9336 - <li class="treeview">
9337 - <a href="#"><i class="fa fa-cogs"></i> <span>Configuration</span>
9338 - <span class="pull-right-container">
9339 - <i class="fa fa-angle-left pull-right"></i>
9340 - </span>
9341 - </a>
9342 - <ul class="treeview-menu">
9343 - <li><a href="#">PHP-SCL Versions</a></li>
9344 - <li><a href="#">DHCP Manager</a></li>
9345 - <li><a href="#">Software installer</a></li>
9346 - <li><a href="#">Date and time</a></li>
9347 - <li><a href="#">Workgroup</a></li>
9348 - <li><a href="#">Directory</a></li>
9349 - <li><a href="#">Printers</a></li>
9350 - <li><a href="#">Hostnames and addresses</a></li>
9351 - <li><a href="#">Domains</a></li>
9352 - <li><a href="#">E-mail</a></li>
9353 - <li><a href="#">E-mail Management</a></li>
9354 - <li><a href="#">E-mail WBL</a></li>
9355 - <li><a href="#">Antivirus (ClamAV)</a></li>
9356 - <li><a href="#">Review configuration</a></li>
9357 - <li><a href="#">Crontab Manager</a></li>
9358 - <li><a href="#">Thin Clients</a></li>
9359 - </ul>
9360 - </li>
9361 -
9362 - <li class="treeview">
9363 - <a href="#"><i class="fa fa-address-book"></i> <span>Miscellaneous</span>
9364 - <span class="pull-right-container">
9365 - <i class="fa fa-angle-left pull-right"></i>
9366 - </span>
9367 - </a>
9368 - <ul class="treeview-menu">
9369 - <li><a href="#">Support and licensing</a></li>
9370 - <li><a href="#">Create starter web site</a></li>
9371 - <li><a href="#">Report a bug</a></li>
9372 - </ul>
9373 - </li>
9374 - </ul>
9375 - </ul>
9376 - <!-- /.sidebar-menu -->
9377 - </section>
9378 - <!-- /.sidebar -->
9379 - </aside>
9380 -
9381 - <!-- Content Wrapper. Contains page content -->
9382 - <div class="content-wrapper">
9383 - <!-- Content Header (Page header) -->
9384 - <section class="content-header">
9385 - <h1>
9386 - Server-Manager
9387 - <small>Control panel</small>
9388 - </h1>
9389 - <ol class="breadcrumb">
9390 - <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
9391 - <li class="active">Here</li>
9392 - </ol>
9393 - </section>
9394 -
9395 - <!-- Main content -->
9396 - <section class="content container-fluid">
9397 -
9398 - <!--------------------------
9399 - | Your Page Content Here |
9400 - -------------------------->
9401 -
9402 - <%= include $contentVar %>
9403 - </section>
9404 - <!-- /.content -->
9405 - </div>
9406 - <!-- /.content-wrapper -->
9407 -
9408 - <!-- Main Footer -->
9409 - <footer class="main-footer">
9410 - <!-- To the right -->
9411 - <div class="pull-right hidden-xs">
9412 - Anything you want
9413 - </div>
9414 - <!-- Default to the left -->
9415 - <strong>Copyright &copy; 2018 <a href="http://www.koozali.org/">The Koozali Foundation</a>.</strong> All rights reserved.
9416 - </footer>
9417 -
9418 -
9419 -
9420 - </div>
9421 - <!-- /.tab-pane -->
9422 - <!-- Stats tab content -->
9423 - <div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
9424 - <!-- /.tab-pane -->
9425 - <!-- Settings tab content -->
9426 - <div class="tab-pane" id="control-sidebar-settings-tab">
9427 - <form method="post">
9428 - <h3 class="control-sidebar-heading">General Settings</h3>
9429 -
9430 - <div class="form-group">
9431 - <label class="control-sidebar-subheading">
9432 - Report panel usage
9433 - <input type="checkbox" class="pull-right">
9434 - </label>
9435 -
9436 - <p>
9437 - Some information about this general settings option
9438 - </p>
9439 - </div>
9440 - <!-- /.form-group -->
9441 - </form>
9442 - </div>
9443 - <!-- /.tab-pane -->
9444 - </div>
9445 - </aside>
9446 - <!-- /.control-sidebar -->
9447 - <!-- Add the sidebar's background. This div must be placed
9448 - immediately after the control sidebar -->
9449 - <div class="control-sidebar-bg"></div>
9450 -</div>
9451 -<!-- ./wrapper -->
9452 -
9453 -<!-- REQUIRED JS SCRIPTS -->
9454 -
9455 -<!-- jQuery 3 -->
9456 -<script src="../bower_components/jquery/dist/jquery.min.js"></script>
9457 -<!-- Bootstrap 3.3.7 -->
9458 -<script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
9459 -<!-- AdminLTE App -->
9460 -<script src="../dist/js/adminlte.min.js"></script>
9461 -
9462 -<!-- Optionally, you can add Slimscroll and FastClick plugins.
9463 - Both of these plugins are recommended to enhance the
9464 - user experience. -->
9465 -</body>
9466 -</html>
9467 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_rbl.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_rbl.html.ep
9468 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_rbl.html.ep 2020-04-08 23:43:08.000000000 +0400
9469 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_rbl.html.ep 1970-01-01 04:00:00.000000000 +0400
9470 @@ -1,93 +0,0 @@
9471 -<section class="content">
9472 -<div>
9473 -
9474 - <p>Returned Values</p>
9475 - First line is from returned from list:
9476 - <%= $listR %>
9477 - <br />
9478 -</div>
9479 -<br />
9480 -<div>
9481 - Form starts here
9482 - <br />
9483 - <br />
9484 -
9485 -No idea how to set the radio button to the correct status.
9486 -We could use a dropdown Enabled/Disabled instead
9487 -<br />
9488 -<br />
9489 -
9490 -<b>DNSBL</b>
9491 -<br />
9492 -% param dnsbl => 'disabled' unless $dnsbl eq 'enabled';
9493 -<%= radio_button 'dnsbl' => 'enabled' %> Enabled
9494 -<%= radio_button 'dnsbl' => 'disabled' %> Disabled
9495 -
9496 -<br />
9497 -<br />
9498 -
9499 -<b>RHSBL</b>
9500 -<br />
9501 -% param rhsbl => 'disabled' unless $dnsbl eq 'enabled';
9502 -<%= radio_button 'rhsbl' => 'enabled' %> Enabled
9503 -<%= radio_button 'rhsbl' => 'disabled' %> Disabled
9504 -
9505 -<br />
9506 -<br />
9507 -
9508 -<b>URI BL</b>
9509 -<br />
9510 -% param uribl => 'disabled' unless $dnsbl eq 'enabled';
9511 -<%= radio_button 'uribl' => 'enabled' %> Enabled
9512 -<%= radio_button 'uribl' => 'disabled' %> Disabled
9513 -
9514 -<br />
9515 -<br />
9516 -
9517 -<form name="list" action="" method="POST">
9518 -
9519 -<table>
9520 -<tbody>
9521 -<tr>
9522 -<b>RBL List</b>
9523 -<br />
9524 -%= text_area story => (cols => 40) => begin
9525 -% for (@{ stash('rbllist') }) {
9526 -%= $_
9527 -% }
9528 -%end
9529 -<br />
9530 -<tr />
9531 -
9532 -<tr>
9533 -<b>SBL List</b>
9534 -<br />
9535 -%= text_area story => (cols => 40) => begin
9536 -% for (@{ stash('sbllist') }) {
9537 -%= $_
9538 -% }
9539 -%end
9540 -<br />
9541 -
9542 -<b>URL List</b>
9543 -<br />
9544 -%= text_area story => (cols => 40) => begin
9545 -% for (@{ stash('ubllist') }) {
9546 -%= $_
9547 -% }
9548 -%end
9549 -<br />
9550 -
9551 -</tr>
9552 -</tbody>
9553 -</table>
9554 -
9555 -<input type="submit" value="Submit">
9556 -</form>
9557 -
9558 -<br />
9559 -<br />
9560 -
9561 -</div>
9562 -
9563 -</section><!-- /.content -->
9564 \ Pas de fin de ligne à la fin du fichier
9565 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_unavailable.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_unavailable.html.ep
9566 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_unavailable.html.ep 2020-04-08 23:43:08.000000000 +0400
9567 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_unavailable.html.ep 1970-01-01 04:00:00.000000000 +0400
9568 @@ -1,7 +0,0 @@
9569 -<div>
9570 - <section class="content">
9571 -
9572 -No data available
9573 -
9574 - </section><!-- /.content -->
9575 -</div>
9576 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_useraccounts.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_useraccounts.html.ep
9577 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_useraccounts.html.ep 2020-04-08 23:43:08.000000000 +0400
9578 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_useraccounts.html.ep 1970-01-01 04:00:00.000000000 +0400
9579 @@ -1,39 +0,0 @@
9580 -<div>
9581 - <section class="content">
9582 - <p>Returned Values</p>
9583 - First line is from returned from list:
9584 - <%= $listR %>
9585 - <br />
9586 - </section><!-- /.content -->
9587 -</div>
9588 -<br />
9589 -
9590 -<div>
9591 - <section class="content">
9592 -
9593 - Form starts here
9594 - <br />
9595 -
9596 -<table>
9597 -<tbody>
9598 -<tr>
9599 -
9600 -% for my @user (@{ stash('userlist') }) {
9601 - % for my $key (@$user) {
9602 - <td>
9603 - %= $key
9604 - </td>
9605 - %}
9606 -% }
9607 -
9608 -</tr>
9609 -
9610 -
9611 -</tbody>
9612 -</table>
9613 -
9614 -<br />
9615 -<br />
9616 -
9617 - </section><!-- /.content -->
9618 -</div>
9619 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_white.html.ep smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_white.html.ep
9620 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_white.html.ep 2020-04-08 23:43:08.000000000 +0400
9621 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/templates/_white.html.ep 1970-01-01 04:00:00.000000000 +0400
9622 @@ -1,85 +0,0 @@
9623 -<section class="content">
9624 -<div>
9625 - <p>Returned Values</p>
9626 - First line is from returned from list:
9627 - <%= $listR %>
9628 - <br />
9629 -</div>
9630 -<br />
9631 -<div>
9632 - Form starts here
9633 -<br />
9634 -
9635 -<form name="list" action="" method="POST">
9636 -<table>
9637 -<tbody>
9638 -<tr>
9639 -
9640 -<b>Whitelist hosts</b>
9641 -<br />
9642 -%= text_area story => (cols => 40) => begin
9643 -% for (@{ stash('whitehosts') }) {
9644 -%= $_
9645 -% }
9646 -%end
9647 -<br />
9648 -<br />
9649 -
9650 -<b>Whitelist helo</b>
9651 -<br />
9652 -%= text_area story => (cols => 40) => begin
9653 -% for (@{ stash('whitehelo') }) {
9654 -%= $_
9655 -% }
9656 -%end
9657 -<br />
9658 -<br />
9659 -
9660 -<b>Whitelist senders</b>
9661 -<br />
9662 -%= text_area story => (cols => 40) => begin
9663 -% for (@{ stash('whitesenders') }) {
9664 -%= $_
9665 -% }
9666 -%end
9667 -<br />
9668 -<br />
9669 -
9670 -<b>Spamassasin from</b>
9671 -<br />
9672 -%= text_area story => (cols => 40) => begin
9673 -% for (@{ stash('whitefrom') }) {
9674 -%= $_
9675 -% }
9676 -%end
9677 -<br />
9678 -<br />
9679 -
9680 -<input type="submit" value="Submit">
9681 -</form>
9682 -
9683 -</tr>
9684 -</tbody>
9685 -</table>
9686 -
9687 -<br />
9688 -<br />
9689 -Sample text areas
9690 -<br />
9691 -
9692 -%= text_area 'story'
9693 -<br />
9694 -%= text_area 'story', cols => 40
9695 -<br />
9696 -%= text_area story => 'Default\nDove', cols => 40
9697 -<br />
9698 -%= text_area story => (cols => 40) => begin
9699 - Default
9700 - Swan
9701 -% end
9702 -<br />
9703 -<br />
9704 -
9705 -</div>
9706 -
9707 -</section><!-- /.content -->
9708 \ Pas de fin de ligne à la fin du fichier
9709 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/useraccounts smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/useraccounts
9710 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/useraccounts 2020-04-08 23:43:08.000000000 +0400
9711 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/useraccounts 1970-01-01 04:00:00.000000000 +0400
9712 @@ -1,52 +0,0 @@
9713 -#!/usr/bin/perl
9714 -# no -d allowed when running suid from the cgi-bin dir :-(
9715 -#-wT
9716 -# vim: ft=xml:
9717 -
9718 -#----------------------------------------------------------------------
9719 -# heading : Configuration
9720 -# description : E-mail WBL
9721 -# navigation : 6000 6710
9722 -#----------------------------------------------------------------------
9723 -
9724 -use strict;
9725 -use warnings;
9726 -use Mojolicious::Lite;
9727 -use smeserver::Panel::useraccountsNew;
9728 -
9729 -#use esmith::wblNew;
9730 -
9731 -# We can use separate template in templates/somefile.html.ep
9732 -# plugin 'HTMLTemplateProRenderer';
9733 -
9734 -# Load up our wbl subroutines
9735 -# my $f = esmith::wblNew->new();
9736 -
9737 -# Initial setup when called
9738 -# get '/useraccounts' => sub {
9739 -
9740 -get '/' => sub {
9741 -
9742 - my ($mojo) = @_;
9743 -
9744 - my @useraccounts = get_user_accounts();
9745 -
9746 - if ( scalar @useraccounts ) {
9747 -
9748 - $mojo->stash( userlist => \@useraccounts );
9749 -
9750 - # This is the template fragment to be embedded in main
9751 - $mojo->stash( contentVar => '_useraccounts' );
9752 -
9753 - }
9754 -
9755 - else {
9756 - $mojo->stash( contentVar => '_unavailable' );
9757 - }
9758 -
9759 - $mojo->render( template => 'main' );
9760 -};
9761 -
9762 -
9763 -app->start;
9764 -
9765 diff -aurN smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/wbl smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/wbl
9766 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/wbl 2020-04-08 23:43:08.000000000 +0400
9767 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/wbl 1970-01-01 04:00:00.000000000 +0400
9768 @@ -1,165 +0,0 @@
9769 -#!/usr/bin/perl
9770 -# no -d allowed when running suid from the cgi-bin dir :-(
9771 -#-wT
9772 -# vim: ft=xml:
9773 -
9774 -#----------------------------------------------------------------------
9775 -# heading : Configuration
9776 -# description : E-mail WBL
9777 -# navigation : 6000 6710
9778 -#----------------------------------------------------------------------
9779 -
9780 -use strict;
9781 -use warnings;
9782 -use Mojolicious::Lite;
9783 -use smeserver::Panel::wblNew;
9784 -
9785 -
9786 -# We can use separate template in templates/somefile.html.ep
9787 -# plugin 'HTMLTemplateProRenderer';
9788 -
9789 -# Load up our wbl subroutines
9790 -# my $f = esmith::wblNew->new();
9791 -
9792 -# Initial setup when called
9793 -get '/' => sub {
9794 -
9795 - my ($mojo) = @_;
9796 -
9797 - # Setup our 3 - test
9798 - # $mojo->stash( RBL => 'RBL List', Black => 'Black List', White => 'White List' );
9799 -
9800 - # Or use a dropdown list
9801 - my @wblList = ( 'RBL List', 'Black List', 'White List' );
9802 - $mojo->stash( list => \@wblList );
9803 -
9804 - # This is the template fragment to be embedded in main
9805 - $mojo->stash( contentVar => '_choice' );
9806 -
9807 - # And now we render main
9808 - $mojo->render( template => 'main' );
9809 -
9810 -};
9811 -
9812 -#get 'test1' => sub {
9813 -#};
9814 -
9815 -#get 'test2' => sub {
9816 -#};
9817 -
9818 -# called via post
9819 -post '/' => sub {
9820 -
9821 - # push the returned array to the $mojo array
9822 - my $mojo = shift;
9823 -
9824 - my $button = $mojo->param('button');
9825 -
9826 - # This is the name used in the select_files e.g. 'list'
9827 - my $list = $mojo->param('list');
9828 -
9829 - # We should put the vars below into these SWITCH statements
9830 - # We can then check the call in the $list var.
9831 - # If it is a straightforward POST call we return a template
9832 - # If it is like wbl.cgi?get_dnsbl or wbl.cgi?get_rblSettings or similar
9833 - # we could return some JSON instead
9834 - # Just needs some logic to figure the call style and output relevant data
9835 -
9836 - # Hmm some of this comes back as a carriage return separated array
9837 - # For now removed the \n and join in the wbl.pm file
9838 - # eg joe@domain.com\nfred@domain.com
9839 - #
9840 -
9841 - SWITCH: {
9842 -
9843 - if ( $list =~ /^RBL List/ ) {
9844 -
9845 - # Set the template we require
9846 - # You could do some logic to either call a template to output the data,
9847 - # or alternatively answer a query with some JSON instead
9848 - $mojo->stash( contentVar => '_rbl' );
9849 -
9850 - # Set the retrieved list name to display it for testing
9851 - $mojo->stash( listR => $list );
9852 -
9853 - # For RBL List
9854 - # dnsbl - returns 'enabled/disabled
9855 - my $dnsbl = get_dnsbl();
9856 - $mojo->stash( dnsbl => $dnsbl );
9857 -
9858 - # rhsbl - returns 'enabled/disabled
9859 - my $rhsbl = get_rhsbl();
9860 - $mojo->stash( rhsbl => $rhsbl );
9861 -
9862 - # uribl - returns 'enabled/disabled
9863 - my $uribl = get_uribl();
9864 - $mojo->stash( uribl => $uribl );
9865 -
9866 - # For SBLList List
9867 - my @sbllist = get_sbllist();
9868 - $mojo->stash( sbllist => \@sbllist );
9869 -
9870 - # For RBLList List
9871 - my @rbllist = get_rbllist();
9872 - $mojo->stash( rbllist => \@rbllist );
9873 -
9874 - # For URLList List
9875 - my @ubllist = get_ubllist();
9876 - $mojo->stash( ubllist => \@ubllist );
9877 -
9878 - }
9879 - if ( $list =~ /^Black List/ ) {
9880 -
9881 - # Set the template we require
9882 - # You could do some logic to either call a template to output the data,
9883 - # or alternatively answer a query with some JSON instead
9884 - $mojo->stash( contentVar => '_black' );
9885 -
9886 - # Set the retrieved list name to display it for testing
9887 - $mojo->stash( listR => $list );
9888 -
9889 - # For Black List
9890 - my @badhelo = get_badhelo();
9891 - $mojo->stash( badhelo => \@badhelo );
9892 -
9893 - my @badmailfrom = get_badmailfrom();
9894 - $mojo->stash( badmailfrom => \@badmailfrom );
9895 -
9896 - }
9897 - if ( $list =~ /^White List/ ) {
9898 -
9899 - # Set the template we require
9900 - # You could do some logic to either call a template to output the data,
9901 - # or alternatively answer a query with some JSON instead
9902 - $mojo->stash( contentVar => '_white' );
9903 -
9904 - # Set the retrieved list name to display it for testing
9905 - $mojo->stash( listR => $list );
9906 -
9907 - # For WBL List
9908 - my @whitelistsenders = get_whitelistsenders();
9909 - $mojo->stash( whitesenders => \@whitelistsenders );
9910 -
9911 - my @whitelisthelo = get_whitelisthelo();
9912 - $mojo->stash( whitehelo => \@whitelisthelo );
9913 -
9914 - my @whitelisthosts = get_whitelisthosts();
9915 - $mojo->stash( whitehosts => \@whitelisthosts );
9916 -
9917 - my @whitelistfrom = get_whitelistfrom();
9918 - $mojo->stash( whitefrom => \@whitelistfrom );
9919 -
9920 - }
9921 -
9922 - # Fall through back to choice list
9923 - # Not sure how do do an 'else' though !
9924 - # my @wblList = ( 'RBL List', 'Black List', 'White List' );
9925 - # $mojo->stash( list => \@wblList );
9926 - # $mojo->stash( contentVar => '_choice' );
9927 - }
9928 -
9929 - $mojo->render( template => 'main' );
9930 -};
9931 -
9932 -app->start;
9933 -
9934 diff -aurN smeserver-manager-0.1.0.old/root/usr/share/perl5/vendor_perl/smeserver/Panel/useraccountsNew.pm smeserver-manager-0.1.0/root/usr/share/perl5/vendor_perl/smeserver/Panel/useraccountsNew.pm
9935 --- smeserver-manager-0.1.0.old/root/usr/share/perl5/vendor_perl/smeserver/Panel/useraccountsNew.pm 2020-04-08 23:43:08.000000000 +0400
9936 +++ smeserver-manager-0.1.0/root/usr/share/perl5/vendor_perl/smeserver/Panel/useraccountsNew.pm 1970-01-01 04:00:00.000000000 +0400
9937 @@ -1,1310 +0,0 @@
9938 -#!/usr/bin/perl -w
9939 -
9940 -#----------------------------------------------------------------------
9941 -# $Id: smeserver-manager-add-basic-files.patch,v 1.1 2019/12/15 22:14:17 jcrisp Exp $
9942 -#----------------------------------------------------------------------
9943 -# copyright (C) 1999-2006 Mitel Networks Corporation
9944 -#
9945 -# This program is free software; you can redistribute it and/or modify
9946 -# it under the terms of the GNU General Public License as published by
9947 -# the Free Software Foundation; either version 2 of the License, or
9948 -# (at your option) any later version.
9949 -#
9950 -# This program is distributed in the hope that it will be useful,
9951 -# but WITHOUT ANY WARRANTY; without even the implied warranty of
9952 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9953 -# GNU General Public License for more details.
9954 -#
9955 -# You should have received a copy of the GNU General Public License
9956 -# along with this program; if not, write to the Free Software
9957 -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
9958 -#----------------------------------------------------------------------
9959 -package smeserver::Panel::useraccountsNew;
9960 -
9961 -use strict;
9962 -
9963 -# Get shot of FormMagick and cgi
9964 -
9965 -
9966 -use esmith::AccountsDB;
9967 -use esmith::ConfigDB;
9968 -#use esmith::FormMagick;
9969 -#use esmith::cgi;
9970 -use esmith::util;
9971 -use File::Basename;
9972 -use Exporter;
9973 -use Carp qw(verbose);
9974 -
9975 -# This will have to go - where do we need it ?
9976 -our @ISA = qw( Exporter);
9977 -
9978 -# Anything with print is a non starter and should be renamed
9979 -our @EXPORT = qw(
9980 - get_user_accounts
9981 - print_user_table
9982 - print_acctName_field
9983 - print_groupMemberships_field
9984 - print_page_description
9985 - get_ldap_value
9986 - username_clash
9987 - pseudonym_clash
9988 - handle_user_accounts
9989 - modify_admin
9990 - emailforward
9991 - verifyPasswords
9992 - lock_account
9993 - remove_account
9994 - reset_password
9995 - check_password
9996 - print_save_or_add_button
9997 - get_pptp_value
9998 - print_ipsec_client_section
9999 - get_prop
10000 -
10001 - system_password_compare
10002 - system_valid_password
10003 - system_change_password
10004 - system_check_password
10005 - system_authenticate_password
10006 -);
10007 -
10008 -our $VERSION = sprintf '%d.%03d', q$Revision: 1.1 $ =~ /: (\d+).(\d+)/;
10009 -
10010 -our $accountdb = esmith::AccountsDB->open();
10011 -our $configdb = esmith::ConfigDB->open();
10012 -
10013 -=pod
10014 -
10015 -=head1 NAME
10016 -
10017 -esmith::FormMagick::Panels::useraccounts - useful panel functions
10018 -
10019 -=head1 SYNOPSIS
10020 -
10021 -use esmith::FormMagick::Panels::useraccount;
10022 -
10023 -my $panel = esmith::FormMagick::Panel::useraccount->new();
10024 -$panel->display();
10025 -
10026 -=head1 DESCRIPTION
10027 -
10028 -
10029 -=head2 new();
10030 -
10031 -Exactly as for esmith::FormMagick
10032 -
10033 -=begin testing
10034 -
10035 -$ENV{ESMITH_ACCOUNT_DB} = "10e-smith-base/accounts.conf";
10036 -$ENV{ESMITH_CONFIG_DB} = "10e-smith-base/configuration.conf";
10037 -
10038 -open DATA, "echo '<form></form>'|";
10039 -use_ok('esmith::FormMagick::Panel::useraccounts');
10040 -use vars qw($panel);
10041 -ok($panel = esmith::FormMagick::Panel::useraccounts->new(),
10042 -"Create panel object");
10043 -close DATA;
10044 -isa_ok($panel, 'esmith::FormMagick::Panel::useraccounts');
10045 -$panel->{cgi} = CGI->new();
10046 -$panel->parse_xml();
10047 -
10048 -{ package esmith::FormMagick::Panel::useraccounts;
10049 -our $accountdb;
10050 -::isa_ok($accountdb, 'esmith::AccountsDB');
10051 -}
10052 -
10053 -=end testing
10054 -
10055 -=cut
10056 -
10057 -# Errrr ? No FormMagick now.
10058 -sub new {
10059 - shift;
10060 - my $self = esmith::FormMagick->new();
10061 - $self->{calling_package} = (caller)[0];
10062 - bless $self;
10063 - return $self;
10064 -}
10065 -
10066 -=head1 HTML GENERATION ROUTINES
10067 -
10068 -Routines for generating chunks of HTML needed by the panel.
10069 -
10070 -=head2 print_user_table
10071 -
10072 -Prints out the user table on the front page.
10073 -
10074 -=for testing
10075 -$panel->print_user_table;
10076 -like($_STDOUT_, qr/bart/, "Found usernames in user table output");
10077 -like($_STDOUT_, qr/ff0000/, "Found red 'reset password' output");
10078 -
10079 -=cut
10080 -
10081 -# The whole print_user_table routine can go - we just need get_users here
10082 -
10083 -sub get_user_accounts {
10084 - #my $self = shift;
10085 - #my $q = $self->{cgi};
10086 - #my $account = $self->localise('ACCOUNT');
10087 - #my $acctName = $self->localise('USER_NAME');
10088 - #
10089 - #my $modify = $self->localise('MODIFY');
10090 - #my $resetpw = $self->localise('PASSWORD_RESET');
10091 - #my $lock = $self->localise('LOCK_ACCOUNT');
10092 - #my $account_locked = $self->localise('ACCOUNT_LOCKED');
10093 - #my $remove = $self->localise('REMOVE');
10094 -
10095 - my @users = $accountdb->get('admin');
10096 - push @users, $accountdb->users();
10097 -
10098 - unless ( scalar @users )
10099 - {
10100 - return "No user accounts available";
10101 - }
10102 - return @users;
10103 -}
10104 -
10105 -# Not required
10106 -
10107 -sub print_user_table {
10108 - my $self = shift;
10109 - my $q = $self->{cgi};
10110 - my $account = $self->localise('ACCOUNT');
10111 - my $acctName = $self->localise('USER_NAME');
10112 -
10113 - my $modify = $self->localise('MODIFY');
10114 - my $resetpw = $self->localise('PASSWORD_RESET');
10115 - my $lock = $self->localise('LOCK_ACCOUNT');
10116 - my $account_locked = $self->localise('ACCOUNT_LOCKED');
10117 - my $remove = $self->localise('REMOVE');
10118 -
10119 - my @users = $accountdb->get('admin');
10120 - push @users, $accountdb->users();
10121 -
10122 - unless ( scalar @users )
10123 - {
10124 - print $q->Tr($q->td($self->localise('NO_USER_ACCOUNTS')));
10125 - return "";
10126 - }
10127 - print " <tr>\n <td colspan=\"2\">\n ";
10128 - print $q->start_table ({-CLASS => "sme-border"}),"\n ";
10129 - print $q->Tr(
10130 - esmith::cgi::genSmallCell($q, $self->localise($account),"header"),
10131 - esmith::cgi::genSmallCell($q, $self->localise($acctName),"header"),
10132 - esmith::cgi::genSmallCell($q, $self->localise('VPN_CLIENT_ACCESS'), "header"),
10133 - esmith::cgi::genSmallCell($q, $self->localise('FORWARDING_ADDRESS'), "header"),
10134 - esmith::cgi::genSmallCell($q, $self->localise('ACTION'),"header",4));
10135 -
10136 - my $scriptname = basename($0);
10137 - my $index=0;
10138 -
10139 - foreach my $u (@users) {
10140 - my $username = $u->key();
10141 - my $first = $u->prop('FirstName');
10142 - my $last = $u->prop('LastName');
10143 - my $lockable = $u->prop('Lockable') || 'yes';
10144 - my $removable = $u->prop('Removable') || 'yes';
10145 - my $fwd = (($u->prop('EmailForward') || 'local') =~ m/^forward|both$/) ?
10146 - $u->prop('ForwardAddress') : '';
10147 - my $vpnaccess = $u->prop('VPNClientAccess') || 'no';
10148 - $vpnaccess = $vpnaccess eq 'yes' ? $self->localise('YES') :
10149 - $self->localise('NO');
10150 -
10151 - my $params = $self->build_user_cgi_params($username, $u->props());
10152 -
10153 - my $password_set = $u->prop('PasswordSet');
10154 -
10155 - my $pagenum = ($username eq "admin") ? $self->get_page_by_name('SystemPasswordDummy')
10156 - : $self->get_page_by_name('ResetPasswordDummy');
10157 -
10158 - # make normal links
10159 - my $lock_url = ($password_set eq 'yes') ?
10160 - qq(<a href="$scriptname?$params&Next=Next&wherenext=LockAccount">$lock</a>) :
10161 - qq($account_locked);
10162 -
10163 - $lock_url = "" unless ($lockable eq "yes");
10164 -
10165 - my $where_next = ($username eq "admin") ? "ModifyAdmin" : "CreateModify";
10166 - my $action1 = "<a href=\"$scriptname?page=0&page_stack=&acctName=$username&Next=Next&action=modify&wherenext=$where_next\">$modify</a>";
10167 -
10168 - my $action2 = "<a href=\"$scriptname?page=$pagenum&page_stack=&Next=Next&acctName=$username\">$resetpw</a>";
10169 -
10170 - unless ($password_set eq 'yes')
10171 - {
10172 - $action2 = "<span class='error-noborders'>" . $action2 . "</span>";
10173 - }
10174 -
10175 - my $action3 = ($removable eq "yes") ? "<a href=\"$scriptname?$params&Next=Next&wherenext=RemoveAccount\">$remove</a>" : '';
10176 -
10177 - print $q->Tr(esmith::cgi::genSmallCell($q, $username,"normal")," ",
10178 - esmith::cgi::genSmallCell($q, "$first $last","normal")," ",
10179 - esmith::cgi::genSmallCell($q, $vpnaccess),
10180 - esmith::cgi::genSmallCell($q, $fwd),
10181 - esmith::cgi::genSmallCell($q, "$action1","normal")," ",
10182 - esmith::cgi::genSmallCell($q, "$action2","normal")," ",
10183 - esmith::cgi::genSmallCell($q, "$lock_url","normal")," ",
10184 - esmith::cgi::genSmallCell($q, "$action3","normal"));
10185 -
10186 - $index++;
10187 - }
10188 -
10189 - print qq(</table></td></tr>\n);
10190 -
10191 - return "";
10192 -}
10193 -
10194 -=head2 print_acctName_field
10195 -
10196 -This subroutine is used to generate the Account name field on the form in
10197 -the case of "create user", or to make it a plain uneditable string in the case
10198 -of "modify user".
10199 -
10200 -=begin testing
10201 -
10202 -my $self = esmith::FormMagick::Panel::useraccounts->new();
10203 -$self->{cgi} = CGI->new("");
10204 -print_acctName_field($self);
10205 -like($_STDOUT_, qr/text.*acctName/, "print text field if acctName not set");
10206 -like($_STDOUT_, qr/create/, "action=create if acctName not set");
10207 -$self->{cgi}->param(-name => 'acctName', -value => 'foo');
10208 -$self->{cgi}->param(-name => 'action', -value => 'modify');
10209 -print_acctName_field($self);
10210 -like($_STDOUT_, qr/hidden.*acctName/, "print hidden field if acctName is set");
10211 -like($_STDOUT_, qr/modify/, "action=modify if acctName already set");
10212 -
10213 -=end testing
10214 -
10215 -=cut
10216 -
10217 -sub print_acctName_field {
10218 - my $self = shift;
10219 - my $cgi = $self->{cgi};
10220 - my $an = $cgi->param('acctName') || '';
10221 - print qq(<tr><td class=\"sme-noborders-label\">) . $self->localise('ACCOUNT_NAME') . qq(</td>\n);
10222 - my $action = $cgi->param('action') || '';
10223 - if ( $action eq 'modify') {
10224 - print qq(
10225 - <td>$an
10226 - <input type="hidden" name="acctName" value="$an">
10227 - <input type="hidden" name="action" value="modify">
10228 - </td>
10229 - );
10230 - # if there's no CGI data, fill in the fields with the account db
10231 - # data for this user
10232 - my $rec = $accountdb->get($an);
10233 - my $fn = $cgi->param('FirstName') ?
10234 - $cgi->param('FirstName') :
10235 - ($rec ? ($rec->prop('FirstName')) : '');
10236 - my $ln = $cgi->param('LastName') ?
10237 - $cgi->param('LastName') :
10238 - ($rec ? ($rec->prop('LastName')) : '');
10239 - my $dept = $cgi->param('Dept') ?
10240 - $cgi->param('Dept') :
10241 - ($rec ? ($rec->prop('Dept')) : '');
10242 - my $company = $cgi->param('Company') ?
10243 - $cgi->param('Company') :
10244 - ($rec ? ($rec->prop('Company')) : '');
10245 - my $street = $cgi->param('Street') ?
10246 - $cgi->param('Street') :
10247 - ($rec ? ($rec->prop('Street')) : '');
10248 - my $city = $cgi->param('City') ?
10249 - $cgi->param('City') :
10250 - ($rec ? ($rec->prop('City')) : '');
10251 - my $phone = $cgi->param('Phone') ?
10252 - $cgi->param('Phone') :
10253 - ($rec ? ($rec->prop('Phone')) : '');
10254 - my $emf = $cgi->param('EmailForward') ?
10255 - $cgi->param('EmailForward') :
10256 - ($rec ? ($rec->prop('EmailForward')) : 'local');
10257 - my $fwd = $cgi->param('ForwardAddress') ?
10258 - $cgi->param('ForwardAddress') :
10259 - ($rec ? ($rec->prop('ForwardAddress')) : '');
10260 - my $pptp = $cgi->param('VPNClientAccess') ?
10261 - $cgi->param('VPNClientAccess') :
10262 - ($rec ? ($rec->prop('VPNClientAccess')) : 'no');
10263 - # now that we're down with the 411, let's set the values
10264 - $cgi->param(-name=>'FirstName', -value=>$fn);
10265 - $cgi->param(-name=>'LastName', -value=>$ln);
10266 - $cgi->param(-name=>'Dept', -value=>$dept);
10267 - $cgi->param(-name=>'Company', -value=>$company);
10268 - $cgi->param(-name=>'Street', -value=>$street);
10269 - $cgi->param(-name=>'City', -value=>$city);
10270 - $cgi->param(-name=>'Phone', -value=>$phone);
10271 - $cgi->param(-name=>'EmailForward', -value=>$emf);
10272 - $cgi->param(-name=>'ForwardAddress', -value=>$fwd);
10273 - $cgi->param(-name=>'VPNClientAccess', -value=>$pptp);
10274 - } else {
10275 - print qq(
10276 - <td><input type="text" name="acctName" value="$an">
10277 - <input type="hidden" name="action" value="create">
10278 - </td>
10279 - );
10280 - }
10281 -
10282 - print qq(</tr>\n);
10283 - return undef;
10284 -
10285 -}
10286 -
10287 -=head2 print_groupMemberships_field()
10288 -
10289 -Builds a list of groups for the create/modify user screen.
10290 -
10291 -=begin testing
10292 -
10293 -my $self = esmith::FormMagick::Panel::useraccounts->new();
10294 -$self->{cgi} = CGI->new("");
10295 -$self->print_groupMemberships_field();
10296 -like($_STDOUT_, qr/simpsons/, "Found simpsons in group list");
10297 -like($_STDOUT_, qr/flanders/, "Found flanders in group list");
10298 -$self->{cgi}->param(-name => 'acctName', -value => 'rod');
10299 -$self->print_groupMemberships_field();
10300 -like($_STDOUT_, qr/checked value="flanders"/, "Checked flanders group for user rod");
10301 -
10302 -=end testing
10303 -
10304 -=cut
10305 -
10306 -sub print_groupMemberships_field {
10307 - my ($self) = @_;
10308 - my $q = $self->{cgi};
10309 - my $user = $q->param('acctName');
10310 -
10311 - if (my @groups = $accountdb->groups()) {
10312 -
10313 - print "<tr><td class=\"sme-noborders-label\">",
10314 - $self->localise('GROUP_MEMBERSHIPS'),
10315 - "</td><td>\n";
10316 -
10317 - print $q->start_table({-class => "sme-border"}),"\n";
10318 - print $q->Tr(
10319 - esmith::cgi::genSmallCell($q, $self->localise('MEMBER'),"header"),
10320 - esmith::cgi::genSmallCell($q, $self->localise('GROUP'),"header"),
10321 - esmith::cgi::genSmallCell($q, $self->localise('DESCRIPTION'),"header")
10322 - );
10323 -
10324 - foreach my $g (@groups) {
10325 - my $groupname = $g->key();
10326 - my $checked;
10327 - if ($user and $accountdb->is_user_in_group($user, $groupname)) {
10328 - $checked = 'checked';
10329 - } else {
10330 - $checked = '';
10331 - }
10332 -
10333 - print $q->Tr(
10334 - $q->td(
10335 - "<input type=\"checkbox\""
10336 - . " name=\"groupMemberships\""
10337 - . " $checked value=\"$groupname\">"
10338 - ),
10339 - esmith::cgi::genSmallCell($q, $groupname,"normal"),
10340 - esmith::cgi::genSmallCell( $q, $accountdb->get($groupname)->prop("Description"),"normal")
10341 - );
10342 - }
10343 -
10344 - print "</table></td></tr>\n";
10345 -
10346 - }
10347 -
10348 - return undef;
10349 -
10350 -}
10351 -
10352 -=head2 print_page_description($self, "reset|lock|remove")
10353 -
10354 -Generates the page description for the the somewhat similar Reset
10355 -Password, Lock Account and Remove Account pages.
10356 -
10357 -=begin testing
10358 -
10359 -my $self = esmith::FormMagick::Panel::useraccounts->new();
10360 -$self->{cgi} = CGI->new({ acctName => 'bart' });
10361 -print_page_description($self, "reset");
10362 -like($_STDOUT_, qr/bart/, "print_page_description prints username");
10363 -like($_STDOUT_, qr/Bart Simpson/, "print_page_description prints name");
10364 -like($_STDOUT_, qr/RESET_DESC/, "print_page_description prints description");
10365 -
10366 -=end testing
10367 -
10368 -=cut
10369 -
10370 -sub print_page_description {
10371 - my ($self, $pagename) = @_;
10372 - unless (grep /^$pagename$/, qw(reset lock remove)) {
10373 - warn "Can't generate page description for invalid pagename $pagename\n";
10374 - return;
10375 - }
10376 -
10377 - $pagename = uc($pagename);
10378 -
10379 - my $desc = $self->localise("${pagename}_DESC");
10380 - my $desc2 = $self->localise("${pagename}_DESC2");
10381 -
10382 - my $acctName = $self->{cgi}->param('acctName');
10383 - my $name = $accountdb->get($acctName)->prop('FirstName') . " "
10384 - . $accountdb->get($acctName)->prop('LastName');
10385 -
10386 - print qq{
10387 - <tr><td colspan="2">
10388 - <p>$desc "$acctName" ($name)</p>
10389 - $desc2
10390 - <input type="hidden" name="acctName" value="$acctName">
10391 - </td></tr>
10392 - };
10393 -
10394 - return;
10395 -}
10396 -
10397 -=head1 ROUTINES FOR FILLING IN FIELD DEFAULT VALUES
10398 -
10399 -=head2 get_ldap_value($field)
10400 -
10401 -This subroutine generates the default field value on the form using the
10402 -parameter specified.
10403 -
10404 -In this case, the default field values come from LDAP/directory
10405 -settings.
10406 -
10407 -If a CGI parameter has been passed that contains an account name, we
10408 -assume that a value has already been set, as we're modifying a user, and
10409 -use that value instead of a default.
10410 -
10411 -=for testing
10412 -my $self = esmith::FormMagick::Panel::useraccounts->new();
10413 -$self->{cgi} = CGI->new("");
10414 -is(get_ldap_value($self, "Dept"), "Main", "Pick up default value from LDAP");
10415 -$self->{cgi} = CGI->new({ acctName => 'bart' });
10416 -is(get_ldap_value($self, "Dept"), undef, "Don't pick up LDAP data if username provided");
10417 -
10418 -=cut
10419 -
10420 -sub get_ldap_value {
10421 - my ($self, $field) = @_;
10422 -
10423 - # don't do the lookup if this is a modification of an existing user
10424 - if ($self->{cgi}->param('acctName')) {
10425 - return $self->{cgi}->param($field);
10426 - }
10427 -
10428 - my %CGIParam2DBfield = (
10429 - Dept => 'defaultDepartment',
10430 - Company => 'defaultCompany',
10431 - Street => 'defaultStreet',
10432 - City => 'defaultCity',
10433 - Phone => 'defaultPhoneNumber'
10434 - );
10435 -
10436 - return $configdb->get('ldap')->prop($CGIParam2DBfield{$field});
10437 -}
10438 -
10439 -sub get_pptp_value
10440 -{
10441 - return $configdb->get('pptpd')->prop('AccessDefault') || 'no';
10442 -}
10443 -
10444 -=head1 VALIDATION ROUTINES
10445 -
10446 -=head2 pseudonym_clash
10447 -
10448 -Validation routine to check whether a the first/last names clash with
10449 -existing pseudonyms.
10450 -
10451 -Note that it won't be considered a "clash" if there is an existing
10452 -pseudonym which belongs to the same user -- it's only a clash if the
10453 -generated pseudonyms are the same but the usernames aren't.
10454 -
10455 -=begin testing
10456 -
10457 -my $self = esmith::FormMagick::Panel::useraccounts->new();
10458 -
10459 -$self->{cgi} = CGI->new({
10460 - acctName => 'skud',
10461 - FirstName => 'Kirrily',
10462 - LastName => 'Robert'
10463 -});
10464 -
10465 -is (pseudonym_clash($self, 'Kirrily'), "OK", "New name doesn't clash pseudonyms");
10466 -
10467 -$self->{cgi} = CGI->new({
10468 - acctName => 'bart2',
10469 - FirstName => 'Bart',
10470 - LastName => 'Simpson'
10471 -});
10472 -
10473 -isnt(pseudonym_clash($self, 'Bart'), "OK", "Existing pseudonym with non-matching username causes clash");
10474 -
10475 -$self->{cgi} = CGI->new({
10476 - acctName => 'bart',
10477 - FirstName => 'Bart',
10478 - LastName => 'Simpson'
10479 -});
10480 -
10481 -is(pseudonym_clash($self, 'Bart'), "OK", "Existing pseudonym with matching username shouldn't clash");
10482 -
10483 -=end testing
10484 -
10485 -=cut
10486 -
10487 -sub pseudonym_clash {
10488 - my ($self, $first) = @_;
10489 - $first ||= "";
10490 - my $last = $self->{cgi}->param('LastName') || "";
10491 - my $acctName = $self->{cgi}->param('acctName') || "";
10492 -
10493 - my $up = "$first $last";
10494 -
10495 - $up =~ s/^\s+//;
10496 - $up =~ s/\s+$//;
10497 - $up =~ s/\s+/ /g;
10498 - $up =~ s/\s/_/g;
10499 -
10500 - my $dp = $up;
10501 - $dp =~ s/_/./g;
10502 -
10503 - $dp = $accountdb->get($dp);
10504 - $up = $accountdb->get($up);
10505 -
10506 - my $da = $dp->prop('Account') if $dp;
10507 - my $ua = $up->prop('Account') if $up;
10508 - if ($dp and $da and $da ne $acctName)
10509 - {
10510 - return $self->localise('PSEUDONYM_CLASH',
10511 - {
10512 - acctName => $acctName,
10513 - clashName => $da,
10514 - pseudonym => $dp->key
10515 - });
10516 - }
10517 - elsif ($up and $ua and $ua ne $acctName)
10518 - {
10519 - return $self->localise('PSEUDONYM_CLASH',
10520 - {
10521 - acctName => $acctName,
10522 - clashName => $ua,
10523 - pseudonym => $up->key
10524 - });
10525 - }
10526 - else
10527 - {
10528 - return "OK";
10529 - }
10530 -}
10531 -
10532 -=head2 emailforward()
10533 -
10534 -Validation routine for email forwarding
10535 -
10536 -=cut
10537 -
10538 -sub emailforward {
10539 - my ($self, $data) = @_;
10540 - my $response = $self->email_simple($data);
10541 - if ($response eq "OK")
10542 - {
10543 - return "OK";
10544 - }
10545 - elsif ($data eq "")
10546 - {
10547 - # Blank is ok, only if we're not forwarding, which means that the
10548 - # EmailForward param must be set to 'local'.
10549 - my $email_forward = $self->{cgi}->param('EmailForward') || '';
10550 - $email_forward =~ s/^\s+|\s+$//g;
10551 - return 'OK' if $email_forward eq 'local';
10552 - return $self->localise('CANNOT_CONTAIN_WHITESPACE');
10553 - }
10554 - else
10555 - {
10556 - return $self->localise('CANNOT_CONTAIN_WHITESPACE')
10557 - if ( $data =~ /\s+/ );
10558 - # Permit a local address.
10559 - return "OK" if $data =~ /^[a-zA-Z][a-zA-Z0-9\._\-]*$/;
10560 - return $self->localise('UNACCEPTABLE_CHARS');
10561 - }
10562 -}
10563 -
10564 -=head2 verifyPasswords()
10565 -
10566 -Returns an error message if the two new passwords input don't match.
10567 -
10568 -=cut
10569 -
10570 -sub verifyPasswords {
10571 - my $self = shift;
10572 - my $pass2 = shift;
10573 -
10574 - my $pass1 = $self->{cgi}->param('password1');
10575 - unless ($pass1 eq $pass2) {
10576 - $self->{cgi}->param( -name => 'wherenext', -value => 'Password' );
10577 - return "PASSWORD_VERIFY_ERROR";
10578 - }
10579 - return "OK";
10580 -}
10581 -
10582 -=head1 CREATING AND MODIFYING USERS
10583 -
10584 -=head2 handle_user_accounts()
10585 -
10586 -This is the routine called by the "Save" button on the create/modify page.
10587 -It checks the "action" param and calls either create_user() or modify_user()
10588 -as appropriate.
10589 -
10590 -=cut
10591 -
10592 -sub handle_user_accounts {
10593 - my ($self) = @_;
10594 -
10595 - my $cgi = $self->{cgi};
10596 -
10597 - if ($cgi->param("action") eq "create") {
10598 - my $msg = create_user($self);
10599 - if ($msg eq 'USER_CREATED')
10600 - {
10601 - $self->success($msg);
10602 - }
10603 - else
10604 - {
10605 - $self->error($msg);
10606 - }
10607 - }
10608 - else {
10609 - modify_user($self);
10610 - $self->success('USER_MODIFIED');
10611 - }
10612 -}
10613 -
10614 -=head2 print_save_or_add_button()
10615 -
10616 -=cut
10617 -
10618 -sub print_save_or_add_button {
10619 -
10620 - my ($self) = @_;
10621 -
10622 - my $cgi = $self->{cgi};
10623 -
10624 - if (($cgi->param("action") || '') eq "modify") {
10625 - $self->print_button("SAVE");
10626 - } else {
10627 - $self->print_button("ADD");
10628 - }
10629 -
10630 -}
10631 -
10632 -=head2 modify_admin($self)
10633 -
10634 -=cut
10635 -
10636 -sub modify_admin
10637 -{
10638 - my ($self) = @_;
10639 -
10640 - my $acct = $accountdb->get('admin');
10641 -
10642 - my %newProperties = (
10643 - 'FirstName' => $self->{cgi}->param('FirstName'),
10644 - 'LastName' => $self->{cgi}->param('LastName'),
10645 - 'EmailForward' => $self->{cgi}->param('EmailForward'),
10646 - 'ForwardAddress' => $self->{cgi}->param('ForwardAddress'),
10647 - 'VPNClientAccess'=> $self->{cgi}->param('VPNClientAccess'),
10648 - );
10649 -
10650 - $acct->merge_props(%newProperties);
10651 -
10652 - undef $accountdb;
10653 -
10654 - my $status =
10655 - system ("/sbin/e-smith/signal-event", "user-modify-admin", 'admin');
10656 -
10657 - $accountdb = esmith::AccountsDB->open();
10658 -
10659 - if ($status == 0)
10660 - {
10661 - $self->success('USER_MODIFIED', 'First');
10662 - }
10663 - else
10664 - {
10665 - $self->error('CANNOT_MODIFY_USER', 'First');
10666 - }
10667 - return;
10668 -}
10669 -
10670 -=head2 modify_user($self)
10671 -
10672 -=cut
10673 -
10674 -sub modify_user {
10675 - my ($self) = @_;
10676 - my $acctName = $self->{cgi}->param('acctName');
10677 -
10678 - unless (($acctName) = ($acctName =~ /^(\w[\-\w_\.]*)$/)) {
10679 - return $self->error($self->localise('TAINTED_USER',
10680 - { acctName => $acctName }));
10681 - }
10682 - # Untaint the username before use in system()
10683 - $acctName = $1;
10684 -
10685 - my $acct = $accountdb->get($acctName);
10686 - my $acctType = $acct->prop('type');
10687 -
10688 - if ($acctType eq "user")
10689 - {
10690 - $accountdb->remove_user_auto_pseudonyms($acctName);
10691 - my %newProperties = (
10692 - 'FirstName' => $self->{cgi}->param('FirstName'),
10693 - 'LastName' => $self->{cgi}->param('LastName'),
10694 - 'Phone' => $self->{cgi}->param('Phone'),
10695 - 'Company' => $self->{cgi}->param('Company'),
10696 - 'Dept' => $self->{cgi}->param('Dept'),
10697 - 'City' => $self->{cgi}->param('City'),
10698 - 'Street' => $self->{cgi}->param('Street'),
10699 - 'EmailForward' => $self->{cgi}->param('EmailForward'),
10700 - 'ForwardAddress' => $self->{cgi}->param('ForwardAddress'),
10701 - 'VPNClientAccess'=> $self->{cgi}->param('VPNClientAccess'),
10702 - );
10703 -
10704 - $acct->merge_props(%newProperties);
10705 -
10706 - $accountdb->create_user_auto_pseudonyms($acctName);
10707 -
10708 - my @old_groups = $accountdb->user_group_list($acctName);
10709 - my @new_groups = $self->{cgi}->param("groupMemberships");
10710 - $accountdb->remove_user_from_groups($acctName, @old_groups);
10711 - $accountdb->add_user_to_groups($acctName, @new_groups);
10712 -
10713 - undef $accountdb;
10714 -
10715 - unless (system ("/sbin/e-smith/signal-event", "user-modify",
10716 - $acctName) == 0) {
10717 - $accountdb = esmith::AccountsDB->open();
10718 - return $self->error('CANNOT_MODIFY_USER');
10719 - }
10720 - $accountdb = esmith::AccountsDB->open();
10721 - }
10722 - $self->success('USER_MODIFIED');
10723 -}
10724 -
10725 -=head2 create_user
10726 -
10727 -Adds a user to the accounts db.
10728 -
10729 -=cut
10730 -
10731 -sub create_user {
10732 - my $self = shift;
10733 - my $q = $self->{cgi};
10734 -
10735 - my $acctName = $q->param('acctName');
10736 -
10737 - my $msg = $self->validate_acctName($acctName);
10738 - unless ($msg eq "OK")
10739 - {
10740 - return $msg;
10741 - }
10742 -
10743 - $msg = $self->validate_acctName_length($acctName);
10744 - unless ($msg eq "OK")
10745 - {
10746 - return $msg;
10747 - }
10748 -
10749 - $msg = $self->validate_acctName_conflict($acctName);
10750 - unless ($msg eq "OK")
10751 - {
10752 - return $msg;
10753 - }
10754 -
10755 - my %userprops;
10756 - foreach my $field ( qw( FirstName LastName Phone Company Dept
10757 - City Street EmailForward ForwardAddress VPNClientAccess) )
10758 - {
10759 - $userprops{$field} = $q->param($field);
10760 - }
10761 - $userprops{'PasswordSet'} = "no";
10762 - $userprops{'type'} = 'user';
10763 -
10764 - my $acct = $accountdb->new_record($acctName)
10765 - or warn "Can't create new account for $acctName (does it already exist?)\n";
10766 - $acct->reset_props(%userprops);
10767 - $accountdb->create_user_auto_pseudonyms($acctName);
10768 - my @groups = $self->{cgi}->param("groupMemberships");
10769 - $accountdb->add_user_to_groups($acctName, @groups);
10770 -
10771 - undef $accountdb;
10772 -
10773 - # Untaint the username before use in system()
10774 - $acctName =~ /^(\w[\-\w_\.]*)$/;
10775 - $acctName = $1;
10776 -
10777 - if (system ("/sbin/e-smith/signal-event", "user-create", $acctName))
10778 - {
10779 - $accountdb = esmith::AccountsDB->open();
10780 - return $self->localise("ERR_OCCURRED_CREATING");
10781 - }
10782 -
10783 - $accountdb = esmith::AccountsDB->open();
10784 -
10785 - $self->set_groups();
10786 - return 'USER_CREATED';
10787 -}
10788 -
10789 -=head2 set_groups
10790 -
10791 -Sets a user's groups in the accounts db. This is called as part of the
10792 -create_user() routine.
10793 -
10794 -=cut
10795 -
10796 -sub set_groups
10797 -{
10798 - my $self = shift;
10799 - my $q = $self->{cgi};
10800 - my $acctName = $q->param('acctName');
10801 -
10802 - my @groups = $q->param('groupMemberships');
10803 - $accountdb->set_user_groups($acctName, @groups);
10804 -
10805 -}
10806 -
10807 -=head1 REMOVING ACCOUNTS
10808 -
10809 -=head2 remove_account()
10810 -
10811 -=cut
10812 -
10813 -sub remove_account {
10814 - my ($self) = @_;
10815 - my $acctName = $self->{cgi}->param('acctName');
10816 -
10817 - my $acct = $accountdb->get($acctName);
10818 - if ($acct->prop('type') eq "user") {
10819 - $acct->set_prop('type', "user-deleted");
10820 -
10821 - undef $accountdb;
10822 -
10823 - # Untaint the username before use in system()
10824 - $acctName =~ /^(\w[\-\w_\.]*)$/;
10825 - $acctName = $1;
10826 - if (system ("/sbin/e-smith/signal-event", "user-delete", $acctName))
10827 - {
10828 - $accountdb = esmith::AccountsDB->open();
10829 - return $self->error("ERR_OCCURRED_DELETING");
10830 - }
10831 -
10832 - $accountdb = esmith::AccountsDB->open();
10833 - $accountdb->get($acctName)->delete;
10834 -
10835 - } else {
10836 - # FIXME - this should be handled by input validation
10837 - # XXX error message here
10838 - }
10839 - $self->{cgi}->param(-name => 'wherenext', -value => 'First');
10840 -}
10841 -
10842 -=head1 RESETTING THE PASSWORD
10843 -
10844 -=head2 reset_password()
10845 -
10846 -=cut
10847 -
10848 -sub reset_password {
10849 - my ($self) = @_;
10850 - my $acctName = $self->{cgi}->param('acctName');
10851 -
10852 - unless (($acctName) = ($acctName =~ /^(\w[\-\w_\.]*)$/)) {
10853 - return $self->error('TAINTED_USER');
10854 - }
10855 - $acctName = $1;
10856 -
10857 - my $acct = $accountdb->get($acctName);
10858 -
10859 - if ( $acct->prop('type') eq "user")
10860 - {
10861 - esmith::util::setUserPassword ($acctName,
10862 - $self->{cgi}->param('password1'));
10863 -
10864 - $acct->set_prop("PasswordSet", "yes");
10865 - undef $accountdb;
10866 -
10867 - if (system("/sbin/e-smith/signal-event", "password-modify", $acctName))
10868 - {
10869 - $accountdb = esmith::AccountsDB->open();
10870 - $self->error("ERR_OCCURRED_MODIFYING_PASSWORD");
10871 - }
10872 - $accountdb = esmith::AccountsDB->open();
10873 -
10874 - $self->success($self->localise('PASSWORD_CHANGE_SUCCEEDED',
10875 - { acctName => $acctName}));
10876 - }
10877 - else
10878 - {
10879 - $self->error($self->localise('NO_SUCH_USER',
10880 - { acctName => $acctName}));
10881 - }
10882 -}
10883 -
10884 -=head1 LOCKING AN ACCOUNT
10885 -
10886 -=head2 lock_account()
10887 -
10888 -=cut
10889 -
10890 -sub lock_account {
10891 - my ($self) = @_;
10892 - my $acctName = $self->{cgi}->param('acctName');
10893 - my $acct = $accountdb->get($acctName);
10894 - if ($acct->prop('type') eq "user")
10895 - {
10896 - undef $accountdb;
10897 -
10898 - # Untaint the username before use in system()
10899 - $acctName =~ /^(\w[\-\w_\.]*)$/;
10900 - $acctName = $1;
10901 - if (system("/sbin/e-smith/signal-event", "user-lock", $acctName))
10902 - {
10903 - $accountdb = esmith::AccountsDB->open();
10904 - return $self->error("ERR_OCCURRED_LOCKING");
10905 - }
10906 -
10907 - $accountdb = esmith::AccountsDB->open();
10908 -
10909 - $self->success($self->localise('LOCKED_ACCOUNT',
10910 - { acctName => $acctName}));
10911 - }
10912 - else
10913 - {
10914 - $self->error($self->localise('NO_SUCH_USER',
10915 - { acctName => $acctName}));
10916 - }
10917 -}
10918 -
10919 -
10920 -=head1 MISCELLANEOUS ROUTINES
10921 -
10922 -=head2 build_user_cgi_params()
10923 -
10924 -Builds a CGI query string based on user data, using various sensible
10925 -defaults and esmith::FormMagick's props_to_query_string() method.
10926 -
10927 -=cut
10928 -
10929 -sub build_user_cgi_params {
10930 - my ($self, $acctName, %oldprops) = @_;
10931 -
10932 - my %props = (
10933 - page => 0,
10934 - page_stack => "",
10935 - ".id" => $self->{cgi}->param('.id') || "",
10936 - acctName => $acctName,
10937 - #%oldprops
10938 - );
10939 -
10940 - return $self->props_to_query_string(\%props);
10941 -}
10942 -
10943 -=pod
10944 -
10945 -=head2 validate_acctName
10946 -
10947 -Checks that the name supplied does not contain any unacceptable chars.
10948 -Returns OK on success or a localised error message otherwise.
10949 -
10950 -=for testing
10951 -is($panel->validate_acctName('foo'), 'OK', 'validate_acctName');
10952 -isnt($panel->validate_acctName('3amigos'), 'OK', ' .. cannot start with number');
10953 -isnt($panel->validate_acctName('betty ford'), 'OK', ' .. cannot contain space');
10954 -
10955 -=cut
10956 -
10957 -sub validate_acctName
10958 -{
10959 - my ($self, $acctName) = @_;
10960 -
10961 - unless ($accountdb->validate_account_name($acctName))
10962 - {
10963 - return $self->localise('ACCT_NAME_HAS_INVALID_CHARS',
10964 - {acctName => $acctName});
10965 - }
10966 - return "OK";
10967 -}
10968 -
10969 -=head2 validate_account_length FM ACCOUNTNAME
10970 -
10971 -returns 'OK' if the account name is shorter than the maximum account name length
10972 -returns 'ACCOUNT_TOO_LONG' otherwise
10973 -
10974 -=begin testing
10975 -
10976 -ok(($panel->validate_acctName_length('foo') eq 'OK'), "a short account name passes");
10977 -ok(($panel->validate_acctName_length('fooooooooooooooooo') eq 'ACCOUNT_TOO_LONG'), "a long account name fails");
10978 -
10979 -=end testing
10980 -
10981 -=cut
10982 -
10983 -sub validate_acctName_length {
10984 - my $self = shift;
10985 - my $acctName = shift;
10986 -
10987 -
10988 - my $maxAcctNameLength = ($configdb->get('maxAcctNameLength')
10989 - ? $configdb->get('maxAcctNameLength')->prop('type')
10990 - : "") || 12;
10991 -
10992 - if ( length $acctName > $maxAcctNameLength ) {
10993 -
10994 - return $self->localise('ACCOUNT_TOO_LONG',
10995 - {maxLength => $maxAcctNameLength});
10996 - }
10997 - else {
10998 - return ('OK');
10999 - }
11000 -}
11001 -
11002 -=head2 validate_acctName_conflict
11003 -
11004 -Returns 'OK' if the account name doesn't yet exist. Returns a localised error
11005 -otherwise.
11006 -
11007 -=cut
11008 -
11009 -sub validate_acctName_conflict
11010 -{
11011 - my $self = shift;
11012 - my $acctName = shift;
11013 -
11014 - my $account = $accountdb->get($acctName);
11015 - my $type;
11016 -
11017 - if (defined $account)
11018 - {
11019 - $type = $account->prop('type');
11020 - }
11021 - elsif (defined getpwnam($acctName) || defined getgrnam($acctName))
11022 - {
11023 - $type = "system";
11024 - }
11025 - else
11026 - {
11027 - return('OK');
11028 - }
11029 - return $self->localise('ACCOUNT_CONFLICT',
11030 - { account => $acctName,
11031 - type => $type,
11032 -});
11033 -}
11034 -
11035 -=head2 check_password
11036 -
11037 -Validates the password using the desired strength
11038 -
11039 -=cut
11040 -
11041 -sub check_password {
11042 - my $self = shift;
11043 - my $pass1 = shift;
11044 -
11045 - my $check_type;
11046 - my $rec = $configdb->get('passwordstrength');
11047 - $check_type = ($rec ? ($rec->prop('Users') || 'none') : 'none');
11048 -
11049 - return $self->validate_password($check_type,$pass1);
11050 -}
11051 -
11052 -
11053 -=head2 get_prop ITEM PROP
11054 -
11055 -A simple accessor for esmith::ConfigDB::Record::prop
11056 -
11057 -=cut
11058 -
11059 -sub get_prop
11060 -{
11061 - my ($fm, $item, $prop, $default) = @_;
11062 -
11063 - return $configdb->get_prop($item, $prop) || $default;
11064 -}
11065 -
11066 -
11067 -=head1 System Password manipulation routines
11068 -
11069 -XXX FIXME - These should be merged with the useraccouts versions
11070 -
11071 -=head2 system_password_compare
11072 -
11073 -=cut
11074 -
11075 -sub system_password_compare
11076 -{
11077 - my $self = shift;
11078 - my $pass2 = shift;
11079 -
11080 - my $pass1 = $self->{cgi}->param('pass');
11081 - unless ($pass1 eq $pass2) {
11082 - $self->{cgi}->param( -name => 'wherenext', -value => 'Password' );
11083 - return "SYSTEM_PASSWORD_VERIFY_ERROR";
11084 - }
11085 - return "OK";
11086 -}
11087 -
11088 -=head2 system_valid_password
11089 -
11090 -Throw an error if the password doesn't consist solely of one or more printable characters.
11091 -
11092 -=cut
11093 -
11094 -sub system_valid_password
11095 -{
11096 - my $self = shift;
11097 - my $pass1 = shift;
11098 - # If the password contains one or more printable character
11099 - if ($pass1 =~ /^([ -~]+)$/) {
11100 - return('OK');
11101 - } else {
11102 - $self->{cgi}->param( -name => 'wherenext', -value => 'Password' );
11103 - return 'SYSTEM_PASSWORD_UNPRINTABLES_IN_PASS';
11104 - }
11105 -}
11106 -
11107 -=head2 system_check_password
11108 -
11109 -Validates the password using the desired strength
11110 -
11111 -=cut
11112 -
11113 -sub system_check_password
11114 -{
11115 - my $self = shift;
11116 - my $pass1 = shift;
11117 -
11118 - use esmith::ConfigDB;
11119 - my $conf = esmith::ConfigDB->open();
11120 - my $check_type;
11121 - my $rec;
11122 - if ($conf)
11123 - {
11124 - $rec = $conf->get('passwordstrength');
11125 - }
11126 - $check_type = ($rec ? ($rec->prop('Admin') || 'strong') : 'strong');
11127 -
11128 - return $self->validate_password($check_type,$pass1);
11129 -}
11130 -
11131 -=head2 authenticate_password
11132 -
11133 -Compares the password with the current system password
11134 -
11135 -=cut
11136 -
11137 -sub system_authenticate_password
11138 -{
11139 - my $self = shift;
11140 - my $pass = shift;
11141 -
11142 - if (esmith::util::authenticateUnixPassword( ($configdb->get_value("AdminIsNotRoot") eq 'enabled') ? 'admin' : 'root', $pass))
11143 - {
11144 - return "OK";
11145 - }
11146 - else
11147 - {
11148 - return "SYSTEM_PASSWORD_AUTH_ERROR";
11149 - }
11150 -}
11151 -
11152 -=head2 system_change_password
11153 -
11154 -If everything has been validated, properly, go ahead and set the new password.
11155 -
11156 -=cut
11157 -
11158 -sub system_change_password
11159 -{
11160 - my ($self) = @_;
11161 - my $pass = $self->{cgi}->param('pass');
11162 -
11163 - ($configdb->get_value("AdminIsNotRoot") eq 'enabled') ? esmith::util::setUnixPassword('admin',$pass) : esmith::util::setUnixSystemPassword($pass);
11164 - esmith::util::setServerSystemPassword($pass);
11165 -
11166 - my $result = system("/sbin/e-smith/signal-event password-modify admin");
11167 -
11168 - if ($result == 0)
11169 - {
11170 - $self->success('SYSTEM_PASSWORD_CHANGED', 'First');
11171 - }
11172 - else
11173 - {
11174 - $self->error("Error occurred while modifying password for admin.", 'First');
11175 - }
11176 -
11177 - return;
11178 -}
11179 -
11180 -sub print_ipsec_client_section
11181 -{
11182 - my $self = shift;
11183 - my $q = $self->cgi;
11184 -
11185 - # Don't show ipsecrw setting unless the status property exists
11186 - return '' unless ($configdb->get('ipsec')
11187 - && $configdb->get('ipsec')->prop('RoadWarriorStatus'));
11188 - # Don't show ipsecrw setting unless /sbin/e-smith/roadwarrior exists
11189 - return '' unless -x '/sbin/e-smith/roadwarrior';
11190 - my $acct = $q->param('acctName');
11191 - my $rec = $accountdb->get($acct) if $acct;
11192 - if ($acct and $rec)
11193 - {
11194 - my $pwset = $rec->prop('PasswordSet') || 'no';
11195 - my $VPNaccess = $rec->prop('VPNClientAccess') || 'no';
11196 - if ($pwset eq 'yes' and $VPNaccess eq 'yes')
11197 - {
11198 - print $q->Tr(
11199 - $q->td({-class=>'sme-noborders-label'},
11200 - $self->localise('LABEL_IPSECRW_DOWNLOAD')),
11201 - $q->td({-class=>'sme-noborders-content'},
11202 - $q->a({-class=>'button-like',
11203 - -href=>"?action=getCert&user=$acct"},
11204 - $self->localise('DOWNLOAD'))));
11205 - }
11206 - }
11207 - return '';
11208 -}
11209 -
11210 -sub get_ipsec_client_cert
11211 -{
11212 - my $self = shift;
11213 - my $q = shift;
11214 - my $user = $q->param('user');
11215 - ($user) = ($user =~ /^(.*)$/);
11216 -
11217 - die "Invalid user: $user\n" unless getpwnam($user);
11218 -
11219 - open (KID, "/sbin/e-smith/roadwarrior get_client_cert $user |")
11220 - or die "Can't fork: $!";
11221 - my $certfile = <KID>;
11222 - close KID;
11223 -
11224 - require File::Basename;
11225 - my $certname = File::Basename::basename($certfile);
11226 -
11227 - print "Expires: 0\n";
11228 - print "Content-type: application/x-pkcs12\n";
11229 - print "Content-disposition: inline; filename=$certname\n";
11230 - print "\n";
11231 -
11232 - open (CERT, "<$certfile");
11233 - while (<CERT>)
11234 - {
11235 - print;
11236 - }
11237 - close CERT;
11238 -
11239 - return '';
11240 -}
11241 -
11242 -sub display_email_forwarding
11243 -{
11244 - return defined $configdb->get('smtpd');
11245 -}
11246 -
11247 -1;
11248 diff -aurN smeserver-manager-0.1.0.old/root/usr/share/perl5/vendor_perl/smeserver/Panel/wblNew.pm smeserver-manager-0.1.0/root/usr/share/perl5/vendor_perl/smeserver/Panel/wblNew.pm
11249 --- smeserver-manager-0.1.0.old/root/usr/share/perl5/vendor_perl/smeserver/Panel/wblNew.pm 2020-04-08 23:43:08.000000000 +0400
11250 +++ smeserver-manager-0.1.0/root/usr/share/perl5/vendor_perl/smeserver/Panel/wblNew.pm 1970-01-01 04:00:00.000000000 +0400
11251 @@ -1,455 +0,0 @@
11252 -#!/usr/bin/perl -w
11253 -
11254 -# package esmith::FormMagick::Panel::wblNew;
11255 -package smeserver::Panel::wblNew;
11256 -
11257 -use strict;
11258 -use warnings;
11259 -#use esmith::FormMagick;
11260 -#use esmith::cgi;
11261 -use esmith::ConfigDB;
11262 -use esmith::util;
11263 -use File::Basename;
11264 -use Exporter;
11265 -use Carp qw(verbose);
11266 -
11267 -our @ISA = qw( Exporter);
11268 -
11269 -our @EXPORT = qw(
11270 -get_dnsbl
11271 -get_rhsbl
11272 -get_uribl
11273 -get_sbllist
11274 -get_rbllist
11275 -get_ubllist
11276 -get_badhelo
11277 -get_badmailfrom
11278 -get_whitelisthosts
11279 -get_whitelisthelo
11280 -get_whitelistsenders
11281 -get_whitelistfrom
11282 -create_modify_black
11283 -create_modify_white
11284 -email_update
11285 -get_blacklistfrom
11286 -create_modify_rbl
11287 -);
11288 -
11289 -our $VERSION = sprintf '%d.%03d', q$Revision: 1.1 $ =~ /: (\d+).(\d+)/;
11290 -
11291 -our $db = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n";
11292 -our $wdb = esmith::ConfigDB->open('wbl') or die "Couldn't open wbl dbase\n";
11293 -our $sdb = esmith::ConfigDB->open('spamassassin') or die "Couldn't open spamassassin dbase\n";
11294 -
11295 -sub get_dnsbl
11296 -{
11297 - return ($db->get_prop('qpsmtpd', 'DNSBL') || 'disabled');
11298 -}
11299 -
11300 -sub get_rhsbl
11301 -{
11302 - return ($db->get_prop('qpsmtpd', 'RHSBL') || 'disabled');
11303 -}
11304 -
11305 -sub get_uribl
11306 -{
11307 - return ($db->get_prop('qpsmtpd', 'URIBL') || 'disabled');
11308 -}
11309 -
11310 -sub get_sbllist
11311 -{
11312 -my $sbllistform = $db->get_prop('qpsmtpd', 'SBLList') || '';
11313 -$sbllistform =~ s/,/\n/g;
11314 -return $sbllistform;
11315 -}
11316 -
11317 -sub get_rbllist
11318 -{
11319 -my $rbllistform = $db->get_prop('qpsmtpd', 'RBLList') || '';
11320 -$rbllistform =~ s/,/\n/g;
11321 -return $rbllistform;
11322 -}
11323 -
11324 -sub get_ubllist
11325 -{
11326 -my $rbllistform = $db->get_prop('qpsmtpd', 'UBLList') || '';
11327 -$rbllistform =~ s/,/\n/g;
11328 -return $rbllistform;
11329 -}
11330 -
11331 -
11332 -sub get_badhelo
11333 -{
11334 - my %list = $wdb->get('badhelo')->props;
11335 -
11336 - my @badhelo = ();
11337 - my $parameter = "";
11338 - my $value = "";
11339 - while (($parameter,$value) = each(%list)) {
11340 - if ($parameter eq "type") {next;}
11341 -
11342 - if ($value eq "Black") {
11343 - push @badhelo, $parameter;
11344 - }
11345 - }
11346 -
11347 - return "" unless (scalar @badhelo);
11348 -
11349 -# return join "\n", sort(@badhelo);
11350 - return sort(@badhelo);
11351 -}
11352 -
11353 -sub get_badmailfrom
11354 -{
11355 - my %list = $wdb->get('badmailfrom')->props;
11356 -
11357 - my @badmailfrom = ();
11358 - my $parameter = "";
11359 - my $value = "";
11360 - while (($parameter,$value) = each(%list)) {
11361 - if ($parameter eq "type") {next;}
11362 -
11363 - if ($value eq "Black") {
11364 - push @badmailfrom, $parameter;
11365 - }
11366 - }
11367 -
11368 - return "" unless (scalar @badmailfrom);
11369 -
11370 -# return join "\n", sort(@badmailfrom);
11371 - return sort(@badmailfrom);
11372 -}
11373 -
11374 -sub get_whitelisthosts
11375 -{
11376 - my %list = $wdb->get('whitelisthosts')->props;
11377 -
11378 - my @whitelisthosts = ();
11379 - my $parameter = "";
11380 - my $value = "";
11381 - while (($parameter,$value) = each(%list)) {
11382 - if ($parameter eq "type") {next;}
11383 -
11384 - if ($value eq "White") {
11385 - push @whitelisthosts, $parameter;
11386 - }
11387 - }
11388 -
11389 - return "" unless (scalar @whitelisthosts);
11390 -
11391 -# return join "\n", sort(@whitelisthosts);
11392 - return sort(@whitelisthosts);
11393 -
11394 -}
11395 -
11396 -sub get_whitelisthelo
11397 -{
11398 - my %list = $wdb->get('whitelisthelo')->props;
11399 -
11400 - my @whitelisthelo = ();
11401 - my $parameter = "";
11402 - my $value = "";
11403 - while (($parameter,$value) = each(%list)) {
11404 - if ($parameter eq "type") {next;}
11405 -
11406 - if ($value eq "White") {
11407 - push @whitelisthelo, $parameter;
11408 - }
11409 - }
11410 -
11411 - return "" unless (scalar @whitelisthelo);
11412 -
11413 -# return join "\n", sort(@whitelisthelo);
11414 - return sort(@whitelisthelo);
11415 -}
11416 -
11417 -sub get_whitelistsenders
11418 -{
11419 - my %list = $wdb->get('whitelistsenders')->props;
11420 -
11421 - my @whitelistsenders = ();
11422 - my $parameter = "";
11423 - my $value = "";
11424 - while (($parameter,$value) = each(%list)) {
11425 - if ($parameter eq "type") {next;}
11426 -
11427 - if ($value eq "White") {
11428 - push @whitelistsenders, $parameter;
11429 - }
11430 - }
11431 -
11432 - return "" unless (scalar @whitelistsenders);
11433 -
11434 - #return join "\n", sort(@whitelistsenders);
11435 - return sort(@whitelistsenders);
11436 -}
11437 -
11438 -sub get_whitelistfrom
11439 -{
11440 - my %list = $sdb->get('wbl.global')->props;
11441 -
11442 - my @whitelistfrom = ();
11443 - my $parameter = "";
11444 - my $value = "";
11445 - while (($parameter,$value) = each(%list)) {
11446 - if ($parameter eq "type") {next;}
11447 -
11448 - if ($value eq "White") {
11449 - push @whitelistfrom, $parameter;
11450 - }
11451 - }
11452 -
11453 - return "" unless (scalar @whitelistfrom);
11454 -
11455 -# return join "\n", sort(@whitelistfrom);
11456 - return sort(@whitelistfrom);
11457 -}
11458 -
11459 -sub create_modify_black
11460 -{
11461 - my $fm = shift;
11462 - my $q = $fm->{'cgi'};
11463 -
11464 - # qmail badhelo
11465 - my %list = $wdb->get('badhelo')->props;
11466 - my $parameter = "";
11467 - my $value = "";
11468 - while (($parameter,$value) = each(%list)) {
11469 - if ($parameter eq "type") {next;}
11470 -
11471 - if ($value eq "Black") {
11472 - $wdb->get_prop_and_delete('badhelo', "$parameter");
11473 - }
11474 - }
11475 -
11476 - my $BadHelo = $q->param("badhelo");
11477 - $BadHelo =~ s/\r\n/,/g;
11478 - my @BadHelo = sort(split /,/, $BadHelo);
11479 - foreach $BadHelo (@BadHelo)
11480 - {
11481 - $wdb->set_prop('badhelo', "$BadHelo", 'Black');
11482 - }
11483 -
11484 - # qmail badmailfrom
11485 - my %list_badmailfrom = $wdb->get('badmailfrom')->props;
11486 - my $parameter_badmailfrom = "";
11487 - my $value_badmailfrom = "";
11488 - while (($parameter_badmailfrom,$value_badmailfrom) = each(%list_badmailfrom)) {
11489 - if ($parameter_badmailfrom eq "type") {next;}
11490 -
11491 - if ($value_badmailfrom eq "Black") {
11492 - $wdb->get_prop_and_delete('badmailfrom', "$parameter_badmailfrom");
11493 - }
11494 - }
11495 -
11496 - my $BadMailFrom = $q->param("badmailfrom");
11497 - $BadMailFrom =~ s/\r\n/,/g;
11498 - my @BadMailFrom = sort(split /,/, $BadMailFrom);
11499 - foreach $BadMailFrom (@BadMailFrom){
11500 - $wdb->set_prop('badmailfrom', "$BadMailFrom", 'Black');
11501 - }
11502 - # spamassassin blacklist_from
11503 - my %list_wblglobal = $sdb->get('wbl.global')->props;
11504 - my $parameter_wblglobal = "";
11505 - my $value_wblglobal = "";
11506 - while (($parameter_wblglobal,$value_wblglobal) = each(%list_wblglobal)) {
11507 - if ($parameter_wblglobal eq "type") {next;}
11508 -
11509 - if ($value_wblglobal eq "Black") {
11510 - $sdb->get_prop_and_delete('wbl.global', "$parameter_wblglobal");
11511 - }
11512 - }
11513 -
11514 - my $BlacklistFrom = $q->param("blacklistfrom");
11515 - $BlacklistFrom =~ s/\r\n/,/g;
11516 - my @BlacklistFrom = sort(split /,/, $BlacklistFrom);
11517 - foreach $BlacklistFrom (@BlacklistFrom){
11518 - $sdb->set_prop('wbl.global', "$BlacklistFrom", 'Black');
11519 - }
11520 -
11521 - ##Update email settings
11522 - unless ( system ("/sbin/e-smith/signal-event", "smeserver-wbl-update") == 0 ){
11523 - $fm->error('ERROR_UPDATING');
11524 - return undef;
11525 - }
11526 -
11527 - $fm->success('SUCCESS');
11528 -}
11529 -
11530 -sub create_modify_white
11531 -{
11532 - my $fm = shift;
11533 - my $q = $fm->{'cgi'};
11534 -
11535 - # qpsmtpd whitelisthosts
11536 - my %list = $wdb->get('whitelisthosts')->props;
11537 - my $parameter = "";
11538 - my $value = "";
11539 - while (($parameter,$value) = each(%list)) {
11540 - if ($parameter eq "type") {next;}
11541 -
11542 - if ($value eq "White") {
11543 - $wdb->get_prop_and_delete('whitelisthosts', "$parameter");
11544 - }
11545 - }
11546 -
11547 - my $WhitelistHosts = $q->param("whitelisthosts");
11548 - $WhitelistHosts =~ s/\r\n/,/g;
11549 - my @WhitelistHosts = sort(split /,/, $WhitelistHosts);
11550 - foreach $WhitelistHosts (@WhitelistHosts)
11551 - {
11552 - $wdb->set_prop('whitelisthosts', "$WhitelistHosts", 'White');
11553 - }
11554 -
11555 - # qpsmtpd whitelisthelo
11556 - my %list_whitelisthelo = $wdb->get('whitelisthelo')->props;
11557 - my $parameter_whitelisthelo = "";
11558 - my $value_whitelisthelo = "";
11559 - while (($parameter_whitelisthelo,$value_whitelisthelo) = each(%list_whitelisthelo)) {
11560 - if ($parameter_whitelisthelo eq "type") {next;}
11561 -
11562 - if ($value_whitelisthelo eq "White") {
11563 - $wdb->get_prop_and_delete('whitelisthelo', "$parameter_whitelisthelo");
11564 - }
11565 - }
11566 -
11567 - my $WhitelistHelo = $q->param("whitelisthelo");
11568 - $WhitelistHelo =~ s/\r\n/,/g;
11569 - my @WhitelistHelo = sort(split /,/, $WhitelistHelo);
11570 - foreach $WhitelistHelo (@WhitelistHelo)
11571 - {
11572 - $wdb->set_prop('whitelisthelo', "$WhitelistHelo", 'White');
11573 - }
11574 -
11575 - # qpsmtpd whitelistsenders
11576 - my %list_whitelistsenders = $wdb->get('whitelistsenders')->props;
11577 - my $parameter_whitelistsenders = "";
11578 - my $value_whitelistsenders = "";
11579 - while (($parameter_whitelistsenders,$value_whitelistsenders) = each(%list_whitelistsenders)) {
11580 - if ($parameter_whitelistsenders eq "type") {next;}
11581 -
11582 - if ($value_whitelistsenders eq "White") {
11583 - $wdb->get_prop_and_delete('whitelistsenders', "$parameter_whitelistsenders");
11584 - }
11585 - }
11586 -
11587 - my $WhitelistSenders = $q->param("whitelistsenders");
11588 - $WhitelistSenders =~ s/\r\n/,/g;
11589 - my @WhitelistSenders = sort(split /,/, $WhitelistSenders);
11590 - foreach $WhitelistSenders (@WhitelistSenders)
11591 - {
11592 - $wdb->set_prop('whitelistsenders', "$WhitelistSenders", 'White');
11593 - }
11594 -
11595 - # spamassassin whitelist_from
11596 - my %list_wblglobal = $sdb->get('wbl.global')->props;
11597 - my $parameter_wblglobal = "";
11598 - my $value_wblglobal = "";
11599 - while (($parameter_wblglobal,$value_wblglobal) = each(%list_wblglobal)) {
11600 - if ($parameter_wblglobal eq "type") {next;}
11601 -
11602 - if ($value_wblglobal eq "White") {
11603 - $sdb->get_prop_and_delete('wbl.global', "$parameter_wblglobal");
11604 - }
11605 - }
11606 -
11607 - my $WhitelistFrom = $q->param("whitelistfrom");
11608 - $WhitelistFrom =~ s/\r\n/,/g;
11609 - my @WhitelistFrom = sort(split /,/, $WhitelistFrom);
11610 - foreach $WhitelistFrom (@WhitelistFrom){
11611 - $sdb->set_prop('wbl.global', "$WhitelistFrom", 'White');
11612 - }
11613 -
11614 - ##Update email settings
11615 - unless ( system ("/sbin/e-smith/signal-event", "smeserver-wbl-update") == 0 ){
11616 - $fm->error('ERROR_UPDATING');
11617 - return undef;
11618 - }
11619 -
11620 - $fm->success('SUCCESS');
11621 -}
11622 -
11623 -sub email_update
11624 -{
11625 - my $fm = shift;
11626 - my $q = $fm->{'cgi'};
11627 -
11628 - unless ( system ("/sbin/e-smith/signal-event", "smeserver-wbl-update") == 0 )
11629 - {
11630 - $fm->error('ERROR_UPDATING');
11631 - return undef;
11632 - }
11633 -
11634 - $fm->success('SUCCESS');
11635 -
11636 -}
11637 -
11638 -sub get_blacklistfrom
11639 -{
11640 - my %list = $sdb->get('wbl.global')->props;
11641 -
11642 - my @blacklistfrom = ();
11643 - my $parameter = "";
11644 - my $value = "";
11645 - while (($parameter,$value) = each(%list)) {
11646 - if ($parameter eq "type") {next;}
11647 -
11648 - if ($value eq "Black") {
11649 - push @blacklistfrom, $parameter;
11650 - }
11651 - }
11652 -
11653 - return "" unless (scalar @blacklistfrom);
11654 -
11655 - return join "\n", sort(@blacklistfrom);
11656 -}
11657 -sub create_modify_rbl
11658 -{
11659 - my $fm = shift;
11660 - my $q = $fm->{'cgi'};
11661 -
11662 - my $dnsbl = $q->param('dnsbl');
11663 - $db->set_prop('qpsmtpd', 'DNSBL', "$dnsbl");
11664 -
11665 - my $rhsbl = $q->param('rhsbl');
11666 - $db->set_prop('qpsmtpd', 'RHSBL', "$rhsbl");
11667 -
11668 -
11669 - my $sbllistcgi = $q->param('sbllist');
11670 - my @sbllistcgi = split /\s{2,}/, $sbllistcgi;
11671 - my $sbllistdb = '';
11672 - foreach (@sbllistcgi) { $sbllistdb = $sbllistdb . ',' . $_; }
11673 - $sbllistdb =~ s/^,//;
11674 -
11675 - $db->set_prop('qpsmtpd', 'SBLList', "$sbllistdb");
11676 -
11677 -
11678 - my $rbllistcgi = $q->param('rbllist');
11679 - my @rbllistcgi = split /\s{2,}/, $rbllistcgi;
11680 - my $rbllistdb = '';
11681 - foreach (@rbllistcgi) { $rbllistdb = $rbllistdb . ',' . $_; }
11682 - $rbllistdb =~ s/^,//;
11683 -
11684 - $db->set_prop('qpsmtpd', 'RBLList', "$rbllistdb");
11685 -
11686 - ##Update email settings
11687 -
11688 - unless ( system ("/sbin/e-smith/signal-event", "smeserver-wbl-update") == 0 ){
11689 - $fm->error('ERROR_UPDATING');
11690 - return undef;
11691 - }
11692 -
11693 - $fm->success('SUCCESS');
11694 -}
11695 -
11696 -#Subroutine to display buttons
11697 -#sub print_custom_button{
11698 -# my ($fm,$desc,$url) = @_;
11699 -# my $q = $fm->{cgi};
11700 -# $url="wbl?page=0&page_stack=&Next=Next&wherenext=".$url;
11701 -# print " <tr>\n <td colspan='2'>\n";
11702 -# print $q->p($q->a({href => $url, -class => "button-like"},$fm->localise($desc)));
11703 -# print qq(</tr>\n);
11704 -# return undef;
11705 -#}
11706 -#;

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed