Commit e4baff72 authored by tbrehm's avatar tbrehm
Browse files

Fixed:

FS#665 - Reseller adding email domain 
FS#666 - Reseller adding mysql database 
parent 2dadd224
<?php
$wb["limit_maildomain_txt"] = 'Max. number of email domains';
$wb["limit_mailbox_txt"] = 'Max. number of mailboxes';
$wb["limit_mailalias_txt"] = 'Max. number of email aliases';
$wb["limit_mailforward_txt"] = 'Max. number of email forwarders';
$wb["limit_mailcatchall_txt"] = 'Max. number of email catchall accounts';
$wb["limit_mailrouting_txt"] = 'Max. number of email routes';
$wb["limit_mailfilter_txt"] = 'Max. number of email filters';
$wb["limit_fetchmail_txt"] = 'Max. number of fetchmail accounts';
$wb["limit_mailquota_txt"] = 'Mailbox quota';
$wb["limit_spamfilter_wblist_txt"] = 'Max. number of spamfilter white / blacklist filters';
$wb["limit_spamfilter_user_txt"] = 'Max. number of spamfilter users';
$wb["limit_spamfilter_policy_txt"] = 'Max. number of spamfilter policys';
$wb["default_mailserver_txt"] = 'Default Mailserver';
$wb["company_name_txt"] = 'Company name';
$wb["contact_name_txt"] = 'Contact name';
$wb["username_txt"] = 'Username';
$wb["password_txt"] = 'Password';
$wb["password_strength_txt"] = 'Password strength';
$wb["language_txt"] = 'Language';
$wb["usertheme_txt"] = 'Theme';
$wb["street_txt"] = 'Street';
$wb["zip_txt"] = 'ZIP';
$wb["city_txt"] = 'City';
$wb["state_txt"] = 'State';
$wb["country_txt"] = 'Country';
$wb["telephone_txt"] = 'Telephone';
$wb["mobile_txt"] = 'Mobile';
$wb["fax_txt"] = 'Fax';
$wb["email_txt"] = 'Email';
$wb["internet_txt"] = 'Internet';
$wb["icq_txt"] = 'ICQ';
$wb["notes_txt"] = 'Notes';
$wb["company_txt"] = 'Company';
$wb["title_txt"] = 'Title';
$wb["firstname_txt"] = 'Firstname';
$wb["surname_txt"] = 'Surname';
$wb["limit_domain_txt"] = 'limit_domain';
$wb["limit_subdomain_txt"] = 'limit_subdomain';
$wb["limit_webquota_txt"] = 'limit_webquota';
$wb["limit_database_txt"] = 'limit_database';
$wb["ip_address_txt"] = 'ip_address';
$wb["limit_client_error_notint"] = 'Client Limit is not a number.';
$wb["firstname_error_empty"] = 'Firstname is empty.';
$wb["contact_error_empty"] = 'Contact name is empty.';
$wb["default_webserver_txt"] = 'Default Webserver';
$wb["limit_web_domain_txt"] = 'Max. number of web domains';
$wb["limit_web_aliasdomain_txt"] = 'Max. number of web aliasdomains';
$wb["limit_web_subdomain_txt"] = 'Max. number of web subdomains';
$wb["limit_ftp_user_txt"] = 'Max. number of FTP users';
$wb["default_dnsserver_txt"] = 'Default DNS Server';
$wb["limit_dns_zone_txt"] = 'Max. number of DNS zones';
$wb["limit_dns_record_txt"] = 'Max. number DNS records';
$wb["limit_shell_user_txt"] = 'Max. number of Shell users';
$wb["limit_client_txt"] = 'Max. number of Clients';
$wb["username_error_empty"] = 'Username is empty.';
$wb["username_error_unique"] = 'The username must be unique.';
$wb["limit_maildomain_error_notint"] = 'The email domain limit must be a number.';
$wb["limit_mailbox_error_notint"] = 'The mailbox limit must be a number.';
$wb["limit_mailalias_error_notint"] = 'The email alias limit must be a number.';
$wb["limit_mailforward_error_notint"] = 'The email forward limit must be a number.';
$wb["limit_mailcatchall_error_notint"] = 'The email catchall limit must be a number.';
$wb["limit_mailrouting_error_notint"] = 'The email routing limit must be a number.';
$wb["limit_mailfilter_error_notint"] = 'The email filter limit must be a number.';
$wb["limit_mailfetchmail_error_notint"] = 'The fetchmail limit must be a number.';
$wb["limit_mailquota_error_notint"] = 'The email quota limit must be a number.';
$wb["limit_spamfilter_wblist_error_notint"] = 'The spamfilter white / blacklist limit must be a number.';
$wb["limit_spamfilter_user_error_notint"] = 'The spamfilter user limit must be a number.';
$wb["limit_spamfilter_policy_error_notint"] = 'The spamfilter policy limit must be a number.';
$wb["limit_web_domain_error_notint"] = 'The website limit must be a number.';
$wb["limit_web_aliasdomain_error_notint"] = 'The website alias domain limit must be a number.';
$wb["limit_web_subdomain_error_notint"] = 'The website subdomain limit must be a number.';
$wb["limit_ftp_user_error_notint"] = 'The ftp user limit must be a number.';
$wb["limit_shell_user_error_notint"] = 'The shell user limit must be a number.';
$wb["limit_dns_zone_error_notint"] = 'The dns zone limit must be a number.';
$wb["limit_dns_zone_error_notint"] = 'The dns record limit must be a number.';
$wb["limit_client_error_notint"] = 'The sub client limit must be a number.';
$wb["default_dbserver_txt"] = 'Default Database Server';
$wb["limit_database_txt"] = 'Max. number of Databases';
$wb["limit_database_error_notint"] = 'The database limit must be a number.';
$wb["username_error_regex"] = 'The Username contains invalid chracaters.';
$wb["template_master_txt"] = 'Master template';
$wb["template_additional_txt"] = 'Addon template';
$wb["ssh_chroot_txt"] = 'SSH-Chroot Options';
$wb["web_php_options_txt"] = 'PHP Options';
$wb["limit_client_txt"] = 'The max. number of clients is reached.';
?>
<?php
$wb["limit_maildomain_txt"] = 'Max. number of email domains';
$wb["limit_mailbox_txt"] = 'Max. number of mailboxes';
$wb["limit_mailalias_txt"] = 'Max. number of email aliases';
$wb["limit_mailforward_txt"] = 'Max. number of email forwarders';
$wb["limit_mailcatchall_txt"] = 'Max. number of email catchall accounts';
$wb["limit_mailrouting_txt"] = 'Max. number of email routes';
$wb["limit_mailfilter_txt"] = 'Max. number of email filters';
$wb["limit_fetchmail_txt"] = 'Max. number of fetchmail accounts';
$wb["limit_mailquota_txt"] = 'Mailbox quota';
$wb["limit_spamfilter_wblist_txt"] = 'Max. number of spamfilter white / blacklist filters';
$wb["limit_spamfilter_user_txt"] = 'Max. number of spamfilter users';
$wb["limit_spamfilter_policy_txt"] = 'Max. number of spamfilter policys';
$wb["default_mailserver_txt"] = 'Default Mailserver';
$wb["company_name_txt"] = 'Company name';
$wb["contact_name_txt"] = 'Contact name';
$wb["username_txt"] = 'Username';
$wb["password_txt"] = 'Password';
$wb["password_strength_txt"] = 'Password strength';
$wb["language_txt"] = 'Language';
$wb["usertheme_txt"] = 'Theme';
$wb["street_txt"] = 'Street';
$wb["zip_txt"] = 'ZIP';
$wb["city_txt"] = 'City';
$wb["state_txt"] = 'State';
$wb["country_txt"] = 'Country';
$wb["telephone_txt"] = 'Telephone';
$wb["mobile_txt"] = 'Mobile';
$wb["fax_txt"] = 'Fax';
$wb["email_txt"] = 'Email';
$wb["internet_txt"] = 'Internet';
$wb["icq_txt"] = 'ICQ';
$wb["notes_txt"] = 'Notes';
$wb["company_txt"] = 'Company';
$wb["title_txt"] = 'Title';
$wb["firstname_txt"] = 'Firstname';
$wb["surname_txt"] = 'Surname';
$wb["limit_domain_txt"] = 'limit_domain';
$wb["limit_subdomain_txt"] = 'limit_subdomain';
$wb["limit_webquota_txt"] = 'limit_webquota';
$wb["limit_database_txt"] = 'limit_database';
$wb["ip_address_txt"] = 'ip_address';
$wb["limit_client_error_notint"] = 'Client Limit is not a number.';
$wb["firstname_error_empty"] = 'Firstname is empty.';
$wb["contact_error_empty"] = 'Contact name is empty.';
$wb["default_webserver_txt"] = 'Default Webserver';
$wb["limit_web_domain_txt"] = 'Max. number of web domains';
$wb["limit_web_aliasdomain_txt"] = 'Max. number of web aliasdomains';
$wb["limit_web_subdomain_txt"] = 'Max. number of web subdomains';
$wb["limit_ftp_user_txt"] = 'Max. number of FTP users';
$wb["default_dnsserver_txt"] = 'Default DNS Server';
$wb["limit_dns_zone_txt"] = 'Max. number of DNS zones';
$wb["limit_dns_record_txt"] = 'Max. number DNS records';
$wb["limit_shell_user_txt"] = 'Max. number of Shell users';
$wb["limit_client_txt"] = 'Max. number of Clients';
$wb["username_error_empty"] = 'Username is empty.';
$wb["username_error_unique"] = 'The username must be unique.';
$wb["limit_maildomain_error_notint"] = 'The email domain limit must be a number.';
$wb["limit_mailbox_error_notint"] = 'The mailbox limit must be a number.';
$wb["limit_mailalias_error_notint"] = 'The email alias limit must be a number.';
$wb["limit_mailforward_error_notint"] = 'The email forward limit must be a number.';
$wb["limit_mailcatchall_error_notint"] = 'The email catchall limit must be a number.';
$wb["limit_mailrouting_error_notint"] = 'The email routing limit must be a number.';
$wb["limit_mailfilter_error_notint"] = 'The email filter limit must be a number.';
$wb["limit_mailfetchmail_error_notint"] = 'The fetchmail limit must be a number.';
$wb["limit_mailquota_error_notint"] = 'The email quota limit must be a number.';
$wb["limit_spamfilter_wblist_error_notint"] = 'The spamfilter white / blacklist limit must be a number.';
$wb["limit_spamfilter_user_error_notint"] = 'The spamfilter user limit must be a number.';
$wb["limit_spamfilter_policy_error_notint"] = 'The spamfilter policy limit must be a number.';
$wb["limit_web_domain_error_notint"] = 'The website limit must be a number.';
$wb["limit_web_aliasdomain_error_notint"] = 'The website alias domain limit must be a number.';
$wb["limit_web_subdomain_error_notint"] = 'The website subdomain limit must be a number.';
$wb["limit_ftp_user_error_notint"] = 'The ftp user limit must be a number.';
$wb["limit_shell_user_error_notint"] = 'The shell user limit must be a number.';
$wb["limit_dns_zone_error_notint"] = 'The dns zone limit must be a number.';
$wb["limit_dns_zone_error_notint"] = 'The dns record limit must be a number.';
$wb["limit_client_error_notint"] = 'The sub client limit must be a number.';
$wb["default_dbserver_txt"] = 'Default Database Server';
$wb["limit_database_txt"] = 'Max. number of Databases';
$wb["limit_database_error_notint"] = 'The database limit must be a number.';
$wb["username_error_regex"] = 'The Username contains invalid chracaters.';
$wb["template_master_txt"] = 'Master template';
$wb["template_additional_txt"] = 'Addon template';
$wb["ssh_chroot_txt"] = 'SSH-Chroot Options';
$wb["web_php_options_txt"] = 'PHP Options';
$wb["limit_client_error"] = 'The max. number of clients is reached.';
?>
......@@ -75,7 +75,7 @@ class page_action extends tform_actions {
function onShowEnd() {
global $app, $conf;
if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
if($_SESSION["s"]["user"]["typ"] == 'admin') {
// Getting Clients of the user
if($_SESSION["s"]["user"]["typ"] == 'admin') {
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0";
......@@ -92,9 +92,36 @@ class page_action extends tform_actions {
$client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
$app->tpl->setVar("client_group_id",$client_select);
} elseif ($_SESSION["s"]["user"]["typ"] != 'admin' && $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
// Get the limits of the client
$client_group_id = $_SESSION["s"]["user"]["default_group"];
$client = $app->db->queryOneRecord("SELECT client.client_id, limit_web_domain, default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
// Set the webserver to the default server of the client
$tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = $client[default_webserver]");
$app->tpl->setVar("server_id","<option value='$client[default_webserver]'>$tmp[server_name]</option>");
unset($tmp);
// Fill the client select field
$sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id'];
$clients = $app->db->queryAllRecords($sql);
$client_select = '';
if(is_array($clients)) {
foreach( $clients as $client) {
$selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':'';
$client_select .= "<option value='$client[groupid]' $selected>$client[name]</option>\r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
}
// Get the spamfilter policys for the user
$tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = '@".$this->dataRecord["domain"]."'");
$sql = "SELECT id, policy_name FROM spamfilter_policy WHERE ".$app->tform->getAuthSQL('r');
......
......@@ -91,15 +91,15 @@ class page_action extends tform_actions {
// Get the limits of the client
$client_group_id = $_SESSION["s"]["user"]["default_group"];
$client = $app->db->queryOneRecord("SELECT client_id, default_dbserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
$client = $app->db->queryOneRecord("SELECT client.client_id, limit_web_domain, default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
// Set the webserver to the default server of the client
$tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = $client[default_dbserver]");
$app->tpl->setVar("server_id","<option value='$client[default_dbserver]'>$tmp[server_name]</option>");
$tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = $client[default_webserver]");
$app->tpl->setVar("server_id","<option value='$client[default_webserver]'>$tmp[server_name]</option>");
unset($tmp);
// Fill the client select field
$sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.parent_client_id AND client.parent_client_id = ".$client['client_id'];
$sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id'];
$clients = $app->db->queryAllRecords($sql);
$client_select = '';
if(is_array($clients)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment