diff -aurN smeserver-manager-0.1.0.old/createlinks smeserver-manager-0.1.0/createlinks --- smeserver-manager-0.1.0.old/createlinks 2020-04-08 23:43:15.000000000 +0400 +++ smeserver-manager-0.1.0/createlinks 2020-04-11 20:30:30.778000000 +0400 @@ -9,6 +9,17 @@ # links to add +for ( qw( sme_core.css + sme_main.css + sme_menu.css + styles.css + ) ) +{ + templates2events("/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/public/css/$_", qw( + bootstrap-console-save console-save + )); +} + # templates to expand for my $event ( qw( manager2-modify bootstrap-console-save console-save ) ) { 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 --- 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 +++ 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 @@ -0,0 +1,250 @@ +{ + $OUT = <<'EOF'; + +/* from e-smith-manager to smeserver_manager2 */ + +/*---------------------------------------------------------------------- + * copyright (C) 1999-2003 Mitel Networks Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Technical support for this program is available from Mitel Networks + * Please visit our web site www.mitel.com for details. + *---------------------------------------------------------------------- + */ + +/* This is the stylesheet used as the basis for older broswers. + +Note that you CANNOT simly add styles here and hope they work. ONLY CSS +level 1 styles should be in this file. Everyting else goes into the other 3 +files. + +These basic styles ensire that browsers that don't understand the @import +method will still be usable. All modern browsers will use the styles in +sme_main.css, sme_menu.css or sme_header.css depending on the frame in which +the page is found. +*/ + +/* Default HTML styles */ +body { + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + border-width: 0; +} + +table, tr, td, div, p, form { + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; +} + +p { + margin-top: 8px; + margin-bottom: 2px; +} + +form { + margin-top: 2px; + margin-bottom: 2px; +} + +span { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; +} + +.notsmall { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; +} + +h1, .h1 { + font-family: Verdana, Arial, Helvetica, sans-serif; + color: #333333; + font-size: 18px; + margin-bottom: 4px; + margin-top: 12px; +} + +h2, .h2 { + font-family: Verdana, Arial, Helvetica, sans-serif; + color: #333333; + font-size: 14px; + margin-bottom: 3px; + margin-top: 12px; +} + +h3, .h3 { + font-family: Verdana, Arial, Helvetica, sans-serif; + color: #333333; + font-size: 12px; + margin-bottom: 2px; + margin-top: 12px; +} + +h4, .h4 { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-style: italic; + color: #333333; + font-size: 12px; + margin-bottom: 2px; + margin-top: 10px; +} + +ol, ul, li { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: normal; + color: black; +} + +ul { + list-style-type: circle; +} + +/* Core styles for use with sme_header.css*/ +body.header { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + background: #cccccc; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + margin-left: 0px; +} + +.hilightbar { + background-color: #ffc50a; + font-size: 4px; +} + +.infobar { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + background-color: #cccccc; +} + +.darkergrey { + color: #666666; +} + +td.darkgrey { + background-color: #888888; +} + +a.update { + color: red; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + background: #cccccc; +} + +/* Core styles for use with sme_menu.css */ + +body.menu { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + background-color: #e8f3e1; +} + +td.section { + padding-bottom: 2px; + padding-top: 8px; +} + +.section { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + font-weight: bold; + background-color: #e8f3e1; +} + +a.item { + color: #00008b; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + background: #e8f3e1; +} + +a.sl { + color: green; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + background: #e8f3e1; +} + +a.alert { + color: red; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + background: #e8f3e1; +} + +/* Core styles for use with sme_main.css */ +body.main { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + background-color: #ffffff; + color: #000000; +} + +td.sme-noborders-label { + font-weight: bold; + width: 33%; + text-align: right; +} + +hr.sectionbar { + color: #666666; + background-color: #666666; + height: 1px; + width: 80%; + border: 0; +} + +hr.sme-copyrightbar { + color: #dddddd; + background-color: #dddddd; + height: 1px; + width: 100%; + border: 0; +} + +.sme-copyright { + color: #777777; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; +} + +/*These style definitions were found int he old css file (manager.css) +but don't seem to ever be referenced in the code. They're here +for reference. + +.centerit { + text-align: center; +} +.highlight { + background: #ffc61e; +} +.subheading { + background: #ffffff; + color: #1e385b; +} +*/ + +EOF +} 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 --- 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 +++ 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 @@ -0,0 +1,71 @@ +{ + $OUT =<<'HERE'; + +/* from e-smith-manager to smeserver_manager2 */ + +/*---------------------------------------------------------------------- + * copyright (C) 1999-2003 Mitel Networks Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Technical support for this program is available from Mitel Networks + * Please visit our web site www.mitel.com for details. + *---------------------------------------------------------------------- + */ + +/*contribs.org styling +*/ +body.header { +background: #bee6a2; + } +.hilightbar { +background-color: #ffffff; + } +.infobar { +background-color: #98d36e; + } +a.update { +font-size: 11px; +background: #98d36e; + } + +/* Core styles for use with sme_menu.css */ +body.menu { +background-color: #e8f3e1; + } +td.section { +background-color: #e8f3e1; + } +a.item { +background: #e8f3e1; + } +a.sl { +background: #e8f3e1; + } +a.alert { +background: #e8f3e1; + } + +/* Core Styles for use with sme_main.css */ +hr.sectionbar { +color: #8ebe43; +background-color: #8ebe43; + } +hr.sme-copyrightbar { +color: #8ebe43; +background-color: #8ebe43; + } +HERE +} 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 --- 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 +++ 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 @@ -0,0 +1 @@ +/* DO NOT MODIFY THIS FILE! It is updated automatically */ 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 --- 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 +++ 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 @@ -0,0 +1,440 @@ +{ + $OUT = <<'EOF'; + +/* from e-smith-manager to smeserver_manager2 */ + +/*---------------------------------------------------------------------- + * copyright (C) 1999-2003 Mitel Networks Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Technical support for this program is available from Mitel Networks + * Please visit our web site www.mitel.com for details. + *---------------------------------------------------------------------- + */ + +/* This is the stylesheet used in the main panels only. + + This file inherits the styles use in sme_core in the "header" section, and + as noted in the code below. Note that some of the styles here are empty. + This is because the style definition has moved safely to sme_core.css + and the placeholder is left here for reference or future use. + + There are a lot of styles in here, so read carefully. Each one is documented. + + Styles that were in the old stylesheets, but are not used in the UI are at the + bottom, commented out. These can be removed at the end of the 6.0 cycle */ + +/* general page properties */ +body, body.main { + margin-top: 5px; + margin-right: 20px; + margin-bottom: 5px; + margin-left: 5px; +} + + +/* Table properties ****************************************/ +/* There are THREE types of tables + 1. *.sme-layout* is used for layout purposes. It is the "master + container" on a page. It controls the top-level table + inside of which everything else is put. + 2. *.sme-noborders* is used for layout, and defines a borderless table and + cells used within it. + 2. *.sme-border* is used for tabular data, and defines a header row and borders + for tables that need borders + + */ + +/*First, some defaults */ +td { + text-align: left; +} + + +/* +sme-layout* : Used for top-level layout +*/ + +table.sme-layout { + border-collapse: collapse; + margin-bottom: 2px; + margin-top: 2px; +} + +tr.sme-layout { + border: 1px solid #dddddd; +} + +td.sme-layout { + border: 1px solid #dddddd; +} + +/*This special style is actually used only for the button row along the bottom of each page*/ +th.sme-layout { + border: 1px solid #dddddd; + background-color: #e8f3e1; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 9pt; + font-weight: bold; + color: #000000; + text-align: right; + padding: 4px; +} + +/* +sme-noborders* : Used for mid-level layout +*/ +table.sme-noborders { + padding: 0px; + margin-top: 0px; + margin-bottom: 20px; + margin-left: 0px; + margin-right: 0px; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; +} +td.sme-noborders-label { + font-weight: bold; + /*width: 250px;*/ + text-align: right; + /*vertical-align: top;*/ + background-color: #e8f3e1; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; +} +td.sme-noborders-content { + text-align: left; + vertical-align: top; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; +} +td.sme-noborders-info, div.sme-noborders-info { + text-align: left; + vertical-align: top; +} +/* Used for a left-most column of radio buttons (see date/time panel) */ +td.sme-radiobutton { + width: 30px; +} +/* +sme-border* : Used for tabular data +*/ +table.sme-border { + border-collapse: collapse; + border: 2px solid #cccccc; + empty-cells: show; + margin: 5px 5px 5px 2px; +} +td.sme-border, +td.sme-border-warning, +td.sme-border-right, +td.sme-border-center { + border: 1px solid #cccccc; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: normal; + color: #000000; + text-align: left; + padding-left: 2px; + padding-right: 2px; + padding-top: 3px; + padding-bottom: 3px; +} +td.sme-border-warning { + color: red; + } +td.sme-border-right {text-align: right;} +td.sme-border-center {text-align: center;} +th.sme-border { + border: 1px solid #cccccc; + background-color: #bee6a2; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; + color: #000000; + text-align: center; + vertical-align: bottom; + padding-left: 2px; + padding-right: 2px; + padding-left: 3px; + padding-right: 3px; + padding-top: 3px; + padding-bottom: 3px; + /*border-width: 1px; + border-style: solid; + border-color: #F2F0EE #75736E #75736E #F2F0EE ;*/ +} +td.sme-border a, td.sme-border-right a, td.sme-border-center a { + font-size: 10px; +} + +/* misc layout stuff*/ +/* these two are for any error messages that pop up*/ +div.error, div.sme-error, span.error, span.sme-error { + color: red; + background-color: #ffffff; + border-width: 1px; + border-style: solid; + border-color: red ; + padding: 2px; + margin-left: 20px; + margin-right: 20px; + margin-top:0px; + margin-bottom:0px; + +} + +div.error-noborders, div.sme-error-noborders, +span.error-noborders, span.sme-error-noborders +{ + color: red; + background-color: #ffffff; + border-width: 0px; +} + +div.error h2, span.error h2, +div.error p, span.error p +{ + color: red; +} +/* These are for the special case of a link being inside an error message */ +div.sme-error a, div.error a, span.error a, span.sme-error a, +div.error-noborders a, div.sme-error-noborders a, +span.error-noborders a, span.sme-error-noborders a +{ + color: #ff0000; + font-weight: bold; + text-decoration: underline; +} + +/* For when a link is the error message */ +a.error:link, a.error:visited, a.error:hover, a.error:active { + color: #ff0000; + font-weight: normal; + text-decoration: underline; +} + +/* these two are for any success messages that pop up*/ +div.success, span.success { + color: #006400; + background-color: #ffffff; + border-width: 1px; + border-style: solid; + border-color: #006400 ; + padding: 2px; + margin-left: 20px; + margin-right: 20px; + margin-top:0px; + margin-bottom:0px; + +} + +/* These two are for the special case of a link being inside a success message */ +div.success a, span.success a +{ + color: #006400; + font-weight: bold; + text-decoration: underline; +} + +div.success h2, span.success h2, +div.success p, span.success p +{ + color: green; +} + +/*These two define the copyright footer styles, one for the line and one for the text*/ +hr.sme-copyrightbar { +} +.sme-copyright { +} + +/* These ones define styles for the links that are made to look like + standard form submit buttons */ +a.button-like:link, +a.button-like:visited, +a.button-like:hover, +a.button-like:active, +a.button-like-small:link, +a.button-like-small:visited, +a.button-like-small:hover, +a.button-like-small:active { + font-family: sans-serif; + font-size: 13px; + color: black; + background: #D4D0C8; + text-decoration: none; + text-align: left; + border-color: #F2F0EE #75736E #75736E #F2F0EE ; + margin-top: 10px; + margin-right: 2px; + margin-bottom: 10px; + margin-left: 2px; + border-style: solid; + border-top-width: 2px; + border-right-width: 2px; + border-bottom-width: 2px; + border-left-width: 2px; + padding-top: 2px; + padding-bottom: 2px; + padding-left: 6px; + padding-right: 6px; + } +a.button-like-small:link, +a.button-like-small:visited, +a.button-like-small:hover, +a.button-like-small:active { + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + font-size: 10px; + padding-top: 0px; + padding-bottom: 0px; + padding-left: 1px; + padding-right: 1px; +} +a.button-like:active, +a.button-like-small:active { + border-color: #75736E #F2F0EE #F2F0EE #75736E ; +} + +/* EXPERIMENTAL SECTION */ +/* These are styles used to experiment with. */ + +/* class for links, similar to the class in sme_menu.css, but for a red button */ +a.button-like-red:link, +a.button-like-red:visited, +a.button-like-red:hover, +a.button-like-red:active { + border-left: #F1726C 2px solid; + border-right: #B42025 2px solid; + border-top: #F1726C 2px solid; + border-bottom: #B42025 2px solid; + } +a.button-like-red:active { + border-color: #75736E #F2F0EE #F2F0EE #75736E ; +} + +/*These are style definitions found in the UI but not defined in any file I + could locate. They're listed here for historical purposes, but have been + removed from the UI + +pagedescription (used in the first paragraph of text on a page) [HTML.pm] +label (used in forms) [HTML.pm] +field (used in forms) [HTML.pm] +fielddescription (used ???)[HTML.pm] +buttons (used in forms) [HTML.pm] +*/ +/*td.sme-submitbutton { + text-align: right; +} +*/ + +/*These style definitions were found int he old css file (manager.css) + but don't seem to ever be referenced in the code. They're here + for reference. + +.banner { + background: #000000; + color: #ffffff; +} +.banner-right { + font-family: Verdana, Arial, Helvetica, sans-serif; + background: #e17200; + color: #ffffff; +} +.border { + background: #000000; + color: #000000; + border-color: #000000; +} +.sidebar { + width: 200px; + background: #ffffff; + font-size: smaller; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-weight: normal; +} +.sidebar-title { + background: #1e385b; + color: #ffffff; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-weight: bold; +} +.newsitem { + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-left: 5px; + margin-right: 5px; + margin-top: 5px; + margin-bottom: 5px; +} +.newsitem-title { + background: #cccccc; + color: #ffffff; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-weight: bold; +} +.newsitem-footer { + background: #cccccc; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: smaller; + text-align: right; +} +.newsitem-detail { + font-size: smaller; + font-weight: normal; +} +.formlabel { + background: #c0c0c0; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: small; + font-weight: bold; + text-align: right; +} +.welcome-link { + background: #ffffff; + color: #1e385b; +} +.littlelink { + font-family: Verdana, Arial, Helvetica, sans-serif; +} +#textlayer { + position: absolute; + visibility: inherit; + top: 160px; + left: 50px; + z-index: 2; +} +#para { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-weight: bold; + color: #000000; +} +#title { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-weight: bold; + padding: 7px 7px 7px 7px; + color: #ffffff; +} +*/ + +EOF +} 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 --- 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 +++ 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 @@ -0,0 +1,50 @@ +{ + $OUT =<<'HERE'; + +/* from e-smith-manager to smeserver_manager2 */ + +/*---------------------------------------------------------------------- + * copyright (C) 1999-2003 Mitel Networks Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Technical support for this program is available from Mitel Networks + * Please visit our web site www.mitel.com for details. + *---------------------------------------------------------------------- + */ +/*contribs.org styling */ + +/* This special style is actually used only for the button row along the bottom of each page */ +th.sme-layout { +border: 1px solid #8ebe43; +background-color: #bee6a2; + } +table.sme-border { +border: 2px solid #dddddd; + } +td.sme-border-warning, +td.sme-border-right, +td.sme-border-center { +border: 1px solid #dddddd; + } +td.sme-border-right {text-align: right;} +td.sme-border-center {text-align: center;} +th.sme-border { +border: 1px solid #dddddd; +background-color: #e8f3e1; + } +HERE +} + 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 --- 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 +++ 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 @@ -0,0 +1 @@ +/* DO NOT MODIFY THIS FILE! It is updated automatically */ 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 --- 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 +++ 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 @@ -0,0 +1,229 @@ +{ + $OUT = <<'EOF'; + +/* from e-smith-manager to smeserver_manager2 */ + +/*---------------------------------------------------------------------- + * copyright (C) 1999-2003 Mitel Networks Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Technical support for this program is available from Mitel Networks + * Please visit our web site www.mitel.com for details. + *---------------------------------------------------------------------- + */ + +/* This is the stylesheet used in the navigation panel only + + This file inherits the styles use in sme_core in the "navigation" section, + and as noted in the code below. Note that some of the styles here are empty. + This is because the style definition has moved safely to sme_core.css and + the placeholder is left here for reference or future use. + + There are a lot of styles in here, so read carefully. Each one is + documented. + + Styles that were in the old stylesheets, but are not used in the UI are at + the bottom, commented out. These can be removed at the end of the 6.0 + cycle */ + +/* Sets the general page properties */ +body, body.menu { + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + margin-left: 2px; +} + +/* This is the section heading style */ +.section { +} + +td.menu-cell { + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + margin-left: 0px; + padding-left: 0px; + padding-right: 0px; + padding-top: 0px; + padding-bottom: 0px; + +} + +/* +All the a links use pseudoclasses to control the two visual link styles. +For example: + a.item:link the general link item + a.item-current:link: the active link item + +The switch from item to item-current is done with a javascript script in the head of the +navigation page, using the onClick event. + +We are making heavy use of the cascade with these. +*/ + +/* a:link controls the look of a link when the mouse is nowhere near it */ +a.item:link, a.item-current:link, +a.warn:link, a.warn-current:link { + display: block; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + color: black; + background: #e8f3e1; + text-decoration: none; + text-align: left; + border-color: #e8f3e1; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + margin-left: 0px; + border-style: solid; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + padding-right: 10px; + padding-left: 10px; + padding-top: 0px; + padding-bottom: 2px; + } + +/* a:visited controls the look of a visited link (one that has been clicked) */ +a.item:visited, a.item-current:visited, +a.warn:visited, a.warn-current:visited { + display: block; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + color: black; + background: #e8f3e1; + text-decoration: none; + border-color: #e8f3e1; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + margin-left: 0px; + border-style: solid; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + padding-right: 10px; + padding-left: 10px; + padding-bottom: 2px; + text-align: left; +} + +/* a:hover controls the look of a link under the curser*/ +a.item:hover, a.item-current:hover, +a.warn:hover, a.warn-current:hover { + display: block; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + color: black; + text-decoration: none; + background: #cccccc; + border-color: #888888; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + margin-left: 0px; + border-style: solid; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + padding-right: 10px; + padding-left: 10px; + padding-bottom: 2px; + text-align: left; +} + +/* a:active controls the look of a link as it is selected*/ +a.item:active, a.item-current:active, +a.warn:active, a.warn-current:active { + display: block; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + color: white; + background: black; + text-decoration: none ; + border-color: #000000; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + margin-left: 0px; + border-style: solid; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + padding-right: 10px; + padding-left: 10px; + padding-bottom: 2px; + text-align: left; +} + +/* +These styles are to ensure that a selected link appears selected, even if the link +opens in another frame. This uses a javascript chunk in the head of the navigation +frame to change the style using the onClick event. +*/ +a.item-current:link, a.warn-current:link, +a.item-current:visited, a.warn-current:visited, +a.item-current:active, a.warn-current:active, +a.item-current:hover, a.warn-current:hover { + display: block; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + color: black; + text-decoration: none; + background: #ffffff; + border-color: #888888; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + margin-left: 0px; + border-style: solid; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + padding-right: 10px; + padding-left: 10px; + padding-bottom: 2px; + text-align: left; +} + +/* these two add a border on the styles defined directly above when +the mouse is hovering over them */ +a.item-current:hover, a.warn-current:hover { + border-color: #888888; +} + +/* These redefine a few elements to make room for the icon to the left of the warn class*/ +a.warn:link, a.warn-current:link, +a.warn:visited, a.warn-current:visited, +a.warn:active, a.warn-current:active, +a.warn:hover, a.warn-current:hover { + background-image: url(/server-common/warn.gif); + background-repeat: no-repeat; + background-position: 10px; + padding-left: 25px; +} +/*end*/ + +EOF +} 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 --- 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 +++ 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 @@ -0,0 +1 @@ +/* DO NOT MODIFY THIS FILE! It is updated automatically */ 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 --- 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 +++ 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 @@ -0,0 +1,201 @@ +{ + $OUT = <<'EOF'; + +/* smeserver_manager2 */ + +/*---------------------------------------------------------------------- + * copyright (C) 1999-2003 Mitel Networks Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Technical support for this program is available from Mitel Networks + * Please visit our web site www.mitel.com for details. + *---------------------------------------------------------------------- + */ + +/* This is the basic stylesheet originally used in the mojo version. + */ + +body{ + background-color: #FFF; +} + +#container{ + max-width: 100%; + position: relative; + margin: auto; +} + +#navigation{ + width: 190px; + position: absolute; + margin-left: 0px; + padding: 5px; + background-color: #E8F3E1; +/* height: 600px; */ + overflow: auto; +} + +#main{ + margin-left: 195px; + padding: 10px; +} + +#central{ + margin-left: 0px; + padding: 5px; +} + +#footer{ + margin-left: 0px; + padding: 5px; +} + +#header { + background: #bee6a2; +} + +#header h1, a:link, a:visited { + color: black; + text-decoration: none; +/* contribs.org styling */ +} + +.sme-error { + color: red; + background-color: #ffffff; + border-width: 1px; + border-style: solid; + border-color: red ; + padding: 2px; + margin-left: 10px; + margin-right: 10px; + margin-top:0px; + margin-bottom:0px; +} + +#footer img { + float: right; + position: fixed; + margin-left: 40%; +} + +label.field-with-error { + color: #dd7e5e +} + +input.field-with-error { + background-color: #fd9e7e +} + +span.label { + display: inline-block; + font-weight: bold; + background-color: #e8f3e1; /*lightgreen;*/ + width: 30%; + text-align: right; +} + +span.data { + padding: 2px; + font-weight: bold; + margin-left: 0%; +/* background-color: lightblue;*/ +} + +span.data2 { + padding: 2px; +/* background-color: lightblue; */ +} + +input.action { + margin-left: 0px; + color: darkgreen; + background-color: #bee6a2; /*lightgreen;*/ +} + +input.action2 { + margin-left: 0px; + color: black; + background-color: #d4d0c8; +} + +#modul.desc { + padding: 3px; + background-color: grey; +} + +[type = 'text'] { + margin-left: 0px; + /*background-color: lightblue;*/ +} + +.a, .return { + color: #661866; + font-weight: bold; +} + +.section { + line-height: 20px; +} +.a, .item { + line-height: 15px; +} + +#module { +/* height: 600px; */ + overflow: auto; +} + + +#h2l1 { + height: 40px; + width: 100%; +} +#h2e11 { + width: 70%; + float: left; +} +#h2e12 { + background-color: #C0E7A6; + float: left; + text-align: right; +} + +#h2l2 { +/* background-color: #A8F9E7;*/ + border-top: solid white 3px; + border-bottom: solid white 2px; + height: 14px; + width: 100%; + padding: 1px; +} + +#h2e21 { + float: left; + width: 70%; +} + +#h2e22,#h2e23 { + float: left; + width: 10%; + text-align: center; +} + + +/*end*/ + +EOF +} 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 --- 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 +++ 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 @@ -0,0 +1 @@ +/* DO NOT MODIFY THIS FILE! It is updated automatically */ 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 --- 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 +++ 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 @@ -1,8 +1,6 @@ { secrets => ['new sessionsLeYTmFPhw3q', 'for validation QrPTZhWJmqCjyGZmguK'], -# theme => 'default', - theme => 'AdminLTE', - navigation_has_changed => 1, + theme => 'default', modules_dir => "lib/SrvMngr/Controller", debug => 0, } 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 --- 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 +++ 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 @@ -0,0 +1,963 @@ +package SrvMngr::Controller::Backup; + +#---------------------------------------------------------------------- +# heading : Administration +# description : Backup or restore +# navigation : 4000 4200 +# Copyright (C) 2002 Mitel Networks Corporation +#---------------------------------------------------------------------- +# routes : end + +use strict; +use warnings; +use Mojo::Base 'Mojolicious::Controller'; + +use Locale::gettext; +use SrvMngr::I18N; +use SrvMngr qw(theme_list init_session_cgi ip_number_or_blank); + +use Quota; +use esmith::ConfigDB; +use esmith::AccountsDB; + +use esmith::util; +use File::Basename; +use File::Find; +use File::Path qw(make_path remove_tree); + +use esmith::Backup; +use esmith::BackupHistoryDB; +use esmith::cgi; +use esmith::util; +use esmith::lockfile; + +our $cdb = esmith::ConfigDB->open || die "Couldn't open config db"; +our $adb = esmith::AccountsDB->open || die "Couldn't open accounts db"; +our $rdb = esmith::ConfigDB->open('/etc/e-smith/restore') + || die "Couldn't open restore db"; + + +#$File::Find::dont_use_nlink = 1; # fix for Windows shares + +# These statements _must_ come _after_ the FormMagick constructor. It sets +# POST_MAX and DISABLE_UPLOADS to values that will cause this script to fail +# on restores and verification of files. +##$CGI::POST_MAX = -1; # allow any size POST +##$CGI::DISABLE_UPLOADS = 0; # need to upload to restore from desktop + +#$fm->parse_xml(); + +my $es_backup = new esmith::Backup or die "Couldn't create Backup object\n"; + +my @directories = $es_backup->restore_list; +@directories = grep { -e "/$_" } @directories; + +my @backup_excludes = $es_backup->excludes; + +# Unbuffer standard output so that files and directories are listed as +# they are restored +$| = 1; + +# Store away current gid of 'www' group. +my $www_gid = getgrnam("www"); + + +sub main { + + my $c = shift; + $c->app->log->info($c->log_req); + + my %bac_datas = (); + my $title = $c->l('bac_BACKUP_TITLE'); + my $notif; + + $bac_datas{'function'} = 'desktop_backup'; + my ($tarsize, $dumpsize, undef, undef) = $c->CalculateSizes(); + + my $module = $cdb->get('backup'); + if ($module) { + $module = $module->prop('Program'); + } + + # The default e-smith backup program is flexbackup. + unless (defined $module) { + $module = "flexbackup"; + } elsif ($module eq '') { + $module = "flexbackup"; + } + + $bac_datas{'tarsize'} = $tarsize; + $bac_datas{'dumpsize'} = $dumpsize; + $bac_datas{'module'} = $module; + + if ($tarsize =~ /Tb/ or $tarsize =~ /(\d+)Gb/ and $1 >= 2) { + $notif = $c->l("bac_BACKUP_DESKTOP_TOO_BIG"); + } + + my $rec = $cdb->get('backup'); + my ($backup_status, $backupwk_status) = 'disabled'; + + if ($rec) { + $backup_status = $rec->prop('status') || 'disabled'; + } + + if ($backup_status eq "enabled") { + $bac_datas{'backupTime'} = $rec->prop('backupTime'); + $bac_datas{'reminderTime'} = $rec->prop('reminderTime'); + } + + $rec = $cdb->get('backupwk'); + if ($rec) { + $backupwk_status = $rec->prop('status') || 'disabled'; + } + + if ($backupwk_status eq "enabled") { + $bac_datas{'backupwkTime'} = $rec->prop('BackupTime'); + + } + + $bac_datas{'backupStatus'} = $backup_status; + $bac_datas{'backupwkStatus'} = $backupwk_status; + + $c->stash( title => $title, notif => $notif, bac_datas => \%bac_datas ); + $c->render(template => 'backup'); + +}; + + +sub do_display { + + my $c = shift; + $c->app->log->info($c->log_req); + + my $rt = $c->current_route; + my ($res, $result) = ''; + + my $function = $c->param('Function'); + + if ($function =~ /^(\S+)$/) { + $function = $1; + } elsif ($function =~ /^\s*$/) { + $function = "zoverall"; + } else { + $result = $c->l('bac_INVALID_FUNCTION') . $function; + $function = undef; + } + + my %bac_datas = (); + $bac_datas{'function'} = $function; + + my $title = $c->l('bac_BACKUP_TITLE'); + my ($notif, $dest) = ''; + + if ( $function eq 'desktop_backup' ) { + my $res = desktopBackup(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $bac_datas{function} = 'SUC'; + $result = $c->l('bac_SUCCESS'); + $c->app->log->info('desktop backup LAUNCHED'); + $c->flash(success => $result); + } else { + $c->flash(error => $result); + } + $c->redirect_to("backup"); + } + + + if ( $function eq 'tape_configure' ) { + + $bac_datas{'status'} = 'unchecked'; + my $backupTime = "2:00"; + + my $rec = $cdb->get('backup'); + if ($rec) { + $backupTime = $rec->prop('backupTime') || "2:00"; + + my $backup_status = $rec->prop('status'); + if (defined $backup_status && $backup_status eq "enabled") { + $bac_datas{'status'} = "checked"; + } + } + ($bac_datas{backupAMPM}, $bac_datas{reminderAMPM}) = 'AM'; + + ($bac_datas{backupHour}, $bac_datas{backupMin}) = split (":", $backupTime, -1); + if ($bac_datas{backupHour} > 11) { + if ($bac_datas{backupHour} > 12) { + $bac_datas{backupHour} -= 12; + } + $bac_datas{backupAMPM} = 'PM'; + } + + # Obtain time for reminder notice from the backup cron template + my $reminderTime = "14:00"; + if ($rec) { + $reminderTime = $rec->prop('reminderTime') || "14:00"; + } + + ($bac_datas{reminderHour}, $bac_datas{reminderMin}) = split (":", $reminderTime, -1); + if ($bac_datas{reminderHour} > 12) { + $bac_datas{reminderHour} -= 12; + $bac_datas{reminderAMPM} = 'PM'; + } + } + + + if ( $function eq 'workstn_configure' ) { + + my $rec = $cdb->get('backupwk'); + $bac_datas{vfstype} = $rec->prop('VFSType') || 'cifs'; + $bac_datas{status} = $rec->prop('status'); + + } + + + $dest = "back_$function"; + + $c->stash( title => $title, notif => $result, bac_datas => \%bac_datas ); + return $c->render( template => $dest ); + +}; + + +sub do_update { + + my $c = shift; + $c->app->log->info($c->log_req); + + my $rt = $c->current_route; + my $function = $c->param('Function'); + + my %bac_datas = (); + $bac_datas{function} = $function; + my $title = $c->l('bac_BACKUP_TITLE'); + my ($dest, $res, $result) = ''; + + + if ( $function eq 'desktop_backup' ) { + + # should not happen !! no desktop_backup template !! + + my $res = desktopBackup(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $bac_datas{function} = 'SUC'; + $result = $c->l('bac_SUCCESS'); + $c->stash( notif => $result ); + $c->redirect_to("/backup"); + } + } + + + if ( $function eq 'tape_configure' ) { + + my $status = $c->param('Tapebackup'); + my $backupHour = $c->param('BackupHour'); + my $backupMin = $c->param('BackupMin'); + my $bampm = $c->param('BackupAMPM'); + my $reminderHour = $c->param('ReminderHour'); + my $reminderMin = $c->param('ReminderMin'); + my $rampm = $c->param('ReminderAMPM'); + + ## $c->l('bac_UPDATING_TAPE_CONF') + + if (defined $status && $status eq "on") { + + if ($backupHour =~ /^(.*)$/) { + $backupHour = $1; + } else { + $backupHour = "12"; + } + if (($backupHour < 1) || ($backupHour > 12)) { + $result .= $c->l('bac_ERR_INVALID_HOUR').$backupHour. + ' '.$c->l('bac_BETWEEN_0_AND_12').' '; + } + + if ($backupMin =~ /^(.*)$/) { + $backupMin = $1; + } else { + $backupMin = "0"; + } + if (($backupMin < 0) || ($backupMin > 59)) { + $result .= $c->l('bac_ERR_INVALID_MINUTE').$backupMin. + ' '.$c->l('bac_BETWEEN_0_AND_59').' '; + } + + if ($reminderHour =~ /^(.*)$/) { + $reminderHour = $1; + } else { + $reminderHour = "12"; + } + if (($reminderHour < 1) || ($reminderHour > 12)) { + $result .= $c->l('bac_ERR_INVALID_REMINDER_HOUR').$reminderHour. + ' '.$c->l('bac_BETWEEN_0_AND_12').' '; + } + + if ($reminderMin =~ /^(.*)$/) { + $reminderMin = $1; + } else { + $reminderMin = "0"; + } + if (($reminderMin < 0) || ($reminderMin > 59)) { + $result .= $c->l('bac_ERR_INVALID_REMINDER_MINUTE').$reminderMin. + ' '.$c->l('bac_BETWEEN_0_AND_59').' '; + } + } + else + { + # service disabled no controls + } + + ##$result .= ' ** Blocked for testing ** !'; + + if ( ! $result ) { + $res = $c->updateTapeBackupConfig($status, $backupHour, + $backupMin, $bampm, $reminderHour, $reminderMin, $rampm); + + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $bac_datas{function} = 'SUC'; + if (defined $status && $status eq "on") { + $result .= ($c->l('bac_SUCCESSFULLY_ENABLED_TAPE').' '. + $c->l('bac_WITH_BACKUP_TIME')."$backupHour:$backupMin".' '. + $c->l('bac_WITH_REMINDER_TIME')."$reminderHour:$reminderMin"); + } else { + $result .= $c->l('bac_SUCCESSFULLY_DISABLED'); + } + } + } + } + + + if ( $function eq 'tape_restore' ) { + + my $lock_file = "/var/lock/subsys/e-smith-restore"; + my $file_handle = &esmith::lockfile::LockFileOrReturn($lock_file); + + unless ($file_handle) { + $result .= $c->l('bac_UNABLE_TO_RESTORE_CONF').' '. + $c->l('ANOTHER_RESTORE_IN_PROGRESS'); + } + + $result .= ' ** Blocked for testing ** ! (HARD TO TEST!)'; + + if ( ! $result ) { + my $res = $c->tapeRestore( $lock_file, $file_handle ); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $bac_datas{function} = 'SUC'; + $result = $c->l('bac_SUCCESS'); + } + } + } + + + if ( $function eq 'workstn_configure' ) { + +# $bac_datas{xxx} = $c->param('XXX'); + + # controls +# $res = $c->zzzz( $c->param('ZZZZ') ); +# $result .= $res . ' DMS ' unless $res eq 'OK'; + + $result .= ' ** Blocked for testing ** !'; + + if ( ! $result ) { + $res = $c->workstnConfigure(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $bac_datas{function} = 'SUC'; + $result = $c->l('bac_SUCCESS'); + } + } + } + + + if ( $function eq 'workstn_verify' ) { + +# $bac_datas{xxx} = $c->param('XXX'); + + # controls +# $res = $c->zzzz( $c->param('ZZZZ') ); +# $result .= $res . ' DMS ' unless $res eq 'OK'; + + $result .= ' ** Blocked for testing ** !'; + + if ( ! $result ) { + $res = $c->workstnVerify(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $bac_datas{function} = 'SUC'; + $result = $c->l('bac_SUCCESS'); + } + } + } + + + if ( $function eq 'workstn_restore' ) { + +# $bac_datas{xxx} = $c->param('XXX'); + + # controls +# $res = $c->zzzz( $c->param('ZZZZ') ); +# $result .= $res . ' DMS ' unless $res eq 'OK'; + + $result .= ' ** Blocked for testing ** !'; + + if ( ! $result ) { + $res = $c->workstnRestore(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $bac_datas{function} = 'SUC'; + $result = $c->l('bac_SUCCESS'); + } + } + } + + + if ( $function eq 'workstn_sel_restore' ) { + +# $bac_datas{xxx} = $c->param('XXX'); + + # controls +# $res = $c->zzzz( $c->param('ZZZZ') ); +# $result .= $res . ' DMS ' unless $res eq 'OK'; + + $result .= ' ** Blocked for testing ** !'; + + if ( ! $result ) { + $res = $c->workstnSelRestore(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $bac_datas{function} = 'SUC'; + $result = $c->l('bac_SUCCESS'); + } + } + } + + + # common part for all functions + + $c->stash( title => $title, bac_datas => \%bac_datas ); + if ($bac_datas{function} ne 'SUC') { + $c->flash(error => $result); + $bac_datas{'function'} = $function; + $dest = "back_$function"; + return $c->render(template => $dest); + } + + my $message = $function . ' updates DONE'; + $c->app->log->info($message); + $c->flash(success => $result); + + #return to 'backup' route !!! + $c->redirect_to('backup'); + +}; + + +sub get_function_options { + + my $c = shift; + + return [[ $c->l('bac_DESKTOP_BACKUP') => 'desktop_backup' ], + [ $c->l('bac_TAPE_CONFIGURE') => 'tape_configure' ], + [ $c->l('bac_TAPE_RESTORE') => 'tape_restore' ], + [ $c->l('bac_WORKSTN_CONFIGURE') => 'workstn_configure' ], + [ $c->l('bac_WORKSTN_VERIFY') => 'workstn_verify' ], + [ $c->l('bac_WORKSTN_RESTORE') => 'workstn_restore' ], + [ $c->l('bac_WORKSTN_SEL_RESTORE') => 'workstn_sel_restore']]; + +} + + +sub desktopBackup { + + my $c = shift; + + # Generate a header that will trigger a download and send data as + # an octet stream. + + my $backups = esmith::BackupHistoryDB->open; + my $now = time(); + my $backup_rec = $backups->new_record($now, { + type => 'backup_record', + BackupType => 'desktop', + StartEpochTime => $now, + }); + my $CompressionLevel = $cdb->get_prop("backupconsole", "CompressionLevel") || "-6"; + my @exclude = map (" --exclude=$_",@backup_excludes); + + # Dump the current mysql tables so that they are part of the image. + # The events handle cases where mysqld is not enabled, and/or is + # not running. + + my $status = system("/sbin/e-smith/signal-event", "pre-backup", "desktop"); + if ($status) + { + desktopBackupRecordStatus($backup_rec, 'pre-backup', $status); + return ($c->l('bac_OPERATION_STATUS_REPORT'). + $c->l('bac_ERR_PRE_BACKUP')); + } + + print "Expires: 0\n"; + print "Content-type: application/octet-stream\n"; + print "Content-disposition: attachment; filename=smeserver.tgz\n"; + print "\n"; + setpgrp; + my $ourpgrp = getpgrp; + local $SIG{PIPE} = sub + { + local $SIG{HUP} = 'IGNORE'; + warn "Got sigpipe - sending HUP to $ourpgrp\n"; + kill HUP => -$ourpgrp; + desktopBackupRecordStatus($backup_rec, + 'send2browser', 'Incomplete'); + exit 1; + }; + + open(RD, + "/bin/tar --directory / --create @directories --file=-" + . "@exclude | /usr/bin/gzip $CompressionLevel |" + ); + + while () + { + print; + } + + close RD; + + # Remove the dumped tables. + + $status = system("/sbin/e-smith/signal-event", "post-backup", "desktop"); + if ($status) + { + desktopBackupRecordStatus($backup_rec, 'post-backup', $status); + die ($c->l('bac_ERR_POST_BACKUP'),"\n"); + } + $now = time(); + $backup_rec->set_prop('EndEpochTime', "$now"); + $backup_rec->set_prop('Result', "0"); +} + + +sub desktopBackupRecordStatus { + + my ($backup, $phase, $status) = @_; + my $now = time(); + + warn("Backup terminated: $phase failed - status: $status\n"); + $backup->set_prop('EndEpochTime', "$now"); + $backup->set_prop('Result', "$phase:$status"); +} + + +sub updateTapeBackupConfig { + + my ($c, $status, $backupHour, $backupMin, $bampm, + $reminderHour, $reminderMin, $rampm) = @_; + + if (defined $status && $status eq "on") { + + $backupMin = sprintf("%02d", $backupMin); + + if ($bampm =~ /^(.*)$/) { + $bampm = $1; + } else { + $bampm = "AM"; + } + # convert to 24 hour time + $backupHour = $backupHour % 12; + if ($bampm eq "PM") { + $backupHour = $backupHour + 12; + } + + $reminderMin = sprintf("%02d", $reminderMin); + + if ($rampm =~ /^(.*)$/) { + $rampm = $1; + } else { + $rampm = "AM"; + } + # convert to 24 hour time + $reminderHour = $reminderHour % 12; + if ($rampm eq "PM") { + $reminderHour = $reminderHour + 12; + } + + # variables passed validity checks, set configuration database values + my $oldUnsav = $cdb->get('UnsavedChanges')->value; + + my $rec = $cdb->get('backup'); + unless (defined $rec) + { + $rec = $cdb->new_record('backup', {type=>'service'}); + } + + $rec->set_prop('status', 'enabled'); + + my $module = $rec->prop('Program'); + + # The default e-smith backup program is flexbackup. + + unless (defined $module) { + $module = "flexbackup"; + } elsif ($module eq '') { + $module = "flexbackup"; + } + + $rec->set_prop('Program', $module); + $rec->set_prop('backupTime', "$backupHour:$backupMin"); + $rec->set_prop('reminderTime', "$reminderHour:$reminderMin"); + + $cdb->get('UnsavedChanges')->set_value($oldUnsav); + + system("/sbin/e-smith/signal-event", "conf-backup") == 0 + or return ($c->l('bac_ERR_CONF_BACKUP'),"\n"); + + return 'OK'; + } + else + { + # set service to disabled + my $oldUnsav = $cdb->get('UnsavedChanges')->value; + + my $rec = $cdb->get('backup'); + unless ($rec) + { + $rec = $cdb->new_record('backup', {type=>'service'}); + } + + $rec->set_prop('status', 'disabled'); + $cdb->get('UnsavedChanges')->set_value($oldUnsav); + + system("/sbin/e-smith/signal-event", "conf-backup") == 0 + or return ($c->l('bac_ERR_CONF_BACKUP')."\n"); + + return 'OK'; + } + + return undef; +} + + +sub CalculateSizes () { + + my $c = shift; + + #------------------------------------------------------------ + # figure out the size of the tar file. + #------------------------------------------------------------ + + my $tarsize = 0; + + # It takes way too much time to do a du on /home/e-smith. So we'll + # estimate the current size. + # We do this by checking the quota used by each user on the system. + + # Get a $dev value appropriate for use in Quota::query call. + my $dev = Quota::getqcarg("/home/e-smith/files"); + + foreach my $user ($adb->users()) + { + my $name = $user->key; + my $uid = getpwnam($name); + unless ($uid) + { + warn ($c->l('bac_NO_UID_FOR_NAME').$name."\n"); + # We shouldn't ever get here. If we do, we can't get + # the quota value for this user, so we just skip to + # the next one. + next; + } + + # Get current quota settings. + my ($blocks) = Quota::query($dev, $uid, 0); + $tarsize += $blocks; + } + + # We add to this the size of root owned firectories, estimated using du. + # If this takes too long, then the admin only has his or + # herself to blame! + + # Remove /home/e-smith from backup list, and make paths absolute + my @list = map { "/$_" } grep { !/home\/e-smith/ } @directories; + open(DU, "-|") + or exec '/usr/bin/du', '-s', @list; + + while () + { + my ($du) = split(/\s+/); + $tarsize += $du; + } + close DU; + + $tarsize = showSize($tarsize); + + #------------------------------------------------------------ + # figure out the size of the dump files + #------------------------------------------------------------ + + my $dumpsize = 0; + + open(DF, "-|") + or exec '/bin/df', '-P', '-t', 'ext3', '-t', 'ext4'; + + while () + { + next unless (/^\//); + + (undef, undef, my $s, undef) = split(/\s+/, $_); + + $dumpsize += $s; + } + + # increase size by 10% to cope with dump overhead. + + $dumpsize *= 1.1; + + close DF; + + $dumpsize = showSize($dumpsize); + + #------------------------------------------------------------ + # how much free space is in /tmp + #------------------------------------------------------------ + + my $tmpfree = 0; + my $halffree = 0; + + open(DF, "-|") + or exec '/bin/df', '-P', '-t', 'ext3', '-t', 'ext4', '/tmp'; + + while () + { + next unless (/^\//); + + (undef, undef, undef, my $s) = split(/\s+/, $_); + + $tmpfree += $s; + } + + close DF; + + $halffree = $tmpfree / 2; + + $tmpfree = showSize($tmpfree); + $halffree = showSize($halffree); + + return ($tarsize, $dumpsize, $tmpfree, $halffree); +} + + +sub showSize { + + # convert size to Mb or Gb or Tb :) Remember, df reports in kb. + + my $size = shift; + + my $Mb = 1024; + my $Gb = $Mb * $Mb; + my $Tb = $Mb * $Mb * $Mb; + + if ($size >= $Tb) { + $size /= $Tb; + $size = int($size) . "Tb"; + } elsif ($size >= $Gb) { + $size /= $Gb; + $size = int($size) . "Gb"; + } elsif ($size >= $Mb) { + $size /= $Mb; + $size = int($size) . "Mb"; + } else { + $size .= "kb"; + } + + return $size; +} + + +sub tapeRestore { + + my ($c, $lock_file, $file_handle) = @_; + + my $rec = $rdb->get('restore'); + $rec->set_prop('state', 'running'); + $rec->set_prop('start', time); + + my $sec = 10; + print "Refresh: $sec; URL=/server-manager2/backup\n"; + print $c->l('bac_NOW_RESTORING_FROM_TAPE'); + print $c->l('bac_MUST_REBOOT_AFTER_RESTORE'); + print $c->l('bac_PAGE_REFRESH_IN', $sec); + + my $child; + + if ($child = fork) { + # Parent + $SIG{'CHLD'} = 'IGNORE'; + &esmith::lockfile::UnlockFile($file_handle); + return 'OK'; + } + elsif (defined $child) { + # Child + # Re-establish the lock. Wait till it is relinquished by the parent. + + $file_handle = &esmith::lockfile::LockFileOrWait($lock_file); + + # Close STDOUT so that the web server connection is closed. + close STDOUT; + + # Now reopen STDOUT for the child. Redirect it to STDERR. + open(STDOUT, ">&STDERR"); + + unless(system("/sbin/e-smith/signal-event", "pre-restore") == 0) + { + $rec->set_prop('errmsg', $c->l('bac_ERR_PRE_RESTORE')); + $rec->delete_prop('state'); + die ($c->l('bac_ERR_PRE_RESTORE'),"\n"); + } + + unless(system("/sbin/e-smith/signal-event", "restore-tape") == 0) + { + $rec->set_prop('errmsg', $c->l('bac_ERR_RESTORING_FROM_TAPE')); + $rec->delete_prop('state'); + die ($c->l('bac_ERR_RESTORING_FROM_TAPE')."\n"); + } + + #---------------------------------------- + # regenerate configuration files + #---------------------------------------- + + unless(system("/usr/sbin/groupmod", "-g", "$www_gid", "www") == 0) + { + $rec->set_prop('errmsg', $rec->prop('errmsg').'
'. + $c->l('bac_ERR_RESTORING_GID')); + warn ($c->l('bac_ERR_RESTORING_GID')."\n"); + } + unless(system("/usr/sbin/usermod", "-g", "$www_gid", "www") == 0) + { + $rec->set_prop('errmsg', $rec->prop('errmsg').'
'. + $c->l('bac_ERR_RESTORING_INITIAL_GRP')); + warn ($c->l('bac_ERR_RESTORING_INITIAL_GRP')."\n"); + } + unless(system("/sbin/e-smith/signal-event", "post-upgrade") == 0) + { + $rec->set_prop('errmsg', $rec->prop('errmsg').'
'. + $c->l('bac_ERR_UPDATING_CONF_AFTER_TAPE_RESTORE')); + $rec->delete_prop('state'); + die ($c->l('bac_ERR_UPDATING_CONF_AFTER_TAPE_RESTORE')); + } + + my $finish = time; + $rec->set_prop('state', 'complete'); + $rec->set_prop('finish', $finish); + + my $start = $rec->prop('start'); + $start = scalar localtime($start); + $finish = scalar localtime($finish); + + &esmith::lockfile::UnlockFile($file_handle); + + exit; + } + else + { + # Error + + $rec->delete_prop('state'); + $rec->set_prop('errmsg', $c->l('bac_COULD_NOT_FORK')); + die ($c->l("bac_COULD_NOT_FORK")." $!\n"); + } +} + + +sub get_VFSType_options { + + my $c = shift; + return [[ $c->l('cifs') => 'cifs' ], [ $c->l('nfs') => 'nfs' ], + [ $c->l('local removable disk') => 'usb' ], [ $c->l('Mounted disk') => 'mnt' ]]; +} + + +sub getWorkstnBackupConfig { + + my ($c) = @_; + my $out; + + my $backupwk_status; + my $enabledIncOnlyTimeout = ""; + my $backupwkLogin = 'backup'; + my $backupwkPassword = 'backup'; + my $backupwkStation = 'host'; + my $backupwkFolder = 'share'; + my $backupwkMount = '/mnt/smb'; + my $setsNumber; + my $filesinset; + my $backupwkTime; + my $backupwkTimeout; + my $backupwkIncOnlyTimeout; + my $VFSType; + my $compression; + my $dof; + my @dlabels = split(' ', $c->l('bac_DOW')); + + # Obtain backup informations from configuration + my $rec = $cdb->get('backupwk'); + if ($rec) { + $backupwkTime = $rec->prop('BackupTime') || '2:00'; + $backupwkLogin = $rec->prop('Login') || 'backup'; + $backupwkPassword = $rec->prop('Password') || 'backup'; + $backupwkStation = $rec->prop('SmbHost') || 'host'; + $backupwkFolder = $rec->prop('SmbShare') || 'share'; + $backupwkMount = $rec->prop('Mount') || '/mnt/smb'; + $VFSType = $rec->prop('VFSType') || 'cifs'; + $setsNumber = $rec->prop('SetsMax') || '1'; + $filesinset = $rec->prop('DaysInSet') || '1'; + $backupwkTimeout = $rec->prop('Timeout') || '12'; + $backupwkIncOnlyTimeout = $rec->prop('IncOnlyTimeout') || 'yes'; + $compression = $rec->prop('Compression') || '0'; + $dof = (defined $rec->prop('FullDay')) ? $rec->prop('FullDay') : '7'; + $backupwk_status = $rec->prop('status'); + } + + if ($rec) { + if ($VFSType eq 'usb') { + $out .= $c->l('bac_WORKSTN_BACKUP_USB').' '.$backupwkFolder.'
'; + } + elsif ($VFSType eq 'mnt') { + $out .= $c->l('bac_WORKSTN_BACKUP_MNT').' '.$backupwkMount.'
'; + } else { + $out .= $c->l('bac_WORKSTN_BACKUP_HOST').' '.$backupwkStation.' '; + $out .= $c->l('bac_WORKSTN_BACKUP_VFSTYPE').' '.$VFSType.'
'; + $out .= $c->l('bac_WORKSTN_BACKUP_SHARE').' '.$backupwkFolder.'
'; + } + if ($VFSType eq 'cifs') { + $out .= $c->l('bac_LOGIN').' '.$backupwkLogin.'
'; + $out .= $c->l('PASSWORD').' ********
'; + } + $out .= $c->l('bac_WORKSTN_BACKUP_SETSNUM').' '.$setsNumber.'
'; + $out .= $c->l('bac_WORKSTN_BACKUP_DAYSINSET').' '.$filesinset.'
'; + $out .= $c->l('bac_WORKSTN_BACKUP_COMPRESSION').' '.$compression.'
'; + $out .= $c->l('bac_WORKSTN_BACKUP_TOD').' '.$backupwkTime.'
'; + $out .= $c->l('bac_WORKSTN_BACKUP_TIMEOUT').' '.$backupwkTimeout.' '.$c->l('bac_HOURS'); + if ( $backupwkIncOnlyTimeout eq 'yes' ) { + $out .= $c->l('bac_WORKSTN_BACKUP_INCONLY_TIMEOUT') + } + $out .= '
'; + + if ( $dof eq '7' ) { + $out .= $c->l('bac_WORKSTN_FULL_BACKUP_EVERYDAY').'
'; + } else { + $out .= $c->l('bac_WORKSTN_FULL_BACKUP_DAY').' '.$dlabels[$dof].'
'; + } + } else { + $out = $c->l('bac_WORKSTN_BACKUP_NOT_CONFIGURED'); + } + + return $out; +} + + +1; 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 --- 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 +++ 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 @@ -1,5 +1,12 @@ package SrvMngr::Controller::Bugreport; +#---------------------------------------------------------------------- +# heading : Miscellaneous +# description : Report a bug +# navigation : 7000 7300 + +# routes : end +#------------------------------ use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Clamav; +#---------------------------------------------------------------------- +# heading : Configuration +# description : Antivirus (ClamAV) +# navigation : 6000 6720 +# +# routes : end +#------------------------------ + use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Datetime; +#---------------------------------------------------------------------- +# heading : Configuration +# description : Date and time +# navigation : 6000 6100 + +# routes : end +#------------------------------ + use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Directory; +#---------------------------------------------------------------------- +# heading : Configuration +# description : Directory +# navigation : 6000 6300 +# +# routes : end +#---------------------------------------------------------------------- + use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,12 @@ package SrvMngr::Controller::Domains; +#---------------------------------------------------------------------- +# heading : Configuration +# description : DOMAINS +# navigation : 6000 6600 +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -0,0 +1,967 @@ +package SrvMngr::Controller::Emailsettings; + +#---------------------------------------------------------------------- +# heading : Configuration +# description : E-mail +# navigation : 6000 6700 +# +# +# routes : end +#---------------------------------------------------------------------- +use strict; +use warnings; +use Mojo::Base 'Mojolicious::Controller'; + +use Locale::gettext; +use SrvMngr::I18N; + +use SrvMngr qw(theme_list init_session_cgi ip_number_or_blank); + +use esmith::ConfigDB; +use esmith::AccountsDB; + +use esmith::util; +use File::Basename; + +our $pattern_db = esmith::ConfigDB->open("mailpatterns"); +our $cdb = esmith::ConfigDB->open || die "Couldn't open config db"; + + +sub main { + + my $c = shift; + $c->app->log->info($c->log_req); + + my %mai_datas = (); + my $title = $c->l('mai_FORM_TITLE'); + + $mai_datas{'trt'} = 'LIST'; + $mai_datas{fetchmailmethod} = $cdb->get_prop('fetchmail', 'Method'); + + $c->stash( title => $title, notif => '', mai_datas => \%mai_datas ); + $c->render(template => 'emailsettings'); + +}; + + +sub do_display { + + my $c = shift; + + my $rt = $c->current_route; + my $trt = ($c->param('trt') || 'LIST'); + + my %mai_datas = (); + my $title = $c->l('mai_FORM_TITLE'); + my ($notif, $dest) = ''; + + $mai_datas{'trt'} = $trt; + + if ( $trt eq 'ACC' ) { + $dest = 'emailaccess'; + $mai_datas{fetchmailmethod} = $cdb->get_prop('fetchmail', 'Method'); + } + + if ( $trt eq 'FIL' ) { + $dest = 'emailfilter'; + $mai_datas{'virusstatus'} = $c->get_virus_status(); + $mai_datas{'spamstatus'} = $cdb->get_prop('spamassassin', 'status'); + $mai_datas{'spamsensitivity'} = $cdb->get_prop('spamassassin', 'Sensitivity','medium'); + $mai_datas{'spamtaglevel'} = $cdb->get_prop('spamassassin', 'TagLevel') || '0'; + $mai_datas{'spamrejectlevel'} = $cdb->get_prop('spamassassin', 'RejectLevel') || '0'; + $mai_datas{spamsortspam} = $cdb->get_prop('spamassassin', 'SortSpam'); + $mai_datas{spamsubjecttag} = $cdb->get_prop('spamassassin', 'SubjectTag'); + $mai_datas{spamsubject} = $cdb->get_prop('spamassassin', 'Subject'); + } + + if ( $trt eq 'REC' ) { + $dest = 'emailreceive'; + $mai_datas{fetchmailmethod} = $cdb->get_prop('fetchmail', 'Method'); + $mai_datas{freqoffice} = $cdb->get_prop('fetchmail', 'FreqOffice'); + $mai_datas{freqoutside} = $cdb->get_prop('fetchmail', 'FreqOutside'); + $mai_datas{freqweekend} = $cdb->get_prop('fetchmail', 'FreqWeekend'); + $mai_datas{secondarymailserver} = $cdb->get_prop('fetchmail', 'SecondaryMailServer'); + $mai_datas{secondarymailaccount} = $cdb->get_prop('fetchmail', 'SecondaryMailAccount'); + $mai_datas{secondarymailpassword} = $cdb->get_prop('fetchmail', 'SecondaryMailPassword'); + $mai_datas{specifyheader} = get_secondary_mail_use_envelope(); + $mai_datas{secondarymailenvelope} = $cdb->get_prop('fetchmail', 'SecondaryMailEnvelope'); + + } + + if ( $trt eq 'DEL' ) { + $dest = 'emaildeliver'; + $mai_datas{emailunknownuser} = $cdb->get_value('EmailUnknownUser') || '"returntosender'; + $mai_datas{delegatemailserver} = $cdb->get_value('DelegateMailServer'); + $mai_datas{smtpsmarthost} = $cdb->get_value('SMTPSmartHost'); + $mai_datas{smtpauthproxystatus} = $cdb->get_prop('smtp-auth-proxy', 'status') || 'disabled'; + $mai_datas{smtpauthproxyuserid} = $cdb->get_prop('smtp-auth-proxy', 'Userid') || ''; + $mai_datas{smtpauthproxypassword} = $cdb->get_prop('smtp-auth-proxy', 'Passwd') || ''; + } + + + $c->stash( title => $title, notif => $notif, mai_datas => \%mai_datas ); + return $c->render( template => $dest ); + +}; + + +sub do_update { + + my $c = shift; + $c->app->log->info($c->log_req); + + my $rt = $c->current_route; + my $trt = $c->param('trt'); + + my %mai_datas = (); + $mai_datas{trt} = $trt; + + my $title = $c->l('mai_FORM_TITLE'); + + my ($dest, $res, $result) = ''; + + if ( $trt eq 'ACC' ) { + + $dest = 'emailaccess'; +# $mai_datas{xxx} = $c->param('XXX'); + + # controls +# $res = xxxxxxx( $c ); +# $result .= $res unless $res eq 'OK'; + + if ( ! $result ) { + $res = $c->change_settings_access(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $mai_datas{trt} = 'SUC'; + $result = $c->l('mai_SUCCESS'); + } + } + } + + if ( $trt eq 'FIL' ) { + + $dest = 'emailfilter'; +# $mai_datas{xxx} = $c->param('XXX'); + + # controls +# $res = zzzzzz( $c ); +# $result .= $res unless $res eq 'OK'; + + if ( ! $result ) { + $res = $c->change_settings_filtering(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $mai_datas{trt} = 'SUC'; + $result = $c->l('mai_SUCCESS'); + } + } + } + + if ( $trt eq 'REC' ) { + + $dest = 'emailreceive'; +# $mai_datas{xxx} = $c->param('XXX'); + + # controls +# $res = yyyyyyyyy( $c ); +# $result .= $res unless $res eq 'OK'; + + if ( ! $result ) { + $res = $c->change_settings_reception(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $mai_datas{trt} = 'SUC'; + $result = $c->l('mai_SUCCESS'); + } + } + } + + if ( $trt eq 'DEL' ) { + + $dest = 'emaildeliver'; +# $mai_datas{xxx} = $c->param('XXX'); + + # controls + $res = $c->ip_number_or_blank( $c->param('DelegateMailServer') ); + $result .= $res . ' DMS ' unless $res eq 'OK'; + + $res = $c->validate_smarthost( $c->param('SMTPSmartHost') ); + $result .= $res . ' SH ' unless $res eq 'OK'; + + $res = $c->nonblank_if_smtpauth( $c->param('SMTPSmartHost') ); + $result .= $res . ' SH ' unless $res eq 'OK'; + + $res = $c->nonblank_if_smtpauth( $c->param('SMTPAUTHPROXY_Userid') ); + $result .= $res . ' USR ' unless $res eq 'OK'; + + $res = $c->nonblank_if_smtpauth( $c->param('SMTPAUTHPROXY_Passwd') ); + $result .= $res . ' PWD ' unless $res eq 'OK'; + + if ( ! $result ) { + $res = $c->change_settings_delivery(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $mai_datas{trt} = 'SUC'; + $result = $c->l('mai_SUCCESS'); + } + } + } + + + $c->stash( title => $title, notif => $result, mai_datas => \%mai_datas ); + if ($mai_datas{trt} ne 'SUC') { + return $c->render(template => $dest); + } + $c->redirect_to("/emailsettings"); + +}; + + +sub get_virus_status { + + my ($c, $localise) = @_; + + my $status = $cdb->get_prop("qpsmtpd", 'VirusScan') || 'disabled'; + + return $localise ? $c->localise_status($status) : $status; +} + +sub get_spam_status { + + my ($c, $localise) = @_; + + my $status = $cdb->get_prop('spamassassin', 'status') || 'disabled'; + + return $localise ? $c->localise_status($status) : $status; +} + + +sub localise_status { + + my ($c, $status) = @_; + + return $c->l($status eq 'enabled' ? $c->l('ENABLED') : $c->l('DISABLED')); +} + + +sub get_prop { + + my ($c, $item, $prop, $default) = @_; + + return $cdb->get_prop($item, $prop) || $default; +} + + +sub get_value { + + my $c = shift; + my $item = shift; + + return $cdb->get_value($item) || ''; +} + + +sub get_emailunknownuser_status { + + my ($c, $localise) = @_; + + my $options = $c->get_emailunknownuser_options(); + + my $val = $cdb->get_value('EmailUnknownUser') || "returntosender"; + + return $localise ? $c->l($options->{$val}) : $val; +} + + +sub get_patterns_status { + + my ($c, $localise) = @_; + + my $status = $cdb->get_prop("qpsmtpd", 'PatternsScan') || 'disabled'; + + return $localise ? $c->localise_status($status) : $status; +} + + +sub adjust_patterns { + + my $c = shift; + + my @selected = @{$c->every_param('BlockExecutableContent')}; + + foreach my $pattern ( $pattern_db->get_all_by_prop( type => "pattern") ) + { + my $status = (grep $pattern->key eq $_, @selected) ? 'enabled' + : 'disabled'; + $pattern->set_prop('Status', $status); + } + + $pattern_db->reload; + + return scalar @selected; + +} + + +sub get_current_pop3_access { + + my ($c, $localise) = @_; + + my $pop3Status = $cdb->get_prop('pop3', 'status') || 'enabled'; + my $pop3Access = $cdb->get_prop('pop3', 'access') || 'private'; + + my $pop3sStatus = $cdb->get_prop('pop3s', 'status') || 'enabled'; + my $pop3sAccess = $cdb->get_prop('pop3s', 'access') || 'private'; + + my $options = get_pop_options(); + + if ($pop3Status ne 'enabled' && $pop3sStatus ne 'enabled') + { + return $localise ? $c->l($options->{disabled}) : 'disabled'; + } + elsif ($pop3Status eq 'enabled' && $pop3Access eq 'public') + { + return $localise ? $c->l($options->{public}) : 'public'; + } + elsif ($pop3sStatus eq 'enabled' && $pop3sAccess eq 'public') + { + return $localise ? $c->l($options->{publicSSL}) : 'publicSSL'; + } + return $localise ? $c->l($options->{private}) : 'private'; +} + + +sub get_current_imap_access { + + my ($c, $localise) = @_; + + my $imapStatus = $cdb->get_prop('imap', 'status') || 'enabled'; + my $imapAccess = $cdb->get_prop('imap', 'access') || 'private'; + + my $imapsStatus = $cdb->get_prop('imaps', 'status') || 'enabled'; + my $imapsAccess = $cdb->get_prop('imaps', 'access') || 'private'; + + my $options = get_imap_options(); + + if (($imapStatus ne 'enabled' || $imapAccess eq 'localhost') && $imapsStatus ne 'enabled') + { + return $localise ? $c->l($options->{disabled}) : 'disabled'; + } + if ($imapStatus eq 'enabled' && $imapAccess eq 'public') + { + return $localise ? $c->l($options->{public}) : 'public'; + } + elsif ($imapsStatus eq 'enabled' && $imapsAccess eq 'public') + { + return $localise ? $c->l($options->{publicSSL}) : 'publicSSL'; + } + return $localise ? $c->l($options->{private}) : 'private'; +} + + +sub get_current_smtp_auth { + + my ($c, $localise) = @_; + + my $smtpStatus = $cdb->get_prop('qpsmtpd', 'status') || 'enabled'; + my $smtpAuth = $cdb->get_prop('qpsmtpd', 'Authentication') || 'enabled'; + + my $smtpsStatus = $cdb->get_prop('sqpsmtpd', 'status') || 'enabled'; + my $smtpsAuth = $cdb->get_prop('sqpsmtpd', 'Authentication') || 'enabled'; + + my $options = get_smtp_auth_options(); + + if ($smtpStatus eq 'enabled' && $smtpAuth eq 'enabled') + { + return $localise ? $c->l($options->{public}) : 'public'; + } + elsif ($smtpsStatus eq 'enabled' && $smtpsAuth eq 'enabled') + { + return $localise ? $c->l($options->{publicSSL}) : 'publicSSL'; + } + return $localise ? $c->l($options->{disabled}) : 'disabled'; +} + + +sub get_current_webmail_status { + + my ($c, $localise) = @_; + + # determine status of webmail + my $WebmailStatus = "disabled"; + + my $IMPStatus = $cdb->get_prop('imp', 'status') || 'disabled'; + my $SSLonly = $cdb->get_prop('imp', 'access') || 'disabled'; + + my $HordeStatus = $cdb->get_prop('horde', 'status') || 'disabled'; + + my $MysqlStatus = $cdb->get_prop('mariadb', 'status') || 'disabled'; + + my $PHPStatus = $cdb->get_prop('php', 'status') || 'disabled'; + + my $Networkaccess = $cdb->get_prop('horde','access') || 'disabled'; + + # all four components must be on for webmail to be working + if ( ( $IMPStatus eq "enabled" ) + && ( $HordeStatus eq "enabled" ) + && ( $MysqlStatus eq "enabled" ) + && ( $PHPStatus eq "enabled" ) + && ( $Networkaccess eq "public")) + { + $WebmailStatus = ( $SSLonly eq "SSL" ) ? "enabledSSL" : "enabled"; + } + + elsif ( ( $IMPStatus eq "enabled" ) + && ( $HordeStatus eq "enabled" ) + && ( $MysqlStatus eq "enabled" ) + && ( $PHPStatus eq "enabled" ) + && ( $Networkaccess eq "private" )) + { + $WebmailStatus = ( $SSLonly eq "SSL" ) ? "localnetworkSSL" : "enabled"; + } + + my $options = get_webmail_options(); + + return $localise ? $c->l($options->{$WebmailStatus}) + : $WebmailStatus; + +} + + +sub get_pop_opt { + + my $c = shift; + + return [[ $c->l('DISABLED') => 'disabled' ], + [ $c->l('NETWORKS_ALLOW_LOCAL') => 'private' ], + [ $c->l('mai_SECURE_POP3') => 'publicSSL' ], + [ $c->l('mai_INSECURE_POP3') => 'public' ]]; + +} + + +sub get_pop_options { + + my $c = @_; + + my %options = ( + disabled => 'DISABLED', + private => 'NETWORKS_ALLOW_LOCAL', + publicSSL => 'mai_SECURE_POP3' + ); + + my $access = $cdb->get_prop('pop3', 'access') || 'private'; + + $options{public} = 'mai_INSECURE_POP3' if ($access eq 'public'); + + \%options; +} + + +sub get_imap_opt { + + my $c = shift; + + return [[ $c->l('DISABLED') => 'disabled' ], + [ $c->l('NETWORKS_ALLOW_LOCAL') => 'private' ], + [ $c->l('mai_SECURE_IMAP') => 'publicSSL' ], + [ $c->l('mai_INSECURE_IMAP') => 'public' ]]; + +} + + +sub get_imap_options { + + my $c = shift; + + my %options = ( + disabled => 'DISABLED', + private => 'NETWORKS_ALLOW_LOCAL', + publicSSL => 'mai_SECURE_IMAP' + ); + + my $access = $cdb->get_prop('imap', 'access') || 'private'; + + $options{public} = 'mai_INSECURE_IMAP' if ($access eq 'public'); + + \%options; +} + + +sub get_smtp_auth_options { + + my $c = shift; + + my %options = ( disabled => 'DISABLED', publicSSL => 'mai_SECURE_SMTP', public => 'mai_INSECURE_SMTP'); + + \%options; +} + + +sub get_webmail_opt { + + my $c = shift; + + return [[ $c->l('DISABLED') => 'disabled' ], + [ $c->l('mai_ENABLED_SECURE_ONLY') => 'enabledSSL' ], + [ $c->l('mai_ONLY_LOCAL_NETWORK_SSL') => 'localnetworkSSL' ], + [ $c->l('mai_ENABLED_BOTH') => 'public' ]]; + +} + + +sub get_webmail_options { + + my $c = shift; + + my %options = ( + disabled => 'DISABLED', + enabledSSL => 'mai_ENABLED_SECURE_ONLY', + localnetworkSSL => 'mai_ONLY_LOCAL_NETWORK_SSL' ); + + my $access = $cdb->get_prop('imp', 'access') || 'SSL'; + + $options{public} = 'ENABLED_BOTH' if ($access eq 'full'); + + \%options; +} + + +sub get_retrieval_opt { + + my $c = shift; + + return $cdb->get("SystemMode")->value eq "servergateway-private" + ? [ $c->l('mai_MULTIDROP') => 'multidrop'] + : [[ $c->l('mai_STANDARD') => 'standard'], + [ $c->l('mai_ETRN') => 'etrn' ], + [ $c->l('mai_MULTIDROP') => 'multidrop']]; +} + + +sub get_smtp_auth_opt { + + my $c = shift; + + return [[ $c->l('DISABLED') => 'disabled'], + [ $c->l('mai_SECURE_SMTP') => 'publicSSL'], + [ $c->l('mai_INSECURE_SMTP') => 'public']]; +} + + +sub get_emailunknownuser_options { + + my $c = shift; + my $accounts = esmith::AccountsDB->open_ro(); + my %existingAccounts = ('admin' => $c->l("mai_FORWARD_TO_ADMIN"), + 'returntosender' => $c->l("mai_RETURN_TO_SENDER") ); + + foreach my $account ($accounts->get_all) { + next if $account->key eq 'everyone'; + if ($account->prop('type') =~ /(user|group|pseudonym)/) { + $existingAccounts{$account->key} = $c->l("mai_FORWARD_TO") . " " . $account->key; + } + } + return(\%existingAccounts); +} + + +sub get_emailunknownuser_opt { + + my $c = shift; + my $accounts = esmith::AccountsDB->open_ro(); + + my @existingAccounts = ([ $c->l("mai_FORWARD_TO_ADMIN") => 'admin'], + [ $c->l("mai_RETURN_TO_SENDER") => 'returntosender']); + + foreach my $account ($accounts->get_all) { + next if $account->key eq 'everyone'; + if ($account->prop('type') =~ /(user|group|pseudonym)/) { + push @existingAccounts, [ $c->l("mai_FORWARD_TO") . " " . $account->key => $account->key]; + } + } + return(\@existingAccounts); +} + + +sub get_patterns_opt { + + my $c = shift; + my @options; + + foreach my $pattern ( $pattern_db->get_all_by_prop( type => "pattern" ) ) { + my %props = $pattern->props; + push @options, [ $props{'Description'} => $pattern->key ]; + } + return \@options; +} + + +sub get_patterns_current_opt { + + my $c = shift; + my @selected; + + foreach my $pattern ( $pattern_db->get_all_by_prop( type => "pattern" ) ) { + my %props = $pattern->props; + push @selected, $pattern->key if ($props{'Status'} eq 'enabled'); + } + return \@selected; +} + +sub get_spam_level_options { + + return [ 0..20 ]; +} + + +sub get_spam_sensitivity_opt { + + my $c = shift; + + return [[ $c->l('mai_VERYLOW') => 'verylow' ], + [ $c->l('mai_LOW') => 'low' ], + [ $c->l('mai_MEDIUM') => 'medium' ], + [ $c->l('mai_HIGH') => 'high' ], + [ $c->l('mai_VERYHIGH') => 'veryhigh' ], + [ $c->l('mai_CUSTOM') => 'custom' ]]; + +} + + +sub fetchmail_freq { + + my $c = shift; + + return [[ $c->l('mai_NEVER') => 'never' ], + [ $c->l('mai_EVERY5MIN') => 'every5min' ], + [ $c->l('mai_EVERY15MIN') => 'every15min' ], + [ $c->l('mai_EVERY30MIN') => 'every30min' ], + [ $c->l('mai_EVERYHOUR') => 'everyhour' ], + [ $c->l('mai_EVERY2HRS') => 'every2hrs' ]]; +} + + +sub display_multidrop { + + my $status = $cdb->get_prop('fetchmail', 'status') || 'disabled'; + + # XXX FIXME - WIP + # Only display ETRN/multidrop settings if relevant + # To do this, we need an "Show ETRN/multidrop settings" button + # in standard mode. + + # return ($status eq 'enabled'); + return 1; +} + + +sub change_settings_reception { + + my $c = shift; + + my $FetchmailMethod = ( $c->param('FetchmailMethod') || 'standard' ); + + my $FetchmailFreqOffice = ( $c->param('FreqOffice') || 'every15min' ); + + my $FetchmailFreqOutside = ( $c->param('FreqOutside') || 'everyhour' ); + my $FetchmailFreqWeekend = ( $c->param('FreqWeekend') || 'everyhour' ); + my $SpecifyHeader = ( $c->param('SpecifyHeader') || 'off' ); + + my $fetchmail = $cdb->get('fetchmail') || $cdb->new_record( "fetchmail", + { type => "service", status => "disabled" } ); + + if ( $FetchmailMethod eq 'standard' ) { + $fetchmail->set_prop( 'status', 'disabled' ); + $fetchmail->set_prop( 'Method', $FetchmailMethod ); + } + else { + $fetchmail->set_prop( 'status', 'enabled' ); + $fetchmail->set_prop( 'Method', $FetchmailMethod ); + $fetchmail->set_prop( 'SecondaryMailServer', + $c->param('SecondaryMailServer') ) + unless ( $c->param('SecondaryMailServer') eq '' ); + + $fetchmail->set_prop('FreqOffice', $FetchmailFreqOffice ); + $fetchmail->set_prop('FreqOutside', $FetchmailFreqOutside ); + $fetchmail->set_prop('FreqWeekend', $FetchmailFreqWeekend ); + $fetchmail->set_prop('SecondaryMailAccount', + $c->param('SecondaryMailAccount') ) + unless ( $c->param('SecondaryMailAccount') eq '' ); + + $fetchmail->set_prop( 'SecondaryMailPassword', + $c->param('SecondaryMailPassword') ) + unless ( $c->param('SecondaryMailPassword') eq '' ); + + if ( $SpecifyHeader eq 'on' ) { + $fetchmail->merge_props( + 'SecondaryMailEnvelope' => $c->param('SecondaryMailEnvelope') ); + } + else { + $fetchmail->delete_prop('SecondaryMailEnvelope'); + } + } + + my $smtpAuth = ($c->param('SMTPAuth') || 'public'); + if ($smtpAuth eq 'public') { + $cdb->set_prop("qpsmtpd", "Authentication", "enabled" ); + $cdb->set_prop("sqpsmtpd", "Authentication", "enabled" ); + } elsif ($smtpAuth eq 'publicSSL') { + $cdb->set_prop("qpsmtpd", "Authentication", "disabled" ); + $cdb->set_prop("sqpsmtpd", "Authentication", "enabled" ); + } else { + $cdb->set_prop("qpsmtpd", "Authentication", "disabled" ); + $cdb->set_prop("sqpsmtpd", "Authentication", "disabled" ); + } + + unless ( system( "/sbin/e-smith/signal-event", "email-update" ) == 0 ) + { + return $c->l('mai_ERROR_UPDATING_CONFIGURATION'); + } + return 'OK'; +} + + +sub change_settings_delivery { + + my ($c) = shift; + + my $EmailUnknownUser = ($c->param('EmailUnknownUser') || 'returntosender'); + + $cdb->set_value('SMTPSmartHost', $c->param('SMTPSmartHost')); + $cdb->set_value('DelegateMailServer', $c->param('DelegateMailServer')); + $cdb->set_value('EmailUnknownUser', $EmailUnknownUser); + + my $proxy = $cdb->get('smtp-auth-proxy'); + my %props = $proxy->props; + + for ( qw(Userid Passwd status) ) + { + $props{$_} = $c->param("SMTPAUTHPROXY_$_"); + } + + $proxy->merge_props(%props); + + unless ( system( "/sbin/e-smith/signal-event", "email-update" ) == 0 ) + { + return $c->l('mai_ERROR_UPDATING_CONFIGURATION'); + } + return 'OK'; +} + + +sub change_settings_access { + + my $c = shift; + + my $pop3Access = ($c->param('POPAccess') || 'private'); + if ($pop3Access eq 'disabled') { + $cdb->set_prop('pop3', "status", "disabled" ); + $cdb->set_prop('pop3s', "status", "disabled" ); + } else { + $cdb->set_prop('pop3', "status", "enabled" ); + $cdb->set_prop('pop3s', "status", "enabled" ); + } + if ($pop3Access eq 'public') { + $cdb->set_prop('pop3', "access", "public" ); + $cdb->set_prop('pop3s', "access", "public" ); + } elsif ($pop3Access eq 'publicSSL') { + $cdb->set_prop('pop3', "access", "private" ); + $cdb->set_prop('pop3s', "access", "public" ); + } else { + $cdb->set_prop('pop3', "access", "private" ); + $cdb->set_prop('pop3s', "access", "private" ); + } + + my $imapAccess = ($c->param('IMAPAccess') || 'private'); + if ($imapAccess eq 'disabled') { + $cdb->set_prop('imap', "status", "enabled" ); + $cdb->set_prop('imap', "access", "localhost" ); + $cdb->set_prop('imaps', "status", "disabled" ); + } elsif ($imapAccess eq 'public') { + $cdb->set_prop('imap', "status", "enabled" ); + $cdb->set_prop('imap', "access", "public" ); + $cdb->set_prop('imaps', "status", "enabled" ); + $cdb->set_prop('imaps', "access", "public" ); + } elsif ($imapAccess eq 'publicSSL') { + $cdb->set_prop('imap', "status", "enabled" ); + $cdb->set_prop('imap', "access", "private" ); + $cdb->set_prop('imaps', "status", "enabled" ); + $cdb->set_prop('imaps', "access", "public" ); + } else { + $cdb->set_prop('imap', "status", "enabled" ); + $cdb->set_prop('imap', "access", "private" ); + $cdb->set_prop('imaps', "status", "enabled" ); + $cdb->set_prop('imaps', "access", "private" ); + } + + #------------------------------------------------------------ + # Set webmail state in configuration database, and access + # type for SSL + # PHP and MySQL should always be on, and are enabled by default + # We don't do anything with them here. + #------------------------------------------------------------ + + my $webmail = ($c->param('WebMail') || 'disabled'); + if ( $webmail eq "enabled" ) { + $cdb->set_prop('php', "status", $webmail ); + $cdb->set_prop('mariadb',"status", $webmail ); + $cdb->set_prop('imp',"status", $webmail ); + $cdb->set_prop('horde', "status", $webmail ); + $cdb->set_prop('imp',"access", "full" ); + $cdb->set_prop('horde',"access", "public" ); + $cdb->set_prop('horde',"HttpsOnly", "no" ); + } + elsif ( $webmail eq "enabledSSL" ) { + $cdb->set_prop('php',"status", "enabled" ); + $cdb->set_prop('mariadb',"status", "enabled" ); + $cdb->set_prop('imp',"status", 'enabled' ); + $cdb->set_prop('horde',"status", 'enabled' ); + $cdb->set_prop('imp',"access", "SSL" ); + $cdb->set_prop('horde',"access", "public" ); + $cdb->set_prop('horde',"HttpsOnly", "yes" ); + } + + elsif ( $webmail eq "localnetworkSSL" ) { + $cdb->set_prop('php',"status", "enabled" ); + $cdb->set_prop('mariadb',"status", "enabled" ); + $cdb->set_prop('imp',"status", 'enabled' ); + $cdb->set_prop('horde',"status", 'enabled' ); + $cdb->set_prop('imp',"access", "SSL" ); + $cdb->set_prop('horde',"access", "private" ); + $cdb->set_prop('horde',"HttpsOnly", "yes" ); + } + + else { + $cdb->set_prop('imp',"status", 'disabled' ); + $cdb->set_prop('horde',"status", 'disabled' ); + } + + unless ( system( "/sbin/e-smith/signal-event", "email-update" ) == 0 ) { + return $c->l('mai_ERROR_UPDATING_CONFIGURATION'); + } + + return 'OK'; +} + + +sub change_settings_filtering { + + my $c = shift; + + my $virus_status = ( $c->param('VirusStatus') || 'disabled' ); + $cdb->set_prop("qpsmtpd", 'VirusScan', $virus_status); + + for my $param ( qw( + status + Sensitivity + TagLevel + RejectLevel + SortSpam + Subject + SubjectTag) ) + { + $cdb->set_prop('spamassassin', $param, $c->param("Spam$param")); + } + + my $patterns_status = $c->adjust_patterns() ? 'enabled' : 'disabled'; + $cdb->set_prop("qpsmtpd", 'PatternsScan', $patterns_status); + + unless ( system( "/sbin/e-smith/signal-event", "email-update" ) == 0 ) + { + return $c->l('mai_ERROR_UPDATING_CONFIGURATION'); + } + + return 'OK'; + +} + + +#sub blank_or_ip_number { + +# my ($c, $value) = @_; + +# return 'OK' unless (defined $value); # undef is blank +# return 'OK' if ($value =~ /^$/); # blank is blank +# return $c->call_fm_validation("ip_number",$value,''); # otherwise, validate the input + +#} + + +sub nonblank_if_smtpauth { + + my ($c, $value) = @_; + + return "OK" unless ($c->param("SMTPAUTHPROXY_status") eq 'enabled'); + + return ($value =~ /\S+/) ? "OK" : $c->l('mai_VALIDATION_SMTPAUTH_NONBLANK'); + +} + + +sub get_secondary_mail_use_envelope { + + my $use_envelope = $cdb->get_prop('fetchmail', 'SecondaryMailEnvelope'); + if ( defined $use_envelope ) { + return ('on'); + } else { + return ('off'); + } +} + + +sub validate_smarthost { + my $fm = shift; + my $smarthost = shift; + + return ('OK') if ( $smarthost =~ /^(\S+\.\S+)$/ ); + + return ('OK') if ( $smarthost eq '' ); + + return "INVALID_SMARTHOST"; + +} + + +1; + + +__END__ +blank_or_ip_number +change_settings_access +change_settings_delivery +change_settings_filtering +change_settings_reception +display_multidrop +do_display +do_update +fetchmail_freq +get_current_imap_access +get_current_pop3_access +get_current_smtp_auth +get_current_webmail_status +get_emailunknownuser_opt +get_emailunknownuser_options +get_emailunknownuser_status +get_imap_opt +get_imap_options +get_patterns_current_opt +get_patterns_opt +get_patterns_status +get_pop_opt +get_pop_options +get_prop +get_retrieval_opt +get_smtp_auth_opt +get_smtp_auth_options +get_spam_level_options +get_spam_sensitivity_opt +get_spam_status +get_value +get_virus_status +get_webmail_opt +get_webmail_options +localise_status +main +nonblank_if_smtpauth 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Groups; +#---------------------------------------------------------------------- +# heading : Collaboration +# description : GROUPS +# navigation : 2000 2200 +#---------------------------------------------------------------------- +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; @@ -23,7 +31,7 @@ my %grp_datas = (); my $title = $c->l('grp_FORM_TITLE'); - my $modul = ''; + my $notif = ''; $grp_datas{trt} = 'LIST'; @@ -33,7 +41,7 @@ @groups = $adb->groups(); } - $c->stash( title => $title, modul => $modul, grp_datas => \%grp_datas, groups => \@groups ); + $c->stash( title => $title, notif => $notif, grp_datas => \%grp_datas, groups => \@groups ); $c->render(template => 'groups'); }; @@ -54,18 +62,15 @@ my %grp_datas = (); my $title = $c->l('grp_FORM_TITLE'); - my $modul = ''; + my $notif = ''; $grp_datas{'trt'} = $trt; if ( $trt eq 'ADD' ) { - my %users = @{gen_users_list( $c )}; - - $c->stash( users => \%users ); - } + if ( $trt eq 'UPD' ) { my %members = (); @@ -78,14 +83,13 @@ $grp_datas{description} = $rec->prop('Description') || ''; %members = @{gen_members_list( $c, $group )}; - - %users = @{gen_users_list( $c )}; } $c->stash( members => \%members, users => \%users ); } + if ( $trt eq 'DEL' ) { my %members = (); @@ -102,14 +106,12 @@ %ibays = @{gen_ibays_list($c, $group)}; } - # $c->flash(message => 'Del display Group okkkkkkkkkkkk'); - # $c->app->log->info("members: " . $c->dumper(%members)); - # $c->app->log->info("ibays: " . $c->dumper(%ibays)); $c->stash( grp_datas => \%grp_datas, members => \%members, ibays => \%ibays ); } + if ( $trt eq 'LIST' ) { my @groups; if ($adb) { @@ -120,7 +122,7 @@ } - $c->stash( title => $title, modul => $modul, grp_datas => \%grp_datas ); + $c->stash( title => $title, notif => $notif, grp_datas => \%grp_datas ); $c->render( template => 'groups' ); }; @@ -134,19 +136,21 @@ my $rt = $c->current_route; my $trt = ($c->param('trt') || 'LIST'); - my $result = ''; + my %grp_datas = (); + my $title = $c->l('grp_FORM_TITLE'); + my ($res, $result) = ''; + my $groupName = $c->param('groupName'); if ( $trt eq 'ADD' ) { - my $groupName = $c->param('groupName'); my $groupDesc = $c->param('groupDesc'); - my @members = $c->param('groupMembers'); - + my @members = @{$c->every_param('groupMembers')}; + + my $members = join ( ",", @members ); - $c->app->log->info("members: " . $c->dumper($groupName) . " " .$c->dumper($groupDesc) . " " .$c->dumper(@members) . " " . $c->dumper($members)); # controls (validate ?????) - my $res = validate_group( $c, $groupName ); + $res = validate_group( $c, $groupName ); $result .= $res unless $res eq 'OK'; $res = validate_group_length( $c, $groupName ); @@ -166,8 +170,6 @@ $groupDesc, 'Members', $members ); - $c->app->log->info("props: " . $c->dumper(%props)); - if ( ! $result ) { $adb->new_record( $groupName, \%props ); @@ -175,8 +177,6 @@ # Untaint groupName before use in system() ($groupName) = ($groupName =~ /^([a-z][\-\_\.a-z0-9]*)$/); - #???$c->clear_params(); - system("/sbin/e-smith/signal-event", "group-create", "$groupName") ==0 or $result .= $c->l('qgp_CREATE_ERROR')."\n"; @@ -184,14 +184,14 @@ if ( ! $result ) { $result = $c->l('grp_CREATED_GROUP') . ' ' . $groupName; + $trt = 'SUC'; } } if ( $trt eq 'UPD' ) { - my $groupName = $c->param('groupName'); my $groupDesc = $c->param('groupDesc'); - my @members = $c->param('groupMembers'); + my @members = @{$c->every_param('groupMembers')}; my $members = join ( ",", @members ); # controls @@ -204,16 +204,12 @@ if ( ! $result ) { - # $c->app->log->info("groupName: " . $c->dumper($groupName) . " , " . $c->dumper($members). " << " . $c->dumper(@members)); - $adb->get($groupName)->set_prop( 'Members', $members ); $adb->get($groupName)->set_prop( 'Description', $groupDesc ); # Untaint groupName before use in system() ($groupName) = ($groupName =~ /^([a-z][\-\_\.a-z0-9]*)$/); - #???$c->clear_params(); - system("/sbin/e-smith/signal-event", "group-modify", "$groupName") ==0 or $result .= $c->l('qgp_MODIFY_ERROR')."\n"; @@ -221,35 +217,39 @@ if ( ! $result ) { $result = $c->l('grp_MODIFIED_GROUP') . ' ' . $groupName; + $trt = 'SUC'; } } if ( $trt eq 'DEL' ) { - - my $group = ($c->param ('group') || ''); - if ($group =~ /^([a-z][\-\_\.a-z0-9]*)$/) { - $group = $1; + if ($groupName =~ /^([a-z][\-\_\.a-z0-9]*)$/) { + $groupName = $1; } else { - $result .= $c->l('grp_ERR_INTERNAL_FAILURE') . ':' . $group; + $result .= $c->l('grp_ERR_INTERNAL_FAILURE') . ':' . $groupName; } - my $rec = $adb->get($group); - $result .= $c->l('grp_ERR_INTERNAL_FAILURE') . ':' . $group unless ($rec); + my $rec = $adb->get($groupName); + $result .= $c->l('grp_ERR_INTERNAL_FAILURE') . ':' . $groupName unless ($rec); if ( ! $result ) { - my $res = delete_group( $c, $group ); + my $res = delete_group( $c, $groupName ); $result .= $res unless $res eq 'OK'; if ( ! $result ) { - $result = $c->l('grp_DELETED_GROUP') . ' ' . $group; + $result = $c->l('grp_DELETED_GROUP') . ' ' . $groupName; + $trt = 'SUC'; } } } - my $title = $c->l('grp_FORM_TITLE'); + $grp_datas{'group'} = $groupName; + $grp_datas{'trt'} = $trt; - $c->stash( title => $title, modul => $result ); - $c->render(template => 'module'); + $c->stash( title => $title, notif => $result, grp_datas => \%grp_datas ); + if ($grp_datas{trt} ne 'SUC') { + return $c->render(template => 'groups'); + } + $c->redirect_to('/groups'); }; @@ -325,9 +325,8 @@ $names{$user->key} = $user->prop('FirstName') . " " . $user->prop('LastName'); } - @users = %names; - return \@users; + return \%names; } @@ -346,6 +345,7 @@ =cut + sub validate_is_group () { my $c = shift; my $group = shift; 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Hostentries; +#---------------------------------------------------------------------- +# heading : Configuration +# description : Hostnames and addresses +# navigation : 6000 6500 +#---------------------------------------------------------------------- +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Ibays; +#---------------------------------------------------------------------- +# heading : Collaboration +# description : Information bays +# navigation : 2000 2500 +# +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,49 +0,0 @@ -package SrvMngr::Controller::Initial; - -use strict; -use warnings; - -use Mojo::Base 'Mojolicious::Controller'; - -use Locale::gettext; -use SrvMngr::I18N; - -sub main { - my $c = shift; - $c->app->log->info($c->log_req); - - #SrvMngr->startsess(); - if ( not defined $c->session->{lang} ) { - init_session( $c ); - } - - my $title = $c->l('initial_FORM_TITLE'); - my $modul = $c->render_to_string(inline => $c->l('initial_FRAMES_BODY')); - - $c->stash( title => $title, modul => $modul, nav => \%nav ); - - $c->render(template => 'initial'); - -} - - -sub init_session { - my $c = shift; - - $c->app->log->info("Init datas in welcome page."); - - my %datas = (); - %datas = SrvMngr::Model::Main->init_data( %datas ); - $c->session->{lang} = $datas{'lang'}; - $c->session->{copyRight} = $c->l($datas{'copyRight'}); - $c->session->{releaseVersion} = $datas{'releaseVersion'}; - $c->session->{PwdSet} = $datas{'PwdSet'}; - $c->session->{Unsafe} = $datas{'Unsafe'}; - $c->session->{SystemName} = $datas{'SystemName'}; - $c->session->{DomainName} = $datas{'DomainName'}; - $c->languages($datas{'lang'}); - -} - - -1; 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 --- 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 +++ 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 @@ -1,5 +1,8 @@ package SrvMngr::Controller::Initial; +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; 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 --- 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 +++ 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 @@ -1,5 +1,12 @@ package SrvMngr::Controller::Localnetworks; +#---------------------------------------------------------------------- +# heading : Security +# description : Local networks +# navigation : 5000 5300 +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; @@ -280,6 +287,7 @@ } else { my $simpleMask = esmith::util::computeLocalNetworkPrefix( $network, $networkMask ); - return (ret=>'ln_SUCCESS_NONSTANDARD_RANGE',vars=>"$network,$networkMask,$networkRouter,$totalHosts,$firstAddr,$lastAddr,$simpleMask"); + return ($fm->render_to_string(inline => l('ln_SUCCESS_NONSTANDARD_RANGE', + vars=>"$network,$networkMask,$networkRouter,$totalHosts,$firstAddr,$lastAddr,$simpleMask"))); } } 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 --- 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 +++ 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 @@ -1,5 +1,8 @@ package SrvMngr::Controller::Main; +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; 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 --- 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 +++ 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 @@ -1,5 +1,8 @@ package SrvMngr::Controller::Manual; +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; @@ -7,7 +10,6 @@ use Locale::gettext; use SrvMngr::I18N; - use SrvMngr qw(theme_list init_session_cgi); @@ -18,9 +20,7 @@ my $title = $c->l('manual_FORM_TITLE'); my $modul = $c->render_to_string(inline => $c->l('manual_DESCRIPTION')); - $c->stash( releaseVersion => $c->session->{releaseVersion}, copyRight => $c->session->{copyRight}, - PwdSet => $c->session->{PwdSet}, Unsafe => $c->session->{Unsafe}, - title => $title, modul => $modul); + $c->stash( title => $title, modul => $modul); $c->render(template => 'manual'); } 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 --- 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 +++ 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 @@ -1,5 +1,8 @@ package SrvMngr::Controller::Modsearch; +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -7,6 +7,9 @@ use Locale::gettext; use SrvMngr::I18N; +# +# routes : end +#---------------------------------------------------------------------- use SrvMngr qw(theme_list init_session_cgi); sub bugreport { 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 --- 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 +++ 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 @@ -1,5 +1,12 @@ package SrvMngr::Controller::Portforwarding; +#---------------------------------------------------------------------- +# heading : Security +# description : Port forwarding +# navigation : 5000 5400 +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Printers; +#---------------------------------------------------------------------- +# heading : Configuration +# description : Printers +# navigation : 6000 6400 +# +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Proxy; +#---------------------------------------------------------------------- +# heading : Security +# description : Proxy settings +# navigation : 5000 5500 +#---------------------------------------------------------------------- +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Pseudonyms; +#---------------------------------------------------------------------- +# heading : Collaboration +# description : Pseudonyms +# navigation : 2000 2400 +#---------------------------------------------------------------------- +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,12 @@ package SrvMngr::Controller::Qmailanalog; +#---------------------------------------------------------------------- +# heading : Administration +# description : Mail log file analysis +# navigation : 4000 4500 +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Quota; +#---------------------------------------------------------------------- +# heading : Collaboration +# description : Quotas +# navigation : 2000 2300 +#---------------------------------------------------------------------- +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,12 @@ package SrvMngr::Controller::Reboot; +#---------------------------------------------------------------------- +# heading : Administration +# description : Reboot or shutdown +# navigation : 4000 4700 +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; @@ -9,15 +16,6 @@ use SrvMngr qw(theme_list init_session_cgi); -#use esmith::util; -#use File::Basename; -#use Exporter; -#use Carp; - -#our @EXPORT = qw( change_settings -#); - - sub main { @@ -67,8 +65,8 @@ } } - #$c->stash( title => $title, modul => $result ); - #$c->render(template => 'module'); + $c->stash( title => $title, modul => $result ); + $c->render(template => 'module'); }; 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Remoteaccess; +#---------------------------------------------------------------------- +# heading : Security +# description : Remote access +# navigation : 5000 5200 +#---------------------------------------------------------------------- +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,8 @@ package SrvMngr::Controller::Request; +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Review; +#---------------------------------------------------------------------- +# heading : Configuration +# description : Review configuration +# navigation : 6000 6800 +#---------------------------------------------------------------------- +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; 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 --- 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 +++ 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 @@ -1,5 +1,12 @@ package SrvMngr::Controller::Starterwebsite; +#---------------------------------------------------------------------- +# heading : Miscellaneous +# description : Create starter web site +# navigation : 7000 7100 +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,12 @@ package SrvMngr::Controller::Support; +#---------------------------------------------------------------------- +# heading : Miscellaneous +# description : Support and licensing +# navigation : 5000 5300 +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,5 +1,8 @@ package SrvMngr::Controller::Swttheme; +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Useraccounts; +#---------------------------------------------------------------------- +# heading : Collaboration +# description : Users +# navigation : 2000 2100 +#---------------------------------------------------------------------- +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; @@ -780,7 +788,7 @@ $adb->create_user_auto_pseudonyms($acctName); my @old_groups = $adb->user_group_list($acctName); - my @new_groups = $c->param("groupMemberships"); + my @new_groups = @{$c->every_param("groupMemberships")}; $c->app->log->info($c->dumper("groups: Old " . @old_groups .' New '. @new_groups)); @@ -819,7 +827,7 @@ or warn "Can't create new account for $acctName (does it already exist?)\n"; $acct->reset_props(%userprops); $adb->create_user_auto_pseudonyms($acctName); - my @groups = $c->param("groupMemberships"); + my @groups = @{$c->every_param("groupMemberships")}; $adb->add_user_to_groups($acctName, @groups); @@ -849,7 +857,8 @@ my $acctName = $c->param('user'); - my @groups = $c->param('groupMemberships'); + my @groups = @{$c->every_param("groupMemberships")}; + $adb->set_user_groups($acctName, @groups); } 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 --- 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 +++ 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 @@ -1,5 +1,13 @@ package SrvMngr::Controller::Viewlogfiles; +#---------------------------------------------------------------------- +# heading : Administration +# description : View log files +# navigation : 4000 4400 +# +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -1,53 +1,87 @@ package SrvMngr::Controller::Wbl; +#---------------------------------------------------------------------- +# heading : Configuration +# description : E-mail WBL +# navigation : 6000 6710 + +# name : wbl, method : get, url : /wbl, ctlact : wbl#main +# name : wbldis, method : post, url : /wbl, ctlact : wbl#do_display +# name : wblupc, method : get, url : /wbl2, ctlact : wbl#do_update +# name : wblupd, method : post, url : /wbl2, ctlact : wbl#do_update +# +# routes : end +#---------------------------------------------------------------------- + use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; - use Locale::gettext; use SrvMngr::I18N; -use SrvMngr qw(theme_list init_session_cgi); +use SrvMngr qw( theme_list init_session_cgi ); + +use Exporter; +our @EXPORT_OK = qw( + get_contrib_desc + get_contrib_routes + ); -####$locale->{namespace} = 'SrvMngr::I18N::Wbl'; +our $db = esmith::ConfigDB->open() or die "Couldn't open ConfigDB\n"; +our $wdb = esmith::ConfigDB->open('wbl') or die "Couldn't open wbl dbase\n"; +our $sdb = esmith::ConfigDB->open('spamassassin') or die "Couldn't open spamassassin dbase\n"; -#use esmith::FormMagick::Panel::wbl; -use smeserver::Panel::wblNew; + +sub get_contrib_desc { + my $c = shift; + return { 'heading' => 'Configuration', + 'description' => 'E-mail WBL', + 'navigation' => '6000/6710' }; +} + + +sub get_contrib_routes { + my $c = shift; + my @rt = ( + { 'method' => 'get', 'url' => '/wbl', 'ctlact' => 'wbl#main', 'name' => 'wbl'}, + { 'method' => 'post', 'url' => '/wbl', 'ctlact' => 'wbl#do_display', 'name' => 'wbldis'}, + { 'method' => 'get', 'url' => '/wbl2', 'ctlact' => 'wbl#do_update', 'name' => 'wblupc'}, + { 'method' => 'post', 'url' => '/wbl2', 'ctlact' => 'wbl#do_update', 'name' => 'wblupd'}, + ); + return \@rt; +} sub main { + my $c = shift; $c->app->log->info($c->log_req); my %wbl_datas = (); my $title = $c->l('wbl_FORM_TITLE'); - my $modul = $c->l('wbl_WBL_DESCRIPTION'); $wbl_datas{'trt'} = 'CHOICE'; - my @wblList = ( [$c->l('wbl_RBL_LIST') => 'RBL'], [$c->l('wbl_BLACK_LIST') => 'BLACK'], [$c->l('wbl_WHITE_LIST') => 'WHITE'] ); - $c->stash( list => \@wblList ); - $c->stash( title => $title, modul => $modul, wbl_datas => \%wbl_datas); - $c->render(template => 'wbl'); + $c->stash( title => $title, wbl_datas => \%wbl_datas); + $c->render_maybe('wbl') or $c->render('wbl'); }; sub do_display { + my $c = shift; + $c->app->log->info($c->log_req); - #my $button = $c->param('button'); my $trt = $c->param('list') || 'CHOICE'; my %wbl_datas = (); my $title = $c->l('wbl_FORM_TITLE'); - my $modul = $c->l('wbl_WBL_DESCRIPTION'); $wbl_datas{'trt'} = $trt; if ( $trt eq 'RBL' ) { - # For RBL List # dnsbl - returns 'enabled/disabled $wbl_datas{'dnsbl'} = get_dnsbl(); @@ -56,91 +90,483 @@ # uribl - returns 'enabled/disabled $wbl_datas{'uribl'} = get_uribl(); - - # For SBLList List - my @sbllist = get_sbllist(); - $c->stash( sbllist => \@sbllist ); - - # For RBLList List - my @rbllist = get_rbllist(); - $c->stash( rbllist => \@rbllist ); - - # For URLList List - my @ubllist = get_ubllist(); - $c->stash( ubllist => \@ubllist ); - } - if ( $trt eq 'BLACK' ) { + if ( $trt eq 'BLACK' ) { # For Black List - my @badhelo = get_badhelo(); - $c->stash( badhelo => \@badhelo ); - - my @badmailfrom = get_badmailfrom(); - $c->stash( badmailfrom => \@badmailfrom ); - - my @blacklistfrom = get_blacklistfrom(); - $c->stash( blacklistfrom => \@blacklistfrom ); - } - if ( $trt eq 'WHITE' ) { + if ( $trt eq 'WHITE' ) { # For WBL List - my @whitelistsenders = get_whitelistsenders(); - $c->stash( whitelistsenders => \@whitelistsenders ); - - my @whitelisthelo = get_whitelisthelo(); - $c->stash( whitelisthelo => \@whitelisthelo ); - - my @whitelisthosts = get_whitelisthosts(); - $c->stash( whitelisthosts => \@whitelisthosts ); - - my @whitelistfrom = get_whitelistfrom(); - $c->stash( whitelistfrom => \@whitelistfrom ); - } if ( $trt eq 'CHOICE' ) { - my @wblList = ( [$c->l('wbl_RBL_LIST') => 'RBL'], [$c->l('wbl_BLACK_LIST') => 'BLACK'], - [$c->l('wbl_WHITE_LIST') => 'WHITE'] ); - $c->stash( list => \@wblList ); - + # } - $c->stash( title => $title, modul => $modul, wbl_datas => \%wbl_datas ); + $c->stash( title => $title, wbl_datas => \%wbl_datas ); $c->render( template => 'wbl' ); }; sub do_update { + my $c = shift; $c->app->log->info($c->log_req); - my $result = ""; + my %wbl_datas = (); + my ($res, $result) = ""; + + my $title = $c->l('wbl_FORM_TITLE'); my $trt = ($c->param('trt') || '???'); + $wbl_datas{'trt'} = $trt; #### $wbl_datas{'dnsbl'} = get_dnsbl(); etc... if ($trt eq 'RBL') { - $result .= 'RBL: ' . $c->l('wbl_ERROR_UPDATING') unless create_modify_rbl($c) == 0; - } - elsif ($trt eq 'BLACK') { - $result .= 'BLACK: ' . $c->l('wbl_ERROR_UPDATING') unless create_modify_black($c) == 0; - } elsif ($trt eq 'WHITE') { - $result .= 'WHITE: ' . $c->l('wbl_ERROR_UPDATING') unless create_modify_white($c) == 0; - } else { - $result .= "Undefined form: $trt." . $c->l('wbl_ERROR_UPDATING'); + + # controls, validate + #if (xxx) { + # $result .= $c->l('XXXXXXX'); + #} + + ##$result .= ' ** Blocked for testing ** !'; + + if ( ! $result ) { + $res = $c->create_modify_rbl(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $wbl_datas{trt} = 'SUC'; + $result = $c->l('SUCCESS').' RBL'; + } + } } - my $title = $c->l('wbl_FORM_TITLE'); - if ( $result eq '' ) { $result = $c->l('wbl_SUCCESS') . " but System update NOT done !!!"; } + if ($trt eq 'BLACK') { - $c->stash( title => $title, modul => $result ); - $c->render(template => 'module'); + # controls, validate + #if (xxx) { + # $result .= $c->l('XXXXXXX'); + #} + + ##$result .= ' ** Blocked for testing ** !'; + + if ( ! $result ) { + $res = $c->create_modify_black(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $wbl_datas{trt} = 'SUC'; + $result = $c->l('SUCCESS').' BLACK'; + } + } -}; + } + + + if ($trt eq 'WHITE') { + + # controls, validate + #if (xxx) { + # $result .= $c->l('XXXXXXX'); + #} + + ##$result .= ' ** Blocked for testing ** !'; + + if ( ! $result ) { + $res = $c->create_modify_white(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $wbl_datas{trt} = 'SUC'; + $result = $c->l('SUCCESS').' WHITE'; + } + } + } + + # common part + $c->stash( title => $title, wbl_datas => \%wbl_datas ); + if ($wbl_datas{trt} ne 'SUC') { + $c->flash(error => $result); + $wbl_datas{'trt'} = $trt; + return $c->render(template => 'wbl'); + } + + # successfully terminated + my $message = $trt . ' updates DONE'; + $c->app->log->info($message); + $c->flash(success => $result); + + #return to 'wbl' route !!! + $c->redirect_to('wbl'); + +} + + +sub get_dnsbl { + return ($db->get_prop('qpsmtpd', 'DNSBL') || 'disabled'); +} + + +sub get_rhsbl { + return ($db->get_prop('qpsmtpd', 'RHSBL') || 'disabled'); +} + + +sub get_uribl { + return ($db->get_prop('qpsmtpd', 'URIBL') || 'disabled'); +} + + +sub get_sbllist { + + my $sbllistform = $db->get_prop('qpsmtpd', 'SBLList') || ''; + my @list = (split /,/, $sbllistform); + return \@list; +} + + +sub get_rbllist { + + my $rbllistform = $db->get_prop('qpsmtpd', 'RBLList') || ''; + my @list = (split /,/, $rbllistform); + return \@list; +} + + +sub get_ubllist { + + my $ubllistform = $db->get_prop('qpsmtpd', 'UBLList') || ''; + my @list = ($ubllistform); + return \@list; +} + + +sub get_wbllist { + + my $c = shift; + return [[$c->l('wbl_RBL_LIST') => 'RBL'], + [$c->l('wbl_BLACK_LIST') => 'BLACK'], + [$c->l('wbl_WHITE_LIST') => 'WHITE']]; +} + + +sub get_badhelo { + + my %list = $wdb->get('badhelo')->props; + + my @badhelo = (); + my ($parameter, $value) = ""; + while (($parameter,$value) = each(%list)) { + next if ($parameter eq "type"); + push @badhelo, $parameter if ($value eq "Black"); + } + my @badh = sort(@badhelo); + return \@badh; +} + + +sub get_badmailfrom { + + my %list = $wdb->get('badmailfrom')->props; + + my @badmailfrom = (); + my ($parameter, $value) = ""; + while (($parameter,$value) = each(%list)) { + next if ($parameter eq "type"); + push @badmailfrom, $parameter if ($value eq "Black"); + } + my @badmf = sort(@badmailfrom); + return \@badmf; +} + + +sub get_blacklistfrom { + + my %list = $sdb->get('wbl.global')->props; + + my @blacklistfrom = (); + my ($parameter, $value) = ""; + + while (($parameter,$value) = each(%list)) { + next if ($parameter eq "type"); + push @blacklistfrom, $parameter if ($value eq "Black"); + } + my @blacklf = sort(@blacklistfrom); + return \@blacklf; +} + + +sub get_whitelisthosts { + + my %list = $wdb->get('whitelisthosts')->props; + + my @whitelisthosts = (); + my ($parameter, $value) = ""; + + while (($parameter,$value) = each(%list)) { + next if ($parameter eq "type"); + push @whitelisthosts, $parameter if ($value eq "White"); + } + my @whitelh = sort(@whitelisthosts); + return \@whitelh; +} + + +sub get_whitelisthelo { + + my %list = $wdb->get('whitelisthelo')->props; + + my @whitelisthelo = (); + my ($parameter, $value) = ""; + + while (($parameter,$value) = each(%list)) { + next if ($parameter eq "type"); + push @whitelisthelo, $parameter if ($value eq "White"); + } + my @whitelh = sort(@whitelisthelo); + return \@whitelh; +} + + +sub get_whitelistsenders { + + my %list = $wdb->get('whitelistsenders')->props; + + my @whitelistsenders = (); + my ($parameter, $value) = ""; + + while (($parameter,$value) = each(%list)) { + next if ($parameter eq "type"); + push @whitelistsenders, $parameter if ($value eq "White"); + } + my @whitels = sort(@whitelistsenders); + return \@whitels; +} + + +sub get_whitelistfrom { + + my %list = $sdb->get('wbl.global')->props; + + my @whitelistfrom = (); + my ($parameter, $value) = ""; + + while (($parameter,$value) = each(%list)) { + next if ($parameter eq "type"); + push @whitelistfrom, $parameter if ($value eq "White"); + } + my @whitels = sort(@whitelistfrom); + return \@whitels; +} + + +sub create_modify_rbl { + + my $c = shift; + + my $dnsbl = $c->param('Dnsbl'); + $db->set_prop('qpsmtpd', 'DNSBL', "$dnsbl"); + + my $rhsbl = $c->param('Rhsbl'); + $db->set_prop('qpsmtpd', 'RHSBL', "$rhsbl"); + + + my $sbllistcgi = $c->param('Sbllist'); + my @sbllistcgi = split /\s{2,}/, $sbllistcgi; + my $sbllistdb = ''; + foreach (@sbllistcgi) { $sbllistdb = $sbllistdb . ',' . $_; } + $sbllistdb =~ s/^,//; + + $db->set_prop('qpsmtpd', 'SBLList', "$sbllistdb"); + + my $rbllistcgi = $c->param('Rbllist'); + my @rbllistcgi = split /\s{2,}/, $rbllistcgi; + my $rbllistdb = ''; + foreach (@rbllistcgi) { $rbllistdb = $rbllistdb . ',' . $_; } + $rbllistdb =~ s/^,//; + + $db->set_prop('qpsmtpd', 'RBLList', "$rbllistdb"); + + #Update email settings + #unless ( system ("/sbin/e-smith/signal-event", "smeserver-wbl-update") == 0 ){ + # return 'RBL : ' . $c->l('wbl_ERROR_UPDATING'); + #} + + return 'OK'; +} + + +sub create_modify_black { + + my $c = shift; + + #------------------------------- + # qmail badhelo + #------------------------------- + my %list = $wdb->get('badhelo')->props; + my ($parameter, $value) = ''; + + while (($parameter,$value) = each(%list)) { + next if ($parameter eq "type"); + if ($value eq "Black") { + $wdb->get_prop_and_delete('badhelo', "$parameter"); + } + } + + my $BadHelo = $c->param("Badhelo"); + $BadHelo =~ s/\r\n/,/g; + my @BadHelo = sort(split /,/, $BadHelo); + foreach $BadHelo (@BadHelo) { + $wdb->set_prop('badhelo', "$BadHelo", 'Black'); + } + + #------------------------------- + # qmail badmailfrom + #------------------------------- + my %list_badmailfrom = $wdb->get('badmailfrom')->props; + my ($parameter_badmailfrom, $value_badmailfrom) = ""; + + while (($parameter_badmailfrom,$value_badmailfrom) = each(%list_badmailfrom)) { + next if ($parameter_badmailfrom eq "type"); + if ($value_badmailfrom eq "Black") { + $wdb->get_prop_and_delete('badmailfrom', "$parameter_badmailfrom"); + } + } + + my $BadMailFrom = $c->param("Badmailfrom"); + $BadMailFrom =~ s/\r\n/,/g; + my @BadMailFrom = sort(split /,/, $BadMailFrom); + foreach $BadMailFrom (@BadMailFrom){ + $wdb->set_prop('badmailfrom', "$BadMailFrom", 'Black'); + } + #------------------------------- + # spamassassin blacklist_from + #------------------------------- + my %list_wblglobal = $sdb->get('wbl.global')->props; + my ($parameter_wblglobal, $value_wblglobal) = ""; + + while (($parameter_wblglobal,$value_wblglobal) = each(%list_wblglobal)) { + next if ($parameter_wblglobal eq "type"); + if ($value_wblglobal eq "Black") { + $sdb->get_prop_and_delete('wbl.global', "$parameter_wblglobal"); + } + } + + my $BlacklistFrom = $c->param("Blacklistfrom"); + $BlacklistFrom =~ s/\r\n/,/g; + my @BlacklistFrom = sort(split /,/, $BlacklistFrom); + foreach $BlacklistFrom (@BlacklistFrom){ + $sdb->set_prop('wbl.global', "$BlacklistFrom", 'Black'); + } + + #Update email settings + #unless ( system ("/sbin/e-smith/signal-event", "smeserver-wbl-update") == 0 ) { + # return 'BLACK: '. $c->l('wbl_ERROR_UPDATING'); + #} + + return 'OK'; +} + + +sub create_modify_white { + + my $c = shift; + + #------------------------------- + # qpsmtpd whitelisthosts + #------------------------------- + my %list = $wdb->get('whitelisthosts')->props; + my $parameter = ""; + my $value = ""; + while (($parameter,$value) = each(%list)) { + if ($parameter eq "type") {next;} + + if ($value eq "White") { + $wdb->get_prop_and_delete('whitelisthosts', "$parameter"); + } + } + + my $WhitelistHosts = $c->param("Whitelisthosts"); + $WhitelistHosts =~ s/\r\n/,/g; + my @WhitelistHosts = sort(split /,/, $WhitelistHosts); + foreach $WhitelistHosts (@WhitelistHosts) + { + $wdb->set_prop('whitelisthosts', "$WhitelistHosts", 'White'); + } + + #------------------------------- + # qpsmtpd whitelisthelo + #------------------------------- + my %list_whitelisthelo = $wdb->get('whitelisthelo')->props; + my $parameter_whitelisthelo = ""; + my $value_whitelisthelo = ""; + while (($parameter_whitelisthelo,$value_whitelisthelo) = each(%list_whitelisthelo)) { + if ($parameter_whitelisthelo eq "type") {next;} + + if ($value_whitelisthelo eq "White") { + $wdb->get_prop_and_delete('whitelisthelo', "$parameter_whitelisthelo"); + } + } + + my $WhitelistHelo = $c->param("Whitelisthelo"); + $WhitelistHelo =~ s/\r\n/,/g; + my @WhitelistHelo = sort(split /,/, $WhitelistHelo); + foreach $WhitelistHelo (@WhitelistHelo) + { + $wdb->set_prop('whitelisthelo', "$WhitelistHelo", 'White'); + } + + #------------------------------- + # qpsmtpd whitelistsenders + #------------------------------- + my %list_whitelistsenders = $wdb->get('whitelistsenders')->props; + my $parameter_whitelistsenders = ""; + my $value_whitelistsenders = ""; + while (($parameter_whitelistsenders,$value_whitelistsenders) = each(%list_whitelistsenders)) { + if ($parameter_whitelistsenders eq "type") {next;} + + if ($value_whitelistsenders eq "White") { + $wdb->get_prop_and_delete('whitelistsenders', "$parameter_whitelistsenders"); + } + } + + my $WhitelistSenders = $c->param("Whitelistsenders"); + $WhitelistSenders =~ s/\r\n/,/g; + my @WhitelistSenders = sort(split /,/, $WhitelistSenders); + foreach $WhitelistSenders (@WhitelistSenders) + { + $wdb->set_prop('whitelistsenders', "$WhitelistSenders", 'White'); + } + + #------------------------------- + # spamassassin whitelist_from + #------------------------------- + my %list_wblglobal = $sdb->get('wbl.global')->props; + my $parameter_wblglobal = ""; + my $value_wblglobal = ""; + while (($parameter_wblglobal,$value_wblglobal) = each(%list_wblglobal)) { + if ($parameter_wblglobal eq "type") {next;} + + if ($value_wblglobal eq "White") { + $sdb->get_prop_and_delete('wbl.global', "$parameter_wblglobal"); + } + } + + my $WhitelistFrom = $c->param("Whitelistfrom"); + $WhitelistFrom =~ s/\r\n/,/g; + my @WhitelistFrom = sort(split /,/, $WhitelistFrom); + foreach $WhitelistFrom (@WhitelistFrom){ + $sdb->set_prop('wbl.global', "$WhitelistFrom", 'White'); + } + + #Update email settings + #unless ( system ("/sbin/e-smith/signal-event", "smeserver-wbl-update") == 0 ) { + # return 'WHITE: '. $c->l('wbl_ERROR_UPDATING'); + #} + + return 'OK'; +} 1; 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 --- 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 +++ 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 @@ -1,5 +1,8 @@ package SrvMngr::Controller::Welcome; +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; 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 --- 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 +++ 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 @@ -1,5 +1,12 @@ package SrvMngr::Controller::Workgroup; +#---------------------------------------------------------------------- +# heading : Configuration +# description : Workgroup +# navigation : 6000 6200 +# +# routes : end +#---------------------------------------------------------------------- use strict; use warnings; use Mojo::Base 'Mojolicious::Controller'; 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 --- 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 +++ 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 @@ -0,0 +1,601 @@ +package SrvMngr::Controller::Yum; + +#---------------------------------------------------------------------- +# heading : Configuration +# description : Software installer +# navigation : 4000 4200 +# +# routes : end +#---------------------------------------------------------------------- +use strict; +use warnings; +use Mojo::Base 'Mojolicious::Controller'; + +use Locale::gettext; +use SrvMngr::I18N; + +use SrvMngr qw(theme_list init_session_cgi ip_number_or_blank); + +use esmith::ConfigDB; +use esmith::AccountsDB; + +use esmith::util; +use File::Basename; + +our $cdb = esmith::ConfigDB->open || die "Couldn't open config db"; + +#use CGI::FormMagick::TagMaker; +#use esmith::cgi; +#use File::stat; + +our %dbs; + +for ( qw(available installed updates) ) +{ + $dbs{$_} = esmith::ConfigDB->open_ro("yum_$_") or + die "Couldn't open yum_$_ DB\n"; +} + +for ( qw(repositories) ) +{ + $dbs{$_} = esmith::ConfigDB->open("yum_$_") or + die "Couldn't open yum_$_ DB\n"; +} + + +sub main { + + my $c = shift; + $c->app->log->info($c->log_req); + + my %yum_datas = (); + my $title = $c->l('yum_FORM_TITLE'); + my $dest = 'yum'; + my $notif = ''; + + $yum_datas{'trt'} = 'STAT'; + + if (-e "/var/run/yum.pid") { + $yum_datas{'trt'} = 'LOGF'; + #$dest = 'yumlogfile'; + $c->stash( title => $title, notif => $notif, yum_datas => \%yum_datas ); + return $c->redirect_to("/yumd"); + } elsif ($c->get_prop('yum', 'LogFile')) { + $yum_datas{'trt'} = 'PSTU'; + #$dest = 'yumpostupg'; + $c->stash( title => $title, notif => $notif, yum_datas => \%yum_datas ); + return $c->redirect_to("/yumd"); + } else { + # normal other trt + } + + $c->stash( title => $title, notif => $notif, yum_datas => \%yum_datas ); + return $c->render( template => $dest ); + +} + + +sub do_display { + + my $c = shift; + + my $rt = $c->current_route; + my $trt = ($c->param('trt') || 'STAT'); + + my %yum_datas = (); + my $title = $c->l('yum_FORM_TITLE'); + my ($notif, $dest) = ''; + + $yum_datas{'trt'} = $trt; + + if ( $trt eq 'UPDT' ) { + $dest = 'yumupdate'; + } + + if ( $trt eq 'INST' ) { + $dest = 'yuminstall'; + } + + if ( $trt eq 'REMO' ) { + $dest = 'yumremove'; + } + + if ( $trt eq 'CONF' ) { + $dest = 'yumconfig'; + } + + if ( $trt eq 'LOGF' ) { + if (-e "/var/run/yum.pid") { + $dest = 'yumlogfile'; + } + } + + if ( $trt eq 'PSTU') { + if ($c->get_prop('yum', 'LogFile')) { + $dest = 'yumpostupg'; + } + } + + if ( $dest eq '' ) { $dest = 'yum'; } + + $c->stash( title => $title, notif => $notif, yum_datas => \%yum_datas ); + return $c->render( template => $dest ); + +}; + + +sub do_update { + + my $c = shift; + $c->app->log->info($c->log_req); + + my $rt = $c->current_route; + my $trt = $c->param('trt'); + + my %yum_datas = (); + $yum_datas{trt} = $trt; + + my $title = $c->l('yum_FORM_TITLE'); + + my ($dest, $res, $result) = ''; + + if ( $trt eq 'UPDT' ) { + + $dest = 'yumupdate'; +# $yum_datas{xxx} = $c->param('XXX'); + + # controls +# $res = xxxxxxx( $c ); +# $result .= $res unless $res eq 'OK'; + + #$result .= 'Blocked for testing !'; + + if ( ! $result ) { + $res = $c->do_yum('update'); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $yum_datas{trt} = 'SUC'; + $result = $c->l('yum_SUCCESS'); + } + } + } + + if ( $trt eq 'INST' ) { + + $dest = 'yuminstall'; +# $yum_datas{xxx} = $c->param('XXX'); + + # controls +# $res = zzzzzz( $c ); +# $result .= $res unless $res eq 'OK'; + + #$result .= 'Blocked for testing !'; + + if ( ! $result ) { + $res = $c->do_yum('install'); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $yum_datas{trt} = 'SUC'; + $result = $c->l('yum_SUCCESS'); + } + } + } + + if ( $trt eq 'REMO' ) { + + $dest = 'yumremove'; +# $yum_datas{xxx} = $c->param('XXX'); + + # controls +# $res = yyyyyyyyy( $c ); +# $result .= $res unless $res eq 'OK'; + + #$result .= 'Blocked for testing !'; + + if ( ! $result ) { + $res = $c->do_yum('config'); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $yum_datas{trt} = 'SUC'; + $result = $c->l('yum_SUCCESS'); + } + } + } + + if ( $trt eq 'CONF' ) { + + $dest = 'yumconfig'; +# $yum_datas{xxx} = $c->param('XXX'); + + # controls +# $res = $c->zzzz( $c->param('ZZZZ') ); +# $result .= $res . ' DMS ' unless $res eq 'OK'; + +# $result .= 'Blocked for testing !'; + + if ( ! $result ) { + $res = $c->change_settings(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $yum_datas{trt} = 'SUC'; + $result = $c->l('yum_SUCCESS'); + } + } + } + + + if ( $trt eq 'PSTU') { + + $dest = 'yumpostupg'; + $res = $c->post_upgrade_reboot(); + $result .= $res unless $res eq 'OK'; + if ( ! $result ) { + $yum_datas{trt} = 'SUC'; + $result = $c->l('yum_SYSTEM_BEING_RECONFIGURE'); + } + } + + + if ( $trt eq 'LOGF' ) { + + $dest = 'yumlogfile'; + if ( ! -e "/var/run/yum.pid") { + $yum_datas{trt} = 'SUC'; + } + } + + + + $c->stash( title => $title, notif => $result, yum_datas => \%yum_datas ); + if ($yum_datas{trt} ne 'SUC') { + return $c->render(template => $dest); + } + $c->redirect_to("/yum"); + +}; + + +sub get_prop { + my ($c, $item, $prop, $default) = @_; + warn "You must specify a record key" unless $item; + warn "You must specify a property name" unless $prop; + my $record = $cdb->get($item) or warn "Couldn't get record for $item"; + my $value = $record ? $record->prop($prop) : undef; + return defined $value ? $value : $default; +} + + +sub get_value { + my ($c,$item,$default) = @_; + my $record = $cdb->get($item) or warn "Couldn't get record for $item"; + my $value = $record ? $record->value() : undef; + return defined $value ? $value : $default; +} + + +sub is_empty { + + my ($c, $yumdb) = @_; + + my $groups = $dbs{$yumdb}->get_all_by_prop(type => 'group') || 'none'; + my $packages = $dbs{$yumdb}->get_all_by_prop(type => 'package') || 'none'; + + #Show no updates if both = none + return 1 if ($packages eq $groups); + + #else return here + return; +} + + +sub non_empty { + + my ($c, $yumdb, $type) = @_; + + $type ||= 'both'; + + return 0 unless (exists $dbs{$yumdb}); + + my $groups = scalar $dbs{$yumdb}->get_all_by_prop(type => 'group'); + return $groups if ($type eq 'group'); + + my $packages = scalar $dbs{$yumdb}->get_all_by_prop(type => 'package'); + if ($type eq 'package') + { + return $c->package_functions_enabled ? $packages : 0; + } + + return ($c->package_functions_enabled or $yumdb eq 'updates') ? + ($groups || $packages) : $groups; +} + + +sub package_functions_enabled { + + my ($c) = @_; + + return ($cdb->get_prop("yum", "PackageFunctions") eq "enabled"); + +} + + +sub get_status { + + my ($c, $prop, $localise) = @_; + + my $status = $cdb->get_prop("yum", $prop) || 'disabled'; + + return $status unless $localise; + + return $c->l($status eq 'enabled' ? 'ENABLED' : 'DISABLED'); +} + + +sub get_options { + + my ($c, $yumdb, $type) = @_; + + my %options; + + for ($dbs{$yumdb}->get_all_by_prop(type => $type)) + { + $options{$_->key} = $_->key . " " . $_->prop("Version") . " - " . + $_->prop("Repo"); + } + + return \%options; +} + + +sub get_options2 { + + my ($c, $yumdb, $type) = @_; + + my @options; + + for ($dbs{$yumdb}->get_all_by_prop(type => $type)) + { + push @options, [ $_->key . " " . $_->prop("Version") . " - " . + $_->prop("Repo") => $_->key ]; + } + + return \@options; +} + + +sub get_names { + + return [ keys %{get_options(@_)} ]; +} + + +sub get_names2 { + + my ($c, $yumdb, $type) = @_; + my @selected; + + for ($dbs{$yumdb}->get_all_by_prop(type => $type)) { + push @selected, $_->key; + } + + return \@selected; +# return [ values @{get_options2(@_)} ]; +} + + +sub get_repository_options2 { + + my $c = shift; + + my @options; + + foreach my $repos ( + $dbs{repositories}->get_all_by_prop(type => "repository") ) + { + next unless ($repos->prop('Visible') eq 'yes' + or $repos->prop('status') eq 'enabled'); + + push @options, [ $repos->prop('Name') => $repos->key ]; + } + + my @opts = sort { $a->[0] cmp $b->[0] } @options; + + return \@opts; +} + + +sub get_repository_current_options +{ + my $c = shift; + + my @selected; + + foreach my $repos ( + $dbs{repositories}->get_all_by_prop( type => "repository" ) ) + { + next unless ($repos->prop('Visible') eq 'yes' + or $repos->prop('status') eq 'enabled'); + + push @selected, $repos->key if ($repos->prop('status') eq 'enabled'); + } + + return \@selected; +} + + +sub get_avail2 { + + my ($c, $yumdb, $type) = @_; + + return $c->get_options2("available", "package"); +} + + +sub get_check_freq_opt { + + my ($c) = @_; + + return [[ $c->l('DISABLED') => 'disabled'], + [ $c->l('yum_1DAILY') => 'daily'], + [ $c->l('yum_2WEEKLY') => 'weekly'], + [ $c->l('yum_3MONTHLY') => 'monthly']]; +} + + +sub print_skip_header { + + my ($c) = shift; + + return "\n"; +} + + +sub change_settings { + + my ($c) = @_; + + for my $param ( qw( + PackageFunctions + ) ) + { + $cdb->set_prop('yum', $param, $c->param("yum_$param")); + } + + my $check4updates = $c->param("yum_check4updates"); + my $status = 'disabled'; + + if ($check4updates ne 'disabled') { $status = 'enabled'; } + + $cdb->set_prop('yum', 'check4updates', $check4updates); + + my $deltarpm = $c->param("yum_DeltaRpmProcess"); + $cdb->set_prop('yum', 'DeltaRpmProcess', $deltarpm); + + my $downloadonly = $c->param("yum_DownloadOnly"); + if ($downloadonly ne 'disabled') { $status = 'enabled'; } + + $cdb->set_prop('yum', 'DownloadOnly', $downloadonly); + + my $AutoInstallUpdates = $c->param("yum_AutoInstallUpdates"); + if ($AutoInstallUpdates ne 'disabled') { $status = 'enabled'; } + + $cdb->set_prop('yum', 'AutoInstallUpdates', $AutoInstallUpdates); + $cdb->set_prop('yum', 'status', $status); + + my %selected = map {$_ => 1} @{$c->every_param('SelectedRepositories')}; + + foreach my $repos ( + $dbs{repositories}->get_all_by_prop(type => "repository") ) + { + $repos->set_prop("status", + exists $selected{$repos->key} ? 'enabled' : 'disabled'); + + } + + $dbs{repositories}->reload; + + unless ( system( "/sbin/e-smith/signal-event", "yum-modify" ) == 0 ) + { + return $c->l('yum_ERROR_UPDATING_CONFIGURATION'); + } + + return 'OK'; +} + + +sub do_yum { + + my ($c, $function) = @_; + + for ( qw(SelectedGroups SelectedPackages) ) + { + $cdb->set_prop("yum", $_, join(',', (@{$c->every_param($_)} ))); + } + + esmith::util::backgroundCommand(0, + "/sbin/e-smith/signal-event", "yum-$function"); + + $cdb->reload; + + return 'OK'; +} + + +sub get_yum_status_page { + + my ($c) = @_; + + my $yum_status; + + open(YUM_STATUS, "; + close(YUM_STATUS); + + return $yum_status; + +} + + +sub show_file_page { + + my ($c, $filepage) = @_; + + return '' unless ( $filepage and ( -e "$filepage" ) ); + + my $out .= sprintf "
";
+
+    open (FILE, "$filepage");
+    while () {
+	$out .= sprintf("%s", $_);
+    }
+    close FILE;
+    
+    $out .= sprintf "
"; + + return $out; +} + + +sub format_yum_log { + + my ($c) = @_; + + my $yum_log = $cdb->get_prop('yum', 'LogFile'); + + return $c->show_file_page($yum_log); + +} + + +sub post_upgrade_reboot { + + my $c = shift; + + $cdb->get_prop_and_delete('yum', 'LogFile'); + $cdb->reload; + + if (fork == 0) { + exec "/sbin/e-smith/signal-event post-upgrade; /sbin/e-smith/signal-event reboot"; + die "Exec failed"; + } + + return 'OK' +} + + +sub show_yum_log { + + my $c = shift; + + my $out = $c->format_yum_log(); + + my $yum_log = $cdb->get_prop_and_delete('yum', 'LogFile'); + + return $out; +} + + +1; + + +__END__ 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 --- 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 +++ 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 @@ -144,6 +144,7 @@ 'FM_MAC_ADDRESS2' => 'The MAC address you provided was not valid.', 'FM_ERR_UNEXPECTED_DESC' => 'Error: unexpected or missing characters in description', + initial_FORM_TITLE => 'Welcome to the server manager', initial_FRAMES_BODY => '

