Lex audit files

This commit is contained in:
2025-07-18 10:53:21 +01:00
parent 237f2f21ab
commit c60ad54aab
47 changed files with 1683 additions and 1661 deletions

View File

@@ -1,14 +1,14 @@
<div id='hos_list'>
<div id="hos_list">
% my $btn = l('hos_ADD_HOSTNAME');
% my $btn = l("hos_ADD_HOSTNAME");
%= form_for '/hostentries' => (method => 'POST') => begin
%= form_for "/hostentries" => (method => "POST") => begin
<p>
%= submit_button "$btn", class => 'action'
%= submit_button "$btn", class => "action"
<br></p>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field "trt" => $hos_datas->{trt}
% end
@@ -16,59 +16,59 @@
% foreach my $domain ( sort ( keys %dom_hos ) ) {
<p><br><b>
%= $c->l('hos_CURRENT_HOSTNAMES_FOR_LOCAL_DOMAIN', $domain);
%= $c->l("hos_CURRENT_HOSTNAMES_FOR_LOCAL_DOMAIN", $domain);
</b><br></p>
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%=l 'hos_HOSTNAME'
<th class="sme-border">
%=l "Hostname"
</th>
<th class='sme-border'>
%=l 'hos_HOSTTYPE'
<th class="sme-border">
%=l "Location"
</th>
<th class='sme-border'>
%=l 'IP_ADDRESS_OR_FQDN'
<th class="sme-border">
%=l "IP_ADDRESS_OR_FQDN"
</th>
<th class='sme-border'>
%=l 'hos_ETHERNET_ADDRESS'
<th class="sme-border">
%=l "hos_ETHERNET_ADDRESS"
</th>
<th class='sme-border'>
%=l 'COMMENT'
<th class="sme-border">
%=l "COMMENT"
</th>
<th class='sme-border'>
%=l 'ACTION'
<th class="sme-border">
%=l "ACTION"
</th>
</tr>
</thead><tbody>
% foreach (@{$dom_hos{$domain}{'HOSTS'}}) {
% foreach (@{$dom_hos{$domain}{"HOSTS"}}) {
<tr>
%= t td => (class => 'sme-border') => $_->{'HostName'};
%= t td => (class => 'sme-border') => $_->{'HostType'};
%= t td => (class => 'sme-border') => $_->{'IP'};
%= t td => (class => 'sme-border') => $_->{'MACAddress'};
%= t td => (class => 'sme-border') => $_->{'Comment'};
<td class='sme-border' style="min-width:15em">
%my ($actionModify, $actionRemove) = '&nbsp;';
%my $static = $_->{'static'} || "no";
%if ($static ne 'yes') {
%my $modify_text = l('MODIFY'); # Localized text
%= t td => (class => "sme-border") => $_->{"HostName"};
%= t td => (class => "sme-border") => $_->{"HostType"};
%= t td => (class => "sme-border") => $_->{"IP"};
%= t td => (class => "sme-border") => $_->{"MACAddress"};
%= t td => (class => "sme-border") => $_->{"Comment"};
<td class="sme-border" style="min-width:15em">
%my ($actionModify, $actionRemove) = "&nbsp;";
%my $static = $_->{"static"} || "no";
%if ($static ne "yes") {
%my $modify_text = l("MODIFY"); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
%my $hostentries_name = $_->{"HostName"}; # hostentries name extracted from the data structure
%$actionModify = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=UPD&Hostname=$hostentries_name">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% <button type="button" class="sme-modify-button" title="$modify_text" >
% $modify_text
% </button>
% </a>
%};
%my $remove_text = l('REMOVE'); # Localized text
%my $remove_text = l("REMOVE"); # Localized text
%$csrf_token = "TOKEN"; # CSRF token for security
%#my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
%#my $hostentries_name = $_->{"HostName"}; # hostentries name extracted from the data structure
%$actionRemove = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=DEL&Hostname=$hostentries_name">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% <button type="button" class="sme-remove-button" title="$remove_text" >
% $remove_text
% </button>
% </a>

View File

@@ -1,76 +1,76 @@
<div id='hos_upd'>
<div id="hos_upd">
% my $btn = l('NEXT');
% my $btn = l("NEXT");
%= form_for '/hostentriesd' => (method => 'POST') => begin
%= form_for "/hostentriesd" => (method => "POST") => begin
<p><h2>
% if ( $hos_datas->{trt} eq "ADD" ) {
%=l 'hos_CREATE_TITLE'
%=l "hos_CREATE_TITLE"
% } else {
%=l 'hos_MODIFY_TITLE'
% $btn = l('MODIFY');
%=l "hos_MODIFY_TITLE"
% $btn = l("MODIFY");
% }
</h2></p>
<p>
%=l 'hos_HOSTNAME_DESCRIPTION'
%=l "Hostname_DESCRIPTION"
</p>
<p>
<span class=label>
%=l 'hos_HOSTNAME', class => 'label'
%=l "Hostname", class => "label"
</span><span class=data>
% if ( $hos_datas->{trt} eq "ADD" ) {
% param 'Name' => $hos_datas->{name} unless param 'Name';
%= text_field 'Name', class => 'input'
% param "Name" => $hos_datas->{name} unless param "Name";
%= text_field "Name", class => "input"
% } else {
%= hidden_field 'Name' => $hos_datas->{name}
%= $hos_datas->{name}, class => 'data'
%= hidden_field "Name" => $hos_datas->{name}
%= $hos_datas->{name}, class => "data"
% }
</span>
</p>
<p>
<span class=label>
%=l 'DOMAIN', class => 'label'
%=l "DOMAIN", class => "label"
</span><span class=data>
% if ( $hos_datas->{trt} eq "ADD" ) {
% param 'Domain' => $hos_datas->{domain} unless param 'Domain';
%= select_field 'Domain', $c->domains_list(), class => 'input'
% param "Domain" => $hos_datas->{domain} unless param "Domain";
%= select_field "Domain", $c->domains_list(), class => "input"
% } else {
%= hidden_field 'Domain' => $hos_datas->{domain}
%= $hos_datas->{domain}, class => 'data'
%= hidden_field "Domain" => $hos_datas->{domain}
%= $hos_datas->{domain}, class => "data"
% }
</span>
</p>
<p>
<span class=label>
%= $c->l('COMMENT', '');
%= $c->l("COMMENT", "");
</span><span class=data>
% param 'Comment' => $hos_datas->{comment} unless param 'Comment';
%= text_field 'Comment', class => 'input'
% param "Comment" => $hos_datas->{comment} unless param "Comment";
%= text_field "Comment", class => "input"
</span>
</p>
<p>
<span class=label>
%=l 'LOCATION', class => 'label'
%=l "LOCATION", class => "label"
</span><span class=data>
% param 'Hosttype' => $hos_datas->{hosttype} unless param 'Hosttype';
%= select_field 'Hosttype', $c->hosttype_list(), class => 'input'
% param "Hosttype" => $hos_datas->{hosttype} unless param "Hosttype";
%= select_field "Hosttype", $c->hosttype_list(), class => "input"
</span>
</p>
<p><br>
%= submit_button "$btn", class => 'action'
%= submit_button "$btn", class => "action"
</p>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
%= hidden_field 'Internalip' => $hos_datas->{internalip}
%= hidden_field 'Externalip' => $hos_datas->{externalip}
%= hidden_field 'Macaddress' => $hos_datas->{macaddress}
%= hidden_field "trt" => $hos_datas->{trt}
%= hidden_field "Hostname" => $hos_datas->{hostname}
%= hidden_field "Internalip" => $hos_datas->{internalip}
%= hidden_field "Externalip" => $hos_datas->{externalip}
%= hidden_field "Macaddress" => $hos_datas->{macaddress}
%end

View File

@@ -12,31 +12,31 @@
%= dumper $mai_data
</pre>
% }
% my $btn = l('SAVE');
% my $btn = l("SAVE");
% $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table
<h2><%= $c->l('mai_DESC_STATE_RECEPTION_BUTTON') %></h2><br>
%= form_for "emailsettingsu" => (method => 'POST') => begin
% param 'trt' => $mai_data->{trt} unless param 'trt';
%= hidden_field 'trt' => $mai_data->{trt}
<h2><%= $c->l("mai_DESC_STATE_RECEPTION_BUTTON") %></h2><br>
%= form_for "emailsettingsu" => (method => "POST") => begin
% param "trt" => $mai_data->{trt} unless param "trt";
%= hidden_field "trt" => $mai_data->{trt}
%# Inputs etc in here.
%=l 'mai_DESC_MODE'
%=l "mai_DESC_MODE"
<p><span class=label>
%=l 'mai_LABEL_MODE'
%=l "mai_LABEL_MODE"
</span><span class=input>
% param 'FetchmailMethod' => $mai_data->{fetchmailmethod} unless param 'FetchmailMethod';
% param "FetchmailMethod" => $mai_data->{fetchmailmethod} unless param "FetchmailMethod";
<!--
<pre>
%= dumper $mai_data->{fetchmailmethod}
%= dumper $c->get_retrieval_opt()
%= param 'FetchmailMethod'
%= param "FetchmailMethod"
</pre>
-->
%= select_field 'FetchmailMethod' => $c->get_retrieval_opt(), class => 'input'
%= select_field "FetchmailMethod" => $c->get_retrieval_opt(), class => "input"
</span></p>
%#=l 'mai_DESC_SMTP_AUTH_CONTROL'
%#=l "mai_DESC_SMTP_AUTH_CONTROL"
<br />
%= l "mai_SMTP_port_(25)"
<br />
@@ -45,115 +45,115 @@
%= l "mai_SMTP_Submission"
<br />
% my $smtp_mesg=l('mai_SMTP_port_authenticate');
% my $smtp_mesg=l("mai_SMTP_port_authenticate");
<p><span class=label>
%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25));
%= sprintf($smtp_mesg,$c->get_db_prop("qpsmtpd","TCPPort",25));
</span><span class=input>
% param 'SMTPAuth' => $c->get_current_smtp_auth( FALSE ) unless param 'SMTPAuth';
% param "SMTPAuth" => $c->get_current_smtp_auth( FALSE ) unless param "SMTPAuth";
<!--
<pre>
%= dumper $c->get_smtp_auth_opt()
%= dumper $c->get_current_smtp_auth(FALSE)
%= dumper $c->get_db_prop("qpsmtpd","Authentication")
%= param 'SMTPAuth'
%= param "SMTPAuth"
</pre>
-->
%= select_field 'SMTPAuth' => $c->get_smtp_auth_opt(), class => 'input'
%= select_field "SMTPAuth" => $c->get_smtp_auth_opt(), class => "input"
</span></p>
% my $smtp_mesg=l('SMTPS SSL/TLS auth: port %u status:');
% my $smtp_mesg=l("SMTPS SSL/TLS auth: port %u status:");
<p><span class=label>
%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465));
%= sprintf($smtp_mesg,$c->get_db_prop("sqpsmtpd","TCPPort",465));
</span><span class=input>
% param 'sSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE) unless param 'sSMTPAuth';
% param "sSMTPAuth" => $c->get_current_smtp_ssl_auth(FALSE,"s", TRUE) unless param "sSMTPAuth";
%= select_field 'sSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input'
%= select_field "sSMTPAuth" => $c->get_smtp_ssl_auth_opt(), class => "input"
</span></p>
%my $smtp_mesg=l('Submission port %u status:');
%my $smtp_mesg=l("Submission port %u status:");
<p><span class=label>
%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587));
%= sprintf($smtp_mesg,$c->get_db_prop("uqpsmtpd","TCPPort",587));
</span><span class=input>
% param 'uSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE) unless param 'uSMTPAuth';
% param "uSMTPAuth" => $c->get_current_smtp_ssl_auth(FALSE,"u", TRUE) unless param "uSMTPAuth";
<!--
<pre>
%= dumper $c->get_smtp_ssl_auth_opt()
%= dumper $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE)
%= dumper $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE)
%= dumper $c->get_current_smtp_ssl_auth(FALSE,"s", TRUE)
%= dumper $c->get_current_smtp_ssl_auth(FALSE,"u", TRUE)
%= dumper $c->get_db_prop("uqpsmtpd","access")
%= param 'uSMTPAuth'
%= param "uSMTPAuth"
</pre>
-->
%= select_field 'uSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input'
%= select_field "uSMTPAuth" => $c->get_smtp_ssl_auth_opt(), class => "input"
</span></p>
<!--<hr class="sectionbar" />-->
<h2>
%=l 'mai_TITLE_SECONDARY'
%=l "mai_TITLE_SECONDARY"
</h2><br>
%=l 'mai_DESC_SECONDARY'
%=l "mai_DESC_SECONDARY"
<p><span class=label>
%=l 'mai_LABEL_SECONDARY'
%=l "mai_LABEL_SECONDARY"
</span><span class=input>
% param 'SecondaryMailServer' => $mai_data->{secondarymailserver} unless param 'SecondaryMailServer';
%= text_field 'SecondaryMailServer', class => 'input'
% param "SecondaryMailServer" => $mai_data->{secondarymailserver} unless param "SecondaryMailServer";
%= text_field "SecondaryMailServer", class => "input"
</span></p>
%=l 'mai_DESC_FETCH_PERIOD'
%=l "mai_DESC_FETCH_PERIOD"
<p><span class=label>
%=l 'mai_LABEL_FETCH_PERIOD'
%=l "mai_LABEL_FETCH_PERIOD"
</span><span class=input>
% param 'FreqOffice' => $mai_data->{freqoffice} unless param 'FreqOffice';
%= select_field 'FreqOffice' => $c->fetchmail_freq(), class => 'input'
% param "FreqOffice" => $mai_data->{freqoffice} unless param "FreqOffice";
%= select_field "FreqOffice" => $c->fetchmail_freq(), class => "input"
</span></p>
<p><span class=label>
%=l 'mai_LABEL_FETCH_PERIOD_NIGHTS'
%=l "mai_LABEL_FETCH_PERIOD_NIGHTS"
</span><span class=input>
% param 'FreqOutside' => $mai_data->{freqoutside} unless param 'FreqOutside';
%= select_field 'FreqOutside' => $c->fetchmail_freq(), class => 'input'
% param "FreqOutside" => $mai_data->{freqoutside} unless param "FreqOutside";
%= select_field "FreqOutside" => $c->fetchmail_freq(), class => "input"
</span></p>
<p><span class=label>
%=l 'mai_LABEL_FETCH_PERIOD_WEEKENDS'
%=l "mai_LABEL_FETCH_PERIOD_WEEKENDS"
</span><span class=input>
% param 'FreqWeekend' => $mai_data->{freqweekend} unless param 'FreqWeekend';
%= select_field 'FreqWeekend' => $c->fetchmail_freq(), class => 'input'
% param "FreqWeekend" => $mai_data->{freqweekend} unless param "FreqWeekend";
%= select_field "FreqWeekend" => $c->fetchmail_freq(), class => "input"
</span></p>
<p><span class=label>
%=l 'mai_LABEL_POP_ACCOUNT'
%=l "mai_LABEL_POP_ACCOUNT"
</span><span class=input>
% param 'SecondaryMailAccount' => $mai_data->{secondarymailaccount} unless param 'SecondaryMailAccount';
%= text_field 'SecondaryMailAccount', class => 'input'
% param "SecondaryMailAccount" => $mai_data->{secondarymailaccount} unless param "SecondaryMailAccount";
%= text_field "SecondaryMailAccount", class => "input"
</span></p>
<p><span class=label>
%=l 'mai_LABEL_POP_PASS'
%=l "mai_LABEL_POP_PASS"
</span><span class=input>
% param 'SecondaryMailPassword' => $mai_data->{secondarymailpassword} unless param 'SecondaryMailPassword';
%= password_field 'SecondaryMailPassword', class => 'input'
% param "SecondaryMailPassword" => $mai_data->{secondarymailpassword} unless param "SecondaryMailPassword";
%= password_field "SecondaryMailPassword", class => "input"
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SORT_METHOD'
%=l "mai_LABEL_SORT_METHOD"
</span><span class=input>
% param 'SpecifyHeader' => $mai_data->{specifyheader} unless param 'SpecifyHeader';
%= select_field 'SpecifyHeader' => [[(l 'mai_DEFAULT') => 'off'], [(l 'mai_SPECIFY_BELOW') => 'on']], class => 'input'
% param "SpecifyHeader" => $mai_data->{specifyheader} unless param "SpecifyHeader";
%= select_field "SpecifyHeader" => [[(l "Default") => "off"], [(l "mai_SPECIFY_BELOW") => "on"]], class => "input"
</span></p>
<p><span class=label>
%=l 'mai_LABEL_SORT_HEADER'
%=l "mai_LABEL_SORT_HEADER"
</span><span class=input>
% param 'SecondaryMailEnvelope' => $mai_data->{secondarymailenvelope} unless param 'SecondaryMailEnvelope';
%= text_field 'SecondaryMailEnvelope', class => 'input'
% param "SecondaryMailEnvelope" => $mai_data->{secondarymailenvelope} unless param "SecondaryMailEnvelope";
%= text_field "SecondaryMailEnvelope", class => "input"
</span></p>
%# ....
%# Probably finally by a submit.
%= submit_button $btn, class => 'action'
%= submit_button $btn, class => "action"
%end
</div>

