[% SET CPANEL.CPVAR.dprefix = "../../"; SET email_acct = execute( 'Email', 'account_name', {"account"=>FORM.account, "display"=>"0"}).data; Api2.pre_exec("StatsBar", "stat"); api2_result_StatsBar_stat = Api2.exec("StatsBar", "stat", {"warnings"=>"1", "infinitylang"=>"true", "warninglevel"=>"80", "display"=>"emailfilters"} ); Api2.post_exec("StatsBar", "stat"); Api2.pre_exec("Email", "filterlist"); SET api2_result_Email_filterlist = Api2.exec("Email", "filterlist", {"account"=>FORM.account} ); Api2.post_exec("Email", "filterlist"); %] [% IF FORM.account != "" OR email_acct != ""; SET app_name = 'email_filters'; ELSE; SET app_name = 'global_email_filters'; END; %] [% IF api2_result_Email_filterlist.size; js_code = PROCESS js_block; ELSE; js_code = ""; END; %] [% css_code = PROCESS css_block %] [% WRAPPER '_assets/master.html.tt' app_key = app_name page_js = js_code page_styles = css_code %] [% INCLUDE _assets/_ajaxapp_header.html.tt %]
[% IF email_acct %]

[% locale.maketext("Edit Filters for “[_1]”",email_acct) %]

[% locale.maketext("Create and manage email filters for your main email account. Rules will be processed in the order shown below, from the top down. For more information, read the [output,url,_1,documentation,target,_2,id,_3].", "//go.cpanel.net/UserFilters", "_blank", "lnkUserFiltersDocumentation") %]

[% ELSE %]

[% locale.maketext("Edit Filters for “All Mail on your Account”") %]

[% locale.maketext("Create and manage email filters for your main email account. Rules will be processed in the order shown below, from the top down. For more information, read the [output,url,_1,documentation,target,_2,id,_3].", "//go.cpanel.net/GlobalFilters", "_blank", "lnkGlobalFiltersDocumentation") %]

[% END %]

[% locale.maketext("Create Filter") %]

[% locale.maketext("Create a New Filter") %]
[% IF api2_result_StatsBar_stat.size; SET hashref = api2_result_StatsBar_stat.0; %]

[% locale.maketext("[output,strong,Warning]: You currently use [numf,_1] out of [numf,_2]", hashref.count,hashref.max) %]

[% END %] [% IF api2_result_Email_filterlist.size -%]

[% locale.maketext("Current Filters") %]

[% IF api2_result_Email_filterlist.size; FOREACH hashref IN api2_result_Email_filterlist; %] [% END %] [% END %]

[% locale.maketext("Filter Test") %]

[% locale.maketext("Enter a complete email message (including headers) below to see how the system will process it with the current filters in place.") %]

[% END -%] [% IF FORM.account %] [% INCLUDE _assets/return_link.html.tt return_location='managefilters.html' return_link_text=locale.maketext('Go Back') %] [% ELSE %] [% INCLUDE _assets/return_link.html.tt return_location='../../index.html' return_link_text=locale.maketext('Go Back') %] [% END %] [% INCLUDE _assets/_ajaxapp_footer.html.tt %]
[% END %] [% BLOCK js_block %] [% END %] [% BLOCK css_block %] [% END %]