From 49441bdd0f3ff75d5092d5b832b97ea722a66363 Mon Sep 17 00:00:00 2001 From: Marius Burkard <m.burkard@pixcept.de> Date: Fri, 01 Jul 2016 03:53:30 -0400 Subject: [PATCH] Merge branch 'stable-3.1' --- interface/web/dns/dns_wizard.php | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php index 3cfc397..a0fd131 100644 --- a/interface/web/dns/dns_wizard.php +++ b/interface/web/dns/dns_wizard.php @@ -36,11 +36,23 @@ // Loading the template -$app->uses('tpl,validate_dns'); +$app->uses('tpl,validate_dns,tform'); $app->tpl->newTemplate("form.tpl.htm"); $app->tpl->setInclude('content_tpl', 'templates/dns_wizard.htm'); $app->load_language_file('/web/dns/lib/lang/'.$_SESSION['s']['language'].'_dns_wizard.lng'); +// Check if dns record limit has been reached. We will check only users, not admins +if($_SESSION["s"]["user"]["typ"] == 'user') { + $app->tform->formDef['db_table_idx'] = 'id'; + $app->tform->formDef['db_table'] = 'dns_soa'; + if(!$app->tform->checkClientLimit('limit_dns_zone')) { + $app->error($app->lng('limit_dns_zone_txt')); + } + if(!$app->tform->checkResellerLimit('limit_dns_zone')) { + $app->error('Reseller: '.$app->lng('limit_dns_zone_txt')); + } +} + // import variables $template_id = (isset($_POST['template_id']))?$app->functions->intval($_POST['template_id']):0; $sys_groupid = (isset($_POST['client_group_id']))?$app->functions->intval($_POST['client_group_id']):0; -- Gitblit v1.9.1