View File

@@ -1,8 +1,8 @@
<div id='pf_add'>
<div id="pf_add">
% my $retref= $c->stash("ret");
% my %ret = $retref ? %$retref : (ret => "");
% my @vars = split(/,/, $ret{vars} // '');
% my @vars = split(/,/, $ret{vars} // "");
% my ($var1, $var2, $var3, $var4, $var5, $var6, $var7) = @vars;
% if ($c->app->config->{debug}) {
@@ -15,17 +15,17 @@
% } elsif (index($ret{ret},"SUCCESS") != -1) {
<br>
<div class='success'>
<div class="success">
%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6]))
</div>
% } else {
<br>
<div class='sme-error'>
<div class="sme-error">
%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6]))
</div>
% }
<br />
% my $btn = l('ADD');
% my $btn = l("ADD");
% if (config->{debug} == 1) {
</pre>
@@ -34,7 +34,7 @@
</pre>
% }
%= form_for '/portforwardingb' => (method => 'POST') => begin
%= form_for "/portforwardingb" => (method => "POST") => begin
<h2>
%=l "pf_CREATE_RULE"
</h2>
@@ -42,42 +42,42 @@
%=l "pf_SUMMARY_ADD_DESC"
</p><br>
<span class=label>
%=l "pf_LABEL_PROTOCOL"
%=l "Protocol"
</span><span class=data>
%=select_field 'proto'=>["TCP","UDP"]
%=select_field "proto"=>["TCP","UDP"]
</span><br><br>
<span class=label>
%=l "pf_LABEL_SOURCE_PORT"
</span><span class=data>
%=text_field 'sport'
%=text_field "sport"
</span><br><br>
<span class=label>
%=l "pf_LABEL_DESTINATION_PORT"
</span>
<span class=data>
%=text_field 'dport'
%=text_field "dport"
</span><br><br>
<span class=label>
%=l "pf_LABEL_DESTINATION_HOST"
</span>
<span class=data>
%=text_field 'dhost'
%=text_field "dhost"
</span><br><br>
<span class=label>
%=l "pf_ALLOW_HOSTS"
</span>
<span class=data>
%=text_field 'allow'
%=text_field "allow"
</span><br><br>
<span class=label>
%=l "pf_RULE_COMMENT"
</span>
<span class=data>
%=text_field 'cmmnt'
%=text_field "cmmnt"
</span><br><br>
<p>
<br>
%= submit_button "$btn", class => 'action'
%= submit_button "$btn", class => "action"
</p>
%end

