diff --git a/install/dist/lib/centos52.lib.php b/install/dist/lib/centos52.lib.php
index 8accc9a1ec3c5e516f36b0fad99a2690e2e33fd3..a7e4f945c29e6b9f6682f6654e976984bbd4f802 100644
--- a/install/dist/lib/centos52.lib.php
+++ b/install/dist/lib/centos52.lib.php
@@ -41,7 +41,7 @@ class installer extends installer_dist {
}
// load files
- $content = rf('tpl/mm_cfg.py.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mm_cfg.py.master', 'tpl/mm_cfg.py.master');
$old_file = rf($full_file_name);
$old_options = array();
@@ -67,7 +67,11 @@ class installer extends installer_dist {
copy($full_file_name, $config_dir.'virtual_to_transport.sh~');
}
- copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh', $full_file_name);
+ } else {
+ copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
+ }
chgrp($full_file_name,'mailman');
chmod($full_file_name,0750);
@@ -110,7 +114,7 @@ class installer extends installer_dist {
$configfile = 'fedora_amavisd_conf';
if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf')) copy($conf["amavis"]["config_dir"].'/amavisd.conf',$conf["amavis"]["config_dir"].'/amavisd.conf~');
if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf~')) exec('chmod 400 '.$conf["amavis"]["config_dir"].'/amavisd.conf~');
- $content = rf("tpl/".$configfile.".master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/".$configfile.".master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -142,7 +146,7 @@ class installer extends installer_dist {
// Only add the content if we had not addded it before
if(!stristr($content,"127.0.0.1:10025")) {
unset($content);
- $content = rf("tpl/master_cf_amavis.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/master_cf_amavis.master', "tpl/master_cf_amavis.master");
af($conf["postfix"]["config_dir"].'/master.cf',$content);
}
unset($content);
diff --git a/install/dist/lib/centos53.lib.php b/install/dist/lib/centos53.lib.php
index d1960a1c58f98c6e2379b1ebef40ba83a7f88c05..91f1746c784d77f1b92c85b5da1bc562e222e9ff 100644
--- a/install/dist/lib/centos53.lib.php
+++ b/install/dist/lib/centos53.lib.php
@@ -41,7 +41,7 @@ class installer extends installer_dist {
}
// load files
- $content = rf('tpl/mm_cfg.py.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mm_cfg.py.master', 'tpl/mm_cfg.py.master');
$old_file = rf($full_file_name);
$old_options = array();
@@ -67,7 +67,11 @@ class installer extends installer_dist {
copy($full_file_name, $config_dir.'virtual_to_transport.sh~');
}
- copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh', $full_file_name);
+ } else {
+ copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
+ }
chgrp($full_file_name,'mailman');
chmod($full_file_name,0750);
@@ -111,7 +115,7 @@ class installer extends installer_dist {
if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf')) copy($conf["amavis"]["config_dir"].'/amavisd.conf',$conf["amavis"]["config_dir"].'/amavisd.conf~');
if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf~')) exec('chmod 400 '.$conf["amavis"]["config_dir"].'/amavisd.conf~');
if(!is_dir($conf["amavis"]["config_dir"])) mkdir($conf["amavis"]["config_dir"]);
- $content = rf("tpl/".$configfile.".master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/".$configfile.".master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -143,7 +147,7 @@ class installer extends installer_dist {
// Only add the content if we had not addded it before
if(!stristr($content,"127.0.0.1:10025")) {
unset($content);
- $content = rf("tpl/master_cf_amavis.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/master_cf_amavis.master', "tpl/master_cf_amavis.master");
af($conf["postfix"]["config_dir"].'/master.cf',$content);
}
unset($content);
diff --git a/install/dist/lib/debian60.lib.php b/install/dist/lib/debian60.lib.php
index 3430478782b68ab85a6dfd32925c88e1f8c5f9ca..e1be29132be2ea226f984492330d9580ec6da05b 100644
--- a/install/dist/lib/debian60.lib.php
+++ b/install/dist/lib/debian60.lib.php
@@ -86,9 +86,17 @@ class installer extends installer_base {
//* Copy dovecot configuration file
if($dovecot_version == 2) {
- copy('tpl/debian6_dovecot2.conf.master',$config_dir.'/'.$configfile);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot2.conf.master')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot2.conf.master', $config_dir.'/'.$configfile);
+ } else {
+ copy('tpl/debian6_dovecot2.conf.master',$config_dir.'/'.$configfile);
+ }
} else {
- copy('tpl/debian6_dovecot.conf.master',$config_dir.'/'.$configfile);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot.conf.master')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot.conf.master', $config_dir.'/'.$configfile);
+ } else {
+ copy('tpl/debian6_dovecot.conf.master',$config_dir.'/'.$configfile);
+ }
}
//* dovecot-sql.conf
@@ -97,7 +105,7 @@ class installer extends installer_base {
copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
chmod($config_dir.'/'.$configfile.'~', 0400);
}
- $content = rf('tpl/debian6_dovecot-sql.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot-sql.conf.master', 'tpl/debian6_dovecot-sql.conf.master');
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index aa83141c646bebfe2e3c8d2bafd84d0481148d28..a0136f66010e141f0707f26d4be9500397aa4579 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -41,7 +41,7 @@ class installer_dist extends installer_base {
}
// load files
- $content = rf('tpl/mm_cfg.py.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mm_cfg.py.master', 'tpl/mm_cfg.py.master');
$old_file = rf($full_file_name);
$old_options = array();
@@ -98,7 +98,11 @@ class installer_dist extends installer_base {
}
if(is_dir('/etc/mailman')) {
- copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh', $full_file_name);
+ } else {
+ copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
+ }
chgrp($full_file_name,'mailman');
chmod($full_file_name,0750);
}
@@ -162,38 +166,16 @@ class installer_dist extends installer_base {
if(!is_user($cf['vmail_username'])) caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
//* These postconf commands will be executed on installation and update
- $postconf_commands = array (
- 'virtual_alias_domains =',
- 'virtual_alias_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_forwardings.cf, mysql:'.$config_dir.'/mysql-virtual_email2email.cf',
- 'virtual_mailbox_domains = proxy:mysql:'.$config_dir.'/mysql-virtual_domains.cf',
- 'virtual_mailbox_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_mailboxes.cf',
- 'virtual_mailbox_base = '.$cf['vmail_mailbox_base'],
- 'virtual_uid_maps = static:'.$cf['vmail_userid'],
- 'virtual_gid_maps = static:'.$cf['vmail_groupid'],
- 'smtpd_sasl_auth_enable = yes',
- 'broken_sasl_auth_clients = yes',
- 'smtpd_sasl_authenticated_header = yes',
- 'smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:'.$config_dir.'/mysql-virtual_recipient.cf, reject_unauth_destination',
- 'smtpd_use_tls = yes',
- 'smtpd_tls_security_level = may',
- 'smtpd_tls_cert_file = '.$config_dir.'/smtpd.cert',
- 'smtpd_tls_key_file = '.$config_dir.'/smtpd.key',
- 'transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:'.$config_dir.'/mysql-virtual_transports.cf',
- 'relay_domains = mysql:'.$config_dir.'/mysql-virtual_relaydomains.cf',
- 'relay_recipient_maps = mysql:'.$config_dir.'/mysql-virtual_relayrecipientmaps.cf',
- 'proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps',
- 'smtpd_sender_restrictions = check_sender_access mysql:'.$config_dir.'/mysql-virtual_sender.cf',
- 'smtpd_client_restrictions = check_client_access mysql:'.$config_dir.'/mysql-virtual_client.cf',
- 'maildrop_destination_concurrency_limit = 1',
- 'maildrop_destination_recipient_limit = 1',
- 'virtual_transport = maildrop',
- 'header_checks = regexp:'.$config_dir.'/header_checks',
- 'mime_header_checks = regexp:'.$config_dir.'/mime_header_checks',
- 'nested_header_checks = regexp:'.$config_dir.'/nested_header_checks',
- 'body_checks = regexp:'.$config_dir.'/body_checks',
- 'inet_interfaces = all'
- );
-
+ $postconf_placeholders = array('{config_dir}' => $config_dir,
+ '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
+ '{vmail_userid}' => $cf['vmail_userid'],
+ '{vmail_groupid}' => $cf['vmail_groupid'],
+ '{rbl_list}' => $rbl_list);
+
+ $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_postfix.conf.master', 'tpl/fedora_postfix.conf.master');
+ $postconf_tpl = strtr($postconf_tpl, $postconf_placeholders);
+ $postconf_commands = array_filter(explode("\n", $postconf_tpl)); // read and remove empty lines
+
//* These postconf commands will be executed on installation only
if($this->is_update == false) {
$postconf_commands = array_merge($postconf_commands,array(
@@ -278,7 +260,7 @@ class installer_dist extends installer_base {
if(is_file($cf['vmail_mailbox_base'].'/.'.$configfile)){
copy($cf['vmail_mailbox_base'].'/.'.$configfile, $cf['vmail_mailbox_base'].'/.'.$configfile.'~');
}
- $content = rf("tpl/$configfile.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/$configfile.master");
$content = str_replace('{dist_postfix_vmail_mailbox_base}', $cf['vmail_mailbox_base'], $content);
wf($cf['vmail_mailbox_base'].'/.'.$configfile, $content);
@@ -299,7 +281,7 @@ class installer_dist extends installer_base {
global $conf;
$configfile = 'tpl/fedora_saslauthd_smtpd_conf.master';
- $content = rf($configfile);
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_saslauthd_smtpd_conf.master', $configfile);
wf('/usr/lib/sasl2/smtpd.conf',$content);
if(is_dir('/usr/lib64')) wf('/usr/lib64/sasl/smtpd.conf',$content);
if(is_dir('/usr/lib64')) wf('/usr/lib64/sasl2/smtpd.conf',$content);
@@ -315,7 +297,7 @@ class installer_dist extends installer_base {
if(is_file("$pam/smtp")) copy("$pam/smtp", "$pam/smtp~");
if(is_file("$pam/smtp~")) exec("chmod 400 $pam/smtp~");
- $content = rf("tpl/$configfile.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/$configfile.master");
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
@@ -338,7 +320,7 @@ class installer_dist extends installer_base {
copy("$config_dir/$configfile", "$config_dir/$configfile~");
}
exec("chmod 400 $config_dir/$configfile~");
- $content = rf("tpl/$configfile.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/$configfile.master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -421,11 +403,19 @@ class installer_dist extends installer_base {
//* Copy dovecot configuration file
if($dovecot_version == 2) {
- copy('tpl/fedora_dovecot2.conf.master',$config_dir.'/'.$configfile);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_dovecot2.conf.master')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_dovecot2.conf.master', $config_dir.'/'.$configfile);
+ } else {
+ copy('tpl/fedora_dovecot2.conf.master',$config_dir.'/'.$configfile);
+ }
} else {
- copy('tpl/fedora_dovecot.conf.master',$config_dir.'/'.$configfile);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_dovecot.conf.master')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_dovecot.conf.master', $config_dir.'/'.$configfile);
+ } else {
+ copy('tpl/fedora_dovecot.conf.master',$config_dir.'/'.$configfile);
+ }
}
-
+
//* dovecot-sql.conf
$configfile = 'dovecot-sql.conf';
if(is_file("$config_dir/$configfile")){
@@ -433,7 +423,7 @@ class installer_dist extends installer_base {
exec("chmod 400 $config_dir/$configfile~");
}
- $content = rf("tpl/fedora_dovecot-sql.conf.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_dovecot-sql.conf.master', "tpl/fedora_dovecot-sql.conf.master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -452,7 +442,7 @@ class installer_dist extends installer_base {
$configfile = 'fedora_amavisd_conf';
if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf')) copy($conf["amavis"]["config_dir"].'/amavisd.conf',$conf["amavis"]["config_dir"].'/amavisd.conf~');
if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf~')) exec('chmod 400 '.$conf["amavis"]["config_dir"].'/amavisd.conf~');
- $content = rf("tpl/".$configfile.".master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/".$configfile.".master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -483,7 +473,7 @@ class installer_dist extends installer_base {
// Only add the content if we had not addded it before
if(!stristr($content,"127.0.0.1:10025")) {
unset($content);
- $content = rf("tpl/master_cf_amavis.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/master_cf_amavis.master', "tpl/master_cf_amavis.master");
af($conf["postfix"]["config_dir"].'/master.cf',$content);
}
unset($content);
@@ -546,7 +536,7 @@ class installer_dist extends installer_base {
if(is_file("$config_dir/$configfile~")){
exec("chmod 400 $config_dir/$configfile~");
}
- $content = rf('tpl/pureftpd_mysql.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/pureftpd_mysql.conf.master', 'tpl/pureftpd_mysql.conf.master');
$content = str_replace('{mysql_server_ispconfig_user}', $conf["mysql"]["ispconfig_user"], $content);
$content = str_replace('{mysql_server_ispconfig_password}', $conf["mysql"]["ispconfig_password"], $content);
$content = str_replace('{mysql_server_database}', $conf["mysql"]["database"], $content);
@@ -557,7 +547,11 @@ class installer_dist extends installer_base {
exec("chown root:root $config_dir/$configfile");
// copy our customized copy of pureftpd.conf to the pure-ftpd config directory
- exec("cp tpl/fedora_pureftpd_conf.master $config_dir/pure-ftpd.conf");
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_pureftpd_conf.master')) {
+ exec("cp " . $conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_pureftpd_conf.master ' . "$config_dir/pure-ftpd.conf");
+ }else {
+ exec("cp tpl/fedora_pureftpd_conf.master $config_dir/pure-ftpd.conf");
+ }
}
@@ -569,7 +563,7 @@ class installer_dist extends installer_base {
$configfile = 'mydns.conf';
if(is_file($conf["mydns"]["config_dir"].'/'.$configfile)) copy($conf["mydns"]["config_dir"].'/'.$configfile,$conf["mydns"]["config_dir"].'/'.$configfile.'~');
if(is_file($conf["mydns"]["config_dir"].'/'.$configfile.'~')) exec('chmod 400 '.$conf["mydns"]["config_dir"].'/'.$configfile.'~');
- $content = rf("tpl/".$configfile.".master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/".$configfile.".master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -633,7 +627,7 @@ class installer_dist extends installer_base {
$vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir'];
// copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf');
- $content = rf('tpl/apache_ispconfig.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_ispconfig.conf.master', 'tpl/apache_ispconfig.conf.master');
$records = $this->db->queryAllRecords('SELECT * FROM '.$conf['mysql']['master_database'].'.server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'");
if(is_array($records) && count($records) > 0) {
@@ -727,7 +721,11 @@ class installer_dist extends installer_base {
if(is_dir("/etc/Bastille")) caselog("mv -f /etc/Bastille /etc/Bastille.backup", __FILE__, __LINE__);
@mkdir("/etc/Bastille", octdec($directory_mode));
if(is_dir("/etc/Bastille.backup/firewall.d")) caselog("cp -pfr /etc/Bastille.backup/firewall.d /etc/Bastille/", __FILE__, __LINE__);
- caselog("cp -f tpl/bastille-firewall.cfg.master /etc/Bastille/bastille-firewall.cfg", __FILE__, __LINE__);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/bastille-firewall.cfg.master')) {
+ caselog("cp -f " . $conf['ispconfig_install_dir']."/server/conf-custom/install/bastille-firewall.cfg.master /etc/Bastille/bastille-firewall.cfg", __FILE__, __LINE__);
+ } else {
+ caselog("cp -f tpl/bastille-firewall.cfg.master /etc/Bastille/bastille-firewall.cfg", __FILE__, __LINE__);
+ }
caselog("chmod 644 /etc/Bastille/bastille-firewall.cfg", __FILE__, __LINE__);
$content = rf("/etc/Bastille/bastille-firewall.cfg");
$content = str_replace("{DNS_SERVERS}", "", $content);
@@ -815,7 +813,7 @@ class installer_dist extends installer_base {
if(is_file($install_dir.'/interface/lib/'.$configfile)){
copy("$install_dir/interface/lib/$configfile", "$install_dir/interface/lib/$configfile~");
}
- $content = rf("tpl/$configfile.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/$configfile.master");
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
@@ -839,7 +837,7 @@ class installer_dist extends installer_base {
if(is_file($install_dir.'/server/lib/'.$configfile)){
copy("$install_dir/server/lib/$configfile", "$install_dir/interface/lib/$configfile~");
}
- $content = rf("tpl/$configfile.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/$configfile.master");
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
@@ -1014,7 +1012,7 @@ class installer_dist extends installer_base {
// Dont just copy over the virtualhost template but add some custom settings
- $content = rf("tpl/apache_ispconfig.vhost.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_ispconfig.vhost.master', "tpl/apache_ispconfig.vhost.master");
$content = str_replace('{vhost_port}', $conf['apache']['vhost_port'], $content);
// comment out the listen directive if port is 80 or 443
@@ -1055,7 +1053,7 @@ class installer_dist extends installer_base {
replaceLine('/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter','PHPRC=','PHPRC=/etc/',0,0);
*/
//if(!is_file('/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter')) {
- $content = rf('tpl/apache_ispconfig_fcgi_starter.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_ispconfig_fcgi_starter.master', 'tpl/apache_ispconfig_fcgi_starter.master');
$content = str_replace('{fastcgi_bin}', $conf['fastcgi']['fastcgi_bin'], $content);
$content = str_replace('{fastcgi_phpini_path}', $conf['fastcgi']['fastcgi_phpini_path'], $content);
if(!is_dir('/var/www/php-fcgi-scripts/ispconfig')) exec('mkdir -p /var/www/php-fcgi-scripts/ispconfig');
@@ -1073,7 +1071,7 @@ class installer_dist extends installer_base {
$vhost_conf_enabled_dir = $conf['nginx']['vhost_conf_enabled_dir'];
// Dont just copy over the virtualhost template but add some custom settings
- $content = rf('tpl/nginx_ispconfig.vhost.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/nginx_ispconfig.vhost.master', 'tpl/nginx_ispconfig.vhost.master');
$content = str_replace('{vhost_port}', $conf['nginx']['vhost_port'], $content);
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
@@ -1100,7 +1098,7 @@ class installer_dist extends installer_base {
// PHP-FPM
// Dont just copy over the php-fpm pool template but add some custom settings
- $content = rf('tpl/php_fpm_pool.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/php_fpm_pool.conf.master', 'tpl/php_fpm_pool.conf.master');
$content = str_replace('{fpm_pool}', 'ispconfig', $content);
//$content = str_replace('{fpm_port}', $conf['nginx']['php_fpm_start_port'], $content);
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
@@ -1195,7 +1193,7 @@ class installer_dist extends installer_base {
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
- $content = rf("tpl/mysql_clientdb.conf.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mysql_clientdb.conf.master', "tpl/mysql_clientdb.conf.master");
$content = str_replace('{hostname}',$conf['mysql']['host'],$content);
$content = str_replace('{username}',$conf['mysql']['admin_user'],$content);
$content = str_replace('{password}',$conf['mysql']['admin_password'], $content);
diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php
index bc6b4993dcabf3b2a36eb6eedc83c9a71c6d07dd..382689cd55cdb1bf9ca08e711fbe7cd4bf62beb6 100644
--- a/install/dist/lib/gentoo.lib.php
+++ b/install/dist/lib/gentoo.lib.php
@@ -81,35 +81,15 @@ class installer extends installer_base
}
//* These postconf commands will be executed on installation and update
- $postconf_commands = array (
- 'virtual_alias_domains =',
- 'virtual_alias_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_forwardings.cf, mysql:'.$config_dir.'/mysql-virtual_email2email.cf',
- 'virtual_mailbox_domains = proxy:mysql:'.$config_dir.'/mysql-virtual_domains.cf',
- 'virtual_mailbox_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_mailboxes.cf',
- 'virtual_mailbox_base = '.$cf['vmail_mailbox_base'],
- 'virtual_uid_maps = static:'.$cf['vmail_userid'],
- 'virtual_gid_maps = static:'.$cf['vmail_groupid'],
- 'smtpd_sasl_auth_enable = yes',
- 'broken_sasl_auth_clients = yes',
- 'smtpd_sasl_authenticated_header = yes',
- 'smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:'.$config_dir.'/mysql-virtual_recipient.cf, reject_unauth_destination',
- 'smtpd_use_tls = yes',
- 'smtpd_tls_security_level = may',
- 'smtpd_tls_cert_file = '.$config_dir.'/smtpd.cert',
- 'smtpd_tls_key_file = '.$config_dir.'/smtpd.key',
- 'transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:'.$config_dir.'/mysql-virtual_transports.cf',
- 'relay_domains = mysql:'.$config_dir.'/mysql-virtual_relaydomains.cf',
- 'proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps',
- 'smtpd_sender_restrictions = check_sender_access mysql:'.$config_dir.'/mysql-virtual_sender.cf',
- 'smtpd_client_restrictions = check_client_access mysql:'.$config_dir.'/mysql-virtual_client.cf',
- 'maildrop_destination_concurrency_limit = 1',
- 'maildrop_destination_recipient_limit = 1',
- 'virtual_transport = maildrop',
- 'header_checks = regexp:'.$config_dir.'/header_checks',
- 'mime_header_checks = regexp:'.$config_dir.'/mime_header_checks',
- 'nested_header_checks = regexp:'.$config_dir.'/nested_header_checks',
- 'body_checks = regexp:'.$config_dir.'/body_checks'
- );
+ $postconf_placeholders = array('{config_dir}' => $config_dir,
+ '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
+ '{vmail_userid}' => $cf['vmail_userid'],
+ '{vmail_groupid}' => $cf['vmail_groupid'],
+ '{rbl_list}' => $rbl_list);
+
+ $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/gentoo_postfix.conf.master', 'tpl/gentoo_postfix.conf.master');
+ $postconf_tpl = strtr($postconf_tpl, $postconf_placeholders);
+ $postconf_commands = array_filter(explode("\n", $postconf_tpl)); // read and remove empty lines
//* These postconf commands will be executed on installation only
if($this->is_update == false) {
@@ -165,7 +145,7 @@ class installer extends installer_base
$this->write_config_file($configfile, $content);
//* Writing the Maildrop mailfilter file
- $content = rf('tpl/mailfilter.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailfilter.master', 'tpl/mailfilter.master');
$content = str_replace('{dist_postfix_vmail_mailbox_base}', $cf['vmail_mailbox_base'], $content);
$this->write_config_file($cf['vmail_mailbox_base'].'/.mailfilter', $content);
@@ -612,7 +592,7 @@ class installer extends installer_base
//if ( !is_file($conf['web']['website_basedir'].'/php-fcgi-scripts/apps/.php-fcgi-starter') )
//{
- $content = rf('tpl/apache_apps_fcgi_starter.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_apps_fcgi_starter.master', 'tpl/apache_apps_fcgi_starter.master');
$content = str_replace('{fastcgi_bin}', $conf['fastcgi']['fastcgi_bin'], $content);
$content = str_replace('{fastcgi_phpini_path}', $conf['fastcgi']['fastcgi_phpini_path'], $content);
mkdir($conf['web']['website_basedir'].'/php-fcgi-scripts/apps', 0755, true);
@@ -652,7 +632,7 @@ class installer extends installer_base
$apps_vhost_servername = ($conf['web']['apps_vhost_servername'] == '')?'_':$conf['web']['apps_vhost_servername'];
// Dont just copy over the virtualhost template but add some custom settings
- $content = rf('tpl/nginx_apps.vhost.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/nginx_apps.vhost.master', 'tpl/nginx_apps.vhost.master');
if($conf['web']['apps_vhost_ip'] == '_default_'){
$apps_vhost_ip = '';
@@ -678,7 +658,7 @@ class installer extends installer_base
// PHP-FPM
// Dont just copy over the php-fpm pool template but add some custom settings
- $content = rf('tpl/apps_php_fpm_pool.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apps_php_fpm_pool.conf.master', 'tpl/apps_php_fpm_pool.conf.master');
$content = str_replace('{fpm_pool}', 'apps', $content);
//$content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content);
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
@@ -943,7 +923,7 @@ class installer extends installer_base
$this->write_config_file($vhost_path, $content);
if(!is_file('/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter')) {
- $content = rf('tpl/apache_ispconfig_fcgi_starter.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_ispconfig_fcgi_starter.master', 'tpl/apache_ispconfig_fcgi_starter.master');
$content = str_replace('{fastcgi_bin}', $conf['fastcgi']['fastcgi_bin'], $content);
$content = str_replace('{fastcgi_phpini_path}', $conf['fastcgi']['fastcgi_phpini_path'], $content);
@mkdir('/var/www/php-fcgi-scripts/ispconfig', 0755, true);
@@ -961,7 +941,7 @@ class installer extends installer_base
$vhost_conf_enabled_dir = $conf['nginx']['vhost_conf_enabled_dir'];
// Dont just copy over the virtualhost template but add some custom settings
- $content = rf('tpl/nginx_ispconfig.vhost.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/nginx_ispconfig.vhost.master', 'tpl/nginx_ispconfig.vhost.master');
$content = str_replace('{vhost_port}', $conf['nginx']['vhost_port'], $content);
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
@@ -988,7 +968,7 @@ class installer extends installer_base
// PHP-FPM
// Dont just copy over the php-fpm pool template but add some custom settings
- $content = rf('tpl/php_fpm_pool.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/php_fpm_pool.conf.master', 'tpl/php_fpm_pool.conf.master');
$content = str_replace('{fpm_pool}', 'ispconfig', $content);
//$content = str_replace('{fpm_port}', $conf['nginx']['php_fpm_start_port'], $content);
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index 197aa15322920abef921b3a838bad1c2e92a5887..57b2cd6d6f37739d33d4c0c41220c157a7815614 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -41,7 +41,7 @@ class installer_dist extends installer_base {
}
// load files
- $content = rf('tpl/mm_cfg.py.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mm_cfg.py.master', 'tpl/mm_cfg.py.master');
$old_file = rf($full_file_name);
$old_options = array();
@@ -98,7 +98,11 @@ class installer_dist extends installer_base {
}
if(is_dir('/etc/mailman')) {
- copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh', $full_file_name);
+ } else {
+ copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
+ }
chgrp($full_file_name,'mailman');
chmod($full_file_name,0750);
}
@@ -175,37 +179,15 @@ class installer_dist extends installer_base {
if($cf['vmail_mailbox_base'] != '' && strlen($cf['vmail_mailbox_base']) >= 10 && $this->is_update === false) exec('chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base']);
//* These postconf commands will be executed on installation and update
- $postconf_commands = array (
- 'virtual_alias_domains =',
- 'virtual_alias_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_forwardings.cf, mysql:'.$config_dir.'/mysql-virtual_email2email.cf',
- 'virtual_mailbox_domains = proxy:mysql:'.$config_dir.'/mysql-virtual_domains.cf',
- 'virtual_mailbox_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_mailboxes.cf',
- 'virtual_mailbox_base = '.$cf['vmail_mailbox_base'],
- 'virtual_uid_maps = static:'.$cf['vmail_userid'],
- 'virtual_gid_maps = static:'.$cf['vmail_groupid'],
- 'smtpd_sasl_auth_enable = yes',
- 'broken_sasl_auth_clients = yes',
- 'smtpd_sasl_authenticated_header = yes',
- 'smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:'.$config_dir.'/mysql-virtual_recipient.cf, reject_unauth_destination',
- 'smtpd_use_tls = yes',
- 'smtpd_tls_security_level = may',
- 'smtpd_tls_cert_file = '.$config_dir.'/smtpd.cert',
- 'smtpd_tls_key_file = '.$config_dir.'/smtpd.key',
- 'transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:'.$config_dir.'/mysql-virtual_transports.cf',
- 'relay_domains = mysql:'.$config_dir.'/mysql-virtual_relaydomains.cf',
- 'relay_recipient_maps = mysql:'.$config_dir.'/mysql-virtual_relayrecipientmaps.cf',
- 'proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps',
- 'smtpd_sender_restrictions = check_sender_access mysql:'.$config_dir.'/mysql-virtual_sender.cf',
- 'smtpd_client_restrictions = check_client_access mysql:'.$config_dir.'/mysql-virtual_client.cf',
- 'maildrop_destination_concurrency_limit = 1',
- 'maildrop_destination_recipient_limit = 1',
- 'virtual_transport = maildrop',
- 'header_checks = regexp:'.$config_dir.'/header_checks',
- 'mime_header_checks = regexp:'.$config_dir.'/mime_header_checks',
- 'nested_header_checks = regexp:'.$config_dir.'/nested_header_checks',
- 'body_checks = regexp:'.$config_dir.'/body_checks',
- 'inet_interfaces = all'
- );
+ $postconf_placeholders = array('{config_dir}' => $config_dir,
+ '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
+ '{vmail_userid}' => $cf['vmail_userid'],
+ '{vmail_groupid}' => $cf['vmail_groupid'],
+ '{rbl_list}' => $rbl_list);
+
+ $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_postfix.conf.master', 'tpl/opensuse_postfix.conf.master');
+ $postconf_tpl = strtr($postconf_tpl, $postconf_placeholders);
+ $postconf_commands = array_filter(explode("\n", $postconf_tpl)); // read and remove empty lines
//* These postconf commands will be executed on installation only
if($this->is_update == false) {
@@ -282,7 +264,7 @@ class installer_dist extends installer_base {
if(is_file($cf['vmail_mailbox_base'].'/.'.$configfile)){
copy($cf['vmail_mailbox_base'].'/.'.$configfile, $cf['vmail_mailbox_base'].'/.'.$configfile.'~');
}
- $content = rf("tpl/$configfile.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/$configfile.master");
$content = str_replace('{dist_postfix_vmail_mailbox_base}', $cf['vmail_mailbox_base'], $content);
wf($cf['vmail_mailbox_base'].'/.'.$configfile, $content);
@@ -353,7 +335,7 @@ class installer_dist extends installer_base {
if(is_file("$pam/smtp")) copy("$pam/smtp", "$pam/smtp~");
if(is_file("$pam/smtp~")) exec("chmod 400 $pam/smtp~");
- $content = rf("tpl/$configfile.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/$configfile.master");
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
@@ -376,7 +358,7 @@ class installer_dist extends installer_base {
copy("$config_dir/$configfile", "$config_dir/$configfile~");
}
exec("chmod 400 $config_dir/$configfile~");
- $content = rf("tpl/$configfile.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/$configfile.master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -456,9 +438,17 @@ class installer_dist extends installer_base {
//* Copy dovecot configuration file
if($dovecot_version == 2) {
- copy('tpl/opensuse_dovecot2.conf.master',$config_dir.'/'.$configfile);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_dovecot2.conf.master')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_dovecot2.conf.master', $config_dir.'/'.$configfile);
+ } else {
+ copy('tpl/opensuse_dovecot2.conf.master',$config_dir.'/'.$configfile);
+ }
} else {
- copy('tpl/opensuse_dovecot.conf.master',$config_dir.'/'.$configfile);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_dovecot.conf.master')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_dovecot.conf.master', $config_dir.'/'.$configfile);
+ } else {
+ copy('tpl/opensuse_dovecot.conf.master',$config_dir.'/'.$configfile);
+ }
}
//* dovecot-sql.conf
@@ -468,7 +458,7 @@ class installer_dist extends installer_base {
exec("chmod 400 $config_dir/$configfile~");
}
- $content = rf("tpl/opensuse_dovecot-sql.conf.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_dovecot-sql.conf.master', "tpl/opensuse_dovecot-sql.conf.master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -487,7 +477,7 @@ class installer_dist extends installer_base {
$configfile = 'opensuse_amavisd_conf';
if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf')) @copy($conf["amavis"]["config_dir"].'/amavisd.conf',$conf["amavis"]["config_dir"].'/amavisd.conf~');
if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf~')) exec('chmod 400 '.$conf["amavis"]["config_dir"].'/amavisd.conf~');
- $content = rf("tpl/".$configfile.".master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/".$configfile.".master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -517,7 +507,7 @@ class installer_dist extends installer_base {
// Only add the content if we had not addded it before
if(!stristr($content,"127.0.0.1:10025")) {
unset($content);
- $content = rf("tpl/master_cf_amavis.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/master_cf_amavis.master', "tpl/master_cf_amavis.master");
af($conf["postfix"]["config_dir"].'/master.cf',$content);
}
unset($content);
@@ -577,7 +567,7 @@ class installer_dist extends installer_base {
if(is_file("$config_dir/$configfile~")){
exec("chmod 400 $config_dir/$configfile~");
}
- $content = rf('tpl/pureftpd_mysql.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/pureftpd_mysql.conf.master', 'tpl/pureftpd_mysql.conf.master');
$content = str_replace('{mysql_server_ispconfig_user}', $conf["mysql"]["ispconfig_user"], $content);
$content = str_replace('{mysql_server_ispconfig_password}', $conf["mysql"]["ispconfig_password"], $content);
$content = str_replace('{mysql_server_database}', $conf["mysql"]["database"], $content);
@@ -588,7 +578,11 @@ class installer_dist extends installer_base {
exec("chown root:root $config_dir/$configfile");
// copy our customized copy of pureftpd.conf to the pure-ftpd config directory
- exec("cp tpl/opensuse_pureftpd_conf.master $config_dir/pure-ftpd.conf");
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_pureftpd_conf.master')) {
+ exec("cp " . $conf['ispconfig_install_dir']."/server/conf-custom/install/opensuse_pureftpd_conf.master $config_dir/pure-ftpd.conf");
+ } else {
+ exec("cp tpl/opensuse_pureftpd_conf.master $config_dir/pure-ftpd.conf");
+ }
}
@@ -600,7 +594,7 @@ class installer_dist extends installer_base {
$configfile = 'mydns.conf';
if(is_file($conf["mydns"]["config_dir"].'/'.$configfile)) copy($conf["mydns"]["config_dir"].'/'.$configfile,$conf["mydns"]["config_dir"].'/'.$configfile.'~');
if(is_file($conf["mydns"]["config_dir"].'/'.$configfile.'~')) exec('chmod 400 '.$conf["mydns"]["config_dir"].'/'.$configfile.'~');
- $content = rf("tpl/".$configfile.".master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/".$configfile.".master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -646,7 +640,7 @@ class installer_dist extends installer_base {
$vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir'];
//copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf');
- $content = rf('tpl/apache_ispconfig.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_ispconfig.conf.master', 'tpl/apache_ispconfig.conf.master');
$records = $this->db->queryAllRecords('SELECT * FROM '.$conf['mysql']['master_database'].'.server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'");
if(is_array($records) && count($records) > 0) {
@@ -782,7 +776,11 @@ class installer_dist extends installer_base {
if(is_dir("/etc/Bastille")) caselog("mv -f /etc/Bastille /etc/Bastille.backup", __FILE__, __LINE__);
@mkdir("/etc/Bastille", octdec($directory_mode));
if(is_dir("/etc/Bastille.backup/firewall.d")) caselog("cp -pfr /etc/Bastille.backup/firewall.d /etc/Bastille/", __FILE__, __LINE__);
- caselog("cp -f tpl/bastille-firewall.cfg.master /etc/Bastille/bastille-firewall.cfg", __FILE__, __LINE__);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/bastille-firewall.cfg.master')) {
+ caselog("cp -f " . $conf['ispconfig_install_dir']."/server/conf-custom/install/bastille-firewall.cfg.master /etc/Bastille/bastille-firewall.cfg", __FILE__, __LINE__);
+ } else {
+ caselog("cp -f tpl/bastille-firewall.cfg.master /etc/Bastille/bastille-firewall.cfg", __FILE__, __LINE__);
+ }
caselog("chmod 644 /etc/Bastille/bastille-firewall.cfg", __FILE__, __LINE__);
$content = rf("/etc/Bastille/bastille-firewall.cfg");
$content = str_replace("{DNS_SERVERS}", "", $content);
@@ -870,7 +868,7 @@ class installer_dist extends installer_base {
if(is_file($install_dir.'/interface/lib/'.$configfile)){
copy("$install_dir/interface/lib/$configfile", "$install_dir/interface/lib/$configfile~");
}
- $content = rf("tpl/$configfile.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/$configfile.master");
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
@@ -894,7 +892,7 @@ class installer_dist extends installer_base {
if(is_file($install_dir.'/server/lib/'.$configfile)){
copy("$install_dir/server/lib/$configfile", "$install_dir/interface/lib/$configfile~");
}
- $content = rf("tpl/$configfile.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/$configfile.master");
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
@@ -1065,7 +1063,7 @@ class installer_dist extends installer_base {
// Dont just copy over the virtualhost template but add some custom settings
- $content = rf("tpl/apache_ispconfig.vhost.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_ispconfig.vhost.master', "tpl/apache_ispconfig.vhost.master");
$content = str_replace('{vhost_port}', $conf['apache']['vhost_port'], $content);
// comment out the listen directive if port is 80 or 443
@@ -1091,7 +1089,7 @@ class installer_dist extends installer_base {
wf("$vhost_conf_dir/ispconfig.vhost", $content);
//if(!is_file('/srv/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter')) {
- $content = rf('tpl/apache_ispconfig_fcgi_starter.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_ispconfig_fcgi_starter.master', 'tpl/apache_ispconfig_fcgi_starter.master');
$content = str_replace('{fastcgi_bin}', $conf['fastcgi']['fastcgi_bin'], $content);
$content = str_replace('{fastcgi_phpini_path}', $conf['fastcgi']['fastcgi_phpini_path'], $content);
exec('mkdir -p /srv/www/php-fcgi-scripts/ispconfig');
@@ -1122,7 +1120,7 @@ class installer_dist extends installer_base {
$vhost_conf_enabled_dir = $conf['nginx']['vhost_conf_enabled_dir'];
// Dont just copy over the virtualhost template but add some custom settings
- $content = rf('tpl/nginx_ispconfig.vhost.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/nginx_ispconfig.vhost.master', 'tpl/nginx_ispconfig.vhost.master');
$content = str_replace('{vhost_port}', $conf['nginx']['vhost_port'], $content);
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
@@ -1149,7 +1147,7 @@ class installer_dist extends installer_base {
// PHP-FPM
// Dont just copy over the php-fpm pool template but add some custom settings
- $content = rf('tpl/php_fpm_pool.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/php_fpm_pool.conf.master', 'tpl/php_fpm_pool.conf.master');
$content = str_replace('{fpm_pool}', 'ispconfig', $content);
//$content = str_replace('{fpm_port}', $conf['nginx']['php_fpm_start_port'], $content);
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
@@ -1244,7 +1242,7 @@ class installer_dist extends installer_base {
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
- $content = rf("tpl/mysql_clientdb.conf.master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mysql_clientdb.conf.master', "tpl/mysql_clientdb.conf.master");
$content = str_replace('{hostname}',$conf['mysql']['host'],$content);
$content = str_replace('{username}',$conf['mysql']['admin_user'],$content);
$content = str_replace('{password}',$conf['mysql']['admin_password'], $content);
diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index 9673a76c6c5e1158f76641a63bbd7a5e0925fa94..9c61759c71d2ae6a39c2fb2f698c866f8f70d2bf 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -160,7 +160,7 @@ function get_distname() {
$distid = 'debian60';
$distbaseid = 'debian';
swriteln("Operating System: Debian 6.0 (Squeeze/Sid) or compatible\n");
- } elseif(strstr(trim(file_get_contents('/etc/debian_version')),'6.0') || trim(file_get_contents('/etc/debian_version')) == 'wheezy/sid') {
+ } elseif(strstr(trim(file_get_contents('/etc/debian_version')),'7.0') || strstr(trim(file_get_contents('/etc/debian_version')),'7.1') || trim(file_get_contents('/etc/debian_version')) == 'wheezy/sid') {
$distname = 'Debian';
$distver = 'Wheezy/Sid';
$distid = 'debian60';
@@ -345,6 +345,12 @@ function mkdirs($strPath, $mode = '0755'){
return false;
}
+function rfsel($file, $file2) {
+ clearstatcache();
+ if(is_file($file)) return rf($file);
+ else return rf($file2);
+}
+
function rf($file){
clearstatcache();
if(is_file($file)) {
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index c7b4ae77caccc8d58dc0769c5e12b2c648820d59..2c975584eac30f8d68674d3508d356d276787c59 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -508,7 +508,7 @@ class installer_base {
if(is_file($full_file_name)) {
copy($full_file_name, $config_dir.$configfile.'~');
}
- $content = rf('tpl/'.$configfile.'.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
@@ -528,9 +528,17 @@ class installer_base {
if (is_dir($config_dir)) {
if(is_file($config_dir.'/'.$jk_init)) copy($config_dir.'/'.$jk_init, $config_dir.'/'.$jk_init.'~');
if(is_file($config_dir.'/'.$jk_chrootsh.'.master')) copy($config_dir.'/'.$jk_chrootsh.'.master', $config_dir.'/'.$jk_chrootsh.'~');
-
- copy('tpl/'.$jk_init.'.master', $config_dir.'/'.$jk_init);
- copy('tpl/'.$jk_chrootsh.'.master', $config_dir.'/'.$jk_chrootsh);
+
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$jk_init.'.master')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$jk_init.'.master', $config_dir.'/'.$jk_init);
+ } else {
+ copy('tpl/'.$jk_init.'.master', $config_dir.'/'.$jk_init);
+ }
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$jk_chrootsh.'.master')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$jk_chrootsh.'.master', $config_dir.'/'.$jk_chrootsh);
+ } else {
+ copy('tpl/'.$jk_chrootsh.'.master', $config_dir.'/'.$jk_chrootsh);
+ }
}
//* help jailkit fo find its ini files
@@ -550,7 +558,7 @@ class installer_base {
}
// load files
- $content = rf('tpl/mm_cfg.py.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mm_cfg.py.master', 'tpl/mm_cfg.py.master');
$old_file = rf($full_file_name);
$old_options = array();
@@ -604,7 +612,11 @@ class installer_base {
}
if(is_dir('/etc/mailman')) {
- copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh', $full_file_name);
+ } else {
+ copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
+ }
chgrp($full_file_name,'list');
chmod($full_file_name,0750);
}
@@ -681,42 +693,16 @@ class installer_base {
}
unset($rbl_hosts);
unset($server_ini_array);
-
- $postconf_commands = array (
- 'alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases',
- 'alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases',
- 'virtual_alias_domains =',
- 'virtual_alias_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_forwardings.cf, proxy:mysql:'.$config_dir.'/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman',
- 'virtual_mailbox_domains = proxy:mysql:'.$config_dir.'/mysql-virtual_domains.cf',
- 'virtual_mailbox_maps = proxy:mysql:'.$config_dir.'/mysql-virtual_mailboxes.cf',
- 'virtual_mailbox_base = '.$cf['vmail_mailbox_base'],
- 'virtual_uid_maps = static:'.$cf['vmail_userid'],
- 'virtual_gid_maps = static:'.$cf['vmail_groupid'],
- 'inet_protocols=all',
- 'smtpd_sasl_auth_enable = yes',
- 'broken_sasl_auth_clients = yes',
- 'smtpd_sasl_authenticated_header = yes',
- 'smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:'.$config_dir.'/mysql-virtual_recipient.cf, reject_unauth_destination'. $rbl_list,
- 'smtpd_use_tls = yes',
- 'smtpd_tls_security_level = may',
- 'smtpd_tls_cert_file = '.$config_dir.'/smtpd.cert',
- 'smtpd_tls_key_file = '.$config_dir.'/smtpd.key',
- 'transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:'.$config_dir.'/mysql-virtual_transports.cf',
- 'relay_domains = mysql:'.$config_dir.'/mysql-virtual_relaydomains.cf',
- 'relay_recipient_maps = mysql:'.$config_dir.'/mysql-virtual_relayrecipientmaps.cf',
- 'proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps',
- 'smtpd_sender_restrictions = check_sender_access mysql:'.$config_dir.'/mysql-virtual_sender.cf',
- 'smtpd_client_restrictions = check_client_access mysql:'.$config_dir.'/mysql-virtual_client.cf',
- 'smtpd_client_message_rate_limit = 100',
- 'maildrop_destination_concurrency_limit = 1',
- 'maildrop_destination_recipient_limit = 1',
- 'virtual_transport = maildrop',
- 'header_checks = regexp:'.$config_dir.'/header_checks',
- 'mime_header_checks = regexp:'.$config_dir.'/mime_header_checks',
- 'nested_header_checks = regexp:'.$config_dir.'/nested_header_checks',
- 'body_checks = regexp:'.$config_dir.'/body_checks',
- 'owner_request_special = no'
- );
+
+ $postconf_placeholders = array('{config_dir}' => $config_dir,
+ '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
+ '{vmail_userid}' => $cf['vmail_userid'],
+ '{vmail_groupid}' => $cf['vmail_groupid'],
+ '{rbl_list}' => $rbl_list);
+
+ $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_postfix.conf.master', 'tpl/debian_postfix.conf.master');
+ $postconf_tpl = strtr($postconf_tpl, $postconf_placeholders);
+ $postconf_commands = array_filter(explode("\n", $postconf_tpl)); // read and remove empty lines
//* These postconf commands will be executed on installation only
if($this->is_update == false) {
@@ -784,7 +770,7 @@ class installer_base {
if(is_file($cf['vmail_mailbox_base'].'/.'.$configfile)) {
copy($cf['vmail_mailbox_base'].'/.'.$configfile, $cf['vmail_mailbox_base'].'/.'.$configfile.'~');
}
- $content = rf('tpl/'.$configfile.'.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
$content = str_replace('{dist_postfix_vmail_mailbox_base}', $cf['vmail_mailbox_base'], $content);
wf($cf['vmail_mailbox_base'].'/.'.$configfile, $content);
@@ -823,7 +809,7 @@ class installer_base {
if(is_file($conf['postfix']['config_dir'].'/sasl/smtpd.conf')) copy($conf['postfix']['config_dir'].'/sasl/smtpd.conf',$conf['postfix']['config_dir'].'/sasl/smtpd.conf~');
if(is_file($conf['postfix']['config_dir'].'/sasl/smtpd.conf~')) chmod($conf['postfix']['config_dir'].'/sasl/smtpd.conf~', 0400);
- $content = rf('tpl/'.$configfile.'.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -868,7 +854,7 @@ class installer_base {
if(is_file($pam.'/smtp')) copy($pam.'/smtp', $pam.'/smtp~');
if(is_file($pam.'/smtp~')) chmod($pam.'/smtp~', 0400);
- $content = rf('tpl/'.$configfile.'.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
@@ -891,7 +877,7 @@ class installer_base {
copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
}
chmod($config_dir.'/'.$configfile.'~', 0400);
- $content = rf('tpl/'.$configfile.'.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -970,9 +956,17 @@ class installer_base {
//* Copy dovecot configuration file
if($dovecot_version == 2) {
- copy('tpl/debian_dovecot2.conf.master',$config_dir.'/'.$configfile);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot2.conf.master')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot2.conf.master', $config_dir.'/'.$configfile);
+ } else {
+ copy('tpl/debian_dovecot2.conf.master',$config_dir.'/'.$configfile);
+ }
} else {
- copy('tpl/debian_dovecot.conf.master',$config_dir.'/'.$configfile);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master')) {
+ copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot.conf.master', $config_dir.'/'.$configfile);
+ } else {
+ copy('tpl/debian_dovecot.conf.master',$config_dir.'/'.$configfile);
+ }
}
//* dovecot-sql.conf
@@ -981,7 +975,7 @@ class installer_base {
copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
}
if(is_file($config_dir.'/'.$configfile.'~')) chmod($config_dir.'/'.$configfile.'~', 0400);
- $content = rf('tpl/debian_dovecot-sql.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_dovecot-sql.conf.master', 'tpl/debian_dovecot-sql.conf.master');
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -1001,7 +995,7 @@ class installer_base {
$configfile = 'amavisd_user_config';
if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user')) copy($conf['amavis']['config_dir'].'/conf.d/50-user',$conf['amavis']['config_dir'].'/50-user~');
if(is_file($conf['amavis']['config_dir'].'/conf.d/50-user~')) chmod($conf['amavis']['config_dir'].'/conf.d/50-user~', 0400);
- $content = rf('tpl/'.$configfile.'.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -1037,7 +1031,7 @@ class installer_base {
// Only add the content if we had not addded it before
if(!stristr($content,'127.0.0.1:10025')) {
unset($content);
- $content = rf('tpl/master_cf_amavis.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/master_cf_amavis.master', 'tpl/master_cf_amavis.master');
af($conf['postfix']['config_dir'].'/master.cf',$content);
}
unset($content);
@@ -1092,7 +1086,7 @@ class installer_base {
if(is_file($config_dir.'/'.$configfile.'~')) {
chmod($config_dir.'/'.$configfile.'~', 0400);
}
- $content = rf('tpl/pureftpd_mysql.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/pureftpd_mysql.conf.master', 'tpl/pureftpd_mysql.conf.master');
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
@@ -1128,7 +1122,7 @@ class installer_base {
$configfile = 'mydns.conf';
if(is_file($conf['mydns']['config_dir'].'/'.$configfile)) copy($conf['mydns']['config_dir'].'/'.$configfile,$conf['mydns']['config_dir'].'/'.$configfile.'~');
if(is_file($conf['mydns']['config_dir'].'/'.$configfile.'~')) chmod($conf['mydns']['config_dir'].'/'.$configfile.'~', 0400);
- $content = rf('tpl/'.$configfile.'.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
@@ -1171,7 +1165,7 @@ class installer_base {
$configfile = 'pdns.local';
if(is_file($conf['powerdns']['config_dir'].'/'.$configfile)) copy($conf['powerdns']['config_dir'].'/'.$configfile,$conf['powerdns']['config_dir'].'/'.$configfile.'~');
if(is_file($conf['powerdns']['config_dir'].'/'.$configfile.'~')) chmod($conf['powerdns']['config_dir'].'/'.$configfile.'~', 0400);
- $content = rf('tpl/'.$configfile.'.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{powerdns_database}',$conf['powerdns']['database'],$content);
@@ -1235,7 +1229,7 @@ class installer_base {
// copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf');
- $content = rf('tpl/apache_ispconfig.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_ispconfig.conf.master', 'tpl/apache_ispconfig.conf.master');
$records = $this->db->queryAllRecords('SELECT * FROM '.$conf['mysql']['master_database'].'.server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'");
if(is_array($records) && count($records) > 0) {
@@ -1362,7 +1356,7 @@ class installer_base {
$configfile = 'squid.conf';
if(is_file($conf["squid"]["config_dir"].'/'.$configfile)) copy($conf["squid"]["config_dir"].'/'.$configfile,$conf["squid"]["config_dir"].'/'.$configfile.'~');
if(is_file($conf["squid"]["config_dir"].'/'.$configfile.'~')) exec('chmod 400 '.$conf["squid"]["config_dir"].'/'.$configfile.'~');
- $content = rf("tpl/".$configfile.".master");
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/".$configfile.".master");
$content = str_replace('{server_name}',$server_name,$content);
$content = str_replace('{ip_address}',$ip_address, $content);
$content = str_replace('{config_dir}',$conf['squid']['config_dir'], $content);
@@ -1390,7 +1384,11 @@ class installer_base {
if(is_dir('/etc/Bastille')) caselog('mv -f /etc/Bastille /etc/Bastille.backup', __FILE__, __LINE__);
@mkdir('/etc/Bastille', 0700);
if(is_dir('/etc/Bastille.backup/firewall.d')) caselog('cp -pfr /etc/Bastille.backup/firewall.d /etc/Bastille/', __FILE__, __LINE__);
- caselog('cp -f tpl/bastille-firewall.cfg.master /etc/Bastille/bastille-firewall.cfg', __FILE__, __LINE__);
+ if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/bastille-firewall.cfg.master')) {
+ caselog('cp -f ' . $conf['ispconfig_install_dir'].'/server/conf-custom/install/bastille-firewall.cfg.master /etc/Bastille/bastille-firewall.cfg', __FILE__, __LINE__);
+ } else {
+ caselog('cp -f tpl/bastille-firewall.cfg.master /etc/Bastille/bastille-firewall.cfg', __FILE__, __LINE__);
+ }
caselog('chmod 644 /etc/Bastille/bastille-firewall.cfg', __FILE__, __LINE__);
$content = rf('/etc/Bastille/bastille-firewall.cfg');
$content = str_replace('{DNS_SERVERS}', '', $content);
@@ -1448,7 +1446,7 @@ class installer_base {
$configfile = 'vlogger-dbi.conf';
if(is_file($conf['vlogger']['config_dir'].'/'.$configfile)) copy($conf['vlogger']['config_dir'].'/'.$configfile,$conf['vlogger']['config_dir'].'/'.$configfile.'~');
if(is_file($conf['vlogger']['config_dir'].'/'.$configfile.'~')) chmod($conf['vlogger']['config_dir'].'/'.$configfile.'~', 0400);
- $content = rf('tpl/'.$configfile.'.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
if($conf['mysql']['master_slave_setup'] == 'y') {
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['master_ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['master_ispconfig_password'], $content);
@@ -1500,7 +1498,7 @@ class installer_base {
$apps_vhost_servername = ($conf['web']['apps_vhost_servername'] == '')?'':'ServerName '.$conf['web']['apps_vhost_servername'];
// Dont just copy over the virtualhost template but add some custom settings
- $content = rf('tpl/apache_apps.vhost.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_apps.vhost.master', 'tpl/apache_apps.vhost.master');
$content = str_replace('{apps_vhost_ip}', $conf['web']['apps_vhost_ip'], $content);
$content = str_replace('{apps_vhost_port}', $conf['web']['apps_vhost_port'], $content);
@@ -1526,7 +1524,7 @@ class installer_base {
}
if(!is_file($conf['web']['website_basedir'].'/php-fcgi-scripts/apps/.php-fcgi-starter')) {
- $content = rf('tpl/apache_apps_fcgi_starter.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_apps_fcgi_starter.master', 'tpl/apache_apps_fcgi_starter.master');
$content = str_replace('{fastcgi_bin}', $conf['fastcgi']['fastcgi_bin'], $content);
$content = str_replace('{fastcgi_phpini_path}', $conf['fastcgi']['fastcgi_phpini_path'], $content);
mkdir($conf['web']['website_basedir'].'/php-fcgi-scripts/apps', 0755, true);
@@ -1566,7 +1564,7 @@ class installer_base {
$apps_vhost_servername = ($conf['web']['apps_vhost_servername'] == '')?'_':$conf['web']['apps_vhost_servername'];
// Dont just copy over the virtualhost template but add some custom settings
- $content = rf('tpl/nginx_apps.vhost.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/nginx_apps.vhost.master', 'tpl/nginx_apps.vhost.master');
if($conf['web']['apps_vhost_ip'] == '_default_'){
$apps_vhost_ip = '';
@@ -1602,7 +1600,7 @@ class installer_base {
// PHP-FPM
// Dont just copy over the php-fpm pool template but add some custom settings
- $content = rf('tpl/apps_php_fpm_pool.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apps_php_fpm_pool.conf.master', 'tpl/apps_php_fpm_pool.conf.master');
$content = str_replace('{fpm_pool}', 'apps', $content);
//$content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content);
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
@@ -1677,7 +1675,7 @@ class installer_base {
if(is_file($install_dir.'/interface/lib/'.$configfile)) {
copy($install_dir.'/interface/lib/'.$configfile, $install_dir.'/interface/lib/'.$configfile.'~');
}
- $content = rf('tpl/'.$configfile.'.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
@@ -1701,7 +1699,7 @@ class installer_base {
if(is_file($install_dir.'/server/lib/'.$configfile)) {
copy($install_dir.'/server/lib/'.$configfile, $install_dir.'/interface/lib/'.$configfile.'~');
}
- $content = rf('tpl/'.$configfile.'.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
@@ -1894,7 +1892,7 @@ class installer_base {
$vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir'];
// Dont just copy over the virtualhost template but add some custom settings
- $content = rf('tpl/apache_ispconfig.vhost.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_ispconfig.vhost.master', 'tpl/apache_ispconfig.vhost.master');
$content = str_replace('{vhost_port}', $conf['apache']['vhost_port'], $content);
// comment out the listen directive if port is 80 or 443
@@ -1926,7 +1924,7 @@ class installer_base {
}
}
//if(!is_file('/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter')) {
- $content = rf('tpl/apache_ispconfig_fcgi_starter.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/apache_ispconfig_fcgi_starter.master', 'tpl/apache_ispconfig_fcgi_starter.master');
$content = str_replace('{fastcgi_bin}', $conf['fastcgi']['fastcgi_bin'], $content);
$content = str_replace('{fastcgi_phpini_path}', $conf['fastcgi']['fastcgi_phpini_path'], $content);
@mkdir('/var/www/php-fcgi-scripts/ispconfig', 0755, true);
@@ -1943,7 +1941,7 @@ class installer_base {
$vhost_conf_enabled_dir = $conf['nginx']['vhost_conf_enabled_dir'];
// Dont just copy over the virtualhost template but add some custom settings
- $content = rf('tpl/nginx_ispconfig.vhost.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/nginx_ispconfig.vhost.master', 'tpl/nginx_ispconfig.vhost.master');
$content = str_replace('{vhost_port}', $conf['nginx']['vhost_port'], $content);
if(is_file($install_dir.'/interface/ssl/ispserver.crt') && is_file($install_dir.'/interface/ssl/ispserver.key')) {
@@ -1970,7 +1968,7 @@ class installer_base {
// PHP-FPM
// Dont just copy over the php-fpm pool template but add some custom settings
- $content = rf('tpl/php_fpm_pool.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/php_fpm_pool.conf.master', 'tpl/php_fpm_pool.conf.master');
$content = str_replace('{fpm_pool}', 'ispconfig', $content);
//$content = str_replace('{fpm_port}', $conf['nginx']['php_fpm_start_port'], $content);
$content = str_replace('{fpm_socket}', $fpm_socket, $content);
@@ -2070,7 +2068,7 @@ class installer_base {
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
- $content = rf('tpl/mysql_clientdb.conf.master');
+ $content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mysql_clientdb.conf.master', 'tpl/mysql_clientdb.conf.master');
$content = str_replace('{hostname}',$conf['mysql']['host'],$content);
$content = str_replace('{username}',$conf['mysql']['admin_user'],$content);
$content = str_replace('{password}',$conf['mysql']['admin_password'], $content);
@@ -2162,12 +2160,17 @@ class installer_base {
global $conf, $dist;
$final_path = '';
- $dist_template = 'dist/tpl/'.strtolower($dist['name'])."/$tLocal.master";
- if (file_exists($dist_template)) {
+ $dist_template = $conf['ispconfig_install_dir'] . '/server/conf-custom/install/' . $tLocal . '.master';
+ if (file_exists($dist_template)) {
$final_path = $dist_template;
} else {
- $final_path = "tpl/$tLocal.master";
- }
+ $dist_template = 'dist/tpl/'.strtolower($dist['name'])."/$tLocal.master";
+ if (file_exists($dist_template)) {
+ $final_path = $dist_template;
+ } else {
+ $final_path = "tpl/$tLocal.master";
+ }
+ }
if (!$tRf) {
return $final_path;
diff --git a/install/sql/incremental/upd_0051.sql b/install/sql/incremental/upd_0051.sql
new file mode 100644
index 0000000000000000000000000000000000000000..4395e2e6536b672bed6d629d6bbcc94eaa155052
--- /dev/null
+++ b/install/sql/incremental/upd_0051.sql
@@ -0,0 +1,2 @@
+UPDATE `country` SET `iso` = 'RS', `name` = 'SERBIA', `printable_name` = 'Serbia', `iso3` = 'SRB', `numcode` = 381 WHERE `iso` = 'CS';
+INSERT INTO `country` (`iso`, `name`, `printable_name`, `iso3`, `numcode`) VALUES ('ME', 'MONTENEGRO', 'Montenegro', 'MNE', 382);
\ No newline at end of file
diff --git a/install/sql/incremental/upd_0052.sql b/install/sql/incremental/upd_0052.sql
index 346589b7a4d08326c050d8d43374b906756e05b2..d92bc3265ebc8c40c5c1195d12c86bbd4d52eb20 100644
--- a/install/sql/incremental/upd_0052.sql
+++ b/install/sql/incremental/upd_0052.sql
@@ -2,3 +2,4 @@ ALTER TABLE `client_template` CHANGE `limit_aps` `limit_aps` INT( 11 ) NOT NULL
ALTER TABLE `mail_domain` ADD `dkim_public` MEDIUMTEXT NOT NULL AFTER `domain`;
ALTER TABLE `mail_domain` ADD `dkim_private` MEDIUMTEXT NOT NULL AFTER `domain`;
ALTER TABLE `mail_domain` ADD `dkim` ENUM( 'n', 'y' ) NOT NULL AFTER `domain`;
+ALTER TABLE `client` ADD `default_slave_dnsserver` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1' AFTER `limit_dns_zone`;
diff --git a/install/sql/incremental/upd_0053.sql b/install/sql/incremental/upd_0053.sql
new file mode 100644
index 0000000000000000000000000000000000000000..14487c6511b037ac69d4ba86b3113e220b821d66
--- /dev/null
+++ b/install/sql/incremental/upd_0053.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `web_domain` ADD `last_quota_notification` DATE NULL DEFAULT NULL;
+ALTER TABLE `mail_user` ADD `last_quota_notification` DATE NULL DEFAULT NULL;
diff --git a/install/sql/incremental/upd_0054.sql b/install/sql/incremental/upd_0054.sql
new file mode 100644
index 0000000000000000000000000000000000000000..7e7f0c382a1c6e0a58074e15efec9739530441d5
--- /dev/null
+++ b/install/sql/incremental/upd_0054.sql
@@ -0,0 +1 @@
+ALTER TABLE `web_domain` ADD `rewrite_rules` MEDIUMTEXT NULL DEFAULT NULL;
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index 2a2d4a0d44c9e7cf59e56a58dd8d1f0810aaa583..cb2033dfc649d7f0611d7804491ef0299a7e18b1 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -204,6 +204,7 @@ CREATE TABLE `client` (
`limit_aps` int(11) NOT NULL DEFAULT '-1',
`default_dnsserver` int(11) unsigned NOT NULL DEFAULT '1',
`limit_dns_zone` int(11) NOT NULL DEFAULT '-1',
+ `default_slave_dnsserver` int(11) unsigned NOT NULL DEFAULT '1',
`limit_dns_slave_zone` int(11) NOT NULL DEFAULT '-1',
`limit_dns_record` int(11) NOT NULL DEFAULT '-1',
`default_dbserver` int(11) NOT NULL DEFAULT '1',
@@ -839,6 +840,7 @@ CREATE TABLE `mail_user` (
`disablesieve` enum('n','y') NOT NULL default 'n',
`disablelda` enum('n','y') NOT NULL default 'n',
`disabledoveadm` enum('n','y') NOT NULL default 'n',
+ `last_quota_notification` date NULL default NULL,
PRIMARY KEY (`mailuser_id`),
KEY `server_id` (`server_id`,`email`),
KEY `email_access` (`email`,`access`)
@@ -1761,6 +1763,8 @@ CREATE TABLE `web_domain` (
`traffic_quota_lock` enum('n','y') NOT NULL default 'n',
`fastcgi_php_version` varchar(255) DEFAULT NULL,
`proxy_directives` mediumtext,
+ `last_quota_notification` date NULL default NULL,
+ `rewrite_rules` mediumtext,
PRIMARY KEY (`domain_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -2036,7 +2040,7 @@ INSERT INTO `country` (`iso`, `name`, `printable_name`, `iso3`, `numcode`) VALUE
('ST', 'SAO TOME AND PRINCIPE', 'Sao Tome and Principe', 'STP', 678),
('SA', 'SAUDI ARABIA', 'Saudi Arabia', 'SAU', 682),
('SN', 'SENEGAL', 'Senegal', 'SEN', 686),
-('CS', 'SERBIA AND MONTENEGRO', 'Serbia and Montenegro', NULL, NULL),
+('RS', 'SERBIA', 'Serbia', 'SRB', 381),
('SC', 'SEYCHELLES', 'Seychelles', 'SYC', 690),
('SL', 'SIERRA LEONE', 'Sierra Leone', 'SLE', 694),
('SG', 'SINGAPORE', 'Singapore', 'SGP', 702),
@@ -2086,7 +2090,8 @@ INSERT INTO `country` (`iso`, `name`, `printable_name`, `iso3`, `numcode`) VALUE
('EH', 'WESTERN SAHARA', 'Western Sahara', 'ESH', 732),
('YE', 'YEMEN', 'Yemen', 'YEM', 887),
('ZM', 'ZAMBIA', 'Zambia', 'ZMB', 894),
-('ZW', 'ZIMBABWE', 'Zimbabwe', 'ZWE', 716);
+('ZW', 'ZIMBABWE', 'Zimbabwe', 'ZWE', 716),
+('ME', 'MONTENEGRO', 'Montenegro', 'MNE', 382);
-- --------------------------------------------------------
diff --git a/install/tpl/apache_ispconfig.vhost.master b/install/tpl/apache_ispconfig.vhost.master
index 15b2956032e65d296f17ca4fba433574b8144828..f3b32c009bb38293f1bc546ee5772afebe5dd767 100644
--- a/install/tpl/apache_ispconfig.vhost.master
+++ b/install/tpl/apache_ispconfig.vhost.master
@@ -18,7 +18,7 @@ NameVirtualHost *:{vhost_port}
DocumentRoot /var/www/ispconfig/
SuexecUserGroup ispconfig ispconfig
- Options Indexes FollowSymLinks MultiViews +ExecCGI
+ Options -Indexes FollowSymLinks MultiViews +ExecCGI
AllowOverride AuthConfig Indexes Limit Options FileInfo
AddHandler fcgid-script .php
FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
diff --git a/install/tpl/debian6_dovecot2.conf.master b/install/tpl/debian6_dovecot2.conf.master
index f9bf27096a0191edb208fe16d13e32dfa78d5c82..f359260dabc47496f301110c4e20022db46c9a96 100644
--- a/install/tpl/debian6_dovecot2.conf.master
+++ b/install/tpl/debian6_dovecot2.conf.master
@@ -31,6 +31,10 @@ service auth {
}
user = root
}
+service imap-login {
+ client_limit = 1000
+ process_limit = 500
+}
protocol imap {
mail_plugins = quota imap_quota
}
diff --git a/install/tpl/debian_dovecot2.conf.master b/install/tpl/debian_dovecot2.conf.master
index f9bf27096a0191edb208fe16d13e32dfa78d5c82..f359260dabc47496f301110c4e20022db46c9a96 100644
--- a/install/tpl/debian_dovecot2.conf.master
+++ b/install/tpl/debian_dovecot2.conf.master
@@ -31,6 +31,10 @@ service auth {
}
user = root
}
+service imap-login {
+ client_limit = 1000
+ process_limit = 500
+}
protocol imap {
mail_plugins = quota imap_quota
}
diff --git a/install/tpl/debian_postfix.conf.master b/install/tpl/debian_postfix.conf.master
new file mode 100644
index 0000000000000000000000000000000000000000..85f5d07bc47c1e3f369cff38c2a56919d6c154dc
--- /dev/null
+++ b/install/tpl/debian_postfix.conf.master
@@ -0,0 +1,33 @@
+alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
+alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
+virtual_alias_domains =
+virtual_alias_maps = proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
+virtual_mailbox_domains = proxy:mysql:{config_dir}/mysql-virtual_domains.cf
+virtual_mailbox_maps = proxy:mysql:{config_dir}/mysql-virtual_mailboxes.cf
+virtual_mailbox_base = {vmail_mailbox_base}
+virtual_uid_maps = static:{vmail_userid}
+virtual_gid_maps = static:{vmail_groupid}
+inet_protocols=all
+smtpd_sasl_auth_enable = yes
+broken_sasl_auth_clients = yes
+smtpd_sasl_authenticated_header = yes
+smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf, reject_unauth_destination{rbl_list}
+smtpd_use_tls = yes
+smtpd_tls_security_level = may
+smtpd_tls_cert_file = {config_dir}/smtpd.cert
+smtpd_tls_key_file = {config_dir}/smtpd.key
+transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf
+relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf
+relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf
+proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
+smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf
+smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf
+smtpd_client_message_rate_limit = 100
+maildrop_destination_concurrency_limit = 1
+maildrop_destination_recipient_limit = 1
+virtual_transport = maildrop
+header_checks = regexp:{config_dir}/header_checks
+mime_header_checks = regexp:{config_dir}/mime_header_checks
+nested_header_checks = regexp:{config_dir}/nested_header_checks
+body_checks = regexp:{config_dir}/body_checks
+owner_request_special = no
\ No newline at end of file
diff --git a/install/tpl/fedora_dovecot2.conf.master b/install/tpl/fedora_dovecot2.conf.master
index 682630642a2d37bb2c3b9e32c2124fc8da71c886..75fad4fc76070aadf82b50dbd060e9e4a3d6f5b2 100644
--- a/install/tpl/fedora_dovecot2.conf.master
+++ b/install/tpl/fedora_dovecot2.conf.master
@@ -31,6 +31,10 @@ service auth {
}
user = root
}
+service imap-login {
+ client_limit = 1000
+ process_limit = 500
+}
protocol imap {
mail_plugins = quota imap_quota
}
diff --git a/install/tpl/fedora_postfix.conf.master b/install/tpl/fedora_postfix.conf.master
new file mode 100644
index 0000000000000000000000000000000000000000..c84bd11bf5e81da27e237b4063aeee53f375993b
--- /dev/null
+++ b/install/tpl/fedora_postfix.conf.master
@@ -0,0 +1,30 @@
+virtual_alias_domains =
+virtual_alias_maps = proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf
+virtual_mailbox_domains = proxy:mysql:{config_dir}/mysql-virtual_domains.cf
+virtual_mailbox_maps = proxy:mysql:{config_dir}/mysql-virtual_mailboxes.cf
+virtual_mailbox_base = {vmail_mailbox_base}
+virtual_uid_maps = static:{vmail_userid}
+virtual_gid_maps = static:{vmail_groupid}
+smtpd_sasl_auth_enable = yes
+broken_sasl_auth_clients = yes
+smtpd_sasl_authenticated_header = yes
+smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf, reject_unauth_destination{rbl_list}
+smtpd_use_tls = yes
+smtpd_tls_security_level = may
+smtpd_tls_cert_file = {config_dir}/smtpd.cert
+smtpd_tls_key_file = {config_dir}/smtpd.key
+transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf
+relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf
+relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf
+proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
+smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf
+smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf
+smtpd_client_message_rate_limit = 100
+maildrop_destination_concurrency_limit = 1
+maildrop_destination_recipient_limit = 1
+virtual_transport = maildrop
+header_checks = regexp:{config_dir}/header_checks
+mime_header_checks = regexp:{config_dir}/mime_header_checks
+nested_header_checks = regexp:{config_dir}/nested_header_checks
+body_checks = regexp:{config_dir}/body_checks
+inet_interfaces = all
\ No newline at end of file
diff --git a/install/tpl/gentoo_postfix.conf.master b/install/tpl/gentoo_postfix.conf.master
new file mode 100644
index 0000000000000000000000000000000000000000..c84bd11bf5e81da27e237b4063aeee53f375993b
--- /dev/null
+++ b/install/tpl/gentoo_postfix.conf.master
@@ -0,0 +1,30 @@
+virtual_alias_domains =
+virtual_alias_maps = proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf
+virtual_mailbox_domains = proxy:mysql:{config_dir}/mysql-virtual_domains.cf
+virtual_mailbox_maps = proxy:mysql:{config_dir}/mysql-virtual_mailboxes.cf
+virtual_mailbox_base = {vmail_mailbox_base}
+virtual_uid_maps = static:{vmail_userid}
+virtual_gid_maps = static:{vmail_groupid}
+smtpd_sasl_auth_enable = yes
+broken_sasl_auth_clients = yes
+smtpd_sasl_authenticated_header = yes
+smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf, reject_unauth_destination{rbl_list}
+smtpd_use_tls = yes
+smtpd_tls_security_level = may
+smtpd_tls_cert_file = {config_dir}/smtpd.cert
+smtpd_tls_key_file = {config_dir}/smtpd.key
+transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf
+relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf
+relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf
+proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
+smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf
+smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf
+smtpd_client_message_rate_limit = 100
+maildrop_destination_concurrency_limit = 1
+maildrop_destination_recipient_limit = 1
+virtual_transport = maildrop
+header_checks = regexp:{config_dir}/header_checks
+mime_header_checks = regexp:{config_dir}/mime_header_checks
+nested_header_checks = regexp:{config_dir}/nested_header_checks
+body_checks = regexp:{config_dir}/body_checks
+inet_interfaces = all
\ No newline at end of file
diff --git a/install/tpl/opensuse_dovecot2.conf.master b/install/tpl/opensuse_dovecot2.conf.master
index f9bf27096a0191edb208fe16d13e32dfa78d5c82..f359260dabc47496f301110c4e20022db46c9a96 100644
--- a/install/tpl/opensuse_dovecot2.conf.master
+++ b/install/tpl/opensuse_dovecot2.conf.master
@@ -31,6 +31,10 @@ service auth {
}
user = root
}
+service imap-login {
+ client_limit = 1000
+ process_limit = 500
+}
protocol imap {
mail_plugins = quota imap_quota
}
diff --git a/install/tpl/opensuse_postfix.conf.master b/install/tpl/opensuse_postfix.conf.master
new file mode 100644
index 0000000000000000000000000000000000000000..c84bd11bf5e81da27e237b4063aeee53f375993b
--- /dev/null
+++ b/install/tpl/opensuse_postfix.conf.master
@@ -0,0 +1,30 @@
+virtual_alias_domains =
+virtual_alias_maps = proxy:mysql:{config_dir}/mysql-virtual_forwardings.cf, proxy:mysql:{config_dir}/mysql-virtual_email2email.cf
+virtual_mailbox_domains = proxy:mysql:{config_dir}/mysql-virtual_domains.cf
+virtual_mailbox_maps = proxy:mysql:{config_dir}/mysql-virtual_mailboxes.cf
+virtual_mailbox_base = {vmail_mailbox_base}
+virtual_uid_maps = static:{vmail_userid}
+virtual_gid_maps = static:{vmail_groupid}
+smtpd_sasl_auth_enable = yes
+broken_sasl_auth_clients = yes
+smtpd_sasl_authenticated_header = yes
+smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:{config_dir}/mysql-virtual_recipient.cf, reject_unauth_destination{rbl_list}
+smtpd_use_tls = yes
+smtpd_tls_security_level = may
+smtpd_tls_cert_file = {config_dir}/smtpd.cert
+smtpd_tls_key_file = {config_dir}/smtpd.key
+transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf
+relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf
+relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf
+proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
+smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf
+smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf
+smtpd_client_message_rate_limit = 100
+maildrop_destination_concurrency_limit = 1
+maildrop_destination_recipient_limit = 1
+virtual_transport = maildrop
+header_checks = regexp:{config_dir}/header_checks
+mime_header_checks = regexp:{config_dir}/mime_header_checks
+nested_header_checks = regexp:{config_dir}/nested_header_checks
+body_checks = regexp:{config_dir}/body_checks
+inet_interfaces = all
\ No newline at end of file
diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master
index 007d51bff91adc11808141250923bd20838e3214..d22a0722f30c4c2d6a68a043a209017d3d1b3432 100644
--- a/install/tpl/server.ini.master
+++ b/install/tpl/server.ini.master
@@ -14,8 +14,15 @@ hostname=server1.domain.tld
nameservers=8.8.8.8,8.8.4.4
firewall=bastille
loglevel=2
+admin_notify_events=1
backup_dir=/var/backup
backup_mode=rootgz
+monit_url=
+monit_user=
+monit_password=
+munin_url=
+munin_user=
+munin_password=
[mail]
module=postfix_mysql
@@ -35,6 +42,10 @@ mailbox_size_limit=0
message_size_limit=0
mailbox_quota_stats=y
realtime_blackhole_list=
+overquota_notify_admin=y
+overquota_notify_client=y
+overquota_notify_freq=7
+overquota_notify_onok=n
sendmail_path=/usr/sbin/sendmail
[getmail]
@@ -58,7 +69,7 @@ nginx_group=www-data
apps_vhost_port=8081
apps_vhost_ip=_default_
apps_vhost_servername=
-php_open_basedir=[website_path]/web:[website_path]/private:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/usr/share/php
+php_open_basedir=[website_path]/web:[website_path]/private:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin
htaccess_allow_override=All
awstats_conf_dir=/etc/awstats
awstats_data_dir=/var/lib/awstats
@@ -82,8 +93,12 @@ add_web_users_to_sshusers_group=y
connect_userid_to_webid=n
connect_userid_to_webid_start=10000
web_folder_protection=y
-php_ini_check_minutes=1
-
+<<<<<<< .minephp_ini_check_minutes=1
+=======overquota_notify_admin=y
+overquota_notify_client=y
+overquota_notify_freq=7
+overquota_notify_onok=n
+>>>>>>> .theirs
[dns]
bind_user=root
bind_group=bind
diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index a79942d630cbca0f242d766b8e47ef9a08ace7f9..74f840070682634abf8d4e3c7600d1113fb108db 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -130,10 +130,21 @@ class functions {
}
public function get_ispconfig_url() {
+ global $app;
+
$url = (stristr($_SERVER['SERVER_PROTOCOL'],'HTTPS') || stristr($_SERVER['HTTPS'],'on'))?'https':'http';
- $url .= '://'.$_SERVER['SERVER_NAME'];
- if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
- $url .= ':'.$_SERVER['SERVER_PORT'];
+ if($_SERVER['SERVER_NAME'] != '_') {
+ $url .= '://'.$_SERVER['SERVER_NAME'];
+ if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
+ $url .= ':'.$_SERVER['SERVER_PORT'];
+ }
+ } else {
+ $app->uses("getconf");
+ $server_config = $app->getconf->get_server_config(1,'server');
+ $url .= '://'.$server_config['hostname'];
+ if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
+ $url .= ':'.$_SERVER['SERVER_PORT'];
+ }
}
return $url;
}
diff --git a/interface/lib/classes/ispcmail.inc.php b/interface/lib/classes/ispcmail.inc.php
index e30a711c1fa2f7d47f7477a9919083600788167f..d49af96fc6100135f24ce0078325247382ea2b88 100644
--- a/interface/lib/classes/ispcmail.inc.php
+++ b/interface/lib/classes/ispcmail.inc.php
@@ -414,16 +414,22 @@ class ispcmail {
$this->body = "This is a multi-part message in MIME format.\n\n";
if($text) {
- $this->body .= "--{$this->mime_boundary}\n" .
+ /*$this->body .= "--{$this->mime_boundary}\n" .
"Content-Type:text/plain; charset=\"" . strtolower($this->mail_charset) . "\"\n" .
- "Content-Transfer-Encoding: 7bit\n\n" . $this->text_part . "\n\n";
- }
+ "Content-Transfer-Encoding: 7bit\n\n" . $this->text_part . "\n\n";*/
+ $this->body .= "--{$this->mime_boundary}\n" .
+ "Content-Type:text/plain; charset=\"UTF-8\"\n" .
+ "Content-Transfer-Encoding: 8bit\n\n" . $this->text_part . "\n\n";
+ }
if($html) {
- $this->body .= "--{$this->mime_boundary}\n" .
+ /*$this->body .= "--{$this->mime_boundary}\n" .
"Content-Type:text/html; charset=\"" . strtolower($this->mail_charset) . "\"\n" .
- "Content-Transfer-Encoding: 7bit\n\n" . $this->html_part . "\n\n";
- }
+ "Content-Transfer-Encoding: 7bit\n\n" . $this->html_part . "\n\n";*/
+ $this->body .= "--{$this->mime_boundary}\n" .
+ "Content-Type:text/html; charset=\"UTF-8\"\n" .
+ "Content-Transfer-Encoding: 8bit\n\n" . $this->html_part . "\n\n";
+ }
if($attach) {
foreach($this->attachments as $att) {
@@ -490,17 +496,42 @@ class ispcmail {
$this->_is_signed = true;
}
+ private function _char_to_hex($matches) {
+ return '=' . strtoupper(dechex(ord($matches[1])));
+ }
+
/**
* Function to encode a header if necessary
* according to RFC2047
* @access private
*/
private function _encodeHeader($input, $charset = 'ISO-8859-1') {
- preg_match_all('/(\s?\w*[\x80-\xFF]+\w*\s?)/', $input, $matches);
- foreach ($matches[1] as $value) {
- $replacement = preg_replace('/([\x20\x80-\xFF])/e', '"=" . strtoupper(dechex(ord("\1")))', $value);
- $input = str_replace($value, '=?' . $charset . '?Q?' . $replacement . '?=', $input);
- }
+ preg_match_all('/(\s?\w*[\x80-\xFF]+\w*\s?)/', $input, $matches);
+ foreach ($matches[1] as $value) {
+ $replacement = preg_replace_callback('/([\x20\x80-\xFF])/', array($this, '_char_to_hex'), $value);
+ $input = str_replace($value, '=?' . $charset . '?Q?' . $replacement . '?=', $input);
+ }
+
+ return $input;
+ }
+
+ /**
+ * Function to encode the subject if necessary
+ * according to RFC2047
+ * @access private
+ */
+ private function _encodeSubject($input, $charset = 'ISO-8859-1') {
+ /*
+ if($charset == 'UTF-8' && function_exists('imap_8bit')) {
+ $input = "=?utf-8?Q?" . imap_8bit($input) . "?=";
+ } else {
+ preg_match_all('/(\s?\w*[\x80-\xFF]+\w*\s?)/', $input, $matches);
+ foreach ($matches[1] as $value) {
+ $replacement = preg_replace('/([\x20\x80-\xFF])/e', '"=" . strtoupper(dechex(ord("\1")))', $value);
+ $input = str_replace($value, '=?' . $charset . '?Q?' . $replacement . '?=', $input);
+ }
+ }*/
+ $input='=?UTF-8?B?'.base64_encode($input).'?=';
return $input;
}
@@ -578,7 +609,8 @@ class ispcmail {
//$subject = $this->_encodeHeader($this->headers['Subject'], $this->mail_charset);
$subject = $this->headers['Subject'];
- $enc_subject = $this->_encodeHeader($subject, $this->mail_charset);
+ //$enc_subject = $this->_encodeHeader($subject, $this->mail_charset);
+ $enc_subject = $this->_encodeSubject($subject, $this->mail_charset);
unset($this->headers['Subject']);
}
diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php
index e690a1ca7d9c48be602bad3a49462d006aed097d..b3a59e930dcaa6f30bccde513c94fe1b1ab8aafa 100644
--- a/interface/lib/classes/listform.inc.php
+++ b/interface/lib/classes/listform.inc.php
@@ -180,9 +180,10 @@ class listform {
if(@is_array($this->listDef['item'])) {
foreach($this->listDef['item'] as $i) {
$field = $i['field'];
+ $table = $i['table'];
// if($_REQUEST[$search_prefix.$field] != '') $sql_where .= " $field ".$i["op"]." '".$i["prefix"].$_REQUEST[$search_prefix.$field].$i["suffix"]."' and";
if(isset($_SESSION['search'][$list_name][$search_prefix.$field]) && $_SESSION['search'][$list_name][$search_prefix.$field] != ''){
- $sql_where .= " $field ".$i['op']." '".$app->db->quote($i['prefix'].$_SESSION['search'][$list_name][$search_prefix.$field].$i['suffix'])."' and";
+ $sql_where .= " ".($table != ''? $table.'.' : $this->listDef['table'].'.')."$field ".$i['op']." '".$app->db->quote($i['prefix'].$_SESSION['search'][$list_name][$search_prefix.$field].$i['suffix'])."' and";
}
}
}
@@ -216,7 +217,7 @@ class listform {
if($this->searchChanged == 1) $_SESSION['search'][$list_name]['page'] = 0;
$sql_von = $app->functions->intval($_SESSION['search'][$list_name]['page'] * $records_per_page);
- $record_count = $app->db->queryOneRecord("SELECT count(*) AS anzahl FROM $table WHERE $sql_where");
+ $record_count = $app->db->queryOneRecord("SELECT count(*) AS anzahl FROM $table".($app->listform->listDef['additional_tables'] != ''? ','.$app->listform->listDef['additional_tables'] : '')." WHERE $sql_where");
$pages = $app->functions->intval(($record_count['anzahl'] - 1) / $records_per_page);
@@ -356,6 +357,16 @@ class listform {
$record[$key] = date($this->lng('conf_format_dateshort'), strtotime($record[$key]));
}
}
+ break;
+ case 'DATETIMETSTAMP':
+ if ($record[$key] > 0) {
+ // is value int?
+ if (preg_match("/^[0-9]+[\.]?[0-9]*$/", $record[$key], $p)) {
+ $record[$key] = date($this->lng('conf_format_datetime'), $record[$key]);
+ } else {
+ $record[$key] = date($this->lng('conf_format_datetime'), strtotime($record[$key]));
+ }
+ }
break;
case 'DATE':
if ($record[$key] > 0) {
@@ -421,6 +432,12 @@ class listform {
if($record[$key] > 0) {
$record[$key] = date('Y-m-d',strtotime($record[$key]));
}
+ break;
+
+ case 'DATETIMETSTAMP':
+ if($record[$key] > 0) {
+ $record[$key] = date('Y-m-d H:i:s',strtotime($record[$key]));
+ }
break;
case 'DATE':
diff --git a/interface/lib/classes/listform_actions.inc.php b/interface/lib/classes/listform_actions.inc.php
index aef3371dd1d1d087ddb6a50b2764d2d07b8a7e2e..acb0b96d1a6ca3895ed5b94724b70f1ce2917196 100644
--- a/interface/lib/classes/listform_actions.inc.php
+++ b/interface/lib/classes/listform_actions.inc.php
@@ -36,7 +36,27 @@ class listform_actions {
public $SQLExtWhere = '';
public $SQLOrderBy = '';
public $SQLExtSelect = '';
-
+ private $sortKeys;
+
+ private function _sort($aOne, $aTwo) {
+ if(!is_array($aOne) || !is_array($aTwo)) return 0;
+
+ if(!is_array($this->sortKeys)) $this->sortKeys = array($this->sortKeys);
+ foreach($this->sortKeys as $sKey => $sDir) {
+ if(is_numeric($sKey)) {
+ $sKey = $sDir;
+ $sDir = 'ASC';
+ }
+ $a = $aOne[$sKey];
+ $b = $aTwo[$sKey];
+ if(is_string($a)) $a = strtolower($a);
+ if(is_string($b)) $b = strtolower($b);
+ if($a < $b) return ($sDir == 'DESC' ? 1 : -1);
+ elseif($a > $b) return ($sDir == 'DESC' ? -1 : 1);
+ }
+ return 0;
+ }
+
public function onLoad()
{
global $app, $conf, $list_def_file;
@@ -59,28 +79,49 @@ class listform_actions {
//* Manipulate order by for sorting / Every list has a stored value
//* Against notice error
- if(!isset($_SESSION['search'][$app->listform->listDef["name"].$app->listform->listDef['table']]['order'])){
- $_SESSION['search'][$app->listform->listDef["name"].$app->listform->listDef['table']]['order'] = '';
+ if(!isset($_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order'])){
+ $_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order'] = '';
}
-
+
+ $php_sort = false;
+
if(!empty($_GET['orderby'])){
$order = str_replace('tbl_col_','',$_GET['orderby']);
+
//* Check the css class submited value
if (preg_match("/^[a-z\_]{1,}$/",$order)) {
- if($_SESSION['search'][$app->listform->listDef["name"].$app->listform->listDef['table']]['order'] == $order){
- $_SESSION['search'][$app->listform->listDef["name"].$app->listform->listDef['table']]['order'] = $order.' DESC';
+
+ if(isset($app->listform->listDef['phpsort']) && is_array($app->listform->listDef['phpsort']) && in_array($order, $app->listform->listDef['phpsort'])) {
+ $php_sort = true;
+ } else {
+ // prepend correct table
+ $prepend_table = $app->listform->listDef['table'];
+ if(trim($app->listform->listDef['additional_tables']) != '' && is_array($app->listform->listDef['item']) && count($app->listform->listDef['item']) > 0) {
+ foreach($app->listform->listDef['item'] as $field) {
+ if($field['field'] == $order && $field['table'] != ''){
+ $prepend_table = $field['table'];
+ break;
+ }
+ }
+ }
+ $order = $prepend_table.'.'.$order;
+ }
+
+ if($_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order'] == $order){
+ $_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order'] = $order.' DESC';
} else {
- $_SESSION['search'][$app->listform->listDef["name"].$app->listform->listDef['table']]['order'] = $order;
+ $_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order'] = $order;
}
+ $_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order_in_php'] = $php_sort;
}
}
// If a manuel oder by like customers isset the sorting will be infront
- if(!empty($_SESSION['search'][$app->listform->listDef["name"].$app->listform->listDef['table']]['order'])){
- if(empty($this->SQLOrderBy)){
- $this->SQLOrderBy = "ORDER BY ".$_SESSION['search'][$app->listform->listDef["name"].$app->listform->listDef['table']]['order'];
+ if(!empty($_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order']) && !$_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order_in_php']){
+ if(empty($this->SQLOrderBy)){
+ $this->SQLOrderBy = "ORDER BY ".$_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order'];
} else {
- $this->SQLOrderBy = str_replace("ORDER BY ","ORDER BY ".$_SESSION['search'][$app->listform->listDef["name"].$app->listform->listDef['table']]['order'].', ',$this->SQLOrderBy);
+ $this->SQLOrderBy = str_replace("ORDER BY ","ORDER BY ".$_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order'].', ',$this->SQLOrderBy);
}
}
@@ -95,7 +136,18 @@ class listform_actions {
$records_new[] = $this->prepareDataRow($rec);
}
}
-
+
+ if(!empty($_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order']) && $_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order_in_php']) {
+ $order_by = $_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order'];
+ $order_dir = 'ASC';
+ if(substr($order_by, -5) === ' DESC') {
+ $order_by = substr($order_by, 0, -5);
+ $order_dir = 'DESC';
+ }
+ $this->sortKeys = array($order_by => $order_dir);
+ uasort($records_new, array($this, '_sort'));
+ }
+
$app->tpl->setLoop('records',$records_new);
$this->onShow();
@@ -133,7 +185,7 @@ class listform_actions {
return $rec;
}
- private function getQueryString() {
+ public function getQueryString() {
global $app;
$sql_where = '';
@@ -151,6 +203,7 @@ class listform_actions {
}
$sql_where = $app->listform->getSearchSQL($sql_where);
+ if($app->listform->listDef['join_sql']) $sql_where .= ' AND '.$app->listform->listDef['join_sql'];
$app->tpl->setVar($app->listform->searchValues);
$order_by_sql = $this->SQLOrderBy;
@@ -161,109 +214,26 @@ class listform_actions {
$extselect = '';
$join = '';
- if(!empty($_SESSION['search'][$app->listform->listDef["name"].$app->listform->listDef['table']]['order'])){
- $order = str_replace(' DESC','',$_SESSION['search'][$app->listform->listDef["name"].$app->listform->listDef['table']]['order']);
- if($order == 'server_id' && $app->listform->listDef['table'] != 'server'){
- $join .= ' LEFT JOIN server as s ON '.$app->listform->listDef['table'].'.server_id = s.server_id ';
- $order_by_sql = str_replace('server_id','s.server_name',$order_by_sql);
- } elseif($order == 'client_id' && $app->listform->listDef['table'] != 'client'){
- $join .= ' LEFT JOIN client as c ON '.$app->listform->listDef['table'].'.client_id = c.client_id ';
- $order_by_sql = str_replace('client_id','c.contact_name',$order_by_sql);
- } elseif($order == 'parent_domain_id'){
- $join .= ' LEFT JOIN web_domain as wd ON '.$app->listform->listDef['table'].'.parent_domain_id = wd.domain_id ';
- //$order_by_sql = str_replace(' domain', ' '.$app->listform->listDef['table'].'.domain',$order_by_sql);
- //$order_by_sql = str_replace('parent_domain_id','wd.domain',$order_by_sql);
- $order_by_sql = preg_replace('@( |,|^)(domain)( |,|$)@', '$1'.$app->listform->listDef['table'].'.$2$3', $order_by_sql);
- $order_by_sql = preg_replace('@( |,|^)(parent_domain_id)( |,|$)@', '$1wd.domain$3', $order_by_sql);
-
- //$sql_where = str_replace('type',$app->listform->listDef['table'].'.type',$sql_where);
- //$sql_where = str_replace(' domain',' '.$app->listform->listDef['table'].'.domain',$sql_where);
- $sql_where = preg_replace('@( |,|^)(type)( |,|$)@', '$1'.$app->listform->listDef['table'].'.$2$3', $sql_where);
- $sql_where = preg_replace('@( |,|^)(domain)( |,|$)@', '$1'.$app->listform->listDef['table'].'.$2$3', $sql_where);
- } elseif($order == 'sys_groupid'){
- $join .= ' LEFT JOIN sys_group as sg ON '.$app->listform->listDef['table'].'.sys_groupid = sg.groupid ';
- $order_by_sql = str_replace('sys_groupid','sg.name',$order_by_sql);
- } elseif($order == 'rid'){
- $join .= ' LEFT JOIN spamfilter_users as su ON '.$app->listform->listDef['table'].'.rid = su.id ';
- $order_by_sql = str_replace('rid','su.email',$order_by_sql);
- } elseif($order == 'policy_id'){
- $join .= ' LEFT JOIN spamfilter_policy as sp ON '.$app->listform->listDef['table'].'.policy_id = sp.id ';
- $order_by_sql = str_replace('policy_id','sp.policy_name',$order_by_sql);
- } elseif($order == 'web_folder_id'){
- $join .= ' LEFT JOIN web_folder as wf ON '.$app->listform->listDef['table'].'.web_folder_id = wf.web_folder_id ';
- $order_by_sql = str_replace('web_folder_id','wf.path',$order_by_sql);
- } elseif($order == 'ostemplate_id' && $app->listform->listDef['table'] != 'openvz_ostemplate'){
- $join .= ' LEFT JOIN openvz_ostemplate as oo ON '.$app->listform->listDef['table'].'.ostemplate_id = oo.ostemplate_id ';
- $order_by_sql = str_replace('ostemplate_id','oo.template_name',$order_by_sql);
- } elseif($order == 'template_id' && $app->listform->listDef['table'] != 'openvz_template'){
- $join .= ' LEFT JOIN openvz_template as ot ON '.$app->listform->listDef['table'].'.template_id = ot.template_id ';
- $order_by_sql = str_replace('template_id','ot.template_name',$order_by_sql);
- } elseif($order == 'sender_id' && $app->listform->listDef['table'] != 'sys_user'){
- $join .= ' LEFT JOIN sys_user as su ON '.$app->listform->listDef['table'].'.sender_id = su.userid ';
- $order_by_sql = str_replace('sender_id','su.username',$order_by_sql);
- } elseif($order == 'web_traffic_last_month'){
- $tmp_year = date('Y',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
- $tmp_month = date('m',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
- $extselect .= ', SUM(wt.traffic_bytes) as calctraffic';
- $join .= ' INNER JOIN web_traffic as wt ON '.$app->listform->listDef['table'].'.domain = wt.hostname ';
- $sql_where .= " AND YEAR(wt.traffic_date) = '$tmp_year' AND MONTH(wt.traffic_date) = '$tmp_month'";
- $order_by_sql = str_replace('web_traffic_last_month','calctraffic',$order_by_sql);
- $order_by_sql = "GROUP BY domain ".$order_by_sql;
- } elseif($order == 'web_traffic_this_month'){
- $tmp_year = date('Y');
- $tmp_month = date('m');
- $extselect .= ', SUM(wt.traffic_bytes) as calctraffic';
- $join .= ' INNER JOIN web_traffic as wt ON '.$app->listform->listDef['table'].'.domain = wt.hostname ';
- $sql_where .= " AND YEAR(wt.traffic_date) = '$tmp_year' AND MONTH(wt.traffic_date) = '$tmp_month'";
- $order_by_sql = str_replace('web_traffic_this_month','calctraffic',$order_by_sql);
- $order_by_sql = "GROUP BY domain ".$order_by_sql;
- } elseif($order == 'web_traffic_last_year'){
- $tmp_year = date('Y',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
- $extselect .= ', SUM(wt.traffic_bytes) as calctraffic';
- $join .= ' INNER JOIN web_traffic as wt ON '.$app->listform->listDef['table'].'.domain = wt.hostname ';
- $sql_where .= " AND YEAR(wt.traffic_date) = '$tmp_year'";
- $order_by_sql = str_replace('web_traffic_last_year','calctraffic',$order_by_sql);
- $order_by_sql = "GROUP BY domain ".$order_by_sql;
- } elseif($order == 'web_traffic_this_year'){
- $tmp_year = date('Y');
- $extselect .= ', SUM(wt.traffic_bytes) as calctraffic';
- $join .= ' INNER JOIN web_traffic as wt ON '.$app->listform->listDef['table'].'.domain = wt.hostname ';
- $sql_where .= " AND YEAR(wt.traffic_date) = '$tmp_year'";
- $order_by_sql = str_replace('web_traffic_this_year','calctraffic',$order_by_sql);
- $order_by_sql = "GROUP BY domain ".$order_by_sql;
- } elseif($order == 'mail_traffic_last_month'){
- $tmp_date = date('Y-m',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
- $join .= ' INNER JOIN mail_traffic as mt ON '.$app->listform->listDef['table'].'.mailuser_id = mt.mailuser_id ';
- $sql_where .= " AND mt.month like '$tmp_date%'";
- $order_by_sql = str_replace('mail_traffic_last_month','traffic',$order_by_sql);
- } elseif($order == 'mail_traffic_this_month'){
- $tmp_date = date('Y-m');
- $join .= ' INNER JOIN mail_traffic as mt ON '.$app->listform->listDef['table'].'.mailuser_id = mt.mailuser_id ';
- $sql_where .= " AND mt.month like '$tmp_date%'";
- $order_by_sql = str_replace('mail_traffic_this_month','traffic',$order_by_sql);
- } elseif($order == 'mail_traffic_last_year'){
- $tmp_date = date('Y',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
- $extselect .= ', SUM(mt.traffic) as calctraffic';
- $join .= ' INNER JOIN mail_traffic as mt ON '.$app->listform->listDef['table'].'.mailuser_id = mt.mailuser_id ';
- $sql_where .= " AND mt.month like '$tmp_date%'";;
- $order_by_sql = str_replace('mail_traffic_last_year','calctraffic',$order_by_sql);
- $order_by_sql = "GROUP BY mailuser_id ".$order_by_sql;
- } elseif($order == 'mail_traffic_this_year'){
- $tmp_date = date('Y');
- $extselect .= ', SUM(mt.traffic) as calctraffic';
- $join .= ' INNER JOIN mail_traffic as mt ON '.$app->listform->listDef['table'].'.mailuser_id = mt.mailuser_id ';
- $sql_where .= " AND mt.month like '$tmp_date%'";
- $order_by_sql = str_replace('mail_traffic_this_year','calctraffic',$order_by_sql);
- $order_by_sql = "GROUP BY mailuser_id ".$order_by_sql;
- }
- }
if($this->SQLExtSelect != '') {
if(substr($this->SQLExtSelect,0,1) != ',') $this->SQLExtSelect = ','.$this->SQLExtSelect;
$extselect .= $this->SQLExtSelect;
}
+
+ $table_selects = array();
+ $table_selects[] = trim($app->listform->listDef['table']).'.*';
+ $app->listform->listDef['additional_tables'] = trim($app->listform->listDef['additional_tables']);
+ if($app->listform->listDef['additional_tables'] != ''){
+ $additional_tables = explode(',', $app->listform->listDef['additional_tables']);
+ foreach($additional_tables as $additional_table){
+ $table_selects[] = trim($additional_table).'.*';
+ }
+ }
+ $select = implode(', ', $table_selects);
- return 'SELECT '.$app->listform->listDef['table'].'.*'.$extselect.' FROM '.$app->listform->listDef['table']."$join WHERE $sql_where $order_by_sql $limit_sql";
+ $sql = 'SELECT '.$select.$extselect.' FROM '.$app->listform->listDef['table'].($app->listform->listDef['additional_tables'] != ''? ','.$app->listform->listDef['additional_tables'] : '')."$join WHERE $sql_where $order_by_sql $limit_sql";
+ //echo $sql;
+ return $sql;
}
diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index ed7c3ed764424a9834818bf4cbd6f8e6a7837a7e..66ba90dbf124ed9983f7ad8b6f374cc38a8afad2 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -2137,12 +2137,12 @@ class remoting {
return false;
}
- if (preg_match('/^[a-z0-9][a-z0-9\-]+[a-z0-9](\.[a-z]{2,4})+$/i', $origin)) {
+ if(!preg_match('/^[a-z0-9][a-z0-9\-]+[a-z0-9](\.[a-z]{2,4})+$/i', $origin)){
$this->server->fault('no_domain_found', 'Invalid domain name.');
return false;
}
- $rec = $app->db->queryOneRecord("SELECT id FROM dns_soa WHERE origin like '".$origin.'%');
+ $rec = $app->db->queryOneRecord("SELECT id FROM dns_soa WHERE origin like '".$origin."%'");
if(isset($rec['id'])) {
return $app->functions->intval($rec['id']);
} else {
diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index 510c7267d9ce8e7bf19c5a7b8b056c064eac3fd1..f9cf59d37c2c530bce252560ee4cced87c2f8c94 100644
--- a/interface/lib/classes/remoting_lib.inc.php
+++ b/interface/lib/classes/remoting_lib.inc.php
@@ -817,7 +817,8 @@ class remoting_lib {
if(@is_numeric($primary_id)) {
$sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id;
return $app->db->queryOneRecord($sql);
- } elseif (@is_array($primary_id)) {
+ } elseif (@is_array($primary_id) || @is_object($primary_id)) {
+ if(@is_object($primary_id)) $primary_id = get_object_vars($primary_id); // do not use cast (array)xxx because it returns private and protected properties!
$sql_offset = 0;
$sql_limit = 0;
$sql_where = '';
diff --git a/interface/lib/classes/sites_database_plugin.inc.php b/interface/lib/classes/sites_database_plugin.inc.php
index b8181aa25dc2abe71ec03e2236106c1fb1d51ac2..37cc546b137923186107af27d602b00679eea2dd 100644
--- a/interface/lib/classes/sites_database_plugin.inc.php
+++ b/interface/lib/classes/sites_database_plugin.inc.php
@@ -33,7 +33,7 @@ class sites_database_plugin {
public function processDatabaseInsert($form_page) {
global $app;
- if($form_page->dataRecord["parent_domain_id"] > 0) {
+ /*if($form_page->dataRecord["parent_domain_id"] > 0) {
$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($form_page->dataRecord["parent_domain_id"]));
//* The Database user shall be owned by the same group then the website
@@ -42,14 +42,14 @@ class sites_database_plugin {
$sys_groupid = $form_page->dataRecord['sys_groupid'];
}
-
+
if($form_page->dataRecord['database_user_id']) {
// check if there has already been a database on this server with that user
- $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($form_page->dataRecord['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_user_id']) . "') AND `sys_groupid` = '" . $app->functions->intval($sys_groupid) . "'");
+ $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($form_page->dataRecord['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_user_id']) . "')");
if($check && $check['cnt'] < 1) {
// we need to make a datalog insert for the database users that are connected to this database
- $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_user_id']) . "' AND `sys_groupid` = '" . $app->functions->intval($sys_groupid) . "'");
+ $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_user_id']) . "'");
if($db_user) {
$db_user['server_id'] = $form_page->dataRecord['server_id'];
$app->db->datalogSave('web_database_user', 'INSERT', 'database_user_id', $db_user['database_user_id'], array(), $db_user);
@@ -59,23 +59,23 @@ class sites_database_plugin {
if($form_page->dataRecord['database_ro_user_id']) {
// check if there has already been a database on this server with that user
- $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($form_page->dataRecord['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_ro_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_ro_user_id']) . "') AND `sys_groupid` = '" . $app->functions->intval($sys_groupid) . "'");
+ $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($form_page->dataRecord['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_ro_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_ro_user_id']) . "')");
if($check && $check['cnt'] < 1) {
// we need to make a datalog insert for the database users that are connected to this database
- $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_ro_user_id']) . "' AND `sys_groupid` = '" . $app->functions->intval($sys_groupid) . "'");
+ $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_ro_user_id']) . "'");
if($db_user) {
$db_user['server_id'] = $form_page->dataRecord['server_id'];
$app->db->datalogSave('web_database_user', 'INSERT', 'database_user_id', $db_user['database_user_id'], array(), $db_user);
}
}
- }
+ }*/
}
public function processDatabaseUpdate($form_page) {
global $app;
- $old_record = $app->db->queryOneRecord('SELECT * FROM `web_database` WHERE `database_id` = ' . $app->functions->intval($form_page->id));
+ /*$old_record = $app->db->queryOneRecord('SELECT * FROM `web_database` WHERE `database_id` = ' . $app->functions->intval($form_page->id));
if($form_page->dataRecord["parent_domain_id"] > 0) {
$web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($form_page->dataRecord["parent_domain_id"]));
@@ -89,10 +89,10 @@ class sites_database_plugin {
// check if database user has changed
if($old_record['database_user_id'] && $old_record['database_user_id'] != $form_page->dataRecord['database_user_id'] && $old_record['database_user_id'] != $form_page->dataRecord['database_ro_user_id']) {
// check if any database on the server still uses this one
- $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($form_page->dataRecord['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($old_record['database_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($old_record['database_user_id']) . "') AND `sys_groupid` = '" . $app->functions->intval($sys_groupid) . "' AND `database_id` != '" . $app->functions->intval($form_page->id) . "'");
+ $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($form_page->dataRecord['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($old_record['database_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($old_record['database_user_id']) . "') AND `database_id` != '" . $app->functions->intval($form_page->id) . "'");
if($check['cnt'] < 1) {
// send a datalog delete
- $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($old_record['database_user_id']) . "' AND `sys_groupid` = '" . $app->functions->intval($sys_groupid) . "'");
+ $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($old_record['database_user_id']) . "'");
if($db_user) {
$db_user['server_id'] = $form_page->dataRecord['server_id'];
$app->db->datalogSave('web_database_user', 'DELETE', 'database_user_id', $db_user['database_user_id'], $db_user, array());
@@ -102,24 +102,24 @@ class sites_database_plugin {
// check if readonly database user has changed
if($old_record['database_ro_user_id'] && $old_record['database_ro_user_id'] != $form_page->dataRecord['database_ro_user_id'] && $old_record['database_ro_user_id'] != $form_page->dataRecord['database_user_id']) {
// check if any database on the server still uses this one
- $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($form_page->dataRecord['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($old_record['database_ro_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($old_record['database_ro_user_id']) . "') AND `sys_groupid` = '" . $app->functions->intval($sys_groupid) . "' AND `database_id` != '" . $app->functions->intval($form_page->id) . "'");
+ $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($form_page->dataRecord['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($old_record['database_ro_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($old_record['database_ro_user_id']) . "') AND `database_id` != '" . $app->functions->intval($form_page->id) . "'");
if($check['cnt'] < 1) {
// send a datalog delete
- $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($old_record['database_ro_user_id']) . "' AND `sys_groupid` = '" . $app->functions->intval($sys_groupid) . "'");
+ $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($old_record['database_ro_user_id']) . "'");
if($db_user) {
$db_user['server_id'] = $form_page->dataRecord['server_id'];
$app->db->datalogSave('web_database_user', 'DELETE', 'database_user_id', $db_user['database_user_id'], $db_user, array());
}
}
- }
+ }*/
- if($form_page->dataRecord['database_user_id']) {
+ /*if($form_page->dataRecord['database_user_id']) {
// check if there has already been a database on this server with that user
- $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($form_page->dataRecord['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_user_id']) . "') AND `sys_groupid` = '" . $app->functions->intval($sys_groupid) . "'");
+ $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($form_page->dataRecord['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_user_id']) . "')");
if($check && $check['cnt'] < 1) {
// we need to make a datalog insert for the database users that are connected to this database
- $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_user_id']) . "' AND `sys_groupid` = '" . $app->functions->intval($sys_groupid) . "'");
+ $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_user_id']) . "'");
if($db_user) {
$db_user['server_id'] = $form_page->dataRecord['server_id'];
$app->db->datalogSave('web_database_user', 'INSERT', 'database_user_id', $db_user['database_user_id'], array(), $db_user);
@@ -129,30 +129,30 @@ class sites_database_plugin {
if($form_page->dataRecord['database_ro_user_id']) {
// check if there has already been a database on this server with that user
- $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($form_page->dataRecord['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_ro_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_ro_user_id']) . "') AND `sys_groupid` = '" . $app->functions->intval($sys_groupid) . "'");
+ $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($form_page->dataRecord['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_ro_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_ro_user_id']) . "')");
if($check && $check['cnt'] < 1) {
// we need to make a datalog insert for the database users that are connected to this database
- $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_ro_user_id']) . "' AND `sys_groupid` = '" . $app->functions->intval($sys_groupid) . "'");
+ $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($form_page->dataRecord['database_ro_user_id']) . "'");
if($db_user) {
$db_user['server_id'] = $form_page->dataRecord['server_id'];
$app->db->datalogSave('web_database_user', 'INSERT', 'database_user_id', $db_user['database_user_id'], array(), $db_user);
}
}
- }
+ }*/
}
public function processDatabaseDelete($primary_id) {
global $app;
- $old_record = $app->db->queryOneRecord('SELECT * FROM `web_database` WHERE `database_id` = ' . $app->functions->intval($primary_id));
+ /*$old_record = $app->db->queryOneRecord('SELECT * FROM `web_database` WHERE `database_id` = ' . $app->functions->intval($primary_id));
if($old_record['database_user_id']) {
// check if any database on the server still uses this one
- $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($old_record['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($old_record['database_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($old_record['database_user_id']) . "') AND `sys_groupid` = '" . $app->functions->intval($old_record['sys_groupid']) . "' AND `database_id` != '" . $app->functions->intval($primary_id) . "'");
+ $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($old_record['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($old_record['database_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($old_record['database_user_id']) . "') AND `database_id` != '" . $app->functions->intval($primary_id) . "'");
if($check['cnt'] < 1) {
// send a datalog delete
- $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($old_record['database_user_id']) . "' AND `sys_groupid` = '" . $app->functions->intval($old_record['sys_groupid']) . "'");
+ $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($old_record['database_user_id']) . "'");
if($db_user) {
$db_user['server_id'] = $old_record['server_id'];
$app->db->datalogSave('web_database_user', 'DELETE', 'database_user_id', $db_user['database_user_id'], $db_user, array());
@@ -161,16 +161,16 @@ class sites_database_plugin {
}
if($old_record['database_ro_user_id']) {
// check if any database on the server still uses this one
- $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($old_record['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($old_record['database_ro_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($old_record['database_ro_user_id']) . "') AND `sys_groupid` = '" . $app->functions->intval($old_record['sys_groupid']) . "' AND `database_id` != '" . $app->functions->intval($primary_id) . "'");
+ $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `server_id` = '" . $app->functions->intval($old_record['server_id']) . "' AND (`database_user_id` = '" . $app->functions->intval($old_record['database_ro_user_id']) . "' OR `database_ro_user_id` = '" . $app->functions->intval($old_record['database_ro_user_id']) . "') AND `database_id` != '" . $app->functions->intval($primary_id) . "'");
if($check['cnt'] < 1) {
// send a datalog delete
- $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($old_record['database_ro_user_id']) . "' AND `sys_groupid` = '" . $app->functions->intval($old_record['sys_groupid']) . "'");
+ $db_user = $app->db->queryOneRecord("SELECT * FROM `web_database_user` WHERE `database_user_id` = '" . $app->functions->intval($old_record['database_ro_user_id']) . "'");
if($db_user) {
$db_user['server_id'] = $old_record['server_id'];
$app->db->datalogSave('web_database_user', 'DELETE', 'database_user_id', $db_user['database_user_id'], $db_user, array());
}
}
- }
+ }*/
}
}
diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php
index 05e53fbb9543326b112aa38e0acca6e775a8f0a7..23b05ce2fa374ecee0d69c2dd65b7c4482257f31 100644
--- a/interface/lib/classes/tform.inc.php
+++ b/interface/lib/classes/tform.inc.php
@@ -949,6 +949,7 @@ class tform {
$field_value_array[] = $field_value;
}
foreach($field_value_array as $field_value) {
+ $field_value = trim($field_value);
if(function_exists('filter_var')) {
if(!filter_var($field_value,FILTER_VALIDATE_IP)) {
$errmsg = $validator['errmsg'];
diff --git a/interface/lib/classes/tpl.inc.php b/interface/lib/classes/tpl.inc.php
index 72d0dfe0afce3e1330a360e67e234aa42f0acb1a..070e34919b1e2115096a64cb0e04f65df885d10b 100644
--- a/interface/lib/classes/tpl.inc.php
+++ b/interface/lib/classes/tpl.inc.php
@@ -192,12 +192,12 @@ if (!defined('vlibTemplateClassLoaded')) {
if (is_array($k)) {
foreach($k as $key => $value){
$key = ($this->OPTIONS['CASELESS']) ? strtolower(trim($key)) : trim($key);
- if (preg_match('/^[A-Za-z_]+[A-Za-z0-9_]*$/', $key) && $value !== null ) {
+ if (preg_match('/^[A-Za-z]+[A-Za-z0-9_]*$/', $key) && $value !== null ) {
$this->_vars[$key] = $value;
}
}
} else {
- if (preg_match('/^[A-Za-z_]+[A-Za-z0-9_]*$/', $k) && $v !== null) {
+ if (preg_match('/^[A-Za-z]+[A-Za-z0-9_]*$/', $k) && $v !== null) {
if ($this->OPTIONS['CASELESS']) $k = strtolower($k);
$this->_vars[trim($k)] = $v;
} else {
@@ -243,7 +243,7 @@ if (!defined('vlibTemplateClassLoaded')) {
for ($i = 0; $i < $num_args; $i++) {
$var = func_get_arg($i);
if ($this->OPTIONS['CASELESS']) $var = strtolower($var);
- if (!preg_match('/^[A-Za-z_]+[A-Za-z0-9_]*$/', $var)) continue;
+ if (!preg_match('/^[A-Za-z]+[A-Za-z0-9_]*$/', $var)) continue;
unset($this->_vars[$var]);
}
return true;
@@ -300,12 +300,14 @@ if (!defined('vlibTemplateClassLoaded')) {
*/
public function setLoop($k, $v)
{
- if (is_array($v) && preg_match('/^[A-Za-z_]+[A-Za-z0-9_]*$/', $k)) {
+ if (is_array($v) && preg_match('/^[A-Za-z]+[A-Za-z0-9_]*$/', $k)) {
$k = ($this->OPTIONS['CASELESS']) ? strtolower(trim($k)) : trim($k);
$this->_arrvars[$k] = array();
if ($this->OPTIONS['SET_LOOP_VAR'] && !empty($v)) $this->setvar($k, 1);
if (($this->_arrvars[$k] = $this->_arrayBuild($v)) == false) {
vlibTemplateError::raiseError('VT_WARNING_INVALID_ARR', WARNING, $k);
+ } else {
+ $this->vars['_'.$k.'_num'] = count($v);
}
}
return true;
@@ -849,8 +851,8 @@ if (!defined('vlibTemplateClassLoaded')) {
$regex.= '[\"\']?';
$regex.= ')?\s*';
$regex.= '(?:>|\/>|}|-->){1}';
- $regex.= '([\r\n|\n|\r])?/ie';
- $data = preg_replace($regex,"\$this->_parseTag(array('\\0','\\1','\\2','\\3','\\4','\\5','\\6','\\7','\\8','\\9'));",$data);
+ $regex.= '([\r\n|\n|\r])?/i';
+ $data = preg_replace_callback($regex, array($this, _parseTag), $data);
if ($this->_cache) { // add cache if need be
$this->_createCache($data);
diff --git a/interface/lib/classes/validate_ftpuser.inc.php b/interface/lib/classes/validate_ftpuser.inc.php
index 06826505b94cd32771fdea26a8e3618e8a8900f9..60768a33d8104e558c27eae89e3ff32df5f8738a 100644
--- a/interface/lib/classes/validate_ftpuser.inc.php
+++ b/interface/lib/classes/validate_ftpuser.inc.php
@@ -47,7 +47,7 @@ class validate_ftpuser {
$ftp_data = $app->db->queryOneRecord("SELECT parent_domain_id FROM ftp_user WHERE ftp_user_id = '".$app->db->quote($app->tform->primary_id)."'");
- if(!$ftp_data["parent_domain_id"]) {
+ if(!is_array($ftp_data) || $ftp_data["parent_domain_id"] < 1) {
$errmsg = $validator['errmsg'];
if(isset($app->tform->wordbook[$errmsg])) {
return $app->tform->wordbook[$errmsg]." \r\n";
@@ -57,7 +57,7 @@ class validate_ftpuser {
}
$domain_data = $app->db->queryOneRecord("SELECT domain_id, document_root FROM web_domain WHERE domain_id = '".$app->db->quote($ftp_data["parent_domain_id"])."'");
- if(!$domain_data["domain_id"]) {
+ if(!is_array($domain_data) || $domain_data["domain_id"] < 1) {
$errmsg = $validator['errmsg'];
if(isset($app->tform->wordbook[$errmsg])) {
return $app->tform->wordbook[$errmsg]." \r\n";
@@ -75,6 +75,9 @@ class validate_ftpuser {
if(stristr($field_value,'..') or stristr($field_value,'./') or stristr($field_value,'/.')) $is_ok = false;
+ //* Final check if docroot path of website is >= 5 chars
+ if(strlen($doc_root) < 5) $is_ok = false;
+
if($is_ok == false) {
$errmsg = $validator['errmsg'];
if(isset($app->tform->wordbook[$errmsg])) {
diff --git a/interface/lib/plugins/sites_web_database_user_plugin.inc.php b/interface/lib/plugins/sites_web_database_user_plugin.inc.php
index 30c1e221670752fd1638c57863c01b1d12e57622..791ee593b68a647887a6db7def278dc638a1f0ec 100644
--- a/interface/lib/plugins/sites_web_database_user_plugin.inc.php
+++ b/interface/lib/plugins/sites_web_database_user_plugin.inc.php
@@ -27,7 +27,7 @@ class sites_web_database_user_plugin {
global $app, $conf;
// make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it
- // also make sure that the user can not delete domain created by a admin
+ // also make sure that the user can not delete entry created by an admin
if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($page_form->dataRecord["client_group_id"])) {
$client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]);
$app->db->query("UPDATE web_database_user SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE database_user_id = ".$page_form->id);
@@ -36,6 +36,6 @@ class sites_web_database_user_plugin {
$client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]);
$app->db->query("UPDATE web_database_user SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE database_user_id = ".$page_form->id);
}
- $app->db->query("UPDATE web_database_user SET server_id = '" . $app->functions->intval($conf['server_id']) . "' WHERE database_user_id = ".$page_form->id);
+ //$app->db->query("UPDATE web_database_user SET server_id = '" . $app->functions->intval($conf['server_id']) . "' WHERE database_user_id = ".$page_form->id);
}
}
\ No newline at end of file
diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index fb5bf87fd57c45571b0985d9f5bcd4200ef86f99..c83075f8251336e0cd9f5f8e0b7393e87b6ea8b5 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -150,6 +150,14 @@ $form["tabs"]['server'] = array(
'width' => '40',
'maxlength' => '255'
),
+ 'admin_notify_events' => array(
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'value' => array('3' => 'no_notifications_txt', '0' => 'Debug', '1' => 'Warnings', '2' => 'Errors'),
+ 'width' => '40',
+ 'maxlength' => '255'
+ ),
'backup_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
@@ -169,6 +177,62 @@ $form["tabs"]['server'] = array(
'width' => '40',
'maxlength' => '255'
),
+ 'monit_url' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'validators' => array ( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
+ 'errmsg'=> 'monit_url_error_regex'),
+ ),
+ 'value' => '',
+ 'width' => '40',
+ 'maxlength' => '255'
+ ),
+ 'monit_user' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'width' => '40',
+ 'maxlength' => '255'
+ ),
+ 'monit_password' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'width' => '40',
+ 'maxlength' => '255'
+ ),
+ 'munin_url' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'validators' => array ( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
+ 'errmsg'=> 'munin_url_error_regex'),
+ ),
+ 'value' => '',
+ 'width' => '40',
+ 'maxlength' => '255'
+ ),
+ 'munin_user' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'width' => '40',
+ 'maxlength' => '255'
+ ),
+ 'munin_password' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'width' => '40',
+ 'maxlength' => '255'
+ ),
##################################
# ENDE Datatable fields
##################################
@@ -331,23 +395,38 @@ $form["tabs"]['mail'] = array(
'formtype' => 'TEXT',
'default' => '',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])(,\s*(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]))*$/',
+ 'regex' => '/^((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])(,\s*(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]))*)?$/',
'errmsg'=> 'rbl_error_regex'),
),
'value' => '',
'width' => '40',
'maxlength' => '255'
),
- 'sendmail_path' => array(
+ 'overquota_notify_admin' => array(
'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'y',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
+ 'overquota_notify_client' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'y',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
+ 'overquota_notify_freq' => array(
+ 'datatype' => 'INTEGER',
'formtype' => 'TEXT',
- 'default' => '/usr/sbin/sendmail',
- 'validators' => array(0 => array('type' => 'NOTEMPTY',
- 'errmsg' => 'sendmail_path_error_empty'),
- ),
+ 'default' => '7',
'value' => '',
- 'width' => '40',
- 'maxlength' => '255'
+ 'width' => '20',
+ 'maxlength' => '255'
+ ),
+ 'overquota_notify_onok' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array(0 => 'n', 1 => 'y')
),
##################################
# ENDE Datatable fields
@@ -563,6 +642,32 @@ $form["tabs"]['web'] = array(
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
+ 'overquota_notify_admin' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'y',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
+ 'overquota_notify_client' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'y',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
+ 'overquota_notify_freq' => array(
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'default' => '7',
+ 'value' => '',
+ 'width' => '20',
+ 'maxlength' => '255'
+ ),
+ 'overquota_notify_onok' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
'user' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
diff --git a/interface/web/admin/form/server_ip.tform.php b/interface/web/admin/form/server_ip.tform.php
index 98fa07de51ca9d445ab3b75f4e34b5e3b49582c9..e565e1eec0b914cecf7203eb57e0c9b18f6e8eee 100644
--- a/interface/web/admin/form/server_ip.tform.php
+++ b/interface/web/admin/form/server_ip.tform.php
@@ -105,7 +105,7 @@ $form["tabs"]['server_ip'] = array (
'formtype' => 'SELECT',
'default' => '',
'datasource' => array ( 'type' => 'SQL',
- 'querystring' => "SELECT client_id,CONCAT(contact_name,' :: ',username) as name FROM client WHERE {AUTHSQL} ORDER BY contact_name",
+ 'querystring' => "SELECT client_id,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM client WHERE {AUTHSQL} ORDER BY contact_name",
'keyfield'=> 'client_id',
'valuefield'=> 'name'
),
diff --git a/interface/web/admin/form/server_php.tform.php b/interface/web/admin/form/server_php.tform.php
index cc20572ecfa6f9a5a95517476ba072646a3c7482..58c1d7fd40cd3859cb823a6a5cdcec729bb4236a 100644
--- a/interface/web/admin/form/server_php.tform.php
+++ b/interface/web/admin/form/server_php.tform.php
@@ -100,7 +100,7 @@ $form["tabs"]['php_name'] = array (
'formtype' => 'SELECT',
'default' => '',
'datasource' => array ( 'type' => 'SQL',
- 'querystring' => "SELECT client_id,CONCAT(contact_name,' :: ',username) as name FROM client WHERE {AUTHSQL} ORDER BY contact_name",
+ 'querystring' => "SELECT client_id,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM client WHERE {AUTHSQL} ORDER BY contact_name",
'keyfield'=> 'client_id',
'valuefield'=> 'name'
),
diff --git a/interface/web/admin/form/software_package.tform.php b/interface/web/admin/form/software_package.tform.php
new file mode 100644
index 0000000000000000000000000000000000000000..96ce5aadaf3e2742bff64715058626809c5fe119
--- /dev/null
+++ b/interface/web/admin/form/software_package.tform.php
@@ -0,0 +1,116 @@
+ 0 id must match with id of current user
+$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
+$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
+$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
+$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
+
+$form["tabs"]['software_package'] = array (
+ 'title' => "Software Package",
+ 'width' => 80,
+ 'template' => "templates/software_package_edit.htm",
+ 'fields' => array (
+ ##################################
+ # Beginn Datenbankfelder
+ ##################################
+ 'package_title' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'validators' => '',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '40',
+ 'maxlength' => '40',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ 'package_key' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'validators' => '',
+ 'default' => '',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '40',
+ 'maxlength' => '40',
+ 'rows' => '',
+ 'cols' => ''
+ ),
+ ##################################
+ # ENDE Datenbankfelder
+ ##################################
+ )
+);
+?>
\ No newline at end of file
diff --git a/interface/web/admin/form/software_repo.tform.php b/interface/web/admin/form/software_repo.tform.php
index 5d0fd1109df7227c8747ca2554f0912c60a17d3d..0396e6f5dceb1db9ced206f30bac1b6bf98490c5 100644
--- a/interface/web/admin/form/software_repo.tform.php
+++ b/interface/web/admin/form/software_repo.tform.php
@@ -60,7 +60,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
$form["title"] = "Software Repository";
-$form["description"] = "Software Repositoy which may contain addons or updates";
+$form["description"] = "Software Repository which may contain addons or updates";
$form["name"] = "software_repo";
$form["action"] = "software_repo_edit.php";
$form["db_table"] = "software_repo";
diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index d44b6ad736f8c4fd17523cc9e5e1fda8c1fa5e87..da67f6b0b3061b8b531eb18e3ed4e5862418150f 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -214,7 +214,8 @@ $form["tabs"]['mail'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '/^[0-9a-zA-Z\:\/\-\.]{0,255}(\?.+)?$/',
+ /*'regex' => '/^[0-9a-zA-Z\:\/\-\.]{0,255}(\?.+)?$/',*/
+ 'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
'errmsg'=> 'webmail_url_error_regex'),
),
'default' => '',
diff --git a/interface/web/admin/lib/lang/de.lng b/interface/web/admin/lib/lang/de.lng
index cca00fefd052a1d5470c7bde788c3afa90967ce6..0a7af751310476b12278bfaa7efabdd5ef5edb6e 100644
--- a/interface/web/admin/lib/lang/de.lng
+++ b/interface/web/admin/lib/lang/de.lng
@@ -35,7 +35,7 @@ $wb['Interface Config'] = 'Einstellungen';
$wb['Domains'] = 'Domains';
$wb['Misc'] = 'Diverses';
$wb['Software'] = 'Apps & Add-Ons';
-$wb['Repositories'] = 'Bibliotheken';
+$wb['Repositories'] = 'Repositories';
$wb['Packages'] = 'Pakete';
$wb['Updates'] = 'Updates';
$wb['Language Editor'] = 'Sprachen Editor';
diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng
index 361196973302587974cf76193a48f8ed7695e982..b6f105163d0a6187d83bfd0c2463444d467ffdb5 100644
--- a/interface/web/admin/lib/lang/de_server_config.lng
+++ b/interface/web/admin/lib/lang/de_server_config.lng
@@ -171,10 +171,21 @@ $wb['web_folder_protection_txt'] = 'Webverzeichnis unveränderlich machen (erwei
$wb['overtraffic_notify_admin_txt'] = 'Ãœberschreiten des Transfer Limits an den Administrator senden';
$wb['overtraffic_notify_client_txt'] = 'Ãœberschreiten des Transfer Limits an den Kunden senden';
$wb['rbl_error_regex'] = 'Bitte geben Sie gültige RBL-Hostnamen an.';
-$wb['php_ini_check_minutes_txt'] = 'Prüfe System php.ini Dateien auf Änderungen alle';
-$wb['php_ini_check_minutes_info_txt'] = 'Minute(n) (0 deaktiviert diese Funktion)';
-$wb['php_ini_check_minutes_error_empty'] = 'Der Wert für die Einstellung der php.ini Prüfung ist ungültig.';
-$wb["rbl_error_regex"] = 'Bitte geben Sie gültige RBL-Hostnamen an.';
-$wb["sendmail_path_txt"] = 'Pfad zu Sendmail';
-$wb["sendmail_path_error_empty"] = 'Sendmail Pfad ist leer.';
+$wb['overquota_notify_admin_txt'] = 'Quota-Warnungen an den Administrator senden';
+$wb['overquota_notify_client_txt'] = 'Quota-Warnungen an den Kunden senden';
+$wb['overquota_notify_onok_txt'] = 'Meldung an den Kunden senden, wenn Belegung wieder ok';
+$wb['overquota_notify_freq_txt'] = 'Quota-Warnung alle X Tage versenden';
+$wb['overquota_notify_freq_note_txt'] = '0 = Meldung nur einmalig versenden, keine Wiederholung';
+$wb['admin_notify_events_txt'] = 'Sende E-Mail an Administrator ab folgendem Level';
+$wb['no_notifications_txt'] = 'Keine Benachrichtigungen';
+$wb['monit_url_txt'] = 'Monit-URL';
+$wb['monit_user_txt'] = 'Monit-Benutzer';
+$wb['monit_password_txt'] = 'Monit-Passwort';
+$wb['monit_url_error_regex'] = 'Ungültige Monit-URL';
+$wb['monit_url_note_txt'] = 'Platzhalter:';
+$wb['munin_url_txt'] = 'Munin-URL';
+$wb['munin_user_txt'] = 'Munin-Benutzer';
+$wb['munin_password_txt'] = 'Munin-Passwort';
+$wb['munin_url_error_regex'] = 'Ungültige Munin-URL';
+$wb['munin_url_note_txt'] = 'Platzhalter:';
?>
diff --git a/interface/web/admin/lib/lang/de_software_package.lng b/interface/web/admin/lib/lang/de_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..4c3431b7643f0c09db684fb4a97025f7f7cb8a0f
--- /dev/null
+++ b/interface/web/admin/lib/lang/de_software_package.lng
@@ -0,0 +1,6 @@
+
diff --git a/interface/web/admin/lib/lang/de_software_package_install.lng b/interface/web/admin/lib/lang/de_software_package_install.lng
index cd4b20d0696a926512ab865a20e9333fd024e8fd..1ef69d13d32b0fd9cebc50cefc2e3b7b61623513 100644
--- a/interface/web/admin/lib/lang/de_software_package_install.lng
+++ b/interface/web/admin/lib/lang/de_software_package_install.lng
@@ -1,6 +1,6 @@
diff --git a/interface/web/admin/lib/lang/de_software_package_list.lng b/interface/web/admin/lib/lang/de_software_package_list.lng
index 0d74780fa9af11804c61ead6baa7b9ae804916c2..75b7504390489492a4d84de033807463aaef0540 100644
--- a/interface/web/admin/lib/lang/de_software_package_list.lng
+++ b/interface/web/admin/lib/lang/de_software_package_list.lng
@@ -7,5 +7,7 @@ $wb['action_txt'] = 'Aktion';
$wb['toolsarea_head_txt'] = 'Pakete';
$wb['repoupdate_txt'] = 'Softwarepakete Liste updaten';
$wb['package_id_txt'] = 'Lokale App ID';
-$wb['no_packages_txt'] = 'No packages available';
+$wb['no_packages_txt'] = 'Keine Pakete verfügbar';
+$wb['edit_txt'] = 'Bearbeiten';
+$wb['delete_txt'] = 'Löschen';
?>
diff --git a/interface/web/admin/lib/lang/de_software_repo.lng b/interface/web/admin/lib/lang/de_software_repo.lng
index bbacc85d419638c7a2df4ad25906d055226c3bb3..2a8cf150b06d38190ea6a90f811444610c453c8d 100644
--- a/interface/web/admin/lib/lang/de_software_repo.lng
+++ b/interface/web/admin/lib/lang/de_software_repo.lng
@@ -1,7 +1,8 @@
diff --git a/interface/web/admin/lib/lang/de_software_repo_list.lng b/interface/web/admin/lib/lang/de_software_repo_list.lng
index 4a9c2c42da1108ae7f5b0233ed6760918a432bdc..db6f49fd4edd70c55ebc84f05dc84fc704e861ce 100644
--- a/interface/web/admin/lib/lang/de_software_repo_list.lng
+++ b/interface/web/admin/lib/lang/de_software_repo_list.lng
@@ -1,6 +1,6 @@
diff --git a/interface/web/admin/lib/lang/de_software_update_list.lng b/interface/web/admin/lib/lang/de_software_update_list.lng
index 29ba194a533e6a5e1e5c694f0c15a5e183ca0b3b..cf31e88154c60bfcdc82fb9b9f778dbbf737eb9b 100644
--- a/interface/web/admin/lib/lang/de_software_update_list.lng
+++ b/interface/web/admin/lib/lang/de_software_update_list.lng
@@ -5,5 +5,5 @@ $wb['installed_txt'] = 'Aktion';
$wb['update_title_txt'] = 'Update';
$wb['version_txt'] = 'Version';
$wb['action_txt'] = 'Aktion';
-$wb['no_updates_txt'] = 'No updates available';
+$wb['no_updates_txt'] = 'Keine Updates verfügbar';
?>
diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng
index ca37e07f67c71ebc1f29ca72e1d2051602065ec4..163fa3479be01da0323ab7c8480d9941f27639e2 100644
--- a/interface/web/admin/lib/lang/de_system_config.lng
+++ b/interface/web/admin/lib/lang/de_system_config.lng
@@ -50,4 +50,6 @@ $wb['mailbox_show_autoresponder_tab_txt'] = 'Zeige Autoresponder Reiter in E-Mai
$wb['mailbox_show_mail_filter_tab_txt'] = 'Zeige E-Mail Filter Reiter in E-Mail Kontodetails';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Zeige Benutzerregel Reiter in E-Mail Kontodetails';$wb['webmail_url_error_regex'] = 'Falsche Webmail URL';
$wb['reseller_can_use_options_txt'] = 'Reseller können den Optionen Reiter bei Webseiten verwenden';
+$wb['phpmyadmin_url_note_txt'] = 'Platzhalter:';
+$wb['webmail_url_note_txt'] = 'Platzhalter:';
?>
diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng
index b9f270e14eea17fbc0ebbbb5fa0fe7ffa7d1db0d..c4abee856ee8d6845fd599fef4849baf089276ff 100644
--- a/interface/web/admin/lib/lang/en_server_config.lng
+++ b/interface/web/admin/lib/lang/en_server_config.lng
@@ -172,13 +172,22 @@ $wb["enable_ip_wildcard_txt"] = 'Enable IP wildcard (*)';
$wb["web_folder_protection_txt"] = 'Make web folders immutable (extended attributes)';
$wb["overtraffic_notify_admin_txt"] = 'Send overtraffic notification to admin';
$wb["overtraffic_notify_client_txt"] = 'Send overtraffic notification to client';
-$wb["v6_prefix_txt"] = 'IPv6 Prefix';
-$wb["vhost_rewrite_v6_txt"] = 'Rewrite IPv6 on Mirror';
-$wb["v6_prefix_wrong"] = 'Invalid v6 Netmask format.';
-$wb["php_ini_check_minutes_txt"] = 'Check system php.ini files for changes each';
-$wb["php_ini_check_minutes_info_txt"] = 'minutes (0 disables checking)';
-$wb['php_ini_check_minutes_error_empty'] = 'Invalid value for php.ini checking.';
$wb["rbl_error_regex"] = 'Please specify valid RBL hostnames.';
-$wb["sendmail_path_txt"] = 'Sendmail Path';
-$wb["sendmail_path_error_empty"] = 'Sendmail Path is empty.';
-?>
+$wb["overquota_notify_admin_txt"] = 'Send quota warnings to admin';
+$wb["overquota_notify_client_txt"] = 'Send quota warnings to client';
+$wb["overquota_notify_onok_txt"] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
+?>
diff --git a/interface/web/admin/lib/lang/en_software_package.lng b/interface/web/admin/lib/lang/en_software_package.lng
new file mode 100644
index 0000000000000000000000000000000000000000..62ef734079c5dd66dfb5b02390e23398a09233a8
--- /dev/null
+++ b/interface/web/admin/lib/lang/en_software_package.lng
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/en_software_package_list.lng b/interface/web/admin/lib/lang/en_software_package_list.lng
index 8ba66d7fdc3ad5c6d549b0cd5365dd02e81d9749..2909d8376e51f4a801bf99fb0e0a3f191558d2a4 100644
--- a/interface/web/admin/lib/lang/en_software_package_list.lng
+++ b/interface/web/admin/lib/lang/en_software_package_list.lng
@@ -8,4 +8,6 @@ $wb['toolsarea_head_txt'] = 'Packages';
$wb['repoupdate_txt'] = 'Update package list';
$wb['package_id_txt'] = 'local App-ID';
$wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
?>
diff --git a/interface/web/admin/lib/lang/en_software_repo.lng b/interface/web/admin/lib/lang/en_software_repo.lng
index 7968b000fddc0b703bdeb64d4faf940401899a33..1b50bb7975fe489f31f30a4c6d78660ceae0515a 100644
--- a/interface/web/admin/lib/lang/en_software_repo.lng
+++ b/interface/web/admin/lib/lang/en_software_repo.lng
@@ -4,4 +4,5 @@ $wb["repo_url_txt"] = 'URL';
$wb["repo_username_txt"] = 'User (optional)';
$wb["repo_password_txt"] = 'Password (optional)';
$wb["active_txt"] = 'Active';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng
index a6bf4cb90275f616b69a7976d6ac3abcc1857701..2edd54307ee002d12c372314ca21ccd5cd335b14 100644
--- a/interface/web/admin/lib/lang/en_system_config.lng
+++ b/interface/web/admin/lib/lang/en_system_config.lng
@@ -53,5 +53,6 @@ $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail acco
$wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
$wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
-$wb['reseller_can_use_options_txt'] = 'Reseller can use options tab in web sites config';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
?>
diff --git a/interface/web/admin/server_ip_list.php b/interface/web/admin/server_ip_list.php
index 6c9826938663bc97f2d6234a52cbe77f21e7663f..939d41f34b269bfe3bf49cc457d6cd3f17dec2cc 100644
--- a/interface/web/admin/server_ip_list.php
+++ b/interface/web/admin/server_ip_list.php
@@ -46,7 +46,7 @@ $app->auth->check_module_permissions('admin');
$app->uses('listform_actions');
-$app->listform_actions->SQLOrderBy = "ORDER BY server_id, ip_address";
+$app->listform_actions->SQLOrderBy = "ORDER BY server_ip.server_id, server_ip.ip_address";
$app->listform_actions->onLoad();
diff --git a/interface/web/admin/server_php_list.php b/interface/web/admin/server_php_list.php
index 86a7050801afa5e073b1c9fd71362a8dac371be9..bcd323bbecc746b8c10e5f858ef39e16dba8b36a 100644
--- a/interface/web/admin/server_php_list.php
+++ b/interface/web/admin/server_php_list.php
@@ -46,7 +46,7 @@ $app->auth->check_module_permissions('admin');
$app->uses('listform_actions');
-$app->listform_actions->SQLOrderBy = "ORDER BY server_id, name";
+$app->listform_actions->SQLOrderBy = "ORDER BY server_php.server_id, server_php.name";
$app->listform_actions->onLoad();
diff --git a/interface/web/admin/software_package_edit.php b/interface/web/admin/software_package_edit.php
new file mode 100644
index 0000000000000000000000000000000000000000..27a40f26d025d9700d850999a410e5f3c051c5f6
--- /dev/null
+++ b/interface/web/admin/software_package_edit.php
@@ -0,0 +1,59 @@
+auth->check_module_permissions('admin');
+if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
+
+// Loading classes
+$app->uses('tpl,tform,tform_actions');
+$app->load('tform_actions');
+
+class page_action extends tform_actions {
+
+}
+
+$page = new page_action;
+$page->onLoad();
+
+?>
\ No newline at end of file
diff --git a/interface/web/admin/software_package_list.php b/interface/web/admin/software_package_list.php
index 0b7fd54aafe7c4c6252b35ec9841c8e0619eef27..af6887b666cf897abdc88029d00233f4ba2aa4bc 100644
--- a/interface/web/admin/software_package_list.php
+++ b/interface/web/admin/software_package_list.php
@@ -181,7 +181,8 @@ if(is_array($packages) && count($packages) > 0) {
$app->tpl->setLoop('records',$packages);
-include_once('lib/lang/en_software_package_list.lng');
+$language = (isset($_SESSION['s']['language']))?$_SESSION['s']['language']:$conf['language'];
+include_once('lib/lang/'.$language.'_software_package_list.lng');
$app->tpl->setVar($wb);
diff --git a/interface/web/admin/software_update_list.php b/interface/web/admin/software_update_list.php
index 0f0924198d8b901c193f0e6ef666491f8522a425..682a644bc526d178a48dbb6705ebe1f134b09d32 100644
--- a/interface/web/admin/software_update_list.php
+++ b/interface/web/admin/software_update_list.php
@@ -211,7 +211,8 @@ if(is_array($updates)) {
$app->tpl->setLoop('records',$records_out);
-include_once('lib/lang/en_software_update_list.lng');
+$language = (isset($_SESSION['s']['language']))?$_SESSION['s']['language']:$conf['language'];
+include_once('lib/lang/'.$language.'_software_update_list.lng');
$app->tpl->setVar($wb);
diff --git a/interface/web/admin/templates/remote_user_list.htm b/interface/web/admin/templates/remote_user_list.htm
index 4bc5db3b34a8680668ef2e3a38ff0a6edd73b701..88ddf6a67752cbc2079a17e5925779fe37d0ce6f 100644
--- a/interface/web/admin/templates/remote_user_list.htm
+++ b/interface/web/admin/templates/remote_user_list.htm
@@ -17,12 +17,12 @@
-
+
{tmpl_var name='search_limit'}
-
+
{tmpl_var name="filter_txt"}
@@ -32,7 +32,7 @@
- {tmpl_var name="remote_userid"}
+ {tmpl_var name="remote_userid"}
{tmpl_var name="remote_username"}
{tmpl_var name='delete_txt'}
diff --git a/interface/web/admin/templates/server_config_mail_edit.htm b/interface/web/admin/templates/server_config_mail_edit.htm
index 03749317ca23e05c743b0e207f8dab697c22d924..6ab03eb9bd630caf06ab6a41a5c8d788cd314afa 100644
--- a/interface/web/admin/templates/server_config_mail_edit.htm
+++ b/interface/web/admin/templates/server_config_mail_edit.htm
@@ -84,10 +84,28 @@
{tmpl_var name='realtime_blackhole_list_txt'}
{tmpl_var name='realtime_blackhole_list_note_txt'}
+
+
+
{tmpl_var name='overquota_notify_admin_txt'}
+
+ {tmpl_var name='overquota_notify_admin'}
+
-
{tmpl_var name='sendmail_path_txt'}
-
+
{tmpl_var name='overquota_notify_client_txt'}
+
+ {tmpl_var name='overquota_notify_client'}
+
+
+
+ {tmpl_var name='overquota_notify_freq_txt'}
+ {tmpl_var name='overquota_notify_freq_note_txt'}
+
+
+
{tmpl_var name='overquota_notify_onok_txt'}
+
+ {tmpl_var name='overquota_notify_onok'}
+
diff --git a/interface/web/admin/templates/server_config_server_edit.htm b/interface/web/admin/templates/server_config_server_edit.htm
index aed24471ee47b6aa3c553a1b9438ffe58f58082d..6dab52f3ab8feb2719d34e809f60aff8239dff8e 100644
--- a/interface/web/admin/templates/server_config_server_edit.htm
+++ b/interface/web/admin/templates/server_config_server_edit.htm
@@ -47,6 +47,12 @@
{tmpl_var name='loglevel'}
+
+
+ {tmpl_var name='admin_notify_events_txt'}
+
+ {tmpl_var name='admin_notify_events'}
+
{tmpl_var name='backup_dir_txt'}
@@ -57,6 +63,30 @@
{tmpl_var name='backup_mode'}
+
+
+
{tmpl_var name='monit_url_txt'}
+
{tmpl_var name='monit_url_note_txt'}
[SERVERNAME]
+
+
+ {tmpl_var name='monit_user_txt'}
+
+
+
+ {tmpl_var name='monit_password_txt'}
+
+
+
+
{tmpl_var name='munin_url_txt'}
+
{tmpl_var name='munin_url_note_txt'}
[SERVERNAME]
+
+
+ {tmpl_var name='munin_user_txt'}
+
+
+
+ {tmpl_var name='munin_password_txt'}
+
diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm
index 602d9f5098208ceca2a89e89d5dee00d6c37fcfe..6656634b16265ac5f148fe22a5a03bc4514f748c 100644
--- a/interface/web/admin/templates/server_config_web_edit.htm
+++ b/interface/web/admin/templates/server_config_web_edit.htm
@@ -114,6 +114,28 @@
{tmpl_var name='overtraffic_notify_client'}
+
+
+
{tmpl_var name='overquota_notify_admin_txt'}
+
+ {tmpl_var name='overquota_notify_admin'}
+
+
+
+
{tmpl_var name='overquota_notify_client_txt'}
+
+ {tmpl_var name='overquota_notify_client'}
+
+
+
+ {tmpl_var name='overquota_notify_freq_txt'}
+ {tmpl_var name='overquota_notify_freq_note_txt'}
+
+
+
{tmpl_var name='overquota_notify_onok_txt'}
+
+ {tmpl_var name='overquota_notify_onok'}
+
{tmpl_var name='ssl_settings_txt'}
diff --git a/interface/web/admin/templates/software_package_edit.htm b/interface/web/admin/templates/software_package_edit.htm
new file mode 100644
index 0000000000000000000000000000000000000000..c2a0254607b99b945b2bdc45135236fbef77ac9a
--- /dev/null
+++ b/interface/web/admin/templates/software_package_edit.htm
@@ -0,0 +1,27 @@
+
+
+
+
\ No newline at end of file
diff --git a/interface/web/admin/templates/software_package_list.htm b/interface/web/admin/templates/software_package_list.htm
index 576ffbc642987ba858955029572dcb240796e47d..c15b79bc2dea61ae5c5a7c6d5700cfa539306e52 100644
--- a/interface/web/admin/templates/software_package_list.htm
+++ b/interface/web/admin/templates/software_package_list.htm
@@ -21,7 +21,7 @@
-
+
{tmpl_var name='search_limit'}
@@ -32,8 +32,9 @@
{tmpl_var name="installed"}
{tmpl_var name="package_title"}
{tmpl_var name="package_description"}
- ispapp{tmpl_var name="package_id"}
-
+ ispapp{tmpl_var name="package_id"}
+
+ {tmpl_var name='edit_txt'}
{tmpl_var name='delete_txt'}
diff --git a/interface/web/admin/templates/system_config_mail_edit.htm b/interface/web/admin/templates/system_config_mail_edit.htm
index f69ed8530f46b4d82a3d7b447cd7f77a9be8c36b..e9c0c0e5b08b54cd5d7d1b77b4c25792f5674b9c 100644
--- a/interface/web/admin/templates/system_config_mail_edit.htm
+++ b/interface/web/admin/templates/system_config_mail_edit.htm
@@ -37,7 +37,7 @@
{tmpl_var name='mailmailinglist_link_txt'}
diff --git a/interface/web/admin/templates/system_config_sites_edit.htm b/interface/web/admin/templates/system_config_sites_edit.htm
index e60e3facbe500514a0e53ef33dee10e1d7fe0790..65f37b7820d9f731c56921f3a18b9b78a1774c98 100644
--- a/interface/web/admin/templates/system_config_sites_edit.htm
+++ b/interface/web/admin/templates/system_config_sites_edit.htm
@@ -33,7 +33,7 @@
{tmpl_var name='webftp_url_txt'}
diff --git a/interface/web/admin/users_list.php b/interface/web/admin/users_list.php
index ae0bca51312ae0c6db526576346c3628765697b5..412d4fa562e0ec4b9776ee8541417498bf002c07 100644
--- a/interface/web/admin/users_list.php
+++ b/interface/web/admin/users_list.php
@@ -45,7 +45,7 @@ $list_def_file = "list/users.list.php";
$app->auth->check_module_permissions('admin');
$app->uses('listform_actions');
-$app->listform_actions->SQLOrderBy = 'ORDER BY username';
+$app->listform_actions->SQLOrderBy = 'ORDER BY sys_user.username';
$app->listform_actions->onLoad();
diff --git a/interface/web/client/client_circle_list.php b/interface/web/client/client_circle_list.php
index 935fbee3e9cd90a7c9431fe5e1b89eac30836d1d..f37da38712f98d96cfb963a61fa0de7956ed08f0 100644
--- a/interface/web/client/client_circle_list.php
+++ b/interface/web/client/client_circle_list.php
@@ -17,7 +17,7 @@ $app->auth->check_module_permissions('client');
$app->uses('listform_actions');
-$app->listform_actions->SQLOrderBy = 'ORDER BY circle_name, circle_id';
+$app->listform_actions->SQLOrderBy = 'ORDER BY client_circle.circle_name, client_circle.circle_id';
$app->listform_actions->onLoad();
diff --git a/interface/web/client/client_del.php b/interface/web/client/client_del.php
index 14f211e00139c1f1d906984fad300cc897f37b52..ecee8f5b6cb7b2f8deb2336f31b2647eb8464bf0 100644
--- a/interface/web/client/client_del.php
+++ b/interface/web/client/client_del.php
@@ -97,6 +97,7 @@ class page_action extends tform_actions {
}
$app->tpl->setVar('id',$this->id);
+ $app->tpl->setVar('number_records',$number);
$app->tpl->setLoop('records', $table_list);
//* load language file
diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index 6f7cf533d8199a5c0466fbf9c9c779bdf6d7de73..2b72d8195374a1565bc2b0ee0625a2e1bf24544f 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -177,7 +177,7 @@ class page_action extends tform_actions {
$tmp = $app->db->queryOneRecord('SELECT server_id FROM server WHERE db_server = 1 AND mirror_server_id = 0 LIMIT 0,1');
$default_dbserver = $app->functions->intval($tmp['server_id']);
- $sql = "UPDATE client SET default_mailserver = $default_mailserver, default_webserver = $default_webserver, default_dnsserver = $default_dnsserver, default_dbserver = $default_dbserver WHERE client_id = ".$this->id;
+ $sql = "UPDATE client SET default_mailserver = $default_mailserver, default_webserver = $default_webserver, default_dnsserver = $default_dnsserver, default_slave_dnsserver = $default_dnsserver, default_dbserver = $default_dbserver WHERE client_id = ".$this->id;
$app->db->query($sql);
diff --git a/interface/web/client/client_list.php b/interface/web/client/client_list.php
index 3eff65bfd9efdc6a96f10eece307aef2a981b2d6..35258b8582fdf977dfd242837620bce010a9e773 100644
--- a/interface/web/client/client_list.php
+++ b/interface/web/client/client_list.php
@@ -17,8 +17,8 @@ $app->auth->check_module_permissions('client');
$app->uses('listform_actions');
-$app->listform_actions->SQLOrderBy = 'ORDER BY company_name, contact_name, client_id';
-$app->listform_actions->SQLExtWhere = "limit_client = 0";
+$app->listform_actions->SQLOrderBy = 'ORDER BY client.company_name, client.contact_name, client.client_id';
+$app->listform_actions->SQLExtWhere = "client.limit_client = 0";
$app->listform_actions->SQLExtSelect = ', client.country as countryiso';
$app->listform_actions->onLoad();
diff --git a/interface/web/client/client_template_edit.php b/interface/web/client/client_template_edit.php
index 8dcb5a8b40f9b947d0015237c4870970256956ab..a683800ae47d3ffbf17fcfee3e10bea270870529 100644
--- a/interface/web/client/client_template_edit.php
+++ b/interface/web/client/client_template_edit.php
@@ -1,97 +1,97 @@
-auth->check_module_permissions('client');
-if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are only for Admins.');
-
-// Loading classes
-$app->uses('tpl,tform,tform_actions');
-$app->load('tform_actions');
-
-class page_action extends tform_actions {
-
- function onBeforeUpdate() {
- global $app;
-
- if(isset($this->dataRecord['template_type'])) {
- //* Check if the template_type has been changed
- $rec = $app->db->queryOneRecord("SELECT template_type from client_template WHERE template_id = ".$this->id);
- if($rec['template_type'] != $this->dataRecord['template_type']) {
- //* Add a error message and switch back to old server
- $app->tform->errorMessage .= $app->lng('The template type can not be changed.');
- $this->dataRecord['template_type'] = $rec['template_type'];
- }
- unset($rec);
- }
- }
-
-
- /*
- This function is called automatically right after
- the data was successful updated in the database.
- */
- function onAfterUpdate() {
- global $app;
-
- $app->uses('client_templates');
- /*
- * the template has changed. apply the new data to all clients
- */
- if ($this->dataRecord["template_type"] == 'm'){
- $sql = "SELECT client_id FROM client WHERE template_master = " . $this->id;
- } else {
- $sql = "SELECT client_id FROM client WHERE template_additional LIKE '%/" . $this->id . "/%'";
- }
- $clients = $app->db->queryAllRecords($sql);
- if (is_array($clients)){
- foreach ($clients as $client){
- $app->client_templates->apply_client_templates($client['client_id']);
- }
- }
- }
-}
-
-$page = new page_action;
-$page->onLoad();
-?>
+auth->check_module_permissions('client');
+if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are only for Admins.');
+
+// Loading classes
+$app->uses('tpl,tform,tform_actions');
+$app->load('tform_actions');
+
+class page_action extends tform_actions {
+
+ function onBeforeUpdate() {
+ global $app;
+
+ if(isset($this->dataRecord['template_type'])) {
+ //* Check if the template_type has been changed
+ $rec = $app->db->queryOneRecord("SELECT template_type from client_template WHERE template_id = ".$this->id);
+ if($rec['template_type'] != $this->dataRecord['template_type']) {
+ //* Add a error message and switch back to old server
+ $app->tform->errorMessage .= $app->lng('The template type can not be changed.');
+ $this->dataRecord['template_type'] = $rec['template_type'];
+ }
+ unset($rec);
+ }
+ }
+
+
+ /*
+ This function is called automatically right after
+ the data was successful updated in the database.
+ */
+ function onAfterUpdate() {
+ global $app;
+
+ $app->uses('client_templates');
+ /*
+ * the template has changed. apply the new data to all clients
+ */
+ if ($this->dataRecord["template_type"] == 'm'){
+ $sql = "SELECT client_id FROM client WHERE template_master = " . $this->id;
+ } else {
+ $sql = "SELECT client_id FROM client WHERE template_additional LIKE '%/" . $this->id . "/%' OR template_additional LIKE '" . $this->id . "/%' OR template_additional LIKE '%/" . $this->id . "'";
+ }
+ $clients = $app->db->queryAllRecords($sql);
+ if (is_array($clients)){
+ foreach ($clients as $client){
+ $app->client_templates->apply_client_templates($client['client_id']);
+ }
+ }
+ }
+}
+
+$page = new page_action;
+$page->onLoad();
+?>
diff --git a/interface/web/client/client_template_list.php b/interface/web/client/client_template_list.php
index f0d1752850d4970d521bb58635dfc1a7b1634d4f..bdfe1d11ef1745bcfc6dc6e5fdabd547ceefeac1 100644
--- a/interface/web/client/client_template_list.php
+++ b/interface/web/client/client_template_list.php
@@ -44,6 +44,6 @@ $app->auth->check_module_permissions('client');
if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are only for Admins.');
$app->uses('listform_actions');
-$app->listform_actions->SQLOrderBy = 'ORDER BY template_name';
+$app->listform_actions->SQLOrderBy = 'ORDER BY client_template.template_name';
$app->listform_actions->onLoad();
?>
diff --git a/interface/web/client/domain_list.php b/interface/web/client/domain_list.php
index 14308ed82e1387f667b1252f1883be705249c2ec..e4ef725b06ee35588f7649be708f3f9870608547 100644
--- a/interface/web/client/domain_list.php
+++ b/interface/web/client/domain_list.php
@@ -46,7 +46,7 @@ $app->auth->check_module_permissions('client');
$app->uses('listform_actions');
-$app->listform_actions->SQLOrderBy = 'ORDER BY domain';
+$app->listform_actions->SQLOrderBy = 'ORDER BY domain.domain';
$app->listform_actions->onLoad();
?>
\ No newline at end of file
diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php
index 7d7bf4531451d5b3d23ef06cf0c110c83e99ce81..b29a8316122b8b743f504c99f4cc7dc1bbb6c7f6 100644
--- a/interface/web/client/form/client.tform.php
+++ b/interface/web/client/form/client.tform.php
@@ -899,20 +899,31 @@ $form["tabs"]['limits'] = array (
'rows' => '',
'cols' => ''
),
- 'limit_dns_slave_zone' => array (
- 'datatype' => 'INTEGER',
- 'formtype' => 'TEXT',
- 'validators' => array ( 0 => array ( 'type' => 'ISINT',
+ 'default_slave_dnsserver' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'datasource' => array ( 'type' => 'CUSTOM',
+ 'class'=> 'custom_datasource',
+ 'function'=> 'client_servers'
+ ),
+ 'value' => '',
+ 'name' => 'default_slave_dnsserver'
+ ),
+ 'limit_dns_slave_zone' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_dns_slave_zone_error_notint'),
),
- 'default' => '-1',
- 'value' => '',
- 'separator' => '',
- 'width' => '10',
- 'maxlength' => '10',
- 'rows' => '',
- 'cols' => ''
- ),
+ 'default' => '-1',
+ 'value' => '',
+ 'separator' => '',
+ 'width' => '10',
+ 'maxlength' => '10',
+ 'rows' => '',
+ 'cols' => ''
+ ),
'limit_dns_record' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php
index df240e5c55cf70ce8097bdd78bcdce57554c13e2..a6c4bd95c3010a390aa35ff434d73e539a8503b0 100644
--- a/interface/web/client/form/reseller.tform.php
+++ b/interface/web/client/form/reseller.tform.php
@@ -894,6 +894,17 @@ $form["tabs"]['limits'] = array (
'rows' => '',
'cols' => ''
),
+ 'default_slave_dnsserver' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'default' => '1',
+ 'datasource' => array ( 'type' => 'SQL',
+ 'querystring' => 'SELECT server_id,server_name FROM server WHERE dns_server = 1 AND {AUTHSQL} ORDER BY server_name',
+ 'keyfield'=> 'server_id',
+ 'valuefield'=> 'server_name'
+ ),
+ 'value' => ''
+ ),
'limit_dns_slave_zone' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
diff --git a/interface/web/client/lib/lang/de_client.lng b/interface/web/client/lib/lang/de_client.lng
index 46afed5f874be5ce934f7e5173f434c6b8ef55d8..57310d8e4bbf08a35ffc77967d2bc20a217b032e 100644
--- a/interface/web/client/lib/lang/de_client.lng
+++ b/interface/web/client/lib/lang/de_client.lng
@@ -103,10 +103,10 @@ $wb['limit_mailaliasdomain_error_notint'] = 'Das E-Mail Domain Alias Limit muss
$wb['limit_web_quota_txt'] = 'Webbeschränkung';
$wb['limit_traffic_quota_txt'] = 'Trafficbeschränkung';
$wb['limit_trafficquota_error_notint'] = 'Trafficbeschränkung muss eine Zahl sein.';
-$wb['limit_dns_slave_zone_txt'] = 'Max. Anzahl an Zweiter DNS Zonen';
+$wb['limit_dns_slave_zone_txt'] = 'Max. Anzahl an Secondary DNS Zonen';
$wb['limit_webdav_user_txt'] = 'Max. Anzahl an WebDAV Benutzern';
$wb['limit_webdav_user_error_notint'] = 'Das WebDAV Benutzer Limit muss eine Zahl sein.';
-$wb['limit_dns_slave_zone_error_notint'] = 'Das Zweiter DNS Zonen Limit muss eine Zahl sein.';
+$wb['limit_dns_slave_zone_error_notint'] = 'Das Secondary DNS Zonen Limit muss eine Zahl sein.';
$wb['customer_no_txt'] = 'Kundennummer';
$wb['vat_id_txt'] = 'USt-ID';
$wb['required_fields_txt'] = '* Benötigte Felder';
@@ -143,4 +143,5 @@ $wb['err_msg_master_tpl_set'] = 'Die hier eingestellten Werte werden ignoriert,
$wb['aps_limits_txt'] = 'APS Installationsassistent Limits';
$wb['limit_aps_txt'] = 'Max. Anzahl an APS-Instanzen';
$wb['limit_aps_error_notint'] = 'Das APS Instanzen Limit muss eine Zahl sein.';
+$wb['default_slave_dnsserver_txt'] = 'Standard Secondary DNS Server';
?>
diff --git a/interface/web/client/lib/lang/de_client_del.lng b/interface/web/client/lib/lang/de_client_del.lng
index c6982a2f2bcb7cb04b1f73cc2fda6ac046b24a73..d13fcfa8fc99e9c5d1ab8b01b025bed44208deec 100644
--- a/interface/web/client/lib/lang/de_client_del.lng
+++ b/interface/web/client/lib/lang/de_client_del.lng
@@ -3,4 +3,5 @@ $wb['confirm_action_txt'] = 'Aktion bestätigen';
$wb['delete_explanation'] = 'Diese Aktion wird folgende Anzahl an Datensätzen des Kunden löschen';
$wb['btn_save_txt'] = 'Kunden löschen';
$wb['btn_cancel_txt'] = 'Abbrechen, ohne den Kunden zu löschen';
+$wb['confirm_client_delete_txt'] = 'Sind Sie sicher, daß Sie den Kunden löschen möchten?';
?>
diff --git a/interface/web/client/lib/lang/de_client_template_list.lng b/interface/web/client/lib/lang/de_client_template_list.lng
index 98195fed1b50e85617a85be98336f6d440f1fa65..552035fd702e2a09d76ec7fb147245d6b2324616 100644
--- a/interface/web/client/lib/lang/de_client_template_list.lng
+++ b/interface/web/client/lib/lang/de_client_template_list.lng
@@ -2,4 +2,5 @@
$wb['list_head_txt'] = 'Kundenvorlagen';
$wb['template_type_txt'] = 'Typ';
$wb['template_name_txt'] = 'Vorlagenname';
+$wb['template_id_txt'] = 'Template ID';
?>
diff --git a/interface/web/client/lib/lang/de_reseller.lng b/interface/web/client/lib/lang/de_reseller.lng
index 14cd58a0c4d36736a2bed8b91715fc73d076ac94..072d648e529994f48563fa9c572b03627615a006 100644
--- a/interface/web/client/lib/lang/de_reseller.lng
+++ b/interface/web/client/lib/lang/de_reseller.lng
@@ -101,8 +101,8 @@ $wb['limit_client_error_positive'] = 'Die Anzahl an Kunden muss > 0 sein';
$wb['limit_web_quota_txt'] = 'Speicherplatzbeschränkung';
$wb['limit_traffic_quota_txt'] = 'Transfervolumenbeschränkung';
$wb['limit_trafficquota_error_notint'] = 'Transfervolumenbeschränkung muss eine Zahl sein.';
-$wb['limit_dns_slave_zone_txt'] = 'Max. Anzahl an Zweiter DNS Zonen';
-$wb['limit_dns_slave_zone_error_notint'] = 'Das Zweiter DNS Zonen Limit muss eine Zahl sein.';
+$wb['limit_dns_slave_zone_txt'] = 'Max. Anzahl an Secondary DNS Zonen';
+$wb['limit_dns_slave_zone_error_notint'] = 'Das Secondary DNS Zonen Limit muss eine Zahl sein.';
$wb['limit_dns_record_error_notint'] = 'Das DNS Eintrag Limit muss eine Zahl sein.';
$wb['customer_no_txt'] = 'Kundennummer';
$wb['vat_id_txt'] = 'USt-ID';
@@ -142,4 +142,5 @@ $wb['bank_account_swift_txt'] = 'BIC';
$wb['aps_limits_txt'] = 'APS Installationsassistent Limits';
$wb['limit_aps_txt'] = 'Max. Anzahl an APS-Instanzen';
$wb['limit_aps_error_notint'] = 'Das APS Instanzen Limit muss eine Zahl sein.';
+$wb['default_slave_dnsserver_txt'] = 'Standard Secondary DNS Server';
?>
diff --git a/interface/web/client/lib/lang/en_client.lng b/interface/web/client/lib/lang/en_client.lng
index 61a719b790fd1e5dd0faf3380b32215ed732ccdc..69574d8442c4b01884b7d93a551679b5343d4ab6 100644
--- a/interface/web/client/lib/lang/en_client.lng
+++ b/interface/web/client/lib/lang/en_client.lng
@@ -91,7 +91,7 @@ $wb["limit_database_txt"] = 'Max. number of Databases';
$wb["limit_database_error_notint"] = 'The database limit must be a number.';
$wb["limit_cron_error_notint"] = 'The cron limit must be a number.';
$wb["limit_cron_error_frequency"] = 'The cron frequency limit must be a number.';
-$wb["username_error_regex"] = 'The Username contains invalid chracaters.';
+$wb["username_error_regex"] = 'The Username contains invalid characters.';
$wb["template_master_txt"] = 'Master template';
$wb["template_additional_txt"] = 'Addon template';
$wb["active_template_additional_txt"] = 'Active Addons';
@@ -146,4 +146,5 @@ $wb['err_msg_master_tpl_set'] = 'All custom limit settings are ignored if any ma
$wb['aps_limits_txt'] = 'APS Installer Limits';
$wb['limit_aps_txt'] = 'Max. number of APS instances';
$wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb["default_slave_dnsserver_txt"] = 'Default Secondary DNS Server';
?>
diff --git a/interface/web/client/lib/lang/en_client_del.lng b/interface/web/client/lib/lang/en_client_del.lng
index 4d16af6afcad05244a1d2073b5db46ecf9420314..7b1bbf9d70ae60b458df57118687705d1fd3616c 100644
--- a/interface/web/client/lib/lang/en_client_del.lng
+++ b/interface/web/client/lib/lang/en_client_del.lng
@@ -3,4 +3,5 @@ $wb["confirm_action_txt"] = 'Confirm action';
$wb["delete_explanation"] = 'This action will delete the following number of records associated with this client';
$wb["btn_save_txt"] = 'Delete the client';
$wb["btn_cancel_txt"] = 'Cancel without deleting the client';
+$wb["confirm_client_delete_txt"] = 'Are you sure you want to delete this client?';
?>
diff --git a/interface/web/client/lib/lang/en_client_template_list.lng b/interface/web/client/lib/lang/en_client_template_list.lng
index ac5218686174910f4725855b6c6959a3733513fa..ce1f9bd123146ae3420c2280a9fe6dc5eba65d9f 100644
--- a/interface/web/client/lib/lang/en_client_template_list.lng
+++ b/interface/web/client/lib/lang/en_client_template_list.lng
@@ -2,4 +2,5 @@
$wb["list_head_txt"] = 'Client-Templates';
$wb["template_type_txt"] = 'Type';
$wb["template_name_txt"] = 'Template name';
+$wb['template_id_txt'] = 'Template ID';
?>
diff --git a/interface/web/client/lib/lang/en_reseller.lng b/interface/web/client/lib/lang/en_reseller.lng
index 711c414ba841d7134724876561bcb7fe3cfae8fb..d936ddbcc19a1f11960065cd9177e3dd33b33e1d 100644
--- a/interface/web/client/lib/lang/en_reseller.lng
+++ b/interface/web/client/lib/lang/en_reseller.lng
@@ -90,7 +90,7 @@ $wb["limit_database_txt"] = 'Max. number of Databases';
$wb["limit_database_error_notint"] = 'The database limit must be a number.';
$wb["limit_cron_error_notint"] = 'The cron limit must be a number.';
$wb["limit_cron_error_frequency"] = 'The cron frequency limit must be a number.';
-$wb["username_error_regex"] = 'The Username contains invalid chracaters.';
+$wb["username_error_regex"] = 'The Username contains invalid characters.';
$wb["template_master_txt"] = 'Master template';
$wb["template_additional_txt"] = 'Addon template';
$wb["add_additional_template_txt"] = 'Add additional template';
@@ -144,4 +144,5 @@ $wb["bank_account_swift_txt"] = 'BIC / Swift';
$wb['aps_limits_txt'] = 'APS Installer Limits';
$wb['limit_aps_txt'] = 'Max. number of APS instances';
$wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb["default_slave_dnsserver_txt"] = 'Default Secondary DNS Server';
?>
diff --git a/interface/web/client/reseller_edit.php b/interface/web/client/reseller_edit.php
index 83754f3df719647747c306a03d529459c8f6962b..1d02237daf129210870921b21d06cddef9942534 100644
--- a/interface/web/client/reseller_edit.php
+++ b/interface/web/client/reseller_edit.php
@@ -175,7 +175,7 @@ class page_action extends tform_actions {
$tmp = $app->db->queryOneRecord('SELECT server_id FROM server WHERE db_server = 1 LIMIT 0,1');
$default_dbserver = $app->functions->intval($tmp['server_id']);
- $sql = "UPDATE client SET default_mailserver = $default_mailserver, default_webserver = $default_webserver, default_dnsserver = $default_dnsserver, default_dbserver = $default_dbserver WHERE client_id = ".$this->id;
+ $sql = "UPDATE client SET default_mailserver = $default_mailserver, default_webserver = $default_webserver, default_dnsserver = $default_dnsserver, default_slave_dnsserver = $default_dnsserver, default_dbserver = $default_dbserver WHERE client_id = ".$this->id;
$app->db->query($sql);
parent::onAfterInsert();
diff --git a/interface/web/client/reseller_list.php b/interface/web/client/reseller_list.php
index fa819e6edd70dd5568acaf878b375853a961506a..fd8fca0c7a7969dda1d41556dbc0c7a706597dc5 100644
--- a/interface/web/client/reseller_list.php
+++ b/interface/web/client/reseller_list.php
@@ -47,8 +47,8 @@ if($_SESSION["s"]["user"]["typ"] != 'admin') die('Access only for administrators
$app->uses('listform_actions');
-$app->listform_actions->SQLOrderBy = 'ORDER BY company_name, contact_name, client_id';
-$app->listform_actions->SQLExtWhere = "(limit_client > 0 or limit_client = -1)";
+$app->listform_actions->SQLOrderBy = 'ORDER BY client.company_name, client.contact_name, client.client_id';
+$app->listform_actions->SQLExtWhere = "(client.limit_client > 0 or client.limit_client = -1)";
$app->listform_actions->SQLExtSelect = ', client.country as countryiso';
$app->listform_actions->onLoad();
diff --git a/interface/web/client/templates/client_del.htm b/interface/web/client/templates/client_del.htm
index ff254881c5e6ed614fb63793143dd114c8b1d86e..efde39da935b8ba26cd6c1058a76ffac1ce5721b 100644
--- a/interface/web/client/templates/client_del.htm
+++ b/interface/web/client/templates/client_del.htm
@@ -4,14 +4,18 @@
-
+
diff --git a/interface/web/help/templates/support_message_view.htm b/interface/web/help/templates/support_message_view.htm
index c399e90f9571503b0fecac6776700b8ee8225bfb..f7145e0b65a4e34e1e706e0983570868584b668d 100644
--- a/interface/web/help/templates/support_message_view.htm
+++ b/interface/web/help/templates/support_message_view.htm
@@ -12,6 +12,10 @@
{tmpl_var name='message_txt'}
{tmpl_var name='message'}
+
+
+
{tmpl_var name='date_txt'}
+
{tmpl_var name='date'}
diff --git a/interface/web/login/templates/password_reset.htm b/interface/web/login/templates/password_reset.htm
index a4ab3113e5be260c0f7b76e3294e058b862a9503..7055834649fa07f82d87cd2053c66464aa779bb0 100644
--- a/interface/web/login/templates/password_reset.htm
+++ b/interface/web/login/templates/password_reset.htm
@@ -26,7 +26,9 @@
- {tmpl_var name='pw_button_txt'}
+ {tmpl_var name='pw_button_txt'}
+ {tmpl_var name='back_txt'}
+
diff --git a/interface/web/mail/lib/lang/de_spamfilter_policy.lng b/interface/web/mail/lib/lang/de_spamfilter_policy.lng
index 497cb90b9d053d2073a8882b988f55d444b877c0..32acca46860822f960c1d03ce316e047a29a3afc 100644
--- a/interface/web/mail/lib/lang/de_spamfilter_policy.lng
+++ b/interface/web/mail/lib/lang/de_spamfilter_policy.lng
@@ -16,7 +16,7 @@ $wb['other_quarantine_to_txt'] = 'Weiterleiten von anderen E-Mails zur E-Mail Ad
$wb['spam_tag_level_txt'] = 'SPAM Markierungslevel';
$wb['spam_tag2_level_txt'] = 'SPAM Markierungslevel 2';
$wb['spam_kill_level_txt'] = 'SPAM Markierungslevel Kill';
-$wb['spam_dsn_cutoff_level_txt'] = 'SPAM Markierungslevel DNS Cutoff';
+$wb['spam_dsn_cutoff_level_txt'] = 'SPAM Markierungslevel DSN Cutoff';
$wb['spam_quarantine_cutoff_level_txt'] = 'SPAM Markierungslevel Quarantine Cutoff';
$wb['spam_modifies_subj_txt'] = 'SPAM ändert Betreff';
$wb['spam_subject_tag_txt'] = 'SPAM Betreff Markierung';
diff --git a/interface/web/mail/lib/lang/de_spamfilter_users.lng b/interface/web/mail/lib/lang/de_spamfilter_users.lng
index d31d0e1fe6429d28cb4b7a3e00aaf3f2db82fcbb..b7f6cd496bfbd53a234f84b5db73db3a2eb90ae8 100644
--- a/interface/web/mail/lib/lang/de_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/de_spamfilter_users.lng
@@ -5,4 +5,6 @@ $wb['policy_id_txt'] = 'Richtlinie';
$wb['email_txt'] = 'E-Mail (Zeichenkette)';
$wb['fullname_txt'] = 'Name';
$wb['local_txt'] = 'Lokal';
+$wb['email_error_notempty'] = 'Die E-Mail-Adresse darf nicht leer sein.';
+$wb['fullname_error_notempty'] = 'Der Name darf nicht leer sein.';
?>
diff --git a/interface/web/mail/lib/lang/de_user_quota_stats_list.lng b/interface/web/mail/lib/lang/de_user_quota_stats_list.lng
index 9a23a97169c855d6b77fbc356079ab23826d0e98..beb9c18eb9f8ba1de9fb80437875b64b642b88d6 100755
--- a/interface/web/mail/lib/lang/de_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/de_user_quota_stats_list.lng
@@ -4,4 +4,5 @@ $wb['quota_txt'] = 'Verfügbarer Speicherplatz';
$wb['name_txt'] = 'Name';
$wb['email_txt'] = 'E-Mail Adresse';
$wb['used_txt'] = 'Verbrauchter Speicherplatz';
+$wb['percentage_txt'] = 'Verbraucht in %';
?>
diff --git a/interface/web/mail/lib/lang/en_spamfilter_users.lng b/interface/web/mail/lib/lang/en_spamfilter_users.lng
index 78b346c3eb7a443ae4dfb53d2230f77424238995..38d51aee4344597ba78c019f382d017fbed3fab5 100644
--- a/interface/web/mail/lib/lang/en_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/en_spamfilter_users.lng
@@ -5,4 +5,6 @@ $wb["policy_id_txt"] = 'Policy';
$wb["email_txt"] = 'Email (Pattern)';
$wb["fullname_txt"] = 'Name';
$wb["local_txt"] = 'Local';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
?>
\ No newline at end of file
diff --git a/interface/web/mail/lib/lang/en_user_quota_stats_list.lng b/interface/web/mail/lib/lang/en_user_quota_stats_list.lng
index 2a493ce98bfe0b184546b37df0d06e8250eab6c5..1804193ac8556943fb809a5be8fdd18d3c74ff2f 100755
--- a/interface/web/mail/lib/lang/en_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/en_user_quota_stats_list.lng
@@ -4,4 +4,5 @@ $wb["quota_txt"] = 'Quota';
$wb["name_txt"] = 'Name';
$wb["email_txt"] = 'Email Address';
$wb["used_txt"] = 'Used space';
+$wb["percentage_txt"] = 'Used %';
?>
diff --git a/interface/web/mail/list/user_quota_stats.list.php b/interface/web/mail/list/user_quota_stats.list.php
index 1123b935ec0e61ce0f749fdb2f15723487e150e1..5787556129448358d5ff345b63c2f2ca4244e1e4 100644
--- a/interface/web/mail/list/user_quota_stats.list.php
+++ b/interface/web/mail/list/user_quota_stats.list.php
@@ -40,6 +40,8 @@ $liste["paging_tpl"] = "templates/paging.tpl.htm";
// Enable auth
$liste["auth"] = "yes";
+// mark columns for php sorting (no real mySQL columns)
+$liste["phpsort"] = array('used_sort', 'percentage_sort');
/*****************************************************
* Suchfelder
diff --git a/interface/web/mail/mail_alias_list.php b/interface/web/mail/mail_alias_list.php
index 1ee6ad6f5587d286e7d4e9b19531924d5c901109..692189425ed68aee14a41b64f68f2a84692a2eff 100644
--- a/interface/web/mail/mail_alias_list.php
+++ b/interface/web/mail/mail_alias_list.php
@@ -18,7 +18,7 @@ $app->auth->check_module_permissions('mail');
$app->uses('listform_actions');
// Limit the results to alias domains
-$app->listform_actions->SQLExtWhere = "type = 'alias'";
+$app->listform_actions->SQLExtWhere = "mail_forwarding.type = 'alias'";
$app->listform_actions->onLoad();
diff --git a/interface/web/mail/mail_aliasdomain_list.php b/interface/web/mail/mail_aliasdomain_list.php
index 8998afad0c14d60108bac8f40ca2afc16c21dda3..396aa61a974a26635f2da44bbfe4bf92deb2ccf8 100644
--- a/interface/web/mail/mail_aliasdomain_list.php
+++ b/interface/web/mail/mail_aliasdomain_list.php
@@ -18,7 +18,7 @@ $app->auth->check_module_permissions('mail');
$app->uses('listform_actions');
// Limit the results to alias domains
-$app->listform_actions->SQLExtWhere = "type = 'aliasdomain'";
+$app->listform_actions->SQLExtWhere = "mail_forwarding.type = 'aliasdomain'";
$app->listform_actions->onLoad();
diff --git a/interface/web/mail/mail_blacklist_list.php b/interface/web/mail/mail_blacklist_list.php
index 000afd1a361a7e089d15f8e8e6eb9fb13f5962c3..9c118b3737a29aa48562b3a647d957ac40f91979 100644
--- a/interface/web/mail/mail_blacklist_list.php
+++ b/interface/web/mail/mail_blacklist_list.php
@@ -16,7 +16,7 @@ $list_def_file = "list/mail_blacklist.list.php";
$app->auth->check_module_permissions('mail');
$app->uses('listform_actions');
-$app->listform_actions->SQLExtWhere = "access = 'REJECT'";
+$app->listform_actions->SQLExtWhere = "mail_access.access = 'REJECT'";
$app->listform_actions->onLoad();
diff --git a/interface/web/mail/mail_domain_catchall_list.php b/interface/web/mail/mail_domain_catchall_list.php
index e07495fd86e0488f82910f828fa3591af0ffbd50..a703a1784cab50da791cff6c7afa5ad492ba7945 100644
--- a/interface/web/mail/mail_domain_catchall_list.php
+++ b/interface/web/mail/mail_domain_catchall_list.php
@@ -18,7 +18,7 @@ $app->auth->check_module_permissions('mail');
$app->uses('listform_actions');
// Limit the results to alias domains
-$app->listform_actions->SQLExtWhere = "type = 'catchall'";
+$app->listform_actions->SQLExtWhere = "mail_forwarding.type = 'catchall'";
$app->listform_actions->onLoad();
diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php
index d806f03a5f762e37cd9a467b08e41fd1b14981e8..f8ce78d5e14ae1f01878e526b899780be3b1a980 100644
--- a/interface/web/mail/mail_domain_edit.php
+++ b/interface/web/mail/mail_domain_edit.php
@@ -71,7 +71,7 @@ class page_action extends tform_actions {
if($_SESSION["s"]["user"]["typ"] == 'admin') {
// Getting Clients of the user
- $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
+ $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
$clients = $app->db->queryAllRecords($sql);
$client_select = '';
@@ -80,7 +80,7 @@ class page_action extends tform_actions {
if(is_array($clients)) {
foreach( $clients as $client) {
$selected = @(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
- $client_select .= "$client[name] :: $client[contactname] \r\n";
+ $client_select .= "$client[contactname] \r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
@@ -89,7 +89,7 @@ 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.client_id, client.contact_name, client.default_mailserver, CONCAT(client.company_name,' :: ',client.contact_name) as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id order by client.contact_name");
+ $client = $app->db->queryOneRecord("SELECT client.client_id, client.contact_name, client.default_mailserver, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id order by client.contact_name");
// Set the mailserver to the default server of the client
$tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = $client[default_mailserver]");
@@ -97,15 +97,15 @@ class page_action extends tform_actions {
unset($tmp);
// Fill the client select field
- $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
+ $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
$clients = $app->db->queryAllRecords($sql);
$tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$client['client_id']);
- $client_select = ''.$client['name'].' :: '.$client['contactname'].' ';
+ $client_select = ''.$client['contactname'].' ';
//$tmp_data_record = $app->tform->getDataRecord($this->id);
if(is_array($clients)) {
foreach( $clients as $client) {
$selected = @(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
- $client_select .= "$client[name] :: $client[contactname] \r\n";
+ $client_select .= "$client[contactname] \r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
diff --git a/interface/web/mail/mail_domain_list.php b/interface/web/mail/mail_domain_list.php
index d07855c0507ca7d567299d79180d9d13ecebd8e8..cad650643748ca4535e06b1266ca3e39e16a2a9b 100644
--- a/interface/web/mail/mail_domain_list.php
+++ b/interface/web/mail/mail_domain_list.php
@@ -21,7 +21,7 @@ $app->uses('listform_actions');
// Limit the results to alias domains
// $app->listform_actions->SQLExtWhere = "type = 'local'";
-$app->listform_actions->SQLOrderBy = 'ORDER BY domain';
+$app->listform_actions->SQLOrderBy = 'ORDER BY mail_domain.domain';
$app->listform_actions->onLoad();
diff --git a/interface/web/mail/mail_forward_list.php b/interface/web/mail/mail_forward_list.php
index 40c824433485b065f26edd1cc3961ef84d02db7f..4fd479012e208056dadd28801b3f850869f14c44 100644
--- a/interface/web/mail/mail_forward_list.php
+++ b/interface/web/mail/mail_forward_list.php
@@ -18,7 +18,7 @@ $app->auth->check_module_permissions('mail');
$app->uses('listform_actions');
// Limit the results to alias domains
-$app->listform_actions->SQLExtWhere = "type = 'forward'";
+$app->listform_actions->SQLExtWhere = "mail_forwarding.type = 'forward'";
$app->listform_actions->onLoad();
diff --git a/interface/web/mail/mail_mailinglist_edit.php b/interface/web/mail/mail_mailinglist_edit.php
index 47b18eb19b238a177ea12abc90e841037907ba2a..5864396f585c0343fd08fd3c6f9919f4b5acbace 100644
--- a/interface/web/mail/mail_mailinglist_edit.php
+++ b/interface/web/mail/mail_mailinglist_edit.php
@@ -72,7 +72,7 @@ class page_action extends tform_actions {
if($_SESSION["s"]["user"]["typ"] == 'admin') {
// Getting Clients of the user
- $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
+ $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
$clients = $app->db->queryAllRecords($sql);
$client_select = '';
if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= " ";
@@ -80,7 +80,7 @@ class page_action extends tform_actions {
if(is_array($clients)) {
foreach( $clients as $client) {
$selected = ($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':'';
- $client_select .= "$client[name] :: $client[contactname] \r\n";
+ $client_select .= "$client[contactname] \r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
@@ -89,18 +89,18 @@ 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.client_id, client.contact_name, client.default_mailserver, CONCAT(client.company_name,' :: ',client.contact_name) as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id order by contact_name");
+ $client = $app->db->queryOneRecord("SELECT client.client_id, client.contact_name, client.default_mailserver, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id order by contact_name");
// Fill the client select field
- $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
+ $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
$clients = $app->db->queryAllRecords($sql);
$tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$client['client_id']);
- $client_select = ''.$client['name'].' :: '.$client['contactname'].' ';
+ $client_select = ''.$client['contactname'].' ';
$tmp_data_record = $app->tform->getDataRecord($this->id);
if(is_array($clients)) {
foreach( $clients as $client) {
$selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':'';
- $client_select .= "$client[name] :: $client[contactname] \r\n";
+ $client_select .= "$client[contactname] \r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
diff --git a/interface/web/mail/mail_user_list.php b/interface/web/mail/mail_user_list.php
index fcbbaa78b214568d81fe8618602cf1cdc3c285bd..7f93e2b436197a17645d1a24361e04a8463a5f3f 100644
--- a/interface/web/mail/mail_user_list.php
+++ b/interface/web/mail/mail_user_list.php
@@ -44,7 +44,7 @@ class list_action extends listform_actions {
}
$list = new list_action;
-$list->SQLOrderBy = 'ORDER BY email';
+$list->SQLOrderBy = 'ORDER BY mail_user.email';
$list->onLoad();
diff --git a/interface/web/mail/mail_user_stats.php b/interface/web/mail/mail_user_stats.php
index 36c7da555c3544b0e49491f1e612db9a9555ab1f..65b179d8374a7bd305860b3c39416fa962eeb24a 100644
--- a/interface/web/mail/mail_user_stats.php
+++ b/interface/web/mail/mail_user_stats.php
@@ -54,6 +54,86 @@ class list_action extends listform_actions {
$rec['id'] = $rec[$this->idx_key];
return $rec;
}
+
+ function getQueryString() {
+ global $app;
+ $sql_where = '';
+
+ //* Generate the search sql
+ if($app->listform->listDef['auth'] != 'no') {
+ if($_SESSION['s']['user']['typ'] == "admin") {
+ $sql_where = '';
+ } else {
+ $sql_where = $app->tform->getAuthSQL('r', $app->listform->listDef['table']).' and';
+ //$sql_where = $app->tform->getAuthSQL('r').' and';
+ }
+ }
+ if($this->SQLExtWhere != '') {
+ $sql_where .= ' '.$this->SQLExtWhere.' and';
+ }
+
+ $sql_where = $app->listform->getSearchSQL($sql_where);
+ if($app->listform->listDef['join_sql']) $sql_where .= ' AND '.$app->listform->listDef['join_sql'];
+ $app->tpl->setVar($app->listform->searchValues);
+
+ $order_by_sql = $this->SQLOrderBy;
+
+ //* Generate SQL for paging
+ $limit_sql = $app->listform->getPagingSQL($sql_where);
+ $app->tpl->setVar('paging',$app->listform->pagingHTML);
+
+ $extselect = '';
+ $join = '';
+
+ if(!empty($_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order'])){
+ $order = str_replace(' DESC','',$_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order']);
+ list($tmp_table, $order) = explode('.', $order);
+ if($order == 'mail_traffic_last_month'){
+ $tmp_date = date('Y-m',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
+ $join .= ' INNER JOIN mail_traffic as mt ON '.$app->listform->listDef['table'].'.mailuser_id = mt.mailuser_id ';
+ $sql_where .= " AND mt.month like '$tmp_date%'";
+ $order_by_sql = str_replace($app->listform->listDef['table'].'.mail_traffic_last_month','traffic',$order_by_sql);
+ } elseif($order == 'mail_traffic_this_month'){
+ $tmp_date = date('Y-m');
+ $join .= ' INNER JOIN mail_traffic as mt ON '.$app->listform->listDef['table'].'.mailuser_id = mt.mailuser_id ';
+ $sql_where .= " AND mt.month like '$tmp_date%'";
+ $order_by_sql = str_replace($app->listform->listDef['table'].'.mail_traffic_this_month','traffic',$order_by_sql);
+ } elseif($order == 'mail_traffic_last_year'){
+ $tmp_date = date('Y',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
+ $extselect .= ', SUM(mt.traffic) as calctraffic';
+ $join .= ' INNER JOIN mail_traffic as mt ON '.$app->listform->listDef['table'].'.mailuser_id = mt.mailuser_id ';
+ $sql_where .= " AND mt.month like '$tmp_date%'";;
+ $order_by_sql = str_replace($app->listform->listDef['table'].'.mail_traffic_last_year','calctraffic',$order_by_sql);
+ $order_by_sql = "GROUP BY mailuser_id ".$order_by_sql;
+ } elseif($order == 'mail_traffic_this_year'){
+ $tmp_date = date('Y');
+ $extselect .= ', SUM(mt.traffic) as calctraffic';
+ $join .= ' INNER JOIN mail_traffic as mt ON '.$app->listform->listDef['table'].'.mailuser_id = mt.mailuser_id ';
+ $sql_where .= " AND mt.month like '$tmp_date%'";
+ $order_by_sql = str_replace($app->listform->listDef['table'].'.mail_traffic_this_year','calctraffic',$order_by_sql);
+ $order_by_sql = "GROUP BY mailuser_id ".$order_by_sql;
+ }
+ }
+
+ if($this->SQLExtSelect != '') {
+ if(substr($this->SQLExtSelect,0,1) != ',') $this->SQLExtSelect = ','.$this->SQLExtSelect;
+ $extselect .= $this->SQLExtSelect;
+ }
+
+ $table_selects = array();
+ $table_selects[] = trim($app->listform->listDef['table']).'.*';
+ $app->listform->listDef['additional_tables'] = trim($app->listform->listDef['additional_tables']);
+ if($app->listform->listDef['additional_tables'] != ''){
+ $additional_tables = explode(',', $app->listform->listDef['additional_tables']);
+ foreach($additional_tables as $additional_table){
+ $table_selects[] = trim($additional_table).'.*';
+ }
+ }
+ $select = implode(', ', $table_selects);
+
+ $sql = 'SELECT '.$select.$extselect.' FROM '.$app->listform->listDef['table'].($app->listform->listDef['additional_tables'] != ''? ','.$app->listform->listDef['additional_tables'] : '')."$join WHERE $sql_where $order_by_sql $limit_sql";
+ return $sql;
+ }
}
$list = new list_action;
diff --git a/interface/web/mail/mail_whitelist_list.php b/interface/web/mail/mail_whitelist_list.php
index 6a5358e26f2456674d2bba5b0f3fa9a8c8d8456f..a4c39a99b5155d923a04bcd2c4f9e7b2cfb213bc 100644
--- a/interface/web/mail/mail_whitelist_list.php
+++ b/interface/web/mail/mail_whitelist_list.php
@@ -16,7 +16,7 @@ $list_def_file = "list/mail_whitelist.list.php";
$app->auth->check_module_permissions('mail');
$app->uses('listform_actions');
-$app->listform_actions->SQLExtWhere = "access = 'OK'";
+$app->listform_actions->SQLExtWhere = "mail_access.access = 'OK'";
$app->listform_actions->onLoad();
diff --git a/interface/web/mail/spamfilter_blacklist_list.php b/interface/web/mail/spamfilter_blacklist_list.php
index c2cc411092fcf058764dddc6b288c0c5c8ca22f3..087e533740396ea3e6f98914f9be07542d26f53e 100644
--- a/interface/web/mail/spamfilter_blacklist_list.php
+++ b/interface/web/mail/spamfilter_blacklist_list.php
@@ -16,7 +16,7 @@ $list_def_file = "list/spamfilter_blacklist.list.php";
$app->auth->check_module_permissions('mail');
$app->uses('listform_actions');
-$app->listform_actions->SQLExtWhere = "wb = 'B'";
+$app->listform_actions->SQLExtWhere = "spamfilter_wblist.wb = 'B'";
$app->listform_actions->onLoad();
diff --git a/interface/web/mail/spamfilter_whitelist_list.php b/interface/web/mail/spamfilter_whitelist_list.php
index 12c622a8e5ef8bd4c809074d2092a8b56dee4383..ffb0fc94831d6f8197ff84f77b8bdece6a141bcb 100644
--- a/interface/web/mail/spamfilter_whitelist_list.php
+++ b/interface/web/mail/spamfilter_whitelist_list.php
@@ -16,7 +16,7 @@ $list_def_file = "list/spamfilter_whitelist.list.php";
$app->auth->check_module_permissions('mail');
$app->uses('listform_actions');
-$app->listform_actions->SQLExtWhere = "wb = 'W'";
+$app->listform_actions->SQLExtWhere = "spamfilter_wblist.wb = 'W'";
$app->listform_actions->onLoad();
diff --git a/interface/web/mail/templates/user_quota_stats_list.htm b/interface/web/mail/templates/user_quota_stats_list.htm
index afa7355ba40d5f3fdac3020714f89912d5d5753a..c2a539739977de00b24d41a61d577fbf2df530a9 100644
--- a/interface/web/mail/templates/user_quota_stats_list.htm
+++ b/interface/web/mail/templates/user_quota_stats_list.htm
@@ -1,51 +1,54 @@
-
-
-
+
+
+
diff --git a/interface/web/mail/user_quota_stats.php b/interface/web/mail/user_quota_stats.php
index 5766ff778163d582b9913106b340bb322c60528d..dfc1d8a820534aca4dfeeaa7ebbede3c289d62bd 100644
--- a/interface/web/mail/user_quota_stats.php
+++ b/interface/web/mail/user_quota_stats.php
@@ -50,16 +50,24 @@ class list_action extends listform_actions {
$rec['used'] = isset($monitor_data[$email]['used']) ? $monitor_data[$email]['used'] : array(1 => 0);
if (!is_numeric($rec['used'])) $rec['used']=$rec['used'][1];
-
- $rec['quota'] = round($rec['quota'] / 1048576,2).' MB';
- if($rec['quota'] == "0 MB") $rec['quota'] = $app->lng('unlimited');
+
+ if($rec['quota'] == 0){
+ $rec['quota'] = $app->lng('unlimited');
+ $rec['percentage'] = '';
+ $rec['percentage_sort'] = 0;
+ } else {
+ $rec['percentage'] = round(100 * $rec['used'] / $rec['quota']) . '%';
+ $rec['percentage_sort'] = round(100 * $rec['used'] / $rec['quota']);
+ $rec['quota'] = round($rec['quota'] / 1048576,4).' MB';
+ }
+ $rec['used_sort'] = $rec['used'];
if($rec['used'] < 1544000) {
- $rec['used'] = round($rec['used'] / 1024,2).' KB';
+ $rec['used'] = round($rec['used'] / 1024,4).' KB';
} else {
- $rec['used'] = round($rec['used'] / 1048576,2).' MB';
- }
+ $rec['used'] = round($rec['used'] / 1048576,4).' MB';
+ }
//* The variable "id" contains always the index variable
$rec['id'] = $rec[$this->idx_key];
diff --git a/interface/web/mail/webmailer.php b/interface/web/mail/webmailer.php
index 2cff5daa1f32e3ce023da992521eb4e19ac387d6..7b3e86245cac7fef91c771659ec93cd832356761 100644
--- a/interface/web/mail/webmailer.php
+++ b/interface/web/mail/webmailer.php
@@ -55,14 +55,21 @@ $app->uses('getconf');
$global_config = $app->getconf->get_global_config('mail');
if($global_config['webmail_url'] != '') {
- header('Location:' . $global_config['webmail_url']);
+ $webmail_url = $global_config['webmail_url'];
+ $webmail_url = str_replace('[SERVERNAME]', $serverData['server_name'], $webmail_url);
+ header('Location:' . $webmail_url);
} else {
/*
* We only redirect to the login-form, so there is no need, to check any rights
*/
isset($_SERVER['HTTPS'])? $http = 'https' : $http = 'http';
- header('Location:' . $http . '://' . $serverData['server_name'] . '/webmail');
+ if($web_config['server_type'] == 'nginx') {
+ header('Location: http://' . $serverData['server_name'] . ':8081/webmail');
+ } else {
+ header('Location: ' . $http . '://' . $serverData['server_name'] . '/webmail');
+ }
+ isset($_SERVER['HTTPS'])? $http = 'https' : $http = 'http';
}
exit;
?>
\ No newline at end of file
diff --git a/interface/web/mailuser/mail_user_autoresponder_edit.php b/interface/web/mailuser/mail_user_autoresponder_edit.php
index 5fac5b9c7f8a50e3b3392e1c55c34db4b0f37f20..5e580810d19637fded122a7b2b0a40449cd6d19e 100644
--- a/interface/web/mailuser/mail_user_autoresponder_edit.php
+++ b/interface/web/mailuser/mail_user_autoresponder_edit.php
@@ -81,6 +81,12 @@ class page_action extends tform_actions {
$app->tpl->setVar("ar_active", '');
}
+ if($this->dataRecord['autoresponder_subject'] == '') {
+ $app->tpl->setVar('autoresponder_subject', $app->tform->lng('autoresponder_subject'));
+ } else {
+ $app->tpl->setVar('autoresponder_subject', $this->dataRecord['autoresponder_subject']);
+ }
+
parent::onShowEnd();
}
diff --git a/interface/web/mailuser/mail_user_filter_list.php b/interface/web/mailuser/mail_user_filter_list.php
index 43d7eecb2263fc269902942ec63ebbb7cf618404..d896aa5f021319263342fea55f1247104f99d48a 100644
--- a/interface/web/mailuser/mail_user_filter_list.php
+++ b/interface/web/mailuser/mail_user_filter_list.php
@@ -24,7 +24,7 @@ class list_action extends listform_actions {
$list = new list_action;
-$list->SQLExtWhere = "mailuser_id = ".$_SESSION['s']['user']['mailuser_id'];
+$list->SQLExtWhere = "mail_user_filter.mailuser_id = ".$_SESSION['s']['user']['mailuser_id'];
$list->onLoad();
diff --git a/interface/web/monitor/datalog_list.php b/interface/web/monitor/datalog_list.php
index 6f4766e2d3e09a7aeae16276e642fb080c92109b..dd5bfb30a2c8440f750caf70d9f261702c2a639b 100644
--- a/interface/web/monitor/datalog_list.php
+++ b/interface/web/monitor/datalog_list.php
@@ -50,13 +50,13 @@ $servers = $app->db->queryAllRecords("SELECT server_id, updated FROM server");
$sql = '(';
foreach($servers as $sv) {
- $sql .= " (datalog_id > ".$sv['updated']." AND sys_datalog.server_id = ".$sv['server_id'].") OR ";
+ $sql .= " (sys_datalog.datalog_id > ".$sv['updated']." AND sys_datalog.server_id = ".$sv['server_id'].") OR ";
}
$sql = substr($sql,0,-4);
$sql .= ')';
$app->listform_actions->SQLExtWhere = $sql;
-$app->listform_actions->SQLOrderBy = "ORDER BY tstamp DESC, datalog_id DESC";
+$app->listform_actions->SQLOrderBy = "ORDER BY sys_datalog.tstamp DESC, sys_datalog.datalog_id DESC";
$app->listform_actions->onLoad();
diff --git a/interface/web/monitor/lib/lang/de.lng b/interface/web/monitor/lib/lang/de.lng
index ff0b6459ec87a2f2d0087f12c07fdc51c657866b..cf9621f57e64e9c745f6b1568bb35a60815b6585 100644
--- a/interface/web/monitor/lib/lang/de.lng
+++ b/interface/web/monitor/lib/lang/de.lng
@@ -146,4 +146,10 @@ $wb['monitor_title_iptables_txt'] = 'IPTables Regeln';
$wb['Show fail2ban-Log'] = 'Fail2ban Protokoll anzeigen';
$wb['Show IPTables'] = 'IPTables anzeigen';
$wb['Show OpenVz VE BeanCounter'] = 'OpenVz VE BeanCounter anzeigen';
+$wb['Show Monit'] = 'Monit anzeigen';
+$wb['no_monit_url_defined_txt'] = 'Keine Monit-URL definiert.';
+$wb['no_permissions_to_view_monit_txt'] = 'Sie haben nicht die Berechtigung, auf Monit zuzugreifen.';
+$wb['Show Munin'] = 'Munin anzeigen';
+$wb['no_munin_url_defined_txt'] = 'Keine Munin-URL definiert.';
+$wb['no_permissions_to_view_munin_txt'] = 'Sie haben nicht die Berechtigung, auf Munin zuzugreifen.';
?>
diff --git a/interface/web/monitor/lib/lang/en.lng b/interface/web/monitor/lib/lang/en.lng
index e1be79b191e8d90650df2ac937156d36e223ff93..20cf1fbb3b1a93a3f10b41a7d68b7de0e95c1a7d 100644
--- a/interface/web/monitor/lib/lang/en.lng
+++ b/interface/web/monitor/lib/lang/en.lng
@@ -146,4 +146,10 @@ $wb['monitor_title_iptables_txt'] = 'IPTables Rules';
$wb['monitor_title_beancounter_txt'] = 'OpenVz VE BeanCounter';
$wb['monitor_updates_nosupport_txt'] = 'Your distribution is not supported for this monitoring';
$wb['monitor_beancounter_nosupport_txt'] = 'This server is not a OpenVz VE and has no beancounter information';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
?>
diff --git a/interface/web/monitor/lib/module.conf.php b/interface/web/monitor/lib/module.conf.php
index 598368758f22e24eb7e7bd1396d72fc95b4f12ee..1d4e5e1c34008706d2468a8c9594662913432591 100644
--- a/interface/web/monitor/lib/module.conf.php
+++ b/interface/web/monitor/lib/module.conf.php
@@ -115,11 +115,21 @@ $items[] = array( 'title' => "Show Services",
'target' => 'content',
'link' => 'monitor/show_data.php?type=services',
'html_id' => 'services');
+
+$items[] = array( 'title' => "Show Monit",
+ 'target' => 'content',
+ 'link' => 'monitor/show_monit.php',
+ 'html_id' => 'monit');
$items[] = array( 'title' => "Show OpenVz VE BeanCounter",
'target' => 'content',
'link' => 'monitor/show_data.php?type=openvz_beancounter',
'html_id' => 'openvz_beancounter');
+
+$items[] = array( 'title' => "Show Munin",
+ 'target' => 'content',
+ 'link' => 'monitor/show_munin.php',
+ 'html_id' => 'monit');
$module["nav"][] = array( 'title' => 'Server State',
'open' => 1,
diff --git a/interface/web/monitor/log_list.php b/interface/web/monitor/log_list.php
index d8304ad5899bdba2feaa0058dc2577eed628fad2..2d5edb25cb58e839a88cbcaeddd3ead2c8bdfd99 100644
--- a/interface/web/monitor/log_list.php
+++ b/interface/web/monitor/log_list.php
@@ -47,7 +47,7 @@ $app->auth->check_module_permissions('monitor');
$app->uses('listform_actions');
//$app->listform_actions->SQLExtWhere = "wb = 'W'";
-$app->listform_actions->SQLOrderBy = "ORDER BY tstamp DESC, syslog_id DESC";
+$app->listform_actions->SQLOrderBy = "ORDER BY sys_log.tstamp DESC, sys_log.syslog_id DESC";
$app->listform_actions->onLoad();
diff --git a/interface/web/monitor/show_monit.php b/interface/web/monitor/show_monit.php
new file mode 100644
index 0000000000000000000000000000000000000000..3dd8f0364b6fd242cbb554dda277b3c14c15ba83
--- /dev/null
+++ b/interface/web/monitor/show_monit.php
@@ -0,0 +1,82 @@
+auth->check_module_permissions('monitor');
+
+$app->uses('tools_monitor');
+
+// Loading the template
+$app->uses('tpl');
+$app->tpl->newTemplate("form.tpl.htm");
+$app->tpl->setInclude('content_tpl', 'templates/show_monit.htm');
+
+$monTransSrv = $app->lng("monitor_settings_server_txt");
+$title = 'Monit ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
+
+$app->tpl->setVar("list_head_txt", $title);
+
+if($_SESSION["s"]["user"]["typ"] == 'admin'){
+
+ $app->uses('getconf');
+ $server_config = $app->getconf->get_server_config($_SESSION['monitor']['server_id'],'server');
+
+ $monit_url = trim($server_config['monit_url']);
+ if($monit_url != ''){
+ $monit_url = str_replace('[SERVERNAME]', $_SESSION['monitor']['server_name'], $monit_url);
+ $monit_user = trim($server_config['monit_user']);
+ $monit_password = trim($server_config['monit_password']);
+ $auth_string = '';
+ if($monit_user != ''){
+ $auth_string = $monit_user;
+ }
+ if($monit_user != '' && $monit_password != ''){
+ $auth_string .= ':'.$monit_password;
+ }
+ if($auth_string != '') $auth_string .= '@';
+
+ $monit_url_parts = parse_url($monit_url);
+
+ $monit_url = $monit_url_parts['scheme'].'://'.$auth_string.$monit_url_parts['host'].(isset($monit_url_parts['port']) ? ':' . $monit_url_parts['port'] : '').(isset($monit_url_parts['path']) ? $monit_url_parts['path'] : '').(isset($monit_url_parts['query']) ? '?' . $monit_url_parts['query'] : '').(isset($monit_url_parts['fragment']) ? '#' . $monit_url_parts['fragment'] : '');
+
+ $app->tpl->setVar("monit_url", $monit_url);
+ } else {
+ $app->tpl->setVar("no_monit_url_defined_txt", $app->lng("no_monit_url_defined_txt"));
+ }
+} else {
+ $app->tpl->setVar("no_permissions_to_view_monit_txt", $app->lng("no_permissions_to_view_monit_txt"));
+}
+
+$app->tpl_defaults();
+$app->tpl->pparse();
+?>
diff --git a/interface/web/monitor/show_munin.php b/interface/web/monitor/show_munin.php
new file mode 100644
index 0000000000000000000000000000000000000000..b193d587c1577d10e12252d4704ae463946b2f0d
--- /dev/null
+++ b/interface/web/monitor/show_munin.php
@@ -0,0 +1,82 @@
+auth->check_module_permissions('monitor');
+
+$app->uses('tools_monitor');
+
+// Loading the template
+$app->uses('tpl');
+$app->tpl->newTemplate("form.tpl.htm");
+$app->tpl->setInclude('content_tpl', 'templates/show_munin.htm');
+
+$monTransSrv = $app->lng("monitor_settings_server_txt");
+$title = 'Munin ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
+
+$app->tpl->setVar("list_head_txt", $title);
+
+if($_SESSION["s"]["user"]["typ"] == 'admin'){
+
+ $app->uses('getconf');
+ $server_config = $app->getconf->get_server_config($_SESSION['monitor']['server_id'],'server');
+
+ $munin_url = trim($server_config['munin_url']);
+ if($munin_url != ''){
+ $munin_url = str_replace('[SERVERNAME]', $_SESSION['monitor']['server_name'], $munin_url);
+ $munin_user = trim($server_config['munin_user']);
+ $munin_password = trim($server_config['munin_password']);
+ $auth_string = '';
+ if($munin_user != ''){
+ $auth_string = $munin_user;
+ }
+ if($munin_user != '' && $munin_password != ''){
+ $auth_string .= ':'.$munin_password;
+ }
+ if($auth_string != '') $auth_string .= '@';
+
+ $munin_url_parts = parse_url($munin_url);
+
+ $munin_url = $munin_url_parts['scheme'].'://'.$auth_string.$munin_url_parts['host'].(isset($munin_url_parts['port']) ? ':' . $munin_url_parts['port'] : '').(isset($munin_url_parts['path']) ? $munin_url_parts['path'] : '').(isset($munin_url_parts['query']) ? '?' . $munin_url_parts['query'] : '').(isset($munin_url_parts['fragment']) ? '#' . $munin_url_parts['fragment'] : '');
+
+ $app->tpl->setVar("munin_url", $munin_url);
+ } else {
+ $app->tpl->setVar("no_munin_url_defined_txt", $app->lng("no_munin_url_defined_txt"));
+ }
+} else {
+ $app->tpl->setVar("no_permissions_to_view_munin_txt", $app->lng("no_permissions_to_view_munin_txt"));
+}
+
+$app->tpl_defaults();
+$app->tpl->pparse();
+?>
diff --git a/interface/web/monitor/templates/show_monit.htm b/interface/web/monitor/templates/show_monit.htm
new file mode 100644
index 0000000000000000000000000000000000000000..27265bd137d5e4fcb69355effc07dc0fa328ce7f
--- /dev/null
+++ b/interface/web/monitor/templates/show_monit.htm
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+ ERROR {tmpl_var name="no_monit_url_defined_txt"} {tmpl_var name="no_permissions_to_view_monit_txt"}
+
+
\ No newline at end of file
diff --git a/interface/web/monitor/templates/show_munin.htm b/interface/web/monitor/templates/show_munin.htm
new file mode 100644
index 0000000000000000000000000000000000000000..86d33f190e1e12e9d9c374e48cbfa13a2e8e6473
--- /dev/null
+++ b/interface/web/monitor/templates/show_munin.htm
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+ ERROR {tmpl_var name="no_munin_url_defined_txt"} {tmpl_var name="no_permissions_to_view_munin_txt"}
+
+
\ No newline at end of file
diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php
index ba9a32eb8fc70448c370b96a7d4af4d22737a34b..334738acfc53e3776be15ae611c01470e0491a65 100644
--- a/interface/web/sites/ajax_get_json.php
+++ b/interface/web/sites/ajax_get_json.php
@@ -69,11 +69,17 @@ $type = $_GET["type"];
$web_config = $app->getconf->get_server_config($server_id, 'web');
if(!empty($web_config['server_type'])) $server_type = $web_config['server_type'];
if($server_type == 'nginx' && $php_type == 'fast-cgi') $php_type = 'php-fpm';
+ // get client id
+ $sql_where = '';
+ if($_SESSION["s"]["user"]["typ"] != 'admin'){
+ $sql_where = " AND client_id = ".$_SESSION["s"]["user"]["client_id"];
+ }
+
if($php_type == 'php-fpm'){
- $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = $server_id");
+ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = $server_id".$sql_where);
}
if($php_type == 'fast-cgi'){
- $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = $server_id");
+ $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = $server_id".$sql_where);
}
$php_select = "";
if(is_array($php_records) && !empty($php_records)) {
diff --git a/interface/web/sites/aps_availablepackages_list.php b/interface/web/sites/aps_availablepackages_list.php
index 3e3b83bf3c1c453fabbcc434f165ab0dd7faa2b0..0966df9a66ff76a294789da3bc81be2bb1d2736c 100644
--- a/interface/web/sites/aps_availablepackages_list.php
+++ b/interface/web/sites/aps_availablepackages_list.php
@@ -42,10 +42,10 @@ $app->auth->check_module_permissions('sites');
// Load needed classes
$app->uses('tpl,listform_actions');
-$app->listform_actions->SQLOrderBy = 'ORDER BY name, version';
+$app->listform_actions->SQLOrderBy = 'ORDER BY aps_packages.name, aps_packages.version';
// Show only unlocked packages to clients and (un-)lockable packages to admins
-if($_SESSION['s']['user']['typ'] != 'admin') $app->listform_actions->SQLExtWhere = 'package_status = '.PACKAGE_ENABLED;
-else $app->listform_actions->SQLExtWhere = '(package_status = '.PACKAGE_ENABLED.' OR package_status = '.PACKAGE_LOCKED.')';
+if($_SESSION['s']['user']['typ'] != 'admin') $app->listform_actions->SQLExtWhere = 'aps_packages.package_status = '.PACKAGE_ENABLED;
+else $app->listform_actions->SQLExtWhere = '(aps_packages.package_status = '.PACKAGE_ENABLED.' OR aps_packages.package_status = '.PACKAGE_LOCKED.')';
// Get package amount
$pkg_count = $app->db->queryOneRecord("SELECT COUNT(*) FROM aps_packages");
diff --git a/interface/web/sites/cron_edit.php b/interface/web/sites/cron_edit.php
index 43d047f8161dcb58341026e6e1ce20e379228626..4c584d190f95cf8b90b0f695b46c0ec8815e8671 100644
--- a/interface/web/sites/cron_edit.php
+++ b/interface/web/sites/cron_edit.php
@@ -115,8 +115,17 @@ class page_action extends tform_actions {
$this->dataRecord["type"] = 'url';
} else {
$domain_owner = $app->db->queryOneRecord("SELECT limit_cron_type FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ".$app->functions->intval($parent_domain["sys_groupid"]));
- if($domain_owner["limit_cron_type"] == 'full') $this->dataRecord["type"] = 'full';
- else $this->dataRecord["type"] = 'chrooted';
+ //* True when the site is assigned to a client
+ if(isset($domain_owner["limit_cron_type"])) {
+ if($domain_owner["limit_cron_type"] == 'full') {
+ $this->dataRecord["type"] = 'full';
+ } else {
+ $this->dataRecord["type"] = 'chrooted';
+ }
+ } else {
+ //* True when the site is assigned to the admin
+ $this->dataRecord["type"] = 'full';
+ }
}
parent::onSubmit();
diff --git a/interface/web/sites/database_del.php b/interface/web/sites/database_del.php
index 2dc90fd4dfd2c5118eb2155527fe40910f2cd4da..d3c00cd1a34023f82ee7ccf6a582056dc005377f 100644
--- a/interface/web/sites/database_del.php
+++ b/interface/web/sites/database_del.php
@@ -52,7 +52,7 @@ class page_action extends tform_actions {
if($app->tform->checkPerm($this->id,'d') == false) $app->error($app->lng('error_no_delete_permission'));
$app->uses('sites_database_plugin');
- $app->sites_database_plugin->processDatabaseDelete($this->id);
+ //$app->sites_database_plugin->processDatabaseDelete($this->id);
}
}
diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php
index c259ff055d8d84a1e6f72794b818eef3938abaf9..8dc3ab30b46c338149badd1bc24e420faeabbc28 100644
--- a/interface/web/sites/database_edit.php
+++ b/interface/web/sites/database_edit.php
@@ -264,6 +264,10 @@ class page_action extends tform_actions {
if(preg_match('/(^|,)' . preg_quote($server_config['ip_address'], '/') . '(,|$)/', $this->dataRecord['remote_ips']) == false) {
$this->dataRecord['remote_ips'] .= ',' . $server_config['ip_address'];
}
+ $tmp = preg_split('/\s*,\s*/', $this->dataRecord['remote_ips']);
+ $tmp = array_unique($tmp);
+ $this->dataRecord['remote_ips'] = implode(',', $tmp);
+ unset($tmp);
}
}
}
@@ -328,6 +332,10 @@ class page_action extends tform_actions {
if(preg_match('/(^|,)' . preg_quote($server_config['ip_address'], '/') . '(,|$)/', $this->dataRecord['remote_ips']) == false) {
$this->dataRecord['remote_ips'] .= ',' . $server_config['ip_address'];
}
+ $tmp = preg_split('/\s*,\s*/', $this->dataRecord['remote_ips']);
+ $tmp = array_unique($tmp);
+ $this->dataRecord['remote_ips'] = implode(',', $tmp);
+ unset($tmp);
}
}
}
@@ -341,7 +349,7 @@ class page_action extends tform_actions {
$app->uses('sites_database_plugin');
- $app->sites_database_plugin->processDatabaseInsert($this);
+ //$app->sites_database_plugin->processDatabaseInsert($this);
$app->db->query($sql);
if($app->db->errorMessage != '') die($app->db->errorMessage);
@@ -355,7 +363,7 @@ class page_action extends tform_actions {
if(!empty($sql) && !$app->tform->isReadonlyTab($app->tform->getCurrentTab(),$this->id)) {
$app->uses('sites_database_plugin');
- $app->sites_database_plugin->processDatabaseUpdate($this);
+ //$app->sites_database_plugin->processDatabaseUpdate($this);
$app->db->query($sql);
if($app->db->errorMessage != '') die($app->db->errorMessage);
diff --git a/interface/web/sites/database_list.php b/interface/web/sites/database_list.php
index dfe11bef24108035b9bb0058b3383f9e36d9ff69..42c20058db53053f5f3ade2509f24866bafa43d7 100644
--- a/interface/web/sites/database_list.php
+++ b/interface/web/sites/database_list.php
@@ -67,7 +67,7 @@ class list_action extends listform_actions {
}
$list = new list_action;
-$list->SQLOrderBy = 'ORDER BY database_name';
+$list->SQLOrderBy = 'ORDER BY web_database.database_name';
$list->onLoad();
diff --git a/interface/web/sites/database_phpmyadmin.php b/interface/web/sites/database_phpmyadmin.php
index 0bd379db91f9bf89f49af5e04dfb8250c59b6202..e77c5df83ca914d4bf2f873c9da5430146f449c6 100644
--- a/interface/web/sites/database_phpmyadmin.php
+++ b/interface/web/sites/database_phpmyadmin.php
@@ -65,13 +65,13 @@ $web_config = $app->getconf->get_server_config($serverId,'web');
if($global_config['phpmyadmin_url'] != '') {
$phpmyadmin_url = $global_config['phpmyadmin_url'];
$phpmyadmin_url = str_replace(array('[SERVERNAME]', '[DATABASENAME]'),array($serverData['server_name'], $dbData['database_name']),$phpmyadmin_url);
- header('Location:'.$phpmyadmin_url);
+ header('Location: '.$phpmyadmin_url);
} else {
isset($_SERVER['HTTPS'])? $http = 'https' : $http = 'http';
if($web_config['server_type'] == 'nginx') {
- header('location:' . $http . '://' . $serverData['server_name'] . ':8081/phpmyadmin');
+ header('Location: http://' . $serverData['server_name'] . ':8081/phpmyadmin');
} else {
- header('location:' . $http . '://' . $serverData['server_name'] . '/phpmyadmin');
+ header('Location: ' . $http . '://' . $serverData['server_name'] . '/phpmyadmin');
}
}
exit;
diff --git a/interface/web/sites/database_user_del.php b/interface/web/sites/database_user_del.php
index 9abcfd148a28795e2a0f410ff2d4f545c4d27049..7931fb72436c1d409b51ed6259c9ead7fc8b64cb 100644
--- a/interface/web/sites/database_user_del.php
+++ b/interface/web/sites/database_user_del.php
@@ -53,7 +53,12 @@ class page_action extends tform_actions {
if($app->tform->checkPerm($this->id,'d') == false) $app->error($app->lng('error_no_delete_permission'));
$old_record = $app->tform->getDataRecord($this->id);
- $app->db->datalogDelete('web_database_user', 'database_user_id', $this->id);
+
+ /* we cannot use datalogDelete here, as we need to set server_id to 0 */
+ $app->db->query("DELETE FROM `web_database_user` WHERE $index_field = '$index_value'");
+ $new_rec = array();
+ $old_record['server_id'] = 0;
+ $app->db->datalogSave('web_database_user', 'DELETE', 'database_user_id', $this->id, $old_record, $new_rec);
}
function onAfterDelete() { // this has to be done on AFTER delete, because we need the db user still in the database when the server plugin processes the datalog
diff --git a/interface/web/sites/database_user_edit.php b/interface/web/sites/database_user_edit.php
index 50975a77f8ac960f3f2b3ac3bdea3e98ad698ccb..1b71196f69c3defa26618ecc6b0b054581a18a21 100644
--- a/interface/web/sites/database_user_edit.php
+++ b/interface/web/sites/database_user_edit.php
@@ -69,21 +69,21 @@ class page_action extends tform_actions {
$client = $app->db->queryOneRecord("SELECT client.company_name, client.contact_name, client.client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
// Fill the client select field
- $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
+ $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
$records = $app->db->queryAllRecords($sql);
$tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$client['client_id']);
- $client_select = ''.$client['company_name'].' :: '.$client['contact_name'].' ';
+ $client_select = ''.$client['contact_name'].' ';
//$tmp_data_record = $app->tform->getDataRecord($this->id);
if(is_array($records)) {
foreach( $records as $rec) {
$selected = @(is_array($this->dataRecord) && ($rec["groupid"] == $this->dataRecord['client_group_id'] || $rec["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
- $client_select .= "$rec[name] :: $rec[contactname] \r\n";
+ $client_select .= "$rec[contactname] \r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
} elseif($_SESSION["s"]["user"]["typ"] == 'admin') {
// Fill the client select field
- $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
+ $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
$clients = $app->db->queryAllRecords($sql);
$client_select = " ";
//$tmp_data_record = $app->tform->getDataRecord($this->id);
@@ -91,7 +91,7 @@ class page_action extends tform_actions {
foreach( $clients as $client) {
//$selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':'';
$selected = @(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
- $client_select .= "$client[name] :: $client[contactname] \r\n";
+ $client_select .= "$client[contactname] \r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
@@ -147,7 +147,7 @@ class page_action extends tform_actions {
$this->dataRecord['database_user'] = substr($dbuser_prefix . $this->dataRecord['database_user'], 0, 16);
}
- $this->dataRecord['server_id'] = $conf['server_id'];
+ $this->dataRecord['server_id'] = 0; // we need this on all servers
parent::onBeforeUpdate();
}
@@ -179,7 +179,7 @@ class page_action extends tform_actions {
$this->dataRecord['database_user'] = substr($dbuser_prefix . $this->dataRecord['database_user'], 0, 16);
}
- $this->dataRecord['server_id'] = $conf['server_id'];
+ $this->dataRecord['server_id'] = 0; // we need this on all servers
parent::onBeforeInsert();
}
@@ -209,7 +209,7 @@ class page_action extends tform_actions {
$app->db->query("UPDATE web_database_user SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE database_user_id = ".$this->id);
}
- $password = $app->db->queryOneRecord("SELECT database_password FROM web_database_user WHERE database_user_id = ".$this->id);
+ /*$password = $app->db->queryOneRecord("SELECT database_password FROM web_database_user WHERE database_user_id = ".$this->id);
$records = $app->db->queryAllRecords("SELECT DISTINCT server_id FROM web_database WHERE database_user_id = '".$app->functions->intval($this->id)."' UNION SELECT DISTINCT server_id FROM web_database WHERE database_ro_user_id = '".$app->functions->intval($this->id)."'");
foreach($records as $rec) {
@@ -219,7 +219,7 @@ class page_action extends tform_actions {
$new_rec['database_password'] = $password['database_password'];
$app->db->datalogSave('web_database_user', 'UPDATE', 'database_user_id', $this->id, $this->oldDataRecord, $new_rec);
}
- unset($new_rec);
+ unset($new_rec);*/
}
}
diff --git a/interface/web/sites/database_user_list.php b/interface/web/sites/database_user_list.php
index 52a48e4cb431f1f82e7f6deb3e887ace794f16bf..84c9535f43426955084a832cd29586ebbf53b99e 100644
--- a/interface/web/sites/database_user_list.php
+++ b/interface/web/sites/database_user_list.php
@@ -58,7 +58,7 @@ class list_action extends listform_actions {
}
$list = new list_action;
-$list->SQLOrderBy = 'ORDER BY database_user';
+$list->SQLOrderBy = 'ORDER BY web_database_user.database_user';
$list->onLoad();
diff --git a/interface/web/sites/form/database_user.tform.php b/interface/web/sites/form/database_user.tform.php
index 2bac933073709de9dacd0d6842211cf727b47f01..fa2b2d3a321dbd53aa373cb0730b2c2e07a10d24 100644
--- a/interface/web/sites/form/database_user.tform.php
+++ b/interface/web/sites/form/database_user.tform.php
@@ -44,7 +44,7 @@ $form["name"] = "database_user";
$form["action"] = "database_user_edit.php";
$form["db_table"] = "web_database_user";
$form["db_table_idx"] = "database_user_id";
-$form["db_history"] = "no";
+$form["db_history"] = "yes";
$form["tab_default"] = "database_user";
$form["list_default"] = "database_user_list.php";
$form["auth"] = 'yes'; // yes / no
diff --git a/interface/web/sites/form/shell_user.tform.php b/interface/web/sites/form/shell_user.tform.php
index d698a7ac383ae978000bd3b983ac80cba4ad7269..61d92b3a52ddfccc57a2e9b565a9d12fa14c6e48 100644
--- a/interface/web/sites/form/shell_user.tform.php
+++ b/interface/web/sites/form/shell_user.tform.php
@@ -91,7 +91,7 @@ $form["tabs"]['shell'] = array (
'validators' => array ( 0 => array ( 'type' => 'UNIQUE',
'errmsg'=> 'username_error_unique'),
1 => array ( 'type' => 'REGEX',
- 'regex' => '/^[\w\.\-]{0,64}$/',
+ 'regex' => '/^[\w\.\-]{0,32}$/',
'errmsg'=> 'username_error_regex'),
),
'default' => '',
diff --git a/interface/web/sites/form/web_domain.tform.php b/interface/web/sites/form/web_domain.tform.php
index 8f991b7fbf9b8e10be37d70536e463d435395798..233b464b8a960bf9666a07b95060f8c5a55b77d5 100644
--- a/interface/web/sites/form/web_domain.tform.php
+++ b/interface/web/sites/form/web_domain.tform.php
@@ -318,6 +318,14 @@ $form["tabs"]['redirect'] = array (
'default' => '',
'value' => array('' => 'no_redirect_txt', 'non_www_to_www' => 'domain.tld => www.domain.tld', 'www_to_non_www' => 'www.domain.tld => domain.tld', '*_domain_tld_to_domain_tld' => '*.doman.tld => domain.tld', '*_domain_tld_to_www_domain_tld' => '*.domain.tld => www.domain.tld', '*_to_domain_tld' => '* => domain.tld', '*_to_www_domain_tld' => '* => www.domain.tld')
),
+ 'rewrite_rules' => array (
+ 'datatype' => 'TEXT',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'width' => '30',
+ 'maxlength' => '255'
+ ),
##################################
# ENDE Datatable fields
##################################
@@ -507,7 +515,7 @@ $form["tabs"]['backup'] = array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '',
- 'value' => array('none' => 'No backup', 'daily' => 'Daily', 'weekly' => 'Weekly', 'monthly' => 'Monthly')
+ 'value' => array('none' => 'no_backup_txt', 'daily' => 'daily_backup_txt', 'weekly' => 'weekly_backup_txt', 'monthly' => 'monthly_backup_txt')
),
'backup_copies' => array (
'datatype' => 'INTEGER',
diff --git a/interface/web/sites/ftp_user_edit.php b/interface/web/sites/ftp_user_edit.php
index 455d126bba9c29ed43cd1734d944366f82aacc77..798233de9c828ce293d3d10552db8b956952150f 100644
--- a/interface/web/sites/ftp_user_edit.php
+++ b/interface/web/sites/ftp_user_edit.php
@@ -177,6 +177,23 @@ class page_action extends tform_actions {
$app->db->query($sql);
}
+ //* 2. check to ensure that the FTP user path is not changed to a path outside of the docroot by a normal user
+ if(isset($this->dataRecord['dir']) && $this->dataRecord['dir'] != $this->oldDataRecord['dir'] && !$app->auth->is_admin()) {
+ $vd = new validate_ftpuser;
+ $error_message = $vd->ftp_dir('dir', $this->dataRecord['dir'], '');
+ //* This check should normally never be triggered
+ //* Set the path to a safe path (web doc root).
+ if($error_message != '') {
+ $ftp_data = $app->db->queryOneRecord("SELECT parent_domain_id FROM ftp_user WHERE ftp_user_id = '".$app->db->quote($app->tform->primary_id)."'");
+ $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($ftp_data["parent_domain_id"]));
+ $dir = $web["document_root"];
+ $sql = "UPDATE ftp_user SET dir = '$dir' WHERE ftp_user_id = ".$this->id;
+ $app->db->query($sql);
+ $app->log("Error in FTP path settings of FTP user ".$this->dataRecord['username'], 1);
+ }
+
+ }
+
}
}
diff --git a/interface/web/sites/ftp_user_list.php b/interface/web/sites/ftp_user_list.php
index 250efcfd0e3f8b6729e617b5243a4a9e11fd158a..d5b648c0ddf56ddfb8a45f5e665d52c8ca595454 100644
--- a/interface/web/sites/ftp_user_list.php
+++ b/interface/web/sites/ftp_user_list.php
@@ -68,7 +68,7 @@ class list_action extends listform_actions {
}
$list = new list_action;
-$list->SQLOrderBy = 'ORDER BY username';
+$list->SQLOrderBy = 'ORDER BY ftp_user.username';
$list->onLoad();
diff --git a/interface/web/sites/lib/lang/de_shell_user.lng b/interface/web/sites/lib/lang/de_shell_user.lng
index 20d82cc3e3556edd1f6515f2d7ce5cdb08f37f07..9de369f90da4e6389be4af3b4c99c73116927a4c 100644
--- a/interface/web/sites/lib/lang/de_shell_user.lng
+++ b/interface/web/sites/lib/lang/de_shell_user.lng
@@ -26,4 +26,6 @@ $wb['generate_password_txt'] = 'Passwort erzeugen';
$wb['repeat_password_txt'] = 'Passwort wiederholen';
$wb['password_mismatch_txt'] = 'Die Passwörter stimmen nicht überein.';
$wb['password_match_txt'] = 'Die Passwörter stimmen überein.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'Der Benutzername darf 32 Zeichen nicht überschreiten.';
+$wb['username_not_allowed_txt'] = 'Der Benutzername ist nicht erlaubt.';
?>
diff --git a/interface/web/sites/lib/lang/de_web_domain.lng b/interface/web/sites/lib/lang/de_web_domain.lng
index dab184fe4d9f097f1cf78ef1416c15e92ede6a62..5467c99657cb9c89520c04325a1f861260e5972f 100644
--- a/interface/web/sites/lib/lang/de_web_domain.lng
+++ b/interface/web/sites/lib/lang/de_web_domain.lng
@@ -111,5 +111,12 @@ $wb['available_apache_directive_snippets_txt'] = 'Verfügbare Apache Direktiven
$wb['available_nginx_directive_snippets_txt'] = 'Verfügbare nginx Direktiven Schnipsel:';
$wb['proxy_directives_txt'] = 'Proxy Direktiven';
$wb['available_proxy_directive_snippets_txt'] = 'Verfügbare Proxy Direktiven Schnipsel:';
-$wb['no_server_error'] = 'No server selected.';
+$wb['no_server_error'] = 'Kein server ausgewählt.';
+$wb['no_backup_txt'] = 'Kein Backup';
+$wb['daily_backup_txt'] = 'Täglich';
+$wb['weekly_backup_txt'] = 'Wöchentlich';
+$wb['monthly_backup_txt'] = 'Monatlich';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Unzulässige Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Erlaubte Direktiven:';
?>
diff --git a/interface/web/sites/lib/lang/en_shell_user.lng b/interface/web/sites/lib/lang/en_shell_user.lng
index ef0aba0afb42b88bc92e8834848853adf97a9131..c15d1b56d441f5d91af5f98d85686da110e43add 100644
--- a/interface/web/sites/lib/lang/en_shell_user.lng
+++ b/interface/web/sites/lib/lang/en_shell_user.lng
@@ -26,4 +26,6 @@ $wb['generate_password_txt'] = 'Generate Password';
$wb['repeat_password_txt'] = 'Repeat Password';
$wb['password_mismatch_txt'] = 'The passwords do not match.';
$wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
?>
diff --git a/interface/web/sites/lib/lang/en_web_domain.lng b/interface/web/sites/lib/lang/en_web_domain.lng
index d7b3dcf427a8c48bb72b72c622cf76f892e7eb3e..f48953f4b759d284e2afc950ff169b373f0d2ca2 100644
--- a/interface/web/sites/lib/lang/en_web_domain.lng
+++ b/interface/web/sites/lib/lang/en_web_domain.lng
@@ -112,4 +112,11 @@ $wb['available_nginx_directive_snippets_txt'] = 'Available nginx Directive Snipp
$wb['proxy_directives_txt'] = 'Proxy Directives';
$wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
$wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
?>
\ No newline at end of file
diff --git a/interface/web/sites/list/aps_installedpackages.list.php b/interface/web/sites/list/aps_installedpackages.list.php
index 1751af7edb3dc0ba74e7279d59b418259f9cdeab..2340824a1ee6ccaa9c75c21d5e046b1546a44d22 100644
--- a/interface/web/sites/list/aps_installedpackages.list.php
+++ b/interface/web/sites/list/aps_installedpackages.list.php
@@ -1,83 +1,93 @@
- 'name',
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'op' => 'LIKE',
- 'prefix' => '%',
- 'suffix' => '%',
- 'width' => '',
- 'value' => '');
-
-$liste["item"][] = array('field' => 'version',
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'op' => 'like',
- 'prefix' => '%',
- 'suffix' => '%',
- 'width' => '',
- 'value' => '');
-
- /*
-$liste["item"][] = array('field' => 'customer_id',
- 'datatype' => 'INTEGER',
- 'formtype' => 'SELECT',
- 'op' => '=',
- 'prefix' => '',
- 'suffix' => '',
- 'width' => '',
- 'value' => '');
-*/
-
-$liste["item"][] = array('field' => 'instance_status',
- 'datatype' => 'VARCHAR',
- 'formtype' => 'SELECT',
- 'op' => '=',
- 'prefix' => '',
- 'suffix' => '',
- 'width' => '',
- 'value' => array(INSTANCE_INSTALL => $app->lng('Installation_task'),
- INSTANCE_ERROR => $app->lng('Installation_error'),
- INSTANCE_SUCCESS => $app->lng('Installation_success'),
- INSTANCE_REMOVE => $app->lng('Installation_remove')));
+ 'name',
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'op' => 'LIKE',
+ 'prefix' => '%',
+ 'suffix' => '%',
+ 'width' => '',
+ 'value' => '',
+ 'table' => 'aps_packages');
+
+$liste["item"][] = array('field' => 'version',
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'op' => 'like',
+ 'prefix' => '%',
+ 'suffix' => '%',
+ 'width' => '',
+ 'value' => '',
+ 'table' => 'aps_packages');
+
+ /*
+$liste["item"][] = array('field' => 'customer_id',
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'SELECT',
+ 'op' => '=',
+ 'prefix' => '',
+ 'suffix' => '',
+ 'width' => '',
+ 'value' => '');
+*/
+
+$liste["item"][] = array('field' => 'instance_status',
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'SELECT',
+ 'op' => '=',
+ 'prefix' => '',
+ 'suffix' => '',
+ 'width' => '',
+ 'value' => array(INSTANCE_INSTALL => $app->lng('Installation_task'),
+ INSTANCE_ERROR => $app->lng('Installation_error'),
+ INSTANCE_SUCCESS => $app->lng('Installation_success'),
+ INSTANCE_REMOVE => $app->lng('Installation_remove')),
+ 'table' => 'aps_instances');
?>
\ No newline at end of file
diff --git a/interface/web/sites/list/user_quota_stats.list.php b/interface/web/sites/list/user_quota_stats.list.php
index c3999c29d8b38c4c115654c78eed50b1d135b45a..646da2755e87439ca723d15b4b12b442f34ce56d 100644
--- a/interface/web/sites/list/user_quota_stats.list.php
+++ b/interface/web/sites/list/user_quota_stats.list.php
@@ -42,6 +42,9 @@ $liste["paging_tpl"] = "templates/paging.tpl.htm";
// Enable auth
$liste["auth"] = "yes";
+// mark columns for php sorting (no real mySQL columns)
+$liste["phpsort"] = array('used_sort', 'files');
+
/*****************************************************
* Suchfelder
diff --git a/interface/web/sites/shell_user_edit.php b/interface/web/sites/shell_user_edit.php
index 6939d4ad9cc29e35072e6bd047bd4315d0347cd9..b14963a307ef049706fa2e2edf092dd788c7c2de 100644
--- a/interface/web/sites/shell_user_edit.php
+++ b/interface/web/sites/shell_user_edit.php
@@ -121,7 +121,7 @@ class page_action extends tform_actions {
$blacklist = file(ISPC_LIB_PATH.'/shelluser_blacklist');
foreach($blacklist as $line) {
if(strtolower(trim($line)) == strtolower(trim($this->dataRecord['username']))){
- $app->tform->errorMessage .= 'The username is not allowed.';
+ $app->tform->errorMessage .= $app->tform->lng('username_not_allowed_txt');
}
}
unset($blacklist);
@@ -138,6 +138,8 @@ class page_action extends tform_actions {
$this->dataRecord['username_prefix'] = $shelluser_prefix;
/* restrict the names */
$this->dataRecord['username'] = $shelluser_prefix . $this->dataRecord['username'];
+
+ if(strlen($this->dataRecord['username']) > 32) $app->tform->errorMessage .= $app->tform->lng("username_must_not_exceed_32_chars_txt");
}
parent::onBeforeInsert();
}
@@ -166,7 +168,7 @@ class page_action extends tform_actions {
$blacklist = file(ISPC_LIB_PATH.'/shelluser_blacklist');
foreach($blacklist as $line) {
if(strtolower(trim($line)) == strtolower(trim($this->dataRecord['username']))){
- $app->tform->errorMessage .= 'The username is not allowed.';
+ $app->tform->errorMessage .= $app->tform->lng('username_not_allowed_txt');
}
}
unset($blacklist);
@@ -188,6 +190,8 @@ class page_action extends tform_actions {
/* restrict the names */
$this->dataRecord['username'] = $shelluser_prefix . $this->dataRecord['username'];
+
+ if(strlen($this->dataRecord['username']) > 32) $app->tform->errorMessage .= $app->tform->lng("username_must_not_exceed_32_chars_txt");
}
}
diff --git a/interface/web/sites/shell_user_list.php b/interface/web/sites/shell_user_list.php
index 3307d63d26c510142159cf0c478bea1dd3cef334..cba130c56dde5b01b2fe62b4acb6f74a4f0f8d4c 100644
--- a/interface/web/sites/shell_user_list.php
+++ b/interface/web/sites/shell_user_list.php
@@ -49,7 +49,7 @@ $app->uses('listform_actions');
// Limit the results to alias domains
//$app->listform_actions->SQLExtWhere = "type = 'subdomain'";
-$app->listform_actions->SQLOrderBy = 'ORDER BY username';
+$app->listform_actions->SQLOrderBy = 'ORDER BY shell_user.username';
$app->listform_actions->onLoad();
diff --git a/interface/web/sites/templates/database_edit.htm b/interface/web/sites/templates/database_edit.htm
index 8ef4ff29bae7b2174a3df5c444bc53cfdc945566..5da53db5be5899cde5a3d253644441fefe2aaa1d 100644
--- a/interface/web/sites/templates/database_edit.htm
+++ b/interface/web/sites/templates/database_edit.htm
@@ -77,7 +77,7 @@
{tmpl_var name='remote_ips_txt'}
-
+
{tmpl_var name='active_txt'}
diff --git a/interface/web/sites/templates/user_quota_stats_list.htm b/interface/web/sites/templates/user_quota_stats_list.htm
index e20b99123dd4cf0277487aaebcb5d94350349ccd..1403a01332ccf7c94a21fb20a26245f207f3a5cd 100644
--- a/interface/web/sites/templates/user_quota_stats_list.htm
+++ b/interface/web/sites/templates/user_quota_stats_list.htm
@@ -9,10 +9,10 @@
-
+
-
+
{tmpl_var name='search_limit'}
diff --git a/interface/web/sites/templates/web_domain_advanced.htm b/interface/web/sites/templates/web_domain_advanced.htm
index f612f28d289b95bbe0669327e8c5432665f8dfd3..5df608add91fe05c4f4470325d4bc27f0f310099 100644
--- a/interface/web/sites/templates/web_domain_advanced.htm
+++ b/interface/web/sites/templates/web_domain_advanced.htm
@@ -61,11 +61,11 @@
-
+
{tmpl_var name='php_open_basedir_txt'}
-
+
{tmpl_var name='custom_php_ini_txt'}
{tmpl_var name="available_php_directive_snippets_txt"} {tmpl_var name="php_directive_snippets_txt"}
@@ -143,6 +143,11 @@
jQuery('.phpfpm').show();
} else {
jQuery('.phpfpm').hide();
+ }
+ if(data.phptype == "no"){
+ jQuery('.php').hide();
+ } else {
+ jQuery('.php').show();
}
});
jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : webId, type : "getredirecttype"}, function(data) {
diff --git a/interface/web/sites/templates/web_domain_edit.htm b/interface/web/sites/templates/web_domain_edit.htm
index 25e91b1d72b2d3f2eab729c450f49e68ed886cb6..9a1062387af3a02aca38bb7bd25143e0856dfd1b 100644
--- a/interface/web/sites/templates/web_domain_edit.htm
+++ b/interface/web/sites/templates/web_domain_edit.htm
@@ -45,7 +45,7 @@
{tmpl_var name='ipv6_address_txt'}
-
+
{tmpl_var name='ipv6_address'}
diff --git a/interface/web/sites/templates/web_domain_redirect.htm b/interface/web/sites/templates/web_domain_redirect.htm
index 0f69395edf67fa7b13ff035d62cf3256e4cf5e8f..faff04441cd0e7681ea6d68362237b0cdafea953 100644
--- a/interface/web/sites/templates/web_domain_redirect.htm
+++ b/interface/web/sites/templates/web_domain_redirect.htm
@@ -20,6 +20,10 @@
{tmpl_var name='seo_redirect'}
+
+
+ {tmpl_var name='rewrite_rules_txt'}
+ {tmpl_var name="allowed_rewrite_rule_directives_txt"} break if return rewrite set
@@ -58,6 +62,7 @@
jQuery('#redirect_type option[value="R,L"]').hide();
jQuery('#redirect_type option[value="R=301,L"]').hide();
if(selected != "no" && selected != "" && selected != "last" && selected != "break" && selected != "redirect" && selected != "permanent" && selected != "proxy") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected');
+ jQuery('.nginx').show();
} else {
jQuery('#redirect_type option[value="last"]').attr('disabled','disabled');
jQuery('#redirect_type option[value="break"]').attr('disabled','disabled');
@@ -71,6 +76,7 @@
jQuery('#redirect_type option[value="permanent"]').hide();
jQuery('#redirect_type option[value="proxy"]').hide();
if(selected != "no" && selected != "" && selected != "R" && selected != "L" && selected != "R,L" && selected != "R=301,L") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected');
+ jQuery('.nginx').hide();
}
});
}
diff --git a/interface/web/sites/user_quota_stats.php b/interface/web/sites/user_quota_stats.php
index 56cc02c5dd2f45c3375557f1dae1639e4c89994c..32aa7066b24e7ad714483671bddbdbfafe20ee30 100644
--- a/interface/web/sites/user_quota_stats.php
+++ b/interface/web/sites/user_quota_stats.php
@@ -42,6 +42,7 @@ class list_action extends listform_actions {
$username = $rec['system_user'];
$rec['used'] = $monitor_data['user'][$username]['used'];
+ $rec['used_sort'] = $rec['used'];
$rec['soft'] = $monitor_data['user'][$username]['soft'];
$rec['hard'] = $monitor_data['user'][$username]['hard'];
$rec['files'] = $monitor_data['user'][$username]['files'];
@@ -95,8 +96,8 @@ class list_action extends listform_actions {
}
$list = new list_action;
-$list->SQLExtWhere = "type = 'vhost'";
-$list->SQLOrderBy = 'ORDER BY domain';
+$list->SQLExtWhere = "web_domain.type = 'vhost'";
+$list->SQLOrderBy = 'ORDER BY web_domain.domain';
$list->onLoad();
diff --git a/interface/web/sites/web_aliasdomain_list.php b/interface/web/sites/web_aliasdomain_list.php
index ef4a181ad47bc3c1781fab7ca2469236e33cd7b0..c5e63bed56c21aad5d241d2a4dc0d40bc9e47faf 100644
--- a/interface/web/sites/web_aliasdomain_list.php
+++ b/interface/web/sites/web_aliasdomain_list.php
@@ -47,8 +47,8 @@ $app->auth->check_module_permissions('sites');
$app->uses('listform_actions');
// Limit the results to alias domains
-$app->listform_actions->SQLExtWhere = "type = 'alias'";
-$app->listform_actions->SQLOrderBy = 'ORDER BY domain';
+$app->listform_actions->SQLExtWhere = "web_domain.type = 'alias'";
+$app->listform_actions->SQLOrderBy = 'ORDER BY web_domain.domain';
$app->listform_actions->onLoad();
diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php
index 11946aa0fd881c68cd323c63798111b80196b87c..5c0ec9a2d9c8fe6fe0f57ece8e9d3ec828a7d99d 100644
--- a/interface/web/sites/web_domain_edit.php
+++ b/interface/web/sites/web_domain_edit.php
@@ -171,7 +171,7 @@ 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.client_id, client.limit_web_domain, client.default_webserver, client.contact_name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname, sys_group.name, client." . implode(", client.", $read_limits) . " 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, client.limit_web_domain, client.default_webserver, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
//* Get global web config
$web_config = $app->getconf->get_server_config($client['default_webserver'], 'web');
@@ -182,15 +182,15 @@ class page_action extends tform_actions {
unset($tmp);
// Fill the client select field
- $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
+ $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
$records = $app->db->queryAllRecords($sql);
$tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$client['client_id']);
- $client_select = ''.$client['name'].' :: '.$client['contactname'].' ';
+ $client_select = ''.$client['contactname'].' ';
//$tmp_data_record = $app->tform->getDataRecord($this->id);
if(is_array($records)) {
foreach( $records as $rec) {
$selected = @(is_array($this->dataRecord) && ($rec["groupid"] == $this->dataRecord['client_group_id'] || $rec["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
- $client_select .= "$rec[name] :: $rec[contactname] \r\n";
+ $client_select .= "$rec[contactname] \r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
@@ -377,7 +377,7 @@ class page_action extends tform_actions {
unset($php_records);
// Fill the client select field
- $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
+ $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
$clients = $app->db->queryAllRecords($sql);
$client_select = " ";
//$tmp_data_record = $app->tform->getDataRecord($this->id);
@@ -385,7 +385,7 @@ class page_action extends tform_actions {
foreach( $clients as $client) {
//$selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':'';
$selected = @(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
- $client_select .= "$client[name] :: $client[contactname] \r\n";
+ $client_select .= "$client[contactname] \r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
@@ -661,7 +661,15 @@ class page_action extends tform_actions {
//* get the server config for this server
$app->uses("getconf");
- $web_config = $app->getconf->get_server_config($app->functions->intval(isset($this->dataRecord["server_id"]) ? $this->dataRecord["server_id"] : 0),'web');
+ if($this->id > 0){
+ $web_rec = $app->tform->getDataRecord($this->id);
+ $server_id = $web_rec["server_id"];
+ } else {
+ // Get the first server ID
+ $tmp = $app->db->queryOneRecord("SELECT server_id FROM server WHERE web_server = 1 ORDER BY server_name LIMIT 0,1");
+ $server_id = intval($tmp['server_id']);
+ }
+ $web_config = $app->getconf->get_server_config($app->functions->intval(isset($this->dataRecord["server_id"]) ? $this->dataRecord["server_id"] : $server_id),'web');
//* Check for duplicate ssl certs per IP if SNI is disabled
if(isset($this->dataRecord['ssl']) && $this->dataRecord['ssl'] == 'y' && $web_config['enable_sni'] != 'y') {
$sql = "SELECT count(domain_id) as number FROM web_domain WHERE `ssl` = 'y' AND ip_address = '".$app->db->quote($this->dataRecord['ip_address'])."' and domain_id != ".$this->id;
@@ -677,6 +685,59 @@ class page_action extends tform_actions {
$app->tform->errorMessage .= $app->tform->lng("error_php_fpm_pm_settings_txt").' ';
}
}
+
+ // Check rewrite rules
+ $server_type = $web_config['server_type'];
+
+ if($server_type == 'nginx' && isset($this->dataRecord['rewrite_rules']) && trim($this->dataRecord['rewrite_rules']) != '') {
+ $rewrite_rules = trim($this->dataRecord['rewrite_rules']);
+ $rewrites_are_valid = true;
+ // use this counter to make sure all curly brackets are properly closed
+ $if_level = 0;
+ // Make sure we only have Unix linebreaks
+ $rewrite_rules = str_replace("\r\n", "\n", $rewrite_rules);
+ $rewrite_rules = str_replace("\r", "\n", $rewrite_rules);
+ $rewrite_rule_lines = explode("\n", $rewrite_rules);
+ if(is_array($rewrite_rule_lines) && !empty($rewrite_rule_lines)){
+ foreach($rewrite_rule_lines as $rewrite_rule_line){
+ // rewrite
+ if(preg_match('@^\s*rewrite\s+(^/)?\S+(\$)?\s+\S+(\s+(last|break|redirect|permanent|))?\s*;\s*$@', $rewrite_rule_line)) continue;
+ // if
+ if(preg_match('@^\s*if\s+\(\s*\$\S+(\s+(\!?(=|~|~\*))\s+(\S+|\".+\"))?\s*\)\s*\{\s*$@', $rewrite_rule_line)){
+ $if_level += 1;
+ continue;
+ }
+ // if - check for files, directories, etc.
+ if(preg_match('@^\s*if\s+\(\s*\!?-(f|d|e|x)\s+\S+\s*\)\s*\{\s*$@', $rewrite_rule_line)){
+ $if_level += 1;
+ continue;
+ }
+ // break
+ if(preg_match('@^\s*break\s*;\s*$@', $rewrite_rule_line)){
+ $if_level += 1;
+ continue;
+ }
+ // return code [ text ]
+ if(preg_match('@^\s*return\s+\d\d\d.*;\s*$@', $rewrite_rule_line)) continue;
+ // return code URL
+ // return URL
+ if(preg_match('@^\s*return(\s+\d\d\d)?\s+(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*\@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&%\$#\=~_\-]+))*\s*;\s*$@', $rewrite_rule_line)) continue;
+ // set
+ if(preg_match('@^\s*set\s+\$\S+\s+\S+\s*;\s*$@', $rewrite_rule_line)) continue;
+ // closing curly bracket
+ if(trim($rewrite_rule_line) == '}'){
+ $if_level -= 1;
+ continue;
+ }
+ $rewrites_are_valid = false;
+ break;
+ }
+ }
+
+ if(!$rewrites_are_valid || $if_level != 0){
+ $app->tform->errorMessage .= $app->tform->lng("invalid_rewrite_rules_txt").' ';
+ }
+ }
parent::onSubmit();
}
diff --git a/interface/web/sites/web_domain_list.php b/interface/web/sites/web_domain_list.php
index feae9c88966212593bfe027a3ded097416eba30e..d9c50669ad35aeabd257932af58df75b6b13473f 100644
--- a/interface/web/sites/web_domain_list.php
+++ b/interface/web/sites/web_domain_list.php
@@ -52,8 +52,8 @@ class list_action extends listform_actions {
}
$list = new list_action;
-$list->SQLExtWhere = "type = 'vhost' AND parent_domain_id = '0'";
-$list->SQLOrderBy = 'ORDER BY domain';
+$list->SQLExtWhere = "web_domain.type = 'vhost' AND web_domain.parent_domain_id = '0'";
+$list->SQLOrderBy = 'ORDER BY web_domain.domain';
$list->onLoad();
?>
\ No newline at end of file
diff --git a/interface/web/sites/web_sites_stats.php b/interface/web/sites/web_sites_stats.php
index 3a010691d57ea458f7e2af52ec2fe91304fd341e..6249b68130c862714be67f9f6c9a714e7eab7fac 100644
--- a/interface/web/sites/web_sites_stats.php
+++ b/interface/web/sites/web_sites_stats.php
@@ -79,11 +79,97 @@ class list_action extends listform_actions {
$app->tpl_defaults();
$app->tpl->pparse();
}
+
+ function getQueryString() {
+ global $app;
+ $sql_where = '';
+
+ //* Generate the search sql
+ if($app->listform->listDef['auth'] != 'no') {
+ if($_SESSION['s']['user']['typ'] == "admin") {
+ $sql_where = '';
+ } else {
+ $sql_where = $app->tform->getAuthSQL('r', $app->listform->listDef['table']).' and';
+ //$sql_where = $app->tform->getAuthSQL('r').' and';
+ }
+ }
+ if($this->SQLExtWhere != '') {
+ $sql_where .= ' '.$this->SQLExtWhere.' and';
+ }
+
+ $sql_where = $app->listform->getSearchSQL($sql_where);
+ if($app->listform->listDef['join_sql']) $sql_where .= ' AND '.$app->listform->listDef['join_sql'];
+ $app->tpl->setVar($app->listform->searchValues);
+
+ $order_by_sql = $this->SQLOrderBy;
+
+ //* Generate SQL for paging
+ $limit_sql = $app->listform->getPagingSQL($sql_where);
+ $app->tpl->setVar('paging',$app->listform->pagingHTML);
+
+ $extselect = '';
+ $join = '';
+
+ if(!empty($_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order'])){
+ $order = str_replace(' DESC','',$_SESSION['search'][$_SESSION['s']['module']['name'].$app->listform->listDef["name"].$app->listform->listDef['table']]['order']);
+ list($tmp_table, $order) = explode('.', $order);
+ if($order == 'web_traffic_last_month'){
+ $tmp_year = date('Y',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
+ $tmp_month = date('m',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
+ $extselect .= ', SUM(wt.traffic_bytes) as calctraffic';
+ $join .= ' INNER JOIN web_traffic as wt ON '.$app->listform->listDef['table'].'.domain = wt.hostname ';
+ $sql_where .= " AND YEAR(wt.traffic_date) = '$tmp_year' AND MONTH(wt.traffic_date) = '$tmp_month'";
+ $order_by_sql = str_replace($app->listform->listDef['table'].'.web_traffic_last_month','calctraffic',$order_by_sql);
+ $order_by_sql = "GROUP BY domain ".$order_by_sql;
+ } elseif($order == 'web_traffic_this_month'){
+ $tmp_year = date('Y');
+ $tmp_month = date('m');
+ $extselect .= ', SUM(wt.traffic_bytes) as calctraffic';
+ $join .= ' INNER JOIN web_traffic as wt ON '.$app->listform->listDef['table'].'.domain = wt.hostname ';
+ $sql_where .= " AND YEAR(wt.traffic_date) = '$tmp_year' AND MONTH(wt.traffic_date) = '$tmp_month'";
+ $order_by_sql = str_replace($app->listform->listDef['table'].'.web_traffic_this_month','calctraffic',$order_by_sql);
+ $order_by_sql = "GROUP BY domain ".$order_by_sql;
+ } elseif($order == 'web_traffic_last_year'){
+ $tmp_year = date('Y',mktime(0, 0, 0, date("m")-1, date("d"), date("Y")));
+ $extselect .= ', SUM(wt.traffic_bytes) as calctraffic';
+ $join .= ' INNER JOIN web_traffic as wt ON '.$app->listform->listDef['table'].'.domain = wt.hostname ';
+ $sql_where .= " AND YEAR(wt.traffic_date) = '$tmp_year'";
+ $order_by_sql = str_replace($app->listform->listDef['table'].'.web_traffic_last_year','calctraffic',$order_by_sql);
+ $order_by_sql = "GROUP BY domain ".$order_by_sql;
+ } elseif($order == 'web_traffic_this_year'){
+ $tmp_year = date('Y');
+ $extselect .= ', SUM(wt.traffic_bytes) as calctraffic';
+ $join .= ' INNER JOIN web_traffic as wt ON '.$app->listform->listDef['table'].'.domain = wt.hostname ';
+ $sql_where .= " AND YEAR(wt.traffic_date) = '$tmp_year'";
+ $order_by_sql = str_replace($app->listform->listDef['table'].'.web_traffic_this_year','calctraffic',$order_by_sql);
+ $order_by_sql = "GROUP BY domain ".$order_by_sql;
+ }
+ }
+
+ if($this->SQLExtSelect != '') {
+ if(substr($this->SQLExtSelect,0,1) != ',') $this->SQLExtSelect = ','.$this->SQLExtSelect;
+ $extselect .= $this->SQLExtSelect;
+ }
+
+ $table_selects = array();
+ $table_selects[] = trim($app->listform->listDef['table']).'.*';
+ $app->listform->listDef['additional_tables'] = trim($app->listform->listDef['additional_tables']);
+ if($app->listform->listDef['additional_tables'] != ''){
+ $additional_tables = explode(',', $app->listform->listDef['additional_tables']);
+ foreach($additional_tables as $additional_table){
+ $table_selects[] = trim($additional_table).'.*';
+ }
+ }
+ $select = implode(', ', $table_selects);
+
+ $sql = 'SELECT '.$select.$extselect.' FROM '.$app->listform->listDef['table'].($app->listform->listDef['additional_tables'] != ''? ','.$app->listform->listDef['additional_tables'] : '')."$join WHERE $sql_where $order_by_sql $limit_sql";
+ return $sql;
+ }
}
$list = new list_action;
-$list->SQLExtWhere = "(type = 'vhost' or type = 'vhostsubdomain')";
-$list->SQLOrderBy = 'ORDER BY domain';
+$list->SQLExtWhere = "(web_domain.type = 'vhost' or web_domain.type = 'vhostsubdomain')";
+$list->SQLOrderBy = 'ORDER BY web_domain.domain';
$list->onLoad();
diff --git a/interface/web/sites/web_subdomain_list.php b/interface/web/sites/web_subdomain_list.php
index f5feaf7cf53dc22b2a605608e97e4b02785c451b..f14d7b39c938eeafc22b5026f6e6f4554575a264 100644
--- a/interface/web/sites/web_subdomain_list.php
+++ b/interface/web/sites/web_subdomain_list.php
@@ -47,8 +47,8 @@ $app->auth->check_module_permissions('sites');
$app->uses('listform_actions');
// Limit the results to alias domains
-$app->listform_actions->SQLExtWhere = "type = 'subdomain'";
-$app->listform_actions->SQLOrderBy = 'ORDER BY domain';
+$app->listform_actions->SQLExtWhere = "web_domain.type = 'subdomain'";
+$app->listform_actions->SQLOrderBy = 'ORDER BY web_domain.domain';
$app->listform_actions->onLoad();
diff --git a/interface/web/sites/web_vhost_subdomain_edit.php b/interface/web/sites/web_vhost_subdomain_edit.php
index c9bdd2787644cdef247197e5b61d7597283ce56b..656a7dd3d122dc8286d559c9465d06b921b4d8f6 100644
--- a/interface/web/sites/web_vhost_subdomain_edit.php
+++ b/interface/web/sites/web_vhost_subdomain_edit.php
@@ -131,7 +131,7 @@ 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.client_id, client.limit_web_subdomain, client.default_webserver, client.contact_name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname, sys_group.name, client." . implode(", client.", $read_limits) . " 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, client.limit_web_subdomain, client.default_webserver, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
//* Get global web config
$web_config = $app->getconf->get_server_config($parent_domain['server_id'], 'web');
diff --git a/interface/web/sites/web_vhost_subdomain_list.php b/interface/web/sites/web_vhost_subdomain_list.php
index 8c483399f9ae2abebe2baceb30052c812a056fff..0677a939fc7cc03113eb7d5414bd34cd8c2afec6 100644
--- a/interface/web/sites/web_vhost_subdomain_list.php
+++ b/interface/web/sites/web_vhost_subdomain_list.php
@@ -47,8 +47,8 @@ $app->auth->check_module_permissions('sites');
$app->uses('listform_actions');
// Limit the results to alias domains
-$app->listform_actions->SQLExtWhere = "type = 'vhostsubdomain'";
-$app->listform_actions->SQLOrderBy = 'ORDER BY domain';
+$app->listform_actions->SQLExtWhere = "web_domain.type = 'vhostsubdomain'";
+$app->listform_actions->SQLOrderBy = 'ORDER BY web_domain.domain';
$app->listform_actions->onLoad();
diff --git a/interface/web/sites/webdav_user_list.php b/interface/web/sites/webdav_user_list.php
index cc4532c09c6926ae4f2deaf21da6e37fedd5655d..b94157c7c40711411c766a75716f69f7243f91b6 100644
--- a/interface/web/sites/webdav_user_list.php
+++ b/interface/web/sites/webdav_user_list.php
@@ -44,7 +44,7 @@ $list_def_file = "list/webdav_user.list.php";
$app->auth->check_module_permissions('sites');
$app->uses('listform_actions');
-$app->listform_actions->SQLOrderBy = 'ORDER BY username';
+$app->listform_actions->SQLOrderBy = 'ORDER BY webdav_user.username';
$app->listform_actions->onLoad();
diff --git a/interface/web/themes/default/css/styles.css b/interface/web/themes/default/css/styles.css
index b8de0844e97fadd9a584311ae45c7e3c846f6135..c937f96de0e804557e31a5adef9d334fc685e555 100644
--- a/interface/web/themes/default/css/styles.css
+++ b/interface/web/themes/default/css/styles.css
@@ -1,1843 +1,1866 @@
-@charset "UTF-8";
-/*
- Document : styles.css
- Created on : 06.07.2012, 12:21:59
- Author : Christian Foellmann (foe-services.de)
- Description:
- Basis was css-code from the "ISPConfig 3: default theme" which was based on
- "Yet Another Multicolumn Layout" - (X)HTML/CSS Framework 3.0.6
- by Copyright 2005-2008, Dirk Jesse (http://www.yaml.de)
-*/
-
-/* overall
--------------------------------------------------------------- */
-* {
- margin: 0;
- padding: 0;
-}
-html * { font-size: 100.01% }
-body {
- font-family: "Trebuchet MS", sans-serif;
- font-size: 75.00%;
- color: #444;
- background: url("../images/screen_bg.png") repeat-x top left fixed #EEEEEE;
- padding: 10px 0;
-}
-ul, ol, dl { line-height: 1.5em; margin: 0 0 1em 1em }
-li { margin-left: 1.5em; line-height: 1.5em }
-dt { font-weight: bold }
-dd { margin: 0 0 1em 2em }
-a {
- color: #4D87C7;
- text-decoration:none;
-}
-a:focus,
-a:hover,
-a:active {
- color:#182E7A;
- text-decoration:underline;
-}
-hr {
- color: #fff;
- background:transparent;
- margin: 0 0 0.5em 0;
- padding: 0 0 0.5em 0;
- border:0;
- border-bottom: 1px #eee solid;
-}
-textarea, pre, tt, code {
- font-family: Consolas,"Lucida Console","Courier New",monospace;
- font-size: 0.9em;
-}
-
-h1,h2,h3,h4,h5,h6 {
- font-family: "Trebuchet MS", sans-serif;
- font-weight:bold;
- color:#666;
- margin: 0 0 0.25em 0;
-}
-h1 { font-size: 200% } /* 24px */
-h2 { font-size: 200% } /* 24px */
-h3 { font-size: 150% } /* 18px */
-h4 { font-size: 133.33% } /* 16px */
-h5 { font-size: 116.67% } /* 14px */
-h6 { font-size: 116.67%; font-style:italic } /* 14px */
-
-p { line-height: 1.5em; margin: 0 0 1em 0; }
-
-cite, blockquote { font-style:italic }
-blockquote { margin: 0 0 1em 1.5em }
-
-strong,b { font-weight: bold }
-em,i { font-style:italic }
-
-pre, code { font-family: monospace; font-size: 1.1em; }
-
-acronym, abbr {
- letter-spacing: .07em;
- border-bottom: .1em dashed #c00;
- cursor: help;
-}
-
-header, #nav, #main, footer {
- clear: both;
-}
-#page {
- min-width: 980px;
- max-width: 80%;
- background: #fff;
- text-align:left;
- margin: 0 auto;
- padding: 10px;
-}
-.skip, .hideme, .print {
- height: 1px;
- left: -1000em;
- position: absolute;
- top: -1000em;
- width: 1px;
-}
-
-/* header
--------------------------------------------------------------- */
-header {
- position: relative;
- color: #faf0e6;
- padding: 15px 2em 5px 20px;
- background: url("../images/header_bg.png") repeat-x top left #9a9a9a;
-}
-header h1 {
- font-size:2.5em;
- letter-spacing:-2px;
- line-height:65%;
- color: silver;
-}
-header span {
- color: #333333;
-}
-
-/* header/topsubnav
--------------------------------------------------------------- */
-#topsubnav {
- position:absolute;
- top: 10px;
- right: 10px;
- text-align: right;
-}
-#topsubnav a {
- color: #f0f8ff;
- font-weight: normal;
- background:transparent;
- text-decoration:none;
-}
-#topsubnav a:focus,
-#topsubnav a:hover,
-#topsubnav a:active {
- text-decoration:underline;
- background-color: transparent;
-}
-
-/* nav
--------------------------------------------------------------- */
-#topNav ul {
- list-style: none;
- padding: 0 0 0 20px;
- margin: 0;
- background: #9a9a9a
-}
-
-#topNav ul li {
- display: inline;
- margin: 0 2px 0 0;
-}
-
-#topNav a {
- background: url("../icons/x32_sprite.png") no-repeat #D3D3D3;
- color:black;
- display:inline-block;
- height:20px;
- padding-top:37px;
- text-align:center;
- text-decoration:none;
- min-width:78px;
-}
-
-#topNav a:hover {
- background-color: #eeeeee;
- color: #000000;
-}
-
-#topNav #topNav_current a {
- font-weight: bold;
- color: black;
- background-color: #ffffff;
-}
-.topnav-tools { background-position: 22px -10px !important; }
-.topnav-admin { background-position: 22px -74px !important; }
-.topnav-sites { background-position: 22px -523px !important; }
-.topnav-monitor { background-position: 22px -585px !important; }
-.topnav- { background-position: 22px -650px !important; }
-.topnav-help { background-position: 22px -715px !important; }
-.topnav-mail { background-position: 22px -780px !important; }
-.topnav-mailuser { background-position: 22px -780px !important; }
-.topnav-vm { background-position: 22px -842px !important; }
-.topnav-domain { background-position: 22px -905px !important; }
-.topnav-dns { background-position: 22px -970px !important; }
-.topnav-dashboard { background-position: 22px -1035px !important; }
-.topnav-client { background-position: 22px -1098px !important; }
-.topnav-billing { background-position: 22px -1162px !important; }
-#topNav a span {
- padding: 0 3px;
- }
-/* main
--------------------------------------------------------------- */
-#main {
- background: #fff;
- padding: 1em 0;
-}
-
-/* main/sideNav + submenu
--------------------------------------------------------------- */
-#sideNav {
- width: 200px;
- float:left;
- padding: 0 10px 0 0;
-}
-
-#submenu {
- width: 100%;
- overflow: hidden;
- margin: 0px;
- list-style-type: none;
- border-bottom: 2px #ddd solid;
-}
-
-#submenu ul {
- list-style-type: none;
- margin:0;
- padding: 0;
-}
-#submenu li {
- float:left;
- width: 100%;
- margin:0;
- padding: 0;
- font-size:0.9em;
-}
-
-#submenu a,
-#submenu strong {
- display:block;
- width: 90%;
- padding: 2px 0px 2px 10%;
- text-decoration: none;
- background-color:#fff;
- color: #444;
- border-bottom: 1px #eee solid;
-}
-
-/* Menu Title */
-#submenu li.title {
- width: 100%;
- padding: 0px;
- font-weight: bold;
- color: #444;
- background-color: #fff;
- border-top: 2px #888 solid;
- font-size: 1.1em;
-}
-
-#submenu li.title a {
- background-color: #f0f8ff;
- color: #444;
-}
-#submenu li.title a:hover {
- color: white;
-}
-
-#submenu li span {
- display:block;
- width: 90%;
- padding: 3px 0px 3px 10%;
- font-weight: bold;
- border-bottom: 1px #ddd solid;
-}
-
-/* Level 1 */
-#submenu li.active,
-#submenu li strong {
- width: 90%;
- padding: 3px 0px 3px 10%;
- font-weight: bold;
- color: #fff;
- background-color:#aab;
- border-bottom: 1px #eee solid;
-}
-
-#submenu li a {
- width: 90%;
- padding-left: 10%;
- background-color:#fff;
- color: #444;
-}
-#submenu li a:focus,
-#submenu li a:hover,
-#submenu li a:active {
- background-color:#f63;
- color: #fff;
-}
-
-/* Form-Elements in the Menu*/
-#submenu * select#server_id {
- margin: 3px 10%;
- padding: 1px;
- width: 80%;
-}
-
-/* main/content
--------------------------------------------------------------- */
-#content {
- margin-left: 200px;
- margin-right: 0;
- padding: 0px 10px 10px 20px;
- border-left: 1px #ddd solid;
-}
-
-/* footer
--------------------------------------------------------------- */
-
-footer {
- color:#666;
- background: #f9f9f9;
- padding: 10px 20px;
- border-top: 5px #efefef solid;
- font-size: 0.8em;
- text-align: center;
-}
-footer a {
- color: #999;
- background:transparent;
- font-weight: bold;
-}
-footer a:hover, footer a:active {
- color: #4D87C7;
- background-color: transparent;
- text-decoration:underline;
-}
-
-/* Set a background-color, no system backgorund used anymore */
-select, input, textarea {
- background: #FFFFFF;
- border: 1px solid #DFDFDF;
- padding: 1px;
- outline:none;
-}
-
-table { width: auto; border-collapse:collapse; margin-bottom: 0.5em; }
-table.full { width: 100%; }
-table.fixed { table-layout:fixed }
-
-table.list td {
- max-width: 350px;
- min-width: 32px;
- white-space: nowrap;
- overflow:hidden;
- text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
- -icab-text-overflow: ellipsis;
- -khtml-text-overflow: ellipsis;
- -moz-text-overflow: ellipsis;
- -webkit-text-overflow: ellipsis;
-}
-th,
-td {
- padding: 0.5em;
- text-align:left;
-}
-thead th {
- background: #444 url("../images/lists_thead_bg.png") repeat-x;
- color: #fff;
-}
-tbody th {
- background: #ccc;
- color: #333;
-}
-tbody th.sub {
- background: #ddd;
- color: #333;
-}
-table.list th[class$="_pid"],
-table.list td[class$="_pid"],
-table.list th[class$="_active"],
-table.list td[class$="_active"],
-table.list th.tbl_col_autoresponder,
-table.list td.tbl_col_autoresponder {
- width: 70px;
- text-align: center;
-}
-table.list .tbl_col_buttons,
-table.list .tbl_col_limit {
- width: 150px;
-}
-.tbl_col_client_pid input {
- width: 50px;
-}
-.pnl_listarea th[class^="tbl_col"] { cursor:pointer; }
-.pnl_listarea th[class^="tbl_col"]:hover { background-position:0 -15px!important; }
-.pnl_listarea th.tbl_col_nosort { cursor:default; }
-.pnl_listarea th.tbl_col_nosort:hover { background-position:0 0!important; }
-
-.pageForm_description { font-size: 12px; }
-
-/* Tab-Box */
-.tabbox_tabs { border-bottom: 1px solid #d3d3d3; }
-.tabbox_tabs ul {
- list-style: none;
- padding: 0;
- margin: 0;
-}
-.tabbox_tabs li {
- display: inline;
- margin: 0 2px 0 0;
-}
-.tabbox_tabs a {
- padding: 0 1em;
- text-decoration: none;
- color: black;
- background: #d3d3d3;
- border: 1px solid #d3d3d3;
-}
-.tabbox_tabs a:hover {
- background: #fc0;
- color: #540;
-}
-.tabbox_tabs .active a {
- font-weight: bold;
- color: #ff6600;
- background: #ffffff;
-}
-.pnl_toolsarea fieldset, .pnl_listarea fieldset, .pnl_formsarea fieldset {
- border-top: 1px solid #949494;
- margin: 20px 0;
-}
-.pnl_toolsarea fieldset legend , .pnl_listarea fieldset legend {
- font-weight: bold;
- color: #6299c5;
-}
-.pnl_formarea fieldset {
- font-weight: bold;
-}
-/* hide line and legend when inside tabbed content */
-#tabbox_content * .pnl_toolsarea fieldset, #tabbox_content * .pnl_listarea fieldset, #tabbox_content * .pnl_formsarea fieldset { border: none !important; }
-#tabbox_content * .pnl_toolsarea fieldset legend, #tabbox_content * .pnl_listarea fieldset legend, #tabbox_content * .pnl_formsarea fieldset legend { display: none !important; }
-.codeview {
- margin:20px 0;
- padding:2px;
- border: 1px solid #ffcc00;
- background: #fffaea;
- font-family: Consolas, "Lucida Console", "Courier New", monospace;
- font-size: 0.9em;
-}
-.codeview .logerror { background: rgb(255,0,0); }
-.codeview .logwarn { background: rgb(255,204,0); }
-.codeview .loginfo { background: rgb(153,204,255); }
-/* Lists */
-table.list {
- width: 100%;
- border: 1px solid #d3d3d3 !important;
-}
-table.list thead th { font-size: 10px; }
-table.list tbody { border: 1px solid #d3d3d3 !important; }
-table.list tfoot td { text-align: center; background: #f8f8f8 url("../images/lists_tfoot_bg.png") repeat-x bottom left; padding: 24px 8px 8px 8px; }
-table.list .tbl_paging img { vertical-align: top; }
-table.list .tbl_row_even { background: #fcfcfc; }
-table.list .tbl_row_uneven { background: #f0f8ff; }
-table.list tr:hover { background: #fffacd; }
-table.list td { word-wrap:break-word;white-space:pre-wrap; }
-table.list td.tbl_col_buttons { word-wrap:normal;white-space:normal;overflow:visible; }
-
-/* Password Strength */
-#passBar {
- width: 101px; height: 10px;
- background: url("../images/meter_bg.gif") repeat-x bottom left;
- margin: 2px 0;
- float: left;
-}
-#passText {
- padding: 0;
- float: left;
-}
-
-/* Systemmonitor */
-.systemmonitor-server,
-.systemmonitor-ve,
-.systemmonitor-state {
- margin: 10px 5px;
- font-family: Consolas, "Lucida Console", "Courier New", monospace;
- font-size: 0.9em;
- float: left;
- width: 100%;
-}
-.systemmonitor-server:hover,
-.systemmonitor-vm:hover { background-color: #FFFACD; }
-.state-no_state,
-.state-no_state-ve {
- border-top: 4px solid #95A19F;
- background-color: #f8f8ff;
-}
-.state-unknown,
-.state-unknown-ve {
- border-top: 4px solid #30302e;
- background-color: #cecfc5;
-}
-.state-ok,
-.state-ok-ve {
- border-top: 4px solid #23fb00;
- background-color: #adffa2;
-}
-.state-info,
-.state-info-ve {
- border-top: 4px solid #183e99;
- background-color: #d4e2ff;
-}
-.state-warning,
-.state-warning-ve {
- border-top: 4px solid #ffa800;
- background-color: #ffda93;
-}
-.state-critical,
-.state-critical-ve {
- border-top: 4px solid #ff0000;
- background-color: #ffb9b9;
-}
-.state-error,
-.state-error-ve {
- border-top: 4px solid #ff0000;
- background-color: #ff7f7f;
-}
-div.icoDevice {
- float: left;
- width: 64px;
- height: 64px;
- margin: 5px;
- background: url("../icons/device_sprite.png") no-repeat transparent;
-}
-.systemmonitor-server div.icoDevice { background-position: 0 0; }
-.systemmonitor-ve div.icoDevice { background-position: -64px 0; }
-.systemmonitor-network div.icoDevice { background-position: -128px 0; }
-div.statusDevice,
-div.statusMsg { float: left; }
-div.statusMsg p {
- float: left;
- padding: 5px;
-}
-.systemmonitor-state .status {
- margin: 5px;
-}
-.status {
- float: right;
- width: 32px;
- height: 32px;
- background: url("../icons/x32_sprite.png") no-repeat transparent;
-}
-div.status {
- float: left !important;
-}
-.state-warning .status,
-.state-warning-ve .status { background-position: 0 -143px; }
-.state-no_state .status,
-.state-no_state-ve .status,
-.state-unknown .status,
-.state-unknown-ve .status { background-position: 0 -207px; }
-.state-ok .status,
-.state-ok-ve .status { background-position: 0 -270px; }
-.state-info .status,
-.state-info-ve .status { background-position: 0 -336px; }
-.state-error .status,
-.state-error-ve .status { background-position: 0 -400px; }
-.state-critical .status,
-.state-critical-ve .status { background-position: 0 -463px; }
-
-/* Usage unknown
-.systemmonitor-content table {
- border: none;
- margin-top: 10px;
-}
-
-.systemmonitor-content * .online {
- border: 1px solid #ffffff;
- background-color: #E3FFB8;
- color: #000000;
- padding:0px 5px;
-}
-.systemmonitor-content * .offline {
- border: 1px solid #ffffff;
- background-color: #d12f19;
- color:#ffffff;
- padding:0px 5px;
-}*/
-
-/* Dashboard */
-.dashboard-modules {
- float:left;
- width:60px;
- height: 60px;
- border:1px dotted #888888;
- background-color: #cccccc;
- margin:10px;
- background-position: center 5px;
- background-repeat: no-repeat;
- text-align: center;
-}
-.dashboard-modules a,
-.dashboard-modules a:hover {
- background: url("../icons/x32_sprite.png") no-repeat transparent;
- color:Black;
- display:block;
- font-weight:bold;
- height:30px;
- padding-top:42px;
- width:60px;
- text-decoration: none;
-}
-.dashboard-modules.tools a { background-position: 12px -9px; }
-.dashboard-modules.admin a { background-position: 12px -73px; }
-.dashboard-modules.sites a { background-position: 12px -520px; }
-.dashboard-modules.monitor a { background-position: 13px -585px; }
-.dashboard-modules.help a { background-position: 13px -716px; }
-.dashboard-modules.mail a { background-position: 12px -776px; }
-.dashboard-modules.vm a { background-position: 14px -842px; }
-.dashboard-modules.domain a { background-position: 12px -905px; }
-.dashboard-modules.dns a { background-position: 12px -970px; }
-.dashboard-modules.client a { background-position: 13px -1096px; }
-.dashboard-modules.billing a { background-position: 14px -1162px; }
-
-.panel_dashboard h2 { font-size:20px; }
-
-/* Image-Replacement */
-.swap { background-repeat:no-repeat; }
-.swap span { display:none; height:16px; }
-#ir-HeaderLogo {
- background-image: url("../images/header_logo.png");
- height:32px;
- margin:0 0 0.2em;
-}
-div#ir-Yes,
-div#ir-No {
- text-align: center;
- background: url("../icons/x16_sprite.png") no-repeat transparent;
-}
-#ir-Yes {
- background-position: center -342px !important;
- height: 16px;
-}
-#ir-No {
- background-position: center -362px !important;
- height: 16px;
-}
-.swap {
- background-repeat: no-repeat;
-}
-.swap span {
- display: none;
- height: 16px;
-}
-/* BUTTONS */
-a.button,
-.button,
-.buttons button {
- display: inline-block;
- margin: 0 2px;
- padding: 2px 5px;
- color: #525252;
- text-shadow: 0px 1px 1px #fff;
- border: 1px solid #c6c6c6;
- border-radius: 4px;
- background-color: #f7f7f7;
- box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3);
- -o-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3);
- -webkit-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3);
- -moz-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3);
- text-decoration: none;
-}
-a.button:focus,
-input.button:focus,
-.buttons button:focus {
- border-color: #4fadd5;
- box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
- -moz-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
- -webkit-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
- -o-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
- outline: none;
-}
-.buttons button[type]{
- padding:5px 10px 5px 7px; /* Firefox */
- line-height:17px; /* Safari */
- white-space: nowrap;
-}
-*:first-child+html button[type]{
- padding:4px 10px 3px 7px; /* IE7 */
-}
-.buttons button img,
-.buttons a img {
- margin:0 3px -3px 0 !important;
- padding:0;
- border:none;
- width:16px;
- height:16px;
-}
-.topbuttons {
- margin-bottom: 10px;
-}
-/* BUTTONS STANDARD */
-button:hover,
-.buttons a:hover {
- background-color:#dff4ff;
- border:1px solid #c2e1ef;
- color:#336699;
-}
-.buttons a:active {
- background-color:#6299c5;
- border:1px solid #6299c5;
- color:#fff;
-}
-
-/* BUTTONS POSITIVE */
-button.positive,
-.buttons a.positive { color:#529214; }
-.buttons a.positive:hover,
-button.positive:hover {
- background-color:#E6EFC2;
- border:1px solid #C6D880;
- color:#529214;
-}
-.buttons a.positive:active {
- background-color:#529214;
- border:1px solid #529214;
- color:#fff;
-}
-
-/* BUTTONS NEGATIVE */
-.buttons a.negative,
-button.negative {
- color:#d12f19;
-}
-.buttons a.negative:hover,
-button.negative:hover {
- background-color:#fbe3e4;
- border:1px solid #fbc2c4;
- color:#d12f19;
-}
-.buttons a.negative:active {
- background-color:#d12f19;
- border:1px solid #d12f19;
- color:#fff;
-}
-
-/* Button with icon and text */
-.iconstxt { background: url("../icons/button_sprite.png") no-repeat transparent; }
-.iconstxt span { padding-left: 20px; font-weight: bold; }
-.iconstxt.icoPositive { background-position: 6px -130px; }
-.iconstxt.icoNegative { background-position: 6px -98px; }
-.iconstxt.icoAdd { background-position: 6px -66px; }
-.iconstxt.icoKey { background-position: 6px -1px; }
-.iconstxt.icoDelete { background-position: 6px -34px; }
-.iconstxt.icoDownload { background-position: 6px -1px; }
-.iconstxt.icoRestore { background-position: 6px -1px; }
-
-/* Button with icon and without text */
-.icons16 { position: relative; }
-.icons16>span {
- opacity: 0;
- visibility: hidden;
- -webkit-transition: opacity 1s linear;
- -moz-transition: opacity 1s linear;
- -o-transition: opacity 1s linear;
- -ms-transition: opacity 1s linear;
- transition: opacity 1s linear;
- position: absolute;
- right: 23px;
- top: -1px;
- padding: 1px 2px;
- border: 1px solid rgb(155,155,11);
- background: rgb(255,255,111);
- white-space: nowrap;
-}
-.icons16:hover>span {
- opacity: 1.0;
- visibility: visible;
-}
-a.icons16 {
- height: 18px;
- width: 18px;
- padding: 0;
- background: url("../icons/x16_sprite.png") no-repeat transparent;
-}
-button.icons16 {
- height: 20px;
- width: 20px;
- padding: 0;
- background: url("../icons/x16_sprite.png") no-repeat transparent;
-}
-.icons16.icoEdit { background-position: -1px -1px; }
-.icons16.icoLoginAs { background-position: -1px -21px; }
-.icons16.icoPDF { background-position: -1px -61px; }
-.icons16.icoDelete { background-position: -1px -81px; }
-.icons16.icoWebmailer { background-position: -1px -101px; }
-.icons16.icoFilter { background-position: -1px -161px; }
-.icons16.icoDbAdmin { background-position: -1px -221px; }
-.icons16.icoAction { background-position: -1px -241px; }
-.icons16.icoLink { background-position: -1px -422px; float: right; }
-
-div.group-icon {
- float: left;
- padding: 2px 0;
-}
-.group-admin,
-.group-user {
- height: 20px;
- width: 20px;
- padding: 0;
- float: left;
- background: url("../icons/x16_sprite.png") no-repeat transparent;
-}
-.group-admin { background-position: 0 -380px; }
-.group-user { background-position: 0 -400px; }
-
-span.marked { color: #cc0000; }
-span.small { font-size: 0.9em; }
-
-#ajaxloader {
- position: absolute;
- width: 325px;
- height: 150px;
- background: #ffffff url('../images/ajax-loader.gif') no-repeat center center;
- border: solid 2px #e1e1e1;
- border-radius: 10px;
- /*background: rgba(255, 255, 255, 0.85);*/
- padding: 20px;
- text-align:center;
- z-index: 100;
-}
-.blockLabel.email_at {
- width: 20px !important;
- margin: 1.6em 0.3em 0 0 !important;
-}
-.textDisplay { display: block; }
-
-/* Form Length Classes */
-.textInput.formLengthBool { width: 25px !important; }
-.selectInput.formLengthBool { width: 60px !important; }
-.textInput.formLengthLimit { width: 50px !important; }
-.selectInput.formLengthLimit { width: 85px !important; }
-.formLengthDate { width: 75px !important; }
-.formLengthIPv4 { width: 125px !important; }
-.formLengthIPv6 { width: 100% !important; }
-.formLengthEmailUser { width: 30% !important; }
-.formLengthEmailDomain { width: 30% !important; }
-.formLengthHalf { width: 15% !important; }
-.formLengthDouble { width: 50% !important; }
-
-/* Individual Form Lengths */
-.textInput#username,
-.textInput#password,
-.textInput#passwort,
-.textInput#source_password { width: 100px; }
-.selectInput#language { width: 75px; }
-.selectInput#client_group_id, .selectInput#default_group { width: 125px; }
-input#refresh, input#retry, input#expire, input#minimum, input#ttl { width: 50px !important; }
-
-/* --- */
-
-a[href $="#logout"] {
- padding-right: 20px;
- background: url("../icons/x16_sprite.png") no-repeat right -143px transparent !important;
-}
-
-/* Select Menu with Images */
-select.withicons option {
- background-repeat:no-repeat;
- background-position: 1px;
- padding-left:24px;
-}
-div[class^=country-] {
- background-image: url("../icons/flags_sprite.png");
- background-repeat: no-repeat;
- height: 20px;
- width: 26px;
-}
-li[class^=country-] {
- background-image: url("../icons/flags_sprite.png");
- background-repeat: no-repeat;
- text-indent: 24px;
-}
-li[class^=country-] a.ui-state-hover { background: transparent; }
-div[class^=country-] span {
- display: none;
-}
-select.flags option {
- background-image: url("../icons/flags_sprite.png");
- background-repeat: no-repeat;
- padding: 1px 0 1px 30px;
-}
-select.flags option[value=EL] {background-position:0 -1475px}
-select.flags option[value=AD], select.flags option[value=ad], .country-AD {background-position:0 -1px}
-select.flags option[value=AE], select.flags option[value=ae], .country-AE {background-position:0 -23px}
-select.flags option[value=AF], select.flags option[value=af], .country-AF {background-position:0 -45px}
-select.flags option[value=AG], select.flags option[value=ag], .country-AG {background-position:0 -67px}
-select.flags option[value=AI], select.flags option[value=ai], .country-AI {background-position:0 -89px}
-select.flags option[value=AL], select.flags option[value=al], .country-AL {background-position:0 -111px}
-select.flags option[value=AM], select.flags option[value=am], .country-AM {background-position:0 -133px}
-select.flags option[value=AN], select.flags option[value=an], .country-AN {background-position:0 -155px}
-select.flags option[value=AO], select.flags option[value=ao], .country-AO {background-position:0 -177px}
-select.flags option[value=AQ], select.flags option[value=aq], .country-AQ {background-position:0 -199px}
-select.flags option[value=AR], select.flags option[value=ar], .country-AR {background-position:0 -221px}
-select.flags option[value=AS], select.flags option[value=as], .country-AS {background-position:0 -243px}
-select.flags option[value=AT], select.flags option[value=at], .country-AT {background-position:0 -265px}
-select.flags option[value=AU], select.flags option[value=au], .country-AU {background-position:0 -287px}
-select.flags option[value=AW], select.flags option[value=aw], .country-AW {background-position:0 -309px}
-select.flags option[value=AX], select.flags option[value=ax], .country-AX {background-position:0 -331px}
-select.flags option[value=AZ], select.flags option[value=az], .country-AZ {background-position:0 -353px}
-select.flags option[value=BA], select.flags option[value=ba], .country-BA {background-position:0 -375px}
-select.flags option[value=BB], select.flags option[value=bb], .country-BB {background-position:0 -397px}
-select.flags option[value=BD], select.flags option[value=bd], .country-BD {background-position:0 -419px}
-select.flags option[value=BE], select.flags option[value=be], .country-BE {background-position:0 -441px}
-select.flags option[value=BF], select.flags option[value=bf], .country-BF {background-position:0 -463px}
-select.flags option[value=BG], select.flags option[value=bg], .country-BG {background-position:0 -485px}
-select.flags option[value=BH], select.flags option[value=bh], .country-BH {background-position:0 -507px}
-select.flags option[value=BI], select.flags option[value=bi], .country-BI {background-position:0 -529px}
-select.flags option[value=BJ], select.flags option[value=bj], .country-BJ {background-position:0 -551px}
-select.flags option[value=BM], select.flags option[value=bm], .country-BM {background-position:0 -573px}
-select.flags option[value=BN], select.flags option[value=bn], .country-BN {background-position:0 -595px}
-select.flags option[value=BO], select.flags option[value=bo], .country-BO {background-position:0 -617px}
-select.flags option[value=BR], select.flags option[value=br], .country-BR {background-position:0 -639px}
-select.flags option[value=BS], select.flags option[value=bs], .country-BS {background-position:0 -661px}
-select.flags option[value=BT], select.flags option[value=bt], .country-BT {background-position:0 -683px}
-select.flags option[value=BV], select.flags option[value=bv], .country-BV {background-position:0 -705px}
-select.flags option[value=BW], select.flags option[value=bw], .country-BW {background-position:0 -727px}
-select.flags option[value=BY], select.flags option[value=by], .country-BY {background-position:0 -749px}
-select.flags option[value=BZ], select.flags option[value=bz], .country-BZ {background-position:0 -771px}
-select.flags option[value=CA], select.flags option[value=ca], .country-CA {background-position:0 -793px}
-select.flags option[value=CC], select.flags option[value=cc], .country-CC {background-position:0 -837px}
-select.flags option[value=CD], select.flags option[value=cd], .country-CD {background-position:0 -859px}
-select.flags option[value=CF], select.flags option[value=cf], .country-CF {background-position:0 -881px}
-select.flags option[value=CG], select.flags option[value=cg], .country-CG {background-position:0 -903px}
-select.flags option[value=CH], select.flags option[value=ch], .country-CH {background-position:0 -925px}
-select.flags option[value=CI], select.flags option[value=ci], .country-CI {background-position:0 -947px}
-select.flags option[value=CK], select.flags option[value=ck], .country-CK {background-position:0 -969px}
-select.flags option[value=CL], select.flags option[value=cl], .country-CL {background-position:0 -991px}
-select.flags option[value=CM], select.flags option[value=cm], .country-CM {background-position:0 -1013px}
-select.flags option[value=CN], select.flags option[value=cn], .country-CN {background-position:0 -1035px}
-select.flags option[value=CO], select.flags option[value=co], .country-CO {background-position:0 -1057px}
-select.flags option[value=CR], select.flags option[value=cr], .country-CR {background-position:0 -1079px}
-select.flags option[value=CS], select.flags option[value=cs], .country-CS {background-position:0 -1101px}
-select.flags option[value=CU], select.flags option[value=cu], .country-CU {background-position:0 -1123px}
-select.flags option[value=CV], select.flags option[value=cv], .country-CV {background-position:0 -1145px}
-select.flags option[value=CX], select.flags option[value=cx], .country-CX {background-position:0 -1167px}
-select.flags option[value=CY], select.flags option[value=cy], .country-CY {background-position:0 -1189px}
-select.flags option[value=CZ], select.flags option[value=cz], .country-CZ {background-position:0 -1211px}
-select.flags option[value=DE], select.flags option[value=de], .country-DE {background-position:0 -1233px}
-select.flags option[value=DJ], select.flags option[value=dj], .country-DJ {background-position:0 -1255px}
-select.flags option[value=DK], select.flags option[value=dk], .country-DK {background-position:0 -1277px}
-select.flags option[value=DM], select.flags option[value=dm], .country-DM {background-position:0 -1299px}
-select.flags option[value=DO], select.flags option[value=do], .country-DO {background-position:0 -1321px}
-select.flags option[value=DZ], select.flags option[value=dz], .country-DZ {background-position:0 -1343px}
-select.flags option[value=EC], select.flags option[value=ec], .country-EC {background-position:0 -1365px}
-select.flags option[value=EE], select.flags option[value=ee], .country-EE {background-position:0 -1387px}
-select.flags option[value=EG], select.flags option[value=eg], .country-EG {background-position:0 -1409px}
-select.flags option[value=EH], select.flags option[value=eh], .country-EH {background-position:0 -1431px}
-select.flags option[value=ER], select.flags option[value=er], .country-ER {background-position:0 -1475px}
-select.flags option[value=ES], select.flags option[value=es], .country-ES {background-position:0 -1497px}
-select.flags option[value=ET], select.flags option[value=ET], select.flags option[value=et], .country-ET {background-position:0 -1519px}
-select.flags option[value=FI], select.flags option[value=fi], .country-FI {background-position:0 -1585px}
-select.flags option[value=FJ], select.flags option[value=fj], .country-FJ {background-position:0 -1607px}
-select.flags option[value=FK], select.flags option[value=fk], .country-FK {background-position:0 -1629px}
-select.flags option[value=FM], select.flags option[value=fm], .country-FM {background-position:0 -1651px}
-select.flags option[value=FO], select.flags option[value=fo], .country-FO {background-position:0 -1673px}
-select.flags option[value=FR], select.flags option[value=fr], .country-FR {background-position:0 -1695px}
-select.flags option[value=GA], select.flags option[value=ga], .country-GA {background-position:0 -1717px}
-select.flags option[value=GB], select.flags option[value=en], select.flags option[value=gb], .country-GB, .country-EN {background-position:0 -1739px}
-select.flags option[value=GD], select.flags option[value=gd], .country-GD {background-position:0 -1761px}
-select.flags option[value=GE], select.flags option[value=ge], .country-GE {background-position:0 -1783px}
-select.flags option[value=GF], select.flags option[value=gf], .country-GF {background-position:0 -1805px}
-select.flags option[value=GH], select.flags option[value=gh], .country-GH {background-position:0 -1827px}
-select.flags option[value=GI], select.flags option[value=gi], .country-GI {background-position:0 -1849px}
-select.flags option[value=GL], select.flags option[value=gl], .country-GL {background-position:0 -1871px}
-select.flags option[value=GM], select.flags option[value=gm], .country-GM {background-position:0 -1893px}
-select.flags option[value=GN], select.flags option[value=gn], .country-GN {background-position:0 -1915px}
-select.flags option[value=GP], select.flags option[value=gp], .country-GP {background-position:0 -1937px}
-select.flags option[value=GQ], select.flags option[value=gq], .country-GQ {background-position:0 -1959px}
-select.flags option[value=GR], select.flags option[value=el], select.flags option[value=gr], .country-GR, .country-EL {background-position:0 -1981px}
-select.flags option[value=GS], select.flags option[value=gs], .country-GS {background-position:0 -2003px}
-select.flags option[value=GT], select.flags option[value=gt], .country-GT {background-position:0 -2025px}
-select.flags option[value=GU], select.flags option[value=gu], .country-GU {background-position:0 -2047px}
-select.flags option[value=GW], select.flags option[value=gw], .country-GW {background-position:0 -2069px}
-select.flags option[value=GY], select.flags option[value=gy], .country-GY {background-position:0 -2091px}
-select.flags option[value=HK], select.flags option[value=hk], .country-HK {background-position:0 -2113px}
-select.flags option[value=HM], select.flags option[value=hm], .country-HM {background-position:0 -2135px}
-select.flags option[value=HN], select.flags option[value=hn], .country-HN {background-position:0 -2157px}
-select.flags option[value=HR], select.flags option[value=hr], .country-HR {background-position:0 -2179px}
-select.flags option[value=HT], select.flags option[value=ht], .country-HT {background-position:0 -2201px}
-select.flags option[value=HU], select.flags option[value=hu], .country-HU {background-position:0 -2223px}
-select.flags option[value=ID], select.flags option[value=id], .country-ID {background-position:0 -2245px}
-select.flags option[value=IE], select.flags option[value=ie], .country-IE {background-position:0 -2267px}
-select.flags option[value=IL], select.flags option[value=il], .country-IL {background-position:0 -2289px}
-select.flags option[value=IN], select.flags option[value=in], .country-IN {background-position:0 -2311px}
-select.flags option[value=IO], select.flags option[value=io], .country-IO {background-position:0 -2333px}
-select.flags option[value=IQ], select.flags option[value=iq], .country-IQ {background-position:0 -2355px}
-select.flags option[value=IR], select.flags option[value=ir], .country-IR {background-position:0 -2377px}
-select.flags option[value=IS], select.flags option[value=is], .country-IS {background-position:0 -2399px}
-select.flags option[value=IT], select.flags option[value=it], .country-IT {background-position:0 -2421px}
-select.flags option[value=JM], select.flags option[value=jm], .country-JM {background-position:0 -2443px}
-select.flags option[value=JO], select.flags option[value=jo], .country-JO {background-position:0 -2465px}
-select.flags option[value=JP], select.flags option[value=ja], select.flags option[value=jp], .country-JP, .country-JA {background-position:0 -2487px}
-select.flags option[value=KE], select.flags option[value=ke], .country-KE {background-position:0 -2509px}
-select.flags option[value=KG], select.flags option[value=kg], .country-KG {background-position:0 -2531px}
-select.flags option[value=KH], select.flags option[value=kh], .country-KH {background-position:0 -2553px}
-select.flags option[value=KI], select.flags option[value=ki], .country-KI {background-position:0 -2575px}
-select.flags option[value=KM], select.flags option[value=km], .country-KM {background-position:0 -2597px}
-select.flags option[value=KN], select.flags option[value=kn], .country-KN {background-position:0 -2619px}
-select.flags option[value=KP], select.flags option[value=kp], .country-KP {background-position:0 -2641px}
-select.flags option[value=KR], select.flags option[value=kr], .country-KR {background-position:0 -2663px}
-select.flags option[value=KW], select.flags option[value=kw], .country-KW {background-position:0 -2685px}
-select.flags option[value=KY], select.flags option[value=ky], .country-KY {background-position:0 -2707px}
-select.flags option[value=KZ], select.flags option[value=kz], .country-KZ {background-position:0 -2729px}
-select.flags option[value=LA], select.flags option[value=la], .country-LA {background-position:0 -2751px}
-select.flags option[value=LB], select.flags option[value=lb], .country-LB {background-position:0 -2773px}
-select.flags option[value=LC], select.flags option[value=lc], .country-LC {background-position:0 -2795px}
-select.flags option[value=LI], select.flags option[value=li], .country-LI {background-position:0 -2817px}
-select.flags option[value=LK], select.flags option[value=lk], .country-LK {background-position:0 -2839px}
-select.flags option[value=LR], select.flags option[value=lr], .country-LR {background-position:0 -2861px}
-select.flags option[value=LS], select.flags option[value=ls], .country-LS {background-position:0 -2883px}
-select.flags option[value=LT], select.flags option[value=lt], .country-LT {background-position:0 -2905px}
-select.flags option[value=LU], select.flags option[value=lu], .country-LU {background-position:0 -2927px}
-select.flags option[value=LV], select.flags option[value=lv], .country-LV {background-position:0 -2949px}
-select.flags option[value=LY], select.flags option[value=ly], .country-LY {background-position:0 -2971px}
-select.flags option[value=MA], select.flags option[value=ma], .country-MA {background-position:0 -2993px}
-select.flags option[value=MC], select.flags option[value=mc], .country-MC {background-position:0 -3015px}
-select.flags option[value=MD], select.flags option[value=md], .country-MD {background-position:0 -3037px}
-select.flags option[value=ME], select.flags option[value=me], .country-ME {background-position:0 -3059px}
-select.flags option[value=MG], select.flags option[value=mg], .country-MG {background-position:0 -3081px}
-select.flags option[value=MH], select.flags option[value=mh], .country-MH {background-position:0 -3103px}
-select.flags option[value=MK], select.flags option[value=mk], .country-MK {background-position:0 -3125px}
-select.flags option[value=ML], select.flags option[value=ml], .country-ML {background-position:0 -3147px}
-select.flags option[value=MM], select.flags option[value=mm], .country-MM {background-position:0 -3169px}
-select.flags option[value=MN], select.flags option[value=mn], .country-MN {background-position:0 -3191px}
-select.flags option[value=MO], select.flags option[value=mo], .country-MO {background-position:0 -3213px}
-select.flags option[value=MP], select.flags option[value=mp], .country-MP {background-position:0 -3235px}
-select.flags option[value=MQ], select.flags option[value=mq], .country-MQ {background-position:0 -3257px}
-select.flags option[value=MR], select.flags option[value=mr], .country-MR {background-position:0 -3279px}
-select.flags option[value=MS], select.flags option[value=ms], .country-MS {background-position:0 -3301px}
-select.flags option[value=MT], select.flags option[value=mt], .country-MT {background-position:0 -3323px}
-select.flags option[value=MU], select.flags option[value=mu], .country-MU {background-position:0 -3345px}
-select.flags option[value=MV], select.flags option[value=mv], .country-MV {background-position:0 -3367px}
-select.flags option[value=MW], select.flags option[value=mw], .country-MW {background-position:0 -3389px}
-select.flags option[value=MX], select.flags option[value=mx], .country-MX {background-position:0 -3411px}
-select.flags option[value=MY], select.flags option[value=my], .country-MY {background-position:0 -3433px}
-select.flags option[value=MZ], select.flags option[value=mz], .country-MZ {background-position:0 -3455px}
-select.flags option[value=NA], select.flags option[value=na], .country-NA {background-position:0 -3477px}
-select.flags option[value=NC], select.flags option[value=nc], .country-NC {background-position:0 -3499px}
-select.flags option[value=NE], select.flags option[value=ne], .country-NE {background-position:0 -3521px}
-select.flags option[value=NF], select.flags option[value=nf], .country-NF {background-position:0 -3543px}
-select.flags option[value=NG], select.flags option[value=ng], .country-NG {background-position:0 -3565px}
-select.flags option[value=NI], select.flags option[value=ni], .country-NI {background-position:0 -3587px}
-select.flags option[value=NL], select.flags option[value=nl], .country-NL {background-position:0 -3609px}
-select.flags option[value=NO], select.flags option[value=no], .country-NO {background-position:0 -3631px}
-select.flags option[value=NP], select.flags option[value=np], .country-NP {background-position:0 -3653px}
-select.flags option[value=NR], select.flags option[value=nr], .country-NR {background-position:0 -3675px}
-select.flags option[value=NU], select.flags option[value=nu], .country-NU {background-position:0 -3697px}
-select.flags option[value=NZ], select.flags option[value=nz], .country-NZ {background-position:0 -3719px}
-select.flags option[value=OM], select.flags option[value=om], .country-OM {background-position:0 -3741px}
-select.flags option[value=PA], select.flags option[value=pa], .country-PA {background-position:0 -3763px}
-select.flags option[value=PE], select.flags option[value=pe], .country-PE {background-position:0 -3785px}
-select.flags option[value=PF], select.flags option[value=pf], .country-PF {background-position:0 -3807px}
-select.flags option[value=PG], select.flags option[value=pg], .country-PG {background-position:0 -3829px}
-select.flags option[value=PH], select.flags option[value=ph], .country-PH {background-position:0 -3851px}
-select.flags option[value=PK], select.flags option[value=pk], .country-PK {background-position:0 -3873px}
-select.flags option[value=PL], select.flags option[value=pl], .country-PL {background-position:0 -3895px}
-select.flags option[value=PM], select.flags option[value=pm], .country-PM {background-position:0 -3917px}
-select.flags option[value=PN], select.flags option[value=pn], .country-PN {background-position:0 -3939px}
-select.flags option[value=PR], select.flags option[value=pr], .country-PR {background-position:0 -3961px}
-select.flags option[value=PS], select.flags option[value=ps], .country-PS {background-position:0 -3983px}
-select.flags option[value=PT], select.flags option[value=pt], .country-PT {background-position:0 -4005px}
-select.flags option[value=PW], select.flags option[value=pw], .country-PW {background-position:0 -4027px}
-select.flags option[value=PY], select.flags option[value=py], .country-PY {background-position:0 -4049px}
-select.flags option[value=QA], select.flags option[value=qa], .country-QA {background-position:0 -4071px}
-select.flags option[value=RE], select.flags option[value=re], .country-RE {background-position:0 -4093px}
-select.flags option[value=RO], select.flags option[value=ro], .country-RO {background-position:0 -4115px}
-select.flags option[value=RS], select.flags option[value=rs], .country-RS {background-position:0 -4137px}
-select.flags option[value=RU], select.flags option[value=ru], .country-RU {background-position:0 -4159px}
-select.flags option[value=RW], select.flags option[value=rw], .country-RW {background-position:0 -4181px}
-select.flags option[value=SA], select.flags option[value=sa], .country-SA {background-position:0 -4203px}
-select.flags option[value=SB], select.flags option[value=sb], .country-SB {background-position:0 -4225px}
-select.flags option[value=SC], select.flags option[value=sc], .country-SC {background-position:0 -4247px}
-select.flags option[value=SD], select.flags option[value=sd], .country-SD {background-position:0 -4291px}
-select.flags option[value=SE], select.flags option[value=se], .country-SE {background-position:0 -4313px}
-select.flags option[value=SG], select.flags option[value=sg], .country-SG {background-position:0 -4335px}
-select.flags option[value=SH], select.flags option[value=sh], .country-SH {background-position:0 -4357px}
-select.flags option[value=SI], select.flags option[value=si], .country-SI {background-position:0 -4379px}
-select.flags option[value=SJ], select.flags option[value=sj], .country-SJ {background-position:0 -4401px}
-select.flags option[value=SK], select.flags option[value=sk], .country-SK {background-position:0 -4423px}
-select.flags option[value=SL], select.flags option[value=sl], .country-SL {background-position:0 -4445px}
-select.flags option[value=SM], select.flags option[value=sm], .country-SM {background-position:0 -4467px}
-select.flags option[value=SN], select.flags option[value=sn], .country-SN {background-position:0 -4489px}
-select.flags option[value=SO], select.flags option[value=so], .country-SO {background-position:0 -4511px}
-select.flags option[value=SR], select.flags option[value=sr], .country-SR {background-position:0 -4533px}
-select.flags option[value=ST], select.flags option[value=st], .country-ST {background-position:0 -4555px}
-select.flags option[value=SV], select.flags option[value=sv], .country-SV {background-position:0 -4577px}
-select.flags option[value=SY], select.flags option[value=sy], .country-SY {background-position:0 -4599px}
-select.flags option[value=SZ], select.flags option[value=sz], .country-SZ {background-position:0 -4621px}
-select.flags option[value=TC], select.flags option[value=tc], .country-TC {background-position:0 -4643px}
-select.flags option[value=TD], select.flags option[value=td], .country-TD {background-position:0 -4665px}
-select.flags option[value=TF], select.flags option[value=tf], .country-TF {background-position:0 -4687px}
-select.flags option[value=TG], select.flags option[value=tg], .country-TG {background-position:0 -4709px}
-select.flags option[value=TH], select.flags option[value=th], .country-TH {background-position:0 -4731px}
-select.flags option[value=TJ], select.flags option[value=tj], .country-TJ {background-position:0 -4753px}
-select.flags option[value=TK], select.flags option[value=tk], .country-TK {background-position:0 -4775px}
-select.flags option[value=TL], select.flags option[value=tl], .country-TL {background-position:0 -4797px}
-select.flags option[value=TM], select.flags option[value=tm], .country-TM {background-position:0 -4819px}
-select.flags option[value=TN], select.flags option[value=tn], .country-TN {background-position:0 -4841px}
-select.flags option[value=TO], select.flags option[value=to], .country-TO {background-position:0 -4863px}
-select.flags option[value=TR], select.flags option[value=tr], .country-TR {background-position:0 -4885px}
-select.flags option[value=TT], select.flags option[value=tt], .country-TT {background-position:0 -4907px}
-select.flags option[value=TV], select.flags option[value=tv], .country-TV {background-position:0 -4929px}
-select.flags option[value=TW], select.flags option[value=tw], .country-TW {background-position:0 -4951px}
-select.flags option[value=TZ], select.flags option[value=tz], .country-TZ {background-position:0 -4973px}
-select.flags option[value=UA], select.flags option[value=ua], .country-UA {background-position:0 -4995px}
-select.flags option[value=UG], select.flags option[value=ug], .country-UG {background-position:0 -5017px}
-select.flags option[value=UM], select.flags option[value=um], .country-UM {background-position:0 -5039px}
-select.flags option[value=US], select.flags option[value=us], .country-US {background-position:0 -5061px}
-select.flags option[value=UY], select.flags option[value=uy], .country-UY {background-position:0 -5083px}
-select.flags option[value=UZ], select.flags option[value=uz], .country-UZ {background-position:0 -5105px}
-select.flags option[value=VA], select.flags option[value=va], .country-VA {background-position:0 -5127px}
-select.flags option[value=VC], select.flags option[value=vc], .country-VC {background-position:0 -5149px}
-select.flags option[value=VE], select.flags option[value=ve], .country-VE {background-position:0 -5171px}
-select.flags option[value=VG], select.flags option[value=vg], .country-VG {background-position:0 -5193px}
-select.flags option[value=VI], select.flags option[value=vi], .country-VI {background-position:0 -5215px}
-select.flags option[value=VN], select.flags option[value=vn], .country-VN {background-position:0 -5237px}
-select.flags option[value=VU], select.flags option[value=vu], .country-VU {background-position:0 -5259px}
-select.flags option[value=WF], select.flags option[value=wf], .country-WF {background-position:0 -5303px}
-select.flags option[value=WS], select.flags option[value=ws], .country-WS {background-position:0 -5325px}
-select.flags option[value=YE], select.flags option[value=ye], .country-YE {background-position:0 -5347px}
-select.flags option[value=YT], select.flags option[value=yt], .country-YT {background-position:0 -5369px}
-select.flags option[value=ZA], select.flags option[value=za], .country-ZA {background-position:0 -5391px}
-select.flags option[value=ZM], select.flags option[value=zm], .country-ZM {background-position:0 -5413px}
-select.flags option[value=ZW], select.flags option[value=zw], .country-ZW {background-position:0 -5435px}
-
-.panel_login {
- max-width: 80%;
- min-width: 680px;
-}
-div.subsectiontoggle {
- border:1px solid #ccc;
- font-weight:bold;
- font-size:14px;
- padding-top:10px;
- padding-bottom:0;
- margin-top:5px;
- text-indent:15px;
- cursor:pointer;
- margin-bottom:10px;
- background-color:#f4f4f4;
- -moz-border-radius:5px;
- -webkit-border-radius:5px;
- -khtml-border-radius:5px;
- -o-border-radius:5px;
- -ms-border-radius:5px;
- border-radius:5px;
-}
-div.subsectiontoggle span {
- display:inline-block;
- margin-bottom:-3px;
- margin-right:10px;
- width:16px;
- height:16px;
- background: url("../icons/button_sprite.png") 0 -72px no-repeat transparent;
-}
-div.subsectiontoggle span.showing{
- background-position: 0 -40px;
-}
-div.subsectiontoggle em {
- display:block;
- position:relative;
- left:425px;
- top:-13px;
- margin-bottom:-3px;
- width:13px;
- height:13px;
- background:url("../images/chevron.png") top left no-repeat;
- -webkit-transform:none;
- -moz-transform:none;
- -khtml-transform:none;
- -o-transform:none;
- -ms-transform:none;
- transform:none;
- -webkit-transition-duration: .2s;
- -moz-transition-duration: .2s;
- -khtml-transition-duration: .2s;
- -o-transition-duration: .2s;
- -ms-transition-duration: .2s;
- transition-duration: .2s;
- -webkit-transition-property: -webkit-transform;
- -moz-transition-property: -moz-transform;
- -khtml-transition-property: -khtml-transform;
- -o-transition-property: -o-transform;
- -ms-transition-property: -ms-transform;
- transition-property: transform;
-}
-div.subsectiontoggle em.showing {
- display:block;
- position:relative;
- left:425px;
- top:-13px;
- background:url("../images/chevron.png") top left no-repeat;
- width:13px;
- height:13px;
- -webkit-transform:rotate(90deg);
- -moz-transform:rotate(90deg);
- -khtml-transform:rotate(90deg);
- -o-transform:rotate(90deg);
- -ms-transform:rotate(90deg);
- transform:rotate(90deg);
-}
-div.subsectiontoggle:hover em {
- -webkit-transform:rotate(90deg);
- -moz-transform:rotate(90deg);
- -khtml-transform:rotate(90deg);
- -o-transform:rotate(90deg);
- -ms-transform:rotate(90deg);
- transform:rotate(90deg);
-}
-
-
-div.gs-container {
- margin-top:10px;
-}
-div.gs-container * {
- margin: 0;
- padding: 0;
- background-position: 0 0;
- text-decoration: none;
- font-size: 1em;
-}
-div.gs-container input {
- background: url("../icons/x16_sprite.png") no-repeat 2px -119px #FFFFFF;
- height:20px;
- border:1px solid #444;
- padding:0 22px 2px;
- color:#444;
- -moz-border-radius:5px;
- -webkit-border-radius:5px;
- -khtml-border-radius:5px;
- -o-border-radius:5px;
- -ms-border-radius:5px;
- border-radius:5px;
-}
-input.gs-loading {
- background-image: url("../images/loading.gif");
- background-repeat: no-repeat;
- background-position: center right;
-}
-ul.gs-resultbox {
- margin: 0 !important;
- padding: 0 !important;
- width: 300px;
- z-index: 999999;
- border: 1px solid #777;
- font-size: 11px;
- background: #fff;
- -moz-box-shadow: 2px 2px 5px 0 #c5c5c5;
- -webkit-box-shadow: 2px 2px 5px 0 #c5c5c5;
- -khtml-box-shadow: 2px 2px 5px 0 #c5c5c5;
- -o-box-shadow: 2px 2px 5px 0 #c5c5c5;
- -ms-box-shadow: 2px 2px 5px 0 #c5c5c5;
- box-shadow: 2px 2px 5px 0 #c5c5c5;
- list-style: none;
- -moz-border-radius:5px;
- -webkit-border-radius:5px;
- -khtml-border-radius:5px;
- -o-border-radius:5px;
- -ms-border-radius:5px;
- border-radius:5px;
- max-height:500px;
- overflow:auto;
-}
-ul.gs-resultbox li {
- float: left;
- width: 100%;
- clear: both;
- cursor: pointer;
-}
-ul.gs-resultbox li.gs-cheader {
- height: 13px;
- overflow: hidden;
- padding: 5px 0;
- color: #fff;
- background: #6ea6d1;
- cursor:default;
- padding-bottom:10px;
-}
-ul.gs-resultbox li.gs-cheader p.gs-cheader-title {
- margin: 0 !important;
- padding: 0 0 0 10px !important;
- float: left;
- font-size: 12px;
- font-weight: bold;
-}
-ul.gs-resultbox li.gs-cheader p.gs-cheader-limit {
- margin: 0 !important;
- padding: 0 10px 0 0 !important;
- float: right;
- font-size: 11px;
- font-weight: normal;
-}
-ul.gs-resultbox li.gs-cdata {
- margin: 0 !important;
- padding: 0 !important;
- border-bottom: 1px solid #c5c5c5;
-}
-ul.gs-resultbox li.gs-cdata:last-child {
- border-bottom: none;
-}
-ul.gs-resultbox li.gs-cdata:hover {
- background: #eaf4fd;
-}
-ul.gs-resultbox li.gs-cdata a {
- display: block;
- padding: 5px 10px;
- text-decoration: none !important;
- background: #fff;
-}
-ul.gs-resultbox li.gs-cdata a:hover {
- background: #cde0ff;
-}
-ul.gs-resultbox li.gs-cdata img {
- margin-right: 12px;
-}
-ul.gs-resultbox li.gs-cdata p {
- margin: 0 !important;
- padding: 0 !important;
- color: #444;
- font-size: 10px;
- min-height:30px;
-}
-ul.gs-resultbox li.gs-cdata p span.gs-cdata-title {
- display: inline !important;
- margin: 0 !important;
- padding: 0 !important;
- font-size: 11px;
- font-weight: bold;
- color: #000;
-}
-ul.gs-resultbox li:first-child {
- -moz-border-radius:5px 5px 0 0;
- -webkit-border-radius:5px 5px 0 0;
- -khtml-border-radius:5px 5px 0 0;
- -o-border-radius:5px 5px 0 0;
- -ms-border-radius:5px 5px 0 0;
- border-radius:5px 5px 0 0;
-}
-ul.gs-resultbox li:last-child {
- -moz-border-radius:0 0 5px 5px;
- -webkit-border-radius:0 0 5px 5px;
- -khtml-border-radius:0 0 5px 5px;
- -o-border-radius:0 0 5px 5px;
- -ms-border-radius:0 0 5px 5px;
- border-radius:0 0 5px 5px;
-}
-
-div.df-container {
-}
-div.df-container * {
- margin: 0;
- padding: 0;
- background-position: 0 0;
- text-decoration: none;
- font-size: 1em;
-}
-div.df-container input {
-}
-input.df-loading {
- background-image: url("../images/loading.gif");
- background-repeat: no-repeat;
- background-position: center right;
-}
-ul.df-resultbox {
- margin: 0 !important;
- padding: 0 !important;
- min-width: 250px;
- max-width: 500px;
- z-index: 999999;
- border: 1px solid #777;
- font-size: 11px;
- background: #fff;
- -moz-box-shadow: 2px 2px 5px 0 #c5c5c5;
- -webkit-box-shadow: 2px 2px 5px 0 #c5c5c5;
- -khtml-box-shadow: 2px 2px 5px 0 #c5c5c5;
- -o-box-shadow: 2px 2px 5px 0 #c5c5c5;
- -ms-box-shadow: 2px 2px 5px 0 #c5c5c5;
- box-shadow: 2px 2px 5px 0 #c5c5c5;
- list-style: none;
- -moz-border-radius:5px;
- -webkit-border-radius:5px;
- -khtml-border-radius:5px;
- -o-border-radius:5px;
- -ms-border-radius:5px;
- border-radius:5px;
-}
-ul.df-resultbox li {
- float: left;
- width: 100%;
- clear: both;
- cursor: pointer;
-}
-ul.df-resultbox li.df-cheader {
- height: 13px;
- overflow: hidden;
- padding: 5px 0;
- color: #fff;
- background: #6ea6d1;
- cursor:default;
- padding-bottom:10px;
-}
-ul.df-resultbox li.df-cheader p.df-cheader-title {
- margin: 0 !important;
- padding: 0 0 0 10px !important;
- float: left;
- font-size: 12px;
- font-weight: bold;
-}
-ul.df-resultbox li.df-cheader p.df-cheader-limit {
- margin: 0 !important;
- padding: 0 10px 0 0 !important;
- float: right;
- font-size: 11px;
- font-weight: normal;
-}
-ul.df-resultbox li.df-cdata {
- margin: 0 !important;
- padding: 0 !important;
- border-bottom: 1px solid #c5c5c5;
-}
-ul.df-resultbox li.df-cdata:last-child {
- border-bottom: none;
-}
-ul.df-resultbox li.df-cdata:hover {
- background: #eaf4fd;
-}
-ul.df-resultbox li.df-cdata a {
- display: block;
- padding: 5px 10px;
- text-decoration: none !important;
- background: #fff;
-}
-ul.df-resultbox li.df-cdata a:hover {
- background: #cde0ff;
-}
-ul.df-resultbox li.df-cdata img {
- margin-right: 12px;
-}
-ul.df-resultbox li.df-cdata p {
- margin: 0 !important;
- padding: 0 !important;
- color: #444;
- font-size: 10px;
- min-height:30px;
-}
-ul.df-resultbox li.df-cdata p span.df-cdata-title {
- display: inline !important;
- margin: 0 !important;
- padding: 0 !important;
- font-size: 11px;
- font-weight: bold;
- color: #000;
-}
-ul.df-resultbox li:first-child {
- -moz-border-radius:5px 5px 0 0;
- -webkit-border-radius:5px 5px 0 0;
- -khtml-border-radius:5px 5px 0 0;
- -o-border-radius:5px 5px 0 0;
- -ms-border-radius:5px 5px 0 0;
- border-radius:5px 5px 0 0;
-}
-ul.df-resultbox li:last-child {
- -moz-border-radius:0 0 5px 5px;
- -webkit-border-radius:0 0 5px 5px;
- -khtml-border-radius:0 0 5px 5px;
- -o-border-radius:0 0 5px 5px;
- -ms-border-radius:0 0 5px 5px;
- border-radius:0 0 5px 5px;
-}
-
-span.icons16-empty {
- float:left;
- display:block;
- height:20px;
- width:20px;
- margin:0 7px 0 0;
-}
-
-.ttip {
- width:16px;
- height:16px;
- cursor:pointer;
- background: url("../icons/x16_sprite.png") no-repeat -2px -42px transparent;
- float:right;
- display:inline;
- position:relative;
- right:-2px;
- top:-2px;
-}
-
-p.prefix {
- float: left;
- margin: 0;
- text-align: right;
-}
-p.label {
- float: left;
- margin: 5px 15px 0 0;
-}
-p.value {
- float:left;
- margin: 0 0 0 2px;
-}
-
-/* content_ispc
--------------------------------------------------------------- */
-.tipsy {
- font-size: 10px;
- position: absolute;
- padding: 5px;
- z-index: 100000;
-}
-.tipsy-inner {
- background-color: #000;
- color: #FFF;
- max-width: 350px;
- padding: 5px 8px 4px 8px;
- text-align: left;
-}
-
-/* Rounded corners */
-.tipsy-inner {
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
-/* Uncomment for shadow */
-/*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; }*/
-
-.tipsy-arrow {
- position: absolute;
- width: 0;
- height: 0;
- line-height: 0;
- border: 5px dashed #000;
-}
-/* Rules to colour arrows */
-.tipsy-arrow-n { border-bottom-color: #000; }
-.tipsy-arrow-s { border-top-color: #000; }
-.tipsy-arrow-e { border-left-color: #000; }
-.tipsy-arrow-w { border-right-color: #000; }
-
-.tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
-.tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
-.tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
-.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
-.tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
-.tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
-.tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; }
-.tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; }
-
-/* uni-form-generic
--------------------------------------------------------------- */
-
-/* Uni-Form by Dragan Babic [Superawesome Industries] - http: //sprawsm.com/uni-form/ */
-/* Some rights reserved - http: //creativecommons.org/licenses/by-sa/2.5/ */
-/* Do not edit this file directly, make your changes to uni-form.css in the same folder */
-
-.uniForm{ margin: 0; padding: 0; position: relative; z-index: 1; } /* reset stuff */
-
-/* Some generals and more resets */
-.uniForm fieldset{ border: none; margin: 0; padding: 0; }
-.uniForm fieldset legend{ margin: 0; padding: 0; }
-
-/* This is the main unit that contains our form elements */
-.uniForm .ctrlHolder,
-.uniForm .buttonHolder{ margin: 0; padding: 0; clear: both; }
-
-/* Clear all floats */
-.uniForm:after,
-.uniForm .buttonHolder:after,
-.uniForm .ctrlHolder:after,
-.uniForm .ctrlHolder .multiField:after,
-.uniForm .inlineLabel:after{ content: "."; display: block; height: 0; line-height: 0; font-size: 0; clear: both; min-height: 0; visibility: hidden; }
-
-/* A class to be used on a label that contains a checkbox or a radio button */
-.uniForm .inlineLabel,
-.uniForm .inlineLabels .inlineLabel,
-.uniForm .blockLabels .inlineLabel{ width: auto; float: none; margin: 0; display: block; }
-/* IE shows borders & padding on checkboxes and radio buttons if they are declared on an input element, remove them */
-/* Legacy/Inheritance fix */
-.uniForm .inlineLabel input,
-.uniForm .inlineLabels .inlineLabel input,
-.uniForm .blockLabels .inlineLabel input{ border: none; padding: 0; margin: 0; }
-
-/* Styles for form controls where labels are above the input elements */
-/* Set the class of the parent (preferably to a fieldset) to .blockLabels */
-
-.uniForm label,
-.uniForm .label,
-.uniForm .blockLabels label,
-.uniForm .blockLabels .label{ display: block; float: none; padding: 0; line-height: 100%; width: auto; }
-
-/* Float the input elements */
-.uniForm .textInput,
-.uniForm .blockLabels .textInput,
-.uniForm .blockLabels .fileUpload,
-.uniForm .selectInput,
-.uniForm .blockLabels .selectInput,
-.uniForm .blockLabels select,
-.uniForm textarea,
-.uniForm .blockLabels textarea{ float: left; }
-
-/* Postition the hints */
-.uniForm .formHint,
-.uniForm .blockLabels .formHint{ float: right; margin: 0; clear: none; }
-
-/* Position the elements inside combo boxes (multiple selects/checkboxes/radio buttons per unit) */
-.uniForm .multiField,
-.uniForm .blockLabels .multiField{ width: auto; float: left; }
-.uniForm .multiField .inlineLabel,
-.uniForm .blockLabels .multiField .inlineLabel{ display: block; margin: 0 0 .5em 0; }
-.uniForm .multiField .blockLabel,
-.uniForm .blockLabels .multiField .blockLabel{ float: left; width: auto; margin: 0; }
-.uniForm .multiField .blockLabel .textInput,
-.uniForm .multiField .blockLabel .selectInput,
-.uniForm .multiField .blockLabel select,
-.uniForm .blockLabels .multiField .blockLabel .textInput,
-.uniForm .blockLabels .multiField .blockLabel .selectInput,
-.uniForm .blockLabels .multiField .blockLabel select{ width: 100%; margin: 0; }
-
-/* Styles for form controls where labels are in line with the input elements */
-/* Set the class of the parent (preferably to a fieldset) to .inlineLabels */
-.uniForm .inlineLabels label,
-.uniForm .inlineLabels .label{ float: left; margin: 0; padding: 0; line-height: 100%; position: relative; }
-
-/* Float the input elements */
-.uniForm .inlineLabels .textInput,
-.uniForm .inlineLabels .fileUpload,
-.uniForm .inlineLabels .selectInput,
-.uniForm .inlineLabels select,
-.uniForm .inlineLabels textarea{ float: left; }
-
-/* Postition the hints */
-.uniForm .inlineLabels .formHint{ clear: both; float: none; }
-.uniForm .inlineLabels .multiField{ float: left; }
-.uniForm .inlineLabels .multiField .inlineLabel{}
-.uniForm .inlineLabels .multiField .blockLabel{}
-.uniForm .inlineLabels .multiField .blockLabel .textInput,
-.uniForm .inlineLabels .multiField .blockLabel .selectInput,
-.uniForm .inlineLabels .multiField .blockLabel select{ display: block; width: 100%; float: none; }
-.uniForm .inlineLabels .multiField select{ float: left; }
-
-/* Required fields asterisk styling for .blockLabels */
-.uniForm label em,
-.uniForm .label em,
-.uniForm .blockLabels label em,
-.uniForm .blockLabels .label em{ position: absolute; left: -7px; }
-
-/* Required fields asterisk styling for .inlineLabels */
-.uniForm .inlineLabels label em,
-.uniForm .inlineLabels .label em{ display: block; position: absolute; left: auto; right: 0; font-style: normal; font-weight: bold; }
-.uniForm .inlineLabel em{ position: absolute; left: 7px; }
-
-/* Messages */
-.uniForm #errorMsg,
-.uniForm .error{}
-.uniForm #errorMsg dt,
-.uniForm #errorMsg h3{}
-.uniForm #errorMsg dd{}
-.uniForm #errorMsg ol{}
-.uniForm #errorMsg ol li{}
-.uniForm .errorField{}
-.uniForm #OKMsg{}
-
-/* Columns */
-
-.uniForm .col{ float: left; }
-.uniForm .col.first{}
-.uniForm .col.last{}
-
-/* uni-form
--------------------------------------------------------------- */
-
-/* Keep in mind that wherever you see "Required property" it means that the property must exist */
-
-/* ------------------------------------------------------------------------------ */
-
-/* Generals */
-.uniForm fieldset{}
-.uniForm fieldset legend{ color: #333; font-weight: bold; font-size: 100%; margin: 0; padding: 1.5em 1.5em 1.5em 0; }
-
-/* This is the main unit that contains our form elements */
-.uniForm .ctrlHolder{ padding: 3px; border-bottom: 1px dotted #dfdfdf; }
-
-.uniForm .buttonHolder{
- text-align: left;
- background: #CEDEEF url("../images/buttonHolder_bg.gif") no-repeat right;
- margin: 3em 0 1em;
- padding: 8px;
-}
-.uniForm .resetButton{ float: left; }
-.uniForm .primaryAction{ font-weight: bold; }
-
-/* This class gets added to div.ctrlHolder to highlight the row */
-.uniForm .focused{ background: #fffcdf; }
-
-/* .inlineLabel is used for inputs within labels - checkboxes and radio buttons */
-.uniForm .inlineLabel input,
-.uniForm .inlineLabels .inlineLabel input,
-.uniForm .blockLabels .inlineLabel input{ float: left; margin: 0 .4em 0 0; }
-.uniForm .inlineLabel span{ float: left; width: 90%; }
-
-/* ------------------------------------------------------------------------------ */
-
-/* .blockLabels (default style, will be applied even if you don"t class the parent element) */
-.uniForm .blockLabels .ctrlHolder{}
-
-.uniForm label,
-.uniForm .blockLabels label,
-.uniForm .blockLabels .label{ margin: 0 0 .5em 0; }
-
-.uniForm .textInput,
-.uniForm .blockLabels .textInput,
-.uniForm .blockLabels .fileUpload{ width: 43%; /* <- Required property */ }
-
-.uniForm .selectInput,
-.uniForm select,
-.uniForm .blockLabels .selectInput,
-.uniForm .blockLabels select{ width: 43.5%; /* <- Required property */ }
-.uniForm textarea,
-.uniForm .blockLabels textarea{ width: 43%; /* <- Required property */ height: 12em; }
-
-.uniForm .formHint,
-.uniForm .blockLabels .formHint{ width: 55%; /* <- Required property */ font-size: .9em; color: #777; position: relative; top: -.5em; }
-
-.uniForm .multiField,
-.uniForm .blockLabels .multiField{ width: 43%; }
-.uniForm .multiField .inlineLabel,
-.uniForm .blockLabels .multiField .inlineLabel{ display: block; margin: 0 0 .5em 0; }
-.uniForm .multiField .blockLabel,
-.uniForm .blockLabels .multiField .blockLabel{ width: 30%; margin: 0 10px 0 0; }
-.uniForm .multiField .blockLabel .textInput,
-.uniForm .multiField .blockLabel .selectInput,
-.uniForm .multiField .blockLabel select,
-.uniForm .blockLabels .multiField .blockLabel .textInput,
-.uniForm .blockLabels .multiField .blockLabel .selectInput,
-.uniForm .blockLabels .multiField .blockLabel select{ width: 100%; margin: .3em 0 0 0; }
-
-/* ------------------------------------------------------------------------------ */
-
-/* .inlineLabels */
-.uniForm .inlineLabels .ctrlHolder{}
-
-.uniForm .inlineLabels label,
-.uniForm .inlineLabels .label{ width: 20%; /* <- Required property */ margin: .3em 2% 0 0; /* <- Required property */ }
-
-.uniForm .inlineLabels .textInput,
-.uniForm .inlineLabels .fileUpload{ width: 35%; /* <- Required property */ }
-
-.uniForm .inlineLabels .selectInput,
-.uniForm .inlineLabels select{ width: 35%; /* <- Required property */ }
-
-.uniForm .inlineLabels textarea{ width: 35%; /* <- Required property */ height: 12em; }
-
-.uniForm .inlineLabels .formHint{ margin-top: 0; margin-left: 22%; font-size: .9em; color: #777; position: static; }
-
-.uniForm .inlineLabels .multiField{ width: 60%; /* <- Required property */ margin: 0 0 .3em 0; }
-.uniForm .inlineLabels .multiField .inlineLabel{ display: block; margin: 0 0 .5em 0; }
-.uniForm .inlineLabels .multiField .blockLabel{ float: left; width: 26%; margin: 0 3% 0 0; }
-.uniForm .inlineLabels .multiField .blockLabel .textInput,
-.uniForm .inlineLabels .multiField .blockLabel .selectInput,
-.uniForm .inlineLabels .multiField .blockLabel select{ width: 100%; margin: .3em 0 0 0; }
-
-/* Focus pseudoclasses */
-.uniForm .ctrlHolder .textInput:focus{ outline: none; /* Get rid of the "glow" effect in WebKit, optional */ }
-.uniForm .ctrlHolder textarea:focus{ outline: none; /* Get rid of the "glow" effect in WebKit, optional */ }
-.uniForm div.focused .formHint{ color: #333; }
-
-/* Columns (they are floated left by default) */
-.uniForm .col{ width: 37.9%; /* <- Required property */ margin: 0 2% 20px 0; }
-/* Use .first and .last classes to control the layout/spacing of your columns */
-.uniForm .col.first{ width: 39%; /* <- Required property */ float: left; clear: none; }
-.uniForm .col.last{ width: 39%; /* <- Required property */ float: right; clear: none; margin-right: 0; }
-
-/* Messages */
-.uniForm #errorMsg, .confirmpassworderror{ background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px; }
-.uniForm .error{ background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; }
-
-.uniForm #errorMsg dt, .uniForm #errorMsg h3{ margin: 0 0 .5em 0; font-size: 100%; line-height: 100%; font-weight: bold; }
-.uniForm #errorMsg dd{ margin: 0; padding: 0; }
-.uniForm #errorMsg ol{ margin: 0; padding: 0; list-style:none;}
-.uniForm #errorMsg ol li{ margin: 0; padding: 2px; list-style-position: inside; border-bottom: 1px dotted #df7d7d; position: relative; }
-.uniForm .errorField{ color: #af4c4c; margin: 0 0 6px 0; padding: 4px; background: #ffbfbf; }
-
-.uniForm #OKMsg, .confirmpasswordok{ background: #C8FFBF; border: 1px solid #A2EF95; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px; }
-.uniForm #OKMsg p{ margin: 0; }
-
-/* ------------------------------------------------------------------------------ */
-
-/* This is the main unit that contains our form elements */
-
-.uniForm .textInput, .uniForm .selectInput, .uniForm textarea {
- background:#FFFFFF none repeat scroll 0 0;
- color: #000000;
- border: 1px solid #DFDFDF;
- padding: 1px;
-}
-
-/* jquery-ui-custom
--------------------------------------------------------------- */
-.ui-datepicker-calendar thead tr th {
- background-image:none;
- background-color:#FFFFFF;
- color:#000000;
-}
-.ui-widget { font-family: "Trebuchet MS", Arial, sans-serif; font-size: 100%; }
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: "Trebuchet MS", Arial, sans-serif; font-size: 100%; }
-ul.ui-autocomplete { max-height: 250px; overflow-y: auto; min-width: 85px;}
-.ui-combobox { position: relative; display: inline-block; margin-right: 17px; }
-.ui-combobox-toggle { position: absolute !important; top: 0; bottom: 0; margin-left: -1px; padding: 1px !important; background: none repeat scroll 0 0 #FFFFFF !important; border: 1px solid #DFDFDF !important;}
-.ui-combobox-input { background: none repeat scroll 0 0 #FFFFFF !important; border: 1px solid #DFDFDF !important; padding: 1px; font-weight: normal !important; }
-.panel_install_package .ui-combobox { float: left; }
-.clear-float { clear: both; }
-
-a.link-page, span.page-spacer {
- display: inline-block;
- text-align: center;
- padding: 2px;
- line-height: 16px;
- text-decoration: none !important;
- color: inherit !important;
- min-width: 16px;
-}
-a.link-page {
- border: 1px solid #FFFFFF;
- margin: 0 5px;
-}
-
-a.link-page:hover {
- background-color: #DFDFDF;
-}
-
-span.page-spacer {
- margin: 0 -5px;
-}
-
-a.link-page.current-page {
- background-color: #DFDFDF;
- font-weight: bold;
+@charset "UTF-8";
+/*
+ Document : styles.css
+ Created on : 06.07.2012, 12:21:59
+ Author : Christian Foellmann (foe-services.de)
+ Description:
+ Basis was css-code from the "ISPConfig 3: default theme" which was based on
+ "Yet Another Multicolumn Layout" - (X)HTML/CSS Framework 3.0.6
+ by Copyright 2005-2008, Dirk Jesse (http://www.yaml.de)
+*/
+
+/* overall
+-------------------------------------------------------------- */
+* {
+ margin: 0;
+ padding: 0;
+}
+html * { font-size: 100.01% }
+body {
+ font-family: "Trebuchet MS", sans-serif;
+ font-size: 75.00%;
+ color: #444;
+ background: url("../images/screen_bg.png") repeat-x top left fixed #EEEEEE;
+ padding: 10px 0;
+}
+ul, ol, dl { line-height: 1.5em; margin: 0 0 1em 1em }
+li { margin-left: 1.5em; line-height: 1.5em }
+dt { font-weight: bold }
+dd { margin: 0 0 1em 2em }
+a {
+ color: #4D87C7;
+ text-decoration:none;
+}
+a:focus,
+a:hover,
+a:active {
+ color:#182E7A;
+ text-decoration:underline;
+}
+hr {
+ color: #fff;
+ background:transparent;
+ margin: 0 0 0.5em 0;
+ padding: 0 0 0.5em 0;
+ border:0;
+ border-bottom: 1px #eee solid;
+}
+textarea, pre, tt, code {
+ font-family: Consolas,"Lucida Console","Courier New",monospace;
+ font-size: 0.9em;
+}
+
+h1,h2,h3,h4,h5,h6 {
+ font-family: "Trebuchet MS", sans-serif;
+ font-weight:bold;
+ color:#666;
+ margin: 0 0 0.25em 0;
+}
+h1 { font-size: 200% } /* 24px */
+h2 { font-size: 200% } /* 24px */
+h3 { font-size: 150% } /* 18px */
+h4 { font-size: 133.33% } /* 16px */
+h5 { font-size: 116.67% } /* 14px */
+h6 { font-size: 116.67%; font-style:italic } /* 14px */
+
+p { line-height: 1.5em; margin: 0 0 1em 0; }
+
+cite, blockquote { font-style:italic }
+blockquote { margin: 0 0 1em 1.5em }
+
+strong,b { font-weight: bold }
+em,i { font-style:italic }
+
+pre, code { font-family: monospace; font-size: 1.1em; }
+
+acronym, abbr {
+ letter-spacing: .07em;
+ border-bottom: .1em dashed #c00;
+ cursor: help;
+}
+
+header, #nav, #main, footer {
+ clear: both;
+}
+#page {
+ min-width: 980px;
+ max-width: 80%;
+ background: #fff;
+ text-align:left;
+ margin: 0 auto;
+ padding: 10px;
+}
+.skip, .hideme, .print {
+ height: 1px;
+ left: -1000em;
+ position: absolute;
+ top: -1000em;
+ width: 1px;
+}
+
+/* header
+-------------------------------------------------------------- */
+header {
+ position: relative;
+ color: #faf0e6;
+ padding: 15px 2em 5px 20px;
+ background: url("../images/header_bg.png") repeat-x top left #9a9a9a;
+}
+header h1 {
+ font-size:2.5em;
+ letter-spacing:-2px;
+ line-height:65%;
+ color: silver;
+}
+header span {
+ color: #333333;
+}
+
+/* header/topsubnav
+-------------------------------------------------------------- */
+#topsubnav {
+ position:absolute;
+ top: 10px;
+ right: 10px;
+ text-align: right;
+}
+#topsubnav a {
+ color: #f0f8ff;
+ font-weight: normal;
+ background:transparent;
+ text-decoration:none;
+}
+#topsubnav a:focus,
+#topsubnav a:hover,
+#topsubnav a:active {
+ text-decoration:underline;
+ background-color: transparent;
+}
+
+/* nav
+-------------------------------------------------------------- */
+#topNav ul {
+ list-style: none;
+ padding: 0 0 0 20px;
+ margin: 0;
+ background: #9a9a9a
+}
+
+#topNav ul li {
+ display: inline;
+ margin: 0 2px 0 0;
+}
+
+#topNav a {
+ background: url("../icons/x32_sprite.png") no-repeat #D3D3D3;
+ border-top-left-radius:5px;
+ border-top-right-radius:5px;
+ color:black;
+ display:inline-block;
+ height:20px;
+ padding-top:37px;
+ text-align:center;
+ text-decoration:none;
+ min-width:78px;
+}
+
+#topNav a:hover {
+ background-color: #eeeeee;
+ color: #000000;
+}
+
+#topNav #topNav_current a {
+ font-weight: bold;
+ color: black;
+ background-color: #ffffff;
+}
+.topnav-tools { background-position: 22px -10px !important; }
+.topnav-admin { background-position: 22px -74px !important; }
+.topnav-sites { background-position: 22px -523px !important; }
+.topnav-monitor { background-position: 22px -585px !important; }
+.topnav- { background-position: 22px -650px !important; }
+.topnav-help { background-position: 22px -715px !important; }
+.topnav-mail { background-position: 22px -780px !important; }
+.topnav-mailuser { background-position: 22px -780px !important; }
+.topnav-vm { background-position: 22px -842px !important; }
+.topnav-domain { background-position: 22px -905px !important; }
+.topnav-dns { background-position: 22px -970px !important; }
+.topnav-dashboard { background-position: 22px -1035px !important; }
+.topnav-client { background-position: 22px -1098px !important; }
+.topnav-billing { background-position: 22px -1162px !important; }
+#topNav a span {
+ padding: 0 3px;
+ }
+/* main
+-------------------------------------------------------------- */
+#main {
+ background: #fff;
+ padding: 1em 0;
+}
+
+/* main/sideNav + submenu
+-------------------------------------------------------------- */
+#sideNav {
+ width: 200px;
+ float:left;
+ padding: 0 10px 0 0;
+}
+
+#submenu {
+ width: 100%;
+ overflow: hidden;
+ margin: 0px;
+ list-style-type: none;
+ border-bottom: 2px #ddd solid;
+}
+
+#submenu ul {
+ list-style-type: none;
+ margin:0;
+ padding: 0;
+}
+#submenu li {
+ float:left;
+ width: 100%;
+ margin:0;
+ padding: 0;
+ font-size:0.9em;
+}
+
+#submenu a,
+#submenu strong {
+ display:block;
+ width: 90%;
+ padding: 2px 0px 2px 10%;
+ text-decoration: none;
+ background-color:#fff;
+ color: #444;
+ border-bottom: 1px #eee solid;
+}
+
+/* Menu Title */
+#submenu li.title {
+ width: 100%;
+ padding: 0px;
+ font-weight: bold;
+ color: #444;
+ background-color: #fff;
+ border-top: 2px #888 solid;
+ font-size: 1.1em;
+}
+
+#submenu li.title a {
+ background-color: #f0f8ff;
+ color: #444;
+}
+#submenu li.title a:hover {
+ color: white;
+}
+
+#submenu li span {
+ display:block;
+ width: 90%;
+ padding: 3px 0px 3px 10%;
+ font-weight: bold;
+ border-bottom: 1px #ddd solid;
+}
+
+/* Level 1 */
+#submenu li.active,
+#submenu li strong {
+ width: 90%;
+ padding: 3px 0px 3px 10%;
+ font-weight: bold;
+ color: #fff;
+ background-color:#aab;
+ border-bottom: 1px #eee solid;
+}
+
+#submenu li a {
+ width: 90%;
+ padding-left: 10%;
+ background-color:#fff;
+ color: #444;
+}
+#submenu li a:focus,
+#submenu li a:hover,
+#submenu li a:active {
+ background-color:#f63;
+ color: #fff;
+}
+
+/* Form-Elements in the Menu*/
+#submenu * select#server_id {
+ margin: 3px 10%;
+ padding: 1px;
+ width: 80%;
+}
+
+/* main/content
+-------------------------------------------------------------- */
+#content {
+ margin-left: 200px;
+ margin-right: 0;
+ padding: 0px 10px 10px 20px;
+ border-left: 1px #ddd solid;
+}
+
+/* footer
+-------------------------------------------------------------- */
+
+footer {
+ color:#666;
+ background: #f9f9f9;
+ padding: 10px 20px;
+ border-top: 5px #efefef solid;
+ font-size: 0.8em;
+ text-align: center;
+}
+footer a {
+ color: #999;
+ background:transparent;
+ font-weight: bold;
+}
+footer a:hover, footer a:active {
+ color: #4D87C7;
+ background-color: transparent;
+ text-decoration:underline;
+}
+
+/* Set a background-color, no system backgorund used anymore */
+select, input, textarea {
+ background: #FFFFFF;
+ border: 1px solid #DFDFDF;
+ padding: 1px;
+ outline:none;
+}
+
+table { width: auto; border-collapse:collapse; margin-bottom: 0.5em; }
+table.full { width: 100%; }
+table.fixed { table-layout:fixed }
+
+table.list td {
+ max-width: 350px;
+ min-width: 32px;
+ white-space: nowrap;
+ overflow:hidden;
+ text-overflow: ellipsis;
+ -o-text-overflow: ellipsis;
+ -icab-text-overflow: ellipsis;
+ -khtml-text-overflow: ellipsis;
+ -moz-text-overflow: ellipsis;
+ -webkit-text-overflow: ellipsis;
+}
+th,
+td {
+ padding: 0.5em;
+ text-align:left;
+}
+thead th {
+ background: #444 url("../images/lists_thead_bg.png") repeat-x;
+ color: #fff;
+}
+tbody th {
+ background: #ccc;
+ color: #333;
+}
+tbody th.sub {
+ background: #ddd;
+ color: #333;
+}
+table.list th[class$="_pid"],
+table.list td[class$="_pid"],
+table.list th[class$="_active"],
+table.list td[class$="_active"],
+table.list th.tbl_col_autoresponder,
+table.list td.tbl_col_autoresponder {
+ width: 70px;
+ text-align: center;
+}
+table.list .tbl_col_buttons,
+table.list .tbl_col_limit {
+ width: 150px;
+}
+.tbl_col_client_pid input {
+ width: 50px;
+}
+.pnl_listarea th[class^="tbl_col"] { cursor:pointer; }
+.pnl_listarea th[class^="tbl_col"]:hover { background-position:0 -15px!important; }
+.pnl_listarea th.tbl_col_nosort { cursor:default; }
+.pnl_listarea th.tbl_col_nosort:hover { background-position:0 0!important; }
+
+.pageForm_description { font-size: 12px; }
+
+/* Tab-Box */
+.tabbox_tabs { border-bottom: 1px solid #d3d3d3; }
+.tabbox_tabs ul {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+}
+.tabbox_tabs li {
+ display: inline;
+ margin: 0 2px 0 0;
+}
+.tabbox_tabs a {
+ padding: 0 1em;
+ text-decoration: none;
+ color: black;
+ background: #d3d3d3;
+ border: 1px solid #d3d3d3;
+}
+.tabbox_tabs a:hover {
+ background: #fc0;
+ color: #540;
+}
+.tabbox_tabs .active a {
+ font-weight: bold;
+ color: #ff6600;
+ background: #ffffff;
+}
+.pnl_toolsarea fieldset, .pnl_listarea fieldset, .pnl_formsarea fieldset {
+ border-top: 1px solid #949494;
+ margin: 20px 0;
+}
+.pnl_toolsarea fieldset legend , .pnl_listarea fieldset legend {
+ font-weight: bold;
+ color: #6299c5;
+}
+.pnl_formarea fieldset {
+ font-weight: bold;
+}
+/* hide line and legend when inside tabbed content */
+#tabbox_content * .pnl_toolsarea fieldset, #tabbox_content * .pnl_listarea fieldset, #tabbox_content * .pnl_formsarea fieldset { border: none !important; }
+#tabbox_content * .pnl_toolsarea fieldset legend, #tabbox_content * .pnl_listarea fieldset legend, #tabbox_content * .pnl_formsarea fieldset legend { display: none !important; }
+.codeview {
+ margin:20px 0;
+ padding:2px;
+ border: 1px solid #ffcc00;
+ background: #fffaea;
+ font-family: Consolas, "Lucida Console", "Courier New", monospace;
+ font-size: 0.9em;
+}
+/* Lists */
+table.list {
+ width: 100%;
+ border: 1px solid #d3d3d3 !important;
+}
+table.list thead th { font-size: 10px; }
+table.list tbody { border: 1px solid #d3d3d3 !important; }
+table.list tfoot td { text-align: center; background: #f8f8f8 url("../images/lists_tfoot_bg.png") repeat-x bottom left; padding: 24px 8px 8px 8px; }
+table.list .tbl_paging img { vertical-align: top; }
+table.list .tbl_row_even { background: #fcfcfc; }
+table.list .tbl_row_uneven { background: #f0f8ff; }
+table.list tr:hover { background: #fffacd; }
+table.list td { word-wrap:break-word;white-space:pre-wrap; }
+table.list td.tbl_col_buttons { word-wrap:normal;white-space:normal;overflow:visible; }
+
+/* Password Strength */
+#passBar {
+ width: 101px; height: 10px;
+ background: url("../images/meter_bg.gif") repeat-x bottom left;
+ margin: 2px 0;
+ float: left;
+}
+#passText {
+ padding: 0;
+ float: left;
+}
+
+/* Systemmonitor */
+.systemmonitor-server,
+.systemmonitor-ve,
+.systemmonitor-state {
+ margin: 10px 5px;
+ font-family: Consolas, "Lucida Console", "Courier New", monospace;
+ font-size: 0.9em;
+ float: left;
+ width: 100%;
+}
+.systemmonitor-server:hover,
+.systemmonitor-vm:hover { background-color: #FFFACD; }
+.state-no_state,
+.state-no_state-ve {
+ border-top: 4px solid #95A19F;
+ background-color: #f8f8ff;
+}
+.state-unknown,
+.state-unknown-ve {
+ border-top: 4px solid #30302e;
+ background-color: #cecfc5;
+}
+.state-ok,
+.state-ok-ve {
+ border-top: 4px solid #23fb00;
+ background-color: #adffa2;
+}
+.state-info,
+.state-info-ve {
+ border-top: 4px solid #183e99;
+ background-color: #d4e2ff;
+}
+.state-warning,
+.state-warning-ve {
+ border-top: 4px solid #ffa800;
+ background-color: #ffda93;
+}
+.state-critical,
+.state-critical-ve {
+ border-top: 4px solid #ff0000;
+ background-color: #ffb9b9;
+}
+.state-error,
+.state-error-ve {
+ border-top: 4px solid #ff0000;
+ background-color: #ff7f7f;
+}
+div.icoDevice {
+ float: left;
+ width: 64px;
+ height: 64px;
+ margin: 5px;
+ background: url("../icons/device_sprite.png") no-repeat transparent;
+}
+.systemmonitor-server div.icoDevice { background-position: 0 0; }
+.systemmonitor-ve div.icoDevice { background-position: -64px 0; }
+.systemmonitor-network div.icoDevice { background-position: -128px 0; }
+div.statusDevice,
+div.statusMsg { float: left; }
+div.statusMsg p {
+ float: left;
+ padding: 5px;
+}
+.systemmonitor-state .status {
+ margin: 5px;
+}
+.status {
+ float: right;
+ width: 32px;
+ height: 32px;
+ background: url("../icons/x32_sprite.png") no-repeat transparent;
+}
+div.status {
+ float: left !important;
+}
+.state-warning .status,
+.state-warning-ve .status { background-position: 0 -143px; }
+.state-no_state .status,
+.state-no_state-ve .status,
+.state-unknown .status,
+.state-unknown-ve .status { background-position: 0 -207px; }
+.state-ok .status,
+.state-ok-ve .status { background-position: 0 -270px; }
+.state-info .status,
+.state-info-ve .status { background-position: 0 -336px; }
+.state-error .status,
+.state-error-ve .status { background-position: 0 -400px; }
+.state-critical .status,
+.state-critical-ve .status { background-position: 0 -463px; }
+
+/* Usage unknown
+.systemmonitor-content table {
+ border: none;
+ margin-top: 10px;
+}
+
+.systemmonitor-content * .online {
+ border: 1px solid #ffffff;
+ background-color: #E3FFB8;
+ color: #000000;
+ padding:0px 5px;
+}
+.systemmonitor-content * .offline {
+ border: 1px solid #ffffff;
+ background-color: #d12f19;
+ color:#ffffff;
+ padding:0px 5px;
+}*/
+
+/* Dashboard */
+.dashboard-modules {
+ float:left;
+ width:60px;
+ height: 60px;
+ border:1px dotted #888888;
+ border-radius:5px;
+ background-color: #cccccc;
+ margin:10px;
+ background-position: center 5px;
+ background-repeat: no-repeat;
+ text-align: center;
+}
+.dashboard-modules a,
+.dashboard-modules a:hover {
+ background: url("../icons/x32_sprite.png") no-repeat transparent;
+ color:Black;
+ display:block;
+ font-weight:bold;
+ height:30px;
+ padding-top:42px;
+ width:60px;
+ text-decoration: none;
+}
+.dashboard-modules.tools a { background-position: 12px -9px; }
+.dashboard-modules.admin a { background-position: 12px -73px; }
+.dashboard-modules.sites a { background-position: 12px -520px; }
+.dashboard-modules.monitor a { background-position: 13px -585px; }
+.dashboard-modules.help a { background-position: 13px -716px; }
+.dashboard-modules.mail a { background-position: 12px -776px; }
+.dashboard-modules.vm a { background-position: 14px -842px; }
+.dashboard-modules.domain a { background-position: 12px -905px; }
+.dashboard-modules.dns a { background-position: 12px -970px; }
+.dashboard-modules.client a { background-position: 13px -1096px; }
+.dashboard-modules.billing a { background-position: 14px -1162px; }
+
+.panel_dashboard h2 { font-size:20px; }
+
+/* Image-Replacement */
+.swap { background-repeat:no-repeat; }
+.swap span { display:none; height:16px; }
+#ir-HeaderLogo {
+ background-image: url("../images/header_logo.png");
+ height:32px;
+ margin:0 0 0.2em;
+}
+div#ir-Yes,
+div#ir-No {
+ text-align: center;
+ background: url("../icons/x16_sprite.png") no-repeat transparent;
+}
+#ir-Yes {
+ background-position: center -342px !important;
+ height: 16px;
+}
+#ir-No {
+ background-position: center -362px !important;
+ height: 16px;
+}
+.swap {
+ background-repeat: no-repeat;
+}
+.swap span {
+ display: none;
+ height: 16px;
+}
+/* BUTTONS */
+a.button,
+.button,
+.buttons button {
+ display: inline-block;
+ margin: 0 2px;
+ padding: 2px 5px;
+ color: #525252;
+ text-shadow: 0px 1px 1px #fff;
+ border: 1px solid #c6c6c6;
+ border-radius: 4px;
+ background-color: #f7f7f7;
+ box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3);
+ -o-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3);
+ -webkit-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3);
+ -moz-box-shadow: 0 1px 1px 0 rgba(140, 140, 140, 0.3);
+ text-decoration: none;
+}
+a.button:focus,
+input.button:focus,
+.buttons button:focus {
+ border-color: #4fadd5;
+ box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
+ -moz-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
+ -webkit-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
+ -o-box-shadow: 0 0 2px 1px rgba(71,135,177, 0.6);
+ outline: none;
+}
+.buttons button[type]{
+ padding:5px 10px 5px 7px; /* Firefox */
+ line-height:17px; /* Safari */
+ white-space: nowrap;
+}
+*:first-child+html button[type]{
+ padding:4px 10px 3px 7px; /* IE7 */
+}
+.buttons button img,
+.buttons a img {
+ margin:0 3px -3px 0 !important;
+ padding:0;
+ border:none;
+ width:16px;
+ height:16px;
+}
+.topbuttons {
+ margin-bottom: 10px;
+}
+/* BUTTONS STANDARD */
+button:hover,
+.buttons a:hover {
+ background-color:#dff4ff;
+ border:1px solid #c2e1ef;
+ color:#336699;
+}
+.buttons a:active {
+ background-color:#6299c5;
+ border:1px solid #6299c5;
+ color:#fff;
+}
+
+/* BUTTONS POSITIVE */
+button.positive,
+.buttons a.positive { color:#529214; }
+.buttons a.positive:hover,
+button.positive:hover {
+ background-color:#E6EFC2;
+ border:1px solid #C6D880;
+ color:#529214;
+}
+.buttons a.positive:active {
+ background-color:#529214;
+ border:1px solid #529214;
+ color:#fff;
+}
+
+/* BUTTONS NEGATIVE */
+.buttons a.negative,
+button.negative {
+ color:#d12f19;
+}
+.buttons a.negative:hover,
+button.negative:hover {
+ background-color:#fbe3e4;
+ border:1px solid #fbc2c4;
+ color:#d12f19;
+}
+.buttons a.negative:active {
+ background-color:#d12f19;
+ border:1px solid #d12f19;
+ color:#fff;
+}
+
+/* Button with icon and text */
+.iconstxt { background: url("../icons/button_sprite.png") no-repeat transparent; }
+.iconstxt span { padding-left: 20px; font-weight: bold; }
+.iconstxt.icoPositive { background-position: 6px -130px; }
+.iconstxt.icoNegative { background-position: 6px -98px; }
+.iconstxt.icoAdd { background-position: 6px -66px; }
+.iconstxt.icoKey { background-position: 6px -1px; }
+.iconstxt.icoDelete { background-position: 6px -34px; }
+.iconstxt.icoDownload { background-position: 6px -1px; }
+.iconstxt.icoRestore { background-position: 6px -1px; }
+
+/* Button with icon and without text */
+.icons16 { position: relative; }
+.icons16>span {
+ opacity: 0;
+ visibility: hidden;
+ -webkit-transition: opacity 1s linear;
+ -moz-transition: opacity 1s linear;
+ -o-transition: opacity 1s linear;
+ -ms-transition: opacity 1s linear;
+ transition: opacity 1s linear;
+ position: absolute;
+ right: 23px;
+ top: -1px;
+ padding: 1px 2px;
+ border: 1px solid rgb(155,155,11);
+ background: rgb(255,255,111);
+ white-space: nowrap;
+}
+.icons16:hover>span {
+ opacity: 1.0;
+ visibility: visible;
+}
+a.icons16 {
+ height: 18px;
+ width: 18px;
+ padding: 0;
+ background: url("../icons/x16_sprite.png") no-repeat transparent;
+}
+button.icons16 {
+ height: 20px;
+ width: 20px;
+ padding: 0;
+ background: url("../icons/x16_sprite.png") no-repeat transparent;
+}
+.icons16.icoEdit { background-position: -1px -1px; }
+.icons16.icoLoginAs { background-position: -1px -21px; }
+.icons16.icoPDF { background-position: -1px -61px; }
+.icons16.icoDelete { background-position: -1px -81px; }
+.icons16.icoWebmailer { background-position: -1px -101px; }
+.icons16.icoFilter { background-position: -1px -161px; }
+.icons16.icoDbAdmin { background-position: -1px -221px; }
+.icons16.icoAction { background-position: -1px -241px; }
+.icons16.icoLink { background-position: -1px -422px; float: right; }
+
+div.group-icon {
+ float: left;
+ padding: 2px 0;
+}
+.group-admin,
+.group-user {
+ height: 20px;
+ width: 20px;
+ padding: 0;
+ float: left;
+ background: url("../icons/x16_sprite.png") no-repeat transparent;
+}
+.group-admin { background-position: 0 -380px; }
+.group-user { background-position: 0 -400px; }
+
+span.marked { color: #cc0000; }
+span.small { font-size: 0.9em; }
+
+#ajaxloader {
+ position: absolute;
+ width: 325px;
+ height: 150px;
+ background: #ffffff url('../images/ajax-loader.gif') no-repeat center center;
+ border: solid 2px #e1e1e1;
+ border-radius: 10px;
+ /*background: rgba(255, 255, 255, 0.85);*/
+ padding: 20px;
+ text-align:center;
+ z-index: 100;
+}
+.blockLabel.email_at {
+ width: 20px !important;
+ margin: 1.6em 0.3em 0 0 !important;
+}
+.textDisplay { display: block; }
+
+/* Form Length Classes */
+.textInput.formLengthBool { width: 25px !important; }
+.selectInput.formLengthBool { width: 60px !important; }
+.textInput.formLengthLimit { width: 50px !important; }
+.selectInput.formLengthLimit { width: 85px !important; }
+.formLengthDate { width: 75px !important; }
+.formLengthIPv4 { width: 125px !important; }
+.formLengthIPv6 { }
+.formLengthEmailUser { width: 30% !important; }
+.formLengthEmailDomain { width: 30% !important; }
+.formLengthHalf { width: 15% !important; }
+.formLengthDouble { width: 50% !important; }
+
+/* Individual Form Lengths */
+.textInput#username,
+.textInput#password,
+.textInput#passwort,
+.textInput#source_password { width: 100px; }
+.selectInput#language { width: 75px; }
+.selectInput#client_group_id, .selectInput#default_group { width: 125px; }
+input#refresh, input#retry, input#expire, input#minimum, input#ttl { width: 50px !important; }
+
+/* --- */
+
+a[href $="#logout"] {
+ padding-right: 20px;
+ background: url("../icons/x16_sprite.png") no-repeat right -143px transparent !important;
+}
+
+/* Select Menu with Images */
+select.withicons option {
+ background-repeat:no-repeat;
+ background-position: 1px;
+ padding-left:24px;
+}
+div[class^=country-] {
+ background-image: url("../icons/flags_sprite.png");
+ background-repeat: no-repeat;
+ height: 20px;
+ width: 26px;
+}
+li[class^=country-] {
+ background-image: url("../icons/flags_sprite.png");
+ background-repeat: no-repeat;
+ text-indent: 24px;
+}
+li[class^=country-] a.ui-state-hover { background: transparent; }
+div[class^=country-] span {
+ display: none;
+}
+select.flags option {
+ background-image: url("../icons/flags_sprite.png");
+ background-repeat: no-repeat;
+ padding: 1px 0 1px 30px;
+}
+select.flags option[value=EL] {background-position:0 -1475px}
+select.flags option[value=AD], select.flags option[value=ad], .country-AD {background-position:0 -1px}
+select.flags option[value=AE], select.flags option[value=ae], .country-AE {background-position:0 -23px}
+select.flags option[value=AF], select.flags option[value=af], .country-AF {background-position:0 -45px}
+select.flags option[value=AG], select.flags option[value=ag], .country-AG {background-position:0 -67px}
+select.flags option[value=AI], select.flags option[value=ai], .country-AI {background-position:0 -89px}
+select.flags option[value=AL], select.flags option[value=al], .country-AL {background-position:0 -111px}
+select.flags option[value=AM], select.flags option[value=am], .country-AM {background-position:0 -133px}
+select.flags option[value=AN], select.flags option[value=an], .country-AN {background-position:0 -155px}
+select.flags option[value=AO], select.flags option[value=ao], .country-AO {background-position:0 -177px}
+select.flags option[value=AQ], select.flags option[value=aq], .country-AQ {background-position:0 -199px}
+select.flags option[value=AR], select.flags option[value=ar], .country-AR {background-position:0 -221px}
+select.flags option[value=AS], select.flags option[value=as], .country-AS {background-position:0 -243px}
+select.flags option[value=AT], select.flags option[value=at], .country-AT {background-position:0 -265px}
+select.flags option[value=AU], select.flags option[value=au], .country-AU {background-position:0 -287px}
+select.flags option[value=AW], select.flags option[value=aw], .country-AW {background-position:0 -309px}
+select.flags option[value=AX], select.flags option[value=ax], .country-AX {background-position:0 -331px}
+select.flags option[value=AZ], select.flags option[value=az], .country-AZ {background-position:0 -353px}
+select.flags option[value=BA], select.flags option[value=ba], .country-BA {background-position:0 -375px}
+select.flags option[value=BB], select.flags option[value=bb], .country-BB {background-position:0 -397px}
+select.flags option[value=BD], select.flags option[value=bd], .country-BD {background-position:0 -419px}
+select.flags option[value=BE], select.flags option[value=be], .country-BE {background-position:0 -441px}
+select.flags option[value=BF], select.flags option[value=bf], .country-BF {background-position:0 -463px}
+select.flags option[value=BG], select.flags option[value=bg], .country-BG {background-position:0 -485px}
+select.flags option[value=BH], select.flags option[value=bh], .country-BH {background-position:0 -507px}
+select.flags option[value=BI], select.flags option[value=bi], .country-BI {background-position:0 -529px}
+select.flags option[value=BJ], select.flags option[value=bj], .country-BJ {background-position:0 -551px}
+select.flags option[value=BM], select.flags option[value=bm], .country-BM {background-position:0 -573px}
+select.flags option[value=BN], select.flags option[value=bn], .country-BN {background-position:0 -595px}
+select.flags option[value=BO], select.flags option[value=bo], .country-BO {background-position:0 -617px}
+select.flags option[value=BR], select.flags option[value=br], .country-BR {background-position:0 -639px}
+select.flags option[value=BS], select.flags option[value=bs], .country-BS {background-position:0 -661px}
+select.flags option[value=BT], select.flags option[value=bt], .country-BT {background-position:0 -683px}
+select.flags option[value=BV], select.flags option[value=bv], .country-BV {background-position:0 -705px}
+select.flags option[value=BW], select.flags option[value=bw], .country-BW {background-position:0 -727px}
+select.flags option[value=BY], select.flags option[value=by], .country-BY {background-position:0 -749px}
+select.flags option[value=BZ], select.flags option[value=bz], .country-BZ {background-position:0 -771px}
+select.flags option[value=CA], select.flags option[value=ca], .country-CA {background-position:0 -793px}
+select.flags option[value=CC], select.flags option[value=cc], .country-CC {background-position:0 -837px}
+select.flags option[value=CD], select.flags option[value=cd], .country-CD {background-position:0 -859px}
+select.flags option[value=CF], select.flags option[value=cf], .country-CF {background-position:0 -881px}
+select.flags option[value=CG], select.flags option[value=cg], .country-CG {background-position:0 -903px}
+select.flags option[value=CH], select.flags option[value=ch], .country-CH {background-position:0 -925px}
+select.flags option[value=CI], select.flags option[value=ci], .country-CI {background-position:0 -947px}
+select.flags option[value=CK], select.flags option[value=ck], .country-CK {background-position:0 -969px}
+select.flags option[value=CL], select.flags option[value=cl], .country-CL {background-position:0 -991px}
+select.flags option[value=CM], select.flags option[value=cm], .country-CM {background-position:0 -1013px}
+select.flags option[value=CN], select.flags option[value=cn], .country-CN {background-position:0 -1035px}
+select.flags option[value=CO], select.flags option[value=co], .country-CO {background-position:0 -1057px}
+select.flags option[value=CR], select.flags option[value=cr], .country-CR {background-position:0 -1079px}
+select.flags option[value=CS], select.flags option[value=cs], .country-CS {background-position:0 -1101px}
+select.flags option[value=CU], select.flags option[value=cu], .country-CU {background-position:0 -1123px}
+select.flags option[value=CV], select.flags option[value=cv], .country-CV {background-position:0 -1145px}
+select.flags option[value=CX], select.flags option[value=cx], .country-CX {background-position:0 -1167px}
+select.flags option[value=CY], select.flags option[value=cy], .country-CY {background-position:0 -1189px}
+select.flags option[value=CZ], select.flags option[value=cz], .country-CZ {background-position:0 -1211px}
+select.flags option[value=DE], select.flags option[value=de], .country-DE {background-position:0 -1233px}
+select.flags option[value=DJ], select.flags option[value=dj], .country-DJ {background-position:0 -1255px}
+select.flags option[value=DK], select.flags option[value=dk], .country-DK {background-position:0 -1277px}
+select.flags option[value=DM], select.flags option[value=dm], .country-DM {background-position:0 -1299px}
+select.flags option[value=DO], select.flags option[value=do], .country-DO {background-position:0 -1321px}
+select.flags option[value=DZ], select.flags option[value=dz], .country-DZ {background-position:0 -1343px}
+select.flags option[value=EC], select.flags option[value=ec], .country-EC {background-position:0 -1365px}
+select.flags option[value=EE], select.flags option[value=ee], .country-EE {background-position:0 -1387px}
+select.flags option[value=EG], select.flags option[value=eg], .country-EG {background-position:0 -1409px}
+select.flags option[value=EH], select.flags option[value=eh], .country-EH {background-position:0 -1431px}
+select.flags option[value=ER], select.flags option[value=er], .country-ER {background-position:0 -1475px}
+select.flags option[value=ES], select.flags option[value=es], .country-ES {background-position:0 -1497px}
+select.flags option[value=ET], select.flags option[value=ET], select.flags option[value=et], .country-ET {background-position:0 -1519px}
+select.flags option[value=FI], select.flags option[value=fi], .country-FI {background-position:0 -1585px}
+select.flags option[value=FJ], select.flags option[value=fj], .country-FJ {background-position:0 -1607px}
+select.flags option[value=FK], select.flags option[value=fk], .country-FK {background-position:0 -1629px}
+select.flags option[value=FM], select.flags option[value=fm], .country-FM {background-position:0 -1651px}
+select.flags option[value=FO], select.flags option[value=fo], .country-FO {background-position:0 -1673px}
+select.flags option[value=FR], select.flags option[value=fr], .country-FR {background-position:0 -1695px}
+select.flags option[value=GA], select.flags option[value=ga], .country-GA {background-position:0 -1717px}
+select.flags option[value=GB], select.flags option[value=en], select.flags option[value=gb], .country-GB, .country-EN {background-position:0 -1739px}
+select.flags option[value=GD], select.flags option[value=gd], .country-GD {background-position:0 -1761px}
+select.flags option[value=GE], select.flags option[value=ge], .country-GE {background-position:0 -1783px}
+select.flags option[value=GF], select.flags option[value=gf], .country-GF {background-position:0 -1805px}
+select.flags option[value=GH], select.flags option[value=gh], .country-GH {background-position:0 -1827px}
+select.flags option[value=GI], select.flags option[value=gi], .country-GI {background-position:0 -1849px}
+select.flags option[value=GL], select.flags option[value=gl], .country-GL {background-position:0 -1871px}
+select.flags option[value=GM], select.flags option[value=gm], .country-GM {background-position:0 -1893px}
+select.flags option[value=GN], select.flags option[value=gn], .country-GN {background-position:0 -1915px}
+select.flags option[value=GP], select.flags option[value=gp], .country-GP {background-position:0 -1937px}
+select.flags option[value=GQ], select.flags option[value=gq], .country-GQ {background-position:0 -1959px}
+select.flags option[value=GR], select.flags option[value=el], select.flags option[value=gr], .country-GR, .country-EL {background-position:0 -1981px}
+select.flags option[value=GS], select.flags option[value=gs], .country-GS {background-position:0 -2003px}
+select.flags option[value=GT], select.flags option[value=gt], .country-GT {background-position:0 -2025px}
+select.flags option[value=GU], select.flags option[value=gu], .country-GU {background-position:0 -2047px}
+select.flags option[value=GW], select.flags option[value=gw], .country-GW {background-position:0 -2069px}
+select.flags option[value=GY], select.flags option[value=gy], .country-GY {background-position:0 -2091px}
+select.flags option[value=HK], select.flags option[value=hk], .country-HK {background-position:0 -2113px}
+select.flags option[value=HM], select.flags option[value=hm], .country-HM {background-position:0 -2135px}
+select.flags option[value=HN], select.flags option[value=hn], .country-HN {background-position:0 -2157px}
+select.flags option[value=HR], select.flags option[value=hr], .country-HR {background-position:0 -2179px}
+select.flags option[value=HT], select.flags option[value=ht], .country-HT {background-position:0 -2201px}
+select.flags option[value=HU], select.flags option[value=hu], .country-HU {background-position:0 -2223px}
+select.flags option[value=ID], select.flags option[value=id], .country-ID {background-position:0 -2245px}
+select.flags option[value=IE], select.flags option[value=ie], .country-IE {background-position:0 -2267px}
+select.flags option[value=IL], select.flags option[value=il], .country-IL {background-position:0 -2289px}
+select.flags option[value=IN], select.flags option[value=in], .country-IN {background-position:0 -2311px}
+select.flags option[value=IO], select.flags option[value=io], .country-IO {background-position:0 -2333px}
+select.flags option[value=IQ], select.flags option[value=iq], .country-IQ {background-position:0 -2355px}
+select.flags option[value=IR], select.flags option[value=ir], .country-IR {background-position:0 -2377px}
+select.flags option[value=IS], select.flags option[value=is], .country-IS {background-position:0 -2399px}
+select.flags option[value=IT], select.flags option[value=it], .country-IT {background-position:0 -2421px}
+select.flags option[value=JM], select.flags option[value=jm], .country-JM {background-position:0 -2443px}
+select.flags option[value=JO], select.flags option[value=jo], .country-JO {background-position:0 -2465px}
+select.flags option[value=JP], select.flags option[value=ja], select.flags option[value=jp], .country-JP, .country-JA {background-position:0 -2487px}
+select.flags option[value=KE], select.flags option[value=ke], .country-KE {background-position:0 -2509px}
+select.flags option[value=KG], select.flags option[value=kg], .country-KG {background-position:0 -2531px}
+select.flags option[value=KH], select.flags option[value=kh], .country-KH {background-position:0 -2553px}
+select.flags option[value=KI], select.flags option[value=ki], .country-KI {background-position:0 -2575px}
+select.flags option[value=KM], select.flags option[value=km], .country-KM {background-position:0 -2597px}
+select.flags option[value=KN], select.flags option[value=kn], .country-KN {background-position:0 -2619px}
+select.flags option[value=KP], select.flags option[value=kp], .country-KP {background-position:0 -2641px}
+select.flags option[value=KR], select.flags option[value=kr], .country-KR {background-position:0 -2663px}
+select.flags option[value=KW], select.flags option[value=kw], .country-KW {background-position:0 -2685px}
+select.flags option[value=KY], select.flags option[value=ky], .country-KY {background-position:0 -2707px}
+select.flags option[value=KZ], select.flags option[value=kz], .country-KZ {background-position:0 -2729px}
+select.flags option[value=LA], select.flags option[value=la], .country-LA {background-position:0 -2751px}
+select.flags option[value=LB], select.flags option[value=lb], .country-LB {background-position:0 -2773px}
+select.flags option[value=LC], select.flags option[value=lc], .country-LC {background-position:0 -2795px}
+select.flags option[value=LI], select.flags option[value=li], .country-LI {background-position:0 -2817px}
+select.flags option[value=LK], select.flags option[value=lk], .country-LK {background-position:0 -2839px}
+select.flags option[value=LR], select.flags option[value=lr], .country-LR {background-position:0 -2861px}
+select.flags option[value=LS], select.flags option[value=ls], .country-LS {background-position:0 -2883px}
+select.flags option[value=LT], select.flags option[value=lt], .country-LT {background-position:0 -2905px}
+select.flags option[value=LU], select.flags option[value=lu], .country-LU {background-position:0 -2927px}
+select.flags option[value=LV], select.flags option[value=lv], .country-LV {background-position:0 -2949px}
+select.flags option[value=LY], select.flags option[value=ly], .country-LY {background-position:0 -2971px}
+select.flags option[value=MA], select.flags option[value=ma], .country-MA {background-position:0 -2993px}
+select.flags option[value=MC], select.flags option[value=mc], .country-MC {background-position:0 -3015px}
+select.flags option[value=MD], select.flags option[value=md], .country-MD {background-position:0 -3037px}
+select.flags option[value=ME], select.flags option[value=me], .country-ME {background-position:0 -3059px}
+select.flags option[value=MG], select.flags option[value=mg], .country-MG {background-position:0 -3081px}
+select.flags option[value=MH], select.flags option[value=mh], .country-MH {background-position:0 -3103px}
+select.flags option[value=MK], select.flags option[value=mk], .country-MK {background-position:0 -3125px}
+select.flags option[value=ML], select.flags option[value=ml], .country-ML {background-position:0 -3147px}
+select.flags option[value=MM], select.flags option[value=mm], .country-MM {background-position:0 -3169px}
+select.flags option[value=MN], select.flags option[value=mn], .country-MN {background-position:0 -3191px}
+select.flags option[value=MO], select.flags option[value=mo], .country-MO {background-position:0 -3213px}
+select.flags option[value=MP], select.flags option[value=mp], .country-MP {background-position:0 -3235px}
+select.flags option[value=MQ], select.flags option[value=mq], .country-MQ {background-position:0 -3257px}
+select.flags option[value=MR], select.flags option[value=mr], .country-MR {background-position:0 -3279px}
+select.flags option[value=MS], select.flags option[value=ms], .country-MS {background-position:0 -3301px}
+select.flags option[value=MT], select.flags option[value=mt], .country-MT {background-position:0 -3323px}
+select.flags option[value=MU], select.flags option[value=mu], .country-MU {background-position:0 -3345px}
+select.flags option[value=MV], select.flags option[value=mv], .country-MV {background-position:0 -3367px}
+select.flags option[value=MW], select.flags option[value=mw], .country-MW {background-position:0 -3389px}
+select.flags option[value=MX], select.flags option[value=mx], .country-MX {background-position:0 -3411px}
+select.flags option[value=MY], select.flags option[value=my], .country-MY {background-position:0 -3433px}
+select.flags option[value=MZ], select.flags option[value=mz], .country-MZ {background-position:0 -3455px}
+select.flags option[value=NA], select.flags option[value=na], .country-NA {background-position:0 -3477px}
+select.flags option[value=NC], select.flags option[value=nc], .country-NC {background-position:0 -3499px}
+select.flags option[value=NE], select.flags option[value=ne], .country-NE {background-position:0 -3521px}
+select.flags option[value=NF], select.flags option[value=nf], .country-NF {background-position:0 -3543px}
+select.flags option[value=NG], select.flags option[value=ng], .country-NG {background-position:0 -3565px}
+select.flags option[value=NI], select.flags option[value=ni], .country-NI {background-position:0 -3587px}
+select.flags option[value=NL], select.flags option[value=nl], .country-NL {background-position:0 -3609px}
+select.flags option[value=NO], select.flags option[value=no], .country-NO {background-position:0 -3631px}
+select.flags option[value=NP], select.flags option[value=np], .country-NP {background-position:0 -3653px}
+select.flags option[value=NR], select.flags option[value=nr], .country-NR {background-position:0 -3675px}
+select.flags option[value=NU], select.flags option[value=nu], .country-NU {background-position:0 -3697px}
+select.flags option[value=NZ], select.flags option[value=nz], .country-NZ {background-position:0 -3719px}
+select.flags option[value=OM], select.flags option[value=om], .country-OM {background-position:0 -3741px}
+select.flags option[value=PA], select.flags option[value=pa], .country-PA {background-position:0 -3763px}
+select.flags option[value=PE], select.flags option[value=pe], .country-PE {background-position:0 -3785px}
+select.flags option[value=PF], select.flags option[value=pf], .country-PF {background-position:0 -3807px}
+select.flags option[value=PG], select.flags option[value=pg], .country-PG {background-position:0 -3829px}
+select.flags option[value=PH], select.flags option[value=ph], .country-PH {background-position:0 -3851px}
+select.flags option[value=PK], select.flags option[value=pk], .country-PK {background-position:0 -3873px}
+select.flags option[value=PL], select.flags option[value=pl], .country-PL {background-position:0 -3895px}
+select.flags option[value=PM], select.flags option[value=pm], .country-PM {background-position:0 -3917px}
+select.flags option[value=PN], select.flags option[value=pn], .country-PN {background-position:0 -3939px}
+select.flags option[value=PR], select.flags option[value=pr], .country-PR {background-position:0 -3961px}
+select.flags option[value=PS], select.flags option[value=ps], .country-PS {background-position:0 -3983px}
+select.flags option[value=PT], select.flags option[value=pt], .country-PT {background-position:0 -4005px}
+select.flags option[value=PW], select.flags option[value=pw], .country-PW {background-position:0 -4027px}
+select.flags option[value=PY], select.flags option[value=py], .country-PY {background-position:0 -4049px}
+select.flags option[value=QA], select.flags option[value=qa], .country-QA {background-position:0 -4071px}
+select.flags option[value=RE], select.flags option[value=re], .country-RE {background-position:0 -4093px}
+select.flags option[value=RO], select.flags option[value=ro], .country-RO {background-position:0 -4115px}
+select.flags option[value=RS], select.flags option[value=rs], .country-RS {background-position:0 -4137px}
+select.flags option[value=RU], select.flags option[value=ru], .country-RU {background-position:0 -4159px}
+select.flags option[value=RW], select.flags option[value=rw], .country-RW {background-position:0 -4181px}
+select.flags option[value=SA], select.flags option[value=sa], .country-SA {background-position:0 -4203px}
+select.flags option[value=SB], select.flags option[value=sb], .country-SB {background-position:0 -4225px}
+select.flags option[value=SC], select.flags option[value=sc], .country-SC {background-position:0 -4247px}
+select.flags option[value=SD], select.flags option[value=sd], .country-SD {background-position:0 -4291px}
+select.flags option[value=SE], select.flags option[value=se], .country-SE {background-position:0 -4313px}
+select.flags option[value=SG], select.flags option[value=sg], .country-SG {background-position:0 -4335px}
+select.flags option[value=SH], select.flags option[value=sh], .country-SH {background-position:0 -4357px}
+select.flags option[value=SI], select.flags option[value=si], .country-SI {background-position:0 -4379px}
+select.flags option[value=SJ], select.flags option[value=sj], .country-SJ {background-position:0 -4401px}
+select.flags option[value=SK], select.flags option[value=sk], .country-SK {background-position:0 -4423px}
+select.flags option[value=SL], select.flags option[value=sl], .country-SL {background-position:0 -4445px}
+select.flags option[value=SM], select.flags option[value=sm], .country-SM {background-position:0 -4467px}
+select.flags option[value=SN], select.flags option[value=sn], .country-SN {background-position:0 -4489px}
+select.flags option[value=SO], select.flags option[value=so], .country-SO {background-position:0 -4511px}
+select.flags option[value=SR], select.flags option[value=sr], .country-SR {background-position:0 -4533px}
+select.flags option[value=ST], select.flags option[value=st], .country-ST {background-position:0 -4555px}
+select.flags option[value=SV], select.flags option[value=sv], .country-SV {background-position:0 -4577px}
+select.flags option[value=SY], select.flags option[value=sy], .country-SY {background-position:0 -4599px}
+select.flags option[value=SZ], select.flags option[value=sz], .country-SZ {background-position:0 -4621px}
+select.flags option[value=TC], select.flags option[value=tc], .country-TC {background-position:0 -4643px}
+select.flags option[value=TD], select.flags option[value=td], .country-TD {background-position:0 -4665px}
+select.flags option[value=TF], select.flags option[value=tf], .country-TF {background-position:0 -4687px}
+select.flags option[value=TG], select.flags option[value=tg], .country-TG {background-position:0 -4709px}
+select.flags option[value=TH], select.flags option[value=th], .country-TH {background-position:0 -4731px}
+select.flags option[value=TJ], select.flags option[value=tj], .country-TJ {background-position:0 -4753px}
+select.flags option[value=TK], select.flags option[value=tk], .country-TK {background-position:0 -4775px}
+select.flags option[value=TL], select.flags option[value=tl], .country-TL {background-position:0 -4797px}
+select.flags option[value=TM], select.flags option[value=tm], .country-TM {background-position:0 -4819px}
+select.flags option[value=TN], select.flags option[value=tn], .country-TN {background-position:0 -4841px}
+select.flags option[value=TO], select.flags option[value=to], .country-TO {background-position:0 -4863px}
+select.flags option[value=TR], select.flags option[value=tr], .country-TR {background-position:0 -4885px}
+select.flags option[value=TT], select.flags option[value=tt], .country-TT {background-position:0 -4907px}
+select.flags option[value=TV], select.flags option[value=tv], .country-TV {background-position:0 -4929px}
+select.flags option[value=TW], select.flags option[value=tw], .country-TW {background-position:0 -4951px}
+select.flags option[value=TZ], select.flags option[value=tz], .country-TZ {background-position:0 -4973px}
+select.flags option[value=UA], select.flags option[value=ua], .country-UA {background-position:0 -4995px}
+select.flags option[value=UG], select.flags option[value=ug], .country-UG {background-position:0 -5017px}
+select.flags option[value=UM], select.flags option[value=um], .country-UM {background-position:0 -5039px}
+select.flags option[value=US], select.flags option[value=us], .country-US {background-position:0 -5061px}
+select.flags option[value=UY], select.flags option[value=uy], .country-UY {background-position:0 -5083px}
+select.flags option[value=UZ], select.flags option[value=uz], .country-UZ {background-position:0 -5105px}
+select.flags option[value=VA], select.flags option[value=va], .country-VA {background-position:0 -5127px}
+select.flags option[value=VC], select.flags option[value=vc], .country-VC {background-position:0 -5149px}
+select.flags option[value=VE], select.flags option[value=ve], .country-VE {background-position:0 -5171px}
+select.flags option[value=VG], select.flags option[value=vg], .country-VG {background-position:0 -5193px}
+select.flags option[value=VI], select.flags option[value=vi], .country-VI {background-position:0 -5215px}
+select.flags option[value=VN], select.flags option[value=vn], .country-VN {background-position:0 -5237px}
+select.flags option[value=VU], select.flags option[value=vu], .country-VU {background-position:0 -5259px}
+select.flags option[value=WF], select.flags option[value=wf], .country-WF {background-position:0 -5303px}
+select.flags option[value=WS], select.flags option[value=ws], .country-WS {background-position:0 -5325px}
+select.flags option[value=YE], select.flags option[value=ye], .country-YE {background-position:0 -5347px}
+select.flags option[value=YT], select.flags option[value=yt], .country-YT {background-position:0 -5369px}
+select.flags option[value=ZA], select.flags option[value=za], .country-ZA {background-position:0 -5391px}
+select.flags option[value=ZM], select.flags option[value=zm], .country-ZM {background-position:0 -5413px}
+select.flags option[value=ZW], select.flags option[value=zw], .country-ZW {background-position:0 -5435px}
+
+.panel_login {
+ max-width: 80%;
+ min-width: 680px;
+}
+div.subsectiontoggle {
+ border:1px solid #ccc;
+ font-weight:bold;
+ font-size:14px;
+ padding-top:10px;
+ padding-bottom:0;
+ margin-top:5px;
+ text-indent:15px;
+ cursor:pointer;
+ margin-bottom:10px;
+ background-color:#f4f4f4;
+ -moz-border-radius:5px;
+ -webkit-border-radius:5px;
+ -khtml-border-radius:5px;
+ -o-border-radius:5px;
+ -ms-border-radius:5px;
+ border-radius:5px;
+}
+div.subsectiontoggle span {
+ display:inline-block;
+ margin-bottom:-3px;
+ margin-right:10px;
+ width:16px;
+ height:16px;
+ background: url("../icons/button_sprite.png") 0 -72px no-repeat transparent;
+}
+div.subsectiontoggle span.showing{
+ background-position: 0 -40px;
+}
+div.subsectiontoggle em {
+ display:block;
+ position:relative;
+ left:425px;
+ top:-13px;
+ margin-bottom:-3px;
+ width:13px;
+ height:13px;
+ background:url("../images/chevron.png") top left no-repeat;
+ -webkit-transform:none;
+ -moz-transform:none;
+ -khtml-transform:none;
+ -o-transform:none;
+ -ms-transform:none;
+ transform:none;
+ -webkit-transition-duration: .2s;
+ -moz-transition-duration: .2s;
+ -khtml-transition-duration: .2s;
+ -o-transition-duration: .2s;
+ -ms-transition-duration: .2s;
+ transition-duration: .2s;
+ -webkit-transition-property: -webkit-transform;
+ -moz-transition-property: -moz-transform;
+ -khtml-transition-property: -khtml-transform;
+ -o-transition-property: -o-transform;
+ -ms-transition-property: -ms-transform;
+ transition-property: transform;
+}
+div.subsectiontoggle em.showing {
+ display:block;
+ position:relative;
+ left:425px;
+ top:-13px;
+ background:url("../images/chevron.png") top left no-repeat;
+ width:13px;
+ height:13px;
+ -webkit-transform:rotate(90deg);
+ -moz-transform:rotate(90deg);
+ -khtml-transform:rotate(90deg);
+ -o-transform:rotate(90deg);
+ -ms-transform:rotate(90deg);
+ transform:rotate(90deg);
+}
+div.subsectiontoggle:hover em {
+ -webkit-transform:rotate(90deg);
+ -moz-transform:rotate(90deg);
+ -khtml-transform:rotate(90deg);
+ -o-transform:rotate(90deg);
+ -ms-transform:rotate(90deg);
+ transform:rotate(90deg);
+}
+
+
+div.gs-container {
+ margin-top:10px;
+}
+div.gs-container * {
+ margin: 0;
+ padding: 0;
+ background-position: 0 0;
+ text-decoration: none;
+ font-size: 1em;
+}
+div.gs-container input {
+ background: url("../icons/x16_sprite.png") no-repeat 2px -119px #FFFFFF;
+ height:20px;
+ border:1px solid #444;
+ padding:0 22px 2px;
+ color:#444;
+ -moz-border-radius:5px;
+ -webkit-border-radius:5px;
+ -khtml-border-radius:5px;
+ -o-border-radius:5px;
+ -ms-border-radius:5px;
+ border-radius:5px;
+}
+input.gs-loading {
+ background-image: url("../images/loading.gif");
+ background-repeat: no-repeat;
+ background-position: center right;
+}
+ul.gs-resultbox {
+ margin: 0 !important;
+ padding: 0 !important;
+ width: 300px;
+ z-index: 999999;
+ border: 1px solid #777;
+ font-size: 11px;
+ background: #fff;
+ -moz-box-shadow: 2px 2px 5px 0 #c5c5c5;
+ -webkit-box-shadow: 2px 2px 5px 0 #c5c5c5;
+ -khtml-box-shadow: 2px 2px 5px 0 #c5c5c5;
+ -o-box-shadow: 2px 2px 5px 0 #c5c5c5;
+ -ms-box-shadow: 2px 2px 5px 0 #c5c5c5;
+ box-shadow: 2px 2px 5px 0 #c5c5c5;
+ list-style: none;
+ -moz-border-radius:5px;
+ -webkit-border-radius:5px;
+ -khtml-border-radius:5px;
+ -o-border-radius:5px;
+ -ms-border-radius:5px;
+ border-radius:5px;
+ max-height:500px;
+ overflow:auto;
+}
+ul.gs-resultbox li {
+ float: left;
+ width: 100%;
+ clear: both;
+ cursor: pointer;
+}
+ul.gs-resultbox li.gs-cheader {
+ height: 13px;
+ overflow: hidden;
+ padding: 5px 0;
+ color: #fff;
+ background: #6ea6d1;
+ cursor:default;
+ padding-bottom:10px;
+}
+ul.gs-resultbox li.gs-cheader p.gs-cheader-title {
+ margin: 0 !important;
+ padding: 0 0 0 10px !important;
+ float: left;
+ font-size: 12px;
+ font-weight: bold;
+}
+ul.gs-resultbox li.gs-cheader p.gs-cheader-limit {
+ margin: 0 !important;
+ padding: 0 10px 0 0 !important;
+ float: right;
+ font-size: 11px;
+ font-weight: normal;
+}
+ul.gs-resultbox li.gs-cdata {
+ margin: 0 !important;
+ padding: 0 !important;
+ border-bottom: 1px solid #c5c5c5;
+}
+ul.gs-resultbox li.gs-cdata:last-child {
+ border-bottom: none;
+}
+ul.gs-resultbox li.gs-cdata:hover {
+ background: #eaf4fd;
+}
+ul.gs-resultbox li.gs-cdata a {
+ display: block;
+ padding: 5px 10px;
+ text-decoration: none !important;
+ background: #fff;
+}
+ul.gs-resultbox li.gs-cdata a:hover {
+ background: #cde0ff;
+}
+ul.gs-resultbox li.gs-cdata img {
+ margin-right: 12px;
+}
+ul.gs-resultbox li.gs-cdata p {
+ margin: 0 !important;
+ padding: 0 !important;
+ color: #444;
+ font-size: 10px;
+ min-height:30px;
+}
+ul.gs-resultbox li.gs-cdata p span.gs-cdata-title {
+ display: inline !important;
+ margin: 0 !important;
+ padding: 0 !important;
+ font-size: 11px;
+ font-weight: bold;
+ color: #000;
+}
+ul.gs-resultbox li:first-child {
+ -moz-border-radius:5px 5px 0 0;
+ -webkit-border-radius:5px 5px 0 0;
+ -khtml-border-radius:5px 5px 0 0;
+ -o-border-radius:5px 5px 0 0;
+ -ms-border-radius:5px 5px 0 0;
+ border-radius:5px 5px 0 0;
+}
+ul.gs-resultbox li:last-child {
+ -moz-border-radius:0 0 5px 5px;
+ -webkit-border-radius:0 0 5px 5px;
+ -khtml-border-radius:0 0 5px 5px;
+ -o-border-radius:0 0 5px 5px;
+ -ms-border-radius:0 0 5px 5px;
+ border-radius:0 0 5px 5px;
+}
+
+div.df-container {
+}
+div.df-container * {
+ margin: 0;
+ padding: 0;
+ background-position: 0 0;
+ text-decoration: none;
+ font-size: 1em;
+}
+div.df-container input {
+}
+input.df-loading {
+ background-image: url("../images/loading.gif");
+ background-repeat: no-repeat;
+ background-position: center right;
+}
+ul.df-resultbox {
+ margin: 0 !important;
+ padding: 0 !important;
+ min-width: 250px;
+ max-width: 500px;
+ z-index: 999999;
+ border: 1px solid #777;
+ font-size: 11px;
+ background: #fff;
+ -moz-box-shadow: 2px 2px 5px 0 #c5c5c5;
+ -webkit-box-shadow: 2px 2px 5px 0 #c5c5c5;
+ -khtml-box-shadow: 2px 2px 5px 0 #c5c5c5;
+ -o-box-shadow: 2px 2px 5px 0 #c5c5c5;
+ -ms-box-shadow: 2px 2px 5px 0 #c5c5c5;
+ box-shadow: 2px 2px 5px 0 #c5c5c5;
+ list-style: none;
+ -moz-border-radius:5px;
+ -webkit-border-radius:5px;
+ -khtml-border-radius:5px;
+ -o-border-radius:5px;
+ -ms-border-radius:5px;
+ border-radius:5px;
+}
+ul.df-resultbox li {
+ float: left;
+ width: 100%;
+ clear: both;
+ cursor: pointer;
+}
+ul.df-resultbox li.df-cheader {
+ height: 13px;
+ overflow: hidden;
+ padding: 5px 0;
+ color: #fff;
+ background: #6ea6d1;
+ cursor:default;
+ padding-bottom:10px;
+}
+ul.df-resultbox li.df-cheader p.df-cheader-title {
+ margin: 0 !important;
+ padding: 0 0 0 10px !important;
+ float: left;
+ font-size: 12px;
+ font-weight: bold;
+}
+ul.df-resultbox li.df-cheader p.df-cheader-limit {
+ margin: 0 !important;
+ padding: 0 10px 0 0 !important;
+ float: right;
+ font-size: 11px;
+ font-weight: normal;
+}
+ul.df-resultbox li.df-cdata {
+ margin: 0 !important;
+ padding: 0 !important;
+ border-bottom: 1px solid #c5c5c5;
+}
+ul.df-resultbox li.df-cdata:last-child {
+ border-bottom: none;
+}
+ul.df-resultbox li.df-cdata:hover {
+ background: #eaf4fd;
+}
+ul.df-resultbox li.df-cdata a {
+ display: block;
+ padding: 5px 10px;
+ text-decoration: none !important;
+ background: #fff;
+}
+ul.df-resultbox li.df-cdata a:hover {
+ background: #cde0ff;
+}
+ul.df-resultbox li.df-cdata img {
+ margin-right: 12px;
+}
+ul.df-resultbox li.df-cdata p {
+ margin: 0 !important;
+ padding: 0 !important;
+ color: #444;
+ font-size: 10px;
+ min-height:30px;
+}
+ul.df-resultbox li.df-cdata p span.df-cdata-title {
+ display: inline !important;
+ margin: 0 !important;
+ padding: 0 !important;
+ font-size: 11px;
+ font-weight: bold;
+ color: #000;
+}
+ul.df-resultbox li:first-child {
+ -moz-border-radius:5px 5px 0 0;
+ -webkit-border-radius:5px 5px 0 0;
+ -khtml-border-radius:5px 5px 0 0;
+ -o-border-radius:5px 5px 0 0;
+ -ms-border-radius:5px 5px 0 0;
+ border-radius:5px 5px 0 0;
+}
+ul.df-resultbox li:last-child {
+ -moz-border-radius:0 0 5px 5px;
+ -webkit-border-radius:0 0 5px 5px;
+ -khtml-border-radius:0 0 5px 5px;
+ -o-border-radius:0 0 5px 5px;
+ -ms-border-radius:0 0 5px 5px;
+ border-radius:0 0 5px 5px;
+}
+
+span.icons16-empty {
+ float:left;
+ display:block;
+ height:20px;
+ width:20px;
+ margin:0 7px 0 0;
+}
+
+.ttip {
+ width:16px;
+ height:16px;
+ cursor:pointer;
+ background: url("../icons/x16_sprite.png") no-repeat -2px -42px transparent;
+ float:right;
+ display:inline;
+ position:relative;
+ right:-2px;
+ top:-2px;
+}
+
+p.prefix {
+ float: left;
+ margin: 0;
+ text-align: right;
+}
+p.label {
+ float: left;
+ margin: 5px 15px 0 0;
+}
+p.value {
+ float:left;
+ margin: 0 0 0 2px;
+}
+
+/* content_ispc
+-------------------------------------------------------------- */
+.tipsy {
+ font-size: 10px;
+ position: absolute;
+ padding: 5px;
+ z-index: 100000;
+}
+.tipsy-inner {
+ background-color: #000;
+ color: #FFF;
+ max-width: 350px;
+ padding: 5px 8px 4px 8px;
+ text-align: left;
+}
+
+/* Rounded corners */
+.tipsy-inner {
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+/* Uncomment for shadow */
+/*.tipsy-inner { box-shadow: 0 0 5px #000000; -webkit-box-shadow: 0 0 5px #000000; -moz-box-shadow: 0 0 5px #000000; }*/
+
+.tipsy-arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+ line-height: 0;
+ border: 5px dashed #000;
+}
+/* Rules to colour arrows */
+.tipsy-arrow-n { border-bottom-color: #000; }
+.tipsy-arrow-s { border-top-color: #000; }
+.tipsy-arrow-e { border-left-color: #000; }
+.tipsy-arrow-w { border-right-color: #000; }
+
+.tipsy-n .tipsy-arrow { top: 0px; left: 50%; margin-left: -5px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent; }
+.tipsy-nw .tipsy-arrow { top: 0; left: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
+.tipsy-ne .tipsy-arrow { top: 0; right: 10px; border-bottom-style: solid; border-top: none; border-left-color: transparent; border-right-color: transparent;}
+.tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -5px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
+.tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
+.tipsy-se .tipsy-arrow { bottom: 0; right: 10px; border-top-style: solid; border-bottom: none; border-left-color: transparent; border-right-color: transparent; }
+.tipsy-e .tipsy-arrow { right: 0; top: 50%; margin-top: -5px; border-left-style: solid; border-right: none; border-top-color: transparent; border-bottom-color: transparent; }
+.tipsy-w .tipsy-arrow { left: 0; top: 50%; margin-top: -5px; border-right-style: solid; border-left: none; border-top-color: transparent; border-bottom-color: transparent; }
+
+/* uni-form-generic
+-------------------------------------------------------------- */
+
+/* Uni-Form by Dragan Babic [Superawesome Industries] - http: //sprawsm.com/uni-form/ */
+/* Some rights reserved - http: //creativecommons.org/licenses/by-sa/2.5/ */
+/* Do not edit this file directly, make your changes to uni-form.css in the same folder */
+
+.uniForm{ margin: 0; padding: 0; position: relative; z-index: 1; } /* reset stuff */
+
+/* Some generals and more resets */
+.uniForm fieldset{ border: none; margin: 0; padding: 0; }
+.uniForm fieldset legend{ margin: 0; padding: 0; }
+
+/* This is the main unit that contains our form elements */
+.uniForm .ctrlHolder,
+.uniForm .buttonHolder{ margin: 0; padding: 0; clear: both; }
+
+/* Clear all floats */
+.uniForm:after,
+.uniForm .buttonHolder:after,
+.uniForm .ctrlHolder:after,
+.uniForm .ctrlHolder .multiField:after,
+.uniForm .inlineLabel:after{ content: "."; display: block; height: 0; line-height: 0; font-size: 0; clear: both; min-height: 0; visibility: hidden; }
+
+/* A class to be used on a label that contains a checkbox or a radio button */
+.uniForm .inlineLabel,
+.uniForm .inlineLabels .inlineLabel,
+.uniForm .blockLabels .inlineLabel{ width: auto; float: none; margin: 0; display: block; }
+/* IE shows borders & padding on checkboxes and radio buttons if they are declared on an input element, remove them */
+/* Legacy/Inheritance fix */
+.uniForm .inlineLabel input,
+.uniForm .inlineLabels .inlineLabel input,
+.uniForm .blockLabels .inlineLabel input{ border: none; padding: 0; margin: 0; }
+
+/* Styles for form controls where labels are above the input elements */
+/* Set the class of the parent (preferably to a fieldset) to .blockLabels */
+
+.uniForm label,
+.uniForm .label,
+.uniForm .blockLabels label,
+.uniForm .blockLabels .label{ display: block; float: none; padding: 0; line-height: 100%; width: auto; }
+
+/* Float the input elements */
+.uniForm .textInput,
+.uniForm .blockLabels .textInput,
+.uniForm .blockLabels .fileUpload,
+.uniForm .selectInput,
+.uniForm .blockLabels .selectInput,
+.uniForm .blockLabels select,
+.uniForm textarea,
+.uniForm .blockLabels textarea{ float: left; }
+
+/* Postition the hints */
+.uniForm .formHint,
+.uniForm .blockLabels .formHint{ float: right; margin: 0; clear: none; }
+
+/* Position the elements inside combo boxes (multiple selects/checkboxes/radio buttons per unit) */
+.uniForm .multiField,
+.uniForm .blockLabels .multiField{ width: auto; float: left; }
+.uniForm .multiField .inlineLabel,
+.uniForm .blockLabels .multiField .inlineLabel{ display: block; margin: 0 0 .5em 0; }
+.uniForm .multiField .blockLabel,
+.uniForm .blockLabels .multiField .blockLabel{ float: left; width: auto; margin: 0; }
+.uniForm .multiField .blockLabel .textInput,
+.uniForm .multiField .blockLabel .selectInput,
+.uniForm .multiField .blockLabel select,
+.uniForm .blockLabels .multiField .blockLabel .textInput,
+.uniForm .blockLabels .multiField .blockLabel .selectInput,
+.uniForm .blockLabels .multiField .blockLabel select{ width: 100%; margin: 0; }
+
+/* Styles for form controls where labels are in line with the input elements */
+/* Set the class of the parent (preferably to a fieldset) to .inlineLabels */
+.uniForm .inlineLabels label,
+.uniForm .inlineLabels .label{ float: left; margin: 0; padding: 0; line-height: 100%; position: relative; }
+
+/* Float the input elements */
+.uniForm .inlineLabels .textInput,
+.uniForm .inlineLabels .fileUpload,
+.uniForm .inlineLabels .selectInput,
+.uniForm .inlineLabels select,
+.uniForm .inlineLabels textarea{ float: left; }
+
+/* Postition the hints */
+.uniForm .inlineLabels .formHint{ clear: both; float: none; }
+.uniForm .inlineLabels .multiField{ float: left; }
+.uniForm .inlineLabels .multiField .inlineLabel{}
+.uniForm .inlineLabels .multiField .blockLabel{}
+.uniForm .inlineLabels .multiField .blockLabel .textInput,
+.uniForm .inlineLabels .multiField .blockLabel .selectInput,
+.uniForm .inlineLabels .multiField .blockLabel select{ display: block; width: 100%; float: none; }
+.uniForm .inlineLabels .multiField select{ float: left; }
+
+/* Required fields asterisk styling for .blockLabels */
+.uniForm label em,
+.uniForm .label em,
+.uniForm .blockLabels label em,
+.uniForm .blockLabels .label em{ position: absolute; left: -7px; }
+
+/* Required fields asterisk styling for .inlineLabels */
+.uniForm .inlineLabels label em,
+.uniForm .inlineLabels .label em{ display: block; position: absolute; left: auto; right: 0; font-style: normal; font-weight: bold; }
+.uniForm .inlineLabel em{ position: absolute; left: 7px; }
+
+/* Messages */
+.uniForm #errorMsg,
+.uniForm .error{}
+.uniForm #errorMsg dt,
+.uniForm #errorMsg h3{}
+.uniForm #errorMsg dd{}
+.uniForm #errorMsg ol{}
+.uniForm #errorMsg ol li{}
+.uniForm .errorField{}
+.uniForm #OKMsg{}
+
+/* Columns */
+
+.uniForm .col{ float: left; }
+.uniForm .col.first{}
+.uniForm .col.last{}
+
+/* uni-form
+-------------------------------------------------------------- */
+
+/* Keep in mind that wherever you see "Required property" it means that the property must exist */
+
+/* ------------------------------------------------------------------------------ */
+
+/* Generals */
+.uniForm fieldset{}
+.uniForm fieldset legend{ color: #333; font-weight: bold; font-size: 100%; margin: 0; padding: 1.5em 1.5em 1.5em 0; }
+
+/* This is the main unit that contains our form elements */
+.uniForm .ctrlHolder{ padding: 3px; border-bottom: 1px dotted #dfdfdf; }
+
+.uniForm .buttonHolder{
+ text-align: left;
+ background: #CEDEEF url("../images/buttonHolder_bg.gif") no-repeat right;
+ margin: 3em 0 1em;
+ padding: 8px;
+}
+.uniForm .resetButton{ float: left; }
+.uniForm .primaryAction{ font-weight: bold; }
+
+/* This class gets added to div.ctrlHolder to highlight the row */
+.uniForm .focused{ background: #fffcdf; }
+
+/* .inlineLabel is used for inputs within labels - checkboxes and radio buttons */
+.uniForm .inlineLabel input,
+.uniForm .inlineLabels .inlineLabel input,
+.uniForm .blockLabels .inlineLabel input{ float: left; margin: 0 .4em 0 0; }
+.uniForm .inlineLabel span{ float: left; width: 90%; }
+
+/* ------------------------------------------------------------------------------ */
+
+/* .blockLabels (default style, will be applied even if you don"t class the parent element) */
+.uniForm .blockLabels .ctrlHolder{}
+
+.uniForm label,
+.uniForm .blockLabels label,
+.uniForm .blockLabels .label{ margin: 0 0 .5em 0; }
+
+.uniForm .textInput,
+.uniForm .blockLabels .textInput,
+.uniForm .blockLabels .fileUpload{ width: 43%; /* <- Required property */ }
+
+.uniForm .selectInput,
+.uniForm select,
+.uniForm .blockLabels .selectInput,
+.uniForm .blockLabels select{ width: 43.5%; /* <- Required property */ }
+.uniForm textarea,
+.uniForm .blockLabels textarea{ width: 43%; /* <- Required property */ height: 12em; }
+
+.uniForm .formHint,
+.uniForm .blockLabels .formHint{ width: 55%; /* <- Required property */ font-size: .9em; color: #777; position: relative; top: -.5em; }
+
+.uniForm .multiField,
+.uniForm .blockLabels .multiField{ width: 43%; }
+.uniForm .multiField .inlineLabel,
+.uniForm .blockLabels .multiField .inlineLabel{ display: block; margin: 0 0 .5em 0; }
+.uniForm .multiField .blockLabel,
+.uniForm .blockLabels .multiField .blockLabel{ width: 30%; margin: 0 10px 0 0; }
+.uniForm .multiField .blockLabel .textInput,
+.uniForm .multiField .blockLabel .selectInput,
+.uniForm .multiField .blockLabel select,
+.uniForm .blockLabels .multiField .blockLabel .textInput,
+.uniForm .blockLabels .multiField .blockLabel .selectInput,
+.uniForm .blockLabels .multiField .blockLabel select{ width: 100%; margin: .3em 0 0 0; }
+
+/* ------------------------------------------------------------------------------ */
+
+/* .inlineLabels */
+.uniForm .inlineLabels .ctrlHolder{}
+
+.uniForm .inlineLabels label,
+.uniForm .inlineLabels .label{ width: 20%; /* <- Required property */ margin: .3em 2% 0 0; /* <- Required property */ }
+
+.uniForm .inlineLabels .textInput,
+.uniForm .inlineLabels .fileUpload{ width: 35%; /* <- Required property */ }
+
+.uniForm .inlineLabels .selectInput,
+.uniForm .inlineLabels select{ width: 35%; /* <- Required property */ }
+
+.uniForm .inlineLabels textarea{ width: 35%; /* <- Required property */ height: 12em; }
+
+.uniForm .inlineLabels .formHint{ margin-top: 0; margin-left: 22%; font-size: .9em; color: #777; position: static; }
+
+.uniForm .inlineLabels .multiField{ width: 60%; /* <- Required property */ margin: 0 0 .3em 0; }
+.uniForm .inlineLabels .multiField .inlineLabel{ display: block; margin: 0 0 .5em 0; }
+.uniForm .inlineLabels .multiField .blockLabel{ float: left; width: 26%; margin: 0 3% 0 0; }
+.uniForm .inlineLabels .multiField .blockLabel .textInput,
+.uniForm .inlineLabels .multiField .blockLabel .selectInput,
+.uniForm .inlineLabels .multiField .blockLabel select{ width: 100%; margin: .3em 0 0 0; }
+
+/* Focus pseudoclasses */
+.uniForm .ctrlHolder .textInput:focus{ outline: none; /* Get rid of the "glow" effect in WebKit, optional */ }
+.uniForm .ctrlHolder textarea:focus{ outline: none; /* Get rid of the "glow" effect in WebKit, optional */ }
+.uniForm div.focused .formHint{ color: #333; }
+
+/* Columns (they are floated left by default) */
+.uniForm .col{ width: 37.9%; /* <- Required property */ margin: 0 2% 20px 0; }
+/* Use .first and .last classes to control the layout/spacing of your columns */
+.uniForm .col.first{ width: 39%; /* <- Required property */ float: left; clear: none; }
+.uniForm .col.last{ width: 39%; /* <- Required property */ float: right; clear: none; margin-right: 0; }
+
+/* Messages */
+.uniForm #errorMsg, .confirmpassworderror{ background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px; }
+.uniForm .error{ background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; }
+
+.uniForm #errorMsg dt, .uniForm #errorMsg h3{ margin: 0 0 .5em 0; font-size: 100%; line-height: 100%; font-weight: bold; }
+.uniForm #errorMsg dd{ margin: 0; padding: 0; }
+.uniForm #errorMsg ol{ margin: 0; padding: 0; list-style:none;}
+.uniForm #errorMsg ol li{ margin: 0; padding: 2px; list-style-position: inside; border-bottom: 1px dotted #df7d7d; position: relative; }
+.uniForm .errorField{ color: #af4c4c; margin: 0 0 6px 0; padding: 4px; background: #ffbfbf; }
+
+.uniForm #OKMsg, .confirmpasswordok{ background: #C8FFBF; border: 1px solid #A2EF95; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px; }
+.uniForm #OKMsg p{ margin: 0; }
+
+/* ------------------------------------------------------------------------------ */
+
+/* This is the main unit that contains our form elements */
+
+.uniForm .textInput, .uniForm .selectInput, .uniForm textarea {
+ background:#FFFFFF none repeat scroll 0 0;
+ color: #000000;
+ border: 1px solid #DFDFDF;
+ padding: 1px;
+}
+
+/* jquery-ui-custom
+-------------------------------------------------------------- */
+.ui-datepicker-calendar thead tr th {
+ background-image:none;
+ background-color:#FFFFFF;
+ color:#000000;
+}
+.ui-widget { font-family: "Trebuchet MS", Arial, sans-serif; font-size: 100%; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: "Trebuchet MS", Arial, sans-serif; font-size: 100%; }
+ul.ui-autocomplete { max-height: 250px; overflow-y: auto; min-width: 85px;}
+.ui-combobox { position: relative; display: inline-block; margin-right: 17px; }
+.ui-combobox-toggle { position: absolute !important; top: 0; bottom: 0; margin-left: -1px; padding: 1px !important; background: none repeat scroll 0 0 #FFFFFF !important; border: 1px solid #DFDFDF !important;}
+.ui-combobox-input { background: none repeat scroll 0 0 #FFFFFF !important; border: 1px solid #DFDFDF !important; padding: 1px; font-weight: normal !important; }
+.panel_install_package .ui-combobox { float: left; }
+.clear-float { clear: both; }
+
+a.link-page, span.page-spacer {
+ display: inline-block;
+ text-align: center;
+ padding: 2px;
+ line-height: 16px;
+ text-decoration: none !important;
+ color: inherit !important;
+ min-width: 16px;
+}
+a.link-page {
+ border: 1px solid #FFFFFF;
+ margin: 0 5px;
+}
+
+a.link-page:hover {
+ background-color: #DFDFDF;
+}
+
+span.page-spacer {
+ margin: 0 -5px;
+}
+
+a.link-page.current-page {
+ background-color: #DFDFDF;
+ font-weight: bold;
+}
+
+.command {
+ padding: 1em;
+ border: 1px dashed #2f6fab;
+ color: black;
+ background-color: #f9f9f9;
+ line-height: 1.1em;
+ font-family: Courier New, Courier, mono;
+ font-size: 12px;
+ font-style: italic;
+}
+.system {
+ color: black;
+ font-family: Courier New, Courier, mono;
+ font-size: 12px;
+ font-style: italic;
+}
+.highlight {
+ color: #FF0000;
+ font-family: Georgia, "Times New Roman", Times, serif;
+ font-size: 12px;
+ text-decoration: underline;
}
\ No newline at end of file
diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm
index 4ccb70aa2f0c8ada7878a688679b8f8e06312c73..d148a5feb811081b8e62ef4a0ebaf484d18c818e 100644
--- a/interface/web/themes/default/templates/main.tpl.htm
+++ b/interface/web/themes/default/templates/main.tpl.htm
@@ -50,6 +50,9 @@
// Store password in browser; works in Firefox, but not Chrome
$('#username').live("blur", function(){
+ if($('#username').val() == '') {
+ return true;
+ }
if($('#dummy_username').val() == '' || $('#dummy_username').val() != $(this).val()){
$('#dummy_login').show();
$('#dummy_username').attr('value', $(this).val()).trigger('focus').trigger('blur');
diff --git a/interface/web/vm/openvz_ip_list.php b/interface/web/vm/openvz_ip_list.php
index 8892efcc80915751e1546d8b588d33201f1483d4..804d60fa55b9632f3fd64316633b2db1ee1b6556 100644
--- a/interface/web/vm/openvz_ip_list.php
+++ b/interface/web/vm/openvz_ip_list.php
@@ -48,7 +48,7 @@ if($_SESSION["s"]["user"]["typ"] != 'admin') die('permission denied');
$app->uses('listform_actions');
// $app->listform_actions->SQLExtWhere = "limit_client = 0";
-$app->listform_actions->SQLOrderBy = 'ORDER BY server_id,ip_address';
+$app->listform_actions->SQLOrderBy = 'ORDER BY openvz_ip.server_id, openvz_ip.ip_address';
$app->listform_actions->onLoad();
diff --git a/interface/web/vm/openvz_vm_edit.php b/interface/web/vm/openvz_vm_edit.php
index f77d04cd870d64f4b1b4c5d756184fb4cbb4540b..83d530df6f38ee7a51355ce3daa05758a7740dce 100644
--- a/interface/web/vm/openvz_vm_edit.php
+++ b/interface/web/vm/openvz_vm_edit.php
@@ -96,19 +96,19 @@ 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.client_id, client.contact_name, client.limit_openvz_vm_template_id, CONCAT(client.company_name,' :: ',client.contact_name) as contactname, sys_group.name 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, client.contact_name, client.limit_openvz_vm_template_id, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
//* Fill the client select field
- $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
+ $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
$records = $app->db->queryAllRecords($sql);
$tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$client['client_id']);
- $client_select = ''.$client['name'].' :: '.$client['contactname'].' ';
+ $client_select = ''.$client['contactname'].' ';
//$tmp_data_record = $app->tform->getDataRecord($this->id);
if(is_array($records)) {
foreach( $records as $rec) {
$selected = @(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
- $client_select .= "$rec[name] :: $rec[contactname] \r\n";
+ $client_select .= "$rec[contactname] \r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
@@ -132,14 +132,14 @@ class page_action extends tform_actions {
} else {
//* Fill the client select field
- $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
+ $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
$clients = $app->db->queryAllRecords($sql);
$client_select = " ";
//$tmp_data_record = $app->tform->getDataRecord($this->id);
if(is_array($clients)) {
foreach( $clients as $client) {
$selected = @(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
- $client_select .= "$client[name] :: $client[contactname] \r\n";
+ $client_select .= "$client[contactname] \r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
diff --git a/server/conf/getmail.conf.master b/server/conf/getmail.conf.master
index 029c6fe01e9188bf1d4fec5c28b578a63f759b58..7d2726e378c3bea4031003d4e50bca881c550409 100644
--- a/server/conf/getmail.conf.master
+++ b/server/conf/getmail.conf.master
@@ -1,6 +1,6 @@
[options]
# message_log = /var/log/getmail.log
-message_log_syslog = 1
+message_log_syslog = true
delete = {DELETE}
read_all = {READ_ALL}
diff --git a/server/conf/mail/mail_quota_notification_de.txt b/server/conf/mail/mail_quota_notification_de.txt
new file mode 100644
index 0000000000000000000000000000000000000000..adb46cde635ac587c6bfe2dafce901de5fa9e858
--- /dev/null
+++ b/server/conf/mail/mail_quota_notification_de.txt
@@ -0,0 +1,14 @@
+MIME-Version: 1.0
+Content-type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+From: {admin_mail}
+Reply-To: {admin_mail}
+Subject: E-Mail Kontobelegungshinweis
+
+Ihr E-Mail Konto {email} hat den verfügbaren Speicherplatz (nahezu) ausgeschöpft.
+
+E-Mail Konto: {email}
+Name: {name}
+Belegter Speicher: {used}
+Verfügbarer Speicher: {quota}
+Belegt: {ratio}
\ No newline at end of file
diff --git a/server/conf/mail/mail_quota_notification_en.txt b/server/conf/mail/mail_quota_notification_en.txt
new file mode 100644
index 0000000000000000000000000000000000000000..74e03e6142a838990ca6c8c26b05093ec7499ee0
--- /dev/null
+++ b/server/conf/mail/mail_quota_notification_en.txt
@@ -0,0 +1,14 @@
+MIME-Version: 1.0
+Content-type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+From: {admin_mail}
+Reply-To: {admin_mail}
+Subject: Mailbox quota notification
+
+The mailbox {email} is near or over quota.
+
+Mailbox: {email}
+Name: {name}
+Used space: {used}
+Quota: {quota}
+Usage ratio: {ratio}
\ No newline at end of file
diff --git a/server/conf/mail/mail_quota_ok_notification_de.txt b/server/conf/mail/mail_quota_ok_notification_de.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ee6bb73b348ebd01aeb1cbb4834b784c5758f9e1
--- /dev/null
+++ b/server/conf/mail/mail_quota_ok_notification_de.txt
@@ -0,0 +1,14 @@
+MIME-Version: 1.0
+Content-type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+From: {admin_mail}
+Reply-To: {admin_mail}
+Subject: E-Mail Kontobelegungshinweis
+
+Der belegte Speicherplatz Ihres E-Mail Kontos {email} ist wieder ok.
+
+E-Mail Konto: {email}
+Name: {name}
+Belegter Speicher: {used}
+Verfügbarer Speicher: {quota}
+Belegt: {ratio}
\ No newline at end of file
diff --git a/server/conf/mail/mail_quota_ok_notification_en.txt b/server/conf/mail/mail_quota_ok_notification_en.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ed5a2e38c8da87e8410662bc564e607c77aee5c9
--- /dev/null
+++ b/server/conf/mail/mail_quota_ok_notification_en.txt
@@ -0,0 +1,14 @@
+MIME-Version: 1.0
+Content-type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+From: {admin_mail}
+Reply-To: {admin_mail}
+Subject: Mailbox quota ok
+
+The mailbox {email} is no longer near or over quota.
+
+Mailbox: {email}
+Name: {name}
+Used space: {used}
+Quota: {quota}
+Usage ratio: {ratio}
\ No newline at end of file
diff --git a/server/conf/mail/web_quota_notification_de.txt b/server/conf/mail/web_quota_notification_de.txt
new file mode 100644
index 0000000000000000000000000000000000000000..da73b78e7e4abca193869b457b6f25f0077ae5ea
--- /dev/null
+++ b/server/conf/mail/web_quota_notification_de.txt
@@ -0,0 +1,14 @@
+MIME-Version: 1.0
+Content-type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+From: {admin_mail}
+Reply-To: {admin_mail}
+Subject: Webseiten-Speicherhinweis
+
+Ihre Webseite {domain} hat den verfügbaren Speicherplatz (nahezu) ausgeschöpft.
+
+Webseite: {domain}
+Belegter Speicherplatz: {used}
+Verfügbarer Speicherplatz: {soft}
+Verfügbarer Speicherplatz (hard quota): {hard}
+Belegter Speicher in %: {ratio}
\ No newline at end of file
diff --git a/server/conf/mail/web_quota_notification_en.txt b/server/conf/mail/web_quota_notification_en.txt
new file mode 100644
index 0000000000000000000000000000000000000000..9da1e963d8347765cdfccd2903afbb20ce786af7
--- /dev/null
+++ b/server/conf/mail/web_quota_notification_en.txt
@@ -0,0 +1,14 @@
+MIME-Version: 1.0
+Content-type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+From: {admin_mail}
+Reply-To: {admin_mail}
+Subject: Website quota notification
+
+The website {domain} is near or over quota.
+
+Domain: {domain}
+Used space: {used}
+Soft limit: {soft}
+Hard limit: {hard}
+Usage ratio: {ratio}
\ No newline at end of file
diff --git a/server/conf/mail/web_quota_ok_notification_de.txt b/server/conf/mail/web_quota_ok_notification_de.txt
new file mode 100644
index 0000000000000000000000000000000000000000..98f67d63e4d02a0014c6b105403ca6617e0c98f4
--- /dev/null
+++ b/server/conf/mail/web_quota_ok_notification_de.txt
@@ -0,0 +1,14 @@
+MIME-Version: 1.0
+Content-type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+From: {admin_mail}
+Reply-To: {admin_mail}
+Subject: Webseiten-Speicherhinweis
+
+Der belegte Speicherplatz Ihrer Webseite {domain} ist wieder ok.
+
+Webseite: {domain}
+Belegter Speicherplatz: {used}
+Verfügbarer Speicherplatz: {soft}
+Verfügbarer Speicherplatz (hard quota): {hard}
+Belegter Speicher in %: {ratio}
\ No newline at end of file
diff --git a/server/conf/mail/web_quota_ok_notification_en.txt b/server/conf/mail/web_quota_ok_notification_en.txt
new file mode 100644
index 0000000000000000000000000000000000000000..693f676312bbf05215d9142a59658d814abf157e
--- /dev/null
+++ b/server/conf/mail/web_quota_ok_notification_en.txt
@@ -0,0 +1,14 @@
+MIME-Version: 1.0
+Content-type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+From: {admin_mail}
+Reply-To: {admin_mail}
+Subject: Website quota ok
+
+The website {domain} is no longer near or over quota.
+
+Domain: {domain}
+Used space: {used}
+Soft limit: {soft}
+Hard limit: {hard}
+Usage ratio: {ratio}
\ No newline at end of file
diff --git a/server/conf/mail/web_traffic_notification_de.txt b/server/conf/mail/web_traffic_notification_de.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b2491213a6b5f72e032b66e54461a26015a01791
--- /dev/null
+++ b/server/conf/mail/web_traffic_notification_de.txt
@@ -0,0 +1,8 @@
+MIME-Version: 1.0
+Content-type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+From: {admin_mail}
+Reply-To: {admin_mail}
+Subject: Traffic-Warnung
+
+Ihre Webseite {domain} hat den verfügbaren Traffic ausgeschöpft und wurde vorrübergehend deaktiviert.
\ No newline at end of file
diff --git a/server/conf/mail/web_traffic_notification_en.txt b/server/conf/mail/web_traffic_notification_en.txt
index 9b917920d5796f377f2e05a0fb8668fd752bb802..bae39cb3c090c8ab750ddd7fdeeab9c9b79070fd 100644
--- a/server/conf/mail/web_traffic_notification_en.txt
+++ b/server/conf/mail/web_traffic_notification_en.txt
@@ -1,3 +1,8 @@
-Subject:Website traffic notification
+MIME-Version: 1.0
+Content-type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+From: {admin_mail}
+Reply-To: {admin_mail}
+Subject: Website traffic notification
The website {domain} is over traffic and has been disabled.
\ No newline at end of file
diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master
index 7217636d1798ca0a9f581682f691cbbc13728647..02ea5af297ba4818ef8836a5169fb7653e1b1baa 100644
--- a/server/conf/nginx_vhost.conf.master
+++ b/server/conf/nginx_vhost.conf.master
@@ -170,6 +170,10 @@ server {
}
+
+
+
+
diff --git a/server/cron_daily.php b/server/cron_daily.php
index 69c345f82bdeb56709baeaa40ec9fbed57b04d35..9d7ca00d24481005327dd74e1a9d544913dc11b5 100644
--- a/server/cron_daily.php
+++ b/server/cron_daily.php
@@ -247,7 +247,7 @@ if($parse_mail_log == true) {
// Create webalizer statistics
#######################################################################################################
-function setConfigVar( $filename, $varName, $varValue ) {
+function setConfigVar( $filename, $varName, $varValue, $append = 0 ) {
if($lines = @file($filename)) {
$out = '';
$found = 0;
@@ -641,6 +641,64 @@ if ($app->dbmaster == $app->db) {
}
}
+#########
+// function for sending notification emails
+#########
+function send_notification_email($template, $placeholders, $recipients) {
+ global $conf;
+
+ if(!is_array($recipients) || count($recipients) < 1) return false;
+ if(!is_array($placeholders)) $placeholders = array();
+
+ if(file_exists($conf['rootpath'].'/conf-custom/mail/' . $template . '_'.$conf['language'].'.txt')) {
+ $lines = file($conf['rootpath'].'/conf-custom/mail/' . $template . '_'.$conf['language'].'.txt');
+ } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/' . $template . '_en.txt')) {
+ $lines = file($conf['rootpath'].'/conf-custom/mail/' . $template . '_en.txt');
+ } elseif(file_exists($conf['rootpath'].'/conf/mail/' . $template . '_'.$conf['language'].'.txt')) {
+ $lines = file($conf['rootpath'].'/conf/mail/' . $template . '_'.$conf['language'].'.txt');
+ } else {
+ $lines = file($conf['rootpath'].'/conf/mail/' . $template . '_en.txt');
+ }
+
+ //* get mail headers, subject and body
+ $mailHeaders = '';
+ $mailBody = '';
+ $mailSubject = '';
+ $inHeader = true;
+ for($l = 0; $l < count($lines); $l++) {
+ if($lines[$l] == '') {
+ $inHeader = false;
+ continue;
+ }
+ if($inHeader == true) {
+ $parts = explode(':', $lines[$l], 2);
+ if(strtolower($parts[0]) == 'subject') $mailSubject = trim($parts[1]);
+ unset($parts);
+ $mailHeaders .= trim($lines[$l]) . "\n";
+ } else {
+ $mailBody .= trim($lines[$l]) . "\n";
+ }
+ }
+ $mailBody = trim($mailBody);
+
+ //* Replace placeholders
+ $mailHeaders = strtr($mailHeaders, $placeholders);
+ $mailSubject = strtr($mailSubject, $placeholders);
+ $mailBody = strtr($mailBody, $placeholders);
+
+ for($r = 0; $r < count($recipients); $r++) {
+ mail($recipients[$r], $mailSubject, $mailBody, $mailHeaders);
+ }
+
+ unset($mailSubject);
+ unset($mailHeaders);
+ unset($mailBody);
+ unset($lines);
+
+ return true;
+}
+
+
#######################################################################################################
// enforce traffic quota (run only on the "master-server")
#######################################################################################################
@@ -683,41 +741,15 @@ if ($app->dbmaster == $app->db) {
$app->log('Traffic quota for '.$rec['domain'].' exceeded. Disabling website.',LOGLEVEL_DEBUG);
//* Send traffic notifications
- if($web_config['overtraffic_notify_admin'] == 'y' || $web_config['overtraffic_notify_client'] == 'y') {
-
- if(file_exists($conf['rootpath'].'/conf-custom/mail/web_traffic_notification_'.$conf['language'].'.txt')) {
- $lines = file($conf['rootpath'].'/conf-custom/mail/web_traffic_notification_'.$conf['language'].'.txt');
- } elseif(file_exists($conf['rootpath'].'/conf-custom/mail/web_traffic_notification_en.txt')) {
- $lines = file($conf['rootpath'].'/conf-custom/mail/web_traffic_notification_en.txt');
- } elseif(file_exists($conf['rootpath'].'/conf/mail/web_traffic_notification_'.$conf['language'].'.txt')) {
- $lines = file($conf['rootpath'].'/conf/mail/web_traffic_notification_'.$conf['language'].'.txt');
- } else {
- $lines = file($conf['rootpath'].'/conf/mail/web_traffic_notification_en.txt');
- }
-
- //* Get subject
- $parts = explode(':',trim($lines[0]));
- unset($parts[0]);
- $traffic_mail_subject = implode(':',$parts);
- unset($lines[0]);
-
- //* Get message
- $traffic_mail_message = trim(implode($lines));
- unset($tmp);
-
- //* Replace placeholders
- $traffic_mail_message = str_replace('{domain}',$rec['domain'],$traffic_mail_message);
-
- $mailHeaders = "MIME-Version: 1.0" . "\n";
- $mailHeaders .= "Content-type: text/plain; charset=utf-8" . "\n";
- $mailHeaders .= "Content-Transfer-Encoding: 8bit" . "\n";
- $mailHeaders .= "From: ". $global_config['admin_mail'] . "\n";
- $mailHeaders .= "Reply-To: ". $global_config['admin_mail'] . "\n";
- $mailSubject = "=?utf-8?B?".base64_encode($traffic_mail_subject)."?=";
-
- //* send email to admin
+ if($rec['traffic_quota_lock'] != 'y' && ($web_config['overtraffic_notify_admin'] == 'y' || $web_config['overtraffic_notify_client'] == 'y')) {
+
+ $placeholders = array('{domain}' => $rec['domain'],
+ '{admin_mail}' => $global_config['admin_mail']);
+
+ $recipients = array();
+ //* send email to admin
if($global_config['admin_mail'] != '' && $web_config['overtraffic_notify_admin'] == 'y') {
- mail($global_config['admin_mail'], $mailSubject, $traffic_mail_message, $mailHeaders);
+ $recipients[] = $global_config['admin_mail'];
}
//* Send email to client
@@ -725,10 +757,11 @@ if ($app->dbmaster == $app->db) {
$client_group_id = $rec["sys_groupid"];
$client = $app->db->queryOneRecord("SELECT client.email FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
if($client['email'] != '') {
- mail($client['email'], $mailSubject, $traffic_mail_message, $mailHeaders);
+ $recipients[] = $client['email'];
}
}
-
+
+ send_notification_email('web_traffic_notification', $placeholders, $recipients);
}
@@ -746,6 +779,283 @@ if ($app->dbmaster == $app->db) {
}
+#######################################################################################################
+// send website quota warnings by email
+#######################################################################################################
+
+if ($app->dbmaster == $app->db) {
+
+ $global_config = $app->getconf->get_global_config('mail');
+
+ //* Check website disk quota
+ $sql = "SELECT domain_id,sys_groupid,domain,system_user,last_quota_notification,DATEDIFF(CURDATE(), last_quota_notification) as `notified_before` FROM web_domain WHERE (type = 'vhost' OR type = 'vhostsubdomain')";
+ $records = $app->db->queryAllRecords($sql);
+ if(is_array($records) && !empty($records)) {
+
+ $tmp_rec = $app->db->queryAllRecords("SELECT data from monitor_data WHERE type = 'harddisk_quota' ORDER BY created DESC");
+ $monitor_data = array();
+ if(is_array($tmp_rec)) {
+ foreach ($tmp_rec as $tmp_mon) {
+ $monitor_data = array_merge_recursive($monitor_data,unserialize($app->db->unquote($tmp_mon['data'])));
+ }
+ }
+
+ foreach($records as $rec) {
+
+ //$web_hd_quota = $rec['hd_quota'];
+ $domain = $rec['domain'];
+
+ $username = $rec['system_user'];
+ $rec['used'] = $monitor_data['user'][$username]['used'];
+ $rec['soft'] = $monitor_data['user'][$username]['soft'];
+ $rec['hard'] = $monitor_data['user'][$username]['hard'];
+ $rec['files'] = $monitor_data['user'][$username]['files'];
+
+ if (!is_numeric($rec['used'])){
+ if ($rec['used'][0] > $rec['used'][1]){
+ $rec['used'] = $rec['used'][0];
+ } else {
+ $rec['used'] = $rec['used'][1];
+ }
+ }
+ if (!is_numeric($rec['soft'])) $rec['soft']=$rec['soft'][1];
+ if (!is_numeric($rec['hard'])) $rec['hard']=$rec['hard'][1];
+ if (!is_numeric($rec['files'])) $rec['files']=$rec['files'][1];
+
+ // used space ratio
+ if($rec['soft'] > 0){
+ $used_ratio = $rec['used']/$rec['soft'];
+ } else {
+ $used_ratio = 0;
+ }
+
+ $rec['ratio'] = number_format($used_ratio * 100, 2, '.', '').'%';
+
+ if($rec['used'] > 1024) {
+ $rec['used'] = round($rec['used'] / 1024,2).' MB';
+ } else {
+ if ($rec['used'] != '') $rec['used'] .= ' KB';
+ }
+
+ if($rec['soft'] > 1024) {
+ $rec['soft'] = round($rec['soft'] / 1024,2).' MB';
+ } elseif($rec['soft'] == 0){
+ $rec['soft'] = '----';
+ } else {
+ $rec['soft'] .= ' KB';
+ }
+
+ if($rec['hard'] > 1024) {
+ $rec['hard'] = round($rec['hard'] / 1024,2).' MB';
+ } elseif($rec['hard'] == 0){
+ $rec['hard'] = '----';
+ } else {
+ $rec['hard'] .= ' KB';
+ }
+
+ // send notifications only if 90% or more of the quota are used
+ if($used_ratio < 0.9) {
+ // reset notification date
+ if($rec['last_quota_notification']) $app->dbmaster->datalogUpdate('web_domain', "last_quota_notification = NULL", 'domain_id', $rec['domain_id']);
+
+ // send notification - everything ok again
+ if($rec['last_quota_notification'] && $web_config['overquota_notify_onok'] == 'y' && ($web_config['overquota_notify_admin'] == 'y' || $web_config['overquota_notify_client'] == 'y')) {
+ $placeholders = array('{domain}' => $rec['domain'],
+ '{admin_mail}' => $global_config['admin_mail'],
+ '{used}' => $rec['used'],
+ '{soft}' => $rec['soft'],
+ '{hard}' => $rec['hard'],
+ '{ratio}' => $rec['ratio']);
+
+ $recipients = array();
+
+ //* send email to admin
+ if($global_config['admin_mail'] != '' && $web_config['overquota_notify_admin'] == 'y') {
+ $recipients[] = $global_config['admin_mail'];
+ }
+
+ //* Send email to client
+ if($web_config['overquota_notify_client'] == 'y') {
+ $client_group_id = $rec["sys_groupid"];
+ $client = $app->db->queryOneRecord("SELECT client.email FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+ if($client['email'] != '') {
+ $recipients[] = $client['email'];
+ }
+ }
+ send_notification_email('web_quota_ok_notification', $placeholders, $recipients);
+ }
+
+ continue;
+ }
+
+ // could a notification be sent?
+ $send_notification = false;
+ if(!$rec['last_quota_notification']) $send_notification = true; // not yet notified
+ elseif($web_config['overquota_notify_freq'] > 0 && $rec['notified_before'] >= $web_config['overquota_notify_freq']) $send_notification = true;
+
+ //* Send quota notifications
+ if(($web_config['overquota_notify_admin'] == 'y' || $web_config['overquota_notify_client'] == 'y') && $send_notification == true) {
+ $app->dbmaster->datalogUpdate('web_domain', "last_quota_notification = CURDATE()", 'domain_id', $rec['domain_id']);
+
+ $placeholders = array('{domain}' => $rec['domain'],
+ '{admin_mail}' => $global_config['admin_mail'],
+ '{used}' => $rec['used'],
+ '{soft}' => $rec['soft'],
+ '{hard}' => $rec['hard'],
+ '{ratio}' => $rec['ratio']);
+
+ $recipients = array();
+
+ //* send email to admin
+ if($global_config['admin_mail'] != '' && $web_config['overquota_notify_admin'] == 'y') {
+ $recipients[] = $global_config['admin_mail'];
+ }
+
+ //* Send email to client
+ if($web_config['overquota_notify_client'] == 'y') {
+ $client_group_id = $rec["sys_groupid"];
+ $client = $app->db->queryOneRecord("SELECT client.email FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+ if($client['email'] != '') {
+ $recipients[] = $client['email'];
+ }
+ }
+ send_notification_email('web_quota_notification', $placeholders, $recipients);
+ }
+ }
+ }
+}
+
+
+#######################################################################################################
+// send mail quota warnings by email
+#######################################################################################################
+
+if ($app->dbmaster == $app->db) {
+
+ $global_config = $app->getconf->get_global_config('mail');
+ $mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail');
+
+ //* Check email quota
+ $sql = "SELECT mailuser_id,sys_groupid,email,name,quota,last_quota_notification,DATEDIFF(CURDATE(), last_quota_notification) as `notified_before` FROM mail_user";
+ $records = $app->db->queryAllRecords($sql);
+ if(is_array($records) && !empty($records)) {
+
+ $tmp_rec = $app->db->queryAllRecords("SELECT data from monitor_data WHERE type = 'email_quota' ORDER BY created DESC");
+ $monitor_data = array();
+ if(is_array($tmp_rec)) {
+ foreach ($tmp_rec as $tmp_mon) {
+ //$monitor_data = array_merge_recursive($monitor_data,unserialize($app->db->unquote($tmp_mon['data'])));
+ $tmp_array = unserialize($app->db->unquote($tmp_mon['data']));
+ if(is_array($tmp_array)) {
+ foreach($tmp_array as $username => $data) {
+ if(@!$monitor_data[$username]['used']) $monitor_data[$username]['used'] = $data['used'];
+ }
+ }
+ }
+ }
+
+ foreach($records as $rec) {
+
+ $email = $rec['email'];
+
+ $rec['used'] = isset($monitor_data[$email]['used']) ? $monitor_data[$email]['used'] : array(1 => 0);
+
+ if (!is_numeric($rec['used'])) $rec['used']=$rec['used'][1];
+
+ // used space ratio
+ if($rec['quota'] > 0){
+ $used_ratio = $rec['used']/$rec['quota'];
+ } else {
+ $used_ratio = 0;
+ }
+
+ $rec['ratio'] = number_format($used_ratio * 100, 2, '.', '').'%';
+
+ if($rec['quota'] > 0){
+ $rec['quota'] = round($rec['quota'] / 1048576,4).' MB';
+ } else {
+ $rec['quota'] = '----';
+ }
+
+ if($rec['used'] < 1544000) {
+ $rec['used'] = round($rec['used'] / 1024,4).' KB';
+ } else {
+ $rec['used'] = round($rec['used'] / 1048576,4).' MB';
+ }
+
+ // send notifications only if 90% or more of the quota are used
+ if($used_ratio < 0.9) {
+ // reset notification date
+ if($rec['last_quota_notification']) $app->dbmaster->datalogUpdate('mail_user', "last_quota_notification = NULL", 'mailuser_id', $rec['mailuser_id']);
+
+ // send notification - everything ok again
+ if($rec['last_quota_notification'] && $mail_config['overquota_notify_onok'] == 'y' && ($mail_config['overquota_notify_admin'] == 'y' || $mail_config['overquota_notify_client'] == 'y')) {
+ $placeholders = array('{email}' => $rec['email'],
+ '{admin_mail}' => $global_config['admin_mail'],
+ '{used}' => $rec['used'],
+ '{name}' => $rec['name'],
+ '{quota}' => $rec['quota'],
+ '{ratio}' => $rec['ratio']);
+
+ $recipients = array();
+ //* send email to admin
+ if($global_config['admin_mail'] != '' && $mail_config['overquota_notify_admin'] == 'y') {
+ $recipients[] = $global_config['admin_mail'];
+ }
+
+ //* Send email to client
+ if($mail_config['overquota_notify_client'] == 'y') {
+ $client_group_id = $rec["sys_groupid"];
+ $client = $app->db->queryOneRecord("SELECT client.email FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+ if($client['email'] != '') {
+ $recipients[] = $client['email'];
+ }
+ }
+
+ send_notification_email('mail_quota_ok_notification', $placeholders, $recipients);
+ }
+
+ continue;
+ }
+
+ //* Send quota notifications
+ // could a notification be sent?
+ $send_notification = false;
+ if(!$rec['last_quota_notification']) $send_notification = true; // not yet notified
+ elseif($mail_config['overquota_notify_freq'] > 0 && $rec['notified_before'] >= $mail_config['overquota_notify_freq']) $send_notification = true;
+
+ if(($mail_config['overquota_notify_admin'] == 'y' || $mail_config['overquota_notify_client'] == 'y') && $send_notification == true) {
+ $app->dbmaster->datalogUpdate('mail_user', "last_quota_notification = CURDATE()", 'mailuser_id', $rec['mailuser_id']);
+
+ $placeholders = array('{email}' => $rec['email'],
+ '{admin_mail}' => $global_config['admin_mail'],
+ '{used}' => $rec['used'],
+ '{name}' => $rec['name'],
+ '{quota}' => $rec['quota'],
+ '{ratio}' => $rec['ratio']);
+
+ $recipients = array();
+ //* send email to admin
+ if($global_config['admin_mail'] != '' && $mail_config['overquota_notify_admin'] == 'y') {
+ $recipients[] = $global_config['admin_mail'];
+ }
+
+ //* Send email to client
+ if($mail_config['overquota_notify_client'] == 'y') {
+ $client_group_id = $rec["sys_groupid"];
+ $client = $app->db->queryOneRecord("SELECT client.email FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+ if($client['email'] != '') {
+ $recipients[] = $client['email'];
+ }
+ }
+
+ send_notification_email('mail_quota_notification', $placeholders, $recipients);
+ }
+ }
+ }
+}
+
+
#######################################################################################################
// deactivate virtual servers (run only on the "master-server")
#######################################################################################################
@@ -822,25 +1132,28 @@ if($backup_dir != '') {
if($backup_mode == 'userzip') {
//* Create a .zip backup as web user and include also files owned by apache / nginx user
$web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.zip';
- exec('cd '.escapeshellarg($web_path).' && sudo -u '.escapeshellarg($web_user).' find . -group '.escapeshellarg($web_group).' -print 2> /dev/null | zip -b /tmp --exclude=backup\* --symlinks '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' -@');
- exec('cd '.escapeshellarg($web_path).' && sudo -u '.escapeshellarg($web_user).' find . -user '.escapeshellarg($http_server_user).' -print 2> /dev/null | zip -b /tmp --exclude=backup\* --update --symlinks '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' -@');
+ exec('cd '.escapeshellarg($web_path).' && sudo -u '.escapeshellarg($web_user).' find . -group '.escapeshellarg($web_group).' -print 2> /dev/null | zip -b /tmp --exclude=backup\* --symlinks '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' -@', $tmp_output, $retval);
+ if($retval == 0) exec('cd '.escapeshellarg($web_path).' && sudo -u '.escapeshellarg($web_user).' find . -user '.escapeshellarg($http_server_user).' -print 2> /dev/null | zip -b /tmp --exclude=backup\* --update --symlinks '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' -@', $tmp_output, $retval);
} else {
//* Create a tar.gz backup as root user
$web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.tar.gz';
- exec('tar pczf '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' --exclude=backup\* --directory '.escapeshellarg($web_path).' .');
+ exec('tar pczf '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' --exclude=backup\* --directory '.escapeshellarg($web_path).' .', $tmp_output, $retval);
}
- chown($web_backup_dir.'/'.$web_backup_file, 'root');
- chgrp($web_backup_dir.'/'.$web_backup_file, 'root');
- chmod($web_backup_dir.'/'.$web_backup_file, 0750);
-
- //* Insert web backup record in database
- //$insert_data = "(server_id,parent_domain_id,backup_type,backup_mode,tstamp,filename) VALUES (".$conf['server_id'].",".$web_id.",'web','".$backup_mode."',".time().",'".$app->db->quote($web_backup_file)."')";
- //$app->dbmaster->datalogInsert('web_backup', $insert_data, 'backup_id');
-
- $sql = "INSERT INTO web_backup (server_id,parent_domain_id,backup_type,backup_mode,tstamp,filename,filesize) VALUES (".$conf['server_id'].",".$web_id.",'web','".$backup_mode."',".time().",'".$app->db->quote($web_backup_file)."','".formatBytes(filesize($web_backup_dir.'/'.$web_backup_file))."')";
- $app->db->query($sql);
- if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql);
-
+ if($retval == 0){
+ chown($web_backup_dir.'/'.$web_backup_file, 'root');
+ chgrp($web_backup_dir.'/'.$web_backup_file, 'root');
+ chmod($web_backup_dir.'/'.$web_backup_file, 0750);
+
+ //* Insert web backup record in database
+ //$insert_data = "(server_id,parent_domain_id,backup_type,backup_mode,tstamp,filename) VALUES (".$conf['server_id'].",".$web_id.",'web','".$backup_mode."',".time().",'".$app->db->quote($web_backup_file)."')";
+ //$app->dbmaster->datalogInsert('web_backup', $insert_data, 'backup_id');
+ $sql = "INSERT INTO web_backup (server_id,parent_domain_id,backup_type,backup_mode,tstamp,filename) VALUES (".$conf['server_id'].",".$web_id.",'web','".$backup_mode."',".time().",'".$app->db->quote($web_backup_file)."')";
+ $app->db->query($sql);
+ if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql);
+ } else {
+ if(is_file($web_backup_dir.'/'.$web_backup_file)) unlink($web_backup_dir.'/'.$web_backup_file);
+ }
+
//* Remove old backups
$backup_copies = intval($rec['backup_copies']);
@@ -924,23 +1237,28 @@ if($backup_dir != '') {
$db_name = $rec['database_name'];
$db_backup_file = 'db_'.$db_name.'_'.date('Y-m-d_H-i').'.sql';
$command = "mysqldump -h '".escapeshellcmd($clientdb_host)."' -u '".escapeshellcmd($clientdb_user)."' -p'".escapeshellcmd($clientdb_password)."' -c --add-drop-table --create-options --quick --result-file='".$db_backup_dir.'/'.$db_backup_file."' '".$db_name."'";
- exec($command);
+ exec($command, $tmp_output, $retval);
//* Compress the backup with gzip
- exec("gzip -c '".escapeshellcmd($db_backup_dir.'/'.$db_backup_file)."' > '".escapeshellcmd($db_backup_dir.'/'.$db_backup_file).".gz'");
- chmod($db_backup_dir.'/'.$db_backup_file.'.gz', 0750);
- chown($db_backup_dir.'/'.$db_backup_file.'.gz', fileowner($db_backup_dir));
- chgrp($db_backup_dir.'/'.$db_backup_file.'.gz', filegroup($db_backup_dir));
-
- //* Insert web backup record in database
- //$insert_data = "(server_id,parent_domain_id,backup_type,backup_mode,tstamp,filename) VALUES (".$conf['server_id'].",$web_id,'mysql','sqlgz',".time().",'".$app->db->quote($db_backup_file).".gz')";
- //$app->dbmaster->datalogInsert('web_backup', $insert_data, 'backup_id');
- $sql = "INSERT INTO web_backup (server_id,parent_domain_id,backup_type,backup_mode,tstamp,filename) VALUES (".$conf['server_id'].",$web_id,'mysql','sqlgz',".time().",'".$app->db->quote($db_backup_file).".gz')";
- $app->db->query($sql);
- if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql);
+ if($retval == 0) exec("gzip -c '".escapeshellcmd($db_backup_dir.'/'.$db_backup_file)."' > '".escapeshellcmd($db_backup_dir.'/'.$db_backup_file).".gz'", $tmp_output, $retval);
+
+ if($retval == 0){
+ chmod($db_backup_dir.'/'.$db_backup_file.'.gz', 0750);
+ chown($db_backup_dir.'/'.$db_backup_file.'.gz', fileowner($db_backup_dir));
+ chgrp($db_backup_dir.'/'.$db_backup_file.'.gz', filegroup($db_backup_dir));
+
+ //* Insert web backup record in database
+ //$insert_data = "(server_id,parent_domain_id,backup_type,backup_mode,tstamp,filename) VALUES (".$conf['server_id'].",$web_id,'mysql','sqlgz',".time().",'".$app->db->quote($db_backup_file).".gz')";
+ //$app->dbmaster->datalogInsert('web_backup', $insert_data, 'backup_id');
+ $sql = "INSERT INTO web_backup (server_id,parent_domain_id,backup_type,backup_mode,tstamp,filename) VALUES (".$conf['server_id'].",$web_id,'mysql','sqlgz',".time().",'".$app->db->quote($db_backup_file).".gz')";
+ $app->db->query($sql);
+ if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql);
+ } else {
+ if(is_file($db_backup_dir.'/'.$db_backup_file.'.gz')) unlink($db_backup_dir.'/'.$db_backup_file.'.gz');
+ }
//* Remove the uncompressed file
- unlink($db_backup_dir.'/'.$db_backup_file);
+ if(is_file($db_backup_dir.'/'.$db_backup_file)) unlink($db_backup_dir.'/'.$db_backup_file);
//* Remove old backups
$backup_copies = intval($rec['backup_copies']);
diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php
index 87f964dc5bd9b49dff64393ac25db7747f795db7..11bf8daf2328ddaa9e0d70d1acfdeedf757dc6a7 100755
--- a/server/lib/app.inc.php
+++ b/server/lib/app.inc.php
@@ -102,28 +102,31 @@ class app {
function log($msg, $priority = 0) {
global $conf;
+
+ switch ($priority) {
+ case 0:
+ $priority_txt = 'DEBUG';
+ break;
+ case 1:
+ $priority_txt = 'WARNING';
+ break;
+ case 2:
+ $priority_txt = 'ERROR';
+ break;
+ }
+ $log_msg = @date('d.m.Y-H:i').' - '.$priority_txt.' - '. $msg;
if($priority >= $conf['log_priority']) {
//if (is_writable($conf["log_file"])) {
if (!$fp = fopen ($conf['log_file'], 'a')) {
die('Unable to open logfile.');
}
- switch ($priority) {
- case 0:
- $priority_txt = 'DEBUG';
- break;
- case 1:
- $priority_txt = 'WARNING';
- break;
- case 2:
- $priority_txt = 'ERROR';
- break;
- }
- if (!fwrite($fp, @date('d.m.Y-H:i').' - '.$priority_txt.' - '. $msg."\r\n")) {
+ if (!fwrite($fp, $log_msg."\r\n")) {
die('Unable to write to logfile.');
}
- echo @date('d.m.Y-H:i').' - '.$priority_txt.' - '. $msg."\n";
+
+ echo $log_msg."\n";
fclose($fp);
// Log to database
@@ -149,8 +152,24 @@ class app {
//} else {
// die("Unable to write to logfile.");
//}
+
+
} // if
+
+ if($priority >= $conf['admin_notify_priority'] && $conf['admin_mail'] != '') {
+ // send notification to admin
+ $mailBody = $log_msg;
+ $mailSubject = substr($log_msg,0,50).'...';
+ $mailHeaders = "MIME-Version: 1.0" . "\n";
+ $mailHeaders .= "Content-type: text/plain; charset=utf-8" . "\n";
+ $mailHeaders .= "Content-Transfer-Encoding: 8bit" . "\n";
+ $mailHeaders .= "From: ". $conf['admin_mail'] . "\n";
+ $mailHeaders .= "Reply-To: ". $conf['admin_mail'] . "\n";
+
+ mail($conf['admin_mail'], $mailSubject, $mailBody, $mailHeaders);
+ }
} // func
+
/*
0 = DEBUG
diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php
index 61620247475d33c93e3fbb2f186cf980861084e6..9ce95567a26f737653df2ddc88f7ebb6a6a79712 100644
--- a/server/lib/classes/monitor_tools.inc.php
+++ b/server/lib/classes/monitor_tools.inc.php
@@ -132,7 +132,7 @@ class monitor_tools {
$distver = 'Squeeze/Sid';
$distid = 'debian60';
$distbaseid = 'debian';
- } elseif (strstr(trim(file_get_contents('/etc/debian_version')), '7.0') || trim(file_get_contents('/etc/debian_version')) == 'wheezy/sid') {
+ } elseif (strstr(trim(file_get_contents('/etc/debian_version')), '7.0') || strstr(trim(file_get_contents('/etc/debian_version')), '7.1') || trim(file_get_contents('/etc/debian_version')) == 'wheezy/sid') {
$distname = 'Debian';
$distver = 'Wheezy/Sid';
$distid = 'debian60';
@@ -473,7 +473,7 @@ class monitor_tools {
}
public function monitorDiskUsage() {
- global $conf;
+ global $app,$conf;
/* the id of the server as int */
$server_id = intval($conf['server_id']);
@@ -485,7 +485,10 @@ class monitor_tools {
$state = 'ok';
/** Fetch the data of ALL devices into a array (needed for monitoring!) */
- $dfData = shell_exec('df -hT 2>/dev/null');
+ //$dfData = shell_exec('df -hT 2>/dev/null');
+ $app->uses('getconf');
+ $web_config = $app->getconf->get_server_config($conf['server_id'], 'web');
+ $dfData = shell_exec('df -hT|grep -v "'.$web_config['website_basedir'].'/" 2>/dev/null');
// split into array
$df = explode("\n", $dfData);
diff --git a/server/lib/classes/services.inc.php b/server/lib/classes/services.inc.php
index d10abf2392827ef906394a0b5999cadb459901eb..cd53433e0efc599992780011441180319b81900c 100644
--- a/server/lib/classes/services.inc.php
+++ b/server/lib/classes/services.inc.php
@@ -55,9 +55,10 @@ class services {
$function_name = $this->registered_services[$service_name]['function'];
$app->log("Calling function '$function_name' from module '$module_name'.",LOGLEVEL_DEBUG);
// call_user_method($function_name,$app->loaded_modules[$module_name],$action);
- call_user_func(array($app->loaded_modules[$module_name],$function_name),$action);
+ return call_user_func(array($app->loaded_modules[$module_name],$function_name),$action);
} else {
$app->log("Unable to restart $service_name. Service not registered.",LOGLEVEL_WARNING);
+ return array('output' => '', 'retval' => 0);
}
}
diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index c958e8b86d2f8feca863c69b0d45613a8e9ca556..f6b52cfbfd0433f1b0dde62d934e149d60e7cb7b 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -780,7 +780,7 @@ class system{
if(substr($path,0,1) != '/') return false;
//* We allow only some characters in the path
- if(!preg_match('/[a-zA-Z0-9_\.\-]{1,}/',$path)) return false;
+ if(!preg_match('/^\/[a-zA-Z0-9_\/\.\-]{1,}$/',$path)) return false;
//* Check path for symlinks
$path_parts = explode('/',$path);
diff --git a/server/lib/classes/tpl.inc.php b/server/lib/classes/tpl.inc.php
index af2e0da22d4eb1a5462766de7a46c6c47d39b235..c3c16c9538452fcafd92e5b3ddc147fe71bfa1b5 100644
--- a/server/lib/classes/tpl.inc.php
+++ b/server/lib/classes/tpl.inc.php
@@ -928,9 +928,9 @@ if (!defined('vlibTemplateClassLoaded')) {
$regex.= '[\"\']?';
$regex.= ')?\s*';
$regex.= '(?:>|\/>|}|-->){1}';
- $regex.= '/ie';
+ $regex.= '/i';
//$regex.= '([\r\n|\n|\r])?/ie';
- $data = preg_replace($regex,"\$this->_parseTag(array('\\0','\\1','\\2','\\3','\\4','\\5','\\6','\\7','\\8','\\9'));",$data);
+ $data = preg_replace_callback($regex, array($this, '_parseTag'), $data);
if ($this->_cache) { // add cache if need be
$this->_createCache($data);
diff --git a/server/mods-available/dns_module.inc.php b/server/mods-available/dns_module.inc.php
index 01c4526a46b49992dac460070da4bf8629033197..2fac7b5c5697a85abddad9ae05f1e8cf0886b680 100644
--- a/server/mods-available/dns_module.inc.php
+++ b/server/mods-available/dns_module.inc.php
@@ -128,12 +128,13 @@ class dns_module {
$daemon = 'named';
}
+ $retval = array('output' => '', 'retval' => 0);
if($action == 'restart') {
- exec($conf['init_scripts'] . '/' . $daemon . ' restart');
+ exec($conf['init_scripts'] . '/' . $daemon . ' restart', $retval['output'], $retval['retval']);
} else {
- exec($conf['init_scripts'] . '/' . $daemon . ' reload');
+ exec($conf['init_scripts'] . '/' . $daemon . ' reload', $retval['output'], $retval['retval']);
}
-
+ return $retval;
}
function restartPowerDNS($action = 'restart') {
@@ -177,9 +178,11 @@ class dns_module {
$daemon = 'pdns';
}
- exec($conf['init_scripts'] . '/' . $daemon . ' restart');
+ $retval = array('output' => '', 'retval' => 0);
+ exec($conf['init_scripts'] . '/' . $daemon . ' restart', $retval['output'], $retval['retval']);
// unset $tmps;
+ return $retval;
}
diff --git a/server/mods-available/monitor_core_module.inc.php b/server/mods-available/monitor_core_module.inc.php
index 63a813c400873627994a88e3f009d9ba86c03613..2e66d64938452c357484fa4b690d9438bf25e6f8 100644
--- a/server/mods-available/monitor_core_module.inc.php
+++ b/server/mods-available/monitor_core_module.inc.php
@@ -37,6 +37,8 @@ class monitor_core_module {
var $actions_available = array();
/** The Tools */
private $_tools = null;
+ //** time the script was called
+ private $_run_time = null;
/**
* This function is called during ispconfig installation to determine
@@ -52,11 +54,14 @@ class monitor_core_module {
*/
public function onLoad() {
global $app;
-
+
+ //* store the running time
+ $this->_run_time = time();
+
/*
* Do the monitor every n minutes and write the result to the db
*/
- $min = @date('i');
+ $min = @date('i', $this->_run_time);
if (($min % $this->interval) == 0) {
$this->_doMonitor();
}
@@ -122,7 +127,7 @@ class monitor_core_module {
/*
* This monitoring is expensive, so do it only every 15 minutes
*/
- $min = @date('i');
+ $min = @date('i', $this->_run_time);
if ($min % 15 != 0) return;
$app->uses('getconf');
@@ -404,7 +409,7 @@ class monitor_core_module {
/*
* This monitoring is expensive, so do it only once an hour
*/
- $min = @date('i');
+ $min = @date('i', $this->_run_time);
if ($min != 0)
return;
@@ -419,7 +424,8 @@ class monitor_core_module {
$res = $this->_tools->monitorSystemUpdate();
//* Ensure that output is encoded so that it does not break the serialize
- $res['data']['output'] = htmlentities($res['data']['output']);
+ //$res['data']['output'] = htmlentities($res['data']['output']);
+ $res['data']['output'] = htmlentities($res['data']['output'],ENT_QUOTES,'UTF-8');
/*
* Insert the data into the database
@@ -492,8 +498,8 @@ class monitor_core_module {
/*
* This monitoring is expensive, so do it only once a day
*/
- $min = @date('i');
- $hour = @date('H');
+ $min = @date('i', $this->_run_time);
+ $hour = @date('H', $this->_run_time);
if (!($min == 0 && $hour == 23))
return;
/*
diff --git a/server/mods-available/web_module.inc.php b/server/mods-available/web_module.inc.php
index dd7aba083424858978c0b7efd5cb8c53e5e15c66..52d4aeddb90a52dfee8c9aebb15f73c77ab1f0a7 100644
--- a/server/mods-available/web_module.inc.php
+++ b/server/mods-available/web_module.inc.php
@@ -210,12 +210,13 @@ class web_module {
}
}
+ $retval = array('output' => '', 'retval' => 0);
if($action == 'restart') {
- exec($conf['init_scripts'] . '/' . $daemon . ' restart');
+ exec($conf['init_scripts'] . '/' . $daemon . ' restart', $retval['output'], $retval['retval']);
} else {
- exec($conf['init_scripts'] . '/' . $daemon . ' reload');
+ exec($conf['init_scripts'] . '/' . $daemon . ' reload', $retval['output'], $retval['retval']);
}
-
+ return $retval;
}
function restartPHP_FPM($action = 'restart') {
@@ -229,7 +230,9 @@ class web_module {
if(!$init_script) $init_script = $conf['init_scripts'].'/'.$web_config['php_fpm_init_script'];
- exec($init_script.' '.$action);
+ $retval = array('output' => '', 'retval' => 0);
+ exec($init_script.' '.$action, $retval['output'], $retval['retval']);
+ return $retval;
}
} // end class
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 58e941d6d5ecdd8eba6f37821c1a247b863c326c..0107cbba1f766165bbf6d256458fd98ac5274d28 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -189,7 +189,7 @@ class apache2_plugin {
$app->uses('getconf');
$web_config = $app->getconf->get_server_config($conf['server_id'], 'web');
if ($web_config['CA_path']!='' && !file_exists($web_config['CA_path'].'/openssl.cnf'))
- $app->log("CA path error, file does not exist:".$web_config['CA_path'].'/openssl.conf',LOGLEVEL_ERROR);
+ $app->log("CA path error, file does not exist:".$web_config['CA_path'].'/openssl.cnf',LOGLEVEL_ERROR);
//* Only vhosts can have a ssl cert
if($data["new"]["type"] != "vhost" && $data["new"]["type"] != "vhostsubdomain") return;
@@ -336,6 +336,7 @@ class apache2_plugin {
//* Write the key file, if field is empty then import the key into the db
if(trim($data["new"]["ssl_key"]) != '') {
$app->system->file_put_contents($key_file2,$data["new"]["ssl_key"]);
+ $app->system->chmod($key_file2,0400);
} else {
$ssl_key2 = $app->db->quote($app->system->file_get_contents($key_file2));
/* Update the DB of the (local) Server */
@@ -762,6 +763,9 @@ class apache2_plugin {
$this->_exec('chown root:root '.escapeshellcmd($data['new']['document_root']).'/' . $web_folder);
}
}
+
+ //* add the Apache user to the client group if this is a vhost and security level is set to high, no matter if this is an insert or update and regardless of set_folder_permissions_on_update
+ if($data['new']['type'] == 'vhost' && $web_config['security_level'] == 20) $app->system->add_user_to_group($groupname, escapeshellcmd($web_config['user']));
//* If the security level is set to high
if(($this->action == 'insert' && $data['new']['type'] == 'vhost') or ($web_config['set_folder_permissions_on_update'] == 'y' && $data['new']['type'] == 'vhost')) {
@@ -805,9 +809,6 @@ class apache2_plugin {
$app->system->server_conf['group_datei'] = $tmp_groupfile;
unset($tmp_groupfile);
}
-
- //* add the Apache user to the client group
- $app->system->add_user_to_group($groupname, escapeshellcmd($web_config['user']));
//* Chown all default directories
$app->system->chown($data['new']['document_root'],'root');
@@ -1121,7 +1122,7 @@ class apache2_plugin {
// Rewriting
if($alias['redirect_type'] != '' && $alias['redirect_path'] != '') {
- if(substr($alias['redirect_path'],-1) != '/' && !preg_match('/^(https?|\[scheme\]):\/\//', $data['new']['redirect_path'])) $alias['redirect_path'] .= '/';
+ if(substr($alias['redirect_path'],-1) != '/' && !preg_match('/^(https?|\[scheme\]):\/\//', $alias['redirect_path'])) $alias['redirect_path'] .= '/';
if(substr($alias['redirect_path'],0,8) == '[scheme]'){
$rewrite_target = 'http'.substr($alias['redirect_path'],8);
$rewrite_target_ssl = 'https'.substr($alias['redirect_path'],8);
@@ -1352,9 +1353,9 @@ class apache2_plugin {
if (!is_dir($cgi_starter_path)) {
$app->system->mkdirpath($cgi_starter_path);
- $app->system->chmod($cgi_starter_script,0755);
- $app->system->chown($cgi_starter_script,$data['new']['system_user']);
- $app->system->chgrp($cgi_starter_script,$data['new']['system_group']);
+ $app->system->chown($cgi_starter_path,$data['new']['system_user']);
+ $app->system->chgrp($cgi_starter_path,$data['new']['system_group']);
+ $app->system->chmod($cgi_starter_path,0755);
$app->log('Creating cgi starter script directory: '.$cgi_starter_path,LOGLEVEL_DEBUG);
}
@@ -1564,7 +1565,8 @@ class apache2_plugin {
$apache_online_status_before_restart = $this->_checkTcp('localhost',80);
$app->log('Apache status is: '.$apache_online_status_before_restart,LOGLEVEL_DEBUG);
- $app->services->restartService('httpd','restart');
+ $retval = $app->services->restartService('httpd','restart'); // $retval['retval'] is 0 on success and > 0 on failure
+ $app->log('Apache restart return value is: '.$retval['retval'],LOGLEVEL_DEBUG);
// wait a few seconds, before we test the apache status again
$apache_online_status_after_restart = false;
@@ -1576,8 +1578,41 @@ class apache2_plugin {
}
//* Check if apache restarted successfully if it was online before
$app->log('Apache online status after restart is: '.$apache_online_status_after_restart,LOGLEVEL_DEBUG);
- if($apache_online_status_before_restart && !$apache_online_status_after_restart) {
- $app->log('Apache did not restart after the configuration change for website '.$data['new']['domain'].' Reverting the configuration. Saved non-working config as '.$vhost_file.'.err',LOGLEVEL_WARN);
+ if($apache_online_status_before_restart && !$apache_online_status_after_restart || $retval['retval'] > 0) {
+ $app->log('Apache did not restart after the configuration change for website '.$data['new']['domain'].'. Reverting the configuration. Saved non-working config as '.$vhost_file.'.err',LOGLEVEL_WARN);
+ if(is_array($retval['output']) && !empty($retval['output'])){
+ $app->log('Reason for Apache restart failure: '.implode("\n", $retval['output']),LOGLEVEL_WARN);
+ } else {
+ // if no output is given, check again
+ $webserver_binary = '';
+ exec('which apache2', $webserver_check_output, $webserver_check_retval);
+ if($webserver_check_retval == 0){
+ $webserver_binary = 'apache2';
+ } else {
+ unset($webserver_check_output, $webserver_check_retval);
+ exec('which httpd2', $webserver_check_output, $webserver_check_retval);
+ if($webserver_check_retval == 0){
+ $webserver_binary = 'httpd2';
+ } else {
+ unset($webserver_check_output, $webserver_check_retval);
+ exec('which httpd', $webserver_check_output, $webserver_check_retval);
+ if($webserver_check_retval == 0){
+ $webserver_binary = 'httpd';
+ } else {
+ unset($webserver_check_output, $webserver_check_retval);
+ exec('which apache', $webserver_check_output, $webserver_check_retval);
+ if($webserver_check_retval == 0){
+ $webserver_binary = 'apache';
+ }
+ }
+ }
+ }
+ if($webserver_binary != ''){
+ exec($webserver_binary.' -t 2>&1', $tmp_output, $tmp_retval);
+ if($tmp_retval > 0 && is_array($tmp_output) && !empty($tmp_output)) $app->log('Reason for Apache restart failure: '.implode("\n", $tmp_output),LOGLEVEL_WARN);
+ unset($tmp_output, $tmp_retval);
+ }
+ }
$app->system->copy($vhost_file,$vhost_file.'.err');
if(is_file($vhost_file.'~')) {
//* Copy back the last backup file
@@ -2855,8 +2890,10 @@ class apache2_plugin {
$app->log('Removed client directory: '.$client_dir,LOGLEVEL_DEBUG);
}
- $this->_exec('groupdel client'.$client_id);
- $app->log('Removed group client'.$client_id,LOGLEVEL_DEBUG);
+ if($app->system->is_group('client'.$client_id)){
+ $this->_exec('groupdel client'.$client_id);
+ $app->log('Removed group client'.$client_id,LOGLEVEL_DEBUG);
+ }
}
}
diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php
index e4f6e6c86fb2144f1f981721f681e12a053b8dd2..fd7f516b37a7035f94acb905dc069fe9ada36416 100644
--- a/server/plugins-available/bind_plugin.inc.php
+++ b/server/plugins-available/bind_plugin.inc.php
@@ -103,6 +103,11 @@ class bind_plugin {
$tpl->setVar($zone);
$records = $app->db->queryAllRecords("SELECT * FROM dns_rr WHERE zone = ".$zone['id']." AND active = 'Y'");
+ if(is_array($records) && !empty($records)){
+ for($i=0;$isetLoop('zones',$records);
//TODO : change this when distribution information has been integrated into server record
diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php
index 4ccbcb2b0f3618f295d9d490453aa27b59fb5d34..cf9baa8be0ef2213e4ff735a11dcaf57d297bc68 100644
--- a/server/plugins-available/cron_plugin.inc.php
+++ b/server/plugins-available/cron_plugin.inc.php
@@ -212,7 +212,7 @@ class cron_plugin {
}
$command .= "\t";
- if(substr($job['command'], 0, 1) != "/") $command .= $this->parent_domain['document_root'].'/';
+ if($job['type'] == 'chrooted' && substr($job['command'], 0, 1) != "/") $command .= $this->parent_domain['document_root'].'/';
$command .= $job['command'];
}
diff --git a/server/plugins-available/ftpuser_base_plugin.inc.php b/server/plugins-available/ftpuser_base_plugin.inc.php
index 1b4a016a8cb845b694ffbb171f6a3b60015d2a96..66723d24dc9751e6795c3a5838d98049efa03d2f 100644
--- a/server/plugins-available/ftpuser_base_plugin.inc.php
+++ b/server/plugins-available/ftpuser_base_plugin.inc.php
@@ -69,6 +69,8 @@ class ftpuser_base_plugin {
function insert($event_name,$data) {
global $app, $conf;
+ $app->uses('system');
+
if(!is_dir($data['new']['dir'])) {
$app->log("FTP User directory '".$data['new']['dir']."' does not exist. Creating it now.",LOGLEVEL_DEBUG);
@@ -80,9 +82,11 @@ class ftpuser_base_plugin {
return false;
}
+ $app->system->web_folder_protection($web['document_root'],false);
exec('mkdir -p '.escapeshellcmd($data['new']['dir']));
exec('chown '.escapeshellcmd($web["system_user"]).':'.escapeshellcmd($web['system_group']).' '.$data['new']['dir']);
-
+ $app->system->web_folder_protection($web['document_root'],true);
+
$app->log("Added ftpuser_dir: ".$data['new']['dir'],LOGLEVEL_DEBUG);
}
@@ -91,6 +95,8 @@ class ftpuser_base_plugin {
function update($event_name,$data) {
global $app, $conf;
+ $app->uses('system');
+
if(!is_dir($data['new']['dir'])) {
$app->log("FTP User directory '".$data['new']['dir']."' does not exist. Creating it now.",LOGLEVEL_DEBUG);
@@ -101,9 +107,11 @@ class ftpuser_base_plugin {
$app->log('User dir is outside of docroot.',LOGLEVEL_WARN);
return false;
}
-
+
+ $app->system->web_folder_protection($web['document_root'],false);
exec('mkdir -p '.escapeshellcmd($data['new']['dir']));
exec('chown '.escapeshellcmd($web["system_user"]).':'.escapeshellcmd($web['system_group']).' '.$data['new']['dir']);
+ $app->system->web_folder_protection($web['document_root'],true);
$app->log("Added ftpuser_dir: ".$data['new']['dir'],LOGLEVEL_DEBUG);
}
diff --git a/server/plugins-available/getmail_plugin.inc.php b/server/plugins-available/getmail_plugin.inc.php
index 759c219f8cb937421d5c8d68eec6a67c4a780a30..eb2da0e5c50e457bb9effad7cdda5ac07aed924c 100644
--- a/server/plugins-available/getmail_plugin.inc.php
+++ b/server/plugins-available/getmail_plugin.inc.php
@@ -104,15 +104,15 @@ class getmail_plugin {
// Shall emails be deleted after retrieval
if($data["new"]["source_delete"] == 'y') {
- $tpl = str_replace('{DELETE}','1',$tpl);
+ $tpl = str_replace('{DELETE}','true',$tpl);
} else {
- $tpl = str_replace('{DELETE}','0',$tpl);
+ $tpl = str_replace('{DELETE}','false',$tpl);
}
if($data["new"]["read_all"] == 'y') {
- $tpl = str_replace('{READ_ALL}', '1', $tpl);
+ $tpl = str_replace('{READ_ALL}', 'true', $tpl);
} else {
- $tpl = str_replace('{READ_ALL}', '0', $tpl);
+ $tpl = str_replace('{READ_ALL}', 'false', $tpl);
}
// Set the data retriever
diff --git a/server/plugins-available/mysql_clientdb_plugin.inc.php b/server/plugins-available/mysql_clientdb_plugin.inc.php
index 7fa2b7b2327f9f5300e5ca3f047438dcbe68ea10..b4fa6d3f56148dabfcf6b0322f9fdb1500b4e32c 100644
--- a/server/plugins-available/mysql_clientdb_plugin.inc.php
+++ b/server/plugins-available/mysql_clientdb_plugin.inc.php
@@ -247,8 +247,10 @@ class mysql_clientdb_plugin {
// get the users for this database
$db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['new']['database_user_id']) . "'");
+ $old_db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['old']['database_user_id']) . "'");
$db_ro_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['new']['database_ro_user_id']) . "'");
+ $old_db_ro_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['old']['database_ro_user_id']) . "'");
$host_list = '';
if($data['new']['remote_access'] == 'y') {
@@ -278,28 +280,28 @@ class mysql_clientdb_plugin {
else $this->process_host_list('GRANT', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $host_list, $link, '', true);
}
} else if($data['new']['active'] == 'n' && $data['old']['active'] == 'y') { // revoke database user, if inactive
- if($db_user) {
- if($db_user['database_user'] == 'root'){
+ if($old_db_user) {
+ if($old_db_user['database_user'] == 'root'){
$app->log('User root not allowed for Client databases',LOGLEVEL_WARNING);
} else {
// Find out users to drop and users to revoke
- $drop_or_revoke_user = $this->drop_or_revoke_user($data['new']['database_id'], $data['new']['database_user_id'], $old_host_list);
- if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
- if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
+ $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_user_id'], $old_host_list);
+ if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['old']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
+ if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['old']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
//$this->process_host_list('DROP', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $old_host_list, $link);
//$this->process_host_list('REVOKE', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $old_host_list, $link);
}
}
- if($db_ro_user && $data['new']['database_user_id'] != $data['new']['database_ro_user_id']) {
- if($db_ro_user['database_user'] == 'root'){
+ if($old_db_ro_user && $data['old']['database_user_id'] != $data['old']['database_ro_user_id']) {
+ if($old_db_ro_user['database_user'] == 'root'){
$app->log('User root not allowed for Client databases',LOGLEVEL_WARNING);
} else {
// Find out users to drop and users to revoke
- $drop_or_revoke_user = $this->drop_or_revoke_user($data['new']['database_id'], $data['new']['database_ro_user_id'], $old_host_list);
- if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
- if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
+ $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_ro_user_id'], $old_host_list);
+ if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['old']['database_name'], $old_db_ro_user['database_user'], $old_db_ro_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
+ if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['old']['database_name'], $old_db_ro_user['database_user'], $old_db_ro_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
//$this->process_host_list('DROP', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $old_host_list, $link);
//$this->process_host_list('REVOKE', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $old_host_list, $link);
@@ -314,15 +316,14 @@ class mysql_clientdb_plugin {
//* selected Users have changed
if($data['new']['database_user_id'] != $data['old']['database_user_id']) {
if($data['old']['database_user_id'] && $data['old']['database_user_id'] != $data['new']['database_ro_user_id']) {
- $old_db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['old']['database_user_id']) . "'");
if($old_db_user) {
if($old_db_user['database_user'] == 'root'){
$app->log('User root not allowed for Client databases',LOGLEVEL_WARNING);
} else {
// Find out users to drop and users to revoke
- $drop_or_revoke_user = $this->drop_or_revoke_user($data['new']['database_id'], $data['old']['database_user_id'], $old_host_list);
- if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['new']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
- if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['new']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
+ $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_user_id'], $old_host_list);
+ if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['old']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
+ if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['old']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
//$this->process_host_list('DROP', $data['new']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $old_host_list, $link);
//$this->process_host_list('REVOKE', $data['new']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $old_host_list, $link);
@@ -336,15 +337,14 @@ class mysql_clientdb_plugin {
}
if($data['new']['database_ro_user_id'] != $data['old']['database_ro_user_id']) {
if($data['old']['database_ro_user_id'] && $data['old']['database_ro_user_id'] != $data['new']['database_user_id']) {
- $old_db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['old']['database_ro_user_id']) . "'");
- if($old_db_user) {
- if($old_db_user['database_user'] == 'root'){
+ if($old_db_ro_user) {
+ if($old_db_ro_user['database_user'] == 'root'){
$app->log('User root not allowed for Client databases',LOGLEVEL_WARNING);
} else {
// Find out users to drop and users to revoke
- $drop_or_revoke_user = $this->drop_or_revoke_user($data['new']['database_id'], $data['old']['database_user_id'], $old_host_list);
- if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['new']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
- if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['new']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
+ $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_user_id'], $old_host_list);
+ if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['old']['database_name'], $old_db_ro_user['database_user'], $old_db_ro_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
+ if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['old']['database_name'], $old_db_ro_user['database_user'], $old_db_ro_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
//$this->process_host_list('DROP', $data['new']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $old_host_list, $link);
//$this->process_host_list('REVOKE', $data['new']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $old_host_list, $link);
@@ -377,27 +377,27 @@ class mysql_clientdb_plugin {
else $this->process_host_list('GRANT', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $data['new']['remote_ips'], $link, '', true);
}
} else {
- if($db_user) {
- if($db_user['database_user'] == 'root'){
+ if($old_db_user) {
+ if($old_db_user['database_user'] == 'root'){
$app->log('User root not allowed for Client databases',LOGLEVEL_WARNING);
} else {
// Find out users to drop and users to revoke
- $drop_or_revoke_user = $this->drop_or_revoke_user($data['new']['database_id'], $data['new']['database_user_id'], $data['old']['remote_ips']);
- if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
- if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
+ $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_user_id'], $data['old']['remote_ips']);
+ if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['old']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
+ if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['old']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
//$this->process_host_list('DROP', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $data['old']['remote_ips'], $link);
//$this->process_host_list('REVOKE', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $data['old']['remote_ips'], $link);
}
}
- if($db_ro_user && $data['new']['database_user_id'] != $data['new']['database_ro_user_id']) {
- if($db_ro_user['database_user'] == 'root'){
+ if($old_db_ro_user && $data['old']['database_user_id'] != $data['old']['database_ro_user_id']) {
+ if($old_db_ro_user['database_user'] == 'root'){
$app->log('User root not allowed for Client databases',LOGLEVEL_WARNING);
} else {
// Find out users to drop and users to revoke
- $drop_or_revoke_user = $this->drop_or_revoke_user($data['new']['database_id'], $data['new']['database_ro_user_id'], $data['old']['remote_ips']);
- if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
- if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
+ $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_ro_user_id'], $data['old']['remote_ips']);
+ if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['old']['database_name'], $old_db_ro_user['database_user'], $old_db_ro_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
+ if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['old']['database_name'], $old_db_ro_user['database_user'], $old_db_ro_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
//$this->process_host_list('DROP', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $data['old']['remote_ips'], $link);
//$this->process_host_list('REVOKE', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $data['old']['remote_ips'], $link);
@@ -407,31 +407,39 @@ class mysql_clientdb_plugin {
$app->log('Changing MySQL remote access privileges for database: '.$data['new']['database_name'],LOGLEVEL_DEBUG);
} elseif($data['new']['remote_access'] == 'y' && $data['new']['remote_ips'] != $data['old']['remote_ips']) {
//* Change remote access list
+ if($old_db_user) {
+ if($old_db_user['database_user'] == 'root'){
+ $app->log('User root not allowed for Client databases',LOGLEVEL_WARNING);
+ } else {
+ // Find out users to drop and users to revoke
+ $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_user_id'], $data['old']['remote_ips']);
+ if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['old']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
+ if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['old']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
+ }
+ }
if($db_user) {
if($db_user['database_user'] == 'root'){
$app->log('User root not allowed for Client databases',LOGLEVEL_WARNING);
} else {
- // Find out users to drop and users to revoke
- $drop_or_revoke_user = $this->drop_or_revoke_user($data['new']['database_id'], $data['new']['database_user_id'], $data['old']['remote_ips']);
- if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
- if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
-
- //$this->process_host_list('DROP', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $data['old']['remote_ips'], $link);
- //$this->process_host_list('REVOKE', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $data['old']['remote_ips'], $link);
$this->process_host_list('GRANT', $data['new']['database_name'], $db_user['database_user'], $db_user['database_password'], $data['new']['remote_ips'], $link);
}
}
+
+ if($old_db_ro_user && $data['old']['database_user_id'] != $data['old']['database_ro_user_id']) {
+ if($old_db_ro_user['database_user'] == 'root'){
+ $app->log('User root not allowed for Client databases',LOGLEVEL_WARNING);
+ } else {
+ // Find out users to drop and users to revoke
+ $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_user_id'], $data['old']['remote_ips']);
+ if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['old']['database_name'], $old_db_ro_user['database_user'], $old_db_ro_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
+ if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['old']['database_name'], $old_db_ro_user['database_user'], $old_db_ro_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
+ }
+ }
+
if($db_ro_user && $data['new']['database_user_id'] != $data['new']['database_ro_user_id']) {
if($db_ro_user['database_user'] == 'root'){
$app->log('User root not allowed for Client databases',LOGLEVEL_WARNING);
} else {
- // Find out users to drop and users to revoke
- $drop_or_revoke_user = $this->drop_or_revoke_user($data['new']['database_id'], $data['new']['database_user_id'], $data['old']['remote_ips']);
- if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
- if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
-
- //$this->process_host_list('DROP', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $data['old']['remote_ips'], $link);
- //$this->process_host_list('REVOKE', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $data['old']['remote_ips'], $link);
$this->process_host_list('GRANT', $data['new']['database_name'], $db_ro_user['database_user'], $db_ro_user['database_password'], $data['new']['remote_ips'], $link, '', true);
}
}
@@ -460,6 +468,28 @@ class mysql_clientdb_plugin {
return;
}
+ $old_host_list = '';
+ if($data['old']['remote_access'] == 'y') {
+ $old_host_list = $data['old']['remote_ips'];
+ if($old_host_list == '') $old_host_list = '%';
+ }
+ if($old_host_list != '') $old_host_list .= ',';
+ $old_host_list .= 'localhost';
+
+ if($data['old']['database_user_id']) {
+ $old_db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['old']['database_user_id']) . "'");
+ $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_user_id'], $old_host_list);
+ if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['old']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
+ if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['old']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
+ }
+ if($data['old']['database_ro_user_id']) {
+ $old_db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['old']['database_ro_user_id']) . "'");
+ $drop_or_revoke_user = $this->drop_or_revoke_user($data['old']['database_id'], $data['old']['database_ro_user_id'], $old_host_list);
+ if($drop_or_revoke_user['drop_hosts'] != '') $this->process_host_list('DROP', $data['old']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['drop_hosts'], $link);
+ if($drop_or_revoke_user['revoke_hosts'] != '') $this->process_host_list('REVOKE', $data['old']['database_name'], $old_db_user['database_user'], $old_db_user['database_password'], $drop_or_revoke_user['revoke_hosts'], $link);
+ }
+
+
if($link->query('DROP DATABASE '.$link->escape_string($data['old']['database_name']))) {
$app->log('Dropping MySQL database: '.$data['old']['database_name'],LOGLEVEL_DEBUG);
} else {
@@ -503,6 +533,8 @@ class mysql_clientdb_plugin {
$host_list = array('localhost');
// get all databases this user was active for
$db_list = $app->db->queryAllRecords("SELECT `remote_access`, `remote_ips` FROM `web_database` WHERE `database_user_id` = '" . intval($data['old']['database_user_id']) . "'");
+ if(count($db_list) < 1) return; // nothing to do on this server for this db user
+
foreach($db_list as $database) {
if($database['remote_access'] != 'y') continue;
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index 2c347f4a2ecd8615ab75425791ed909bbdb83d6a..dd9bcd70e1e9c11236b6e7f88cd25e625ed7f6c0 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -99,7 +99,7 @@ class nginx_plugin {
$app->uses('getconf');
$web_config = $app->getconf->get_server_config($conf['server_id'], 'web');
if ($web_config['CA_path']!='' && !file_exists($web_config['CA_path'].'/openssl.cnf'))
- $app->log("CA path error, file does not exist:".$web_config['CA_path'].'/openssl.conf',LOGLEVEL_ERROR);
+ $app->log("CA path error, file does not exist:".$web_config['CA_path'].'/openssl.cnf',LOGLEVEL_ERROR);
//* Only vhosts can have a ssl cert
if($data["new"]["type"] != "vhost" && $data["new"]["type"] != "vhostsubdomain") return;
@@ -243,6 +243,7 @@ class nginx_plugin {
if(trim($data["new"]["ssl_cert"]) != '') $app->system->file_put_contents($crt_file,$data["new"]["ssl_cert"]);
//if(trim($data["new"]["ssl_bundle"]) != '') $app->system->file_put_contents($bundle_file,$data["new"]["ssl_bundle"]);
if(trim($data["new"]["ssl_key"]) != '') $app->system->file_put_contents($key_file2,$data["new"]["ssl_key"]);
+ $app->system->chmod($key_file2,0400);
// for nginx, bundle files have to be appended to the certificate file
if(trim($data["new"]["ssl_bundle"]) != ''){
@@ -678,6 +679,9 @@ class nginx_plugin {
}
}
+ //* add the nginx user to the client group if this is a vhost and security level is set to high, no matter if this is an insert or update and regardless of set_folder_permissions_on_update
+ if($data['new']['type'] == 'vhost' && $web_config['security_level'] == 20) $app->system->add_user_to_group($groupname, escapeshellcmd($web_config['nginx_user']));
+
//* If the security level is set to high
if(($this->action == 'insert' && $data['new']['type'] == 'vhost') or ($web_config['set_folder_permissions_on_update'] == 'y' && $data['new']['type'] == 'vhost')) {
@@ -716,13 +720,10 @@ class nginx_plugin {
//* add the nginx user to the client group in the chroot environment
$tmp_groupfile = $app->system->server_conf['group_datei'];
$app->system->server_conf['group_datei'] = $web_config['website_basedir'].'/etc/group';
- $app->system->add_user_to_group($groupname, escapeshellcmd($web_config['user']));
+ $app->system->add_user_to_group($groupname, escapeshellcmd($web_config['nginx_user']));
$app->system->server_conf['group_datei'] = $tmp_groupfile;
unset($tmp_groupfile);
}
-
- //* add the nginx user to the client group
- $app->system->add_user_to_group($groupname, escapeshellcmd($web_config['nginx_user']));
//* Chown all default directories
$app->system->chown($data['new']['document_root'],'root');
@@ -938,6 +939,20 @@ class nginx_plugin {
// backwards compatibility; since ISPConfig 3.0.5, the PHP mode for nginx is called 'php-fpm' instead of 'fast-cgi'. The following line makes sure that old web sites that have 'fast-cgi' in the database still get PHP-FPM support.
if($vhost_data['php'] == 'fast-cgi') $vhost_data['php'] = 'php-fpm';
+ // Custom rewrite rules
+ $final_rewrite_rules = array();
+ $custom_rewrite_rules = $data['new']['rewrite_rules'];
+ // Make sure we only have Unix linebreaks
+ $custom_rewrite_rules = str_replace("\r\n", "\n", $custom_rewrite_rules);
+ $custom_rewrite_rules = str_replace("\r", "\n", $custom_rewrite_rules);
+ $custom_rewrite_rule_lines = explode("\n", $custom_rewrite_rules);
+ if(is_array($custom_rewrite_rule_lines) && !empty($custom_rewrite_rule_lines)){
+ foreach($custom_rewrite_rule_lines as $custom_rewrite_rule_line){
+ $final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line);
+ }
+ }
+ $tpl->setLoop('rewrite_rules', $final_rewrite_rules);
+
// Custom nginx directives
$final_nginx_directives = array();
$nginx_directives = $data['new']['nginx_directives'];
@@ -1525,7 +1540,8 @@ class nginx_plugin {
$nginx_online_status_before_restart = $this->_checkTcp('localhost',80);
$app->log('nginx status is: '.$nginx_online_status_before_restart,LOGLEVEL_DEBUG);
- $app->services->restartService('httpd','restart');
+ $retval = $app->services->restartService('httpd','restart'); // $retval['retval'] is 0 on success and > 0 on failure
+ $app->log('nginx restart return value is: '.$retval['retval'],LOGLEVEL_DEBUG);
// wait a few seconds, before we test the apache status again
sleep(2);
@@ -1533,9 +1549,18 @@ class nginx_plugin {
//* Check if nginx restarted successfully if it was online before
$nginx_online_status_after_restart = $this->_checkTcp('localhost',80);
$app->log('nginx online status after restart is: '.$nginx_online_status_after_restart,LOGLEVEL_DEBUG);
- if($nginx_online_status_before_restart && !$nginx_online_status_after_restart) {
- $app->log('nginx did not restart after the configuration change for website '.$data['new']['domain'].' Reverting the configuration. Saved non-working config as '.$vhost_file.'.err',LOGLEVEL_WARN);
+ if($nginx_online_status_before_restart && !$nginx_online_status_after_restart || $retval['retval'] > 0) {
+ $app->log('nginx did not restart after the configuration change for website '.$data['new']['domain'].'. Reverting the configuration. Saved non-working config as '.$vhost_file.'.err',LOGLEVEL_WARN);
+ if(is_array($retval['output']) && !empty($retval['output'])){
+ $app->log('Reason for nginx restart failure: '.implode("\n", $retval['output']),LOGLEVEL_WARN);
+ } else {
+ // if no output is given, check again
+ exec('nginx -t 2>&1', $tmp_output, $tmp_retval);
+ if($tmp_retval > 0 && is_array($tmp_output) && !empty($tmp_output)) $app->log('Reason for nginx restart failure: '.implode("\n", $tmp_output),LOGLEVEL_WARN);
+ unset($tmp_output, $tmp_retval);
+ }
$app->system->copy($vhost_file,$vhost_file.'.err');
+
if(is_file($vhost_file.'~')) {
//* Copy back the last backup file
$app->system->copy($vhost_file.'~',$vhost_file);
@@ -1581,12 +1606,7 @@ class nginx_plugin {
}
} else {
//* We do not check the nginx config after changes (is faster)
- if($nginx_chrooted) {
- $app->services->restartServiceDelayed('httpd','reload');
- } else {
- // request a httpd reload when all records have been processed
- $app->services->restartServiceDelayed('httpd','reload');
- }
+ $app->services->restartServiceDelayed('httpd','reload');
}
//* The vhost is written and apache has been restarted, so we
@@ -2400,6 +2420,12 @@ class nginx_plugin {
if(is_array($lines) && !empty($lines)){
$linecount = sizeof($lines);
for($h=0;$h<$linecount;$h++){
+ // remove comments
+ if(substr(trim($lines[$h]),0,1) == '#'){
+ unset($lines[$h]);
+ continue;
+ }
+
$lines[$h] = rtrim($lines[$h]);
/*
if(substr(ltrim($lines[$h]), 0, 8) == 'location' && strpos($lines[$h], '{') !== false && strpos($lines[$h], ';') !== false){
@@ -2526,8 +2552,10 @@ class nginx_plugin {
$app->log('Removed client directory: '.$client_dir,LOGLEVEL_DEBUG);
}
- $this->_exec('groupdel client'.$client_id);
- $app->log('Removed group client'.$client_id,LOGLEVEL_DEBUG);
+ if($app->system->is_group('client'.$client_id)){
+ $this->_exec('groupdel client'.$client_id);
+ $app->log('Removed group client'.$client_id,LOGLEVEL_DEBUG);
+ }
}
}
diff --git a/server/scripts/run-getmail.sh b/server/scripts/run-getmail.sh
index 0ab8cc50e239da4189c82b345eb37a78ad952c73..81f897a884d00e40166eda50e171c3a04b83f488 100644
--- a/server/scripts/run-getmail.sh
+++ b/server/scripts/run-getmail.sh
@@ -14,7 +14,7 @@ if [ -f /tmp/.getmail_lock ]; then
else
touch /tmp/.getmail_lock
if [ "$rcfiles" != "" ]; then
- /usr/bin/getmail -v -g /etc/getmail $rcfiles
+ /usr/bin/getmail -v -g /etc/getmail $rcfiles || true
fi
rm -f /tmp/.getmail_lock
fi
diff --git a/server/server.php b/server/server.php
index 1cdcb85a473e7ea4af8258c2f9a4dceaae9caef3..38baa772d44c3560ce425c9da4a6416c840cd2f8 100644
--- a/server/server.php
+++ b/server/server.php
@@ -62,10 +62,20 @@ if ($app->dbmaster->connect_error == NULL) {
// Set the loglevel
$conf['log_priority'] = intval($conf['serverconfig']['server']['loglevel']);
+
+ // Set level from which admin should be notified by email
+ if(!isset($conf['serverconfig']['server']['admin_notify_events']) || $conf['serverconfig']['server']['admin_notify_events'] == '') $conf['serverconfig']['server']['admin_notify_events'] = 3;
+ $conf['admin_notify_priority'] = intval($conf['serverconfig']['server']['admin_notify_events']);
// we do not need this variable anymore
unset($server_db_record);
+ // retrieve admin email address for notifications
+ $sys_ini = $app->dbmaster->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = 1");
+ $conf['sys_ini'] = $app->ini_parser->parse_ini_string(stripslashes($sys_ini['config']));
+ $conf['admin_mail'] = $conf['sys_ini']['mail']['admin_mail'];
+ unset($sys_ini);
+
/*
* Save the rescue-config, maybe we need it (because the database is down)
*/