/[smecontribs]/rpms/smeserver-ddclient/contribs10/smeserver-ddclient-1.2.1-add-server-manager2-panels.patch
ViewVC logotype

Annotation of /rpms/smeserver-ddclient/contribs10/smeserver-ddclient-1.2.1-add-server-manager2-panels.patch

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


Revision 1.1 - (hide annotations) (download)
Mon Jun 8 17:16:54 2020 UTC (4 years, 5 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-ddclient-1_3_0-1_el7_sme, smeserver-ddclient-1_3_0-4_el7_sme, smeserver-ddclient-1_3_0-9_el7_sme, smeserver-ddclient-1_3_0-13_el7_sme, smeserver-ddclient-1_3_0-34_el7_sme, smeserver-ddclient-1_3_0-20_el7_sme, smeserver-ddclient-1_3_0-5_el7_sme, smeserver-ddclient-1_3_0-8_el7_sme, smeserver-ddclient-1_3_0-18_el7_sme, smeserver-ddclient-1_3_0-22_el7_sme, smeserver-ddclient-1_3_0-21_el7_sme, smeserver-ddclient-1_3_0-26_el7_sme, smeserver-ddclient-1_3_0-23_el7_sme, smeserver-ddclient-1_3_0-29_el7_sme, smeserver-ddclient-1_3_0-16_el7_sme, smeserver-ddclient-1_3_0-28_el7_sme, smeserver-ddclient-1_3_0-25_el7_sme, smeserver-ddclient-1_3_0-17_el7_sme, smeserver-ddclient-1_3_0-3_el7_sme, smeserver-ddclient-1_3_0-14_el7_sme, smeserver-ddclient-1_3_0-7_el7_sme, smeserver-ddclient-1_3_0-24_el7_sme, smeserver-ddclient-1_3_0-27_el7_sme, smeserver-ddclient-1_3_0-19_el7_sme, smeserver-ddclient-1_3_0-10_el7_sme, smeserver-ddclient-1_3_0-6_el7_sme, smeserver-ddclient-1_3_0-31_el7_sme, smeserver-ddclient-1_3_0-32_el7_sme, smeserver-ddclient-1_2_1-16_el7_sme, smeserver-ddclient-1_2_1-17_el7_sme, smeserver-ddclient-1_3_0-30_el7_sme, smeserver-ddclient-1_3_0-15_el7_sme, smeserver-ddclient-1_3_0-33_el7_sme, smeserver-ddclient-1_3_0-11_el7_sme, smeserver-phpki-ng-0_3-6_el7_sme, smeserver-ddclient-1_3_0-12_el7_sme, HEAD
* Mon Jun 08 2020 Brian Read <brianr@bjsystems.co.uk> 1.2.1-16.sme
- Add Server Manager2 panels for SME10 [SME:10942 ]

1 brianr 1.1 diff -urN smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/dirs.txt smeserver-ddclient-1.2.1/root/etc/e-smith/web/dirs.txt
2     --- smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/dirs.txt 1970-01-01 01:00:00.000000000 +0100
3     +++ smeserver-ddclient-1.2.1/root/etc/e-smith/web/dirs.txt 2020-06-08 12:52:14.342548072 +0100
4     @@ -0,0 +1,4 @@
5     +mkdir -p ./manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller
6     +mkdir -p ./manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Modules/Ddclient
7     +mkdir -p ./manager2/cgi-bin/srvmngr/themes/default/templates
8     +mkdir -p ./manager2/cgi-bin/srvmngr/themes/default/templates/partials
9     diff -urN smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Ddclient.pm smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Ddclient.pm
10     --- smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Ddclient.pm 1970-01-01 01:00:00.000000000 +0100
11     +++ smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/Controller/Ddclient.pm 2020-06-08 08:44:00.000000000 +0100
12     @@ -0,0 +1,772 @@
13     +package SrvMngr::Controller::Ddclient;
14     +
15     +#----------------------------------------------------------------------
16     +# heading : Configuration
17     +# description : Dynamic Clients
18     +# navigation : 3000 3400
19     +#
20     +# name : ddclient, method : get, url : /ddclient, ctlact : Ddclient#main
21     +# name : ddclient3, method : post, url : /ddclient3, ctlact : Ddclient#do_updateparams
22     +# name : ddclient1, method : get, url : /ddclient1, ctlact : Ddclient#do_summary_domain
23     +# name : ddclient2, method : get, url : /ddclient2, ctlact : Ddclient#do_summary_custom
24     +# name : ddclient4, method : post, url : /ddclient4, ctlact : Ddclient#do_delete_domain
25     +# name : ddclient5, method : get, url : /ddclient5, ctlact : Ddclient#do_update_domain
26     +# name : ddclient6, method : get, url : /ddclient6, ctlact : Ddclient#do_create_custom
27     +# name : ddclient7, method : post, url : /ddclient7, ctlact : Ddclient#do_create_custom_actual
28     +# name : ddclient8, method : post, url : /ddclient8, ctlact : Ddclient#do_update_domain
29     +#
30     +# routes : end
31     +#----------------------------------------------------------------------
32     +
33     +use strict;
34     +use warnings;
35     +use Mojo::Base 'Mojolicious::Controller';
36     +
37     +use constant FALSE => 0;
38     +use constant TRUE => 1;
39     +
40     +use Locale::gettext;
41     +use SrvMngr::I18N;
42     +use SrvMngr qw(theme_list init_session_cgi);
43     +
44     +use Data::Dumper;
45     +use esmith::util;
46     +use esmith::HostsDB;
47     +use esmith::AccountsDB;
48     +
49     +our $db = esmith::ConfigDB->open();
50     +our $adb = esmith::AccountsDB->open();
51     +
52     +our $domaindb = esmith::ConfigDB->open('/home/e-smith/db/domains')
53     + or die "Unable to open domains db";
54     +our $edb;
55     +$edb = esmith::ConfigDB->open('/home/e-smith/db/ddclient')
56     + or $edb = esmith::ConfigDB->create('/home/e-smith/db/ddclient');
57     +
58     +my %ddc_datas = ();
59     +
60     +sub get_dns_labels {
61     + #
62     + # dns service names
63     + #
64     + my $c = shift;
65     + my $Labels = (
66     + [
67     + [ $c->l('ddc_CUSTOMDNS'), 'CUSTOMDNS' ],
68     + [ $c->l('ddc_DYNDNS1'), 'DYNDNS1' ],
69     + [ $c->l('ddc_DYNDNS2'), 'DYNDNS2' ],
70     + [ $c->l('ddc_DYNDNS3'), 'DYNDNS3' ],
71     + [ $c->l('ddc_ZONEDIT'), 'ZONEDIT' ],
72     + [ $c->l('ddc_EASYDNS'), 'EASYDNS' ],
73     + [ $c->l('ddc_HAMMER'), 'HAMMER' ],
74     + [ $c->l('ddc_DSLREPORTS'), 'DSLREPORTS' ],
75     + [ $c->l('ddc_EURODYNDNS'), 'EURODYNDNS' ],
76     + [ $c->l('ddc_DTDNS'), 'DTDNS' ],
77     + [ $c->l('ddc_LOOPIA'), 'LOOPIA' ],
78     + [ $c->l('ddc_DNSPARK'), 'DNSPARK' ],
79     + [ $c->l('ddc_DYNHOST'), 'DYNHOST' ],
80     + [ $c->l('ddc_NOIP'), 'NOIP' ],
81     + [ $c->l('ddc_CHANGEIP'), 'CHANGEIP' ],
82     + [ $c->l('ddc_NAMECHEAP'), 'NAMECHEAP' ],
83     + [ $c->l('ddc_SPDNS'), 'SPDNS' ]
84     + ]
85     + );
86     + return $Labels;
87     +}
88     +
89     +sub main {
90     + #
91     + # Initial page - full summary of parameters etc
92     + # Initial para from the Wiki.
93     + #
94     + my $c = shift;
95     + $ddc_datas{"first"} = 'ddc_DESCRIPTION';
96     + do_display( $c, %ddc_datas );
97     +}
98     +
99     +sub do_display {
100     + #
101     + # Front Summary page
102     + #
103     + my $c = shift;
104     + $c->app->log->info( $c->log_req );
105     +
106     + my $title = $c->l('ddc_FORM_TITLE');
107     + my $modul = '';
108     + $ddc_datas{trt} = 'LIST';
109     + my $trt = "LIST";
110     +
111     + $ddc_datas{"params"} = get_params($c);
112     + my @domains = get_domain_table($c);
113     + my @FreeDomains = get_custom_table($c);
114     +
115     + my $emptydom = ( scalar @domains == 0 );
116     + my $emptycust = ( scalar @FreeDomains == 0 );
117     +
118     + my $Labels = (
119     + [
120     + [ $c->l('ddc_SME external Interface'), "smeIF" ],
121     + [ $c->l('ddc_SME configuration DB'), "smeCMD" ],
122     + [ $c->l('ddc_web'), "web" ],
123     + [ $c->l('ddc_Interface'), "if" ],
124     + [ $c->l('ddc_IP'), "ip" ],
125     + [ $c->l('ddc_Command'), "cmd" ]
126     + ]
127     + );
128     +
129     + $c->stash(
130     + title => $title,
131     + modul => $modul,
132     + ddc_datas => \%ddc_datas,
133     + domains => \@domains,
134     + freedomains => \@FreeDomains,
135     + methodlabels => $Labels,
136     + emptydom => $emptydom,
137     + emptycust => $emptycust
138     + );
139     + $ddc_datas{'trt'} = $trt;
140     + $c->stash( title => $title, modul => $modul, ddc_datas => \%ddc_datas );
141     + $c->render( template => 'ddclient' );
142     +
143     +}
144     +
145     +sub do_updateparams {
146     + #
147     + # Called to update the parameters relating to the Ip address of the server
148     + #
149     + my $c = shift;
150     + $ddc_datas{"success"} = pushParams($c);
151     + do_display($c);
152     +}
153     +
154     +sub do_update_domain {
155     + #
156     + #Called to update/delete the ddclient for a specific inbuilt domain
157     + #
158     + my $c = shift;
159     + my $retmsg;
160     + if ( $c->param("Route") eq "ddclient2" ) { #Route is hidden field
161     + $retmsg = performModifyCustom($c);
162     + }
163     + else {
164     + $retmsg = performModifyDomain($c);
165     + }
166     + if ( $retmsg eq "ok" ) {
167     + my $dns = $c->param('dns');
168     + my $domain = $c->param('domainname');
169     + $ddc_datas{"success"} =
170     + $c->l( "ddc_SUCCESSFULLY_MODIFIED", $domain, $c->l( 'ddc_' . $dns ) );
171     + do_display( $c, %ddc_datas );
172     + }
173     + else {
174     + $ddc_datas{"error"} = $retmsg;
175     +
176     + #Back to input panel to correct error
177     + do_summary_domain($c);
178     + }
179     +}
180     +
181     +sub do_create_custom {
182     + #
183     + # Create custom domain
184     + #
185     + my $c = shift;
186     + my $title = $c->l("ddc_CREATE_TITLE");
187     + my $modul = '';
188     + my $trt = "NEW";
189     +
190     + $ddc_datas{trt} = $trt;
191     + $c->stash(
192     + title => $title,
193     + modul => $modul,
194     + ddc_datas => \%ddc_datas,
195     + dnslabels => get_dns_labels($c)
196     + );
197     + $c->render( template => 'ddclient' );
198     +}
199     +
200     +sub do_create_custom_actual {
201     + my $c = shift;
202     + my $retmsg = performCreateCustom($c);
203     + if ( $retmsg eq "ok" ) {
204     + my $dns = $c->param('dns');
205     + my $domain = $c->param('domainname');
206     + $ddc_datas{"success"} =
207     + $c->l( "ddc_SUCCESSFULLY_DELETED", $domain, $c->l( 'ddc_' . $dns ) );
208     + do_display( $c, %ddc_datas );
209     + }
210     + else {
211     + $ddc_datas{"error"} = $retmsg;
212     + #Back to input panel to correct error
213     + do_createcustom($c);
214     + }
215     +
216     +}
217     +
218     +sub do_summary_custom {
219     + #
220     + # Display delete or modify panel for custom domain
221     + #
222     + my $c = shift;
223     + my $title = $c->l("ddc_MODIFY_TITLE");
224     + my $modul = '';
225     + my $trt = $c->param("trt");
226     +
227     + #Extract domain stuff from DB
228     + my @results =
229     + get_custom_table( $c, $c->param("Domain") ); #Returns just one row
230     +
231     + $ddc_datas{"Domain_details"} = $results[0];
232     +
233     + $ddc_datas{'trt'} = $trt;
234     + $c->stash(
235     + title => $title,
236     + modul => $modul,
237     + ddc_datas => \%ddc_datas,
238     + dnslabels => get_dns_labels($c)
239     + );
240     + $c->render( template => 'ddclient' );
241     +}
242     +
243     +sub do_summary_domain {
244     + #
245     + # Display delete or modify panel for inbuilt domain
246     + # param trt = MOD or DEL
247     + #
248     + my $c = shift;
249     + my $title = $c->l("ddc_MODIFY_TITLE");
250     + my $modul = '';
251     + my $trt = $c->param("trt");
252     +
253     + #Extract domain stuff from DB
254     + my @results =
255     + get_domain_table( $c, $c->param("Domain") ); #Returns just one row
256     + $ddc_datas{"Domain_details"} = $results[0];
257     +
258     + $ddc_datas{'trt'} = $trt;
259     + $c->stash(
260     + title => $title,
261     + modul => $modul,
262     + ddc_datas => \%ddc_datas,
263     + dnslabels => get_dns_labels($c)
264     + );
265     + $c->render( template => 'ddclient' );
266     +}
267     +
268     +sub do_delete_domain {
269     + #
270     + # Actually clearout the inbuilt domain
271     + # Return to initial page with message at the top.
272     + #
273     + my $c = shift;
274     + my $route = $c->current_route;
275     + my $title = $c->l("ddc_REMOVE_TITLE");
276     + my $modul = '';
277     + my $retmsg = "";
278     + my $domain = $c->param("Domain");
279     +
280     + #Delete it and return to front summary panel - depends on route domain or custom
281     + if ( $c->param("Route") eq "ddclient2" ) { #Route is hidden field
282     + $retmsg = performDeleteCustom( $c, $domain );
283     + }
284     + else {
285     + $retmsg = performDeleteDomain( $c, $domain );
286     + }
287     +
288     + if ( $retmsg eq "ok" ) {
289     + $ddc_datas{"success"} = $c->l( "ddc_SUCCESSFULLY_DELETED", $domain,
290     + $c->l( 'ddc_' . $c->param("dns") ) );
291     + }
292     + else { $ddc_datas{"error"} = $retmsg; }
293     + do_display( $c, %ddc_datas );
294     +
295     +}
296     +
297     +sub do_delete_custom {
298     + #
299     + # Actually delete the custom domain
300     + # Return to initial page with message at the top.
301     + #
302     + my $c = shift;
303     + my $route = $c->current_route;
304     + my $title = $c->l("ddc_REMOVE_TITLE");
305     + my $modul = '';
306     + my $retmsg = "";
307     + my $domain = $c->param("Domain");
308     +
309     + #Delete it and return to front summary panel - depends on route domain or custom
310     + $retmsg = performDeleteCustom( $c, $domain );
311     + if ( $retmsg eq "ok" ) {
312     + $ddc_datas{"success"} = $c->l( "ddc_SUCCESSFULLY_DELETED", $domain );
313     + }
314     + else { $ddc_datas{"error"} = $retmsg; }
315     + do_display( $c, %ddc_datas );
316     +
317     +}
318     +
319     +sub performDeleteDomain {
320     + my ( $c, $domain ) = @_;
321     +
322     + #------------------------------------------------------------
323     + # Attempt to delete domain
324     + #------------------------------------------------------------
325     +
326     + if ( $domain =~ /^([a-zA-Z0-9\-\.]+)$/ ) {
327     + $domain = $1;
328     + }
329     + else {
330     + return $c->l( 'ddc_ERROR_WHILE_REMOVING_DOMAIN', $domain );
331     + }
332     +
333     + my $value = $domaindb->get($domain);
334     + unless ($value) {
335     + return $c->l( 'ddc_NONEXISTENT_DOMAIN_ERROR', $domain );
336     + }
337     +
338     + my %properties = $value->props;
339     + my $type = $properties{'type'};
340     + if ( $type ne 'domain' ) {
341     + return $c->l( 'ddc_NONEXISTENT_DOMAIN_ERROR', $domain );
342     + }
343     +
344     + my $evalue = $domaindb->get($domain);
345     +
346     + $evalue->set_prop( 'dns' => '' );
347     + $evalue->set_prop( 'login' => '' );
348     + $evalue->set_prop( 'password' => '' );
349     + $evalue->set_prop( 'customdns' => '' );
350     + $evalue->set_prop( 'customprotocol' => '' );
351     +
352     + $domaindb->reload();
353     +
354     + system( "/sbin/e-smith/signal-event", "ddclient" );
355     +
356     + return "ok";
357     +}
358     +
359     +sub performDeleteCustom {
360     + my ( $c, $domain ) = @_;
361     +
362     + #------------------------------------------------------------
363     + # Attempt to delete domain
364     + #------------------------------------------------------------
365     +
366     + if ( $domain =~ /^([a-zA-Z0-9\-\.]+)$/ ) {
367     + $domain = $1;
368     + }
369     + else {
370     + return $c->l( 'ddc_ERROR_WHILE_REMOVING_DOMAIN', $domain );
371     + }
372     +
373     + my $evalue = $edb->get($domain);
374     + unless ($evalue) {
375     + return $c->l( 'ddc_NONEXISTENT_DOMAIN_ERROR', $domain );
376     + }
377     +
378     + my %properties = $evalue->props;
379     + my $type = $properties{'type'};
380     +
381     + if ( $type ne 'ddhost' ) {
382     + return $c->l( 'ddc_NONEXISTENT_DOMAIN_ERROR', $domain );
383     +
384     + }
385     +
386     + $evalue->delete;
387     + $edb->reload();
388     +
389     + system( "/sbin/e-smith/signal-event", "ddclient" );
390     + return "ok";
391     +}
392     +
393     +sub get_domain_table {
394     + #
395     + # Return full table of all domains OR just the details for the specified one
396     + #
397     + my ( $c, $findDomain ) = @_; #$c and domain to find
398     + $findDomain = FALSE if ( scalar(@_) <= 1 );
399     + my $key;
400     + my @virtualDomains = ();
401     + foreach my $domain ( $domaindb->get_all_by_prop( type => 'domain' ) ) {
402     + $key = $domain->key;
403     + push( @virtualDomains, $key );
404     + }
405     + my $numDomains = @virtualDomains;
406     + if ( $numDomains == 0 ) { return () }
407     + else {
408     + my $domain;
409     + my @virtualDomains2d = ();
410     +
411     + foreach $domain ( sort @virtualDomains ) {
412     + my %properties = $domaindb->get($domain)->props;
413     + my $test = $domaindb->get_prop( $domain, "dns" ) || '';
414     + my %extraprops;
415     + if ( $test ne '' ) { %extraprops = $domaindb->get($domain)->props; }
416     +
417     + my $content;
418     + if ( $properties{'Content'} eq 'wwwpublic' ) {
419     + $content = $c->l('ddc_PRIMARY_SITE');
420     + }
421     + else { $content = $c->l( 'ddc_CONTENT', $properties{'Content'} ); }
422     +
423     + my $public;
424     + my %thisrow;
425     + if ( $test eq '' ) {
426     + %thisrow = (
427     + "Domain" => $domain,
428     + "Description" => $properties{'Description'},
429     + "Content" => $content,
430     + "dns" => "",
431     + "Publication" => "",
432     + "customprotocol" => "",
433     + "customdns" => "",
434     + "login" => "",
435     + "password" => "",
436     + "mx" => ""
437     + );
438     + push( @virtualDomains2d, \%thisrow );
439     + }
440     + else {
441     + %thisrow = (
442     + "Domain" => $domain,
443     + "Description" => $properties{'Description'},
444     + "Content" => $content,
445     + "dns" => $extraprops{'dns'},
446     + "Publication" => $c->l( 'ddc_' . $extraprops{'dns'} ),
447     + "customprotocol" => $properties{"customprotocol"},
448     + "customdns" => $properties{"customdns"},
449     + "login" => $properties{"login"},
450     + "password" => $properties{"password"},
451     + "mx" => $properties{"mx"},
452     + );
453     + push( @virtualDomains2d, \%thisrow );
454     +
455     + }
456     + if ($findDomain) {
457     + if ( $domain eq $findDomain ) {
458     + @virtualDomains2d = (); #Just return matching one
459     + push( @virtualDomains2d, \%thisrow );
460     + last;
461     + }
462     + } #Found the one needed
463     + }
464     + return @virtualDomains2d; #Return the lot
465     + }
466     +}
467     +
468     +sub get_custom_table {
469     + #
470     + # Return full table of all domains OR just the details for the specified one
471     + #
472     + my ( $c, $findDomain ) = @_; #$c and domain to find
473     + $findDomain = FALSE if ( scalar(@_) <= 1 );
474     + my $key;
475     + my @FreeDomains = ();
476     + foreach my $domain ( $edb->get_all_by_prop( type => 'ddhost' ) ) {
477     + $key = $domain->key;
478     + push( @FreeDomains, $key );
479     + }
480     + my $numDomains = @FreeDomains;
481     + my @freedomains2d = ();
482     + if ( $numDomains > 0 ) {
483     + foreach my $domain ( sort @FreeDomains ) {
484     + my $vals = $edb->get($domain);
485     + my $content = $vals->prop('desc');
486     + my $publish = $vals->prop('dns');
487     + my %thisrow = (
488     + 'Domain' => $domain,
489     + "Description" => $content,
490     + "dns" => $publish,
491     + "Publication" =>
492     + $c->l( 'ddc_' . $publish ), #msg ddc prefix for ddclient
493     + "customprotocol" => $vals->prop("customprotocol"),
494     + "customdns" => $vals->prop("customdns"),
495     + "login" => $vals->prop("login"),
496     + "password" => $vals->prop("password"),
497     + "mx" => $vals->prop("mx"),
498     +
499     + );
500     +
501     + push( @freedomains2d, \%thisrow );
502     + if ($findDomain) {
503     + if ( $domain eq $findDomain ) {
504     + @freedomains2d = (); #Just return matching one
505     + push( @freedomains2d, \%thisrow );
506     + last;
507     + }
508     + } #Found the one needed
509     +
510     + }
511     + }
512     + return @freedomains2d;
513     +}
514     +
515     +sub get_params {
516     + my $c = shift;
517     + my $ddretrieve = $db->get('ddclient');
518     + my $ExtIF = $db->get('ExternalInterface');
519     + my $DeamonUpdate = $ddretrieve->prop('DeamonUpdate') || '300';
520     + my $urlcheckip = $ddretrieve->prop('urlcheckip') || 'checkip.dyndns.org';
521     + my $ssl = $ddretrieve->prop('SSL') || 'yes';
522     + my $method = $ddretrieve->prop('method') || 'web';
523     + my $Extinterface = $ddretrieve->prop('Extinterface') || '';
524     + my $cmd = $ddretrieve->prop('cmd') || '';
525     + my $forceIP = $ddretrieve->prop('ForceIP') || '';
526     + my $res = {
527     + "ssl" => $ssl,
528     + "DeamonUpdate" => $DeamonUpdate,
529     + "method" => $method,
530     + "Extinterface" => $Extinterface,
531     + "cmd" => $cmd,
532     + "ForceIP" => $forceIP,
533     + "urlcheckip" => $urlcheckip
534     + };
535     + return $res;
536     +}
537     +
538     +sub pushParams {
539     + my $c = shift;
540     + my $DeamonUpdate = $c->param('retrievedeamonupdate');
541     + my $urlcheckip = $c->param('retrieveurlcheckip');
542     + my $ssl = $c->param('retrievessl');
543     + my $retrievemethod = $c->param('retrievemethod');
544     + my $retrieveinterface = $c->param('retrieveinterface');
545     + my $retrievecmd = $c->param('retrievecmd');
546     + my $retrieveip = $c->param('retrieveip');
547     +
548     + my $ddclient = $db->get('ddclient');
549     + $ddclient->set_prop( 'urlcheckip' => $urlcheckip );
550     + $ddclient->set_prop( 'DeamonUpdate' => $DeamonUpdate );
551     + $ddclient->set_prop( 'SSL' => $ssl );
552     + $ddclient->set_prop( 'method' => $retrievemethod );
553     + $ddclient->set_prop( 'Extinterface' => $retrieveinterface );
554     + $ddclient->set_prop( 'cmd' => $retrievecmd );
555     + $ddclient->set_prop( 'ForceIP' => $retrieveip );
556     +
557     + $domaindb->reload();
558     +
559     + system( "/sbin/e-smith/signal-event", "ddclient" );
560     +
561     + return $c->l('ddc_SUCCESSFULLY_MODIFIED_RETRIEVE_IP');
562     +}
563     +
564     +sub performCreateCustom {
565     + my ($c) = shift;
566     +
567     + #------------------------------------------------------------
568     + # Validate parameters and untaint them
569     + #------------------------------------------------------------
570     +
571     + my $domainName = $c->param('domainName');
572     + if ( $domainName =~ /^([a-zA-Z0-9\-\.]+)$/ ) {
573     + $domainName = $1;
574     + }
575     + else {
576     + return $c->l( 'ddc_DOMAIN_NAME_VALIDATION_ERROR', $domainName );
577     + }
578     +
579     + foreach my $domain ( $edb->get_all_by_prop( type => 'domain' ) ) {
580     + my $key = $domain->key;
581     + if ( $key eq $domainName ) {
582     + return $c->l( 'ddc_DOMAIN_NAME_ALREADY_EXIST', $domainName );
583     + }
584     + }
585     +
586     + foreach my $domain ( $domaindb->get_all_by_prop( type => 'ddhost' ) ) {
587     + my $key = $domain->key;
588     + if ( $key eq $domainName ) {
589     + return $c->l( 'ddc_DOMAIN_NAME_ALREADY_EXIST', $domainName );
590     + }
591     + }
592     +
593     + my $domainDesc = $c->param('desc');
594     + my $domainLogin = $c->param('login');
595     + if ( $domainLogin =~ /^([\-\'\w][\-\'\w\s\.\@]*)$/ ) {
596     + $domainLogin = $1;
597     + }
598     + else {
599     + return $c->l( 'ddc_DOMAIN_LOGIN_VALIDATION_ERROR', $domainLogin );
600     + }
601     +
602     + my $domainPassword = $c->param('password');
603     + if ( $domainPassword =~ /^(.*)$/ ) {
604     + $domainPassword = $1;
605     + }
606     + else {
607     + return $c->l( 'ddc_DOMAIN_PASSWORD_VALIDATION_ERROR', $domainPassword );
608     + }
609     +
610     + my $domainMX = $c->param('mx');
611     + my $customDNS = $c->param('customdns');
612     + my $customPROTOCOL = $c->param('customprotocol');
613     +
614     + my $dns = $c->param('dns');
615     + if ( $dns eq 'CUSTOMDNS' ) {
616     + if ( $customDNS =~ /^([a-zA-Z0-9\-\.]+)$/ ) {
617     + $customDNS = $1;
618     + }
619     + else {
620     + return $c->l( 'ddc_CUSTOMDNS_VALIDATION_ERROR', $domainName );
621     + }
622     + }
623     +
624     + #------------------------------------------------------------
625     + # Looks good. Find out if this domain has been taken
626     + # or if the domain is a reserved to provide a secured webserver
627     + # for a previous domain
628     + #------------------------------------------------------------
629     +
630     + my %properties = ();
631     + $properties{'type'} = 'ddhost';
632     + $properties{'dns'} = $dns;
633     + $properties{'login'} = $domainLogin;
634     + $properties{'password'} = $domainPassword;
635     + $properties{'mx'} = $domainMX;
636     + $properties{'desc'} = $domainDesc;
637     + $properties{'customdns'} = $customDNS;
638     + $properties{'customprotocol'} = $customPROTOCOL;
639     + $edb->new_record( $domainName, \%properties );
640     +
641     + system( "/sbin/e-smith/signal-event", "ddclient" );
642     + return "ok";
643     +
644     +}
645     +
646     +sub performModifyDomain {
647     + my $c = shift;
648     +
649     + #------------------------------------------------------------
650     + # Validate parameters and untaint them
651     + #------------------------------------------------------------
652     +
653     + my $domainName = $c->param('domainName');
654     + if ( $domainName =~ /^([a-zA-Z0-9\-\.]+)$/ ) {
655     + $domainName = $1;
656     + }
657     + else {
658     + return $c->l( 'ddc_DOMAIN_NAME_VALIDATION_ERROR', $domainName );
659     + }
660     +
661     + my $domainLogin = $c->param('login');
662     + if ( $domainLogin =~ /^([\-\'\w][\-\'\w\s\.\@]*)$/ ) {
663     + $domainLogin = $1;
664     + }
665     + else {
666     + return $c->l( 'ddc_DOMAIN_LOGIN_VALIDATION_ERROR', $domainLogin );
667     + }
668     +
669     + my $domainPassword = $c->param('password');
670     + if ( $domainPassword =~ /^(.*)$/ ) {
671     + $domainPassword = $1;
672     + }
673     + else {
674     + return $c->l( 'ddc_DOMAIN_PASSWORD_VALIDATION_ERROR', $domainPassword );
675     + }
676     +
677     + my $domainMX = $c->param('mx');
678     + my $customDNS = $c->param('customdns');
679     + my $customPROTOCOL = $c->param('customprotocol');
680     +
681     + my $dns = $c->param('dns');
682     + if ( $dns eq 'CUSTOMDNS' ) {
683     + if ( $customDNS =~ /^([a-zA-Z0-9\-\.]+)$/ ) {
684     + $customDNS = $1;
685     + }
686     + else
687     +
688     + {
689     + return $c->l( 'ddc_CUSTOMDNS_VALIDATION_ERROR', $domainName );
690     + }
691     + }
692     +
693     + #------------------------------------------------------------
694     + # Looks good. Find out if this domain has been taken
695     + # or if the domain is a reserved to provide a secured webserver
696     + # for a previous domain
697     + #------------------------------------------------------------
698     + # my $dns = $c->param ('dns');
699     +
700     + my $dom = $domaindb->get($domainName);
701     +
702     + $dom->set_prop( 'dns' => $dns );
703     + $dom->set_prop( 'login' => $domainLogin );
704     + $dom->set_prop( 'password' => $domainPassword );
705     + $dom->set_prop( 'mx' => $domainMX );
706     + $dom->set_prop( 'customdns' => $customDNS );
707     + $dom->set_prop( 'customprotocol' => $customPROTOCOL );
708     +
709     + $domaindb->reload();
710     +
711     + system( "/sbin/e-smith/signal-event", "ddclient" );
712     + return "ok";
713     +}
714     +
715     +sub performModifyCustom {
716     + my $c = shift;
717     +
718     + #------------------------------------------------------------
719     + # Validate parameters and untaint them
720     + #------------------------------------------------------------
721     +
722     + my $domainName = $c->param('domainName');
723     + if ( $domainName =~ /^([a-zA-Z0-9\-\.]+)$/ ) {
724     + $domainName = $1;
725     + }
726     + else {
727     + return $c->l( 'ddc_DOMAIN_NAME_VALIDATION_ERROR', $domainName );
728     + }
729     +
730     + my $domainLogin = $c->param('login');
731     + if ( $domainLogin =~ /^([\-\'\w][\-\'\w\s\.\@]*)$/ ) {
732     + $domainLogin = $1;
733     + }
734     + else {
735     + return $c->l( 'ddc_DOMAIN_LOGIN_VALIDATION_ERROR', $domainLogin );
736     + }
737     +
738     + my $domainPassword = $c->param('password');
739     + if ( $domainPassword =~ /^(.*)$/ ) {
740     + $domainPassword = $1;
741     + }
742     + else {
743     + return $c->l( 'ddc_DOMAIN_PASSWORD_VALIDATION_ERROR', $domainPassword );
744     + }
745     +
746     + my $domainMX = $c->param('mx');
747     + my $customDNS = $c->param('customdns');
748     + my $customPROTOCOL = $c->param('customprotocol');
749     +
750     + my $dns = $c->param('dns');
751     + if ( $dns eq 'CUSTOMDNS' ) {
752     + if ( $customDNS =~ /^([a-zA-Z0-9\-\.]+)$/ ) {
753     + $customDNS = $1;
754     + }
755     + else
756     +
757     + {
758     + return $c->l( 'ddc_CUSTOMDNS_VALIDATION_ERROR', $domainName );
759     + }
760     + }
761     +
762     + #------------------------------------------------------------
763     + # Looks good. Find out if this domain has been taken
764     + # or if the domain is a reserved to provide a secured webserver
765     + # for a previous domain
766     + #------------------------------------------------------------
767     + # my $dns = $c->param ('dns');
768     +
769     + my $dom = $edb->get($domainName);
770     +
771     + $dom->set_prop( 'dns' => $dns );
772     + $dom->set_prop( 'login' => $domainLogin );
773     + $dom->set_prop( 'password' => $domainPassword );
774     + $dom->set_prop( 'mx' => $domainMX );
775     + $dom->set_prop( 'customdns' => $customDNS );
776     + $dom->set_prop( 'customprotocol' => $customPROTOCOL );
777     +
778     + $domaindb->reload();
779     +
780     + system( "/sbin/e-smith/signal-event", "ddclient" );
781     + return "ok";
782     +}
783     +
784     +1;
785     diff -urN smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Modules/Ddclient/en.pm smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Modules/Ddclient/en.pm
786     --- smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Modules/Ddclient/en.pm 1970-01-01 01:00:00.000000000 +0100
787     +++ smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/lib/SrvMngr/I18N/Modules/Ddclient/en.pm 2020-06-08 09:45:00.000000000 +0100
788     @@ -0,0 +1,97 @@
789     +package SrvMngr::I18N::Modules::Ddclient::en;
790     +use strict;
791     +use warnings;
792     +use utf8;
793     +use Mojo::Base 'SrvMngr::I18N';
794     +
795     +use SrvMngr::I18N::Modules::General::en;
796     +
797     +my %lexicon = (
798     +'ddc_FORM_TITLE' => 'Create, remove or change the publication of virtual domains',
799     +'ddc_Params_for_IP_Retrieval'=>' Parameters to control how the IP of your server is found:',
800     +'ddc_DESCRIPTION'=> 'Use this contrib when you have a sme server connected to a ISP service using a dynamic IP, and you wish to host multiple domains.
801     +<br>ddclient is a client for updating dynamic DNS entries for domains hosted at different DNS providers.
802     +<br>Configure your dynamic host domains via the ddclient server manager panel.
803     +<br>ddclient can be used on servers configured in server gateway mode or in server only mode.<br><br> ',
804     +'ddc_FORM_DESCRIPTION' => 'Virtual Domains for publication on the net:',
805     +'ddc_NO_VIRTUAL_DOMAINS' => 'There are no virtual domains in the system.',
806     +'ddc_CURRENT_LIST_OF_DOMAINS' => 'Current list of virtual domains',
807     +'ddc_PUBLICATION' => 'Publication',
808     +'ddc_PRIMARY_SITE' => 'Primary Site',
809     +'ddc_CONTENT' => '[_1] i-bay',
810     +'ddc_CREATE_TITLE' => 'Create a new publication virtual domain',
811     +'ddc_SERVERS_LABEL' => 'Where to publish',
812     +'ddc_MX' => 'record MX',
813     +'ddc_NAME_LABEL' => 'Login to publish',
814     +'ddc_PASSWORD_LABEL' => 'Password to publish',
815     +'ddc_CONTENT_FIELD_DESCRIPTION' => 'For the web site, you may choose your primary web site or any i-bay as the content.',
816     +'ddc_DOMAIN_NAME_VALIDATION_ERROR' => 'Error: unexpected or missing characters in domain name [_1]. The domain name should contain one or more letters, numbers, periods and minus signs. Did not create new domain.',
817     +'ddc_DOMAIN_DESCRIPTION_VALIDATION_ERROR' => 'Error: unexpected or missing characters in domain description [_1]. Did not create new domain.',
818     +'ddc_DOMAIN_IN_USE_ERROR' => 'Error: domain [_1] is already in use. Did not create new domain.',
819     +'ddc_DOMAIN_LOGIN_VALIDATION_ERROR'=> 'Domain login must not be blank and only consist of letter, numbers, "." or "@"',
820     +'ddc_RESERVED_SECURE_DOMAIN_ERROR' => 'Error: domain [_1] is reserved to provide a secured webserver for the virtual domain [_2]. Did not create new domain.',
821     +'ddc_SYSTEM_DOMAIN_ERROR' => 'Error: domain [_1] is your system domain name. You cannot have a virtual domain with the same name. Did not create new domain.',
822     +'ddc_RESERVED_SECURE_SYSTEM_DOMAIN_ERROR' => 'Error: domain [_1] is reserved to provide a secured webserver for your system domain name [_2]. Did not create new domain.',
823     +'ddc_SUCCESSFULLY_CREATED' => 'Successfully publication domain [_1] on [_2].',
824     +'ddc_MODIFY_TITLE' => 'Modify virtual domain',
825     +'ddc_NONEXISTENT_DOMAIN_ERROR' => 'Error: [_1] is not an existing domain.',
826     +'ddc_SUCCESSFULLY_MODIFIED' => 'Successfully modified the publication [_1] on [_2].',
827     +'ddc_REMOVE_TITLE' => 'Remove publication of virtual domain',
828     +'ddc_REMOVE_DESCRIPTION' => '<p>You are about to remove the publication of domain [_1] ([_2]) on [_3].
829     +</p>
830     +<p>
831     +<b>Are you sure you wish to remove this domain\'s publication ?</b>
832     +</p>
833     +',
834     +'ddc_ERROR_WHILE_REMOVING_DOMAIN' => 'Error: internal failure while removing publication of [_1].',
835     +'ddc_SUCCESSFULLY_DELETED' => 'Successfully deleted publication of [_1] on [_2].',
836     +'ddc_DYNDNS1' => 'dyndns.org dynamic addresses',
837     +'ddc_DYNDNS2' => 'dyndns.org static addresses',
838     +'ddc_DYNDNS3' => 'dyndns.org custom addresses',
839     +'ddc_ZONEDIT' => 'ZoneEdit (zoneedit.com)',
840     +'ddc_EASYDNS' => 'EasyDNS (easydns.com)',
841     +'ddc_HAMMER' => 'Hammernode (hn.org) dynamic addresses',
842     +'ddc_DSLREPORTS' => 'dslreports.com dynamic-host monitoring',
843     +'ddc_EURODYNDNS' => 'eurodyndns.org dynamic addresses',
844     +'ddc_DTDNS' => 'DtDNS (www.dtdns.com) dynamic addresses',
845     +'ddc_LOOPIA' => 'Loopia (loopia.se) dynamic addresses',
846     +'ddc_DNSPARK' => ' Dnspark (dnspark.com) dynamic addresses',
847     +'ddc_DYNHOST' => ' DynHost (ovh.com) dynamic addresses',
848     +'ddc_NOIP' => ' NoIP (noip.com) dynamic addresses',
849     +'ddc_CHANGEIP' => ' ChangeIP (changeip.com) dynamic addresses',
850     +'ddc_NAMECHEAP' => ' NAMECHEAP (namecheap.com) dynamic addresses',
851     +'ddc_SPDNS' => ' SPDNS (spdns.de) dynamic addresses',
852     +'ddc_CUSTOMDNS' => 'Custom Dynamic DNS Provider',
853     +'ddc_CUSTOMDNS_LABEL' => 'Custom server Address',
854     +'ddc_CUSTOM_PROTOCOL_LABEL' => 'Custom ddclient Protocol',
855     +'ddc_CUSTOM_DESCRIPTION' => 'You can use a custom dynamic dns provider if yours is not in the published list. Please fill the custom fields with the appropriate settings',
856     +'ddc_CUSTOMDNS_VALIDATION_ERROR' => 'Error: unexpected or missing characters in custom server address field of domain [_1]. The server address should contain one or more letters, numbers, periods and minus signs. Did not apply the change.',
857     +'ddc_ddclient' =>'Dynamic Clients',
858     +'ddc_DOMAIN_NAME_ALREADY_EXIST' => 'Error: this domain:"[_1]" already exists. Please chose another.',
859     +'ddc_FREE_FORM_DESCRIPTION' => 'Here you can create any domain name to publish over the net:',
860     +'ddc_RETRIEVE_SSL' => 'SSL update',
861     +'ddc_RETRIEVE_DEAMONUPDATE' => 'Deamon update (seconds)',
862     +'ddc_RETRIEVE_URLCHECKIP' => 'Url for the external IP',
863     +'ddc_APPLY' => 'Save',
864     +'ddc_DOMAIN_NAME_LABEL' => 'Domain Name',
865     +'ddc_DESCRIPTION_LABEL' => 'Domain description',
866     +'ddc_SUCCESSFULLY_MODIFIED_RETRIEVE_IP' => 'You have successfully modified the retrieve IP options.',
867     +'ddc_RETRIEVE_METHOD' => 'Method to retrieve new IP:',
868     +'ddc_RETRIEVE_IF' => 'Local interface to get new IP, if selected interface method',
869     +'ddc_RETRIEVE_CMD' => 'Command to execute to get IP, if selected command method',
870     +'ddc_SME external Interface' => 'SME external interface',
871     +'ddc_SME configuration DB' => 'SME configuration DB',
872     +'ddc_web' => 'Web query',
873     +'ddc_Interface' => 'IP from interface',
874     +'ddc_IP' => 'Manual IP setting',
875     +'ddc_Command' => 'Command to execute',
876     +'ddc_RETRIEVE_IP' => 'IP to manually force'
877     +);
878     +
879     +our %Lexicon = (
880     + %{ SrvMngr::I18N::Modules::General::en::Lexicon },
881     + %lexicon
882     +);
883     +
884     +
885     +1;
886     diff -urN smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/ddclient.html.ep smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/ddclient.html.ep
887     --- smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/ddclient.html.ep 1970-01-01 01:00:00.000000000 +0100
888     +++ smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/ddclient.html.ep 2020-06-07 10:18:00.000000000 +0100
889     @@ -0,0 +1,48 @@
890     +% layout 'default', title => "Sme server 2 - Dynamic Clients", share_dir => './';
891     +
892     +% content_for 'module' => begin
893     +<div id="module">
894     +
895     + % if ($config->{debug} == 1) {
896     + <p>
897     + %= dumper $c->current_route
898     + </p>
899     + % }
900     +
901     + <h1><%=$title%></h1>
902     + %= $modul
903     +
904     + %if ($ddc_datas->{first}) {
905     + <br><p>
906     + %=$c->render_to_string(inline =>$c->l($ddc_datas->{first}))
907     + </p>
908     +
909     + %} elsif ($ddc_datas->{success}) {
910     + <div class='sme-border'>
911     + <h2> Operation Status Report</h2><p>
912     + %= $c->l($ddc_datas->{success});
913     + </p>
914     + </div>
915     +
916     + %} elsif ($ddc_datas->{error}) {
917     + <div class='sme-error'>
918     + <h2> Operation Status Report - error</h2><p>
919     + %= $c->l($ddc_datas->{error});
920     + </p>
921     + </div>
922     + %}
923     +
924     + % if ($ddc_datas->{trt} eq 'NEW') {
925     + %= include 'partials/_ddc_create_cust'
926     + %} elsif ($ddc_datas->{trt} eq 'DEL') {
927     + %= include 'partials/_ddc_del'
928     + %} elsif ($ddc_datas->{trt} eq 'MOD') {
929     + %= include 'partials/_ddc_modify_domain'
930     + %} else { #LIST
931     + %= include 'partials/_ddc_paramlist'
932     + %= include 'partials/_ddc_domainlist'
933     + %= include 'partials/_ddc_customlist'
934     + %}
935     +
936     +</div>
937     +%end
938     diff -urN smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_create_cust.html.ep smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_create_cust.html.ep
939     --- smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_create_cust.html.ep 1970-01-01 01:00:00.000000000 +0100
940     +++ smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_create_cust.html.ep 2020-06-08 11:31:00.000000000 +0100
941     @@ -0,0 +1,63 @@
942     +<div id='ddc_createcustom'>
943     + <h2>
944     + %= l 'ddc_CUSTOM_DESCRIPTION'
945     + </h2><br>
946     + % my $btn = l('ddc_APPLY');
947     + %= form_for '/ddclient7' => (method => 'POST') => begin
948     + <span class=label>
949     + %=l 'ddc_DOMAIN_NAME_LABEL'
950     + </span><span class=data>
951     + %=text_field 'domainName'
952     + </span><br>
953     + <span class=label>
954     + %=l 'ddc_DESCRIPTION_LABEL'
955     + </span><span class=data>
956     + %=text_field 'desc'
957     + </span><br>
958     + <span class=label>
959     + %=l 'ddc_SERVERS_LABEL'
960     + </span><span class=data>
961     + %=select_field dns=>$dnslabels
962     + </span><br>
963     + <span class=label>
964     + %=l 'ddc_CUSTOMDNS_LABEL'
965     + </span><span class=data>
966     + %=text_field 'customdns'
967     + </span><br>
968     + <span class=label>
969     + %=l 'ddc_CUSTOM_PROTOCOL_LABEL'
970     + </span><span class=data>
971     + %=text_field 'customprotocol'
972     + </span><br>
973     + <span class=label>
974     + %=l 'ddc_NAME_LABEL'
975     + </span><span class=data>
976     + %=text_field 'login'
977     + </span><br>
978     + <span class=label>
979     + %=l 'ddc_PASSWORD_LABEL'
980     + </span><span class=data>
981     + %=password_field 'password',id=>"ddcPass"
982     + %=label_for show=>"Show"
983     + %=check_box show=>1,onclick=>"showPass()",style=>"vertical-align:middle;"
984     + %= javascript begin
985     + function showPass() {
986     + var x = document.getElementById("ddcPass");
987     + if (x.type === "password") {
988     + x.type = "text";
989     + } else {
990     + x.type = "password";
991     + }
992     + }
993     + % end
994     + </span><br>
995     + <span class=label>
996     + %=l 'ddc_MX'
997     + </span><span class=data>
998     + %=text_field 'mx'
999     + </span><br>
1000     + %= submit_button "$btn", class => 'action'
1001     + % end
1002     +</div>
1003     +
1004     +
1005     diff -urN smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_customlist.html.ep smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_customlist.html.ep
1006     --- smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_customlist.html.ep 1970-01-01 01:00:00.000000000 +0100
1007     +++ smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_customlist.html.ep 2020-06-08 06:28:00.000000000 +0100
1008     @@ -0,0 +1,50 @@
1009     +<div id='ddc_customlist'>
1010     + <h2>
1011     + %= l 'ddc_FREE_FORM_DESCRIPTION'
1012     + </h2>
1013     +
1014     + %= form_for '/ddclient' => (method => 'POST') => begin
1015     +
1016     + <table class="sme-border"><tbody>
1017     + <tr>
1018     + <th class='sme-border'>
1019     + %=l 'ddc_DOMAIN_NAME_LABEL'
1020     + </th>
1021     + <th class='sme-border'>
1022     + %=l 'ddc_DESCRIPTION_LABEL'
1023     + </th>
1024     + <th class='sme-border'>
1025     + %=l 'ddc_PUBLICATION'
1026     + </th>
1027     + <th class='sme-border' colspan=2>
1028     + %=l 'ACTION'
1029     + </th>
1030     + </tr>
1031     + %if (!$emptycust){
1032     + % foreach my $freeDomain (@$freedomains) {
1033     + <tr>
1034     + %= t td => (class => 'sme-border') => $freeDomain->{"Domain"}
1035     + %= t td => (class => 'sme-border') => $freeDomain->{"Description"}
1036     + %= t td => (class => 'sme-border') => $freeDomain->{"Publication"}
1037     + <td class = 'sme-border'>
1038     + <a href='/server-manager2/ddclient2?trt=MOD&Domain=<%= $freeDomain->{"Domain"}%>'><%=l 'MODIFY'%></a>
1039     + </td><td class = 'sme-border'>
1040     + <a href='/server-manager2/ddclient2?trt=DEL&Domain=<%= $freeDomain->{"Domain"}%>'><%=l 'REMOVE'%></a>
1041     + </td>
1042     + </td>
1043     + </tr>
1044     + %}
1045     + %}
1046     + <tr><td class='sme-border'></td>
1047     + <td class='sme-border'></td>
1048     + <td class='sme-border'>&nbsp;</td>
1049     + <td class='sme-border'>&nbsp;</td>
1050     + <td class='sme-border'>
1051     + <a href="/server-manager2/ddclient6?trt=NEW"><%=l 'CREATE'%></a>
1052     + </td>
1053     + </tr>
1054     +
1055     + </tbody>
1056     + </table>
1057     + % end
1058     +</div>
1059     diff -urN smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_del.html.ep smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_del.html.ep
1060     --- smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_del.html.ep 1970-01-01 01:00:00.000000000 +0100
1061     +++ smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_del.html.ep 2020-06-08 06:13:00.000000000 +0100
1062     @@ -0,0 +1,14 @@
1063     +<div id='ddc_del'>
1064     + % my $btn = l('REMOVE');
1065     + %= form_for '/ddclient4' => (method => 'POST') => begin
1066     + <p>
1067     + %= $c->render_to_string(inline =>l("ddc_REMOVE_DESCRIPTION",$ddc_datas->{"Domain_details"}->{"Domain"},$ddc_datas->{"Domain_details"}->{"Description"},$c->l($ddc_datas->{"Domain_details"}->{"Publication"})))
1068     + </p>
1069     + % param Domain=>$ddc_datas->{"Domain_details"}->{"Domain"};
1070     + %= hidden_field Domain=>$ddc_datas->{"Domain_details"}->{"Domain"}
1071     + %= hidden_field Route=>$c->current_route
1072     + %= hidden_field dns=>$ddc_datas->{"Domain_details"}->{"dns"}
1073     + %= hidden_field trt=>"DEL"
1074     + %= submit_button "$btn", class => 'action'
1075     + % end
1076     +</div>
1077     diff -urN smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_domainlist.html.ep smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_domainlist.html.ep
1078     --- smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_domainlist.html.ep 1970-01-01 01:00:00.000000000 +0100
1079     +++ smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_domainlist.html.ep 2020-06-06 09:00:00.000000000 +0100
1080     @@ -0,0 +1,48 @@
1081     +<div id='ddc_Domainslist'>
1082     + <h2>
1083     + %= l 'ddc_FORM_DESCRIPTION'
1084     + </h2>
1085     + %= form_for '/ddclient' => (method => 'POST') => begin
1086     +
1087     + % if ($emptydom){
1088     + <br><h2>
1089     + %=l 'NO_VIRTUAL_DomainS'
1090     + <h2>
1091     + % } else {
1092     + <table class="sme-border"><tbody>
1093     + <tr>
1094     + <th class='sme-border'>
1095     + %=l 'ddc_DOMAIN_NAME_LABEL'
1096     + </th>
1097     + <th class='sme-border'>
1098     + %=l 'ddc_DESCRIPTION_LABEL'
1099     + </th>
1100     + <th class='sme-border'>
1101     + %=l('ddc_CONTENT',"")
1102     + </th>
1103     + <th class='sme-border'>
1104     + %=l 'ddc_PUBLICATION'
1105     + </th>
1106     +
1107     + <th class='sme-border' colspan=2>
1108     + %=l 'ACTION'
1109     + </th>
1110     + </tr>
1111     + % foreach my $Domain (@$domains) {
1112     + <tr>
1113     + %= t td => (class => 'sme-border') => $Domain->{"Domain"}
1114     + %= t td => (class => 'sme-border') => $Domain->{"Description"}
1115     + %= t td => (class => 'sme-border') => $Domain->{"Content"}
1116     + %= t td => (class => 'sme-border') => $Domain->{"Publication"}
1117     + <td class = 'sme-border'>
1118     + <a href="/server-manager2/ddclient1?trt=MOD&Domain=<%= $Domain->{"Domain"}%>"><%=l 'MODIFY'%></a>
1119     + </td><td class = 'sme-border'>
1120     + <a href="/server-manager2/ddclient1?trt=DEL&Domain=<%= $Domain->{"Domain"}%>"><%=l 'REMOVE'%></a>
1121     + </td>
1122     + </tr>
1123     + %}
1124     + </tbody>
1125     + </table>
1126     + %}
1127     + % end
1128     +</div>
1129     diff -urN smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_modify_domain.html.ep smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_modify_domain.html.ep
1130     --- smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_modify_domain.html.ep 1970-01-01 01:00:00.000000000 +0100
1131     +++ smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_modify_domain.html.ep 2020-06-08 11:32:00.000000000 +0100
1132     @@ -0,0 +1,77 @@
1133     +<div id='ddc_modifydomain'>
1134     + <h2>
1135     + %= l 'ddc_CUSTOM_DESCRIPTION'
1136     + </h2><br>
1137     + % my $btn = l('ddc_APPLY');
1138     + %= form_for '/ddclient8' => (method => 'POST') => begin
1139     + <span class=label>
1140     + %=l 'ddc_DOMAIN_NAME_LABEL'
1141     + </span><span class=data>
1142     + %= hidden_field domainName => $ddc_datas->{"Domain_details"}->{"Domain"}
1143     + %= $ddc_datas->{"Domain_details"}->{"Domain"}
1144     + </span><br><br>
1145     + <span class=label>
1146     + %=l 'ddc_DESCRIPTION_LABEL'
1147     + </span><span class=data>
1148     + %= $ddc_datas->{"Domain_details"}->{"Description"}
1149     + </span><br><br>
1150     + <span class=label>
1151     + %= $ddc_datas->{"Domain_details"}->{"Content"}
1152     + </span><span class=data>
1153     + %= $ddc_datas->{"Domain_details"}->{"Content"}
1154     + </span><br><br>
1155     + <span class=label>
1156     + %=l 'ddc_SERVERS_LABEL'
1157     + </span><span class=data>
1158     + % param dns=>$ddc_datas->{"Domain_details"}->{"dns"};
1159     + %=select_field dns=>$dnslabels
1160     + </span><br>
1161     + <span class=label>
1162     + %=l 'ddc_CUSTOMDNS_LABEL'
1163     + </span><span class=data>
1164     + % param customdns=>$ddc_datas->{"Domain_details"}->{"customdns"};
1165     + %=text_field 'customdns'
1166     + </span><br>
1167     + <span class=label>
1168     + %=l 'ddc_CUSTOM_PROTOCOL_LABEL'
1169     + </span><span class=data>
1170     + % param customprotocol=>$ddc_datas->{"Domain_details"}->{"customprotocol"};
1171     + %=text_field 'customprotocol'
1172     + </span><br>
1173     + <span class=label>
1174     + %=l 'ddc_NAME_LABEL'
1175     + </span><span class=data>
1176     + % param login=>$ddc_datas->{"Domain_details"}->{"login"};
1177     + %=text_field 'login'
1178     + </span><br>
1179     + <span class=label>
1180     + %=l 'ddc_PASSWORD_LABEL'
1181     + </span><span class=data>
1182     + % param password=>$ddc_datas->{"Domain_details"}->{"password"};
1183     + %=password_field 'password',id=>"ddcPass",value=>$ddc_datas->{"Domain_details"}->{"password"}
1184     + %=label_for show=>"Show"
1185     + %=check_box show=>1,onclick=>"showPass()",style=>"vertical-align:middle;"
1186     + %= javascript begin
1187     + function showPass() {
1188     + var x = document.getElementById("ddcPass");
1189     + if (x.type === "password") {
1190     + x.type = "text";
1191     + } else {
1192     + x.type = "password";
1193     + }
1194     + }
1195     + % end
1196     + </span><br>
1197     + <span class=label>
1198     + %=l 'ddc_MX'
1199     + </span><span class=data>
1200     + % param mx=>$ddc_datas->{"Domain_details"}->{"mx"};
1201     + %=text_field 'mx'
1202     + </span><br>
1203     + %= hidden_field trt=>"MOD"
1204     + %= hidden_field Route=>$c->current_route
1205     + %= submit_button "$btn", class => 'action'
1206     + % end
1207     +</div>
1208     +
1209     +
1210     diff -urN smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_paramlist.html.ep smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_paramlist.html.ep
1211     --- smeserver-ddclient-1.2.1.old/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_paramlist.html.ep 1970-01-01 01:00:00.000000000 +0100
1212     +++ smeserver-ddclient-1.2.1/root/etc/e-smith/web/panels/manager2/cgi-bin/srvmngr/themes/default/templates/partials/_ddc_paramlist.html.ep 2020-05-28 16:44:00.000000000 +0100
1213     @@ -0,0 +1,52 @@
1214     +<div id='ddc_paramlist'>
1215     + <h2>
1216     + %= l 'ddc_Params_for_IP_Retrieval'
1217     + </h2>
1218     + % my $btn = l('ddc_APPLY');
1219     + %= form_for '/ddclient3' => (method => 'POST') => begin
1220     + <span class=label>
1221     + %=l 'ddc_RETRIEVE_SSL'
1222     + </span><span class=data>
1223     + % param retrievessl=>$ddc_datas->{"params"}->{"ssl"};
1224     + %=select_field retrievessl=>[['Yes'=>'yes'],['No'=>'no']]
1225     + </span><br>
1226     + <span class=label>
1227     + %=l 'ddc_RETRIEVE_DEAMONUPDATE'
1228     + </span><span class=data>
1229     + % param retrievedeamonupdate=>$ddc_datas->{"params"}->{"DeamonUpdate"};
1230     + %=number_field 'retrievedeamonupdate',min=>0
1231     + </span><br>
1232     + <span class=label>
1233     + %=l 'ddc_RETRIEVE_METHOD'
1234     + </span><span class=data>
1235     + % param retrievemethod=>$ddc_datas->{"params"}->{"method"};
1236     + %=select_field retrievemethod=>$methodlabels
1237     + </span><br>
1238     + <span class=label>
1239     + %=l 'ddc_RETRIEVE_IF'
1240     + </span><span class=data>
1241     + % param retrieveinterface=>$ddc_datas->{"params"}->{"Extinterface"};
1242     + %=text_field 'retrieveinterface'
1243     + </span><br>
1244     + <span class=label>
1245     + %=l 'ddc_RETRIEVE_CMD'
1246     + </span><span class=data>
1247     + % param retrievecmd=>$ddc_datas->{"params"}->{"cmd"};
1248     + %=text_field 'retrievecmd'
1249     + </span><br>
1250     + <span class=label>
1251     + %=l 'ddc_RETRIEVE_IP'
1252     + </span><span class=data>
1253     + % param retrieveip=>$ddc_datas->{"params"}->{"ForceIP"};
1254     + %=text_field 'retrieveip'
1255     + </span><br>
1256     + <span class=label>
1257     + %=l 'ddc_RETRIEVE_URLCHECKIP'
1258     + </span><span class=data>
1259     + % param retrieveurlcheckip=>$ddc_datas->{"params"}->{"urlcheckip"};
1260     + %=text_field 'retrieveurlcheckip'
1261     + </span><br>
1262     +
1263     + %= submit_button "$btn", class => 'action'
1264     + % end
1265     +</div>

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