initial commit of file from CVS for smeserver-xt_geoip on Sat Sep 7 16:46:09 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 16:46:09 +10:00
parent 6a9aa6baf5
commit 23a0172ede
71 changed files with 10915 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
<div>
<HR class='sme-copyrightbar'>
%= form_for '/xt_geoip' => (method => 'POST') => begin
%= $c->render_to_string(inline => l('xtg_COUNTRY_LIST_DESCRIPTION'));
%= submit_button l 'xtg_CNTRY_LIST', class => 'action'
%= hidden_field 'Choice' => 'LCOD'
% end
</div>
<!-- button_to l('xtg_CNTRY_LIST') => "/xt_geoip" => (class => 'action') -->

View File

@@ -0,0 +1,65 @@
<div>
<HR class='sme-copyrightbar'>
%= form_for '/xt_geoip' => (method => 'POST') => begin
<h2>
%= l('xtg_SERVICE_DESCRIPTION')
</h2>
%= $c->render_to_string(inline => l('xtg_SERVICE_DESCRIPTION2'));
% my @services = @{$c->get_services_table('sel')};
% if (scalar @services == 0) {
%=l 'xtg_NO_SERVICES'
% } else {
<table class="sme-border"><tbody>
<tr><th class='sme-border'>
%=l 'NAME'
</th><th class='sme-border'>
%=l 'PORT'
</th><th class='sme-border'>
%=l 'STATUS'
</th><th class='sme-border'>
%=l 'ACCESS'
</th><th class='sme-border'>
%=l 'xtg_BADCOUNTRIES'
</th><th class='sme-border' colspan='2'>
%=l 'ACTION'
</th>
</tr>
% foreach my $sv (@services) {
% my $svBC = $sv->prop('BadCountries') || ' ';
% my $svRev = (( $sv->prop('Xt_geoipRev')|| 'disabled') eq 'disabled' )? '==': '!=';
% my $color = 'red';
% my $deco= "none";
% if ($svRev eq '!=' ) { $color = 'green'; }
% if ($sv->prop('status') eq 'disabled' || $sv->prop('access') ne 'public') { $color = 'grey'; $deco= "line-through"; }
% my $BC = "<font color='$color' style='text-decoration: $deco'>"."$svRev $svBC"."</font>";
<tr>
%= t td => (class => 'sme-border') => $sv->key
%= t td => (class => 'sme-border') => $sv->prop('TCPPort')
%= t td => (class => 'sme-border') => $sv->prop('status')
%= t td => (class => 'sme-border') => $sv->prop('access')
%= t td => (class => 'sme-border') => $c->render_to_string(inline => $BC)
% my $actionModify = "<a href='xt_geoipb?Choice=UPDS&Name=" . $sv->key . "'>" . l('MODIFY') . "</a>";
% my $actionRemove = "<a href='xt_geoipb?Choice=REMS&Name=" . $sv->key . "'>" . l('REMOVE') . "</a>";
<td class='sme-border'><%= $c->render_to_string(inline => $actionModify) %></td>
<td class='sme-border'><%= $c->render_to_string(inline => $actionRemove) %></td>
</tr>
% }
</tbody></table>
% }
%= $c->render_to_string(inline => l('xtg_SERVICE_LIST_DESCRIPTION'));
%= submit_button l 'xtg_SERV_LIST', class => 'action'
%= hidden_field 'Choice' => 'LSRV'
% end
</div>

View File

@@ -0,0 +1,33 @@
<div>
<h3>
%= $c->render_to_string(inline => l('xtg_STATS_DESCRIPTION'));
</h3>
%= form_for '/xt_geoip' => (method => 'POST') => begin
%= $c->render_to_string(inline => l('xtg_IPT_LIST_DESCRIPTION'));
%= submit_button l 'xtg_IPT_LIST', class => 'action'
%= hidden_field 'Choice' => 'LIPT'
% end
%= form_for '/xt_geoip' => (method => 'POST') => begin
%= $c->render_to_string(inline => l('xtg_SSH_LIST_DESCRIPTION'));
%= submit_button l 'xtg_SSH_LIST', class => 'action'
%= hidden_field 'Choice' => 'LSSH'
% end
%= form_for '/xt_geoip' => (method => 'POST') => begin
%= $c->render_to_string(inline => l('xtg_F2B_LIST_DESCRIPTION'));
%= submit_button l 'xtg_F2B_LIST', class => 'action'
%= hidden_field 'Choice' => 'LF2B'
% end
</div>