File tree Expand file tree Collapse file tree 5 files changed +29
-4
lines changed
Expand file tree Collapse file tree 5 files changed +29
-4
lines changed Original file line number Diff line number Diff line change 3838$ error = '' ;
3939
4040// Loading the template
41- $ app ->uses ('tpl,validate_dns ' );
41+ $ app ->uses ('tform, tpl,validate_dns ' );
4242$ app ->tpl ->newTemplate ("form.tpl.htm " );
4343$ app ->tpl ->setInclude ('content_tpl ' , 'templates/dns_import.htm ' );
4444$ app ->load_language_file ('/web/dns/lib/lang/ ' .$ _SESSION ['s ' ]['language ' ].'_dns_wizard.lng ' );
4545
46+ // Check if dns record limit has been reached. We will check only users, not admins
47+ if ($ _SESSION ["s " ]["user " ]["typ " ] == 'user ' ) {
48+ $ app ->tform ->formDef ['db_table_idx ' ] = 'id ' ;
49+ $ app ->tform ->formDef ['db_table ' ] = 'dns_soa ' ;
50+ if (!$ app ->tform ->checkClientLimit ('limit_dns_zone ' )) {
51+ $ app ->error ($ app ->lng ('limit_dns_zone_txt ' ));
52+ }
53+ if (!$ app ->tform ->checkResellerLimit ('limit_dns_zone ' )) {
54+ $ app ->error ('Reseller: ' .$ app ->lng ('limit_dns_zone_txt ' ));
55+ }
56+ }
57+
4658// import variables
4759$ template_id = (isset ($ _POST ['template_id ' ]))?$ app ->functions ->intval ($ _POST ['template_id ' ]):0 ;
4860$ sys_groupid = (isset ($ _POST ['client_group_id ' ]))?$ app ->functions ->intval ($ _POST ['client_group_id ' ]):0 ;
Original file line number Diff line number Diff line change 3636
3737
3838// Loading the template
39- $ app ->uses ('tpl,validate_dns ' );
39+ $ app ->uses ('tpl,validate_dns,tform ' );
4040$ app ->tpl ->newTemplate ("form.tpl.htm " );
4141$ app ->tpl ->setInclude ('content_tpl ' , 'templates/dns_wizard.htm ' );
4242$ app ->load_language_file ('/web/dns/lib/lang/ ' .$ _SESSION ['s ' ]['language ' ].'_dns_wizard.lng ' );
4343
44+ // Check if dns record limit has been reached. We will check only users, not admins
45+ if ($ _SESSION ["s " ]["user " ]["typ " ] == 'user ' ) {
46+ $ app ->tform ->formDef ['db_table_idx ' ] = 'id ' ;
47+ $ app ->tform ->formDef ['db_table ' ] = 'dns_soa ' ;
48+ if (!$ app ->tform ->checkClientLimit ('limit_dns_zone ' )) {
49+ $ app ->error ($ app ->lng ('limit_dns_zone_txt ' ));
50+ }
51+ if (!$ app ->tform ->checkResellerLimit ('limit_dns_zone ' )) {
52+ $ app ->error ('Reseller: ' .$ app ->lng ('limit_dns_zone_txt ' ));
53+ }
54+ }
55+
4456// import variables
4557$ template_id = (isset ($ _POST ['template_id ' ]))?$ app ->functions ->intval ($ _POST ['template_id ' ]):0 ;
4658$ sys_groupid = (isset ($ _POST ['client_group_id ' ]))?$ app ->functions ->intval ($ _POST ['client_group_id ' ]):0 ;
Original file line number Diff line number Diff line change @@ -40,5 +40,6 @@ $wb['globalsearch_noresults_limit_txt'] = '0 Treffer';
4040$wb['globalsearch_searchfield_watermark_txt'] = 'Suche';
4141$wb['globalsearch_suggestions_text_txt'] = 'Vorschläge';
4242$wb['error_no_server_id'] = 'No server provided.';
43- $wb['error_not_allowed_server_id'] = 'The selected server is not allowed for this account.';
43+ $wb['error_not_allowed_server_id'] = 'Der ausgewählte Server ist in diesem Konto nicht verfügbar.';
44+ $wb['limit_dns_zone_txt'] = 'Die maximale Anzahl an DNS Einträgen für Ihr Konto wurde erreicht.';
4445?>
Original file line number Diff line number Diff line change @@ -41,4 +41,5 @@ $wb['globalsearch_searchfield_watermark_txt'] = "Search";
4141$wb['globalsearch_suggestions_text_txt'] = "Suggestions";
4242$wb['error_no_server_id'] = 'No server provided.';
4343$wb['error_not_allowed_server_id'] = 'The selected server is not allowed for this account.';
44+ $wb["limit_dns_zone_txt"] = 'The max. number of DNS zones for your account is reached.';
4445?>
Original file line number Diff line number Diff line change 44 < ol >
55 < li > ###ERRORMSG###</ li >
66 </ ol >
7- < div > TODO: WRONG HTML ELEMENTS</ div >
87 </ div >
98</ div >
You can’t perform that action at this time.
0 commit comments