function onShowNew() { global $app, $conf, $wb; // Only admins can add domains, so we don't need any check $app->tpl->setVar($wb); parent::onShowNew(); }
function onShowNew() { global $app, $conf; // we will check only users, not admins if ($_SESSION["s"]["user"]["typ"] == 'user') { if (!$app->tform->checkClientLimit('limit_web_aliasdomain', "type = 'alias'")) { $app->error($app->tform->wordbook["limit_web_aliasdomain_txt"]); } if (!$app->tform->checkResellerLimit('limit_web_aliasdomain', "type = 'alias'")) { $app->error('Reseller: ' . $app->tform->wordbook["limit_web_aliasdomain_txt"]); } } parent::onShowNew(); }
function onShowNew() { global $app, $conf; // we will check the limits only when the email address belongs to a client and not the admin if ($_SESSION["s"]["user"]["default_group"] > 0) { if (!$app->tform->checkClientLimit('limit_mailfilter', "")) { $app->error($app->tform->lng("limit_mailfilter_txt")); } if (!$app->tform->checkResellerLimit('limit_mailfilter', "")) { $app->error('Reseller: ' . $app->tform->lng("limit_mailfilter_txt")); } } parent::onShowNew(); }
function onShowNew() { global $app, $conf; // we will check only users, not admins if ($_SESSION["s"]["user"]["typ"] == 'user') { if (!$app->tform->checkClientLimit('limit_mailfilter', "")) { $app->error($app->tform->lng("limit_mailfilter_txt")); } if (!$app->tform->checkResellerLimit('limit_mailfilter', "")) { $app->error('Reseller: ' . $app->tform->lng("limit_mailfilter_txt")); } } parent::onShowNew(); }
function onShowNew() { global $app, $conf; // we will check only users, not admins if ($_SESSION["s"]["user"]["typ"] == 'user') { if (!$app->tform->checkClientLimit('limit_spamfilter_policy')) { $app->error($app->tform->wordbook["limit_spamfilter_policy_txt"]); } if (!$app->tform->checkResellerLimit('limit_spamfilter_policy')) { $app->error('Reseller: ' . $app->tform->wordbook["limit_spamfilter_policy_txt"]); } } parent::onShowNew(); }
function onShowNew() { global $app, $conf; // we will check only users, not admins if ($_SESSION["s"]["user"]["typ"] == 'user') { // Get the limits of the client $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); $client = $app->db->queryOneRecord("SELECT limit_client FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = {$client_group_id}"); // Check if the user may add another website. if ($client["limit_client"] >= 0) { $tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE sys_groupid = {$client_group_id}"); if ($tmp["number"] >= $client["limit_client"]) { $app->error($app->tform->wordbook["limit_client_txt"]); } } } parent::onShowNew(); }
function onShowNew() { global $app, $conf; // we will check only users, not admins if ($_SESSION["s"]["user"]["typ"] == 'user') { if (!$app->tform->checkClientLimit('limit_web_domain', "type = 'vhost'")) { $app->error($app->tform->wordbook["limit_web_domain_txt"]); } if (!$app->tform->checkResellerLimit('limit_web_domain', "type = 'vhost'")) { $app->error('Reseller: ' . $app->tform->wordbook["limit_web_domain_txt"]); } // Get the limits of the client $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); $client = $app->db->queryOneRecord("SELECT client.default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = {$client_group_id}"); $app->tpl->setVar("server_id_value", $client['default_webserver']); } $app->tform->formDef['tabs']['domain']['readonly'] = false; parent::onShowNew(); }