|
|
|
@@ -9,8 +9,8 @@ Clase para el control de los límites de los usuarios con el módulo WebDNS. |
|
|
|
|
|
|
|
require_once '../../lib/app.inc.php'; |
|
|
|
|
|
|
|
//Carga de idioma para el texto de error de los límites DNS para el cliente |
|
|
|
$app->load_language_file('/web/dns/lib/lang/'.$_SESSION['s']['language'].'_dns_wizard.lng'); |
|
|
|
//Carga de idioma para el texto de error de los límites DNS para el usuario logeado. |
|
|
|
$app->load_language_file('/web/webdns/lib/lang/'.$_SESSION['s']['language'].'_new_service_webdns.lng'); |
|
|
|
|
|
|
|
$app->uses('tform,tform_actions'); |
|
|
|
$app->load('tform_actions'); |
|
|
|
@@ -37,31 +37,35 @@ class limites { |
|
|
|
global $app; |
|
|
|
|
|
|
|
//Límites DNS |
|
|
|
//Es necesario cargar estos valores en el formulario para que funcione la comprobación de los límites para el cliente |
|
|
|
//Es necesario cargar estos valores en el formulario para que funcione la comprobación |
|
|
|
//de los límites para el cliente |
|
|
|
$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')); |
|
|
|
} |
|
|
|
|
|
|
|
$app->error('Reventa: '.$app->lng('limit_dns_zone_txt')); |
|
|
|
} |
|
|
|
|
|
|
|
$app->tform->formDef['db_table_idx'] = 'database_id'; |
|
|
|
$app->tform->formDef['db_table'] = 'web_database'; |
|
|
|
//Límites BBDD |
|
|
|
if(!$app->tform->checkClientLimit('limit_database')) { |
|
|
|
$app->error($app->tform->wordbook["limit_database_txt"]); |
|
|
|
} |
|
|
|
if(!$app->tform->checkResellerLimit('limit_database')) { |
|
|
|
$app->error('Reseller: '.$app->tform->wordbook["limit_database_txt"]); |
|
|
|
$app->error('Reventa: '.$app->tform->wordbook["limit_database_txt"]); |
|
|
|
} |
|
|
|
|
|
|
|
$app->tform->formDef['db_table_idx'] = 'domain_id'; |
|
|
|
$app->tform->formDef['db_table'] = 'web_domain'; |
|
|
|
//Límites Sitios Web |
|
|
|
if(!$app->tform->checkClientLimit('limit_web_domain')) { |
|
|
|
$app->error($app->tform->wordbook["limit_web_domain_txt"]); |
|
|
|
} |
|
|
|
if(!$app->tform->checkResellerLimit('limit_web_domain')) { |
|
|
|
$app->error('Reseller: '.$app->tform->wordbook["limit_web_domain_txt"]); |
|
|
|
$app->error('Reventa: '.$app->tform->wordbook["limit_web_domain_txt"]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|