Marius Burkard
2016-07-01 49441bdd0f3ff75d5092d5b832b97ea722a66363
interface/web/dns/dns_wizard.php
@@ -36,10 +36,22 @@
// 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;
@@ -267,7 +279,7 @@
   elseif(isset($_POST['ns2']) && !preg_match('/^[\w\.\-]{2,64}\.[a-zA-Z0-9]{2,30}$/', $_POST['ns2'])) $error .= $app->lng('error_ns2_regex').'<br />';
   if(isset($_POST['email']) && $_POST['email'] == '') $error .= $app->lng('error_email_empty').'<br />';
   elseif(isset($_POST['email']) && !preg_match('/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z0-9\-]{2,30}$/i', $_POST['email'])) $error .= $app->lng('error_email_regex').'<br />';
   elseif(isset($_POST['email']) && filter_var($_POST['email'], FILTER_VALIDATE_EMAIL) === false) $error .= $app->lng('error_email_regex').'<br />';
   // make sure that the record belongs to the client group and not the admin group when admin inserts it
   if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($_POST['client_group_id'])) {