Initial commit - v1.3.1-18

This commit is contained in:
Mab 974
2023-02-06 23:04:43 +04:00
commit 26f1ecc659
62 changed files with 10622 additions and 0 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>

View File

@@ -0,0 +1,74 @@
% layout 'default', title => "Smanager - xt_geoip";
% content_for 'module' => begin
<div id="module" class="module xt_geoip-panel">
%if ($config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $xtg_datas
</p>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title %></h1>
<br>
%= $c->render_to_string(inline => l('xtg_XT_GEOIP_STATUS_DESCRIPTION'));
<br>
%= form_for '/xt_geoip' => (method => 'POST') => begin
<p><span class=label>
%=l 'xtg_LABEL_GEOIP_STATUS'
</span><span class=input>
%= $c->get_geoip()
</span></p>
<p><span class=label>
%=l 'xtg_LABEL_BADCOUNTRIES_STATUS'
</span><span class=input>
%= $c->get_badcountries(1)
</span></p>
<p><span class=label>
%=l 'xtg_LABEL_DATE_UPDATE_STATUS'
</span><span class=input>
%= $c->get_date_update()
</span></p>
% if ( my $st_geoip = $c->get_stat_geoip() ) {
<div class=sme-error>
%= $c->render_to_string(inline => $st_geoip);
</div>
%}
% if ( my $st_lice_k = $c->get_stat_license_key() ) {
<div class=sme-error>
%= $c->render_to_string(inline => $st_lice_k);
</div>
%}
%= hidden_field 'Choice' => 'UPDT'
<div class='center'>
%= submit_button l('NEXT'), class => 'action'
</div>
%end
%= include 'partials/_xtg_lcodes'
%= include 'partials/_xtg_services'
%= include 'partials/_xtg_stats'
</div>
%end

View File

@@ -0,0 +1,44 @@
% layout 'default', title => "Smanager - xt_geoip";
% content_for 'module' => begin
<div id="module" class="module xt_geoip-panel">
%if ($config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $xtg_datas
</p>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title %></h1>
<br>
%= $c->render_to_string(inline => l('xtg_DESC_AVAILABLE_SERVICES'));
<br>
%= form_for '/xt_geoipb' => (method => 'POST') => begin
<p><span class=label>
%=l 'xtg_LABEL_AVAILABLE_SERVICES'
</span><span class=data>
% param 'Selectedservices' => $c->otherServices('sel') unless param 'Selectedservices';
%= select_field 'Selectedservices' => $c->otherServices('all'), class => 'input', multiple => "1"
</span></p>
%= hidden_field 'Choice' => 'LSRV'
<div class='center'>
%= submit_button l('NEXT'), class => 'action'
</div>
%end
</div>
%end

View File

@@ -0,0 +1,36 @@
% layout 'default', title => "Smanager - xt_geoip - List";
% content_for 'module' => begin
<div id="module" class="module xt_geoip-panel">
%if ($config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $xtg_datas
</p>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title %></h1>
%= form_for '/xt_geoip' => (method => 'GET') => begin
<br>
%= $c->render_to_string(inline => stash 'modul');
<br>
<div class='center'>
%= submit_button l('NEXT'), class => 'action'
</div>
%end
</div>
%end

View File

@@ -0,0 +1,53 @@
% layout 'default', title => "Smanager - xt_geoip";
% content_for 'module' => begin
<div id="module" class="module xt_geoip-panel">
%if ($config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $xtg_datas
</p>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title %></h1>
<h2>
%= l 'xtg_REMOVE_SERVICE'
</h2><br>
%= $c->render_to_string(inline => l('xtg_REMOVE_DESC'));
%= form_for '/xt_geoipb' => (method => 'POST') => begin
<p><span class=label>
%=l 'xtg_LABEL_SERVICE'
</span><span class=data>
%= $xtg_datas->{name}
</span></p>
<p><span class=label>
%=l 'xtg_LABEL_SERV_BADCOUNTRIES_STATUS'
</span><span class=data>
%= $c->get_srv_badcountries( $xtg_datas->{name}, 0 )
</span></p>
<div class='center'>
%= submit_button l('REMOVE'), class => 'action'
</div>
%= hidden_field 'Choice' => 'REMS'
%= hidden_field 'Name' => $xtg_datas->{name}
%end
</div>
%end

View File

@@ -0,0 +1,77 @@
% layout 'default', title => "Smanager - xt_geoip";
% content_for 'module' => begin
<div id="module" class="module xt_geoip-panel">
%if ($config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $xtg_datas
</p>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title %></h1>
<h2>
%= l 'xtg_ADD_SERVICE'
</h2><br>
%= $c->render_to_string(inline => l('xtg_ADD_DESC'));
%= form_for '/xt_geoipb' => (method => 'POST') => begin
<p><span class=label>
%=l 'xtg_LABEL_SERVICE'
</span><span class=data>
%= $xtg_datas->{name}
</span></p>
<p><span class=label>
%=l 'xtg_LABEL_BADCOUNTRIES_STATUS'
</span><span class=data>
%= $c->get_badcountries( 0 )
</span></p>
<p>
%=l 'xtg_DESC_REVERSE_MATCH'
<br><span class=label>
%=l 'xtg_LABEL_REVERSE_MATCH'
</span><span class=data>
% param 'Masq_srv_reverse' => $c->get_reverse('','Xt_geoipRev') unless param 'Masq_srv_reverse';
%= select_field 'Masq_srv_reverse' => [['!=' => 'enabled'], ['==' => 'disabled']], class => 'input'
</span></p>
<p>
%=l 'xtg_DESC_BADCOUNTRIES'
<br><span class=label>
%=l 'xtg_LABEL_BADCOUNTRIES'
</span><span class=data>
% param 'Masq_srv_badcountries' => $c->get_srv_badcountries($xtg_datas->{name}, 0) unless param 'Masq_srv_badcountries';
%= text_field 'Masq_srv_badcountries', size => '64', class => 'input'
</span></p>
<p><span class=label>
%=l 'xtg_LABEL_SERV_BADCOUNTRIES_STATUS'
</span><span class=data>
%= $c->get_srv_badcountries( $xtg_datas->{name}, 1 )
</span></p>
<div class='center'>
%= submit_button l('SAVE'), class => 'action'
</div>
%= hidden_field 'Choice' => 'UPDS'
%= hidden_field 'Name' => $xtg_datas->{name}
%end
</div>
%end

View File

@@ -0,0 +1,83 @@
% layout 'default', title => "Smanager - xt_geoip";
% content_for 'module' => begin
<div id="module" class="module xt_geoip-panel">
%if ($config->{debug} == 1) {
<p>
%= dumper $c->current_route
%= dumper $xtg_datas
</p>
%}
% if ( stash 'error' ) {
<br><div class=sme-error>
%= $c->render_to_string(inline => stash 'error')
</div>
%}
<h1><%= $title %></h1>
%= form_for '/xt_geoipb' => (method => 'POST') => begin
<p>
%=l 'xtg_DESC_GEOIP'
<br><span class=label>
%=l 'xtg_LABEL_GEOIP'
</span><span class=data>
% param 'Masq_geoip' => $c->get_geoip() unless param 'Masq_geoip';
%= select_field 'Masq_geoip' => [[ (l 'YES') => 'enabled'], [ (l 'NO') => 'disabled']], class => 'input'
</span></p>
<p>
%=l 'xtg_DESC_REVERSE_MATCH'
<br><span class=label>
%=l 'xtg_LABEL_REVERSE_MATCH'
</span><span class=data>
% param 'Masq_reverse' => $c->get_reverse('masq','Xt_geoipRev') unless param 'Masq_reverse';
%= select_field 'Masq_reverse' => [[ '!=' => 'enabled'], [ '==' => 'disabled']], class => 'input'
</span></p>
<p>
%=l 'xtg_DESC_BADCOUNTRIES'
<br><span class=label>
%=l 'xtg_LABEL_BADCOUNTRIES'
</span><span class=data>
% param 'Masq_badcountries' => $c->get_badcountries() unless param 'Masq_badcountries';
%= text_field 'Masq_badcountries', class => 'input'
</span></p>
<p><span class=label>
%=l 'xtg_LABEL_BADCOUNTRIES_STATUS'
</span><span class=input>
%= $c->get_badcountries();
</span></p>
<p>
%=l 'xtg_DESC_OTHERS'
<br><span class=label>
%=l 'xtg_LABEL_OTHERS'
</span><span class=data>
% param 'Masq_others' => $c->get_reverse('masq','Xt_geoipOther') unless param 'Masq_others';
%= select_field 'Masq_others' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input'
</span></p>
<p>
%=l 'xtg_DESC_UPDATE'
<br><span class=label>
%=l 'xtg_LABEL_UPDATE'
</span><span class=data>
%= select_field 'Update_geoip' => [[ (l 'NO') => 'NO'], [ (l 'YES') => 'YES']], class => 'input'
</span></p>
%= hidden_field 'Choice' => 'UPDT'
<div class='center'>
%= submit_button l('SAVE'), class => 'action'
</div>
%end
</div>
%end