View File

@@ -1,6 +1,6 @@
<div id='ln_del'>
<div id="ln_del">
% my $btn = l('REMOVE');
% my $btn = l("REMOVE");
% my $proto = $pf_datas->{proto};
% my $sport = $pf_datas->{sport};
% my $dport = $pf_datas->{dport};
@@ -16,12 +16,12 @@
</pre>
% }
%= form_for '/portforwardinge' => (method => 'POST') => begin
%= form_for "/portforwardinge" => (method => "POST") => begin
<br>
%= l "pf_SUMMARY_REMOVE_DESC"
</p><br>
<span class=label>
%=l "pf_LABEL_PROTOCOL"
%=l "Protocol"
</span><span class=data>
%=$proto
</span><br><br>
@@ -58,7 +58,7 @@
%= hidden_field sport=>$sport
%= hidden_field proto=>$proto
<br>
%= submit_button "$btn", class => 'action'
%= submit_button "$btn", class => "action"
</p>
%end

View File

@@ -1,13 +1,13 @@
<div id='pf_list'>
% my $btn = l('pf_CREATE_RULE');
%= form_for '/portforwardinga' => (method => 'POST') => begin
<div id="pf_list">
% my $btn = l("pf_CREATE_RULE");
%= form_for "/portforwardinga" => (method => "POST") => begin
% my $numtcpforwards = @$tcpforwards;
% my $numudpforwards = @$udpforwards;
% my $retref= $c->stash("ret");
% my %ret = $retref ? %$retref : (ret => "");
% my @vars = split(/,/, $ret{vars} // '');
% my @vars = split(/,/, $ret{vars} // "");
% my ($var1, $var2, $var3, $var4, $var5, $var6, $var7) = @vars;
% if ($c->app->config->{debug}) {
@@ -20,12 +20,12 @@
%=l "pf_FIRST_PAGE_DESCRIPTION"
% } elsif (index($ret{ret},"SUCCESS") != -1) {
<br>
<div class='success'>
<div class="success">
%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6]))
</div>
% } else {
<br>
<div class='sme-error'>
<div class="sme-error">
%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6]))
</div>
% }
@@ -34,7 +34,7 @@
<p>
<br>
%= submit_button "$btn", class => 'action'
%= submit_button "$btn", class => "action"
</p>
@@ -42,33 +42,33 @@
% if ($empty){
<br>
%=l 'pf_NO_FORWARDS'
%=l "pf_NO_FORWARDS"
% } else {
<br>
%=l 'pf_SHOW_FORWARDS'
%=l "pf_SHOW_FORWARDS"
<br><br />
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%=l 'pf_LABEL_PROTOCOL'
<th class="sme-border">
%=l "Protocol"
</th>
<th class='sme-border'>
%=l 'pf_LABEL_SOURCE_PORT'
<th class="sme-border">
%=l "pf_LABEL_SOURCE_PORT"
</th>
<th class='sme-border'>
%=l 'pf_LABEL_DESTINATION_HOST'
<th class="sme-border">
%=l "pf_LABEL_DESTINATION_HOST"
</th>
<th class='sme-border'>
%=l 'pf_LABEL_DESTINATION_PORT'
<th class="sme-border">
%=l "pf_LABEL_DESTINATION_PORT"
</th>
<th class='sme-border'>
%=l 'pf_ALLOW_HOSTS'
<th class="sme-border">
%=l "pf_ALLOW_HOSTS"
</th>
<th class='sme-border'>
%=l 'pf_RULE_COMMENT'
<th class="sme-border">
%=l "pf_RULE_COMMENT"
</th>
<th class='sme-border'>
%=l 'ACTION'
<th class="sme-border">
%=l "ACTION"
</th>
</tr>
</thead><tbody>
@@ -82,22 +82,22 @@
% foreach my $entry (@{ $forwards{$proto} }) {
<tr>
% my $sport = $entry->key;
% my $dhost = $entry->prop('DestHost');
% my $dport = $entry->prop('DestPort') || '';
% my $cmmnt = $entry->prop('Comment') || '';
% my $allow = $entry->prop('AllowHosts') || '';
%= t td => (class => 'sme-border') => $proto
%= t td => (class => 'sme-border') => $sport
%= t td => (class => 'sme-border') => $dhost
%= t td => (class => 'sme-border') => $dport
%= t td => (class => 'sme-border') => $allow
%= t td => (class => 'sme-border') => $cmmnt
<td class='sme-border'>
%my $remove_text = l('REMOVE'); # Localized text
% my $dhost = $entry->prop("DestHost");
% my $dport = $entry->prop("DestPort") || "";
% my $cmmnt = $entry->prop("Comment") || "";
% my $allow = $entry->prop("AllowHosts") || "";
%= t td => (class => "sme-border") => $proto
%= t td => (class => "sme-border") => $sport
%= t td => (class => "sme-border") => $dhost
%= t td => (class => "sme-border") => $dport
%= t td => (class => "sme-border") => $allow
%= t td => (class => "sme-border") => $cmmnt
<td class="sme-border">
%my $remove_text = l("REMOVE"); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $actionRemove = qq{
% <a href="portforwardingd?CsrfDef=$csrf_token&trt=DEL&sport=$sport&proto=$proto">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% <button type="button" class="sme-remove-button" title="$remove_text" >
% $remove_text
% </button>
% </a>
@@ -111,6 +111,6 @@
%}
</tbody>
</table>
%= hidden_field 'trt' => $pf_datas->{trt}
%= hidden_field "trt" => $pf_datas->{trt}
</div>

View File

@@ -1,81 +1,81 @@
<div id='pse_list'>
<div id="pse_list">
% my $btn = l('pse_CLICK_TO_CREATE');
% my $btn = l("pse_CLICK_TO_CREATE");
%= $c->render_to_string(inline => l('pse_DESCRIPTION'));
%= $c->render_to_string(inline => l("pse_DESCRIPTION"));
%= form_for '/pseudonyms' => (method => 'POST') => begin
%= form_for "/pseudonyms" => (method => "POST") => begin
%= hidden_field 'trt' => 'ADD'
%= hidden_field "trt" => "ADD"
<p><br>
%= submit_button "$btn", class => 'action'
%= submit_button "$btn", class => "action"
</p>
% end
<p><h2>
%=l 'pse_CURRENT_PSEUDONYMS'
%=l "pse_CURRENT_PSEUDONYMS"
</h2><br>
% my $numPseudonyms = @$pseudonyms;
% if ($numPseudonyms == 0){
%=l 'pse_ACCOUNT_PSEUDONYM_NONE'
%=l "pse_ACCOUNT_PSEUDONYM_NONE"
% } else {
<table class="sme-border TableSort"><thead>
<tr>
<th class='sme-border'>
%=l 'pse_PSEUDONYM'
<th class="sme-border">
%=l "Pseudonym"
</th>
<th class='sme-border'>
%=l 'pse_USER_OR_GROUP'
<th class="sme-border">
%=l "pse_USER_OR_GROUP"
</th>
<th class='sme-border'>
%=l 'ACTION'
<th class="sme-border">
%=l "ACTION"
</th>
<!-- <th class='sme-border' style="display: normal;"></th> -->
<!-- <th class="sme-border" style="display: normal;"></th> -->
</tr></thead>
<tbody>
% foreach my $pseudonym ( @$pseudonyms )
% {
% my $modifiable = $pseudonym->prop('Changeable') || 'yes';
% my $removable = $pseudonym->prop('Removable') || 'yes';
% my $modifiable = $pseudonym->prop("Changeable") || "yes";
% my $removable = $pseudonym->prop("Removable") || "yes";
% my $account = $pseudonym->prop('Account');
% my $account = $pseudonym->prop("Account");
% $account = "Administrator" if ($account eq "admin");
% $account = $c->l("pse_EVERYONE") if ($account eq "shared");
% $account = $c->l("Everyone") if ($account eq "shared");
% my $visible = $pseudonym->prop('Visible');
% my $visible = $pseudonym->prop("Visible");
% $account .= $c->l("pse_LOCAL_ONLY")
% if (defined $visible && $visible eq "internal");
<tr>
%= t td => (class => 'sme-border') => $pseudonym->key
%= t td => (class => 'sme-border') => $account
%= t td => (class => "sme-border") => $pseudonym->key
%= t td => (class => "sme-border") => $account
<td class='sme-border'>
%my ($actionModify, $actionRemove) = '&nbsp;';
%if ($modifiable eq 'yes') {
%my $modify_text = l('MODIFY'); # Localized text
<td class="sme-border">
%my ($actionModify, $actionRemove) = "&nbsp;";
%if ($modifiable eq "yes") {
%my $modify_text = l("MODIFY"); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure
%$actionModify = qq{
% <a href="pseudonyms2?CsrfDef=$csrf_token&trt=UPD&pseudonym=$pseudonyms_entry_name">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% <button type="button" class="sme-modify-button" title="$modify_text" >
% $modify_text
% </button>
% </a>
%};
%}
%if ($removable eq 'yes') {
%my $remove_text = l('REMOVE'); # Localized text
%if ($removable eq "yes") {
%my $remove_text = l("REMOVE"); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure
%$actionRemove = qq{
% <a href="pseudonyms2?CsrfDef=$csrf_token&trt=DEL&pseudonym=$pseudonyms_entry_name">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% <button type="button" class="sme-remove-button" title="$remove_text" >
% $remove_text
% </button>
% </a>

View File

@@ -1,11 +1,11 @@
<div id='quo_upd'>
<div id="quo_upd">
% my $btn = l('SAVE');
% my $btn = l("SAVE");
%= form_for '/quota2' => (method => 'POST') => begin
%= form_for "/quota2" => (method => "POST") => begin
<p>
<h2>
%=l 'quo_MODIFY_USER_TITLE'
%=l "quo_MODIFY_USER_TITLE"
</h2>
</p>
@@ -15,69 +15,69 @@
for my $user @$userAccounts
{
unless ( $user->key eq $userid) {
warn(l('USER_DIFFERENT'),$user->key);
warn(l("USER_DIFFERENT"),$user->key);
next;
}
}
-->
% my $uid = getpwnam($user->key);
% unless ($uid) {
% warn(l('COULD_NOT_GET_UID'),$user->key);
% warn(l("COULD_NOT_GET_UID"),$user->key);
% next;
% }
% my $name = $user->prop("FirstName") . " " . $user->prop("LastName");
% my $dev = Quota::getqcarg('/home/e-smith/files');
% my $dev = Quota::getqcarg("/home/e-smith/files");
% my ($bc, $bs, $bh, $bt, $ic, $is, $ih, $it) = Quota::query($dev, $uid);
<p>
%=l 'quo_USER'
%=l "quo_USER"
%= "$name (\"$userid\")"
%=l 'quo_CURRENTLY_HAS'
%=l "quo_CURRENTLY_HAS"
%= $ic
%=l 'quo_FILES'
%=l 'quo_OCCUPYING'
%=l "files"
%=l "quo_OCCUPYING"
%= $c->toMB($bc)
%=l 'quo_MEGABYTES'
%=l "megabytes"
</p>
<p>
%=l 'quo_INSTRUCTIONS'
%=l "quo_INSTRUCTIONS"
</p>
<p>
<span class=label>
%=l 'quo_USER', class => 'label'
%=l "quo_USER", class => "label"
</span><span class=data>
%= $name, class => 'input'
%= $name, class => "input"
</span>
</p>
<p>
<span class=label>
%=l 'quo_LIMIT_WITH_GRACE', class => 'label'
%=l "quo_LIMIT_WITH_GRACE", class => "label"
</span><span class=data>
% param 'Soft' => $quo_datas->{softlim} unless param 'Soft';
%= text_field 'Soft', class => 'input'
% param "Soft" => $quo_datas->{softlim} unless param "Soft";
%= text_field "Soft", class => "input"
</span>
</p>
<p>
<span class=label>
%=l 'quo_ABS_LIMIT', class => 'label'
%=l "quo_ABS_LIMIT", class => "label"
</span><span class=data>
% param 'Hard' => $quo_datas->{hardlim} unless param 'Hard';
%= text_field 'Hard', class => 'input'
% param "Hard" => $quo_datas->{hardlim} unless param "Hard";
%= text_field "Hard", class => "input"
</span>
</p>
<p>
<br><br>
%= submit_button "$btn", class => 'action'
%= submit_button "$btn", class => "action"
</p>
%= hidden_field 'trt' => $quo_datas->{trt}
%= hidden_field 'user' => $quo_datas->{user}
%= hidden_field "trt" => $quo_datas->{trt}
%= hidden_field "user" => $quo_datas->{user}
% end

View File

@@ -1,6 +1,6 @@
<div id='swt_theme'>
<font class="sme-copyright">
% my $btn = l('swt_THEME');
% my $btn = l('THEME');
%= form_for $c->url_for('swttheme') => (method => 'POST') => begin
% my $value = $c->session->{'CurrentTheme'};
% $value = session 'CurrentTheme';
@@ -11,4 +11,4 @@
%= submit_button "$btn"
% end
</font>
</div>
</div>

View File

@@ -1,27 +1,27 @@
<div id='usr_lock'>
<div id="usr_lock">
% my $btn = l('usr_LOCK');
% my $btn = l("Lock");
%= form_for '/useraccountsd' => (method => 'POST') => begin
%= form_for "/useraccountsd" => (method => "POST") => begin
<p>
<h2>
%=l 'usr_LOCK_ACCOUNT_TITLE'
%=l "Lock_ACCOUNT_TITLE"
</h2>
<br>
%= $c->l('usr_LOCK_DESC', $usr_datas->{user}, $usr_datas->{name} );
%= $c->l("Lock_DESC", $usr_datas->{user}, $usr_datas->{name} );
<br>
%= $c->render_to_string(inline => $c->l('usr_LOCK_DESC2'))
%= $c->render_to_string(inline => $c->l("Lock_DESC2"))
</p>
<p>
<br>
%= submit_button "$btn", class => 'action'
%= submit_button "$btn", class => "action"
</p>
%= hidden_field 'trt' => $usr_datas->{trt}
%= hidden_field 'user' => $usr_datas->{user}
%= hidden_field 'name' => $usr_datas->{name}
%= hidden_field "trt" => $usr_datas->{trt}
%= hidden_field "user" => $usr_datas->{user}
%= hidden_field "name" => $usr_datas->{name}
% end

View File

@@ -1,126 +1,126 @@
<div id='usr_upd'>
<div id="usr_upd">
% my $btn = l('ADD');
% my $btn = l("ADD");
%= form_for '/useraccountsd' => (method => 'POST') => begin
%= form_for "/useraccountsd" => (method => "POST") => begin
<p>
<h2>
%=l 'usr_P2_TITLE'
%=l "usr_P2_TITLE"
</h2>
<br>
%= $c->render_to_string(inline => l ('usr_CREATE_MODIFY_DESC'))
%= $c->render_to_string(inline => l ("usr_CREATE_MODIFY_DESC"))
</p>
<p>
<span class=label>
%=l 'usr_ACCOUNT_NAME'
%=l "usr_ACCOUNT_NAME"
</span><span class=data>
% if ( $usr_datas->{trt} eq 'ADD' ) {
% param 'user' => $usr_datas->{user} unless param 'user';
%= text_field 'user', class => 'input'
% if ( $usr_datas->{trt} eq "ADD" ) {
% param "user" => $usr_datas->{user} unless param "user";
%= text_field "user", class => "input"
% } else {
% $btn = l('SAVE');
%= $usr_datas->{user}, class => 'data'
% $btn = l("SAVE");
%= $usr_datas->{user}, class => "data"
% }
</span>
</p>
<p>
<span class=label>
%=l 'usr_FIRSTNAME'
%=l "usr_FIRSTNAME"
</span><span class=data>
% param 'FirstName' => $usr_datas->{firstname} unless param 'FirstName';
%= text_field 'FirstName', class => 'input'
% param "FirstName" => $usr_datas->{firstname} unless param "FirstName";
%= text_field "FirstName", class => "input"
</span>
</p>
<p>
<span class=label>
%=l 'usr_LASTNAME'
%=l "usr_LASTNAME"
</span><span class=data>
% param 'LastName' => $usr_datas->{lastname} unless param 'LastName';
%= text_field 'LastName', class => 'input'
% param "LastName" => $usr_datas->{lastname} unless param "LastName";
%= text_field "LastName", class => "input"
</span>
</p>
<p>
<span class=label>
%=l 'usr_DEPARTMENT'
%=l "Department"
</span><span class=data>
% param 'Dept' => $usr_datas->{dept} unless param 'Dept';
%= text_field 'Dept', class => 'input'
% param "Dept" => $usr_datas->{dept} unless param "Dept";
%= text_field "Dept", class => "input"
</span>
</p>
<p>
<span class=label>
%=l 'usr_COMPANY'
%=l "Company"
</span><span class=data>
% param 'Company' => $usr_datas->{company} unless param 'Company';
%= text_field 'Company', class => 'input'
% param "Company" => $usr_datas->{company} unless param "Company";
%= text_field "Company", class => "input"
</span>
</p>
<p>
<span class=label>
%=l 'usr_STREET_ADDRESS'
%=l "usr_STREET_ADDRESS"
</span><span class=data>
% param 'Street' => $usr_datas->{street} unless param 'Street';
%= text_field 'Street', class => 'input'
% param "Street" => $usr_datas->{street} unless param "Street";
%= text_field "Street", class => "input"
</span>
</p>
<p>
<span class=label>
%=l 'usr_CITY'
%=l "City"
</span><span class=data>
% param 'City' => $usr_datas->{city} unless param 'City';
%= text_field 'City', class => 'input'
% param "City" => $usr_datas->{city} unless param "City";
%= text_field "City", class => "input"
</span>
</p>
<p>
<span class=label>
%=l 'usr_PHONE_NUMBER'
%=l "usr_PHONE_NUMBER"
</span><span class=data>
% param 'Phone' => $usr_datas->{phone} unless param 'Phone';
%= text_field 'Phone', class => 'input'
% param "Phone" => $usr_datas->{phone} unless param "Phone";
%= text_field "Phone", class => "input"
</span>
</p>
<p>
<span class=label>
%=l 'usr_EMAIL_DELIVERY'
%=l "usr_EMAIL_DELIVERY"
</span><span class=data>
% param 'EmailForward' => $usr_datas->{emailforward} unless param 'EmailForward';
%= select_field 'EmailForward' => $c->emailForward_list(), class => 'input'
% param "EmailForward" => $usr_datas->{emailforward} unless param "EmailForward";
%= select_field "EmailForward" => $c->emailForward_list(), class => "input"
</span>
</p>
<p>
<span class=label>
%=l 'usr_FORWARDING_ADDRESS'
%=l "usr_FORWARDING_ADDRESS"
</span><span class=data>
% param 'ForwardAddress' => $usr_datas->{forwardaddress} unless param 'ForwardAddress';
%= text_field 'ForwardAddress', class => 'input'
% param "ForwardAddress" => $usr_datas->{forwardaddress} unless param "ForwardAddress";
%= text_field "ForwardAddress", class => "input"
</span>
</p>
<p>
<span class=label>
%=l 'usr_VPN_CLIENT_ACCESS'
%=l "usr_VPN_CLIENT_ACCESS"
</span><span class=data>
% param 'VPNClientAccess' => $usr_datas->{vpnclientaccess} unless param 'VPNClientAccess';
%= select_field 'VPNClientAccess' => [[ (l 'NO') => 'no'], [ (l 'YES') => 'yes']], class => 'input'
% param "VPNClientAccess" => $usr_datas->{vpnclientaccess} unless param "VPNClientAccess";
%= select_field "VPNClientAccess" => [[ (l "NO") => "no"], [ (l "YES") => "yes"]], class => "input"
</span>
</p>
% if ( $usr_datas->{trt} eq 'UPD' and $c->ipsec_for_acct eq 'OK' ) {
% my $btn2 = $c->l('DOWNLOAD');
%= form_for '/useraccountso' => (method => 'POST') => begin
% if ( $usr_datas->{trt} eq "UPD" and $c->ipsec_for_acct eq "OK" ) {
% my $btn2 = $c->l("DOWNLOAD");
%= form_for "/useraccountso" => (method => "POST") => begin
<p>
<span class=label>
%=l 'usr_LABEL_IPSECRW_DOWNLOAD'
%=l "usr_LABEL_IPSECRW_DOWNLOAD"
</span><span class=data>
%= submit_button $btn2, class => 'action'
%= submit_button $btn2, class => "action"
</span>
</p>
%= hidden_field 'trt' => 'CRT'
%= hidden_field 'user' => $usr_datas->{user}
%= hidden_field "trt" => "CRT"
%= hidden_field "user" => $usr_datas->{user}
%end
% }
@@ -128,40 +128,40 @@
% if ( @groups ) {
<p>
<span class=label>
%=l 'usr_GROUP_MEMBERSHIPS'
%=l "usr_GROUP_MEMBERSHIPS"
</span>
<span class=data>
<table class="sme-border "><thead>
<tr><th class='sme-border'>
%=l 'usr_MEMBER'
</th><th class='sme-border'>
%=l 'GROUP'
</th><th class='sme-border'>
%=l 'DESCRIPTION'
<tr><th class="sme-border">
%=l "usr_MEMBER"
</th><th class="sme-border">
%=l "GROUP"
</th><th class="sme-border">
%=l "DESCRIPTION"
</th></tr>
</thead><tbody>
% foreach my $g ( @groups) {
% my $user = $usr_datas->{user};
% my $groupname = $g->key();
% my $description = $g->prop('Description');
% my $checked = '';
% my $description = $g->prop("Description");
% my $checked = "";
% if ( $user and $c->is_user_in_group($user, $groupname) ) {
% $checked = 'checked';
% $checked = "checked";
% }
<tr>
<td>
% if ( $checked eq 'checked' ) {
<!-- % = check_box 'groupMemberships', value => $groupname, checked => $checked -->
<input type='checkbox' name='groupMemberships' checked value='<%= $groupname %>'>
% if ( $checked eq "checked" ) {
<!-- % = check_box "groupMemberships", value => $groupname, checked => $checked -->
<input type="checkbox" name="groupMemberships" checked value="<%= $groupname %>">
%} else {
%= check_box 'groupMemberships' => $groupname
%= check_box "groupMemberships" => $groupname
%}
</td>
<!-- t td => (class => 'sme-border') => (check_box ' groupMemberships' => $groupname $checked) -->
%= t td => (class => 'sme-border') => $groupname
%= t td => (class => 'sme-border') => "$description"
<!-- t td => (class => "sme-border") => (check_box " groupMemberships" => $groupname $checked) -->
%= t td => (class => "sme-border") => $groupname
%= t td => (class => "sme-border") => "$description"
</tr>
% }
</tbody>
@@ -172,12 +172,12 @@
<p>
<br><br>
%= submit_button $btn, class => 'action'
%= submit_button $btn, class => "action"
</p>
%= hidden_field 'trt' => $usr_datas->{trt}
% if ( $usr_datas->{trt} eq 'UPD' ) {
%= hidden_field 'user' => $usr_datas->{user}
%= hidden_field "trt" => $usr_datas->{trt}
% if ( $usr_datas->{trt} eq "UPD" ) {
%= hidden_field "user" => $usr_datas->{user}
% }
% end