Welcome to SME Server, the leading Linux distribution for @@ -185,7 +186,7 @@

- https://wiki.koozali.org/Donate

@@ -193,7 +194,7 @@

This software comes with ABSOLUTELY NO WARRANTY. - Please click here + Please click here to view detailed support, warranty and licensing information.

@@ -201,7 +202,11 @@ To perform a system administration function, click one of the links in the menu on the left of your screen.

', + + support_FORM_TITLE => 'Support, warranty and licensing information', + + manual_FORM_TITLE => 'Online manual and other documentation', manual_DESCRIPTION => '
    @@ -215,17 +220,16 @@ Support and Licensing page. ', + 'sws_FORM_TITLE' => 'Create a starter website', 'sws_SUCCESS' => 'Successfully created starter web site (wrote file index.htm). You can visit your new website at the address below:', 'sws_DESCRIPTION' => '

    To create a simple web page for your company, fill in the fields below and click on Create. -

    -

    +

    You can leave any field blank if you do not need it. -

    -

    +

    The text that you enter below will be line wrapped for a nicer appearance in your web page. Leave a blank line whenever you want to start a new paragraph. If you need @@ -234,13 +238,11 @@ the four-character sequence

    <BR>
    where you would like each line break. -

    -

    +

    Do not use this option if you have already customized your web site, since it will overwrite the "index.htm" file in your web site directory. -

    -', +

    ', 'sws_LABEL_COMPANYNAME' => 'Company name', 'sws_DESC_HEADER1' => 'First header, typically used for short phrases such as "Leader in the field of textile manufacturing"', @@ -256,6 +258,7 @@

    Do you wish to proceed?

    ', 'sws_Create starter web site' => 'Create starter web site', + 'clm_FORM_TITLE' => 'Antivirus settings', 'clm_LABEL_FILESYSTEM_SCAN_PERIOD' => 'Scan filesystem', 'clm_DESC_FILESYSTEM_SCAN_PERIOD' => '

    General Settings

    @@ -269,6 +272,7 @@ 'clm_DAILY' => 'Daily', 'clm_SUCCESS' => 'The new clamav antivirus settings have been saved.', + 'wkg_FORM_TITLE' => 'Change workgroup settings', 'wkg_DESC_WORKGROUP' => 'Enter the name of the Windows workgroup that this server should appear in.', 'wkg_LABEL_WORKGROUP' => 'Windows workgroup', @@ -296,6 +300,7 @@ These values must be different in order for filesharing to be turned on. ', 'wkg_Workgroup' => 'Workgroup', + 'dat_FORM_TITLE' => 'Date and time configuration', 'dat_INITIAL_DESC' => 'This is where you configure the date and time of this server. You may use an existing network time server or manually set the date and time for your time zone.', @@ -319,8 +324,7 @@ '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.', '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.', 'dat_NTP_DISABLE_DESC' => 'Choose this option to stop syncronizing the system clock to the NTP -server.When the NTP service is disabled, you can set the system date -and time manually from this page.', +server.When the NTP service is disabled, you can set the system date and time manually from this page.', 'dat_NTP_SERVER' => 'NTP Server', 'dat_VERIFY_DATE_AND_TIME' => 'Verify date and time', 'dat_NEW_DATE_AND_TIME' => 'New date and time setting:', @@ -354,6 +358,7 @@ 'dat_CURRENT_SETTING' => 'Current setting', 'dat_Date and time' => 'Date and time', + 'wbl_SAVE' => 'Save', 'wbl_PERFORM' => 'Perform', 'wbl_FORM_TITLE' => 'E-mail WBL', @@ -397,6 +402,7 @@ 'wbl_RBLLIST_DESCRIPTION' => 'DNS Block List - senders IP address will be checked against the following servers', 'wbl_RBL_TITLE' => 'Real-time Blackhole Lists are disabled by default. To help reduce spam you can enable RBLs here.', + 'prt_FORM_TITLE' => 'Add or remove printers', 'prt_INITIAL_BTN' => 'Add printer', 'prt_INITIAL_DESC' => '

    Add printer

    ', @@ -449,6 +455,7 @@ 'prt_MUST_BE_VALID_HOSTNAME_OR_IP' => 'Must be a valid hostname or IP number', 'prt_Printers' => 'Printers', + 'bugr_FORM_TITLE' => 'Report a Bug', 'bugr_DO_NOT_PANIC' => 'Don\'t Panic!', 'bugr_SME_EXPERIENCE' => @@ -479,6 +486,7 @@ 'bugr_Download this report' => 'Download this report !', 'bugr_Report a bug' => 'Report a bug', + 'rvw_FORM_TITLE' => 'Review configuration', 'rvw_DESCRIPTION' => 'This report summarizes the networking, server, and domain parameters on this server relevant to configuring @@ -514,12 +522,15 @@ 'rvw_NO_NETWORKS' => 'No additional networks defined', 'rvw_INTERNET_VISIBLE_ADDRESS' => 'Internet Visible IP Address', + 'dir_FORM_TITLE' => 'Change LDAP directory settings', 'dir_LABEL_ROOT' => 'Server root', 'dir_DESCRIPTION' => 'The LDAP server provides a network-available listing of the user accounts -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. -', -'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. ', +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.', +'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. ', 'dir_DIRECTORY_ACCESS' => 'LDAP directory access', 'dir_DESC_DEPARTMENT' => 'These fields are the LDAP defaults for your organization. Whenever you create a new user account, you will be prompted @@ -540,6 +551,7 @@ 'dir_UPDATE' => 'Update with new defaults', 'dir_Directory' => 'Directory', + 'prx_TITLE' => 'Proxy settings', 'prx_FIRST_PAGE_DESCRIPTION' => 'This page allows configuration of the server\'s proxy settings. @@ -568,6 +580,7 @@ 'prx_SUCCESS' => 'The new proxy settings were applied successfully.', 'prx_BLOCKED' => 'Blocked', + 'qma_FORM_TITLE' => 'Mail Log File Analysis', 'qma_INITIAL_DESC' => '

    Analysing the mail system log files can aid both in understanding how your system is performing and in @@ -595,6 +608,7 @@ 'qma_END_OF_REPORT' => 'End of Report', 'qma_Mail log file analysis' => 'Mail log file analysis', + 'quo_FORM_TITLE' => 'Create, modify, or remove user account quotas', 'quo_UNABLE_TO_OPEN_ACCOUNTS' => 'Unable to open accounts db', 'quo_QUOTA_DESC' => '

    You can set filesystem quotas for users on your system by clicking @@ -634,6 +648,7 @@ 'quo_SUCCESSFULLY_MODIFIED' => 'Successfully modified quota for user account: ', 'quo_Quotas' => 'Quotas', + 'grp_FORM_TITLE' => 'Create, modify, or remove user groups', 'grp_GROUP_TOO_LONG' => 'Error: group name is too long. The maximum is [_1] characters.', 'grp_ACCOUNT_CONFLICT' => 'Error: the group "[_1]" can\'t be created because there is @@ -665,6 +680,7 @@ 'grp_CURRENT_LIST' => 'Current list of User Groups', 'grp_DELETE_DESCRIPTION' => 'You are about to remove the user group "[_1]."', + 'rbo_FORM_TITLE' => 'Shutdown or reboot', 'rbo_REBOOT' => 'Reboot', 'rbo_REBOOT_SUCCEEDED' => 'Reboot request initiated successfully.', @@ -683,6 +699,7 @@ When you click perform the operation will be initiated immediately, so be ready!', 'rbo_Reboot or shutdown' => 'Reboot or shutdown', + 'iba_FORM_TITLE' => 'Create, modify, or remove i-bays', 'iba_ADD_IBAY' => 'Add ibay', 'iba_FIRSTPAGE_DESC' => 'You can remove any information bay or reset its password by @@ -709,12 +726,9 @@ 'iba_ALLOW_DYNAMIC_CONTENT' => 'Execution of dynamic content (CGI, PHP, SSI)', 'iba_HTTPS_Only' => 'Force secure connections', 'iba_REMOVE_TITLE' => 'Remove information bay', -'iba_REMOVE_DESC' => '

    -You are about to remove the information bay [_1] ([_2]). -

    -All files belonging to this information bay will be deleted. -

    -Are you sure you wish to remove this information bay? +'iba_REMOVE_DESC' => '

    You are about to remove the information bay [_1] ([_2]). +

    All files belonging to this information bay will be deleted. +

    Are you sure you wish to remove this information bay?

    ', 'iba_ERROR_WHILE_CREATING_IBAY' => 'An error occurred while creating the i-bay.', 'iba_SUCCESSFULLY_CREATED_IBAY' => 'Successfully created i-bay.', @@ -757,8 +771,10 @@

    [_1] is a pseudonym for [_2].

    ', 'iba_ACCOUNT_EXISTS' => 'The account "[_1]" is an existing [_2] account.', + 'swt_THEME' => 'Theme', + 'pse_NO_PSEUDONYMS' => ' There are no pseudonyms in the system. ', 'pse_REMOVE_PSEUDONYM' => 'Remove pseudonym', 'pse_ABOUT_TO_REMOVE' => 'You are about to remove the pseudonym: [_1]
    @@ -826,6 +842,7 @@ 'pse_EVERYONE' => 'Everyone', 'pse_Pseudonyms' => 'Pseudonyms', + 'dom_ADD_DOMAIN' => 'Add domain', 'dom_FORM_TITLE' => 'Manage domains', 'dom_FORM_DESCRIPTION' => 'When you create a domain, your server will be able to @@ -891,6 +908,7 @@ 'dom_REMOVE_DESC' => 'You are about to remove the domain ', 'dom_REMOVE_DESC2' => ' Are you sure you wish to remove this Domain ? ', + 'hos_FORM_TITLE' => 'Hostnames and addresses', 'hos_UNABLE_TO_OPEN_CONFIGDB' => 'Unable to open configuration database', 'hos_DNS_FORWARDER_ENABLED' => 'A DNS forwarder has been configured. This means that all DNS @@ -964,6 +982,7 @@ 'hos_HOSTNAME_VALIDATOR_ERROR' => 'Error: unexpected characters in host name: "[_1]". The host name should contain only letters, numbers, and hyphens and must start with a letter or a number. ', + 'log_FORM_TITLE' => 'View log files', 'log_FIRSTPAGE_DESC' => 'This panel allows you to view or download the log files generated by the services running on your server.', @@ -1010,41 +1029,41 @@

    The first method creates a copy of your server configuration and user data files, and downloads it to your local desktop via your web browser. Currently your configuration and data files total approximately -$tarsize. The backup file will be somewhat less than this, +[_1]. The backup file will be somewhat less than this, depending on how compressible the data are. The \"Verify desktop backup file\" option can be used to check the integrity of a desktop backup file.

    -

    The tape backup method uses a software package called $module +

    The tape backup method uses a software package called [_2] to back up your entire hard disk to tape every night. This requires a supported tape drive and a tape that is not write-protected. The backup is performed automatically at the selected time every night (with a reminder automatically e-mailed to the administrator during the day). -Currently your hard disk contains $dumpsize of data.

    +Currently your hard disk contains [_3] of data.

    Both restore methods allow you to restore your configuration and user data files. Ideally, the restore should be performed on a freshly installed server.

    ', 'bac_BACKUP_DESC_DAR' => '

    Three ways are provided to back up and restore your server: using a tape drive, using a network share or a local removable disk, or using your local desktop.

    -

    Tape Backup. This method uses a software package called $module +

    Tape Backup. This method uses a software package called [_1] to back up your entire hard disk to tape every night. This requires a supported tape drive and a tape that is not write-protected. The backup is performed automatically at the selected time every night (with a reminder automatically e-mailed to the administrator during the day). -Currently your hard disk contains $dumpsize of data.

    +Currently your hard disk contains [_2] of data.

    Workstation backup. This method uses a software package called dar to back up your server configuration and data files to a network share or a local removable disk such as a USB disk. You can manage how many rotating sets of backups are kept, and how many incremental backups to have in each set. The backup is performed automatically at the selected time every day. Currently -configuration and data files total approximately $tarsize uncompressed. +configuration and data files total approximately [_3] uncompressed. Twice the compressed data size must be available on the backup share.

    Backup to Desktop. This method creates a copy of your server configuration and user data files, and downloads it to your local desktop via your web browser. Currently your configuration and data files total approximately -$tarsize. The backup file will be somewhat less than this, +[_3]. The backup file will be somewhat less than this, depending on how much the data can be compressed. This file can be used to restore the server from the console if you copy it to a local removable disk such as a USB disk.

    @@ -1052,10 +1071,9 @@ data files. Workstation backup provides individual file restore. Ideally, full restore should be performed on a freshly installed server.

    ', 'bac_BACKUP_CONFIG_STATUS' => 'Backup configuration and status', -'bac_TAPE_BACKUPS_ENABLED' => 'Tape backups are currently enabled.', 'bac_BACKUPS_RUN_AT' => 'Regular tape backups will run at: ', 'bac_REMINDER_MESSAGE_AT' => 'Reminder messages will be sent at: ', -'bac_TAPE_BACKUPS_DISABLED' => 'Tape backups are disabled', +'bac_TAPE_BACKUPS' => 'Tape backups are ', 'bac_DESKTOP_BACKUP' => 'Backup to desktop', 'bac_DESKTOP_RESTORE' => 'Restore from desktop', 'bac_DESKTOP_VERIFY' => 'Verify desktop backup file', @@ -1077,8 +1095,8 @@ 'bac_ERR_POST_BACKUP' => 'Error occurred during post-backup actions.', 'bac_RESTORE_SERVER_CONFIG' => 'Restore server configuration', '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. The restore should be performed on a freshly installed server.', -'bac_FREE_SPACE' => 'You have approximately $tmpfree free space on the server. -Check that desktop backup file is less than $halffree before +'bac_FREE_SPACE' => 'You have approximately [_1] free space on the server. +Check that desktop backup file is less than [_2] before commencing the restore.', 'bac_MUST_REBOOT_AFTER_RESTORE' => 'After the restore completes you must reboot the server.', 'bac_FILE_TO_RESTORE' => 'Backup file to restore from', @@ -1093,8 +1111,7 @@ 'bac_ANOTHER_RESTORE_IN_PROGRESS' => 'Another restore is in progress. Please try again later.', 'bac_RESTORE_IN_PROGRESS' => 'Restore in progress', 'bac_RESTORE_IN_PROGRESS_DESC' => 'After the restore completes you must reboot the server. Your restore is -complete when the words "Restore complete" appear at the bottom of your screen. -', +complete when the words "Restore complete" appear at the bottom of your screen.', 'bac_FILES_HAVE_BEEN_RESTORED' => 'The following files and directories have been restored:', 'bac_RESTORE_FAILED_MSG' => 'Restore failed! There was an error in reading the backup file.', 'bac_RESTORE_COMPLETE' => 'Restore complete', @@ -1150,14 +1167,11 @@ 'bac_SERVER_REBOOT' => 'Server reboot', 'bac_SERVER_WILL_REBOOT' => 'Your server will now reboot.', 'bac_NO_UID_FOR_NAME' => 'Could not get uid for user named: ', -'bac_PAGE_REFRESH_IN' => 'This page will refresh to the status display in {$sec} seconds, or +'bac_PAGE_REFRESH_IN' => 'This page will refresh to the status display in [_1] seconds, or click here.', 'bac_Backup or restore' => 'Backup or restore', -'bac_BACKUP_DESKTOP_TOO_BIG' => '
    -Your server has too much data for a reliable backup to desktop. -
    ', -'bac_WORKSTN_BACKUPS_DISABLED' => 'Workstation backups are disabled', -'bac_WORKSTN_BACKUPS_ENABLED' => 'Workstation backups are currently enabled.', +'bac_BACKUP_DESKTOP_TOO_BIG' => 'Your server has too much data for a reliable backup to desktop.', +'bac_WORKSTN_BACKUPS' => 'Workstation backups are ', 'bac_WKBACKUPS_RUN_AT' => 'Regular workstation backups will run at: ', 'bac_WORKSTN_CONFIGURE' => 'Configure workstation backup', 'bac_WORKSTN_VERIFY' => 'Verify workstation backup', @@ -1313,14 +1327,14 @@ multi-drop mode is the only option available when the server is configured in private server and gateway mode.', 'mai_LABEL_DELEGATE' => 'Address of internal mail server', -'mai_DESC_DELEGATE' => '

    Delegate mail servers

    Your -server includes a complete, full-featured e-mail server. However, +'mai_TITLE_DELEGATE' => 'Delegate mail servers', +'mai_DESC_DELEGATE' => 'Your server includes a complete, full-featured e-mail server. However, if for some reason you wish to delegate e-mail processing to another system, specify the IP address of the delegate system here. For normal operation, leave this field blank.', 'mai_LABEL_SECONDARY' => 'Secondary mail server', -'mai_DESC_SECONDARY' => '

    ETRN or multi-drop settings

    For -ETRN or multi-drop, specify the hostname or IP address of your +'mai_TITLE_SECONDARY' => 'ETRN or multi-drop settings', +'mai_DESC_SECONDARY' => 'For ETRN or multi-drop, specify the hostname or IP address of your secondary mail server. (If using the standard e-mail setup, this field can be left blank.)', 'mai_DESC_FETCH_PERIOD' => 'For ETRN or multi-drop, you can control how frequently this server @@ -1360,13 +1374,13 @@ 'mai_FORWARD_TO' => 'Send to', 'mai_RETURN_TO_SENDER' => 'Reject', 'mai_LABEL_UNKNOWN' => 'E-mail to unknown users', -'mai_DESC_UNKNOWN' => '

    Unknown Users

    -Selecting Reject (recommended setting) will configure the server to only +'mai_TITLE_UNKNOWN' => 'Unknown Users', +'mai_DESC_UNKNOWN' => 'Selecting Reject (recommended setting) will configure the server to only accept mail for valid email addresses (for example users, groups, pseudonyms). Mail for other addresses will be rejected.', 'mai_LABEL_SMARTHOST' => 'Address of Internet provider\'s mail server', -'mai_DESC_SMARTHOST' => '

    SMTP server

    -The server can deliver outgoing messages directly to their +'mai_TITLE_SMARTHOST' => 'SMTP server', +'mai_DESC_SMARTHOST' => 'The server can deliver outgoing messages directly to their destination (recommended in most cases) or can deliver them via your Internet provider\'s SMTP server (recommended if you have an unreliable Internet connection or are using a residential Internet @@ -1394,7 +1408,7 @@ STARTTLS to be used to ensure secure authentication.', 'mai_DESC_WEBMAIL' => 'You can enable or disable webmail on this system. Webmail allows users to access their mail through a regular web browser by -pointing the browser to https://{$FQDN}/webmail,and +pointing the browser to https://[_1]/webmail,and logging in to their account.', 'mai_LABEL_WEBMAIL' => 'Webmail access', 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT' => 'Executable content blocking', @@ -1405,17 +1419,13 @@ be automatically returned to the sender.', 'mai_UNACCEPTABLE_CHARS' => 'This field requires a valid e-mail address, which must include the @ symbol and a domain name.', -'mai_DESC_STATE_ACCESS' => '

    E-mail access

    ', -'mai_DESC_STATE_ACCESS_BUTTON' => 'Change e-mail access settings', -'mai_DESC_STATE_RECEPTION' => '

    E-mail reception

    ', -'mai_DESC_STATE_RECEPTION_BUTTON' => 'Change e-mail reception settings', -'mai_DESC_STATE_DELIVERY' => '

    E-mail delivery

    ', -'mai_DESC_STATE_DELIVERY_BUTTON' => 'Change e-mail delivery settings', -'mai_DESC_STATE_FILTERING_BUTTON' => 'Change e-mail filtering settings', +'mai_DESC_STATE_ACCESS' => 'E-mail access', +'mai_DESC_STATE_ACCESS_BUTTON' => 'Change e-mail access settings', +'mai_DESC_STATE_RECEPTION' => 'E-mail reception', +'mai_DESC_STATE_RECEPTION_BUTTON' => 'Change e-mail reception settings', +'mai_DESC_STATE_DELIVERY' => 'E-mail delivery', +'mai_DESC_STATE_DELIVERY_BUTTON' => 'Change e-mail delivery settings', +'mai_DESC_STATE_FILTERING_BUTTON' => 'Change e-mail filtering settings', 'mai_LABEL_VIRUS_SCAN' => 'Virus scanning', '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 sender.', @@ -1449,11 +1459,12 @@ 'mai_VALIDATION_SMTPAUTH_NONBLANK' => 'This field cannot be left blank if SMTP Authentication is enabled.', -'yum_Software installer' => 'Software installer', + +'yum_FORM_TITLE' => 'Software installer', 'yum_SUCCESS' => 'The new settings have been saved.', 'yum_LABEL_YUM_STATUS' => 'Check for updates', 'yum_LABEL_YUM_AUTOINSTALLUPDATES' => 'Automatically install updates', -'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.', +'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.', 'yum_LABEL_YUM_PACKAGEFUNCTIONS' => 'Manage individual packages', 'yum_DESC_YUM_PACKAGEFUNCTIONS' => 'The software installer can manage groups of related package or individual packages. By @@ -1468,23 +1479,18 @@ To disable a repository, de-select it from the list. By default, only stable, tested software is available for installation.', -'yum_DESC_UPTODATE' => '
    -

    This system is up to date.

    -All updates have been installed. -
    ', -'yum_DESC_UPDATES_AVAILABLE' => '
    -

    Updates Available

    -There are updates available for your system. These updates -should be installed as soon as possible. -
    ', +'yum_TITLE_UPTODATE' => 'This system is up to date.', +'yum_DESC_UPTODATE' => 'All updates have been installed.', +'yum_TITLE_UPDATES_AVAILABLE' => 'Updates Available', +'yum_DESC_UPDATES_AVAILABLE' => 'There are updates available for your system. These updates +should be installed as soon as possible.', 'yum_LABEL_AVAILABLE_UPDATES' => 'Updates available', 'yum_DESC_AVAILABLE_UPDATES' => 'The following updates are available for your system. You should normally install all available updates. If there are updates you do not wish to install, de-select them from the list below.', 'yum_INSTALL_UPDATES' => 'Install selected updates', -'yum_DESC_BUTTON_INSTALL_UPDATES' => 'List available updates', +'yum_BUTTON_INSTALL_UPDATES' => 'List available updates', 'yum_HEADER_AVAILABLE_SOFTWARE' => 'The following software is available to be installed onto your system. You should only install additional software onto this system if you are aware @@ -1506,13 +1512,9 @@ 'yum_DESC_INSTALLED_PACKAGES' => 'You can also select individual packages you wish to remove from the list below.', 'yum_LABEL_INSTALLED_PACKAGES' => 'Installed packages', -'yum_DESC_BUTTON_CONFIGURATION' => 'Change software installer settings -', -'yum_DESC_BUTTON_INSTALL_AVAILABLE' => 'Install additional software', -'yum_DESC_BUTTON_REMOVE' => 'Remove installed software', +'yum_BUTTON_CONFIGURATION' => 'Change software installer settings', +'yum_BUTTON_INSTALL_AVAILABLE' => 'Install additional software', +'yum_BUTTON_REMOVE' => 'Remove installed software', 'yum_HEADER_POSTUPGRADE_REQUIRED' => ' The system needs to be reconfigured after adding or removing software, or applying updates. @@ -1528,11 +1530,11 @@ 'yum_2WEEKLY' => 'Weekly', 'yum_3MONTHLY' => 'Monthly', 'yum_LABEL_YUM_DELTARPMPROCESS' => 'Delta Rpm Update', -'yum_LABEL_YUM_DELTARPM' => 'A deltarpm contains the difference between an old and a new version of a rpm, +'yum_DESC_YUM_DELTARPMPROCESS' => 'A deltarpm contains the difference between an old and a new version of a rpm, which can save bandwith. The drawback is that update operations consume considerably more CPU cycles', 'yum_LABEL_YUM_DOWNLOADONLY' => 'Predownload updates', -'yum_LABEL_YUM_DOWNLOADONLY_DESCRIPTION' => 'The rpm updates can be downloaded during the night, +'yum_DESC_YUM_DOWNLOADONLY' => 'The rpm updates can be downloaded during the night, this will ease and give faster the yum update process (only enabled repositories will be used).', @@ -1616,7 +1618,7 @@ 'rma_DESC_TELNET_ACCESS' => 'WARNING:Telnet is currently enabled, but this feature is no longer supported.Telnet is inherently insecure and should only be used in circumstances where no practical alternative exists. You -should change option to {$NO_ACCESS} and use +should change option to [_1] and use secure shell if remote access is required.Once disabled, telnet will no longer appear on this screen. ', @@ -1631,6 +1633,7 @@ need to import a new certificate!.', 'rma_LABEL_IPSECRW_RESET' => 'Reset digital certificates', + 'usr_FORM_TITLE' => 'Create, modify, or remove user accounts', 'usr_FIRSTPAGE_DESC' => '

    You can modify, lock or remove any account or reset the @@ -1709,8 +1712,7 @@ as configured. The account may be activated in the future by setting a new password. The current password will not be retained. -

    -

    +

    Are you sure you wish to lock this account?', 'usr_REMOVE_ACCOUNT_TITLE' => 'Remove user account', 'usr_REMOVE_DESC' => 'You are about to remove the user account "[_1]" ([_2])', @@ -1752,15 +1754,14 @@ 'usr_LABEL_IPSECRW_DOWNLOAD' => 'Download digital certificate to IPSec client', 'usr_ERR_OCCURRED_DELETING' => 'An error occurred while trying to delete the user.', + 'ln_LOCAL NETWORKS' => 'Local networks', -'ln_FIRSTPAGE_DESC' => ' - For security reasons, several services on your server are +'ln_FIRSTPAGE_DESC' => 'For security reasons, several services on your server are available only to your local network. However you can grant these local access privileges to additional networks by listing them below. Most installations should leave this list empty.', 'ln_ADD_TITLE' => 'Add a local network ', -'ln_ADD_DESC' =>' - Each parameter must be in the form #.#.#.# (each # is a number +'ln_ADD_DESC' =>'Each parameter must be in the form #.#.#.# (each # is a number from 0 to 255). The server software will zero out the ending (host identifier) part of the network address according to the subnet mask, to ensure that the network address is valid.

    @@ -1783,8 +1784,7 @@ is already considered local. Did not add new network. ', 'ln_NETWORK_ALREADY_ADDED' => 'Error: network {$network} (derived from network {$networkAddress} and subnet mask {$networkMask}) - has already been added. Did not add new network. -', + has already been added. Did not add new network.', 'ln_ERROR_CREATING_NETWORK' => 'Error occurred while creating network.', 'ln_SUCCESS' =>'Successfully added network {$network}/{$networkMask} via router {$networkRouter}.', '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}. ', @@ -1802,131 +1802,73 @@ after this network is removed. ', 'ln_REMOVE_HOSTS_LABEL' => 'Remove hosts on network', 'ln-extra' => '{$network}/{$networkMask} via router $networkRouter}.', - -'ln_SUCCESS_NONSTANDARD_RANGE' =>' -

    +'ln_SUCCESS_NONSTANDARD_RANGE' =>'

    Successfully added network {$network}/{$networkMask} via router {$networkRouter}. -

    -

    +

    Your server will grant local access privileges to {$totalHosts} IP addresses in the range {$firstAddr} to {$lastAddr}. -

    -

    +

    Warning: the ProFTPd FTP server cannot handle this nonstandard subnet mask. The simpler specification - {$simpleMask} will be used instead. -

    ', - - 'pf_FORM_TITLE' => - 'Configure Port Forwarding', - 'pf_FIRST_PAGE_DESCRIPTION' => - '

    + {$simpleMask} will be used instead.

    ', +'pf_FORM_TITLE' => 'Configure Port Forwarding', +'pf_FIRST_PAGE_DESCRIPTION' => '

    You can use this panel to modify your firewall rules so as to open a specific port on this server and forward it to another port on another host. Doing so will permit incoming traffic to directly access a private host on your LAN. -

    -

    +

    WARNING: Misuse of this feature can seriously compromise the security of your network. Do not use this feature lightly, or without fully understanding the implications of your actions. -

    - ', - 'pf_CREATE_RULE' => - 'Create portforwarding rule', - 'pf_SUMMARY_ADD_DESC' => - 'The following summarizes the port-forwarding rule +

    ', +'pf_CREATE_RULE' => 'Create portforwarding rule', +'pf_SUMMARY_ADD_DESC' => 'The following summarizes the port-forwarding rule that you are about to add. If you are satisfied with the rule, - click the "Add" button. If you are not, click the - "Cancel" button. - ', - 'pf_SUMMARY_REMOVE_DESC' => - 'The following summarizes the port-forwarding rule + click the \'Add\' button.', +'pf_SUMMARY_REMOVE_DESC' => 'The following summarizes the port-forwarding rule that you are about to remove. If you are sure you want to - remove the rule, click the "Remove" button. If not, - click the "Cancel" button. - ', - 'pf_SHOW_FORWARDS' => - ' - Below you will find a table summarizing the current + remove the rule, click the \'Remove\' button.', +'pf_SHOW_FORWARDS' => 'Below you will find a table summarizing the current port-forwarding rules installed on this server. Click on the - "Remove" link to remove the corresponding rule. - ', - 'pf_NO_FORWARDS' => - 'There are currently no forwarded ports on the system.', - 'pf_CREATE_PAGE_DESCRIPTION' => - 'Select the protocol, the port you wish to forward, the + \'Remove\' link to remove the corresponding rule.', +'pf_NO_FORWARDS' => 'There are currently no forwarded ports on the system.', +'pf_CREATE_PAGE_DESCRIPTION' => '

    Select the protocol, the port you wish to forward, the destination host, and the port on the destination host that you wish to forward to. If you wish to specify a port range, enter the lower and upper boundaries separated by a hyphen. The destination port may be left blank, which will instruct the firewall to leave the source port - unaltered.

    - ]]> - ', - 'pf_LABEL_SOURCE_PORT' => - 'Source Port(s)', - 'pf_LABEL_PROTOCOL' => - 'Protocol', - 'pf_LABEL_DESTINATION_PORT' => - 'Destination Port(s)', - 'pf_LABEL_DESTINATION_HOST' => - 'Destination Host IP Address', - 'pf_LABEL_RULE_COMMENT' => - 'Rule Comment', - 'pf_LABEL_ALLOW_HOSTS' => - 'Allow Hosts', - 'pf_Port forwarding' => - 'Port forwarding', - 'pf_SUCCESS' => - 'Your change to the port forwarding rules has been - successfully saved. - ', - 'pf_RULE_COMMENT' => - 'Rule Comment', - 'pf_ALLOW_HOSTS' => - 'Allow Hosts', - 'pf_ERR_NO_MASQ_RECORD' => - 'Cannot retrieve masq record from the configuration - database.', - 'pf_ERR_UNSUPPORTED_MODE' => - 'Unsupported mode.', - 'pf_ERR_CANNOT_REMOVE_NORULE' => - 'Cannot remove non-existant rule.', - 'pf_ERR_NONZERO_RETURN_EVENT' => - 'Event returned a non-zero return value.', - 'pf_ERR_BADPORT' => - 'The ports must be a positive integer less than - 65536.', - 'pf_ERR_BADIP' => - 'This does not appear to be an IP address. You must use + unaltered.

    ', +'pf_LABEL_SOURCE_PORT' => 'Source Port(s)', +'pf_LABEL_PROTOCOL' => 'Protocol', +'pf_LABEL_DESTINATION_PORT' => 'Destination Port(s)', +'pf_LABEL_DESTINATION_HOST' => 'Destination Host IP Address', +'pf_LABEL_RULE_COMMENT' => 'Rule Comment', +'pf_LABEL_ALLOW_HOSTS' => 'Allow Hosts', +'pf_Port forwarding' => 'Port forwarding', +'pf_SUCCESS' => 'Your change to the port forwarding rules has been successfully saved.', +'pf_RULE_COMMENT' => 'Rule Comment', +'pf_ALLOW_HOSTS' => 'Allow Hosts', +'pf_ERR_NO_MASQ_RECORD' => 'Cannot retrieve masq record from the configuration database.', +'pf_ERR_UNSUPPORTED_MODE' => 'Unsupported mode.', +'pf_ERR_CANNOT_REMOVE_NORULE' => 'Cannot remove non-existant rule.', +'pf_ERR_NONZERO_RETURN_EVENT' => 'Event returned a non-zero return value.', +'pf_ERR_BADPORT' => 'The ports must be a positive integer less than 65536.', +'pf_ERR_BADIP' => 'This does not appear to be an IP address. You must use dotted-quad notation, and each of the four numbers should be less than 256. ie: 192.168.0.5', - 'pf_ERR_DUPRULE' => - 'This rule has already been added, it cannot be added - twice.', - 'pf_ERR_PORT_COLLISION' => - ' - ERROR: This port or port range conflicts with an existing - rule. Please modify this new rule, or remove the old rule. - ', - 'pf_ERR_BADAHOST' => - ' - This does not appear to be a valid IP address list. - ie: 192.168.0.1,192.168.1.1/24 - ', - 'pf_IN_SERVERONLY' => - ' - This server is currently in serveronly mode and portforwarding - is possible only to localhost. - ', - - +'pf_ERR_DUPRULE' => 'This rule has already been added, it cannot be added twice.', +'pf_ERR_PORT_COLLISION' => 'ERROR: This port or port range conflicts with an existing + rule. Please modify this new rule, or remove the old rule.', +'pf_ERR_BADAHOST' => 'This does not appear to be a valid IP address list. + ie: 192.168.0.1,192.168.1.1/24', +'pf_IN_SERVERONLY' => 'This server is currently in serveronly mode and portforwarding + is possible only to localhost.', ); 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 --- 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 +++ 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 @@ -1,49 +0,0 @@ -package SrvMngr::I18N::Wbl::fr; - -use utf8; -use Mojo::Base 'SrvMngr::I18N'; - -my %general = (); -my %wbl = ( -'wbl_SAVE' => 'Sauvegarder', -'wbl_PERFORM' => 'Exécuter', -'wbl_FORM_TITLE' => 'WBL courriel', -'wbl_OPERATION_STATUS_REPORT' => 'Rapport d\'état de l\'opération', -'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.', -'wbl_RBL_LIST_DESCRIPTION' => 'La liste RBL est utilisée pour ajuster DNSBL et RHSBL.', -'wbl_RBL_LIST' => 'Liste RBL', -'wbl_BLACK_LIST_DESCRIPTION' => 'Les listes noires sont utilisées pour refuser le trafic de courriels.', -'wbl_BLACK_LIST' => 'Liste noire', -'wbl_WHITE_LIST_DESCRIPTION' => 'Les listes blanches sont utilisées pour accepter le trafic de courriels.', -'wbl_WHITE_LIST' => 'Liste blanche', -'wbl_BLACK_TITLE' => 'Ce serveur inclus un support intégré permettant à l\'administrateur de définir des listes noires, badhelo et badmailfrom.', -'wbl_DNSBL_DESCRIPTION' => 'DNSBL est une abréviation Anglaise pour "Liste noire DNS".', -'wbl_DNSBL_LABEL' => 'Statut DNSBL', -'wbl_RHSBL_DESCRIPTION' => 'RHSBL est une abréviation pour "Right Hand Side Blacklist".', -'wbl_RHSBL_LABEL' => 'Rapport d\'état de RHSBL', -'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\'.', -'wbl_BADHELO_LABEL' => 'qpsmtpd badhelo', -'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\'', -'wbl_BADMAILFROM_LABEL' => 'qmail \'badmailfrom\'', -'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', -'wbl_RRFH_LABEL' => 'État des listes blanches', -'wbl_WHITELISTHOSTS_DESCRIPTION' => 'Toute IP présente dans whitelisthosts sera exemptée de toutes validations supplémentaires pendant la phase \'connexion\'', -'wbl_WHITELISTHOSTS_LABEL' => 'Qpsmtpd whitelisthosts', -'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\'', -'wbl_WHITELISTHELO_LABEL' => 'qpsmtpd whitelisthelo', -'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\'.', -'wbl_WHITELISTSENDERS_LABEL' => 'qpsmtpd whitelistsenders', -'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.', -'wbl_WHITELISTFROM_LABEL' => 'spamassassin whitelist_from', -'wbl_BLACKLISTFROM_LABEL' => 'spamassassin blacklist_from', -'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.', -'wbl_SBLLIST_LABEL' => 'RHSBL (qpsmtpd SBLList)', -'wbl_SBLLIST_DESCRIPTION' => 'Liste de blocage RHS - (Right Hand Side) des expéditeurs hôte / domaine sera vérifié contre les serveurs suivants', -'wbl_RBLLIST_LABEL' => 'DNSBL Zones (qpsmtpd RBLList)', -'wbl_RBLLIST_DESCRIPTION' => 'Liste de bloquage DNS -L\'adresse IP des expéditeurs sera vérifiée à partir des serveurs suivants.', - '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.', -); - -our %Lexicon = ( %general, %wbl); - -1; \ Pas de fin de ligne à la fin du fichier 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 --- 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 +++ 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 @@ -1,268 +0,0 @@ -our %Lexicon = ( -_AUTO => 1, - -YES => 'Oui', -NO => 'Non', -edit => 'Modifier', -del => 'Effacer', -exit => 'Quitter', -cancel => 'Annuler', -hello => 'salut', -'All rights reserved' => 'Tous droits réservés', - -'Collaboration' => -'Collaboration', -'Administration' => -'Administration', -'Security' => -'Sécurité', -'Configuration' => -'Configuration', -'Miscellaneous' => -'Divers', -'Your Settings' => -'Vos paramètres', -'SAVE' => -'Enregistrer', -'CANCEL' => -'Annuler', -'ENABLED' => -'Activé', -'DISABLED' => -'Désactivé', -'NO' => -'Non', -'YES' => -'Oui', -'ADD' => -'Ajouter', -'CREATE' => -'Créer', -'MODIFY' => -'Modifier', -'REMOVE' => -'Supprimer', -'COMMENT' => -'Commentaire', -'NEXT' => -'Suivant', -'SELF' => -'Ce serveur', -'REMOTE' => -'Distant', -'LOCAL' => -'Local', -'ACTION' => -'Action', -'NETWORK' => -'Réseau', -'ROUTER' => -'Routeur', -'OPERATION_STATUS_REPORT' => -'Rapport d\'état de l\'opération', -'ACCOUNT' => -'Compte', -'GROUP' => -'Groupe', -'DESC_SECTIONBAR' => -'
    ', -'NO_PIPES_ALLOWED' => -'La barre verticale "|" (pipe) n\'est pas autorisée dans ce champ.', -'ERROR_BELOW' => -'ERREUR : Une erreur s\'est produite lors de la validation de cette page. Vous trouverez ci-dessous les raisons de ce problème :', -'ACCESS' => -'Accès', -'ACCOUNT_LOCKED' => -'Le compte est verrouillé', -'GROUP_ADD' => -'Ajouter un groupe', -'NETWORKS_ALLOW_LOCAL' => -'N\'autoriser l\'accès que depuis les réseaux locaux', -'NETWORKS_ALLOW_PUBLIC' => -'Autoriser l\'accès complet (LAN et Internet)', -'ERROR_PASSWORD_CHANGE' => -'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é.', -'BACK' => -'Retour', -'BACKUP' => -'Sauvegarde', -'DESCRIPTION_BRIEF' => -'Brève description', -'PASSWORD_CHANGE' => -'Changer le mot de passe', -'RESET_PASSWORD_TITLE' => -'Réinitialiser le mot de passe de l\'utilisateur', -'ACCOUNT_PASSWORD_CHANGE' => -'Changer le mot de passe du compte', -'CONTENT' => -'Contenu', -'CREATE_GROUP' => -'Créer un groupe d\'utilisateurs', -'USER_LIST_CURRENT' => -'Liste des utilisateurs', -'DESCRIPTION' => -'Description', -'DESTINATION' => -'Destination', -'DOMAIN_NAME' => -'Nom de Domaine', -'DOMAIN' => -'Domaine', -'DOMAINS' => -'Domaines', -'DOWNLOAD' => -'Télécharger', -'ERROR_UPDATING_CONFIGURATION' => -'Une erreur s\'est produite pendant la mise à jour de la configuration du serveur.', -'GROUP_MEMBERS' => -'Membres du groupe', -'GROUP_NAME' => -'Nom du groupe', -'GROUPS' => -'Groupes', -'IP_ADDRESS' => -'Adresse IP', -'IP_ADDRESS_OR_FQDN' => -'Adresse IP ou FQDN', -'USER_INVALID' => -'Utilisateur non autorisé', -'LOCATION' => -'Emplacement', -'MB' => -'Mo', -'MODIFY_USER_GROUP' => -'Modifier le groupe d\'utilisateurs', -'NAME' => -'Nom', -'PASSWORD_VERIFY_NEW' => -'Nouveau mot de passe (vérification)', -'PASSWORD_NEW' => -'Nouveau mot de passe', -'OFF' => -'Désactivé', -'OK' => -'Ok', -'PASSWORD_OLD' => -'Ancien mot de passe', -'ON' => -'Activé', -'PASSWORD' => -'Mot de passe', -'PERFORM' => -'Exécuter', -'RECONFIGURE' => -'Reconfigurer', -'REMOVE_USER_GROUP' => -'Supprimer le groupe d\'utilisateurs', -'PASSWORD_RESET' => -'Réinitialiser le mot de passe', -'RESTORE' => -'Restaurer', -'SHUTDOWN' => -'Arrêter', -'SUCCESS' => -'Opération réussie', -'ACCOUNT_NAME_INVALID' => -'Le nom d\'utilisateur que vous avez tapé n\'est pas valide.', -'ACCOUNT_NAME_INVALID_CHARS' => -'Le nom d\'utilisateur que vous avez tapé contient des caractères non valides.', -'PASSWORD_OLD_INVALID_CHARS' => -'L\'ancien mot de passe que vous avez tapé contient des caractères non valides.', -'PASSWORD_INVALID_CHARS' => -'Le mot de passe que vous avez tapé contient des caractères non valides.', -'PASSWORD_VERIFY_ERROR' => -'Les mots de passe ne concordent pas.', -'ACCOUNT_USER_NONE' => -'Aucun compte utilisateur n\'a été défini dans le système.', -'ACCOUNT_GROUP_NONE' => -'Il n\'y a aucun groupe d\'utilisateurs défini dans le système.', -'ERROR_INVALID_CHARS' => -'Caractères inattendus dans la description.', -'USER_NAME' => -'Nom d\'utilisateur', -'YOUR_ACCOUNT' => -'Votre compte utilisateur:', -'YOUR_ACCOUNT_INVALID' => -'Le nom d\'utilisateur que vous avez tapé n\'est pas valide.', -'PASSWORD_CHANGE_SUCCESS' => -'Le mot de passe a été modifié avec succès.', -'FM_NONBLANK' => -'Ce champ ne doit pas être vide.', -'FM_INTEGER' => -'Ce champ doit contenir un entier positif.', -'FM_NUMBER' => -'Ce champ doit contenir un nombre.', -'FM_WORD' => -'Ce champ doit être composé d\'un seul mot.', -'FM_DATE' => -'La valeur tapée ne correspond pas à une date.', -'FM_CREDIT_CARD_NUMBER1' => -'Vous devez taper un numéro de carte de paiement.', -'FM_CREDIT_CARD_NUMBER2' => -'Le numéro de carte de paiement ne doit contenir que des nombres, des espaces ou des tirets.', -'FM_CREDIT_CARD_NUMBER3' => -'Il doit être composé d\'au moins 14 caractères.', -'FM_CREDIT_CARD_NUMBER4' => -'Il ne semble pas correspondre à un numéro valide de carte de paiement.', -'FM_CREDIT_CARD_EXPIRY1' => -'Aucune date d\'expiration n\'a été tapée.', -'FM_CREDIT_CARD_EXPIRY2' => -'La date d\'expiration doit être tapée sous la forme MM/AA ou MM/AAAA.', -'FM_CREDIT_CARD_EXPIRY3' => -'La date d\'expiration a déjà expirée.', -'FM_CREDIT_CARD_EXPIRY4' => -'La date d\'expiration semble trop éloignée dans le futur.', -'FM_ISO_COUNTRY_CODE1' => -'Vous devez taper un code de région.', -'FM_ISO_COUNTRY_CODE2' => -'Ce champ ne contient pas de code ISO de région valide.', -'FM_US_STATE' => -'Cette abréviation en deux lettres d\'état américain n\'est pas valide.', -'FM_US_ZIPCODE' => -'Les codes postaux américains doivent contenir 5 ou 9 chiffres.', -'FM_MINLENGTH1' => -'La longueur minimale a été définie arbitrairement à {$minlength} caractères.', -'FM_MINLENGTH2' => -'Ce champ doit contenir au minimum {$minlength} caractères.', -'FM_MAXLENGTH1' => -'La longueur maximale a été définie arbitrairement à {$maxlength} caractères.', -'FM_MAXLENGTH2' => -'Ce champ doit ne doit pas dépasser {$maxlength} caractères.', -'FM_EXACTLENGTH1' => -'Vous devez définir la longueur de ce champ.', -'FM_EXACTLENGTH2' => -'Vous devez définir la longueur exacte de ce champ avec un entier.', -'FM_EXACTLENGTH3' => -'Ce champ doit faire exactement {$exactlength} caractères.', -'FM_LENGTHRANGE1' => -'Vous devez définir les longueurs maximale et minimale de ce champ.', -'FM_LENGTHRANGE2' => -'Vous devez définir les longueurs maximale et minimale de ce champ avec des entiers.', -'FM_LENGTHRANGE3' => -'La longueur de ce champ doit être comprise entre {$minlength} et {$maxlength} caractères.', -'FM_URL' => -'Ce champ doit contenir une URL commençant par http:// ou ftp://', -'FM_EMAIL_SIMPLE1' => -'Vous devez taper une adresse de courriel.', -'FM_EMAIL_SIMPLE2' => -'Ce champ ne semble pas respecter le format RFC822 des adresses de courriel.', -'FM_DOMAIN_NAME' => -'Ce champ ne semble pas contenir de nom de domaine Internet ou d\'hôte valide.', -'FM_IP_NUMBER1' => -'Ce champ doit contenir une adresse IP valide et ne doit pas être vide.', -'FM_IP_NUMBER2' => -'Format d\'adresse IP incorrect (X.X.X.X attendu)', -'FM_IP_NUMBER3' => -'La valeur {$octet} dépasse 255.', -'FM_USERNAME' => -'Ce champ doit contenir un nom d\'utilisateur valide (3 à 8 lettres et chiffres).', -'FM_PASSWORD1' => -'Vous devez taper un mot de passe.', -'FM_PASSWORD2' => -'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.', -'FM_MAC_ADDRESS1' => -'Vous devez taper une adresse Ethernet.', -'FM_MAC_ADDRESS2' => -'L\'adresse Ethernet que vous avez tapé n\'est pas valide.', -'FM_ERR_UNEXPECTED_DESC' => -'ERREUR : caractères invalides ou manquants dans la description.', 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 --- 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 +++ 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 @@ -19,7 +19,9 @@ our @ISA = qw(Exporter); our @EXPORT_OK = qw( init_session_cgi get_mod_url theme_list - getNavigation ip_number is_normal_password email_simple); + getNavigation ip_number is_normal_password email_simple + mac_address_or_blank mac_address ip_number_or_blank + ); my $config = plugin( 'Config' => { files => './conf/srvmngr.conf' }); @@ -304,4 +306,44 @@ } +sub mac_address_or_blank { + my ($c, $data) = @_; + return "OK" unless $data; + return mac_address($c, $data); +} + + +sub mac_address { + +# from CGI::FormMagick::Validator::Network + + my ($c, $data) = @_; + + $_ = lc $data; # easier to match on $_ + if (not defined $_) { + return $c->l('FM_MAC_ADDRESS1'); + } elsif (/^([0-9a-f][0-9a-f](:[0-9a-f][0-9a-f]){5})$/) { + return "OK"; + } else { + return $c->l('FM_MAC_ADDRESS2'); + } +} + + +sub ip_number_or_blank { + + # XXX - FIXME - we should push this down into CGI::FormMagick + + my $c = shift; + my $ip = shift; + + if (!defined($ip) || $ip eq "") + { + return 'OK'; + } + + return ip_number( $c, $ip ); +} + + 1; 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 --- 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 +++ 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 @@ -27,7 +27,7 @@ my $locale = plugin I18N => {namespace => 'SrvMngr::I18N', default => 'en'}; #my $locale = plugin I18N => {namespace => 'SrvMngr::I18N'}; -my $VERSION = '0.0.1'; +my $VERSION = '0.0.2'; #app->mode('production'); app->mode('development'); @@ -58,6 +58,11 @@ $r->get('/')->to('initial#main')->name('initial'); +$r->get('/backup')->to('backup#main')->name('backup'); +$r->post('/backup')->to('backup#do_display')->name('backupd'); +$r->get('/backupd')->to('backup#do_display')->name('backupc'); # corrections # +$r->post('/backupd')->to('backup#do_update')->name('backupu'); + $r->get('/bugreport')->to('bugreport#main')->name('bugreport'); $r->post('/bugreport')->to('bugreport#do_report')->name('bugreport2'); $r->post('/bugreportD')->to('bugreport#download_config_report')->name('bugreportD'); @@ -81,6 +86,11 @@ $r->get('/domainup2')->to('domains#do_display')->name('domainup21'); $r->post('/domainup2')->to('domains#do_update')->name('domainup22'); +$r->get('/emailsettings')->to('emailsettings#main')->name('emailsettings'); +$r->post('/emailsettings')->to('emailsettings#do_display')->name('emailsetting'); +$r->get('/emailsettingd')->to('emailsettings#do_display')->name('emailsettingd'); +$r->post('/emailsettingd')->to('emailsettings#do_update')->name('emailsettingu'); + $r->get('/groups')->to('groups#main')->name('groups'); $r->post('/groups')->to('groups#do_display')->name('groupadd1'); $r->post('/groupadd')->to('groups#do_update')->name('groupadd2'); @@ -101,28 +111,23 @@ $r->get('/initial')->to('initial#main')->name('initial'); -$r->get('/logout')->to('main#logout')->name('logout'); -$r->get('/manual')->to('manual#main')->name('manual'); - $r->get('/localnetworks')->to('localnetworks#main')->name('localnetworks'); $r->post('/localnetworks')->to('localnetworks#do_display')->name('localnetworks'); -$r->post('/localnetworksdel')->to('localnetworks#do_display')->name('localnetworksdel'); $r->post('/localnetworksadd')->to('localnetworks#do_display')->name('localnetworksadd'); $r->post('/localnetworksadd1')->to('localnetworks#do_display')->name('localnetworksadd1'); -$r->get('/localnetworksadd1')->to('localnetworks#do_display')->name('localnetworksadd1'); $r->get('/localnetworksdel')->to('localnetworks#do_display')->name('localnetworksdel'); $r->post('/localnetworksdel1')->to('localnetworks#do_display')->name('localnetworksdel1'); -$r->get('/localnetworksdel1')->to('localnetworks#do_display')->name('localnetworksdel1'); + +$r->get('/logout')->to('main#logout')->name('logout'); + +$r->get('/manual')->to('manual#main')->name('manual'); $r->get('/portforwarding')->to('portforwarding#main')->name('portforwarding'); $r->post('/portforwarding')->to('portforwarding#do_display')->name('portforwarding'); -$r->post('/portforwardingdel')->to('portforwarding#do_display')->name('portforwardingdel'); $r->post('/portforwardingadd')->to('portforwarding#do_display')->name('portforwardingadd'); $r->post('/portforwardingadd1')->to('portforwarding#do_display')->name('portforwardingadd1'); -$r->get('/portforwardingadd1')->to('portforwarding#do_display')->name('portforwardingadd1'); $r->get('/portforwardingdel')->to('portforwarding#do_display')->name('portforwardingdel'); $r->post('/portforwardingdel1')->to('portforwarding#do_display')->name('portforwardingdel1'); -$r->get('/portforwardingdel1')->to('portforwarding#do_display')->name('portforwardingdel1'); $r->get('/printers')->to('printers#main')->name('printers'); $r->post('/printers')->to('printers#do_display')->name('printeradd'); @@ -157,9 +162,12 @@ $r->post('/remoteaccess')->to('remoteaccess#do_action')->name('remoteaccessact'); $r->get('/review')->to('review#main')->name('review'); + $r->get('/starterwebsite')->to('starterwebsite#main')->name('starterwebsite'); $r->post('/starterwebsite')->to('starterwebsite#do_site')->name('starterwebsite2'); + $r->get('/support')->to('support#main')->name('support'); + $r->post('/swttheme')->to('swttheme#main')->name('swttheme'); $r->get('/useraccounts')->to('useraccounts#main')->name('useraccounts'); @@ -171,11 +179,13 @@ $r->post('/viewlogfiles')->to('viewlogfiles#do_action')->name('viewlogfiles2'); $r->get('/viewlogfileR')->to('viewlogfiles#do_action')->name('viewlogfileR'); -$r->get('/wbl')->to('wbl#main')->name('wbl'); -$r->post('/wbl')->to('wbl#do_display')->name('wbldis'); -$r->post('/wbl2')->to('wbl#do_update')->name('wblupd'); +$r->get('/yum')->to('yum#main')->name('yum'); +$r->post('/yum')->to('yum#do_display')->name('yumd1'); +$r->get('/yumd')->to('yum#do_display')->name('yumd'); +$r->post('/yumd')->to('yum#do_update')->name('yumu'); $r->get('/welcome')->to('welcome#main')->name('welcome'); + $r->get('/workgroup')->to('workgroup#main')->name('workgroup'); $r->post('/workgroup')->to('workgroup#do_update')->name('workgroup2'); @@ -191,9 +201,10 @@ my $c = shift; my $method = $c->req->method; my $url = $c->req->url; + my $deb = $c->req->url->to_abs->host; my $version = $c->req->version; my $ip = $c->tx->remote_address; - return "Received request => $method $url HTTP/$version from $ip"; + return "Received request => $method $deb $url HTTP/$version from $ip"; }); 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 --- 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 +++ 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 @@ -1,165 +0,0 @@ -/* srvmngr - css de base */ -body{ - background-color: #FFF; -} - -#container{ - max-width: 100%; - position: relative; - margin: auto; -} - -#navigation{ - width: 190px; - position: absolute; - margin-left: 0px; - padding: 5px; - background-color: #E8F3E1; -/* height: 600px; */ - overflow: auto; -} - -#main{ - margin-left: 195px; - padding: 10px; -} - - -#central{ - margin-left: 0px; - padding: 5px; -} - -#footer{ - margin-left: 0px; - padding: 5px; -} - -#header { - background: #bee6a2; -} - -#header h1, a:link, a:visited { - color: black; - text-decoration: none; -/* contribs.org styling */ -} - -.sme-error { - color: red; - background-color: #ffffff; - border-width: 1px; - border-style: solid; - border-color: red ; - padding: 2px; - margin-left: 10px; - margin-right: 10px; - margin-top:0px; - margin-bottom:0px; -} - -a.accent { - color: blue; -} - -#footer img { - float: right; - position: fixed; - margin-left: 40%; -} - -label.field-with-error { - color: #dd7e5e -} - -input.field-with-error { - background-color: #fd9e7e -} - -span.label { - display: inline-block; - font-weight: bold; - background-color: #e8f3e1; /*lightgreen;*/ - width: 30%; - text-align: right; -} - -span.data { - padding: 2px; - font-weight: bold; - margin-left: 0%; -/* background-color: lightblue;*/ -} - -span.data2 { - padding: 2px; - font-weight: bold; -/* background-color: lightblue; */ -} - -input.action { - margin-left: 0px; - color: darkgreen; - background-color: #bee6a2; /*lightgreen;*/ -} -#modul.desc { - padding: 3px; - background-color: grey; -} - -[type = 'text'] { - margin-left: 0px; - /*background-color: lightblue;*/ -} - -.a, .return { - color: #661866; - font-weight: bold; -} - -.section { - line-height: 20px; -} -.a, .item { - line-height: 15px; -} - -#module { -/* height: 600px; */ - overflow: auto; -} - - -#h2l1 { - height: 40px; - width: 100%; -} -#h2e11 { - width: 70%; - float: left; -} -#h2e12 { - background-color: #C0E7A6; - float: left; - text-align: right; -} - -#h2l2 { -/* background-color: #A8F9E7;*/ - border-top: solid white 3px; - border-bottom: solid white 2px; - height: 14px; - width: 100%; - padding: 1px; -} - -#h2e21 { - float: left; - width: 70%; -} - -#h2e22,#h2e23 { - float: left; - width: 10%; - text-align: center; -} 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 --- 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 +++ 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 @@ -0,0 +1,19 @@ +GIF89a/z/=r<,Z&x֖/l54g736Rt:gߢWޞz+|h4][Je|E'THSU7Aﵻ€ԴĻ@7'ڦoKgcPa^r}FJ#j︋>g(ؚ҇7[5+ χEɨNE53`ܳwpcvبn˜Є~sȹa`׳HBYʝΙӚjసRJƨ憆3f3! XMP DataXMP ~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!  + !z,/zx xD pxlj + ڳx uxuBq*\ȰÇ 83j̸;>PHILf\ Ew hڣeU@!z4yCo5 &<'jMV71_ vk׾ChuDh  [  GLxeo(L_ 'Dt 3F8cGtیW5G2xGlA 6v:4Aa-P`G^JGBP+xYHRrY'RTof:й%!6hrZy:D:,ʩo^ʙAEH:I諯("j++G +B @{f2Ej&Bv+;.r.,pK' 7G,1L dw ,Wl ,0,|2-<31L%DmэL7PG-TWmX -֒`C +>Y6dmh=Hlp= +*@M =..'^ `BW){f%B>kǭzs} +y7 }7瞇/Cn7A +x9%X`, `v޺t.;~ b]<#/_G'7/ dhp e_X'o]> A7wAA(L +W9q@^yw X@r/jDp?~-<~ "G^7.T]t$$ IpX +6`x̣GV f HzdV2 ;4$p3p  ܀2h>ـ- &*T U \)K, 0A'Xy`6v׻` !A2d΄Bp N! % [d5` rp9_A)(DA ^BF9 +aBж~@HhA ,sI\1IV6Fa`@L= ;6vk^ƀ Y n%`!L]P(=6! j<@i +4)Dd%+P>-f dp`74ڜ&hAQ !c%p-  e R+z22JB0@ +`m{"vI 20*nTyS۪'`yXeG 6Lm`6t`) +&tfOt +d ,7{Z<8h @)XsK#,a 2@6e.DP^z @%.u>- \^zq1s<x g ':$`nہ ,*e v7v׽`) 36ÐW*zCz T f7z]І&'=8y&sR9;d +C & jCmB;ָu-9#t2te]tK6ڊ@C&X5n{&܀Mr\̓mݨCxiOS'[z; \ Pas de fin de ligne à la fin du fichier 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 --- 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 +++ 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 @@ -0,0 +1,54 @@ +JFIF++CC(X  k؎?_ݏ<<<#ӯK|, $)$dJBsI(L< d''\Hs)K}@zb~w?73[irTJc$+s 1$0'sArS5#qb@Ddߐ\5p?+O,#0AgYp`iV^SZg&}gֆZb/A3ϵPpdxD` +OZJАWA%u + F3_Z~q~8Q4Wk)))#S>gݟegj!Id/\ it$MeFo{#^;.> +!1A "02BQqa3@Rb#rC? + +MjN\&7 Rj6NR7R2 !%2.7S 9pE Ѥ\.˦41bF|<̷h\M666:=ƬvoOPZVDG7-g˘ٻǐۼ~G }Ct-CvY/)X8? +ML8xS v17X% TI9^qqьZ3I|͑/98ey0uKE|^$K +DaSM12I#d2Nj.sl\W1+1`o7+# -{qbIUYR` @MRXT'ȡ J3BzڭϿ?Th_m?#ng뾇!j/hs\Ap)en-WS<9wv7 ~*1P%9eHWW`tٛT^χ\)wd&+"95 #Tkvg<Xrhs^age%V3_8\|.*5K3mP_oPY:纯Ϸ?jۼ~G }Ct-C_Yi@ڱK_? ! 1A"BQaq2Rr#34b$S?gyRYmmKjSkI[%$褹iIKKN9fܭ˺UTq +*!Kش.ad]BIRۨ!Bɻx"zBrZumS6RVأbATU4>F+IT"-@u@T 3Rv^onJO`x*OK\_&ԉ ]i jPSb *aNrruK,RRVO.?4[o,)h ^9uc8,aﹰqT*g a IZp4!M-A)u\&e35.'ũg+Ҫ>  4ziXn_ +?~^ +׎gG5r;=Ù˟GGtz|3<29NYsXv[.MLK(vm)6M3 +uP*TSoK:?J"mNMXf^bYtnZt +\ԝc aչճ8b 5%S1.6RVU`JJO% YZ-%֡{kl% +J(t)N㊐ +N#jq_󍪂) +U$0xxsW-9xnTwG3#+t F\~>PF_.Cƺ }T˗GrF*@(5>X)ˉqpcQ +HƉ5X5hY֐IP)NS[|kZ 9xnTwG3#+t; !"#1$@23ABPaqv%6Qr?eF0Q>n656~X9gܫ`KUzjUDIު91-qD o>'¤pv[r[}KAR@LǤ8'`>оa'Ӵa2;Lo>ԦJrQ{sXaLLrKiECA%KbxӴu,+n{9:Hz S^,@Bqcq((z,ߤX[\y)G(sJ3DžVpӖq\=v[i~[뛡r_ -8muqҺ fL\E $Ţ|Jwg٬u-T\-?E5L/>Mº`{bYMrr3Cc̱< )WqH{ipZßpe?F&zM~ǓV3$Us?zr +CE4j/ֺh]$NӢc)+e @H&!} !Yq^nm˴Eq ~#H@Psź}b0Akp~R1J>WRHk>Ûjc@ X\+}SdWW˭:ҫ|,hQV#TfRboNc{QմEC]7uԵ_cϝ_zO:TZ1^ 4c u+DBm<,lm]VtJ3Y ŵvlٻtxHwй콪&!1!AQa q?!lAmB0W++F;O\j$2XP| )llHvۺ#_fjztTA ']6܊"-M8!; s]¹BiyLyoc>?4Ly{mVƿ?cMyli1OtL0\t炎"լ_h n2 [s$@8 F {{5t> 4 +/3FІ +\XC2[dMd( +yLyoc>?4Ly{mVƞ>ƛlcM9ZK<,v2>tEc]xb#4 :x78چ_NRdIcR e3a9TDHD,vo +aec{GFƛmձϱ<4ƘckZ7?"${UE+y5&_]Pƈ=4| G4ЉT\gN;*Ŭ[@?4cm44gƘm\]S.9ϛ•.8x?h;B*5pe=JˊWI/go&P"60^E8 <h"dfܕ>7 g+=.Rb A=J)=0N!=hm-!2EH +)ii弦<=6ocOcMyli1 F"@B!L(BA(j PU@!P&! NQc@(*aD( +J'Xb BP0D"  H% lL' +D" +$)!1AQq 0a@?`sK4C9#r`ji^̳ h I8G"C!%Y<@Nh CJ.Aj(O)@4dG;&(j@4"?ف5E 5Ee쳸2y߇kfO<|9< ]=lHJN)"a)RH%")[*:ʗ)lEl +j(U5p hCSF@Qz$BFLXk~_ +0( 1+V +@ )2 HDBXL,YtaeVII $XèJ9("aa°i) FVlR(B u:a +:*(> MzvdÓۓy/[X&!1Aq Qa?h/@?"eUS e%@V۷;2n%\vGL7~vx2ltԆeWAs5 -D՜*AtJbVifFsNPlS(3, 0L=1!.W$p&LĸKEQSa5J6 P#hV0e~/z~Zo_nvxͻsnWrx^mۍ^ɕ9oӕ=cMkpg_9&yIVyD9_?@ ].w jk&KAd$"*3D.XI1v> w* I +5huЯZ72{^\Zoӝ+M| ^m۝^ynwv{'ݸ?e\Zoӝ9X^6;V۷;2n6O ͻqX޹2ߧ;MrGlvx+ͻr +I1%5FJS> +)6j8k LTL+YpJLM@V$d$ $A`S`5jA"M)Ip"}.t*JC2@¯c]bs%BȶHCADVK. +  ȊP#7#R+A&TKbt5IPE `2 + + +@~>vc_׼^m۝ݹ^yn4{{&ViNV;I'S)Bڍ"cnp)X|6hp@%İzr)U*:ؠXIjO}{7HDύM֊Z?eLǭբgƦeAëM֊[Aëëë};򡗷u3g3wvwM˺[I˺[I˺V4B/#=^fME !1:̡6NUi VkR7zch_\%590}-lT!9NH> JqʼKnZ&|jn^nTz?57[*f=m>57[*ZnTz^^[ߕ :zN]N]ߕ7[/'.f=m'.f=m'.YڠzU]KXTy~hjD\!cY̔`TȽAw,35S;}iDtI] +dR+Y6u3Suuc֏S1i?>57[*ZnTz^^[ߕ :zN]N]ߕ7[/'.f=m'.f=m'.[+WWڊEek?m{0_7b* C;2~wP`kR&Vq, y * /* 9P`G}/'@&.CtWḘ 줛&eEOZ?eLǭeբgƦeAëM֊[Aëëë};򡗷u3Z[I˻˻};eLǭLǭAëǭc̹w\V{p;Ii`>Pδ]~𢂩D ++➔N#˭⋆Dպz(aaY #tnx 2\7H:z"R`N:1*vZ1 +pYN}ES4aN'fsucu}&|jnT:h:::ӿ*{y9wS1ouӿ*n^N]zN]zN]: \ Pas de fin de ligne à la fin du fichier 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 --- 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 +++ 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 @@ -1,5 +0,0 @@ - - //This swap the class of the selected item. (navigation2 to be done) -// function swapClass() { -// function swapClasses() { - // End script hiding --> 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 --- 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 +++ 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 @@ -0,0 +1,80 @@ +% layout 'default', title => "Sme server 2 - backup", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $bac_datas +

    + % } + +

    <%= $title%>

    + +

    + %=l 'bac_ENABLE_DISABLE_TAPE' +


    + + %= $c->render_to_string(inline => (l 'bac_TAPE_CONFIG_DESC')) + + %= form_for '/backupd' => (method => 'POST') => begin + +

    + + %=l 'bac_ENABLE_TAPE_BACKUP' + + % if ( $bac_datas->{status} eq 'checked' ) { + + %} else { + %= check_box 'Tapebackup' + %} + +

    + + +

    + + %=l 'bac_TAPE_BACKUP_TIME' + + % param 'BackupHour' => $bac_datas->{backupHour} unless param 'BackupHour'; + %= text_field 'BackupHour', size => '2' + % param 'BackupMin' => $bac_datas->{backupMin} unless param 'BackupMin'; + %= text_field 'BackupMin', size => '2' + + + %=l 'AM/PM:' + + % param 'BackupAMPM' => $bac_datas->{backupAMPM} unless param 'BackupAMPM'; + %= select_field 'BackupAMPM' => ['AM', 'PM'], class => 'input' + +

    + +

    + + %=l 'bac_LOAD_TAPE_REMINDER_TIME' + + % param 'ReminderHour' => $bac_datas->{reminderHour} unless param 'ReminderHour'; + %= text_field 'ReminderHour', size => '2' + % param 'ReminderMin' => $bac_datas->{reminderMin} unless param 'ReminderMin'; + %= text_field 'ReminderMin', size => '2' + + + %=l 'AM/PM:' + + % param 'ReminderAMPM' => $bac_datas->{reminderAMPM} unless param 'ReminderAMPM'; + %= select_field 'ReminderAMPM' => ['AM', 'PM'], class => 'input' + +

    + +
    + + %= hidden_field 'Function' => $bac_datas->{'function'} + + %= submit_button $c->l('bac_UPDATE_CONF'), class => 'action' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -0,0 +1,33 @@ +% layout 'default', title => "Sme server 2 - backup", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $bac_datas +

    + % } + +

    <%= $title%>

    + + %= form_for '/backupd' => (method => 'POST') => begin + +

    + %=l 'bac_RESTORE_CONF_FROM_TAPE' +

    + + %= $c->render_to_string(inline => (l 'bac_RESTORE_CONF_FROM_TAPE_DESC')) + +
    + + %= hidden_field 'Function' => $bac_datas->{'function'} + + %= submit_button $c->l('bac_RESTORE_FROM_TAPE'), class => 'action' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -0,0 +1,69 @@ +% layout 'default', title => "Sme server 2 - backup"; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $bac_datas +

    + % } + +

    <%= $title%>

    + +
    Still incomplete click here for previous version --> + (Previous Backup version) +
    + + <%= $c->render_to_string(inline => (l 'bac_BACKUP_DESC_DAR', $bac_datas->{module}, + $bac_datas->{dumpsize}, $bac_datas->{tarsize})) %> + + %= form_for '/backup' => (method => 'POST') => begin + +

    + %=l 'bac_BACKUP_CONFIG_STATUS' +

    + +

    + %=l 'bac_TAPE_BACKUPS', + + %= $bac_datas->{'backupStatus'}.'.' + + % if ( $bac_datas->{'backupStatus'} eq 'enabled' ) { + %= $c->l('bac_BACKUPS_RUN_AT') + + %= $bac_datas->{'backupTime'} + + %= $c->l('bac_REMINDER_MESSAGE_AT') + + %= $bac_datas->{'reminderTime'} + + %} +

    + %=l 'bac_WORKSTN_BACKUPS', + + %= $bac_datas->{'backupwkStatus'}.'.' + + % if ( $bac_datas->{'backupwkStatus'} eq 'enabled' ) { + %= $c->l('bac_WKBACKUPS_RUN_AT') + + %= $bac_datas->{'backupwkTime'} + + %} + +

    + %=l 'bac_SELECT_AN_ACTION' + + % param 'Function' => $bac_datas->{function} unless param 'Function'; + %= select_field 'Function' => $c->get_function_options(), class => 'input' +

    + +
    + %= submit_button $c->l('PERFORM'), class => 'action' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -0,0 +1,47 @@ +% layout 'default', title => "Sme server 2 - backup", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $bac_datas +

    + % } + +

    <%= $title%>

    + + %= form_for '/backupd' => (method => 'POST') => begin + +

    + %=l 'bac_CONFIGURE_WORKSTN_BACKUP' +

    + + %= $c->render_to_string(inline => (l 'bac_WORKSTN_BACKUP_DESC')) + + %=l 'bac_WORKSTN_BACKUP_ENABLED' + + %= $bac_datas->{status} +
    + + %= $c->render_to_string(inline => $c->getWorkstnBackupConfig()) + +

    + %= l 'bac_WORKSTATION_BACKUP_SETCONF' +


    + + %=l 'bac_SELECT_VFS_TYPE' + + % param 'VFSType' => $bac_datas->{vfstype} unless param 'VFSType'; + %= select_field 'VFSType' => $c->get_VFSType_options(), class => 'input' +

    + + %= hidden_field 'Function' => $bac_datas->{'function'} + %= submit_button $c->l('NEXT'), class => 'action' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -0,0 +1,31 @@ +% layout 'default', title => "Sme server 2 - backup", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $bac_datas +

    + % } + +

    <%= $title%>

    + + %= form_for '/backupd' => (method => 'POST') => begin + +

    + %=l 'bac_RESTORE_CONF_FROM_WORKSTN' +

    + + %= $c->render_to_string(inline => (l 'bac_RESTORE_CONF_FROM_WORKSTN_DESC')) + +
    + %= hidden_field 'Function' => $bac_datas->{'function'} + %= submit_button $c->l('bac_RESTORE_FROM_WORKSTN'), class => 'action' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -0,0 +1,32 @@ +% layout 'default', title => "Sme server 2 - backup", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $bac_datas +

    + % } + +

    <%= $title%>

    + + %= form_for '/backupd' => (method => 'POST') => begin + +

    + %=l 'bac_WORKSTN_SELECTIVE_RESTORE' +

    + + + %= $c->render_to_string(inline => (l 'bac_XXX_DESC')) + +
    + %= hidden_field 'Function' => $bac_datas->{'function'} + %= submit_button $c->l('bac_RESTORE_FROM_WORKSTN'), class => 'action' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -0,0 +1,31 @@ +% layout 'default', title => "Sme server 2 - backup", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $bac_datas +

    + % } + +

    <%= $title%>

    + + %= form_for '/backupd' => (method => 'POST') => begin + +

    + %=l 'bac_VERIFY_WORKSTN_BACKUP_FILE' +

    + + %= $c->render_to_string(inline => (l 'bac_CONFIGURATION_TO_BE_DONE')) + +
    + %= hidden_field 'Function' => $bac_datas->{'function'} + %= submit_button $c->l('bac_VERIFY'), class => 'action' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -0,0 +1 @@ + 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 --- 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 +++ 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 @@ -0,0 +1,57 @@ +% layout 'default', title => "Sme server 2 - emailaccess", share_dir => './'; + +% content_for 'module' => begin +
    + + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $mai_datas +

    + % } + +

    <%= $title%>

    + + % if ( $notif ) { +
    + %= $notif +
    + %} + + %= form_for 'emailsettingd' => (method => 'POST') => begin + + %=l 'mai_DESC_POP_ACCESS_CONTROL' + +

    + %=l 'mai_LABEL_POP_ACCESS_CONTROL' + + % param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess'; + %= select_field 'POPAccess' => $c->get_pop_opt(), class => 'input' +

    + + %=l 'mai_DESC_IMAP_ACCESS_CONTROL' + +

    + %=l 'mai_LABEL_IMAP_ACCESS_CONTROL' + + % param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess'; + %= select_field 'IMAPAccess' => $c->get_imap_opt(), class => 'input' +

    + + %=l 'mai_DESC_WEBMAIL' + +

    + %=l 'mai_LABEL_WEBMAIL' + + % param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail'; + %= select_field 'WebMail' => $c->get_webmail_opt(), class => 'input' +

    + + % my $btn = l('SAVE'); + %= submit_button "$btn", class => 'action' + + %= hidden_field 'trt' => 'ACC' + % end + +
    +%end 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 --- 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 +++ 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 @@ -0,0 +1,92 @@ +% layout 'default', title => "Sme server 2 - emaildeliver", share_dir => './'; + +% content_for 'module' => begin +
    + + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $mai_datas +

    + % } + +

    <%= $title%>

    + + % if ( $notif ) { +
    + %= $notif +
    + %} + + %= form_for 'emailsettingd' => (method => 'POST') => begin + +

    + %=l 'mai_TITLE_UNKNOWN' +

    + + %=l 'mai_DESC_UNKNOWN' + +

    + %=l 'mai_LABEL_UNKNOWN' + + % param 'EmailUnknownUser' => $mai_datas->{emailunknownuser} unless param 'EmailUnknownUser'; + %= select_field 'EmailUnknownUser' => $c->get_emailunknownuser_opt(), class => 'input' +

    + + +

    + %=l 'mai_TITLE_DELEGATE' +

    + + %=l 'mai_DESC_DELEGATE' + +

    + %=l 'mai_LABEL_DELEGATE' + + % param 'DelegateMailServer' => $mai_datas->{delegatemailserver} unless param 'DelegateMailServer'; + %= text_field 'DelegateMailServer', class => 'input' +

    + +
    +

    + %=l 'mai_TITLE_SMARTHOST' +

    + + %=l 'mai_DESC_SMARTHOST' + +

    + %=l 'mai_LABEL_SMARTHOST' + + % param 'SMTPSmartHost' => $mai_datas->{smtpsmarthost} unless param 'SMTPSmartHost'; + %= text_field 'SMTPSmartHost', class => 'input' +

    + +

    + %=l 'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS' + + % param 'SMTPAUTHPROXY_status' => $mai_datas->{smtpauthproxystatus} unless param 'SMTPAUTHPROXY_status'; + %= select_field 'SMTPAUTHPROXY_status' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input' +

    + +

    + %=l 'mai_LABEL_SMARTHOST_SMTPAUTH_USERID' + + % param 'SMTPAUTHPROXY_Userid' => $mai_datas->{smtpauthproxyuserid} unless param 'SMTPAUTHPROXY_Userid'; + %= text_field 'SMTPAUTHPROXY_Userid', class => 'input' +

    + +

    + %=l 'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD' + + % param 'SMTPAUTHPROXY_Passwd' => $mai_datas->{smtpauthproxypassword} unless param 'SMTPAUTHPROXY_Passwd'; + %= password_field 'SMTPAUTHPROXY_Passwd', class => 'input' +

    + + % my $btn = l('SAVE'); + %= submit_button "$btn", class => 'action' + + %= hidden_field 'trt' => 'DEL' + % end + +
    +%end 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 --- 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 +++ 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 @@ -0,0 +1,101 @@ +% layout 'default', title => "Sme server 2 - emailfilter", share_dir => './'; + +% content_for 'module' => begin +
    + + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $mai_datas +

    + % } + +

    <%= $title%>

    + + % if ( $notif ) { +
    + %= $notif +
    + %} + + %= form_for 'emailsettingd' => (method => 'POST') => begin + + %=l 'mai_DESC_VIRUS_SCAN' + +

    + %=l 'mai_LABEL_VIRUS_SCAN' + + % param 'VirusStatus' => $mai_datas->{virusstatus} unless param 'VirusStatus'; + %= select_field 'VirusStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' +

    + + %=l 'mai_DESC_SPAM_SCAN' + +

    + %=l 'mai_LABEL_SPAM_SCAN' + + % param 'SpamStatus' => $mai_datas->{spamstatus} unless param 'SpamStatus'; + %= select_field 'SpamStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' +

    + +

    + %=l 'mai_LABEL_SPAM_SENSITIVITY' + + % param 'SpamSensitivity' => $mai_datas->{spamsensitivity} unless param 'SpamSensitivity'; + %= select_field 'SpamSensitivity' => $c->get_spam_sensitivity_opt(), class => 'input' +

    + +

    + %=l 'mai_LABEL_SPAM_TAGLEVEL' + + % param 'SpamTagLevel' => $mai_datas->{spamtaglevel} unless param 'SpamTagLevel'; + %= select_field 'SpamTagLevel' => $c->get_spam_level_options(), class => 'input' +

    + +

    + %=l 'mai_LABEL_SPAM_REJECTLEVEL' + + % param 'SpamRejectLevel' => $mai_datas->{spamrejectlevel} unless param 'SpamRejectLevel'; + %= select_field 'SpamRejectLevel' => $c->get_spam_level_options(), class => 'input' +

    + +

    + %=l 'mai_LABEL_SORTSPAM' + + % param 'SpamSortSpam' => $mai_datas->{spamsortspam} unless param 'SpamSortSpam'; + %= select_field 'SpamSortSpam' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' +

    + + %=l 'mai_DESC_SPAM_SUBJECT' + +

    + %=l 'mai_LABEL_SPAM_SUBJECTTAG' + + % param 'SpamSubjectTag' => $mai_datas->{spamsubjecttag} unless param 'SpamSubjectTag'; + %= select_field 'SpamSubjectTag' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' +

    + +

    + %=l 'mai_LABEL_SPAM_SUBJECT' + + % param 'SpamSubject' => $mai_datas->{spamsubject} unless param 'SpamSubject'; + %= text_field 'SpamSubject' => class => 'input' +

    + + %=l 'mai_DESC_BLOCK_EXECUTABLE_CONTENT' + +

    + %=l 'mai_LABEL_CONTENT_TO_BLOCK' + + % param 'BlockExecutableContent' => $c->get_patterns_current_opt() unless param 'BlockExecutableContent'; + %= select_field 'BlockExecutableContent' => $c->get_patterns_opt(), class => 'input', multiple => "1" +

    + + % my $btn = l('SAVE'); + %= submit_button "$btn", class => 'action' + + %= hidden_field 'trt' => 'FIL' + % end + +
    +%end 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 --- 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 +++ 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 @@ -0,0 +1,113 @@ +% layout 'default', title => "Sme server 2 - emailreceive", share_dir => './'; + +% content_for 'module' => begin +
    + + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $mai_datas +

    + % } + +

    <%= $title%>

    + + % if ( $notif ) { +
    + %= $notif +
    + %} + + %= form_for 'emailsettingd' => (method => 'POST') => begin + + %=l 'mai_DESC_MODE' + +

    + %=l 'mai_LABEL_MODE' + + % param 'FetchmailMethod' => $mai_datas->{fetchmailmethod} unless param 'FetchmailMethod'; + %= select_field 'FetchmailMethod' => $c->get_retrieval_opt(), class => 'input' +

    + + %=l 'mai_DESC_SMTP_AUTH_CONTROL' + +

    + %=l 'mai_LABEL_SMTP_AUTH_CONTROL' + + % param 'SMTPAuth' => $c->get_current_smtp_auth() unless param 'SMTPAuth'; + %= select_field 'SMTPAuth' => $c->get_smtp_auth_opt(), class => 'input' +

    + +
    +

    + %=l 'mai_TITLE_SECONDARY' +

    + + %=l 'mai_DESC_SECONDARY' + +

    + %=l 'mai_LABEL_SECONDARY' + + % param 'SecondaryMailServer' => $mai_datas->{secondarymailserver} unless param 'SecondaryMailServer'; + %= text_field 'SecondaryMailServer', class => 'input' +

    + + %=l 'mai_DESC_FETCH_PERIOD' + +

    + %=l 'mai_LABEL_FETCH_PERIOD' + + % param 'FreqOffice' => $mai_datas->{freqoffice} unless param 'FreqOffice'; + %= select_field 'FreqOffice' => $c->fetchmail_freq(), class => 'input' +

    + +

    + %=l 'mai_LABEL_FETCH_PERIOD_NIGHTS' + + % param 'FreqOutside' => $mai_datas->{freqoutside} unless param 'FreqOutside'; + %= select_field 'FreqOutside' => $c->fetchmail_freq(), class => 'input' +

    + +

    + %=l 'mai_LABEL_FETCH_PERIOD_WEEKENDS' + + % param 'FreqWeekend' => $mai_datas->{freqweekend} unless param 'FreqWeekend'; + %= select_field 'FreqWeekend' => $c->fetchmail_freq(), class => 'input' +

    + +

    + %=l 'mai_LABEL_POP_ACCOUNT' + + % param 'SecondaryMailAccount' => $mai_datas->{secondarymailaccount} unless param 'SecondaryMailAccount'; + %= text_field 'SecondaryMailAccount', class => 'input' +

    + +

    + %=l 'mai_LABEL_POP_PASS' + + % param 'SecondaryMailPassword' => $mai_datas->{secondarymailpassword} unless param 'SecondaryMailPassword'; + %= password_field 'SecondaryMailPassword', class => 'input' +

    + +

    + %=l 'mai_LABEL_SORT_METHOD' + + % param 'SpecifyHeader' => $mai_datas->{specifyheader} unless param 'SpecifyHeader'; + %= select_field 'SpecifyHeader' => [[(l 'mai_DEFAULT') => 'off'], [(l 'mai_SPECIFY_BELOW') => 'on']], class => 'input' +

    + +

    + %=l 'mai_LABEL_SORT_HEADER' + + % param 'SecondaryMailEnvelope' => $mai_datas->{secondarymailenvelope} unless param 'SecondaryMailEnvelope'; + %= text_field 'SecondaryMailEnvelope', class => 'input' +

    + + % my $btn = l('SAVE'); + %= submit_button "$btn", class => 'action' + + %= hidden_field 'trt' => 'REC' + % end + +
    +%end 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 --- 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 +++ 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 @@ -0,0 +1,122 @@ +% layout 'default', title => "Sme server 2 - emailsettings", share_dir => './'; + +% content_for 'module' => begin +
    + + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $mai_datas +

    + % } + +

    <%= $title%>

    + + % if ( $notif ) { +
    + %= $notif +
    + %} + + %= form_for 'emailsettingd' => (method => 'GET') => begin +

    + %=l 'mai_LABEL_POP_ACCESS_CONTROL' + + %= $c->get_current_pop3_access( 1 ) +

    + +

    + %=l 'mai_LABEL_IMAP_ACCESS_CONTROL' + + %= $c->get_current_imap_access( 1 ) +

    + +

    + %=l 'mai_LABEL_WEBMAIL' + + %= $c->get_current_webmail_status( 1 ) +

    + + % my $btn = l('mai_DESC_STATE_ACCESS_BUTTON'); + %= submit_button "$btn", class => 'action' + + %= hidden_field 'trt' => 'ACC' + % end + +
    + + %= form_for 'emailsettingd' => (method => 'GET') => begin +

    + %=l 'mai_LABEL_VIRUS_SCAN' + + %= $c->get_virus_status(1) +

    + +

    + %=l 'mai_LABEL_SPAM_SCAN' + + %= $c->get_spam_status(1) +

    + +

    + %=l 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT' + + %= $c->get_patterns_status(1) +

    + + % my $btn = l('mai_DESC_STATE_FILTERING_BUTTON'); + %= submit_button "$btn", class => 'action' + + %= hidden_field 'trt' => 'FIL' + % end + +
    + + %= form_for 'emailsettingd' => (method => 'GET') => begin +

    + %=l 'mai_LABEL_MODE' + + %= $mai_datas->{fetchmailmethod} +

    + +

    + %=l 'mai_LABEL_SMTP_AUTH_CONTROL' + + %= $c->get_current_smtp_auth( 1 ) +

    + + % my $btn = l('mai_DESC_STATE_RECEPTION_BUTTON'); + %= submit_button "$btn", class => 'action' + + %= hidden_field 'trt' => 'REC' + % end + +
    + + %= form_for 'emailsettingd' => (method => 'GET') => begin +

    + %=l 'mai_LABEL_UNKNOWN' + + %= $c->get_emailunknownuser_status( 1 ) +

    + +

    + %=l 'mai_LABEL_DELEGATE' + + %= $c->get_value('DelegateMailServer') +

    + +

    + %=l 'mai_LABEL_SMARTHOST' + + %= $c->get_value('SMTPSmartHost') +

    + + % my $btn = l('mai_DESC_STATE_DELIVERY_BUTTON'); + %= submit_button "$btn", class => 'action' + + %= hidden_field 'trt' => 'DEL' + % end + +
    +%end 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 --- 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 +++ 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 @@ -12,7 +12,14 @@

    <%= $title%>

    - %= $modul + % if ( $notif ) { +
    +
    + %= $notif +
    + %} + + % if ($grp_datas->{trt} eq 'ADD') { %= include 'partials/_grp_add' 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 --- 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 +++ 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 @@ -2,26 +2,27 @@ PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> - + <%= $title %> %= stylesheet 'css/sme_core.css' %= stylesheet 'css/sme_main.css' - + %= stylesheet 'css/sme_menu.css' %= stylesheet 'css/styles.css' - %= include 'partials/_head' + %= include 'partials/_js_imports' % if ( not defined $c->session->{lang} ) { % SrvMngr::init_session_cgi ( $c ); -
    INIT_SESSION_CGI
    % } %= include 'partials/_info' @@ -31,10 +32,25 @@ %= include 'partials/_navig2'
    + + % if (flash 'success') { +
    + %= $c->render_to_string(inline => flash 'success') +
    + % } + + % if ( flash 'error' ) { +
    + %= $c->render_to_string(inline => flash 'error') +
    + %} %= content 'module' %= include 'partials/_footer'
    + %= include 'common_js' + %= content 'js_swapClass' + 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 --- 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 +++ 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 @@ -37,6 +37,7 @@ %= check_box 'groupMembers' => 'admin' Administrator (admin)
    + % my $users = $c->gen_users_list(); % foreach my $key ( sort keys %$users ) % { %= check_box 'groupMembers' => $key 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 --- 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 +++ 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 @@ -57,7 +57,7 @@

    %= hidden_field 'trt' => $grp_datas->{trt} - %= hidden_field 'group' => $grp_datas->{group} + %= hidden_field 'groupName' => $grp_datas->{group} % end 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 --- 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 +++ 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 @@ -38,16 +38,17 @@ % if ( $members->{'admin'} ) { %= check_box 'groupMembers', value => 'admin', checked => undef %} else { - %= check_box 'groupMembers[]' => 'admin' + %= check_box 'groupMembers' => 'admin' %} Administrator (admin)
    + % my $users = $c->gen_users_list(); % foreach my $key ( sort keys %$users ) % { % if ( $members->{ $key } ) { - + %} else { %= check_box 'groupMembers' => $key %} 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 --- 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 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_header.html.ep 2020-04-12 11:13:00.528000000 +0400 @@ -3,7 +3,8 @@
    SME Server
    - 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 --- 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 +++ 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 @@ -1 +0,0 @@ - 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 --- 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 +++ 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 @@ -0,0 +1,34 @@ + +% content_for 'js_swapClass' => begin + %= javascript begin + (function($) { + $.fn.swapClass = function(class1, class2) { + this.each(function() { + var $elem = $(this); + if ($elem.hasClass(class1)) { + $elem.removeClass(class1).addClass(class2); + } + else if ($elem.hasClass(class2)) { + $elem.removeClass(class2).addClass(class1); + } + }); + }; + })(jQuery); + + $(document).ready(function() { + $('a.item-current').swapClass('item-current','item'); + + var pathname = $(location).attr('pathname'); + + //alert('jQuery loaded. Path searched: ' + pathname); + + var menus = $('a.item'); + $.each(menus, function() { + if ( $(this).attr('href') == pathname ) { + $(this).swapClass('item', 'item-current'); + // alert('menu found! ' + $(this).attr('href') + ' ' + $(this).attr('class')); + } + }) + }); + % end +% end 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 --- 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 +++ 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 @@ -42,7 +42,7 @@ %=l "ln_ADD_TITLE"

    - %=l "ln_ADD_DESC" + %= $c->render_to_string(inline => l('ln_ADD_DESC'));


    %=l "NETWORK" 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 --- 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 +++ 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 @@ -2,24 +2,19 @@ % my %nav = %{SrvMngr->getNavigation( $c->languages() )};
    % $cc++; % } 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 --- 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 +++ 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 @@ -1,39 +0,0 @@ - - \ Pas de fin de ligne à la fin du fichier 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 --- 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 +++ 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 @@ -21,7 +21,7 @@ %if ($ret{ret} eq "") { - %=l "pf_FIRST_PAGE_DESCRIPTION" + %= $c->render_to_string(inline => l('pf_FIRST_PAGE_DESCRIPTION')); %} elsif (index($ret{ret},"SUCCESS") != -1) {

    Operation Status Report

    @@ -34,14 +34,16 @@
    %}

    - %= submit_button "$btn", class => 'action' + %= submit_button "$btn", class => 'action2'
    % if ($empty){
    - %=l 'pf_NO_FORWARDS' + %=l 'pf_NO_FORWARDS' % } else {
    + %=l 'pf_SHOW_FORWARDS' +
    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 --- 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 +++ 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 @@ -1,55 +0,0 @@ -
    - - <% my $btn = l('SAVE'); %> - %= form_for 'wbl2' => (method => 'POST') => begin - - %= hidden_field 'trt' => $wbl_datas->{trt} - - %=l 'wbl_BLACK_TITLE' - -

    - %=l 'wbl_BADHELO_DESCRIPTION' -

    - - %=l 'wbl_BADHELO_LABEL' - - %= text_area 'badhelo' => (cols => 40) => begin - % for (@{ stash('badhelo') }) { - %= $_ - %} - %end - -

    -
    -

    - %=l 'wbl_BADMAILFROM_DESCRIPTION' -

    - - %=l 'wbl_BADMAILFROM_LABEL' - - %= text_area 'badmailfrom' => (cols => 40) => begin - % for (@{ stash('badmailfrom') }) { - %= $_ - % } - %end - -

    -
    -

    - %=l 'wbl_BLACKLISTFROM_DESCRIPTION' -

    - - %=l 'wbl_BLACKLISTFROM_LABEL' - - %= text_area 'blacklistfrom' => (cols => 40) => begin - % for (@{ stash('blacklistfrom') }) { - %= $_ - % } - %end - -

    -
    - %= submit_button "$btn", class => 'action' - %end - -
    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 --- 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 +++ 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 @@ -1,29 +0,0 @@ -
    - - <% my $btn = l('NEXT'); %> - %= form_for 'wbl' => (method => 'POST') => begin -

    - - %=l 'wbl_RBL_LIST_DESCRIPTION' - -
    - - - %=l 'wbl_BLACK_LIST_DESCRIPTION' - - % param 'list' => $wbl_datas->{list} unless param 'list'; - %= select_field 'list' => [ @{ stash('list') }], class => 'input' - -
    - - - %=l 'wbl_WHITE_LIST_DESCRIPTION' - -

    - -

    -
    - %= submit_button "$btn", class => 'action' -

    - %end -
    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 --- 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 +++ 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 @@ -1,61 +0,0 @@ -
    - - <% my $btn = l('SAVE'); %> - %= form_for 'wbl2' => (method => 'POST') => begin - - %= hidden_field 'trt' => $wbl_datas->{trt} - -

    - %=l 'wbl_DNSBL_DESCRIPTION' -
    - - %=l 'wbl_DNSBL_LABEL' - - % param 'dnsbl' => $wbl_datas->{dnsbl} unless param 'dnsbl'; - %= select_field 'dnsbl' => [[ (l 'ENABLED') => 'enabled'], [ (l 'DISABLED') => 'disabled']], class => 'input' - -

    - -

    - %=l 'wbl_RBLLIST_DESCRIPTION' -

    - - %=l 'wbl_RBLLIST_LABEL' - - %= text_area 'rbllist' => (cols => 40) => begin - % for (@{ stash('rbllist') }) { - %= $_ - %} - %end - -

    -
    -

    - %=l 'wbl_RHSBL_DESCRIPTION' -
    - - %=l 'wbl_RHSBL_LABEL' - - % param 'rhsbl' => $wbl_datas->{rhsbl} unless param 'rhsbl'; - %= select_field 'rhsbl' => [[ (l 'ENABLED') => 'enabled'], [ (l 'DISABLED') => 'disabled']], class => 'input' - -

    - -

    - %=l 'wbl_SBLLIST_DESCRIPTION' -

    - - %=l 'wbl_SBLLIST_LABEL' - - %= text_area 'sbllist' => (cols => 40) => begin - % for (@{ stash('sbllist') }) { - %= $_ - % } - %end - -

    -
    - %= submit_button "$btn", class => 'action' - %end - -
    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 --- 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 +++ 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 @@ -1,69 +0,0 @@ -
    - - <% my $btn = l('SAVE'); %> - %= form_for 'wbl2' => (method => 'POST') => begin - - %= hidden_field 'trt' => $wbl_datas->{trt} - - %=l 'wbl_WHITE_TITLE' - -

    - %=l 'wbl_WHITELISTHOSTS_DESCRIPTION' -

    - - %=l 'wbl_WHITELISTHOSTS_LABEL' - - %= text_area 'whitelisthosts' => (cols => 40) => begin - % for (@{ stash('whitelisthosts') }) { - %= $_ - %} - %end - -

    -
    -

    - %=l 'wbl_WHITELISTHELO_DESCRIPTION' -

    - - %=l 'wbl_WHITELISTHELO_LABEL' - - %= text_area 'whitelisthelo' => (cols => 40) => begin - % for (@{ stash('whitelisthelo') }) { - %= $_ - % } - %end - -

    -
    -

    - %=l 'wbl_WHITELISTSENDERS_DESCRIPTION' -

    - - %=l 'wbl_WHITELISTSENDERS_LABEL' - - %= text_area 'whitelistsenders' => (cols => 40) => begin - % for (@{ stash('whitelistsenders') }) { - %= $_ - % } - %end - -

    -
    -

    - %=l 'wbl_WHITELISTFROM_DESCRIPTION' -

    - - %=l 'wbl_WHITELISTFROM_LABEL' - - %= text_area 'whitelistfrom' => (cols => 40) => begin - % for (@{ stash('whitelistfrom') }) { - %= $_ - % } - %end - -

    -
    - %= submit_button "$btn", class => 'action' - %end - -
    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 --- 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 +++ 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 @@ -14,9 +14,9 @@ % if ( $notif ) {
    - +
    %= $notif - +
    %} 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 --- 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 +++ 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 @@ -40,7 +40,7 @@ %=l 'rvw_ADDITIONAL_LOCAL_NETWORKS' - %= $rvw_datas->{addlocalnetworks} + %= $c->render_to_string( inline => $rvw_datas->{addlocalnetworks} );
    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 --- 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 +++ 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 @@ -0,0 +1,88 @@ +% layout 'default', title => "Sme server 2 - yum_config", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $yum_datas +

    + % } + +

    <%= $title%>

    + + % if ( $notif ) { +
    + %= $notif +
    + %} + + %= form_for 'yumd' => (method => 'POST') => begin + +

    + %=l 'yum_LABEL_YUM_STATUS' + + % param 'yum_check4updates' => $c->get_status('check4updates') unless param 'yum_check4updates'; + %= select_field 'yum_check4updates' => $c->get_check_freq_opt() +

    + +
    + %=l 'yum_DESC_YUM_PACKAGEFUNCTIONS' + +

    + %=l 'yum_LABEL_YUM_PACKAGEFUNCTIONS' + + % param 'yum_PackageFunctions' => $c->get_status('PackageFunctions') unless param 'yum_PackageFunctions'; + %= select_field 'yum_PackageFunctions' => [[ $c->l('DISABLED') => 'disabled'], [ $c->l('ENABLED') => 'enabled']] +

    + +
    + %=l 'yum_DESC_ENABLED_REPOSITORIES' + +

    + %=l 'yum_LABEL_ENABLED_REPOSITORIES' + + % param 'SelectedRepositories' => $c->get_repository_current_options() unless param 'SelectedRepositories'; + %= select_field 'SelectedRepositories' => $c->get_repository_options2(), class => 'input', multiple => '1' +

    + +
    + %=l 'yum_DESC_YUM_DELTARPMPROCESS' + +

    + %=l 'yum_LABEL_YUM_DELTARPMPROCESS' + + % param 'yum_DeltaRpmProcess' => $c->get_status('DeltaRpmProcess') unless param 'yum_DeltaRpmProcess'; + %= select_field 'yum_DeltaRpmProcess' => [[ $c->l('DISABLED') => 'disabled'], [ $c->l('ENABLED') => 'enabled']] +

    + +
    + %=l 'yum_DESC_YUM_DOWNLOADONLY' + +

    + %=l 'yum_LABEL_YUM_DOWNLOADONLY' + + % param 'yum_DownloadOnly' => $c->get_status('DownloadOnly') unless param 'yum_DownloadOnly'; + %= select_field 'yum_DownloadOnly' => [[ $c->l('DISABLED') => 'disabled'], [ $c->l('ENABLED') => 'enabled']] +

    + +
    + %=l 'yum_DESC_YUM_AUTOINSTALLUPDATES' + +

    + %=l 'yum_LABEL_YUM_AUTOINSTALLUPDATES' + + % param 'yum_AutoInstallUpdates' => $c->get_status('AutoInstallUpdates') unless param 'yum_AutoInstallUpdates'; + %= select_field 'yum_AutoInstallUpdates' => [[ $c->l('DISABLED') => 'disabled'], [ $c->l('ENABLED') => 'enabled']] +

    + + %= hidden_field 'trt' => 'CONF' +
    + %= submit_button $c->l('SAVE'), class => 'action' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -0,0 +1,105 @@ +% layout 'default', title => "Sme server 2 - yum", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $yum_datas +

    + % } + +

    <%= $title%>

    + + % if ( $notif ) { +
    + %= $notif + + %} + +
    Still incomplete click here for previous version --> + (Previous Yum version) +
    + + + % if ( $c->is_empty('updates') ) { +

    + %=l 'yum_TITLE_UPTODATE' +

    + %=l 'yum_DESC_UPTODATE' +

    + %} + + % if ( $c->non_empty('updates') ) { +

    + %=l 'yum_TITLE_UPDATES_AVAILABLE' +

    + %=l 'yum_DESC_UPDATES_AVAILABLE' +

    + + %= form_for 'yumu' => (method => 'GET') => begin + %= hidden_field 'trt' => 'UPDT' + %= submit_button $c->l('yum_BUTTON_INSTALL_UPDATES'), class => 'action2' + % end + %} + + % if ( $c->non_empty('available') ) { + %= form_for 'yumu' => (method => 'GET') => begin +
    + %= hidden_field 'trt' => 'INST' + %= submit_button $c->l('yum_BUTTON_INSTALL_AVAILABLE'), class => 'action2' + % end + %} + + % if ( $c->non_empty('installed') ) { + %= form_for 'yumu' => (method => 'GET') => begin +
    + %= hidden_field 'trt' => 'REMO' + %= submit_button $c->l('yum_BUTTON_REMOVE'), class => 'action2' + % end + %} + +


    + + %= form_for 'yum' => (method => 'POST') => begin + +

    + %=l 'yum_LABEL_YUM_STATUS' + + %= $c->get_status('status', 'localise') +

    + +

    + %=l 'yum_LABEL_YUM_PACKAGEFUNCTIONS' + + %= $c->get_status('PackageFunctions', 'localise') +

    + +

    + %=l 'yum_LABEL_YUM_DELTARPMPROCESS' + + %= $c->get_status('DeltaRpmProcess', 'localise') +

    + +

    + %=l 'yum_LABEL_YUM_DOWNLOADONLY' + + %= $c->get_status('DownloadOnly', 'localise') +

    + +

    + %=l 'yum_LABEL_YUM_AUTOINSTALLUPDATES' + + %= $c->get_status('AutoInstallUpdates', 'localise') +

    + + %= hidden_field 'trt' => 'CONF' +
    + %= submit_button $c->l('yum_BUTTON_CONFIGURATION'), class => 'action2' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -0,0 +1,56 @@ +% layout 'default', title => "Sme server 2 - yum_install", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $yum_datas +

    + % } + +

    <%= $title%>

    + + % if ( $notif ) { +
    + %= $notif +
    + %} +
    + + %= form_for 'yumd' => (method => 'POST') => begin + + %=l 'yum_HEADER_AVAILABLE_SOFTWARE' +

    + % if ($c->non_empty('available','group')) { + %=l 'yum_DESC_AVAILABLE_GROUPS' +

    + %=l 'yum_LABEL_AVAILABLE_GROUPS' + + % param 'SelectedGroups' => $c->get_names2('updates','group') unless param 'SelectedGroups'; + %= select_field 'SelectedGroups' => $c->get_options2('available', 'group'), class => 'input', multiple => "1" +

    + %} +
    + % if ($c->non_empty('available','packages')) { + %=l 'yum_DESC_AVAILABLE_PACKAGES' +

    + %=l 'yum_LABEL_AVAILABLE_PACKAGES' + + % param 'SelectedPackages' => $c->get_names2('updates','package') unless param 'SelectedPackages'; + %= select_field 'SelectedPackages' => $c->get_options2('available', 'package'), class => 'input', multiple => "1" +

    + %} + + + + %= hidden_field 'trt' => 'INST' +

    + %= submit_button $c->l('yum_INSTALL_SOFTWARE'), class => 'action' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -0,0 +1,35 @@ +% layout 'default', title => "Sme server 2 - yum_logfile", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $yum_datas +

    + % } + +

    <%= $title%>

    + + % if ( $notif ) { +
    + %= $notif +
    + %} + + %= form_for 'yum' => (method => 'POST') => begin + +

    Please Wait - Yum Running (<%= $c->get_yum_status_page() %>)

    + + <%= $c->render_to_string(inline => $c->show_yum_log()) %> + + %= hidden_field 'trt' => 'LOGF' +
    + %= submit_button $c->l('NEXT'), class => 'action' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -0,0 +1,37 @@ +% layout 'default', title => "Sme server 2 - yum_update", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $yum_datas +

    + % } + +

    <%= $title%>

    + + % if ( $notif ) { +
    + %= $notif +
    + %} + + %= form_for 'yumd' => (method => 'POST') => begin + +

    + <%= $c->render_to_string(inline => $c->l('yum_HEADER_POSTUPGRADE_REQUIRED')) %> +


    + + <%= $c->render_to_string(inline => $c->show_yum_log()) %> + + %= hidden_field 'trt' => 'PSTU' +
    + %= submit_button $c->l('RECONFIGURE'), class => 'action' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -0,0 +1,56 @@ +% layout 'default', title => "Sme server 2 - yum_update", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $yum_datas +

    + % } + +

    <%= $title%>

    +
    + + % if ( $notif ) { +
    + %= $notif +
    + %} + + %= form_for 'yumd' => (method => 'POST') => begin + + %=l 'yum_HEADER_INSTALLED_SOFTWARE' + +
    + % if ($c->non_empty('installed','group')) { + %=l 'yum_DESC_INSTALLED_GROUPS' +

    + %=l 'yum_LABEL_INSTALLED_GROUPS' + + %= select_field 'SelectedGroups' => $c->get_options2('installed', 'group'), class => 'input', multiple => "1" +

    + %} +
    + % if ($c->non_empty('installed','packages')) { + %=l 'yum_DESC_INSTALLED_PACKAGES' +

    + %=l 'yum_LABEL_INSTALLED_PACKAGES' + + %= select_field 'SelectedPackages' => $c->get_options2('installed', 'package'), class => 'input', multiple => "1" +

    + %} + + + + %= hidden_field 'trt' => 'REMO' +
    + %= submit_button $c->l('REMOVE'), class => 'action' + + % end + +
    + +% end + 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 --- 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 +++ 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 @@ -0,0 +1,42 @@ +% layout 'default', title => "Sme server 2 - yum_update", share_dir => './'; + +% content_for 'module' => begin + +
    + % if ($config->{debug} == 1) { +

    + %= dumper $c->current_route + %= dumper $yum_datas +

    + % } + +

    <%= $title%>

    + + % if ( $notif ) { +
    + %= $notif +
    + %} + + %= form_for 'yumd' => (method => 'POST') => begin + + %=l 'yum_DESC_AVAILABLE_UPDATES' + +

    + %=l 'yum_LABEL_AVAILABLE_UPDATES' + + % param 'SelectedPackages' => $c->get_names2('updates','package') unless param 'SelectedPackages'; + %= select_field 'SelectedPackages' => $c->get_options2('updates', 'package'), class => 'input', multiple => "1" +

    + + + + %= hidden_field 'trt' => 'UPDT' +
    + %= submit_button $c->l('yum_INSTALL_UPDATES'), class => 'action' + + % end + +
    + +% end 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 --- 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 +++ 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 @@ -1,9 +0,0 @@ - - - - -Mojo under construction - -

    This web app is under construction

    (theme perso)

    - - 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 --- 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 +++ 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 @@ -1,170 +0,0 @@ -/* srvmngr - css de base */ -body{ - background-color: #FFF; -} - -#container{ - max-width: 100%; - position: relative; - margin: auto; -} - -#navigation{ - width: 190px; - position: absolute; - margin-left: 0px; - padding: 5px; - background-color: #E8F3E1; -/* height: 600px; */ - overflow: auto; -} - -#main{ - margin-left: 195px; - padding: 10px; -} - -label.field-with-error { - color: #dd7e5e -} - -input.field-with-error { - background-color: #fd9e7e -} - -#central{ - margin-left: 0px; - padding: 5px; -} - -#footer{ - margin-left: 0px; - padding: 5px; -} - -#header { - background: #bee6a2; -} - -#header h1, a:link, a:visited { - color: black; - text-decoration: none; -/* contribs.org styling */ -} - -.sme-error { - color: red; - background-color: #ffffff; - border-width: 1px; - border-style: solid; - border-color: red ; - padding: 2px; - margin-left: 20px; - margin-right: 20px; - margin-top:0px; - margin-bottom:0px; -} - -a.accent { - color: purple; -} - -#footer img { - float: right; - position: fixed; - margin-left: 40%; -} - -span.label { - font-weight: bold; - width: 20%; -} - -span.data { - padding: 2px; - font-weight: bold; - margin-left: 0%; - background-color: lightgreen; -} - -span.data2 { - padding: 2px; - font-weight: bold; - background-color: lightblue; -} - -input.action { - margin-left: 0px; - color: green; - background-color: lightgreen; -} -#modul.desc { - padding: 3px; - background-color: grey; -} - -/* #modul form .input */ - -[type = 'text'] { - margin-left: 0px; - background-color: lightblue; -} - -.a, .return { - color: #661866; - font-weight: bold; -} - -.section { - line-height: 20px; -} -.a, .item { - line-height: 15px; -} - -#module { -/* height: 600px; */ - overflow: auto; -} - - -#h2l1 { - height: 40px; - width: 100%; -} -#h2e11 { - width: 70%; - float: left; -} -#h2e12 { - background-color: #C0E7A6; - float: left; - text-align: right; -} - -#h2l2 { -/* background-color: #A8F9E7;*/ - border-top: solid white 3px; - border-bottom: solid white 2px; - height: 14px; - width: 100%; - padding: 1px; -} - -#h2e21 { - float: left; - width: 70%; -} - -#h2e22,#h2e23 { - float: left; - width: 10%; - text-align: center; -} - - - -/*#h2e23 { - float: right; - width: 15%; -}*/ 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 --- 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 +++ 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 @@ -1,40 +0,0 @@ - - - - - -<%= $title %> - - - - - - - %= include 'partials/_head' - - - -% if ( not defined $c->session->{lang} ) { -% SrvMngr::init_session_cgi ( $c ); -% } - - - %= include 'partials/_info' - -
    - -
    - %= content 'module' - %= include 'partials/_footer' -
    -
    - - - 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 --- 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 +++ 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 @@ -1,49 +0,0 @@ -
    -
    -

    Returned Values

    - First line is from returned from list: - <%= $listR %> -
    -
    -
    - -
    - Form starts here -
    - - - - - - - - -Blacklist helo -
    -%= text_area story => (cols => 40) => begin -% for (@{ stash('badhelo') }) { -%= $_ -% } -%end -
    - -Blacklist helo -
    -%= text_area story => (cols => 40) => begin -% for (@{ stash('badmailfrom') }) { -%= $_ -% } -%end -
    - - - - - -
    - -
    -
    - -
    -
    \ Pas de fin de ligne à la fin du fichier 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 --- 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 +++ 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 @@ -1,20 +0,0 @@ -
    - -
    - -%#Some Form Buttons -%#= button_to Test => 'http://home.reetspetit.net/' -%#= button_to Remove => './wbl.cgi' - -
    - -Test dropbown list -
    -<%= select_field 'list' => [ @{ stash('list') }], id=> 'dropdown' %> -
    -
    - - -
    -
    -
    \ Pas de fin de ligne à la fin du fichier 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 --- 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 +++ 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 @@ -1,395 +0,0 @@ - - - - - - - Server Manager - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    - - - - - - -
    - - - - -
    - -
    -

    - Server-Manager - Control panel -

    - -
    - - -
    - - - - <%= include $contentVar %> -
    - -
    - - - - - - - -
    - - -
    Stats Tab Content
    - - -
    -
    -

    General Settings

    - -
    - - -

    - Some information about this general settings option -

    -
    - -
    -
    - - - - - -
    - - - - - - - - - - - - - - - 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 --- 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 +++ 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 @@ -1,93 +0,0 @@ -
    -
    - -

    Returned Values

    - First line is from returned from list: - <%= $listR %> -
    -
    -
    -
    - Form starts here -
    -
    - -No idea how to set the radio button to the correct status. -We could use a dropdown Enabled/Disabled instead -
    -
    - -DNSBL -
    -% param dnsbl => 'disabled' unless $dnsbl eq 'enabled'; -<%= radio_button 'dnsbl' => 'enabled' %> Enabled -<%= radio_button 'dnsbl' => 'disabled' %> Disabled - -
    -
    - -RHSBL -
    -% param rhsbl => 'disabled' unless $dnsbl eq 'enabled'; -<%= radio_button 'rhsbl' => 'enabled' %> Enabled -<%= radio_button 'rhsbl' => 'disabled' %> Disabled - -
    -
    - -URI BL -
    -% param uribl => 'disabled' unless $dnsbl eq 'enabled'; -<%= radio_button 'uribl' => 'enabled' %> Enabled -<%= radio_button 'uribl' => 'disabled' %> Disabled - -
    -
    - -
    - - - - -RBL List -
    -%= text_area story => (cols => 40) => begin -% for (@{ stash('rbllist') }) { -%= $_ -% } -%end -
    - - - -SBL List -
    -%= text_area story => (cols => 40) => begin -% for (@{ stash('sbllist') }) { -%= $_ -% } -%end -
    - -URL List -
    -%= text_area story => (cols => 40) => begin -% for (@{ stash('ubllist') }) { -%= $_ -% } -%end -
    - - - -
    - - -
    - -
    -
    - -
    - -
    \ Pas de fin de ligne à la fin du fichier 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 --- 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 +++ 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 @@ -1,7 +0,0 @@ -
    -
    - -No data available - -
    -
    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 --- 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 +++ 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 @@ -1,39 +0,0 @@ -
    -
    -

    Returned Values

    - First line is from returned from list: - <%= $listR %> -
    -
    -
    -
    - -
    -
    - - Form starts here -
    - - - - - -% for my @user (@{ stash('userlist') }) { - % for my $key (@$user) { - - %} -% } - - - - - -
    - %= $key -
    - -
    -
    - -
    -
    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 --- 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 +++ 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 @@ -1,85 +0,0 @@ -
    -
    -

    Returned Values

    - First line is from returned from list: - <%= $listR %> -
    -
    -
    -
    - Form starts here -
    - -
    - - - - -Whitelist hosts -
    -%= text_area story => (cols => 40) => begin -% for (@{ stash('whitehosts') }) { -%= $_ -% } -%end -
    -
    - -Whitelist helo -
    -%= text_area story => (cols => 40) => begin -% for (@{ stash('whitehelo') }) { -%= $_ -% } -%end -
    -
    - -Whitelist senders -
    -%= text_area story => (cols => 40) => begin -% for (@{ stash('whitesenders') }) { -%= $_ -% } -%end -
    -
    - -Spamassasin from -
    -%= text_area story => (cols => 40) => begin -% for (@{ stash('whitefrom') }) { -%= $_ -% } -%end -
    -
    - - - - - - -
    - -
    -
    -Sample text areas -
    - -%= text_area 'story' -
    -%= text_area 'story', cols => 40 -
    -%= text_area story => 'Default\nDove', cols => 40 -
    -%= text_area story => (cols => 40) => begin - Default - Swan -% end -
    -
    - -
    - -
    \ Pas de fin de ligne à la fin du fichier 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 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/useraccounts 2020-04-08 23:43:08.000000000 +0400 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/useraccounts 1970-01-01 04:00:00.000000000 +0400 @@ -1,52 +0,0 @@ -#!/usr/bin/perl -# no -d allowed when running suid from the cgi-bin dir :-( -#-wT -# vim: ft=xml: - -#---------------------------------------------------------------------- -# heading : Configuration -# description : E-mail WBL -# navigation : 6000 6710 -#---------------------------------------------------------------------- - -use strict; -use warnings; -use Mojolicious::Lite; -use smeserver::Panel::useraccountsNew; - -#use esmith::wblNew; - -# We can use separate template in templates/somefile.html.ep -# plugin 'HTMLTemplateProRenderer'; - -# Load up our wbl subroutines -# my $f = esmith::wblNew->new(); - -# Initial setup when called -# get '/useraccounts' => sub { - -get '/' => sub { - - my ($mojo) = @_; - - my @useraccounts = get_user_accounts(); - - if ( scalar @useraccounts ) { - - $mojo->stash( userlist => \@useraccounts ); - - # This is the template fragment to be embedded in main - $mojo->stash( contentVar => '_useraccounts' ); - - } - - else { - $mojo->stash( contentVar => '_unavailable' ); - } - - $mojo->render( template => 'main' ); -}; - - -app->start; - 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 --- smeserver-manager-0.1.0.old/root/etc/e-smith/web/panels/manager2/cgi-bin/wbl 2020-04-08 23:43:08.000000000 +0400 +++ smeserver-manager-0.1.0/root/etc/e-smith/web/panels/manager2/cgi-bin/wbl 1970-01-01 04:00:00.000000000 +0400 @@ -1,165 +0,0 @@ -#!/usr/bin/perl -# no -d allowed when running suid from the cgi-bin dir :-( -#-wT -# vim: ft=xml: - -#---------------------------------------------------------------------- -# heading : Configuration -# description : E-mail WBL -# navigation : 6000 6710 -#---------------------------------------------------------------------- - -use strict; -use warnings; -use Mojolicious::Lite; -use smeserver::Panel::wblNew; - - -# We can use separate template in templates/somefile.html.ep -# plugin 'HTMLTemplateProRenderer'; - -# Load up our wbl subroutines -# my $f = esmith::wblNew->new(); - -# Initial setup when called -get '/' => sub { - - my ($mojo) = @_; - - # Setup our 3 - test - # $mojo->stash( RBL => 'RBL List', Black => 'Black List', White => 'White List' ); - - # Or use a dropdown list - my @wblList = ( 'RBL List', 'Black List', 'White List' ); - $mojo->stash( list => \@wblList ); - - # This is the template fragment to be embedded in main - $mojo->stash( contentVar => '_choice' ); - - # And now we render main - $mojo->render( template => 'main' ); - -}; - -#get 'test1' => sub { -#}; - -#get 'test2' => sub { -#}; - -# called via post -post '/' => sub { - - # push the returned array to the $mojo array - my $mojo = shift; - - my $button = $mojo->param('button'); - - # This is the name used in the select_files e.g. 'list' - my $list = $mojo->param('list'); - - # We should put the vars below into these SWITCH statements - # We can then check the call in the $list var. - # If it is a straightforward POST call we return a template - # If it is like wbl.cgi?get_dnsbl or wbl.cgi?get_rblSettings or similar - # we could return some JSON instead - # Just needs some logic to figure the call style and output relevant data - - # Hmm some of this comes back as a carriage return separated array - # For now removed the \n and join in the wbl.pm file - # eg joe@domain.com\nfred@domain.com - # - - SWITCH: { - - if ( $list =~ /^RBL List/ ) { - - # Set the template we require - # You could do some logic to either call a template to output the data, - # or alternatively answer a query with some JSON instead - $mojo->stash( contentVar => '_rbl' ); - - # Set the retrieved list name to display it for testing - $mojo->stash( listR => $list ); - - # For RBL List - # dnsbl - returns 'enabled/disabled - my $dnsbl = get_dnsbl(); - $mojo->stash( dnsbl => $dnsbl ); - - # rhsbl - returns 'enabled/disabled - my $rhsbl = get_rhsbl(); - $mojo->stash( rhsbl => $rhsbl ); - - # uribl - returns 'enabled/disabled - my $uribl = get_uribl(); - $mojo->stash( uribl => $uribl ); - - # For SBLList List - my @sbllist = get_sbllist(); - $mojo->stash( sbllist => \@sbllist ); - - # For RBLList List - my @rbllist = get_rbllist(); - $mojo->stash( rbllist => \@rbllist ); - - # For URLList List - my @ubllist = get_ubllist(); - $mojo->stash( ubllist => \@ubllist ); - - } - if ( $list =~ /^Black List/ ) { - - # Set the template we require - # You could do some logic to either call a template to output the data, - # or alternatively answer a query with some JSON instead - $mojo->stash( contentVar => '_black' ); - - # Set the retrieved list name to display it for testing - $mojo->stash( listR => $list ); - - # For Black List - my @badhelo = get_badhelo(); - $mojo->stash( badhelo => \@badhelo ); - - my @badmailfrom = get_badmailfrom(); - $mojo->stash( badmailfrom => \@badmailfrom ); - - } - if ( $list =~ /^White List/ ) { - - # Set the template we require - # You could do some logic to either call a template to output the data, - # or alternatively answer a query with some JSON instead - $mojo->stash( contentVar => '_white' ); - - # Set the retrieved list name to display it for testing - $mojo->stash( listR => $list ); - - # For WBL List - my @whitelistsenders = get_whitelistsenders(); - $mojo->stash( whitesenders => \@whitelistsenders ); - - my @whitelisthelo = get_whitelisthelo(); - $mojo->stash( whitehelo => \@whitelisthelo ); - - my @whitelisthosts = get_whitelisthosts(); - $mojo->stash( whitehosts => \@whitelisthosts ); - - my @whitelistfrom = get_whitelistfrom(); - $mojo->stash( whitefrom => \@whitelistfrom ); - - } - - # Fall through back to choice list - # Not sure how do do an 'else' though ! - # my @wblList = ( 'RBL List', 'Black List', 'White List' ); - # $mojo->stash( list => \@wblList ); - # $mojo->stash( contentVar => '_choice' ); - } - - $mojo->render( template => 'main' ); -}; - -app->start; -