From c4be523f5bd2fe7cabb993d37d4fe0685d9f60f7 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Mon, 3 Nov 2014 14:59:15 +0100 Subject: [PATCH 001/287] mailbackup: fixed domain-query --- server/lib/classes/cron.d/500-backup_mail.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/lib/classes/cron.d/500-backup_mail.inc.php b/server/lib/classes/cron.d/500-backup_mail.inc.php index 8740c5512..ae85db2b9 100644 --- a/server/lib/classes/cron.d/500-backup_mail.inc.php +++ b/server/lib/classes/cron.d/500-backup_mail.inc.php @@ -83,10 +83,11 @@ class cronjob_backup_mail extends cronjob { foreach($records as $rec) { //* Do the mailbox backup if($rec['backup_interval'] == 'daily' or ($rec['backup_interval'] == 'weekly' && date('w') == 0) or ($rec['backup_interval'] == 'monthly' && date('d') == '01')) { - $email = $rec['email'][1]; - $sql="SELECT * FROM mail_domain WHERE domain = ?" . $app->db->quote(explode("@",$email))."'"; - unset($email); + $email = $rec['email']; + $email=explode("@",$email)[1]; + $sql="SELECT * FROM mail_domain WHERE domain = '" . $app->db->quote($email)."'"; $domain_rec=$app->db->queryOneRecord($sql); + unset($email); $mail_backup_dir = $backup_dir.'/mail'.$domain_rec['domain_id']; if(!is_dir($mail_backup_dir)) mkdir($mail_backup_dir, 0750); -- GitLab From ea5eee59af75b1e26d7ab287b18afed6d557dc56 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Mon, 3 Nov 2014 15:14:37 +0100 Subject: [PATCH 002/287] backup: change mounts to backup_dir_mount_cmd --- server/lib/classes/cron.d/500-backup.inc.php | 12 ++++++++---- server/lib/classes/cron.d/500-backup_mail.inc.php | 9 ++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/server/lib/classes/cron.d/500-backup.inc.php b/server/lib/classes/cron.d/500-backup.inc.php index abca144f4..537c5880b 100644 --- a/server/lib/classes/cron.d/500-backup.inc.php +++ b/server/lib/classes/cron.d/500-backup.inc.php @@ -74,10 +74,14 @@ class cronjob_backup extends cronjob { //* mount backup directory, if necessary $run_backups = true; - $server_config['backup_dir_mount_cmd'] = trim($server_config['backup_dir_mount_cmd']); - if($server_config['backup_dir_is_mount'] == 'y' && $server_config['backup_dir_mount_cmd'] != ''){ - if(!$app->system->is_mounted($backup_dir)){ - exec(escapeshellcmd($server_config['backup_dir_mount_cmd'])); + $backup_dir_mount_cmd = '/usr/local/ispconfig/server/scripts/backup_dir_mount.sh'; + if( $server_config['backup_dir_is_mount'] == 'y' && + is_file($backup_dir_mount_cmd) && + is_executable($backup_dir_mount_cmd) && + fileowner($backup_dir_mount_cmd) === 0 + ){ + if(!$app->system->is_mounted($backup_dir)){ + exec($backup_dir_mount_cmd); sleep(1); if(!$app->system->is_mounted($backup_dir)) $run_backups = false; } diff --git a/server/lib/classes/cron.d/500-backup_mail.inc.php b/server/lib/classes/cron.d/500-backup_mail.inc.php index ae85db2b9..09223cc52 100644 --- a/server/lib/classes/cron.d/500-backup_mail.inc.php +++ b/server/lib/classes/cron.d/500-backup_mail.inc.php @@ -61,10 +61,13 @@ class cronjob_backup_mail extends cronjob { if($backup_dir != '') { //* mount backup directory, if necessary $run_backups = true; - $server_config['backup_dir_mount_cmd'] = trim($server_config['backup_dir_mount_cmd']); - if($server_config['backup_dir_is_mount'] == 'y' && $server_config['backup_dir_mount_cmd'] != ''){ + if( $server_config['backup_dir_is_mount'] == 'y' && + is_file($backup_dir_mount_cmd) && + is_executable($backup_dir_mount_cmd) && + fileowner($backup_dir_mount_cmd) === 0 + ){ if(!$app->system->is_mounted($backup_dir)){ - exec(escapeshellcmd($server_config['backup_dir_mount_cmd'])); + exec($backup_dir_mount_cmd); sleep(1); if(!$app->system->is_mounted($backup_dir)) $run_backups = false; } -- GitLab From 8fa8ed5ab8c2509084009d7315cf95eb184f549d Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Mon, 3 Nov 2014 21:51:57 +0100 Subject: [PATCH 003/287] Adjusted paths for BIND config in centos 7. --- install/dist/conf/centos70.conf.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/dist/conf/centos70.conf.php b/install/dist/conf/centos70.conf.php index da5848c8c..8aa66ea03 100644 --- a/install/dist/conf/centos70.conf.php +++ b/install/dist/conf/centos70.conf.php @@ -171,9 +171,9 @@ $conf['powerdns']['init_script'] = 'pdns'; $conf['bind']['installed'] = false; // will be detected automatically during installation $conf['bind']['bind_user'] = 'named'; $conf['bind']['bind_group'] = 'named'; -$conf['bind']['bind_zonefiles_dir'] = '/var/named/chroot/var/named/'; -$conf['bind']['named_conf_path'] = '/var/named/chroot/etc/named.conf'; -$conf['bind']['named_conf_local_path'] = '/var/named/chroot/var/named/named.local'; +$conf['bind']['bind_zonefiles_dir'] = '/var/named'; +$conf['bind']['named_conf_path'] = '/etc/named.conf'; +$conf['bind']['named_conf_local_path'] = '/etc/named.conf.local'; $conf['bind']['init_script'] = 'named'; //* Jailkit -- GitLab From 8797b6fa1805d056422120de0a0d1c6de09e5273 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Mon, 3 Nov 2014 22:12:22 +0100 Subject: [PATCH 004/287] FS#3726 - Generated DKIM Selector has an invalid format --- interface/web/mail/mail_domain_dkim_create.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/mail/mail_domain_dkim_create.php b/interface/web/mail/mail_domain_dkim_create.php index bd9ff9c98..4b595969c 100644 --- a/interface/web/mail/mail_domain_dkim_create.php +++ b/interface/web/mail/mail_domain_dkim_create.php @@ -163,7 +163,7 @@ echo "".$selector."\n"; echo "".$private_key."\n"; echo "".$public_key."\n"; if ( validate_domain($_POST['domain']) ) { - echo ''.$selector.'_domainkey.'.$_POST['domain'].'. 3600 TXT "v=DKIM1; t=s; p='.$dns_record.'"'; + echo ''.$selector.'._domainkey.'.$_POST['domain'].'. 3600 TXT "v=DKIM1; t=s; p='.$dns_record.'"'; } echo "\n"; ?> -- GitLab From 28a1dcf7efcfbe9ad7cb3010759d111b80659d63 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 4 Nov 2014 07:08:18 +0100 Subject: [PATCH 005/287] add $backup_dir_mount_cmd to mail-backup --- server/lib/classes/cron.d/500-backup_mail.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/server/lib/classes/cron.d/500-backup_mail.inc.php b/server/lib/classes/cron.d/500-backup_mail.inc.php index 09223cc52..cc428b954 100644 --- a/server/lib/classes/cron.d/500-backup_mail.inc.php +++ b/server/lib/classes/cron.d/500-backup_mail.inc.php @@ -61,6 +61,7 @@ class cronjob_backup_mail extends cronjob { if($backup_dir != '') { //* mount backup directory, if necessary $run_backups = true; + $backup_dir_mount_cmd = '/usr/local/ispconfig/server/scripts/backup_dir_mount.sh'; if( $server_config['backup_dir_is_mount'] == 'y' && is_file($backup_dir_mount_cmd) && is_executable($backup_dir_mount_cmd) && -- GitLab From bc0ad024a3ff0c1030ac6dc3c54ec3c626e254b3 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 4 Nov 2014 08:00:56 +0100 Subject: [PATCH 006/287] updated db-queries to the new query form --- .../classes/cron.d/500-backup_mail.inc.php | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/server/lib/classes/cron.d/500-backup_mail.inc.php b/server/lib/classes/cron.d/500-backup_mail.inc.php index cc428b954..851aeed2e 100644 --- a/server/lib/classes/cron.d/500-backup_mail.inc.php +++ b/server/lib/classes/cron.d/500-backup_mail.inc.php @@ -74,8 +74,7 @@ class cronjob_backup_mail extends cronjob { } } - $sql = "SELECT * FROM mail_user WHERE server_id = '".intval($conf['server_id'])."' AND maildir <> ''"; - $records = $app->db->queryAllRecords($sql); + $records = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE server_id = ? AND maildir <> ''", intval($conf['server_id'])); if(is_array($records) && $run_backups) { if(!is_dir($backup_dir)) { @@ -89,8 +88,7 @@ class cronjob_backup_mail extends cronjob { if($rec['backup_interval'] == 'daily' or ($rec['backup_interval'] == 'weekly' && date('w') == 0) or ($rec['backup_interval'] == 'monthly' && date('d') == '01')) { $email = $rec['email']; $email=explode("@",$email)[1]; - $sql="SELECT * FROM mail_domain WHERE domain = '" . $app->db->quote($email)."'"; - $domain_rec=$app->db->queryOneRecord($sql); + $domain_rec=$app->db->queryOneRecord("SELECT * FROM mail_domain WHERE domain = ?", $email); unset($email); $mail_backup_dir = $backup_dir.'/mail'.$domain_rec['domain_id']; @@ -121,9 +119,9 @@ class cronjob_backup_mail extends cronjob { chgrp($mail_backup_dir.'/'.$mail_backup_file, 'root'); chmod($mail_backup_dir.'/'.$mail_backup_file, 0640); /* Insert mail backup record in database */ - $sql = "INSERT INTO mail_backup (server_id,parent_domain_id,mailuser_id,backup_mode,tstamp,filename,filesize) VALUES (".$conf['server_id'].",".$domain_rec['domain_id'].",".$rec['mailuser_id'].",'".$backup_mode."',".time().",'".$app->db->quote($mail_backup_file)."','".$app->functions->formatBytes(filesize($mail_backup_dir.'/'.$mail_backup_file))."')"; - $app->db->query($sql); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); + $sql = "INSERT INTO mail_backup (server_id, parent_domain_id, mailuser_id, backup_mode, tstamp, filename, filesize) VALUES (?, ?, ?, ?, ?, ?, ?)"; + $app->db->query($sql, $conf['server_id'], $domain_rec['domain_id'], $rec['mailuser_id'], $backup_mode, time(), $mail_backup_file, $app->functions->formatBytes(filesize($mail_backup_dir.'/'.$mail_backup_file))); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $rec['mailuser_id'], $backup_mode, time(), $mail_backup_file, $app->functions->formatBytes(filesize($mail_backup_dir.'/'.$mail_backup_file))); } else { /* Backup failed - remove archive */ if(is_file($mail_backup_dir.'/'.$mail_backup_file)) unlink($mail_backup_dir.'/'.$mail_backup_file); @@ -143,9 +141,9 @@ class cronjob_backup_mail extends cronjob { for ($n = $backup_copies; $n <= 10; $n++) { if(isset($files[$n]) && is_file($mail_backup_dir.'/'.$files[$n])) { unlink($mail_backup_dir.'/'.$files[$n]); - $sql = "DELETE FROM mail_backup WHERE server_id = ".$conf['server_id']." AND parent_domain_id = ".$domain_rec['domain_id']." AND filename = '".$app->db->quote($files[$n])."'"; - $app->db->query($sql); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); + $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; + $app->db->query($sql, $conf['server_id'], $domain_rec['domain_id'], $files[$n]); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $files[$n]); } } unset($files); @@ -154,9 +152,9 @@ class cronjob_backup_mail extends cronjob { /* Remove inactive backups */ if($rec['backup_interval'] == 'none') { /* remove backups from db */ - $sql = "DELETE FROM mail_backup WHERE server_id = ".$conf['server_id']." AND parent_domain_id = ".$domain_rec['domain_id']." AND mailuser_id = ".$rec['mailuser_id']; - $app->db->query($sql); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); + $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND mailuser_id = ?"; + $app->db->query($sql, $conf['server_id'], $domain_rec['domain_id'], $rec['mailuser_id']); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $rec['mailuser_id']); /* remove archives */ $mail_backup_dir = $backup_dir.'/mail'.$rec['domain_id']; $mail_backup_file = 'mail'.$rec['mailuser_id'].'_*'; -- GitLab From 0269573d9f6d3f54f22ca957d953fa8de256ba2f Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 4 Nov 2014 08:26:31 +0100 Subject: [PATCH 007/287] updated db-queries to the new query form --- server/lib/classes/cron.d/500-backup.inc.php | 45 ++++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/server/lib/classes/cron.d/500-backup.inc.php b/server/lib/classes/cron.d/500-backup.inc.php index 537c5880b..1dd249073 100644 --- a/server/lib/classes/cron.d/500-backup.inc.php +++ b/server/lib/classes/cron.d/500-backup.inc.php @@ -89,8 +89,8 @@ class cronjob_backup extends cronjob { if($run_backups){ //* backup only active domains - $sql = "SELECT * FROM web_domain WHERE server_id = '".$conf['server_id']."' AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND active = 'y'"; - $records = $app->db->queryAllRecords($sql); + $sql = "SELECT * FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND active = 'y'"; + $records = $app->db->queryAllRecords($sql, $conf['server_id']); if(is_array($records)) { foreach($records as $rec) { @@ -142,9 +142,9 @@ class cronjob_backup extends cronjob { //* 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); + $sql = "INSERT INTO web_backup (server_id, parent_domain_id, backup_type, backup_mode, tstamp, filename) VALUES (?, ?, ?, ?, ?, ?)"; + $app->db->query($sql, $conf['server_id'], $web_id, 'web', $backup_mode, time(), $web_backup_file); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id, 'web', $backup_mode, time(), $web_backup_file); } } else { if(is_file($web_backup_dir.'/'.$web_backup_file)) unlink($web_backup_dir.'/'.$web_backup_file); @@ -171,9 +171,9 @@ class cronjob_backup extends cronjob { //$tmp = $app->dbmaster->queryOneRecord($sql); //$app->dbmaster->datalogDelete('web_backup', 'backup_id', $tmp['backup_id']); //$sql = "DELETE FROM web_backup WHERE backup_id = ".intval($tmp['backup_id']); - $sql = "DELETE FROM web_backup WHERE server_id = ".$conf['server_id']." AND parent_domain_id = $web_id AND filename = '".$app->db->quote($files[$n])."'"; - $app->db->query($sql); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); + $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; + $app->db->query($sql, $conf['server_id'], $web_id, $files[$n]); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id, $files[$n]); } } @@ -203,16 +203,15 @@ class cronjob_backup extends cronjob { $web_backup_dir = realpath($backup_dir.'/web'.$web_id); if(is_dir($web_backup_dir)) { exec('sudo -u '.escapeshellarg($web_user).' rm -f '.escapeshellarg($web_backup_dir.'/*')); - $sql = "DELETE FROM web_backup WHERE server_id = ".intval($conf['server_id'])." AND parent_domain_id = ".intval($web_id); - $app->db->query($sql); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); + $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ?"; + $app->db->query($sql, $conf['server_id'], $web_id); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id); } } } } - $sql = "SELECT * FROM web_database WHERE server_id = ".$conf['server_id']." AND backup_interval != 'none' AND backup_interval != ''"; - $records = $app->db->queryAllRecords($sql); + $records = $app->db->queryAllRecords("SELECT * FROM web_database WHERE server_id = ? AND backup_interval != 'none' AND backup_interval != ''", $conf['server_id']); if(is_array($records)) { include 'lib/mysql_clientdb.conf'; @@ -249,9 +248,9 @@ class cronjob_backup extends cronjob { //* 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); + $sql = "INSERT INTO web_backup (server_id, parent_domain_id, backup_type, backup_mode, tstamp, filename) VALUES (?, ?, ?, ?, ?, ?"; + $app->db->query($sql, $conf['server_id'], $web_id, 'mysql', 'sqlgz', time(), $db_backup_file.'.gz'); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id, 'mysql', 'sqlgz', time(), $db_backup_file.'.gz'); } } else { if(is_file($db_backup_dir.'/'.$db_backup_file.'.gz')) unlink($db_backup_dir.'/'.$db_backup_file.'.gz'); @@ -281,9 +280,9 @@ class cronjob_backup extends cronjob { //$sql = "SELECT backup_id FROM web_backup WHERE server_id = ".$conf['server_id']." AND parent_domain_id = $web_id AND filename = '".$app->db->quote($filelist[$n])."'"; //$tmp = $app->dbmaster->queryOneRecord($sql); //$sql = "DELETE FROM web_backup WHERE backup_id = ".intval($tmp['backup_id']); - $sql = "DELETE FROM web_backup WHERE server_id = ".$conf['server_id']." AND parent_domain_id = $web_id AND filename = '".$app->db->quote($filelist[$n])."'"; - $app->db->query($sql); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); + $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; + $app->db->query($sql, $conf['server_id'], $web_id, $filelist[$n]); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id, $filelist[$n]); } } } @@ -300,14 +299,14 @@ class cronjob_backup extends cronjob { } // remove non-existing backups from database - $backups = $app->db->queryAllRecords("SELECT * FROM web_backup WHERE server_id = ".$conf['server_id']); + $backups = $app->db->queryAllRecords("SELECT * FROM web_backup WHERE server_id = ?", $conf['server_id']); if(is_array($backups) && !empty($backups)){ foreach($backups as $backup){ $backup_file = $backup_dir.'/web'.$backup['parent_domain_id'].'/'.$backup['filename']; if(!is_file($backup_file)){ - $sql = "DELETE FROM web_backup WHERE server_id = ".$conf['server_id']." AND parent_domain_id = ".$backup['parent_domain_id']." AND filename = '".$backup['filename']."'"; - $app->db->query($sql); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); + $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; + $app->db->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']); } } } -- GitLab From 0b22b5eff8e4fa2b12c375539997c1ad6933561c Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 4 Nov 2014 08:35:48 +0100 Subject: [PATCH 008/287] (re)add filesize to website-backups --- server/lib/classes/cron.d/500-backup.inc.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/server/lib/classes/cron.d/500-backup.inc.php b/server/lib/classes/cron.d/500-backup.inc.php index 1dd249073..6b00502b8 100644 --- a/server/lib/classes/cron.d/500-backup.inc.php +++ b/server/lib/classes/cron.d/500-backup.inc.php @@ -142,9 +142,12 @@ class cronjob_backup extends cronjob { //* 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 (?, ?, ?, ?, ?, ?)"; - $app->db->query($sql, $conf['server_id'], $web_id, 'web', $backup_mode, time(), $web_backup_file); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id, 'web', $backup_mode, time(), $web_backup_file); + $filesize = $app->functions->formatBytes(filesize($web_backup_dir.'/'.$web_backup_file)); + $sql = "INSERT INTO web_backup (server_id, parent_domain_id, backup_type, backup_mode, tstamp, filename, filesize) VALUES (?, ?, ?, ?, ?, ?, ?)"; + $app->db->query($sql, $conf['server_id'], $web_id, 'web', $backup_mode, time(), $web_backup_file, $filesize); + if($app->db->dbHost != $app->dbmaster->dbHost) + $app->dbmaster->query($sql, $conf['server_id'], $web_id, 'web', $backup_mode, time(), $web_backup_file, $filesize); + unset($filesize); } } else { if(is_file($web_backup_dir.'/'.$web_backup_file)) unlink($web_backup_dir.'/'.$web_backup_file); @@ -248,9 +251,12 @@ class cronjob_backup extends cronjob { //* 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 (?, ?, ?, ?, ?, ?"; - $app->db->query($sql, $conf['server_id'], $web_id, 'mysql', 'sqlgz', time(), $db_backup_file.'.gz'); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id, 'mysql', 'sqlgz', time(), $db_backup_file.'.gz'); + $filesize = $app->functions->formatBytes(filesize($db_backup_dir.'/'.$db_backup_file.'.gz')); + $sql = "INSERT INTO web_backup (server_id, parent_domain_id, backup_type, backup_mode, tstamp, filename, filesize) VALUES (?, ?, ?, ?, ?, ?, ?)"; + $app->db->query($sql, $conf['server_id'], $web_id, 'mysql', 'sqlgz', time(), $db_backup_file.'.gz', $filesize); + if($app->db->dbHost != $app->dbmaster->dbHost) + $app->dbmaster->query($sql, $conf['server_id'], $web_id, 'mysql', 'sqlgz', time(), $db_backup_file.'.gz', $filesize); + unset($filesize); } } else { if(is_file($db_backup_dir.'/'.$db_backup_file.'.gz')) unlink($db_backup_dir.'/'.$db_backup_file.'.gz'); -- GitLab From 990ca8a44d72cddc12db503f8e623fb9979e5b45 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Thu, 6 Nov 2014 10:47:00 +0100 Subject: [PATCH 009/287] moved "mount backup_dir" from various plugins to system.inc.php --- server/lib/classes/cron.d/500-backup.inc.php | 19 ++-------- .../classes/cron.d/500-backup_mail.inc.php | 15 +------- server/lib/classes/system.inc.php | 16 ++++++++ .../plugins-available/apache2_plugin.inc.php | 18 +++------ .../plugins-available/backup_plugin.inc.php | 38 +++---------------- server/plugins-available/mail_plugin.inc.php | 36 +++++------------- server/plugins-available/nginx_plugin.inc.php | 22 +++++++++++ 7 files changed, 64 insertions(+), 100 deletions(-) diff --git a/server/lib/classes/cron.d/500-backup.inc.php b/server/lib/classes/cron.d/500-backup.inc.php index 6b00502b8..f87e4db1c 100644 --- a/server/lib/classes/cron.d/500-backup.inc.php +++ b/server/lib/classes/cron.d/500-backup.inc.php @@ -71,22 +71,9 @@ class cronjob_backup extends cronjob { } else { chmod(escapeshellcmd($backup_dir), $backup_dir_permissions); } - - //* mount backup directory, if necessary - $run_backups = true; - $backup_dir_mount_cmd = '/usr/local/ispconfig/server/scripts/backup_dir_mount.sh'; - if( $server_config['backup_dir_is_mount'] == 'y' && - is_file($backup_dir_mount_cmd) && - is_executable($backup_dir_mount_cmd) && - fileowner($backup_dir_mount_cmd) === 0 - ){ - if(!$app->system->is_mounted($backup_dir)){ - exec($backup_dir_mount_cmd); - sleep(1); - if(!$app->system->is_mounted($backup_dir)) $run_backups = false; - } - } - + $run_backups = true; + //* mount backup directory, if necessary + if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $run_backups = false; if($run_backups){ //* backup only active domains $sql = "SELECT * FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND active = 'y'"; diff --git a/server/lib/classes/cron.d/500-backup_mail.inc.php b/server/lib/classes/cron.d/500-backup_mail.inc.php index 851aeed2e..2473afe26 100644 --- a/server/lib/classes/cron.d/500-backup_mail.inc.php +++ b/server/lib/classes/cron.d/500-backup_mail.inc.php @@ -59,20 +59,9 @@ class cronjob_backup_mail extends cronjob { if($backup_mode == '') $backup_mode = 'userzip'; if($backup_dir != '') { - //* mount backup directory, if necessary $run_backups = true; - $backup_dir_mount_cmd = '/usr/local/ispconfig/server/scripts/backup_dir_mount.sh'; - if( $server_config['backup_dir_is_mount'] == 'y' && - is_file($backup_dir_mount_cmd) && - is_executable($backup_dir_mount_cmd) && - fileowner($backup_dir_mount_cmd) === 0 - ){ - if(!$app->system->is_mounted($backup_dir)){ - exec($backup_dir_mount_cmd); - sleep(1); - if(!$app->system->is_mounted($backup_dir)) $run_backups = false; - } - } + //* mount backup directory, if necessary + if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $run_backups = false; $records = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE server_id = ? AND maildir <> ''", intval($conf['server_id'])); diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index 113ad5f39..bfc4e0975 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -1801,6 +1801,22 @@ class system{ return $return_var == 0 ? true : false; } + function mount_backup_dir($backup_dir, $mount_cmd = '/usr/local/ispconfig/server/scripts/backup_dir_mount.sh'){ + $mounted = true; + if ( is_file($mount_cmd) && + is_executable($mount_cmd) && + fileowner($mount_cmd) === 0 + ) { + if (!$this->is_mounted($backup_dir)){ + exec($backup_dir_mount_cmd); + sleep(1); + if (!$this->is_mounted($backup_dir)) $mounted = false; + } + } else $mounted = false; + + return $mounted; + } + function getinitcommand($servicename, $action, $init_script_directory = ''){ global $conf; // systemd diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 8471058d0..90f091270 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -2046,25 +2046,19 @@ class apache2_plugin { if($data['old']['type'] == 'vhost') { $server_config = $app->getconf->get_server_config($conf['server_id'], 'server'); $backup_dir = $server_config['backup_dir']; - //* mount backup directory, if necessary $mount_backup = true; - $server_config['backup_dir_mount_cmd'] = trim($server_config['backup_dir_mount_cmd']); if($server_config['backup_dir'] != '' && $server_config['backup_delete'] == 'y') { - if($server_config['backup_dir_is_mount'] == 'y' && $server_config['backup_dir_mount_cmd'] != ''){ - if(!$app->system->is_mounted($backup_dir)){ - exec(escapeshellcmd($server_config['backup_dir_mount_cmd'])); - sleep(1); - if(!$app->system->is_mounted($backup_dir)) $mount_backup = false; - } - } + //* mount backup directory, if necessary + if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $mount_backup = false; + if($mount_backup){ $web_backup_dir = $backup_dir.'/web'.$data_old['domain_id']; //** do not use rm -rf $web_backup_dir because database(s) may exits exec(escapeshellcmd('rm -f '.$web_backup_dir.'/web'.$data_old['domain_id'].'_').'*'); //* cleanup database - $sql = "DELETE FROM web_backup WHERE server_id = ".$conf['server_id']." AND parent_domain_id = ".$data_old['domain_id']." AND filename LIKE 'web".$data_old['domain_id']."_%'"; - $app->db->query($sql); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); + $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename LIKE ?"; + $app->db->query($sql, $conf['server_id'], $data_old['domain_id'], "web".$data_old['domain_id']."_%"); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $data_old['domain_id'], "web".$data_old['domain_id']."_%"); $app->log('Deleted the web backup files', LOGLEVEL_DEBUG); } diff --git a/server/plugins-available/backup_plugin.inc.php b/server/plugins-available/backup_plugin.inc.php index 42c1d772a..6184dd53d 100644 --- a/server/plugins-available/backup_plugin.inc.php +++ b/server/plugins-available/backup_plugin.inc.php @@ -72,30 +72,9 @@ class backup_plugin { $server_config = $app->getconf->get_server_config($conf['server_id'], 'server'); $backup_dir = $server_config['backup_dir'].'/web'.$web['domain_id']; - //* mount backup directory, if necessary - /* - $backup_dir_is_ready = true; - $server_config['backup_dir_mount_cmd'] = trim($server_config['backup_dir_mount_cmd']); - if($server_config['backup_dir_is_mount'] == 'y' && $server_config['backup_dir_mount_cmd'] != ''){ - if(!$app->system->is_mounted($server_config['backup_dir'])){ - exec(escapeshellcmd($server_config['backup_dir_mount_cmd'])); - sleep(1); - if(!$app->system->is_mounted($server_config['backup_dir'])) $backup_dir_is_ready = false; - } - }*/ $backup_dir_is_ready = true; - $backup_dir_mount_cmd = '/usr/local/ispconfig/server/scripts/backup_dir_mount.sh'; - if( $server_config['backup_dir_is_mount'] == 'y' && - is_file($backup_dir_mount_cmd) && - is_executable($backup_dir_mount_cmd) && - fileowner($backup_dir_mount_cmd) === 0 - ){ - if(!$app->system->is_mounted($backup_dir)){ - exec($backup_dir_mount_cmd); - sleep(1); - if(!$app->system->is_mounted($server_config['backup_dir'])) $backup_dir_is_ready = false; - } - } + //* mount backup directory, if necessary + if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $backup_dir_is_ready = false; if($backup_dir_is_ready){ //* Make backup available for download @@ -186,17 +165,10 @@ class backup_plugin { $server_config = $app->getconf->get_server_config($conf['server_id'], 'server'); $backup_dir = $server_config['backup_dir']; - //* mount backup directory, if necessary $backup_dir_is_ready = true; - $server_config['backup_dir_mount_cmd'] = trim($server_config['backup_dir_mount_cmd']); - if($server_config['backup_dir_is_mount'] == 'y' && $server_config['backup_dir_mount_cmd'] != ''){ - if(!$app->system->is_mounted($backup_dir)){ - exec(escapeshellcmd($server_config['backup_dir_mount_cmd'])); - sleep(1); - if(!$app->system->is_mounted($backup_dir)) $backup_dir_is_ready = false; - } - } - + //* mount backup directory, if necessary + if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $backup_dir_is_ready = false; + if($backup_dir_is_ready){ $mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail'); $domain_rec = $app->db->queryOneRecord("SELECT * FROM mail_domain WHERE domain_id = ".intval($mail_backup['parent_domain_id'])); diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php index 5ac0951e5..06b3017d1 100644 --- a/server/plugins-available/mail_plugin.inc.php +++ b/server/plugins-available/mail_plugin.inc.php @@ -398,17 +398,10 @@ class mail_plugin { //* Delete the mail-backups $server_config = $app->getconf->get_server_config($conf['server_id'], 'server'); $backup_dir = $server_config['backup_dir']; - //* mount backup directory, if necessary $mount_backup = true; - $server_config['backup_dir_mount_cmd'] = trim($server_config['backup_dir_mount_cmd']); if($server_config['backup_dir'] != '' && $maildir_path_deleted && $server_config['backup_delete'] == 'y') { - if($server_config['backup_dir_is_mount'] == 'y' && $server_config['backup_dir_mount_cmd'] != ''){ - if(!$app->system->is_mounted($backup_dir)){ - exec(escapeshellcmd($server_config['backup_dir_mount_cmd'])); - sleep(1); - if(!$app->system->is_mounted($backup_dir)) $mount_backup = false; - } - } + //* mount backup directory, if necessary + if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $mount_backup = false; if($mount_backup){ $sql = "SELECT * FROM mail_domain WHERE domain = '".explode("@",$data['old']['email'])[1]."'"; $domain_rec = $app->db->queryOneRecord($sql); @@ -416,13 +409,11 @@ class mail_plugin { $mail_backup_files = 'mail'.$data['old']['mailuser_id']; exec(escapeshellcmd('rm -f '.$mail_backup_dir.'/'.$mail_backup_files).'*'); //* cleanup database - $sql = "DELETE FROM mail_backup WHERE server_id = ".$conf['server_id']." AND parent_domain_id = ".$domain_rec['domain_id']." AND mailuser_id = ".$data['old']['mailuser_id']; - $app->db->query($sql); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); + $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND mailuser_id = ?"; + $app->db->query($sql, $conf['server_id'], $domain_rec['domain_id'], $data['old']['mailuser_id']); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $data['old']['mailuser_id']); $app->log('Deleted the mail backups for: '.$data['old']['email'], LOGLEVEL_DEBUG); - - } } } @@ -457,24 +448,17 @@ class mail_plugin { //* Delete the mail-backups $server_config = $app->getconf->get_server_config($conf['server_id'], 'server'); $backup_dir = $server_config['backup_dir']; - //* mount backup directory, if necessary $mount_backup = true; - $server_config['backup_dir_mount_cmd'] = trim($server_config['backup_dir_mount_cmd']); if($server_config['backup_dir'] != '' && $maildomain_path_deleted && $server_config['backup_delete'] == 'y'){ - if($server_config['backup_dir_is_mount'] == 'y' && $server_config['backup_dir_mount_cmd'] != ''){ - if(!$app->system->is_mounted($backup_dir)){ - exec(escapeshellcmd($server_config['backup_dir_mount_cmd'])); - sleep(1); - if(!$app->system->is_mounted($backup_dir)) $mount_backup = false; - } - } + //* mount backup directory, if necessary + if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $mount_backup = false; if($mount_backup){ $mail_backup_dir = $backup_dir.'/mail'.$data['old']['domain_id']; exec(escapeshellcmd('rm -rf '.$mail_backup_dir)); //* cleanup database - $sql = "DELETE FROM mail_backup WHERE server_id = ".$conf['server_id']." AND parent_domain_id = ".$data['old']['domain_id']; - $app->db->query($sql); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql); + $sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND mailuser_id = ?"; + $app->db->query($sql, $conf['server_id'], $domain_rec['domain_id'], $data['old']['mailuser_id']); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $domain_rec['domain_id'], $data['old']['mailuser_id']); $app->log('Deleted the mail backup directory: '.$mail_backup_dir, LOGLEVEL_DEBUG); } diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 77ac10a39..57044eff4 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -2046,6 +2046,28 @@ class nginx_plugin { $this->awstats_delete($data, $web_config); } + //* Delete the web-backups + if($data['old']['type'] == 'vhost') { + $server_config = $app->getconf->get_server_config($conf['server_id'], 'server'); + $backup_dir = $server_config['backup_dir']; + $mount_backup = true; + if($server_config['backup_dir'] != '' && $server_config['backup_delete'] == 'y') { + //* mount backup directory, if necessary + if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $mount_backup = false; + if($mount_backup){ + $web_backup_dir = $backup_dir.'/web'.$data_old['domain_id']; + //** do not use rm -rf $web_backup_dir because database(s) may exits + exec(escapeshellcmd('rm -f '.$web_backup_dir.'/web'.$data_old['domain_id'].'_').'*'); + //* cleanup database + $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename LIKE ?"; + $app->db->query($sql, $conf['server_id'], $data_old['domain_id'], "web".$data_old['domain_id']."_%"); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $data_old['domain_id'], "web".$data_old['domain_id']."_%"); + + $app->log('Deleted the web backup files', LOGLEVEL_DEBUG); + } + } + } + $app->services->restartServiceDelayed('httpd', 'reload'); } -- GitLab From d907c0ce889a71b1ac5fb49e8dd5229b9459bd0e Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Thu, 6 Nov 2014 18:23:24 +0100 Subject: [PATCH 010/287] Fix for gentoo: http://www.howtoforge.com/forums/showpost.php?p=321184&postcount=10 --- .../plugins/mail_user_filter_plugin.inc.php | 86 ++++++++++++------- server/plugins-available/bind_plugin.inc.php | 4 +- 2 files changed, 59 insertions(+), 31 deletions(-) diff --git a/interface/lib/plugins/mail_user_filter_plugin.inc.php b/interface/lib/plugins/mail_user_filter_plugin.inc.php index 774da8399..12322ff94 100644 --- a/interface/lib/plugins/mail_user_filter_plugin.inc.php +++ b/interface/lib/plugins/mail_user_filter_plugin.inc.php @@ -137,41 +137,69 @@ class mail_user_filter_plugin { $content .= '### BEGIN FILTER_ID:'.$page_form->id."\n"; //$content .= 'require ["fileinto", "regex", "vacation"];'."\n"; - - $content .= 'if header :regex ["'.strtolower($page_form->dataRecord["source"]).'"] ["'; - - $searchterm = preg_quote($page_form->dataRecord["searchterm"]); - $searchterm = str_replace( - array( - '"', - '\\[', - '\\]' - ), - array( - '\\"', - '\\\\[', - '\\\\]' - ), $searchterm); - - if($page_form->dataRecord["op"] == 'contains') { - $content .= ".*".$searchterm; - } elseif ($page_form->dataRecord["op"] == 'is') { - $content .= "^".$searchterm."$"; - } elseif ($page_form->dataRecord["op"] == 'begins') { - $content .= " ".$searchterm.""; - } elseif ($page_form->dataRecord["op"] == 'ends') { - $content .= ".*".$searchterm."$"; + + if($page_form->dataRecord["op"] == 'domain') { + $content .= 'if address :domain :is "'.strtolower($page_form->dataRecord["source"]).'" "'.$page_form->dataRecord["searchterm"].'" {'."\n"; + } elseif ($page_form->dataRecord["op"] == 'localpart') { + $content .= 'if address :localpart :is "'.strtolower($page_form->dataRecord["source"]).'" "'.$page_form->dataRecord["searchterm"].'" {'."\n"; + } elseif ($page_form->dataRecord["source"] == 'Size') { + if(substr(trim($page_form->dataRecord["searchterm"]),-1) == 'k' || substr(trim($page_form->dataRecord["searchterm"]),-1) == 'K') { + $unit = 'k'; + } else { + $unit = 'm'; + } + $content .= 'if size :over '.intval($page_form->dataRecord["searchterm"]).$unit.' {'."\n"; + } else { + + if($page_form->dataRecord["source"] == 'Header') { + $parts = explode(':',trim($page_form->dataRecord["searchterm"])); + $page_form->dataRecord["source"] = trim($parts[0]); + unset($parts[0]); + $page_form->dataRecord["searchterm"] = trim(implode(':',$parts)); + unset($parts); + } + + $content .= 'if header :regex ["'.strtolower($page_form->dataRecord["source"]).'"] ["'; + + $searchterm = preg_quote($page_form->dataRecord["searchterm"]); + $searchterm = str_replace( + array( + '"', + '\\[', + '\\]' + ), + array( + '\\"', + '\\\\[', + '\\\\]' + ), $searchterm); + + if($page_form->dataRecord["op"] == 'contains') { + $content .= ".*".$searchterm; + } elseif ($page_form->dataRecord["op"] == 'is') { + $content .= "^".$searchterm."$"; + } elseif ($page_form->dataRecord["op"] == 'begins') { + $content .= " ".$searchterm.""; + } elseif ($page_form->dataRecord["op"] == 'ends') { + $content .= ".*".$searchterm."$"; + } + + $content .= '"] {'."\n"; } - $content .= '"] {'."\n"; - if($page_form->dataRecord["action"] == 'move') { - $content .= ' fileinto "'.$page_form->dataRecord["target"].'";' . "\n"; + $content .= ' fileinto "'.$page_form->dataRecord["target"].'";' . "\n stop;\n"; + } elseif ($page_form->dataRecord["action"] == 'keep') { + $content .= " keep;\n"; + } elseif ($page_form->dataRecord["action"] == 'stop') { + $content .= " stop;\n"; + } elseif ($page_form->dataRecord["action"] == 'reject') { + $content .= ' reject "'.$page_form->dataRecord["target"].'"; stop;\n\n'; } else { - $content .= " discard;\n"; + $content .= " discard;\n stop;\n"; } - $content .= " stop;\n}\n"; + $content .= "}\n"; $content .= '### END FILTER_ID:'.$page_form->id."\n"; diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php index 2f7f93222..9bc36f5d8 100644 --- a/server/plugins-available/bind_plugin.inc.php +++ b/server/plugins-available/bind_plugin.inc.php @@ -117,7 +117,7 @@ class bind_plugin { //TODO : change this when distribution information has been integrated into server record if (file_exists('/etc/gentoo-release')) { - $filename = escapeshellcmd($dns_config['bind_zonefiles_dir'].'/pri.'.str_replace("/", "_", substr($zone['origin'], 0, -1))); + $filename = escapeshellcmd($dns_config['bind_zonefiles_dir'].'/pri/'.str_replace("/", "_", substr($zone['origin'], 0, -1))); } else { $filename = escapeshellcmd($dns_config['bind_zonefiles_dir'].'/pri.'.str_replace("/", "_", substr($zone['origin'], 0, -1))); @@ -151,7 +151,7 @@ class bind_plugin { if($data['old']['origin'] != $data['new']['origin']) { //TODO : change this when distribution information has been integrated into server record if (file_exists('/etc/gentoo-release')) { - $filename = $dns_config['bind_zonefiles_dir'].'/pri.'.str_replace("/", "_", substr($data['old']['origin'], 0, -1)); + $filename = $dns_config['bind_zonefiles_dir'].'/pri/'.str_replace("/", "_", substr($data['old']['origin'], 0, -1)); } else { $filename = $dns_config['bind_zonefiles_dir'].'/pri.'.str_replace("/", "_", substr($data['old']['origin'], 0, -1)); -- GitLab From 041312dc6e2bfac43a3218da703968cb544cae0a Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 12 Nov 2014 17:31:09 +0100 Subject: [PATCH 011/287] Added missing strings to web folder protection language file. --- interface/web/sites/lib/lang/de_web_folder_list.lng | 1 + interface/web/sites/lib/lang/de_web_folder_user_list.lng | 1 + interface/web/sites/lib/lang/en_web_folder_list.lng | 1 + interface/web/sites/lib/lang/en_web_folder_user_list.lng | 1 + 4 files changed, 4 insertions(+) diff --git a/interface/web/sites/lib/lang/de_web_folder_list.lng b/interface/web/sites/lib/lang/de_web_folder_list.lng index 5491202ac..9c85d5182 100644 --- a/interface/web/sites/lib/lang/de_web_folder_list.lng +++ b/interface/web/sites/lib/lang/de_web_folder_list.lng @@ -4,4 +4,5 @@ $wb['active_txt'] = 'Aktiv'; $wb['server_id_txt'] = 'Server'; $wb['parent_domain_id_txt'] = 'Webseite'; $wb['path_txt'] = 'Pfad'; +$wb["add_new_record_txt"] = 'Ordner hinzufügen'; ?> diff --git a/interface/web/sites/lib/lang/de_web_folder_user_list.lng b/interface/web/sites/lib/lang/de_web_folder_user_list.lng index 5357760eb..2db8eb052 100644 --- a/interface/web/sites/lib/lang/de_web_folder_user_list.lng +++ b/interface/web/sites/lib/lang/de_web_folder_user_list.lng @@ -3,4 +3,5 @@ $wb['list_head_txt'] = 'Ordner Benutzer'; $wb['active_txt'] = 'Aktiv'; $wb['web_folder_id_txt'] = 'Ordner'; $wb['username_txt'] = 'Benutzername'; +$wb["add_new_record_txt"] = 'Ordner Benutzer hinzufügen'; ?> diff --git a/interface/web/sites/lib/lang/en_web_folder_list.lng b/interface/web/sites/lib/lang/en_web_folder_list.lng index 32780abda..5966c03e8 100644 --- a/interface/web/sites/lib/lang/en_web_folder_list.lng +++ b/interface/web/sites/lib/lang/en_web_folder_list.lng @@ -4,4 +4,5 @@ $wb["active_txt"] = 'Active'; $wb["server_id_txt"] = 'Server'; $wb["parent_domain_id_txt"] = 'Website'; $wb["path_txt"] = 'Path'; +$wb["add_new_record_txt"] = 'Add new Folder'; ?> \ No newline at end of file diff --git a/interface/web/sites/lib/lang/en_web_folder_user_list.lng b/interface/web/sites/lib/lang/en_web_folder_user_list.lng index d0d9e05d1..d0350c9d9 100644 --- a/interface/web/sites/lib/lang/en_web_folder_user_list.lng +++ b/interface/web/sites/lib/lang/en_web_folder_user_list.lng @@ -3,4 +3,5 @@ $wb["list_head_txt"] = 'Folder User'; $wb["active_txt"] = 'Active'; $wb["web_folder_id_txt"] = 'Folder'; $wb["username_txt"] = 'Username'; +$wb["add_new_record_txt"] = 'Add new Folder User'; ?> \ No newline at end of file -- GitLab From fc7f1b1fdf8b7952da265973c0a474400e672b97 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Sun, 16 Nov 2014 18:34:43 +0100 Subject: [PATCH 012/287] Fixed: FS#3736 - Bind slave file directory has wrong permissions --- install/dist/lib/fedora.lib.php | 2 +- install/lib/installer_base.lib.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index 5dd14895d..20fc3a860 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -621,7 +621,7 @@ class installer_dist extends installer_base { //* Chown the slave subdirectory to $conf['bind']['bind_user'] exec('chown '.$conf['bind']['bind_user'].':'.$conf['bind']['bind_group'].' '.$content); - exec('chmod 770 '.$content); + exec('chmod 2770 '.$content); } diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 300c64f58..85790ce8e 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1230,11 +1230,12 @@ class installer_base { //* Create the slave subdirectory $content .= 'slave'; - if(!@is_dir($content)) mkdir($content, 0770, true); + if(!@is_dir($content)) mkdir($content, 2770, true); //* Chown the slave subdirectory to $conf['bind']['bind_user'] chown($content, $conf['bind']['bind_user']); chgrp($content, $conf['bind']['bind_group']); + chmod($content, 2770); } -- GitLab From 0de30f9058602f0fe8789b3ec0dc1dd23766d31a Mon Sep 17 00:00:00 2001 From: linchyim Date: Thu, 20 Nov 2014 17:00:31 +0100 Subject: [PATCH 013/287] add lost_password_function --- interface/web/admin/form/users.tform.php | 13 ++++ interface/web/admin/lib/lang/de_users.lng | 1 + interface/web/admin/lib/lang/en_users.lng | 1 + .../web/admin/templates/users_user_edit.htm | 8 +- interface/web/login/lib/lang/de.lng | 1 + interface/web/login/lib/lang/en.lng | 3 +- interface/web/login/password_reset.php | 75 ++++++++++--------- 7 files changed, 64 insertions(+), 38 deletions(-) diff --git a/interface/web/admin/form/users.tform.php b/interface/web/admin/form/users.tform.php index 9ee2970df..6a23559f1 100644 --- a/interface/web/admin/form/users.tform.php +++ b/interface/web/admin/form/users.tform.php @@ -260,6 +260,19 @@ $form['tabs']['users'] = array ( 'maxlength' => '2', 'rows' => '', 'cols' => '' + ), + 'lost_password_function' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'CHECKBOX', + 'regex' => '', + 'errmsg' => '', + 'default' => 1, + 'value' => array(0 => 0, 1 => 1), + 'separator' => '', + 'width' => '30', + 'maxlength' => '255', + 'rows' => '', + 'cols' => '' ) //################################# // ENDE Datenbankfelder diff --git a/interface/web/admin/lib/lang/de_users.lng b/interface/web/admin/lib/lang/de_users.lng index da26db30f..db37a605b 100644 --- a/interface/web/admin/lib/lang/de_users.lng +++ b/interface/web/admin/lib/lang/de_users.lng @@ -31,4 +31,5 @@ $wb['password_mismatch_txt'] = 'Die Passwörter stimmen nicht überein.'; $wb['password_match_txt'] = 'Die Passwörter stimmen überein.'; $wb['username_error_collision'] = 'Der Benutzername darf nicht web oder web gefolgt von einer Zahl sein.'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; +$wb['lost_password_function_txt'] = 'Passwort vergessen Funktion steht zur Verfügung'; ?> diff --git a/interface/web/admin/lib/lang/en_users.lng b/interface/web/admin/lib/lang/en_users.lng index 09b8ac305..9c57f1db8 100644 --- a/interface/web/admin/lib/lang/en_users.lng +++ b/interface/web/admin/lib/lang/en_users.lng @@ -31,4 +31,5 @@ $wb['password_mismatch_txt'] = 'The passwords do not match.'; $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number."'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; +$wb['lost_password_function_txt'] = 'Forgot password function is available'; ?> diff --git a/interface/web/admin/templates/users_user_edit.htm b/interface/web/admin/templates/users_user_edit.htm index b973a34b7..91c35bbf9 100644 --- a/interface/web/admin/templates/users_user_edit.htm +++ b/interface/web/admin/templates/users_user_edit.htm @@ -60,6 +60,12 @@ {tmpl_var name='language'} +
+

{tmpl_var name='lost_password_function_txt'}

+
+ {tmpl_var name='lost_password_function'} +
+
@@ -70,4 +76,4 @@ - \ No newline at end of file + diff --git a/interface/web/login/lib/lang/de.lng b/interface/web/login/lib/lang/de.lng index 4ece1b0ed..44f677b7b 100644 --- a/interface/web/login/lib/lang/de.lng +++ b/interface/web/login/lib/lang/de.lng @@ -24,4 +24,5 @@ $wb['theme_not_compatible'] = 'Das gewählte Design ist mit dieser ISPConfig Ver $wb['back_txt'] = 'Zurück'; $wb['stay_logged_in_txt'] = 'Dauerhaft eingeloggt bleiben'; $wb['email_error'] = 'Email contains unallowed characters or has a invalid format.'; +$wb['lost_password_function_disabled_txt'] = 'Die Passwort vergessen Funktion steht für diesen Benutzer nicht zur Verfügung.'; ?> diff --git a/interface/web/login/lib/lang/en.lng b/interface/web/login/lib/lang/en.lng index e540ef2db..e7487da67 100644 --- a/interface/web/login/lib/lang/en.lng +++ b/interface/web/login/lib/lang/en.lng @@ -24,4 +24,5 @@ $wb['back_txt'] = 'Back'; $wb['error_maintenance_mode'] = 'This ISPConfig installation is currently under maintenance. We should be back shortly. Thank you for your patience.'; $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.
The default theme as been activated automatically.'; $wb['stay_logged_in_txt'] = 'Keep me logged in'; -?> \ No newline at end of file +$wb['lost_password_function_disabled_txt'] = 'The lost password function is not available for this user.'; +?> diff --git a/interface/web/login/password_reset.php b/interface/web/login/password_reset.php index c466ac8e4..f2e4e9507 100644 --- a/interface/web/login/password_reset.php +++ b/interface/web/login/password_reset.php @@ -7,14 +7,14 @@ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of ISPConfig nor the names of its contributors - may be used to endorse or promote products derived from this software without - specific prior written permission. + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of ISPConfig nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED @@ -26,7 +26,7 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; @@ -54,36 +54,39 @@ if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != ' $username = $app->db->quote($_POST['username']); $email = $app->db->quote($_POST['email']); - $client = $app->db->queryOneRecord("SELECT * FROM client WHERE username = '$username' AND email = '$email'"); + $client = $app->db->queryOneRecord("SELECT client.*, sys_user.lost_password_function FROM client,sys_user WHERE client.username = '$username' AND client.email = '$email' AND client.client_id = sys_user.client_id"); - if($client['client_id'] > 0) { - $new_password = $app->auth->get_random_password(); - $new_password_encrypted = $app->auth->crypt_password($new_password); - $new_password_encrypted = $app->db->quote($new_password_encrypted); - - $username = $app->db->quote($client['username']); - $app->db->query("UPDATE sys_user SET passwort = '$new_password_encrypted' WHERE username = '$username'"); - $app->db->query("UPDATE client SET password = '$new_password_encrypted' WHERE username = '$username'"); - $app->tpl->setVar("message", $wb['pw_reset']); - - $app->uses('getconf,ispcmail'); - $mail_config = $app->getconf->get_global_config('mail'); - if($mail_config['smtp_enabled'] == 'y') { - $mail_config['use_smtp'] = true; - $app->ispcmail->setOptions($mail_config); - } - $app->ispcmail->setSender($mail_config['admin_mail'], $mail_config['admin_name']); - $app->ispcmail->setSubject($wb['pw_reset_mail_title']); - $app->ispcmail->setMailText($wb['pw_reset_mail_msg'].$new_password); - $app->ispcmail->send(array($client['contact_name'] => $client['email'])); - $app->ispcmail->finish(); - - $app->plugin->raiseEvent('password_reset', true); - $app->tpl->setVar("msg", $wb['pw_reset']); + if($client['lost_password_function'] == 0) { + $app->tpl->setVar("error", $wb['lost_password_function_disabled_txt']); } else { - $app->tpl->setVar("error", $wb['pw_error']); + if($client['client_id'] > 0) { + $new_password = $app->auth->get_random_password(); + $new_password_encrypted = $app->auth->crypt_password($new_password); + $new_password_encrypted = $app->db->quote($new_password_encrypted); + + $username = $app->db->quote($client['username']); + $app->db->query("UPDATE sys_user SET passwort = '$new_password_encrypted' WHERE username = '$username'"); + $app->db->query("UPDATE client SET password = '$new_password_encrypted' WHERE username = '$username'"); + $app->tpl->setVar("message", $wb['pw_reset']); + + $app->uses('getconf,ispcmail'); + $mail_config = $app->getconf->get_global_config('mail'); + if($mail_config['smtp_enabled'] == 'y') { + $mail_config['use_smtp'] = true; + $app->ispcmail->setOptions($mail_config); + } + $app->ispcmail->setSender($mail_config['admin_mail'], $mail_config['admin_name']); + $app->ispcmail->setSubject($wb['pw_reset_mail_title']); + $app->ispcmail->setMailText($wb['pw_reset_mail_msg'].$new_password); + $app->ispcmail->send(array($client['contact_name'] => $client['email'])); + $app->ispcmail->finish(); + + $app->plugin->raiseEvent('password_reset', true); + $app->tpl->setVar("msg", $wb['pw_reset']); + } else { + $app->tpl->setVar("error", $wb['pw_error']); + } } - } else { $app->tpl->setVar("msg", $wb['pw_error_noinput']); } -- GitLab From bde524364244e0f800125031d17be4a17056f26b Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Thu, 20 Nov 2014 17:00:31 +0100 Subject: [PATCH 014/287] add lost_password_function --- interface/web/admin/form/users.tform.php | 13 ++++ interface/web/admin/lib/lang/de_users.lng | 1 + interface/web/admin/lib/lang/en_users.lng | 1 + .../web/admin/templates/users_user_edit.htm | 8 +- interface/web/login/lib/lang/de.lng | 1 + interface/web/login/lib/lang/en.lng | 3 +- interface/web/login/password_reset.php | 75 ++++++++++--------- 7 files changed, 64 insertions(+), 38 deletions(-) diff --git a/interface/web/admin/form/users.tform.php b/interface/web/admin/form/users.tform.php index 9ee2970df..6a23559f1 100644 --- a/interface/web/admin/form/users.tform.php +++ b/interface/web/admin/form/users.tform.php @@ -260,6 +260,19 @@ $form['tabs']['users'] = array ( 'maxlength' => '2', 'rows' => '', 'cols' => '' + ), + 'lost_password_function' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'CHECKBOX', + 'regex' => '', + 'errmsg' => '', + 'default' => 1, + 'value' => array(0 => 0, 1 => 1), + 'separator' => '', + 'width' => '30', + 'maxlength' => '255', + 'rows' => '', + 'cols' => '' ) //################################# // ENDE Datenbankfelder diff --git a/interface/web/admin/lib/lang/de_users.lng b/interface/web/admin/lib/lang/de_users.lng index da26db30f..db37a605b 100644 --- a/interface/web/admin/lib/lang/de_users.lng +++ b/interface/web/admin/lib/lang/de_users.lng @@ -31,4 +31,5 @@ $wb['password_mismatch_txt'] = 'Die Passwörter stimmen nicht überein.'; $wb['password_match_txt'] = 'Die Passwörter stimmen überein.'; $wb['username_error_collision'] = 'Der Benutzername darf nicht web oder web gefolgt von einer Zahl sein.'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; +$wb['lost_password_function_txt'] = 'Passwort vergessen Funktion steht zur Verfügung'; ?> diff --git a/interface/web/admin/lib/lang/en_users.lng b/interface/web/admin/lib/lang/en_users.lng index 09b8ac305..9c57f1db8 100644 --- a/interface/web/admin/lib/lang/en_users.lng +++ b/interface/web/admin/lib/lang/en_users.lng @@ -31,4 +31,5 @@ $wb['password_mismatch_txt'] = 'The passwords do not match.'; $wb['password_match_txt'] = 'The passwords do match.'; $wb['username_error_collision'] = 'The username may not be web or web plus a number."'; $wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin'; +$wb['lost_password_function_txt'] = 'Forgot password function is available'; ?> diff --git a/interface/web/admin/templates/users_user_edit.htm b/interface/web/admin/templates/users_user_edit.htm index b973a34b7..91c35bbf9 100644 --- a/interface/web/admin/templates/users_user_edit.htm +++ b/interface/web/admin/templates/users_user_edit.htm @@ -60,6 +60,12 @@ {tmpl_var name='language'} +
+

{tmpl_var name='lost_password_function_txt'}

+
+ {tmpl_var name='lost_password_function'} +
+
@@ -70,4 +76,4 @@ - \ No newline at end of file + diff --git a/interface/web/login/lib/lang/de.lng b/interface/web/login/lib/lang/de.lng index 4ece1b0ed..44f677b7b 100644 --- a/interface/web/login/lib/lang/de.lng +++ b/interface/web/login/lib/lang/de.lng @@ -24,4 +24,5 @@ $wb['theme_not_compatible'] = 'Das gewählte Design ist mit dieser ISPConfig Ver $wb['back_txt'] = 'Zurück'; $wb['stay_logged_in_txt'] = 'Dauerhaft eingeloggt bleiben'; $wb['email_error'] = 'Email contains unallowed characters or has a invalid format.'; +$wb['lost_password_function_disabled_txt'] = 'Die Passwort vergessen Funktion steht für diesen Benutzer nicht zur Verfügung.'; ?> diff --git a/interface/web/login/lib/lang/en.lng b/interface/web/login/lib/lang/en.lng index e540ef2db..e7487da67 100644 --- a/interface/web/login/lib/lang/en.lng +++ b/interface/web/login/lib/lang/en.lng @@ -24,4 +24,5 @@ $wb['back_txt'] = 'Back'; $wb['error_maintenance_mode'] = 'This ISPConfig installation is currently under maintenance. We should be back shortly. Thank you for your patience.'; $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.
The default theme as been activated automatically.'; $wb['stay_logged_in_txt'] = 'Keep me logged in'; -?> \ No newline at end of file +$wb['lost_password_function_disabled_txt'] = 'The lost password function is not available for this user.'; +?> diff --git a/interface/web/login/password_reset.php b/interface/web/login/password_reset.php index c466ac8e4..f2e4e9507 100644 --- a/interface/web/login/password_reset.php +++ b/interface/web/login/password_reset.php @@ -7,14 +7,14 @@ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of ISPConfig nor the names of its contributors - may be used to endorse or promote products derived from this software without - specific prior written permission. + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of ISPConfig nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED @@ -26,7 +26,7 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ + */ require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; @@ -54,36 +54,39 @@ if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != ' $username = $app->db->quote($_POST['username']); $email = $app->db->quote($_POST['email']); - $client = $app->db->queryOneRecord("SELECT * FROM client WHERE username = '$username' AND email = '$email'"); + $client = $app->db->queryOneRecord("SELECT client.*, sys_user.lost_password_function FROM client,sys_user WHERE client.username = '$username' AND client.email = '$email' AND client.client_id = sys_user.client_id"); - if($client['client_id'] > 0) { - $new_password = $app->auth->get_random_password(); - $new_password_encrypted = $app->auth->crypt_password($new_password); - $new_password_encrypted = $app->db->quote($new_password_encrypted); - - $username = $app->db->quote($client['username']); - $app->db->query("UPDATE sys_user SET passwort = '$new_password_encrypted' WHERE username = '$username'"); - $app->db->query("UPDATE client SET password = '$new_password_encrypted' WHERE username = '$username'"); - $app->tpl->setVar("message", $wb['pw_reset']); - - $app->uses('getconf,ispcmail'); - $mail_config = $app->getconf->get_global_config('mail'); - if($mail_config['smtp_enabled'] == 'y') { - $mail_config['use_smtp'] = true; - $app->ispcmail->setOptions($mail_config); - } - $app->ispcmail->setSender($mail_config['admin_mail'], $mail_config['admin_name']); - $app->ispcmail->setSubject($wb['pw_reset_mail_title']); - $app->ispcmail->setMailText($wb['pw_reset_mail_msg'].$new_password); - $app->ispcmail->send(array($client['contact_name'] => $client['email'])); - $app->ispcmail->finish(); - - $app->plugin->raiseEvent('password_reset', true); - $app->tpl->setVar("msg", $wb['pw_reset']); + if($client['lost_password_function'] == 0) { + $app->tpl->setVar("error", $wb['lost_password_function_disabled_txt']); } else { - $app->tpl->setVar("error", $wb['pw_error']); + if($client['client_id'] > 0) { + $new_password = $app->auth->get_random_password(); + $new_password_encrypted = $app->auth->crypt_password($new_password); + $new_password_encrypted = $app->db->quote($new_password_encrypted); + + $username = $app->db->quote($client['username']); + $app->db->query("UPDATE sys_user SET passwort = '$new_password_encrypted' WHERE username = '$username'"); + $app->db->query("UPDATE client SET password = '$new_password_encrypted' WHERE username = '$username'"); + $app->tpl->setVar("message", $wb['pw_reset']); + + $app->uses('getconf,ispcmail'); + $mail_config = $app->getconf->get_global_config('mail'); + if($mail_config['smtp_enabled'] == 'y') { + $mail_config['use_smtp'] = true; + $app->ispcmail->setOptions($mail_config); + } + $app->ispcmail->setSender($mail_config['admin_mail'], $mail_config['admin_name']); + $app->ispcmail->setSubject($wb['pw_reset_mail_title']); + $app->ispcmail->setMailText($wb['pw_reset_mail_msg'].$new_password); + $app->ispcmail->send(array($client['contact_name'] => $client['email'])); + $app->ispcmail->finish(); + + $app->plugin->raiseEvent('password_reset', true); + $app->tpl->setVar("msg", $wb['pw_reset']); + } else { + $app->tpl->setVar("error", $wb['pw_error']); + } } - } else { $app->tpl->setVar("msg", $wb['pw_error_noinput']); } -- GitLab From eebf5bbfb99ad3ee969b8a25b0d0e91f491911fd Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Mon, 24 Nov 2014 13:22:44 +0100 Subject: [PATCH 015/287] fix FS#3659 --- interface/web/dns/dns_soa_edit.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/interface/web/dns/dns_soa_edit.php b/interface/web/dns/dns_soa_edit.php index 96088ef92..e39c37781 100644 --- a/interface/web/dns/dns_soa_edit.php +++ b/interface/web/dns/dns_soa_edit.php @@ -283,7 +283,11 @@ function onBeforeUpdate () { if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) { //* We do not allow users to change a domain which has been created by the admin $rec = $app->db->queryOneRecord("SELECT origin from dns_soa WHERE id = ".$this->id); - if(isset($this->dataRecord["origin"]) && $rec['origin'] != $this->dataRecord["origin"] && $app->tform->checkPerm($this->id, 'u')) { + $drOrigin = (isset($this->dataRecord['origin'])) + ? $app->functions->idn_encode($this->dataRecord['origin']) + : false; + + if($rec['origin'] !== $drOrigin && $app->tform->checkPerm($this->id, 'u')) { //* Add a error message and switch back to old server $app->tform->errorMessage .= $app->lng('The Zone (soa) can not be changed. Please ask your Administrator if you want to change the Zone name.'); $this->dataRecord["origin"] = $rec['origin']; -- GitLab From 01cec5b1c398128778ae9e1dff95b22deb9b10cc Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 27 Nov 2014 11:43:01 +0100 Subject: [PATCH 016/287] - First part of layout change for 3.1 --- interface/web/index.php | 2 + interface/web/js/scrigo.js.php | 7 +- interface/web/themes/default/CHANGELOG | 32 - interface/web/themes/default/LICENSE | 9 - interface/web/themes/default/TODO | 8 - .../themes/default/assets/fonts/ispconfig.eot | Bin 0 -> 11128 bytes .../themes/default/assets/fonts/ispconfig.svg | 25 + .../themes/default/assets/fonts/ispconfig.ttf | Bin 0 -> 10956 bytes .../default/assets/fonts/ispconfig.woff | Bin 0 -> 7268 bytes .../web/themes/default/assets/images/logo.png | Bin 0 -> 2286 bytes .../themes/default/assets/images/logo@2x.png | Bin 0 -> 1703 bytes .../assets/javascripts/bootstrap.min.js | 7 + .../default/assets/javascripts/ispconfig.js | 6 + .../assets/javascripts/ispconfig.min.js | 1 + .../assets/javascripts/jquery-2.1.0.min.js | 4 + .../assets/javascripts/modernizr.custom.js | 4 + .../javascripts/modernizr.custom.min.js | 1 + .../default/assets/javascripts/pushy.min.js | 4 + .../default/assets/javascripts/responsive.js | 24 + .../assets/javascripts/responsive.min.js | 1 + .../assets/stylesheets/bootstrap.min.css | 5 + .../default/assets/stylesheets/fonts.css | 70 + .../default/assets/stylesheets/fonts.min.css | 70 + .../default/assets/stylesheets/ispconfig.css | 264 +++ .../assets/stylesheets/ispconfig.min.css | 1 + .../default/assets/stylesheets/ispconfig.sass | 293 +++ .../default/assets/stylesheets/pushy.css | 98 + .../default/assets/stylesheets/pushy.min.css | 4 + .../default/assets/stylesheets/responsive.css | 93 + .../assets/stylesheets/responsive.min.css | 1 + .../assets/stylesheets/responsive.sass | 108 + .../stylesheets/themes/dark/colors.sass | 33 + .../stylesheets/themes/dark/mixins.sass | 13 + .../assets/stylesheets/themes/dark/theme.css | 155 ++ .../stylesheets/themes/dark/theme.min.css | 1 + .../assets/stylesheets/themes/dark/theme.sass | 185 ++ .../stylesheets/themes/default/colors.sass | 33 + .../stylesheets/themes/default/mixins.sass | 13 + .../stylesheets/themes/default/theme.css | 157 ++ .../stylesheets/themes/default/theme.min.css | 1 + .../stylesheets/themes/default/theme.sass | 187 ++ interface/web/themes/default/css/iehacks.css | 184 -- .../css/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 180 -> 0 bytes .../images/ui-bg_flat_55_fbec88_40x100.png | Bin 182 -> 0 bytes .../images/ui-bg_glass_75_d0e5f5_1x400.png | Bin 124 -> 0 bytes .../images/ui-bg_glass_85_dfeffc_1x400.png | Bin 123 -> 0 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 119 -> 0 bytes .../ui-bg_gloss-wave_55_5c9ccc_500x100.png | Bin 3457 -> 0 bytes .../ui-bg_inset-hard_100_f5f8f9_1x100.png | Bin 104 -> 0 bytes .../ui-bg_inset-hard_100_fcfdfd_1x100.png | Bin 88 -> 0 bytes .../css/images/ui-icons_217bc0_256x240.png | Bin 4369 -> 0 bytes .../css/images/ui-icons_2e83ff_256x240.png | Bin 4369 -> 0 bytes .../css/images/ui-icons_469bdd_256x240.png | Bin 4369 -> 0 bytes .../css/images/ui-icons_6da8d5_256x240.png | Bin 4369 -> 0 bytes .../css/images/ui-icons_cd0a0a_256x240.png | Bin 4369 -> 0 bytes .../css/images/ui-icons_d8e7f3_256x240.png | Bin 4369 -> 0 bytes .../css/images/ui-icons_f9bd01_256x240.png | Bin 5355 -> 0 bytes .../default/css/jquery-ui-1.11.1.min.css | 7 - .../css/jquery-ui-1.11.1.structure.min.css | 5 - .../css/jquery-ui-1.11.1.theme.min.css | 5 - interface/web/themes/default/css/print.css | 112 - interface/web/themes/default/css/styles.css | 1935 ----------------- .../themes/default/icons/button_sprite.png | Bin 4350 -> 0 bytes .../themes/default/icons/device_sprite.png | Bin 9186 -> 0 bytes .../web/themes/default/icons/flags_sprite.png | Bin 88755 -> 0 bytes .../web/themes/default/icons/x16/arrow.png | Bin 531 -> 0 bytes .../themes/default/icons/x16/arrow_180.png | Bin 540 -> 0 bytes .../themes/default/icons/x16/arrow_stop.png | Bin 608 -> 0 bytes .../default/icons/x16/arrow_stop_180.png | Bin 615 -> 0 bytes .../themes/default/icons/x16/cross_circle.png | Bin 610 -> 0 bytes .../themes/default/icons/x16/tick_circle.png | Bin 630 -> 0 bytes .../web/themes/default/icons/x16_sprite.png | Bin 9242 -> 0 bytes .../web/themes/default/icons/x32_sprite.png | Bin 37386 -> 0 bytes .../web/themes/default/images/ajax-loader.gif | Bin 3208 -> 0 bytes .../themes/default/images/buttonHolder_bg.gif | Bin 609 -> 0 bytes .../web/themes/default/images/chevron.png | Bin 183 -> 0 bytes .../web/themes/default/images/favicon.ico | Bin 1406 -> 0 bytes .../web/themes/default/images/header_bg.png | Bin 308 -> 0 bytes .../web/themes/default/images/header_logo.png | Bin 5872 -> 0 bytes .../themes/default/images/lists_tfoot_bg.png | Bin 149 -> 0 bytes .../themes/default/images/lists_thead_bg.png | Bin 200 -> 0 bytes .../web/themes/default/images/loading.gif | Bin 1460 -> 0 bytes .../web/themes/default/images/meter_bg.gif | Bin 80 -> 0 bytes .../web/themes/default/images/screen_bg.png | Bin 90 -> 0 bytes interface/web/themes/default/js/html5shiv.js | 220 -- .../themes/default/templates/error.tpl.htm | 17 +- .../web/themes/default/templates/main.tpl.htm | 367 ++-- .../themes/default/templates/sidenav.tpl.htm | 50 +- .../default/templates/tabbed_form.tpl.htm | 66 +- .../themes/default/templates/topnav.tpl.htm | 14 +- 90 files changed, 2125 insertions(+), 2777 deletions(-) delete mode 100644 interface/web/themes/default/CHANGELOG delete mode 100644 interface/web/themes/default/LICENSE delete mode 100644 interface/web/themes/default/TODO create mode 100644 interface/web/themes/default/assets/fonts/ispconfig.eot create mode 100644 interface/web/themes/default/assets/fonts/ispconfig.svg create mode 100644 interface/web/themes/default/assets/fonts/ispconfig.ttf create mode 100644 interface/web/themes/default/assets/fonts/ispconfig.woff create mode 100644 interface/web/themes/default/assets/images/logo.png create mode 100644 interface/web/themes/default/assets/images/logo@2x.png create mode 100644 interface/web/themes/default/assets/javascripts/bootstrap.min.js create mode 100644 interface/web/themes/default/assets/javascripts/ispconfig.js create mode 100644 interface/web/themes/default/assets/javascripts/ispconfig.min.js create mode 100644 interface/web/themes/default/assets/javascripts/jquery-2.1.0.min.js create mode 100644 interface/web/themes/default/assets/javascripts/modernizr.custom.js create mode 100644 interface/web/themes/default/assets/javascripts/modernizr.custom.min.js create mode 100644 interface/web/themes/default/assets/javascripts/pushy.min.js create mode 100644 interface/web/themes/default/assets/javascripts/responsive.js create mode 100644 interface/web/themes/default/assets/javascripts/responsive.min.js create mode 100644 interface/web/themes/default/assets/stylesheets/bootstrap.min.css create mode 100644 interface/web/themes/default/assets/stylesheets/fonts.css create mode 100644 interface/web/themes/default/assets/stylesheets/fonts.min.css create mode 100644 interface/web/themes/default/assets/stylesheets/ispconfig.css create mode 100644 interface/web/themes/default/assets/stylesheets/ispconfig.min.css create mode 100644 interface/web/themes/default/assets/stylesheets/ispconfig.sass create mode 100644 interface/web/themes/default/assets/stylesheets/pushy.css create mode 100644 interface/web/themes/default/assets/stylesheets/pushy.min.css create mode 100644 interface/web/themes/default/assets/stylesheets/responsive.css create mode 100644 interface/web/themes/default/assets/stylesheets/responsive.min.css create mode 100644 interface/web/themes/default/assets/stylesheets/responsive.sass create mode 100644 interface/web/themes/default/assets/stylesheets/themes/dark/colors.sass create mode 100644 interface/web/themes/default/assets/stylesheets/themes/dark/mixins.sass create mode 100644 interface/web/themes/default/assets/stylesheets/themes/dark/theme.css create mode 100644 interface/web/themes/default/assets/stylesheets/themes/dark/theme.min.css create mode 100644 interface/web/themes/default/assets/stylesheets/themes/dark/theme.sass create mode 100644 interface/web/themes/default/assets/stylesheets/themes/default/colors.sass create mode 100644 interface/web/themes/default/assets/stylesheets/themes/default/mixins.sass create mode 100644 interface/web/themes/default/assets/stylesheets/themes/default/theme.css create mode 100644 interface/web/themes/default/assets/stylesheets/themes/default/theme.min.css create mode 100644 interface/web/themes/default/assets/stylesheets/themes/default/theme.sass delete mode 100644 interface/web/themes/default/css/iehacks.css delete mode 100644 interface/web/themes/default/css/images/ui-bg_flat_0_aaaaaa_40x100.png delete mode 100644 interface/web/themes/default/css/images/ui-bg_flat_55_fbec88_40x100.png delete mode 100644 interface/web/themes/default/css/images/ui-bg_glass_75_d0e5f5_1x400.png delete mode 100644 interface/web/themes/default/css/images/ui-bg_glass_85_dfeffc_1x400.png delete mode 100644 interface/web/themes/default/css/images/ui-bg_glass_95_fef1ec_1x400.png delete mode 100644 interface/web/themes/default/css/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png delete mode 100644 interface/web/themes/default/css/images/ui-bg_inset-hard_100_f5f8f9_1x100.png delete mode 100644 interface/web/themes/default/css/images/ui-bg_inset-hard_100_fcfdfd_1x100.png delete mode 100644 interface/web/themes/default/css/images/ui-icons_217bc0_256x240.png delete mode 100644 interface/web/themes/default/css/images/ui-icons_2e83ff_256x240.png delete mode 100644 interface/web/themes/default/css/images/ui-icons_469bdd_256x240.png delete mode 100644 interface/web/themes/default/css/images/ui-icons_6da8d5_256x240.png delete mode 100644 interface/web/themes/default/css/images/ui-icons_cd0a0a_256x240.png delete mode 100644 interface/web/themes/default/css/images/ui-icons_d8e7f3_256x240.png delete mode 100644 interface/web/themes/default/css/images/ui-icons_f9bd01_256x240.png delete mode 100644 interface/web/themes/default/css/jquery-ui-1.11.1.min.css delete mode 100644 interface/web/themes/default/css/jquery-ui-1.11.1.structure.min.css delete mode 100644 interface/web/themes/default/css/jquery-ui-1.11.1.theme.min.css delete mode 100644 interface/web/themes/default/css/print.css delete mode 100644 interface/web/themes/default/css/styles.css delete mode 100644 interface/web/themes/default/icons/button_sprite.png delete mode 100644 interface/web/themes/default/icons/device_sprite.png delete mode 100644 interface/web/themes/default/icons/flags_sprite.png delete mode 100644 interface/web/themes/default/icons/x16/arrow.png delete mode 100644 interface/web/themes/default/icons/x16/arrow_180.png delete mode 100644 interface/web/themes/default/icons/x16/arrow_stop.png delete mode 100644 interface/web/themes/default/icons/x16/arrow_stop_180.png delete mode 100644 interface/web/themes/default/icons/x16/cross_circle.png delete mode 100644 interface/web/themes/default/icons/x16/tick_circle.png delete mode 100644 interface/web/themes/default/icons/x16_sprite.png delete mode 100644 interface/web/themes/default/icons/x32_sprite.png delete mode 100644 interface/web/themes/default/images/ajax-loader.gif delete mode 100644 interface/web/themes/default/images/buttonHolder_bg.gif delete mode 100644 interface/web/themes/default/images/chevron.png delete mode 100644 interface/web/themes/default/images/favicon.ico delete mode 100644 interface/web/themes/default/images/header_bg.png delete mode 100644 interface/web/themes/default/images/header_logo.png delete mode 100644 interface/web/themes/default/images/lists_tfoot_bg.png delete mode 100644 interface/web/themes/default/images/lists_thead_bg.png delete mode 100644 interface/web/themes/default/images/loading.gif delete mode 100644 interface/web/themes/default/images/meter_bg.gif delete mode 100644 interface/web/themes/default/images/screen_bg.png delete mode 100644 interface/web/themes/default/js/html5shiv.js diff --git a/interface/web/index.php b/interface/web/index.php index 80eab1110..50f98aecd 100644 --- a/interface/web/index.php +++ b/interface/web/index.php @@ -77,6 +77,8 @@ if(@is_dir($js_d)) { if (!empty($js_d_files)) $app->tpl->setLoop('js_d_includes', $js_d_files); unset($js_d_files); +$app->tpl->setVar('current_theme', isset($_SESSION['s']['theme']) ? $_SESSION['s']['theme'] : 'default'); + $app->tpl_defaults(); $app->tpl->pparse(); ?> diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php index 51e50f9e2..6768f8feb 100644 --- a/interface/web/js/scrigo.js.php +++ b/interface/web/js/scrigo.js.php @@ -102,7 +102,8 @@ if($server_config_array['misc']['use_combobox'] == 'y'){ } } }); - $('.chosen-select').chosen({no_results_text: "", width: '300px'}); + /* TODO: find a better way! */ + //$('.chosen-select').chosen({no_results_text: "", width: '300px'}); @@ -418,7 +419,7 @@ function loadMenus() { }, success: function(data, textStatus, jqXHR) { hideLoadIndicator(); - jQuery('#sideNav').html(jqXHR.responseText); + jQuery('#sidebar').html(jqXHR.responseText); }, error: function() { hideLoadIndicator(); @@ -435,7 +436,7 @@ function loadMenus() { }, success: function(data, textStatus, jqXHR) { hideLoadIndicator(); - jQuery('#topNav').html(jqXHR.responseText); + jQuery('#topnav-container').html(jqXHR.responseText); }, error: function(o) { hideLoadIndicator(); diff --git a/interface/web/themes/default/CHANGELOG b/interface/web/themes/default/CHANGELOG deleted file mode 100644 index 454964210..000000000 --- a/interface/web/themes/default/CHANGELOG +++ /dev/null @@ -1,32 +0,0 @@ -CHANGELOG -default -> default-v2 -source: default $3241 07/06/2012 @ 12:00 UTC+2 -resources @ https://github.com/foe-services/ispc-resources - -- changed doctype to (HTML5) -- rm yaml/* -- rm css/patches/* -- cp yaml/patches/iehacks.css css/* -- rm - " /> - <tmpl_var name="app_title"> <tmpl_var name="app_version"> - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -

ISPConfig 3

- hosting control panel -
- - - - - + <tmpl_var name="app_title"> <tmpl_var name="app_version"> - -
- - -
-
- -
-
-
 
- -
- -
- - - + + + + + + /assets/stylesheets/bootstrap.min.css' /> + /assets/stylesheets/fonts.min.css' /> + /assets/stylesheets/ispconfig.min.css' /> + /assets/stylesheets/pushy.min.css' /> + /assets/stylesheets/responsive.min.css' /> + /assets/stylesheets/themes/default/theme.min.css' /> + + + + + +
+ +
+
+
+
+
+ + + + +
+
+ + + + + +
+
+
+
+ + + + +
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+ +
- - - - + +
+
+
+ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/interface/web/themes/default/templates/sidenav.tpl.htm b/interface/web/themes/default/templates/sidenav.tpl.htm index b42ea6667..7f59602c7 100644 --- a/interface/web/themes/default/templates/sidenav.tpl.htm +++ b/interface/web/themes/default/templates/sidenav.tpl.htm @@ -1,28 +1,22 @@ - \ No newline at end of file + +
+ +
diff --git a/interface/web/themes/default/templates/tabbed_form.tpl.htm b/interface/web/themes/default/templates/tabbed_form.tpl.htm index 08002d528..0b4fad345 100644 --- a/interface/web/themes/default/templates/tabbed_form.tpl.htm +++ b/interface/web/themes/default/templates/tabbed_form.tpl.htm @@ -1,27 +1,43 @@ - -

-
-
-
    - - -
  • - -
  • -
    + + + + +
    + +
    +
    + +
    +
    ERROR
    +
    +
    +
    TODO: IP address is empty.
    +
    TODO: Hostname is empty.
    +
    +
    +
    + + +
    + + -
    -
    - -

    -
    - -

    ERROR

    -
    - - -
    +
+ +
+
+ +
+
+ + + +
+ - - \ No newline at end of file diff --git a/interface/web/themes/default/templates/topnav.tpl.htm b/interface/web/themes/default/templates/topnav.tpl.htm index 485fa2308..cdb64fcc3 100644 --- a/interface/web/themes/default/templates/topnav.tpl.htm +++ b/interface/web/themes/default/templates/topnav.tpl.htm @@ -1,9 +1,9 @@ - + -- GitLab From a4a4eaa93959dacf601b940d6988e5e995611777 Mon Sep 17 00:00:00 2001 From: Falko Timme Date: Thu, 27 Nov 2014 17:29:59 +0100 Subject: [PATCH 017/287] - Added translations. - Added HHVM to "Default PHP Handler" field (server configuration). - Fixed "Unable to load the server configuration from database." error when running server.sh. - Fixed Javascript (accordions weren't working anymore, directive snippets and other placeholders couldn't be added anymore). --- interface/lib/lang/en.lng | 2 +- .../web/admin/form/server_config.tform.php | 2 +- .../web/admin/lib/lang/de_server_config.lng | 6 +++++ .../web/admin/lib/lang/en_server_config.lng | 5 +++- .../templates/server_config_web_edit.htm | 2 +- interface/web/client/lib/lang/de_client.lng | 25 +++++++++++++++++-- interface/web/client/lib/lang/en_client.lng | 24 ++++++++++-------- .../client/templates/client_edit_limits.htm | 4 --- interface/web/js/scrigo.js.php | 4 +-- .../sites/lib/lang/de_web_vhost_domain.lng | 2 ++ .../sites/lib/lang/en_web_vhost_domain.lng | 2 ++ interface/web/sites/web_vhost_domain_edit.php | 4 +++ .../web/themes/default/templates/main.tpl.htm | 4 +++ server/lib/classes/db_mysql.inc.php | 2 +- 14 files changed, 64 insertions(+), 24 deletions(-) diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index c89c97a7c..3c2bfafe2 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -26,7 +26,7 @@ $wb['delete_txt'] = "Delete"; $wb['filter_txt'] = "Filter"; $wb['add_new_record_txt'] = "Add new record"; $wb['btn_save_txt'] = "Save"; -$wb['btn_cancel_txt'] = "Back"; +$wb['btn_cancel_txt'] = "Cancel"; $wb['top_menu_system'] = 'System'; $wb['top_menu_client'] = 'Client'; $wb['top_menu_email'] = 'Email'; diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index aa9adc543..debceae71 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -993,7 +993,7 @@ $form["tabs"]['web'] = array( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', 'default' => 'fast-cgi', - 'value' => array('no' => 'disabled_txt', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM'), + 'value' => array('no' => 'disabled_txt', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM', 'hhvm' => 'HHVM'), 'searchable' => 2 ), 'nginx_cgi_socket' => array( diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index 9afd35cb1..6a8e42187 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -256,4 +256,10 @@ $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; $wb['network_filesystem_txt'] = 'Netzwerk-Dateisystem'; +$wb['overquota_db_notify_admin_txt'] = 'Datenbank-Quota-Warnungen an den Administrator senden'; +$wb['overquota_db_notify_client_txt'] = 'Datenbank-Quota-Warnungen an den Kunden senden'; +$wb['php_ini_check_minutes_txt'] = 'Prüfe php.ini alle X Minuten auf Änderungen'; +$wb['php_ini_check_minutes_error_empty'] = 'Bitte geben Sie einen Wert an, wie oft die php.ini auf Änderungen geprüft werden soll.'; +$wb['php_ini_check_minutes_info_txt'] = '0 = keine Prüfung'; +$wb['php_handler_txt'] = 'Standard-PHP-Handler'; ?> diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index dde50a061..b6288341a 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -205,7 +205,7 @@ $wb['backup_delete_txt'] = 'Delete backups on domain/website delete'; $wb["overquota_db_notify_admin_txt"] = 'Send DB quota warnings to admin'; $wb["overquota_db_notify_client_txt"] = 'Send DB quota warnings to client'; $wb['monitor_system_updates_txt'] = 'Check for Linux updates'; -$wb['php_handler_txt'] = "PHP Handler"; +$wb['php_handler_txt'] = "Default PHP Handler"; $wb['disabled_txt'] = 'Disabled'; $wb['dkim_strength_txt'] = 'DKIM strength'; $wb['monitor_system_updates_txt'] = 'Check for Linux updates'; @@ -260,4 +260,7 @@ $wb['cron_init_script_error_regex'] = 'Invalid cron init script.'; $wb['crontab_dir_error_regex'] = 'Invalid crontab directory.'; $wb['cron_wget_error_regex'] = 'Invalid cron wget path.'; $wb['network_filesystem_txt'] = 'Network Filesystem'; +$wb['php_ini_check_minutes_txt'] = 'Check php.ini every X minutes for changes'; +$wb['php_ini_check_minutes_error_empty'] = 'Please specify a value how often php.ini should be checked for changes.'; +$wb['php_ini_check_minutes_info_txt'] = '0 = no check'; ?> diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm index 04a8c2244..1ea52554a 100644 --- a/interface/web/admin/templates/server_config_web_edit.htm +++ b/interface/web/admin/templates/server_config_web_edit.htm @@ -237,7 +237,7 @@
- {tmpl_var name='php_ini_check_minutes_info_txt'} +  {tmpl_var name='php_ini_check_minutes_info_txt'}
diff --git a/interface/web/client/lib/lang/de_client.lng b/interface/web/client/lib/lang/de_client.lng index dbaa9a596..e5ba066ee 100644 --- a/interface/web/client/lib/lang/de_client.lng +++ b/interface/web/client/lib/lang/de_client.lng @@ -151,8 +151,29 @@ $wb['canceled_txt'] = 'Gekündigt (verhindert Kundenlogin)'; $wb['gender_txt'] = 'Anrede'; $wb['gender_m_txt'] = 'Herr'; $wb['gender_f_txt'] = 'Frau'; +$wb["web_servers_txt"] = 'Webserver'; +$wb["web_servers_placeholder"] = 'Webserver auswählen'; +$wb['no_web_server_error'] = 'Bitte wählen Sie mind. einen Webserver aus.'; +$wb['web_servers_used'] = 'Der Server, den Sie entfernen möchten, wird als Webserver verwendet. Bitte stellen Sie sicher, daß dieser Server nicht von diesem Kunden benutzt wird, bevor Sie ihn entfernen.'; +$wb["dns_servers_txt"] = 'DNS-Server'; +$wb["dns_servers_placeholder"] = 'DNS-Server wählen'; +$wb['no_dns_server_error'] = 'Bitte wählen Sie mind. einen DNS-Server aus.'; +$wb['dns_servers_used'] = 'Der Server, den Sie entfernen möchten, wird als DNS-Server verwendet. Bitte stellen Sie sicher, daß dieser Server nicht von diesem Kunden benutzt wird, bevor Sie ihn entfernen.'; +$wb["db_servers_txt"] = 'Datenbank-Server'; +$wb["db_servers_placeholder"] = 'Datenbank-Server wählen'; +$wb['no_db_server_error'] = 'Bitte wählen Sie mind. einen Datenbank-Server aus.'; +$wb['db_servers_used'] = 'Der Server, den Sie entfernen möchten, wird als Datenbank-Server verwendet. Bitte stellen Sie sicher, daß dieser Server nicht von diesem Kunden benutzt wird, bevor Sie ihn entfernen.'; +$wb["mail_servers_txt"] = 'Mailserver'; +$wb["mail_servers_placeholder"] = 'Mailserver wählen'; +$wb['no_mail_server_error'] = 'Bitte wählen Sie mind. einen Mailserver aus.'; +$wb['mail_servers_used'] = 'Der Server, den Sie entfernen möchten, wird als Mailserver verwendet. Bitte stellen Sie sicher, daß dieser Server nicht von diesem Kunden benutzt wird, bevor Sie ihn entfernen.'; $wb['added_by_txt'] = 'Added by'; $wb['added_date_txt'] = 'Added date'; -$wb['parent_client_id_txt'] = 'Client of reseller'; -$wb['none_txt'] = 'none'; +$wb['parent_client_id_txt'] = 'Kunde von Reseller'; +$wb['none_txt'] = 'keiner'; +$wb['limit_database_quota_txt'] = 'Datenbank-Quota'; +$wb['limit_database_quota_error_notint'] = 'Das Datenbank-quota muß eine Nummer sein.'; +$wb['reseller_txt'] = 'Reseller'; +$wb['btn_save_txt'] = 'Speichern'; +$wb['btn_cancel_txt'] = 'Abbrechen'; ?> diff --git a/interface/web/client/lib/lang/en_client.lng b/interface/web/client/lib/lang/en_client.lng index d14df622a..225b304d6 100644 --- a/interface/web/client/lib/lang/en_client.lng +++ b/interface/web/client/lib/lang/en_client.lng @@ -155,21 +155,21 @@ $wb['gender_txt'] = 'Title'; $wb['gender_m_txt'] = 'Mr.'; $wb['gender_f_txt'] = 'Ms.'; $wb["web_servers_txt"] = 'Webservers'; -$wb["web_servers_placeholder"] = 'Select Webservers'; +$wb["web_servers_placeholder"] = 'Select webservers'; $wb['no_web_server_error'] = 'At least one webserver must be selected.'; -$wb['web_servers_used'] = 'The server you are trying to remove from this client is used as a webserver. Be sure that this server is not used by this client before to remove it.'; -$wb["dns_servers_txt"] = 'DNS Server'; -$wb["dns_servers_placeholder"] = 'Select DNS Servers'; +$wb['web_servers_used'] = 'The server you are trying to remove from this client is used as a webserver. Be sure that this server is not used by this client before you remove it.'; +$wb["dns_servers_txt"] = 'DNS servers'; +$wb["dns_servers_placeholder"] = 'Select DNS servers'; $wb['no_dns_server_error'] = 'At least one DNS server must be selected.'; -$wb['dns_servers_used'] = 'The server you are trying to remove from this client is used as a DNS server. Be sure that this server is not used by this client before to remove it.'; -$wb["db_servers_txt"] = 'Database Server'; -$wb["db_servers_placeholder"] = 'Select Database Servers'; +$wb['dns_servers_used'] = 'The server you are trying to remove from this client is used as a DNS server. Be sure that this server is not used by this client before you remove it.'; +$wb["db_servers_txt"] = 'Database servers'; +$wb["db_servers_placeholder"] = 'Select database servers'; $wb['no_db_server_error'] = 'At least one Database server must be selected.'; -$wb['db_servers_used'] = 'The server you are trying to remove from this client is used as a Database server. Be sure that this server is not used by this client before to remove it.'; +$wb['db_servers_used'] = 'The server you are trying to remove from this client is used as a Database server. Be sure that this server is not used by this client before you remove it.'; $wb["mail_servers_txt"] = 'Mailservers'; -$wb["mail_servers_placeholder"] = 'Select Mailservers'; -$wb['no_mail_server_error'] = 'At least one Mailserver must be selected.'; -$wb['mail_servers_used'] = 'The server you are trying to remove from this client is used as a Mailserver. Be sure that this server is not used by this client before to remove it.'; +$wb["mail_servers_placeholder"] = 'Select mailservers'; +$wb['no_mail_server_error'] = 'At least one mailserver must be selected.'; +$wb['mail_servers_used'] = 'The server you are trying to remove from this client is used as a Mailserver. Be sure that this server is not used by this client before you remove it.'; $wb['added_by_txt'] = 'Added by'; $wb['added_date_txt'] = 'Added date'; $wb['parent_client_id_txt'] = 'Client of reseller'; @@ -177,4 +177,6 @@ $wb['none_txt'] = 'none'; $wb['limit_database_quota_txt'] = 'Database quota'; $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.'; $wb['reseller_txt'] = 'Reseller'; +$wb['btn_save_txt'] = "Save"; +$wb['btn_cancel_txt'] = "Cancel"; ?> diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm index 2d40fc455..43aad6fd1 100644 --- a/interface/web/client/templates/client_edit_limits.htm +++ b/interface/web/client/templates/client_edit_limits.htm @@ -326,10 +326,6 @@ function custom_template_selected() { return ($('#template_master').val() == '0' ? true : false); } -$('.subsectiontoggle').on("click", function(){ - $(this).children().toggleClass('showing').end().next().slideToggle(); -}); - $('#template_additional_list').find('li > a').click(function(e) { e.preventDefault(); delAdditionalTemplate($(this).parent().attr('rel')); diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php index 51e50f9e2..fd299304a 100644 --- a/interface/web/js/scrigo.js.php +++ b/interface/web/js/scrigo.js.php @@ -854,13 +854,13 @@ function getRandomInt(min, max){ return Math.floor(Math.random() * (max - min + 1)) + min; } -jQuery('.addPlaceholder').on("click", function(){ +jQuery(document).on("click", ".addPlaceholder", function(){ var placeholderText = jQuery(this).text(); var template = jQuery(this).siblings(':input'); template.insertAtCaret(placeholderText); }); -jQuery('.addPlaceholderContent').on("click", function(){ +jQuery(document).on("click", ".addPlaceholderContent", function(){ var placeholderContentText = jQuery(this).find('.addPlaceholderContent').text(); var template2 = jQuery(this).siblings(':input'); template2.insertAtCaret(placeholderContentText); diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain.lng b/interface/web/sites/lib/lang/de_web_vhost_domain.lng index 197d5ceec..7cce81680 100644 --- a/interface/web/sites/lib/lang/de_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/de_web_vhost_domain.lng @@ -134,4 +134,6 @@ $wb['domain_error_wildcard'] = 'Wildcard-Subdomains sind nicht erlaubt.'; $wb['invalid_custom_php_ini_settings_txt'] = 'Unzulässige php.ini-Einstellungen'; $wb['invalid_system_user_or_group_txt'] = 'Invalid system user or group'; $wb['apache_directive_blocked_error'] = 'Die Apache Direktive wurde durch die Sicherheitsrichtline blockiert:'; +$wb['btn_save_txt'] = 'Speichern'; +$wb['btn_cancel_txt'] = 'Abbrechen'; ?> diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng index f68ebb836..1f6b45568 100644 --- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng @@ -137,4 +137,6 @@ $wb['backup_excludes_txt'] = 'Excluded Directories'; $wb['backup_excludes_note_txt'] = '(Separate multiple directories with commas. Example: web/cache/*,web/backup)'; $wb['backup_excludes_error_regex'] = 'The excluded directories contain invalid characters.'; $wb['subdomain_error_empty'] = 'The subdommain field is empty or contains invalid characters.'; +$wb['btn_save_txt'] = "Save"; +$wb['btn_cancel_txt'] = "Cancel"; ?> diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 057d26303..e868ece7b 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -121,6 +121,10 @@ class page_action extends tform_actions { $server_id = intval($settings['default_webserver']); $app->tform->formDef['tabs']['domain']['fields']['server_id']['default'] = $server_id; } + if(!$server_id){ + $default_web_server = $app->db->queryOneRecord("SELECT server_id FROM server WHERE web_server = ? ORDER BY server_id LIMIT 0,1", 1); + $server_id = $default_web_server['server_id']; + } $web_config = $app->getconf->get_server_config($server_id, 'web'); $app->tform->formDef['tabs']['domain']['fields']['php']['default'] = $web_config['php_handler']; $app->tform->formDef['tabs']['domain']['readonly'] = false; diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm index 9ea714f2f..dfb8c722d 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -37,6 +37,10 @@ e.preventDefault(); } }); + + jQuery(document).on("click", ".subsectiontoggle", function(){ + jQuery(this).children().toggleClass('showing').end().next().slideToggle(); + }); $('#globalsearch').ispconfigSearch({ dataSrc: '/dashboard/ajax_get_json.php?type=globalsearch', diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index 51cad86f0..c0eed64b2 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -176,7 +176,7 @@ class db extends mysqli private function _query($sQuery = '') { global $app; - if($this->isConnected == false) return false; + //if($this->isConnected == false) return false; if ($sQuery == '') { $this->_sqlerror('Keine Anfrage angegeben / No query given'); return false; -- GitLab From 081367b30d5ecdb26223453454fb7c9e96932e80 Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Fri, 28 Nov 2014 11:26:37 +0100 Subject: [PATCH 018/287] lost_password: use placeholders (Florian Schaal#442) --- interface/web/login/password_reset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/login/password_reset.php b/interface/web/login/password_reset.php index f2e4e9507..5eac46a79 100644 --- a/interface/web/login/password_reset.php +++ b/interface/web/login/password_reset.php @@ -54,7 +54,7 @@ if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != ' $username = $app->db->quote($_POST['username']); $email = $app->db->quote($_POST['email']); - $client = $app->db->queryOneRecord("SELECT client.*, sys_user.lost_password_function FROM client,sys_user WHERE client.username = '$username' AND client.email = '$email' AND client.client_id = sys_user.client_id"); + $client = $app->db->queryOneRecord("SELECT client.*, sys_user.lost_password_function FROM client,sys_user WHERE client.username = ? AND client.email = ? AND client.client_id = sys_user.client_id", $username, $email); if($client['lost_password_function'] == 0) { $app->tpl->setVar("error", $wb['lost_password_function_disabled_txt']); -- GitLab From 61bd1f9b35168ae2eb82085c8d0306c46ca22152 Mon Sep 17 00:00:00 2001 From: Falko Timme Date: Fri, 28 Nov 2014 12:14:51 +0100 Subject: [PATCH 019/287] - Implemented FS#2653 - Set TMP, TMPDIR and TEMP environment variable. --- server/conf/php-cgi-starter.master | 4 ++++ server/conf/php-fcgi-starter.master | 3 +++ server/conf/php_fpm_pool.conf.master | 4 ++++ server/conf/vhost.conf.master | 3 +++ 4 files changed, 14 insertions(+) diff --git a/server/conf/php-cgi-starter.master b/server/conf/php-cgi-starter.master index be3099322..03d0554a5 100644 --- a/server/conf/php-cgi-starter.master +++ b/server/conf/php-cgi-starter.master @@ -4,6 +4,10 @@ export PHPRC="" +export TMP=/tmp +export TMPDIR=/tmp +export TEMP=/tmp + exec \ -d open_basedir= \ -d upload_tmp_dir=/tmp \ diff --git a/server/conf/php-fcgi-starter.master b/server/conf/php-fcgi-starter.master index 92edf86c5..679f1b21a 100644 --- a/server/conf/php-fcgi-starter.master +++ b/server/conf/php-fcgi-starter.master @@ -9,6 +9,9 @@ export PHP_DOCUMENT_ROOT # export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS= export PHP_FCGI_MAX_REQUESTS +export TMP=/tmp +export TMPDIR=/tmp +export TEMP=/tmp exec \ -d open_basedir="" \ -d disable_functions="" \ diff --git a/server/conf/php_fpm_pool.conf.master b/server/conf/php_fpm_pool.conf.master index 7f5c8e13c..d7a34786f 100644 --- a/server/conf/php_fpm_pool.conf.master +++ b/server/conf/php_fpm_pool.conf.master @@ -28,6 +28,10 @@ pm.max_requests = chdir = / +env[TMP] = /tmp +env[TMPDIR] = /tmp +env[TEMP] = /tmp + php_admin_value[open_basedir] = php_admin_value[session.save_path] = /tmp diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 955b18a31..e7a50356a 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -204,6 +204,9 @@ # mod_php enabled AddType application/x-httpd-php .php .php3 .php4 .php5 + SetEnv TMP /tmp + SetEnv TMPDIR /tmp + SetEnv TEMP /tmp php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@" php_admin_value upload_tmp_dir /tmp php_admin_value session.save_path /tmp -- GitLab From 7255ec928b1beb0f29838a1a8a4b9fe79afa641c Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 2 Dec 2014 08:25:09 +0100 Subject: [PATCH 020/287] increased default dkim-strength from 1024 bits to 2048 --- interface/web/admin/form/server_config.tform.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index debceae71..fb9aeae09 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -320,8 +320,8 @@ $form["tabs"]['mail'] = array( 'dkim_strength' => array( 'datatype' => 'INTEGER', 'formtype' => 'SELECT', - 'default' => '1024', - 'value' => array('1024' => 'normal (1024)', '2048' => 'strong (2048)', '4096' => 'very strong (4096)') + 'default' => '2048', + 'value' => array('1024' => 'week (1024)', '2048' => 'normal (2048)', '4096' => 'strong (4096)') ), 'relayhost_password' => array( 'datatype' => 'VARCHAR', -- GitLab From 378d8326bfb5b5713caf74c370dd14fd547f9c21 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 2 Dec 2014 08:27:06 +0100 Subject: [PATCH 021/287] disallow spf, dkim, and dmarc-records when editing / creating a TXT record --- interface/web/dns/form/dns_txt.tform.php | 31 ++++++++++++++--------- interface/web/dns/lib/lang/ar_dns_txt.lng | 29 +++++++++++---------- interface/web/dns/lib/lang/bg_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/br_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/cz_dns_txt.lng | 4 ++- interface/web/dns/lib/lang/de_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/el_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/en_dns_txt.lng | 5 +++- interface/web/dns/lib/lang/es_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/fi_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/fr_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/hr_dns_txt.lng | 5 ++-- interface/web/dns/lib/lang/hu_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/id_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/it_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/ja_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/nl_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/pl_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/pt_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/ro_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/ru_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/se_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/sk_dns_txt.lng | 3 +++ interface/web/dns/lib/lang/tr_dns_txt.lng | 3 +++ 24 files changed, 102 insertions(+), 29 deletions(-) diff --git a/interface/web/dns/form/dns_txt.tform.php b/interface/web/dns/form/dns_txt.tform.php index a4b7d4073..6cfb3450d 100644 --- a/interface/web/dns/form/dns_txt.tform.php +++ b/interface/web/dns/form/dns_txt.tform.php @@ -105,24 +105,31 @@ $form["tabs"]['dns'] = array ( 'data' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', - 'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY', - 'errmsg'=> 'data_error_empty'), + 'validators' => array ( + 0 => array ( + 'type' => 'NOTEMPTY', + 'errmsg'=> 'data_error_empty' + ), + 1 => array ( + 'type' => 'REGEX', + 'regex' => "/^((?!v=DKIM).)*$/s", + 'errmsg'=> 'invalid_type_dkim' + ), + 2 => array ( + 'type' => 'REGEX', + 'regex' => "/^((?!v=DMARC).)*$/s", + 'errmsg'=> 'invalid_type_dmarc'), + 3 => array ( + 'type' => 'REGEX', + 'regex' => "/^((?!v=spf).)*$/s", + 'errmsg'=> 'invalid_type_spf' + ), ), 'default' => '', 'value' => '', 'width' => '30', 'maxlength' => '255' ), - /* - 'aux' => array ( - 'datatype' => 'INTEGER', - 'formtype' => 'TEXT', - 'default' => '0', - 'value' => '', - 'width' => '10', - 'maxlength' => '10' - ), - */ 'ttl' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', diff --git a/interface/web/dns/lib/lang/ar_dns_txt.lng b/interface/web/dns/lib/lang/ar_dns_txt.lng index 31da6ebf1..658b0ddf8 100644 --- a/interface/web/dns/lib/lang/ar_dns_txt.lng +++ b/interface/web/dns/lib/lang/ar_dns_txt.lng @@ -1,16 +1,19 @@ diff --git a/interface/web/dns/lib/lang/bg_dns_txt.lng b/interface/web/dns/lib/lang/bg_dns_txt.lng index 020429636..9d3dd134c 100644 --- a/interface/web/dns/lib/lang/bg_dns_txt.lng +++ b/interface/web/dns/lib/lang/bg_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'The hostname has the wrong format.'; $wb['data_error_empty'] = 'Text empty'; $wb['data_error_regex'] = 'Text format invalid'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/br_dns_txt.lng b/interface/web/dns/lib/lang/br_dns_txt.lng index 31f0a6df9..64003f146 100644 --- a/interface/web/dns/lib/lang/br_dns_txt.lng +++ b/interface/web/dns/lib/lang/br_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Hostname tem um formato inválido.'; $wb['data_error_empty'] = 'Endereço IP em branco'; $wb['data_error_regex'] = 'Endereço IP formato inválido'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/cz_dns_txt.lng b/interface/web/dns/lib/lang/cz_dns_txt.lng index faf31816d..bfaa34e3a 100644 --- a/interface/web/dns/lib/lang/cz_dns_txt.lng +++ b/interface/web/dns/lib/lang/cz_dns_txt.lng @@ -13,5 +13,7 @@ $wb['name_error_regex'] = 'Hostname má chybný formát.'; $wb['data_error_empty'] = 'Text je prázdný'; $wb['data_error_regex'] = 'Text má chybný formát'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> - diff --git a/interface/web/dns/lib/lang/de_dns_txt.lng b/interface/web/dns/lib/lang/de_dns_txt.lng index a40fb56fc..23f4f3097 100644 --- a/interface/web/dns/lib/lang/de_dns_txt.lng +++ b/interface/web/dns/lib/lang/de_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Der Hostname hat das falsche Format.'; $wb['data_error_empty'] = 'Text ist leer'; $wb['data_error_regex'] = 'Textformat ungültig'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM ist nicht zulässig. Bitte den DKIM-Button nutzen'; +$wb['invalid_type_dmarc'] = 'DMARC ist nicht zulässig. Bitte den DMARC-Button nutzen'; +$wb['invalid_type_spf'] = 'SPF ist nicht zulässig. Bitte den SPF-Button nutzen'; ?> diff --git a/interface/web/dns/lib/lang/el_dns_txt.lng b/interface/web/dns/lib/lang/el_dns_txt.lng index b2ea2d521..f0915d588 100644 --- a/interface/web/dns/lib/lang/el_dns_txt.lng +++ b/interface/web/dns/lib/lang/el_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Το hostname δεν έχει σωστή μορφοπ $wb['data_error_empty'] = 'Το κείμενο δεν έχει οριστεί'; $wb['data_error_regex'] = 'Κείμενο με μη έγκυρη μορφοποίηση'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/en_dns_txt.lng b/interface/web/dns/lib/lang/en_dns_txt.lng index b70b8b19d..658b0ddf8 100644 --- a/interface/web/dns/lib/lang/en_dns_txt.lng +++ b/interface/web/dns/lib/lang/en_dns_txt.lng @@ -13,4 +13,7 @@ $wb["name_error_regex"] = 'The hostname has the wrong format.'; $wb["data_error_empty"] = 'Text empty'; $wb["data_error_regex"] = 'Text format invalid'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; -?> \ No newline at end of file +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; +?> diff --git a/interface/web/dns/lib/lang/es_dns_txt.lng b/interface/web/dns/lib/lang/es_dns_txt.lng index 385509641..61fcf7586 100644 --- a/interface/web/dns/lib/lang/es_dns_txt.lng +++ b/interface/web/dns/lib/lang/es_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'El formato del nombre de la máquina es incorrecto.'; $wb['data_error_empty'] = 'Texto vacío.'; $wb['data_error_regex'] = 'Formato de texto no válido'; $wb['ttl_range_error'] = 'TTL mínimo es 60 segundos'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/fi_dns_txt.lng b/interface/web/dns/lib/lang/fi_dns_txt.lng index c321dccc8..206004057 100755 --- a/interface/web/dns/lib/lang/fi_dns_txt.lng +++ b/interface/web/dns/lib/lang/fi_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Verkkotunnus on vääränlainen.'; $wb['data_error_empty'] = 'Tekstikenttä on tyhjä'; $wb['data_error_regex'] = 'Tekstikenttä on vääränlainen'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/fr_dns_txt.lng b/interface/web/dns/lib/lang/fr_dns_txt.lng index 829c4fcf0..333dd30d9 100644 --- a/interface/web/dns/lib/lang/fr_dns_txt.lng +++ b/interface/web/dns/lib/lang/fr_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Le format du nom d\'hôte est invalide.'; $wb['data_error_empty'] = 'Le texte est vide'; $wb['data_error_regex'] = 'Le format du texte est invalide'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/hr_dns_txt.lng b/interface/web/dns/lib/lang/hr_dns_txt.lng index 88bb5e15e..349f9f7ca 100644 --- a/interface/web/dns/lib/lang/hr_dns_txt.lng +++ b/interface/web/dns/lib/lang/hr_dns_txt.lng @@ -13,6 +13,7 @@ $wb['name_error_regex'] = 'Naziv hosta je u pogrešnom formatu.'; $wb['data_error_empty'] = 'TXT polje je prazno'; $wb['data_error_regex'] = 'Neispravan format TXT zapisa'; $wb['ttl_range_error'] = 'Minimalno TTL vrijeme je 60 sekundi.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> - - diff --git a/interface/web/dns/lib/lang/hu_dns_txt.lng b/interface/web/dns/lib/lang/hu_dns_txt.lng index 97d5d293a..67b57cdb9 100644 --- a/interface/web/dns/lib/lang/hu_dns_txt.lng +++ b/interface/web/dns/lib/lang/hu_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'The hostname has the wrong format.'; $wb['data_error_empty'] = 'Text empty'; $wb['data_error_regex'] = 'Text format invalid'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/id_dns_txt.lng b/interface/web/dns/lib/lang/id_dns_txt.lng index cf4660f64..b6c2647bd 100644 --- a/interface/web/dns/lib/lang/id_dns_txt.lng +++ b/interface/web/dns/lib/lang/id_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Format nama host salah.'; $wb['data_error_empty'] = 'Teks kosong'; $wb['data_error_regex'] = 'Format teks tidak valid'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/it_dns_txt.lng b/interface/web/dns/lib/lang/it_dns_txt.lng index 31da6ebf1..ecbb5215c 100644 --- a/interface/web/dns/lib/lang/it_dns_txt.lng +++ b/interface/web/dns/lib/lang/it_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'The hostname has the wrong format.'; $wb['data_error_empty'] = 'Text empty'; $wb['data_error_regex'] = 'Text format invalid'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/ja_dns_txt.lng b/interface/web/dns/lib/lang/ja_dns_txt.lng index 6ef505c4a..a24217f9b 100644 --- a/interface/web/dns/lib/lang/ja_dns_txt.lng +++ b/interface/web/dns/lib/lang/ja_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'ホスト名の形式が不正です。'; $wb['data_error_empty'] = 'TXT を入力してください。'; $wb['data_error_regex'] = 'TXT の形式が不正です。'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/nl_dns_txt.lng b/interface/web/dns/lib/lang/nl_dns_txt.lng index b89d80249..1787a09a2 100644 --- a/interface/web/dns/lib/lang/nl_dns_txt.lng +++ b/interface/web/dns/lib/lang/nl_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'De hostnaam heeft een onjuist formaat.'; $wb['data_error_empty'] = 'Tekst is niet ingvuld'; $wb['data_error_regex'] = 'Tekst formaat ongeldig'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/pl_dns_txt.lng b/interface/web/dns/lib/lang/pl_dns_txt.lng index 09214f789..fbe7a18f1 100644 --- a/interface/web/dns/lib/lang/pl_dns_txt.lng +++ b/interface/web/dns/lib/lang/pl_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Nazwa serwera ma zły format.'; $wb['data_error_empty'] = 'Tekst jest pusty.'; $wb['data_error_regex'] = 'Tekst ma zły format.'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/pt_dns_txt.lng b/interface/web/dns/lib/lang/pt_dns_txt.lng index dbc200d71..78b5eaf0b 100644 --- a/interface/web/dns/lib/lang/pt_dns_txt.lng +++ b/interface/web/dns/lib/lang/pt_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Hostname tem um formato inválido.'; $wb['data_error_empty'] = 'Endereço-IP em branco'; $wb['data_error_regex'] = 'Endereço-IP formato inválido'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/ro_dns_txt.lng b/interface/web/dns/lib/lang/ro_dns_txt.lng index 4aba1a549..737f7e26d 100644 --- a/interface/web/dns/lib/lang/ro_dns_txt.lng +++ b/interface/web/dns/lib/lang/ro_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Hostname in format gresit'; $wb['data_error_empty'] = 'Text necompletat'; $wb['data_error_regex'] = 'Format text invalid'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/ru_dns_txt.lng b/interface/web/dns/lib/lang/ru_dns_txt.lng index 5656b6379..aecade33b 100644 --- a/interface/web/dns/lib/lang/ru_dns_txt.lng +++ b/interface/web/dns/lib/lang/ru_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Имя узла имеет неправильный $wb['data_error_empty'] = 'Текст пустой'; $wb['data_error_regex'] = 'Формат неправилен'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/se_dns_txt.lng b/interface/web/dns/lib/lang/se_dns_txt.lng index 31da6ebf1..ecbb5215c 100644 --- a/interface/web/dns/lib/lang/se_dns_txt.lng +++ b/interface/web/dns/lib/lang/se_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'The hostname has the wrong format.'; $wb['data_error_empty'] = 'Text empty'; $wb['data_error_regex'] = 'Text format invalid'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/sk_dns_txt.lng b/interface/web/dns/lib/lang/sk_dns_txt.lng index 6086b390c..80686d9c9 100644 --- a/interface/web/dns/lib/lang/sk_dns_txt.lng +++ b/interface/web/dns/lib/lang/sk_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Hostname má zlý formát.'; $wb['data_error_empty'] = 'Text je prázdny'; $wb['data_error_regex'] = 'Text má zlý formát'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> diff --git a/interface/web/dns/lib/lang/tr_dns_txt.lng b/interface/web/dns/lib/lang/tr_dns_txt.lng index 48de6cd48..372afe94c 100644 --- a/interface/web/dns/lib/lang/tr_dns_txt.lng +++ b/interface/web/dns/lib/lang/tr_dns_txt.lng @@ -13,4 +13,7 @@ $wb['name_error_regex'] = 'Hostname yanlış formatta.'; $wb['data_error_empty'] = 'Metin boş'; $wb['data_error_regex'] = 'Metin geçersiz formatta'; $wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.'; +$wb['invalid_type_dkim'] = 'DKIM is not allowed. Use the DKIM button'; +$wb['invalid_type_dmarc'] = 'DMARC is not allowed. Use the DMARC button'; +$wb['invalid_type_spf'] = 'SPF is not allowed. Use the SPF button.'; ?> -- GitLab From fed17de04a7fd5f1896cbed634005cd6060b63a8 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 2 Dec 2014 08:39:39 +0100 Subject: [PATCH 022/287] SPF-Support - FS#1644 - DNS SPF Record, FS#3327 - SPF field, and FS#3733 - SPF-Record in the DNS --- interface/web/dns/dns_spf_edit.php | 269 ++++++++++++++++++++++ interface/web/dns/form/dns_spf.tform.php | 164 +++++++++++++ interface/web/dns/lib/lang/ar_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/bg_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/br_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/cz_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/de_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/el_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/en_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/es_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/fi_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/fr_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/hr_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/hu_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/id_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/it_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/ja_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/nl_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/pl_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/pt_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/ro_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/ru_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/se_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/sk_dns_spf.lng | 25 ++ interface/web/dns/lib/lang/tr_dns_spf.lng | 25 ++ 25 files changed, 1008 insertions(+) create mode 100644 interface/web/dns/dns_spf_edit.php create mode 100644 interface/web/dns/form/dns_spf.tform.php create mode 100644 interface/web/dns/lib/lang/ar_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/bg_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/br_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/cz_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/de_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/el_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/en_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/es_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/fi_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/fr_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/hr_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/hu_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/id_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/it_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/ja_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/nl_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/pl_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/pt_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/ro_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/ru_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/se_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/sk_dns_spf.lng create mode 100644 interface/web/dns/lib/lang/tr_dns_spf.lng diff --git a/interface/web/dns/dns_spf_edit.php b/interface/web/dns/dns_spf_edit.php new file mode 100644 index 000000000..32955c4b8 --- /dev/null +++ b/interface/web/dns/dns_spf_edit.php @@ -0,0 +1,269 @@ +auth->check_module_permissions('dns'); + +// Loading classes +$app->uses('tpl,tform,tform_actions,validate_dns'); +$app->load('tform_actions'); + +class page_action extends tform_actions { + + function onShowNew() { + global $app, $conf; + // we will check only users, not admins + if($_SESSION["s"]["user"]["typ"] == 'user') { + + // Get the limits of the client + $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); + $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = =", $client_group_id); + + // Check if the user may add another mailbox. + if($client["limit_dns_record"] >= 0) { + $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); + if($tmp["number"] >= $client["limit_dns_record"]) { + $app->error($app->tform->wordbook["limit_dns_record_txt"]); + } + } + } + + parent::onShowNew(); + } + + function onShowEnd() { + global $app, $conf; + + $zone = $app->functions->intval($_GET['zone']); + + //* check for an existing spf-record + $sql = "SELECT data, active FROM dns_rr WHERE data LIKE 'v=spf1%' AND zone = ? AND ?"; + $rec = $app->db->queryOneRecord($sql, $zone, $app->tform->getAuthSQL('r')); + if ( isset($rec) && !empty($rec) ) { + $this->id = 1; + $old_data = strtolower($rec['data']); + + $app->tpl->setVar("data", $old_data); + if ($rec['active'] == 'Y') $app->tpl->setVar("active", "CHECKED"); else $app->tpl->setVar("active", "UNCHECKED"); + + $spf_hostname = ''; + $spf_ip = ''; + $spf_domain = ''; + $spf_mechanism = ''; + + // browse through data + $temp = explode(' ', $old_data); + foreach ($temp as $part) { + if ($part == 'a') $app->tpl->setVar("spf_a_active", "CHECKED"); + if ($part == 'mx') $app->tpl->setVar("spf_mx_active", "CHECKED"); + if (preg_match("/^ip(4|6):/", $part)) $spf_ip .= str_replace(array('ip4:','ip6:'), '', $part) . ' '; + if (preg_match("/^a:/", $part)) $spf_hostname .= str_replace('a:', '', $part) . ' '; + if (preg_match("/^\\??include/", $part)) $spf_domain .= str_replace(array('include:', '?'), '', $part) . ' '; + } + unset($temp); + $spf_ip = rtrim($spf_ip); + $spf_hostname = rtrim($spf_hostname); + $spf_domain = rtrim($spf_domain); + $spf_mechanism = substr($rec['data'], -4, 1); + } + + //set html-values + $app->tpl->setVar("spf_ip", $spf_ip); + $app->tpl->setVar("spf_hostname", $spf_hostname); + $app->tpl->setVar("spf_domain", $spf_domain); + //create spf-mechanism-list + $spf_mechanism_value = array( + '+' => 'spf_mechanism_pass_txt', + '-' => 'spf_mechanism_fail_txt', + '~' => 'spf_mechanism_softfail_txt', + '?' => 'spf_mechanism_neutral_txt' + ); + $spf_mechanism_list=''; + foreach($spf_mechanism_value as $value => $txt) { + $selected = @($spf_mechanism == $value)?' selected':''; + $spf_mechanism_list .= "\r\n"; + } + $app->tpl->setVar('spf_mechanism', $spf_mechanism_list); + + parent::onShowEnd(); + + } + + function onSubmit() { + global $app, $conf; + + + // Get the parent soa record of the domain + $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND ?", $app->functions->intval($_POST["zone"]), $app->tform->getAuthSQL('r')); + + // Check if Domain belongs to user + if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; + + // Check the client limits, if user is not the admin + if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin + // Get the limits of the client + $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); + $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); + + // Check if the user may add another mailbox. + if($this->id == 0 && $client["limit_dns_record"] >= 0) { + $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); + if($tmp["number"] >= $client["limit_dns_record"]) { + $app->error($app->tform->wordbook["limit_dns_record_txt"]); + } + } + } // end if user is not admin + + //create spf-record + if (!empty($this->dataRecord['spf_mx'])) { + $spf_record[] = 'mx'; + } + if (!empty($this->dataRecord['spf_a'])) { + $spf_record[] = 'a'; + } + $spf_ip = trim($this->dataRecord['spf_ip']); + if (!empty($spf_ip)) { + $rec = split(' ', $spf_ip); + foreach ($rec as $ip) { + $temp_ip = explode('/', $ip); + if (filter_var($temp_ip[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { + $temp = 'ip4:' . $temp_ip[0]; + if (isset($temp_ip[1])) $temp .= '/' . $temp_ip[1]; + $spf_record[] = $temp; + unset($temp); + } + elseif (filter_var($temp_ip[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { + $temp = 'ip6:' . $temp_ip[0]; + if (isset($temp_ip[1])) $temp .= '/' . $temp_ip[1]; + $spf_record[] = $temp; + unset($temp); + } + else { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; + $app->tform->errorMessage .= $app->tform->wordbook["spf_invalid_ip_txt"]. $temp_ip[0]; + if (isset( $temp_ip[1])) $app->tform->errorMessage .= "/".$temp_ip[1]; + } + } + } + $spf_hostname = trim($this->dataRecord['spf_hostname']); + if (!empty($spf_hostname)) { + $rec = split(' ', $spf_hostname); + foreach ($rec as $hostname) { + if (preg_match('/^[a-zA-Z0-9\\.\\-\\*]{0,64}$/', $hostname)) + $spf_record[] = 'a:' . $hostname; + else { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage .= '
' . $app->tform->wordbook["spf_invalid_hostname_txt"]. $hostname; + $app->tform->errorMessage .= $app->tform->wordbook["spf_invalid_hostname_txt"]. $hostname; + } + } + unset($rec); + } + $spf_domain = trim($this->dataRecord['spf_domain']); + if (!empty($spf_domain)) { + $rec = split(' ', $spf_domain); + foreach ($rec as $domain) { + if (preg_match('/^[a-zA-Z0-9\\.\\-\\*]{0,64}$/', $domain)) + $spf_record[] = 'include:' . $domain; + else { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage .= '
' . $app->tform->wordbook["spf_invalid_domain_txt"]. $domain; + $app->tform->errorMessage .= $app->tform->wordbook["spf_invalid_domain_txt"]. $domain; + } + } + } + + $temp = implode(' ', $spf_record);unset($spf_record); + if (!empty($temp)) + $this->dataRecord['data'] = 'v=spf1 ' . $temp . ' ' . $this->dataRecord['spf_mechanism'] . 'all'; + else $this->dataRecord['data'] = 'v=spf1 ' . $this->dataRecord['spf_mechanism'] . 'all'; + unset($temp); + + $this->dataRecord['name'] = $soa['origin']; + if (isset($this->dataRecord['active'])) $this->dataRecord['active'] = 'Y'; + + // Set the server ID of the rr record to the same server ID as the parent record. + $this->dataRecord["server_id"] = $soa["server_id"]; + + // Update the serial number and timestamp of the RR record + $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); + $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); + $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); + + // always update an existing entry + $check=$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ? AND type = ? AND data LIKE 'v=spf1%' AND name = ?", $this->dataRecord["zone"], $this->dataRecord["type"], $this->dataRecord['name'].'.'); + $this->id = $check['id']; + + if (!isset($this->dataRecord['active'])) $this->dataRecord['active'] = 'N'; + + parent::onSubmit(); + } + + function onAfterInsert() { + global $app, $conf; + + //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record + $soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = ? AND ?", $app->functions->intval($this->dataRecord["zone"]), $app->tform->getAuthSQL('r')); + $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + + //* Update the serial number of the SOA record + $soa_id = $app->functions->intval($_POST["zone"]); + $serial = $app->validate_dns->increase_serial($soa["serial"]); + $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + + } + + function onAfterUpdate() { + global $app, $conf; + + //* Update the serial number of the SOA record + $soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = ? AND ?", $app->functions->intval($this->dataRecord["zone"]), $app->tform->getAuthSQL('r')); + $soa_id = $app->functions->intval($_POST["zone"]); + $serial = $app->validate_dns->increase_serial($soa["serial"]); + $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + } + +} + +$page = new page_action; +$page->onLoad(); + +?> diff --git a/interface/web/dns/form/dns_spf.tform.php b/interface/web/dns/form/dns_spf.tform.php new file mode 100644 index 000000000..00ccb7628 --- /dev/null +++ b/interface/web/dns/form/dns_spf.tform.php @@ -0,0 +1,164 @@ + 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"]['dns'] = array ( + 'title' => "DNS SPF", + 'width' => 100, + 'template' => "templates/dns_spf_edit.htm", + 'fields' => array ( + //################################# + // Begin Datatable fields + //################################# + 'server_id' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'zone' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'default' => @$app->functions->intval($_REQUEST["zone"]), + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'name' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'IDNTOASCII'), + 1 => array( 'event' => 'SHOW', + 'type' => 'IDNTOUTF8'), + 2 => array( 'event' => 'SAVE', + 'type' => 'TOLOWER') + ), + 'validators' => array ( 0 => array ( 'type' => 'REGEX', + 'regex' => '/^[a-zA-Z0-9\.\-\_]{0,255}$/', + 'errmsg'=> 'name_error_regex'), + ), + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'type' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => 'TXT', + 'value' => '', + 'width' => '5', + 'maxlength' => '5' + ), + 'data' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + /* + 'aux' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'default' => '0', + 'value' => '', + 'width' => '10', + 'maxlength' => '10' + ), + */ + 'ttl' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'RANGE', + 'range' => '60:', + 'errmsg'=> 'ttl_range_error'), + ), + 'default' => '86400', + 'value' => '', + 'width' => '10', + 'maxlength' => '10' + ), + 'active' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'Y', + ), + 'stamp' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'serial' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '10', + 'maxlength' => '10' + ), + //################################# + // End Datatable fields + //################################# + ) +); + + + +?> diff --git a/interface/web/dns/lib/lang/ar_dns_spf.lng b/interface/web/dns/lib/lang/ar_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/ar_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/bg_dns_spf.lng b/interface/web/dns/lib/lang/bg_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/bg_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/br_dns_spf.lng b/interface/web/dns/lib/lang/br_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/br_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/cz_dns_spf.lng b/interface/web/dns/lib/lang/cz_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/cz_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/de_dns_spf.lng b/interface/web/dns/lib/lang/de_dns_spf.lng new file mode 100644 index 000000000..9ab52dc65 --- /dev/null +++ b/interface/web/dns/lib/lang/de_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/el_dns_spf.lng b/interface/web/dns/lib/lang/el_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/el_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/en_dns_spf.lng b/interface/web/dns/lib/lang/en_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/en_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/es_dns_spf.lng b/interface/web/dns/lib/lang/es_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/es_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/fi_dns_spf.lng b/interface/web/dns/lib/lang/fi_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/fi_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/fr_dns_spf.lng b/interface/web/dns/lib/lang/fr_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/fr_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/hr_dns_spf.lng b/interface/web/dns/lib/lang/hr_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/hr_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/hu_dns_spf.lng b/interface/web/dns/lib/lang/hu_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/hu_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/id_dns_spf.lng b/interface/web/dns/lib/lang/id_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/id_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/it_dns_spf.lng b/interface/web/dns/lib/lang/it_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/it_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/ja_dns_spf.lng b/interface/web/dns/lib/lang/ja_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/ja_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/nl_dns_spf.lng b/interface/web/dns/lib/lang/nl_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/nl_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/pl_dns_spf.lng b/interface/web/dns/lib/lang/pl_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/pl_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/pt_dns_spf.lng b/interface/web/dns/lib/lang/pt_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/pt_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/ro_dns_spf.lng b/interface/web/dns/lib/lang/ro_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/ro_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/ru_dns_spf.lng b/interface/web/dns/lib/lang/ru_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/ru_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/se_dns_spf.lng b/interface/web/dns/lib/lang/se_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/se_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/sk_dns_spf.lng b/interface/web/dns/lib/lang/sk_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/sk_dns_spf.lng @@ -0,0 +1,25 @@ + diff --git a/interface/web/dns/lib/lang/tr_dns_spf.lng b/interface/web/dns/lib/lang/tr_dns_spf.lng new file mode 100644 index 000000000..8a1a611c2 --- /dev/null +++ b/interface/web/dns/lib/lang/tr_dns_spf.lng @@ -0,0 +1,25 @@ + -- GitLab From 4664a295e13ac95ffe280e955af0721e82422e24 Mon Sep 17 00:00:00 2001 From: Falko Timme Date: Thu, 4 Dec 2014 13:54:17 +0100 Subject: [PATCH 023/287] - SSH users cannot be deleted if the web site uses PHP-FPM ("userdel: user ssh_test is currently used by process 2890"). Fixed this by stopping PHP-FPM before user deletion and starting it again afterwards. --- .../shelluser_base_plugin.inc.php | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/server/plugins-available/shelluser_base_plugin.inc.php b/server/plugins-available/shelluser_base_plugin.inc.php index e19796cfc..90e10dd84 100755 --- a/server/plugins-available/shelluser_base_plugin.inc.php +++ b/server/plugins-available/shelluser_base_plugin.inc.php @@ -239,7 +239,7 @@ class shelluser_base_plugin { function delete($event_name, $data) { global $app, $conf; - $app->uses('system,getconf'); + $app->uses('system,getconf,services'); $security_config = $app->getconf->get_security_config('permissions'); if($security_config['allow_shell_user'] != 'yes') { @@ -251,12 +251,12 @@ class shelluser_base_plugin { // Get the UID of the user $userid = intval($app->system->getuid($data['old']['username'])); if($userid > $this->min_uid) { + $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($data['old']['parent_domain_id'])); + // check if we have to delete the dir $check = $app->db->queryOneRecord('SELECT shell_user_id FROM `shell_user` WHERE `dir` = \'' . $app->db->quote($data['old']['dir']) . '\''); if(!$check && is_dir($data['old']['dir'])) { - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($data['old']['parent_domain_id'])); - $app->system->web_folder_protection($web['document_root'], false); // delete dir @@ -292,10 +292,33 @@ class shelluser_base_plugin { // We delete only non jailkit users, jailkit users will be deleted by the jailkit plugin. if ($data['old']['chroot'] != "jailkit") { + // if this web uses PHP-FPM, that PPH-FPM service must be stopped before we can delete this user + if($web['php'] == 'php-fpm'){ + if(trim($web['fastcgi_php_version']) != ''){ + $default_php_fpm = false; + list($custom_php_fpm_name, $custom_php_fpm_init_script, $custom_php_fpm_ini_dir, $custom_php_fpm_pool_dir) = explode(':', trim($web['fastcgi_php_version'])); + } else { + $default_php_fpm = true; + } + $web_config = $app->getconf->get_server_config($conf["server_id"], 'web'); + if(!$default_php_fpm){ + $app->services->restartService('php-fpm', 'stop:'.$custom_php_fpm_init_script); + } else { + $app->services->restartService('php-fpm', 'stop:'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); + } + } $command = 'killall -u '.escapeshellcmd($data['old']['username']).' ; userdel -f'; $command .= ' '.escapeshellcmd($data['old']['username']).' &> /dev/null'; exec($command); $app->log("Deleted shelluser: ".$data['old']['username'], LOGLEVEL_DEBUG); + // start PHP-FPM again + if($web['php'] == 'php-fpm'){ + if(!$default_php_fpm){ + $app->services->restartService('php-fpm', 'start:'.$custom_php_fpm_init_script); + } else { + $app->services->restartService('php-fpm', 'start:'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); + } + } } } else { -- GitLab From 1fa8f425b71db332a03ceef2d1e165083d0ba241 Mon Sep 17 00:00:00 2001 From: Falko Timme Date: Fri, 5 Dec 2014 23:50:34 +0100 Subject: [PATCH 024/287] - Directive snippets can now be made available to clients; clients can select an available directive snippet for a website - the appropriate snippet will then be written to the vhost configuration file. This is useful for example on nginx where clients have no access to the Options tab of a website. --- install/sql/incremental/upd_0079.sql | 2 + install/sql/ispconfig3.sql | 2 + .../classes/plugin_directive_snippets.inc.php | 72 +++++++++++++++++++ .../admin/form/directive_snippets.tform.php | 6 ++ .../admin/lib/lang/de_directive_snippets.lng | 1 + .../admin/lib/lang/en_directive_snippets.lng | 1 + .../templates/directive_snippets_edit.htm | 17 +++++ interface/web/sites/ajax_get_json.php | 11 +++ .../web/sites/form/web_vhost_domain.tform.php | 8 ++- .../lib/lang/de_web_directive_snippets.lng | 3 + .../lib/lang/en_web_directive_snippets.lng | 3 + .../templates/web_directive_snippets.htm | 14 ++++ .../sites/templates/web_vhost_domain_edit.htm | 23 +++++- interface/web/sites/web_vhost_domain_edit.php | 2 +- .../plugins-available/apache2_plugin.inc.php | 6 ++ server/plugins-available/nginx_plugin.inc.php | 11 ++- 16 files changed, 177 insertions(+), 5 deletions(-) create mode 100644 install/sql/incremental/upd_0079.sql create mode 100644 interface/lib/classes/plugin_directive_snippets.inc.php create mode 100644 interface/web/sites/lib/lang/de_web_directive_snippets.lng create mode 100644 interface/web/sites/lib/lang/en_web_directive_snippets.lng create mode 100644 interface/web/sites/templates/web_directive_snippets.htm diff --git a/install/sql/incremental/upd_0079.sql b/install/sql/incremental/upd_0079.sql new file mode 100644 index 000000000..5dd015275 --- /dev/null +++ b/install/sql/incremental/upd_0079.sql @@ -0,0 +1,2 @@ +ALTER TABLE `directive_snippets` ADD `customer_viewable` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `snippet`; +ALTER TABLE `web_domain` ADD `directive_snippets_id` int(11) unsigned NOT NULL default '0'; \ No newline at end of file diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 3f65bfe32..6af74fb98 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -429,6 +429,7 @@ CREATE TABLE IF NOT EXISTS `directive_snippets` ( `name` varchar(255) DEFAULT NULL, `type` varchar(255) DEFAULT NULL, `snippet` mediumtext, + `customer_viewable` ENUM('n','y') NOT NULL DEFAULT 'n', `active` enum('n','y') NOT NULL DEFAULT 'y', PRIMARY KEY (`directive_snippets_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; @@ -1880,6 +1881,7 @@ CREATE TABLE `web_domain` ( `rewrite_rules` mediumtext, `added_date` date NOT NULL DEFAULT '0000-00-00', `added_by` varchar(255) DEFAULT NULL, + `directive_snippets_id` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`domain_id`), UNIQUE KEY `serverdomain` ( `server_id` , `ip_address`, `domain` ) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; diff --git a/interface/lib/classes/plugin_directive_snippets.inc.php b/interface/lib/classes/plugin_directive_snippets.inc.php new file mode 100644 index 000000000..dbc7d4887 --- /dev/null +++ b/interface/lib/classes/plugin_directive_snippets.inc.php @@ -0,0 +1,72 @@ +newTemplate('templates/web_directive_snippets.htm'); + + //* Loading language file + $lng_file = "lib/lang/".$_SESSION["s"]["language"]."_web_directive_snippets.lng"; + + include $lng_file; + $listTpl->setVar($wb); + + $message = ''; + $error = ''; + + $server_type = $app->getconf->get_server_config($this->form->dataRecord['server_id'], 'web'); + $server_type = $server_type['server_type']; + $records = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND type = ? ORDER BY name ASC", $server_type); + + for ($i = 0, $c = count($records); $i < $c; $i++) + { + $records[$i]['is_selected'] = false; + + if ($this->form->dataRecord['directive_snippets_id'] === $records[$i]['directive_snippets_id']) + $records[$i]['is_selected'] = true; + } + + $listTpl->setLoop('records', $records); + + $list_name = 'directive_snippets_list'; + $_SESSION["s"]["list"][$list_name]["parent_id"] = $this->form->id; + $_SESSION["s"]["list"][$list_name]["parent_name"] = $app->tform->formDef["name"]; + $_SESSION["s"]["list"][$list_name]["parent_tab"] = $_SESSION["s"]["form"]["tab"]; + $_SESSION["s"]["list"][$list_name]["parent_script"] = $app->tform->formDef["action"]; + $_SESSION["s"]["form"]["return_to"] = $list_name; + + return $listTpl->grab(); + } + + public function onUpdate() + { + global $app, $conf; + + if (isset($this->form->dataRecord['directive_snippets_id']) && $this->form->oldDataRecord['directive_snippets_id'] !== $this->form->dataRecord['directive_snippets_id']) { + $app->db->query('UPDATE web_domain SET directive_snippets_id = ? WHERE domain_id = ?', $this->form->dataRecord['directive_snippets_id'], $this->form->id); + } + } + + public function onInsert() + { + global $app, $conf; + + if (isset($this->form->dataRecord['directive_snippets_id'])) { + $app->db->query('UPDATE web_domain SET directive_snippets_id = ? WHERE domain_id = ?', $this->form->dataRecord['directive_snippets_id'], $this->form->id); + } + } + +} +?> \ No newline at end of file diff --git a/interface/web/admin/form/directive_snippets.tform.php b/interface/web/admin/form/directive_snippets.tform.php index 2af05af6c..8db725b95 100644 --- a/interface/web/admin/form/directive_snippets.tform.php +++ b/interface/web/admin/form/directive_snippets.tform.php @@ -93,6 +93,12 @@ $form["tabs"]['directive_snippets'] = array ( 'maxlength' => '255', 'searchable' => 2 ), + 'customer_viewable' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n', 1 => 'y') + ), 'active' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', diff --git a/interface/web/admin/lib/lang/de_directive_snippets.lng b/interface/web/admin/lib/lang/de_directive_snippets.lng index 18ce2d51b..83a6b3c5f 100644 --- a/interface/web/admin/lib/lang/de_directive_snippets.lng +++ b/interface/web/admin/lib/lang/de_directive_snippets.lng @@ -7,4 +7,5 @@ $wb['active_txt'] = 'Aktiv'; $wb['directive_snippets_name_empty'] = 'Bitte geben Sie einen Namen für den Schnipsel an.'; $wb['directive_snippets_name_error_unique'] = 'Es existiert schon ein Direktiven-Schnipsel mit diesem Namen.'; $wb['variables_txt'] = 'Variablen'; +$wb['customer_viewable_txt'] = 'Sichtbar für Kunden'; ?> diff --git a/interface/web/admin/lib/lang/en_directive_snippets.lng b/interface/web/admin/lib/lang/en_directive_snippets.lng index 9d9b0ae8e..e8733cd94 100644 --- a/interface/web/admin/lib/lang/en_directive_snippets.lng +++ b/interface/web/admin/lib/lang/en_directive_snippets.lng @@ -7,4 +7,5 @@ $wb["active_txt"] = 'Active'; $wb["directive_snippets_name_empty"] = 'Please specify a name for the snippet.'; $wb["directive_snippets_name_error_unique"] = 'There is already a directive snippet with this name.'; $wb['variables_txt'] = 'Variables'; +$wb['customer_viewable_txt'] = 'Customer viewable'; ?> \ No newline at end of file diff --git a/interface/web/admin/templates/directive_snippets_edit.htm b/interface/web/admin/templates/directive_snippets_edit.htm index 7a17cb679..ca5cb9651 100644 --- a/interface/web/admin/templates/directive_snippets_edit.htm +++ b/interface/web/admin/templates/directive_snippets_edit.htm @@ -18,6 +18,12 @@
  {tmpl_var name='variables_txt'}: {DOCROOT}, {FASTCGIPASS} +
+
+

{tmpl_var name='customer_viewable_txt'}

+
+ {tmpl_var name='customer_viewable'} +

{tmpl_var name='active_txt'}

@@ -43,8 +49,19 @@ } else { jQuery('.nginx:visible').hide(); } + + if (jQuery('#type').val() != 'nginx' && jQuery('#type').val() != 'apache') { + jQuery('#customer_viewable').closest('div.ctrlHolder:visible').hide(); + }else { + jQuery('#customer_viewable').closest('div.ctrlHolder:hidden').show(); + } jQuery('#type').change(function(){ + if (jQuery(this).val() != 'nginx' && jQuery(this).val() != 'apache') { + jQuery('#customer_viewable').closest('div.ctrlHolder:visible').hide(); + } else { + jQuery('#customer_viewable').closest('div.ctrlHolder:hidden').show(); + } if(jQuery(this).val() == 'nginx'){ jQuery('.nginx:hidden').show(); } else { diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index ddf7d8550..fb2f1c093 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -190,6 +190,17 @@ if($type == 'get_use_loadindicator'){ $json .= '"}'; } +if ($type == 'getdirectivesnippet') { + $server_type = 'apache'; + $web_config = $app->getconf->get_server_config($server_id, 'web'); + if (!empty($web_config['server_type'])) + $server_type = $web_config['server_type']; + + $snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND type = ? ORDER BY name ASC", $server_type); + + $json = json_encode($snippets); +} + //} header('Content-type: application/json'); diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php index 7d50b9747..4d6b161db 100644 --- a/interface/web/sites/form/web_vhost_domain.tform.php +++ b/interface/web/sites/form/web_vhost_domain.tform.php @@ -282,7 +282,13 @@ $form["tabs"]['domain'] = array ( //################################# // ENDE Datatable fields //################################# - ) + ), + 'plugins' => array ( + // needs serverId for web.server_type + 'directive_snippets_id' => array ( + 'class' => 'plugin_directive_snippets' + ), + ) ); // add type-specific field attributes diff --git a/interface/web/sites/lib/lang/de_web_directive_snippets.lng b/interface/web/sites/lib/lang/de_web_directive_snippets.lng new file mode 100644 index 000000000..b6d898496 --- /dev/null +++ b/interface/web/sites/lib/lang/de_web_directive_snippets.lng @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/interface/web/sites/lib/lang/en_web_directive_snippets.lng b/interface/web/sites/lib/lang/en_web_directive_snippets.lng new file mode 100644 index 000000000..05a004f65 --- /dev/null +++ b/interface/web/sites/lib/lang/en_web_directive_snippets.lng @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/interface/web/sites/templates/web_directive_snippets.htm b/interface/web/sites/templates/web_directive_snippets.htm new file mode 100644 index 000000000..664a07fd5 --- /dev/null +++ b/interface/web/sites/templates/web_directive_snippets.htm @@ -0,0 +1,14 @@ +
+ + + +
\ No newline at end of file diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm index 0e0897a5c..6548e8274 100644 --- a/interface/web/sites/templates/web_vhost_domain_edit.htm +++ b/interface/web/sites/templates/web_vhost_domain_edit.htm @@ -219,6 +219,7 @@ {tmpl_var name='fastcgi_php_version'}
+ {tmpl_var name="directive_snippets_id"}

{tmpl_var name='active_txt'}

@@ -249,6 +250,7 @@ adjustForm(); reloadWebIP(); reloadFastcgiPHPVersions(); + reloadDirectiveSnippets(); }); } adjustForm(true); @@ -316,6 +318,23 @@ } }); } + + function reloadDirectiveSnippets() { + jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, type : "getdirectivesnippet"}, function(data) { + var options = ''; + for (var i = 0, len = data.length; i < len; i++) { + var isSelected = ''; + + if ($('#directive_snippets_id').val() == i + 1) { + isSelected = 'selected="selected"'; + } + + options += ''; + } + + $('#directive_snippets_id').html(options).change(); + }); + } function reloadWebIP() { loadOptionInto('ip_address','sites/ajax_get_ip.php?ip_type=IPv4&server_id='+serverId+'&client_group_id='+clientGroupId); @@ -340,9 +359,9 @@ } - jQuery('div.panel_web_domain').find('fieldset').find('input,select,button').bind('click mousedown', function(e) { e.preventDefault(); }).focus(function() { $(this).blur(); }); + jQuery('div.panel_web_domain').find('fieldset').find('input,select,button').not('#directive_snippets_id').bind('click mousedown', function(e) { e.preventDefault(); }).focus(function() { $(this).blur(); }); jQuery('#dom-edit-submit').click(function() { - submitForm('pageForm','sites/web_vhost_domain_edit.php'); + submitForm('pageForm','sites/web_vhost_domain_edit.php'); }); jQuery('#dom-edit-submit').click(function() { diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index e868ece7b..893571306 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -191,7 +191,7 @@ class page_action extends tform_actions { if($app->functions->intval($this->dataRecord["server_id"]) > 0) { // check if server is in client's servers or add it. $chk_sid = explode(',', $client['web_servers']); - if(in_array($this->dataRecord["server_id"], $client['web_servers']) == false) { + if(in_array($this->dataRecord["server_id"], explode(',', $client['web_servers'])) == false) { if($client['web_servers'] != '') $client['web_servers'] .= ','; $client['web_servers'] .= $app->functions->intval($this->dataRecord["server_id"]); } diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 2bf4dfe3a..ec98e849c 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1030,6 +1030,12 @@ class apache2_plugin { $vhost_data['custom_php_ini_dir'] = escapeshellcmd($custom_php_ini_dir); // Custom Apache directives + if(intval($data['new']['directive_snippets_id']) > 0){ + $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'apache' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); + if(isset($snippet['snippet'])){ + $vhost_data['apache_directives'] = $snippet['snippet']; + } + } // Make sure we only have Unix linebreaks $vhost_data['apache_directives'] = str_replace("\r\n", "\n", $vhost_data['apache_directives']); $vhost_data['apache_directives'] = str_replace("\r", "\n", $vhost_data['apache_directives']); diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 57044eff4..c256ae18f 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -1089,7 +1089,16 @@ class nginx_plugin { // Custom nginx directives $final_nginx_directives = array(); - $nginx_directives = $data['new']['nginx_directives']; + if(intval($data['new']['directive_snippets_id']) > 0){ + $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'nginx' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); + if(isset($snippet['snippet'])){ + $nginx_directives = $snippet['snippet']; + } else { + $nginx_directives = $data['new']['nginx_directives']; + } + } else { + $nginx_directives = $data['new']['nginx_directives']; + } // Make sure we only have Unix linebreaks $nginx_directives = str_replace("\r\n", "\n", $nginx_directives); $nginx_directives = str_replace("\r", "\n", $nginx_directives); -- GitLab From 9fd4f7393f1d72b02d7a50c11cb692e5a6b26bc1 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Sat, 6 Dec 2014 21:02:47 +0100 Subject: [PATCH 025/287] mailbackup - fixed issue with php 5.3 --- server/lib/classes/cron.d/500-backup_mail.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/lib/classes/cron.d/500-backup_mail.inc.php b/server/lib/classes/cron.d/500-backup_mail.inc.php index 2473afe26..ac937f9fc 100644 --- a/server/lib/classes/cron.d/500-backup_mail.inc.php +++ b/server/lib/classes/cron.d/500-backup_mail.inc.php @@ -75,10 +75,10 @@ class cronjob_backup_mail extends cronjob { foreach($records as $rec) { //* Do the mailbox backup if($rec['backup_interval'] == 'daily' or ($rec['backup_interval'] == 'weekly' && date('w') == 0) or ($rec['backup_interval'] == 'monthly' && date('d') == '01')) { - $email = $rec['email']; - $email=explode("@",$email)[1]; - $domain_rec=$app->db->queryOneRecord("SELECT * FROM mail_domain WHERE domain = ?", $email); - unset($email); + $temp = explode("@",$email); + $domain = $temp[1]; + unset($temp);; + $domain_rec=$app->db->queryOneRecord("SELECT * FROM mail_domain WHERE domain = ?", $domain); $mail_backup_dir = $backup_dir.'/mail'.$domain_rec['domain_id']; if(!is_dir($mail_backup_dir)) mkdir($mail_backup_dir, 0750); -- GitLab From a12b095478b49fd765967c6f3068963ac64e5e80 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Sat, 6 Dec 2014 21:14:19 +0100 Subject: [PATCH 026/287] FS#3734 - DMARC Support --- interface/web/dns/dns_dmarc_edit.php | 409 ++++++++++++++++++ interface/web/dns/form/dns_dmarc.tform.php | 164 +++++++ interface/web/dns/lib/lang/ar_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/bg_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/br_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/cz_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/de_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/el_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/en_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/es_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/fi_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/fr_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/hr_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/hu_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/id_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/it_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/ja_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/nl_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/pl_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/pt_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/ro_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/ru_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/se_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/sk_dns_dmarc.lng | 48 ++ interface/web/dns/lib/lang/tr_dns_dmarc.lng | 48 ++ .../web/dns/templates/dns_dmarc_edit.htm | 100 +++++ 26 files changed, 1777 insertions(+) create mode 100644 interface/web/dns/dns_dmarc_edit.php create mode 100644 interface/web/dns/form/dns_dmarc.tform.php create mode 100644 interface/web/dns/lib/lang/ar_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/bg_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/br_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/cz_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/de_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/el_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/en_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/es_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/fi_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/fr_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/hr_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/hu_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/id_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/it_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/ja_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/nl_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/pl_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/pt_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/ro_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/ru_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/se_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/sk_dns_dmarc.lng create mode 100644 interface/web/dns/lib/lang/tr_dns_dmarc.lng create mode 100644 interface/web/dns/templates/dns_dmarc_edit.htm diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php new file mode 100644 index 000000000..4c6402a0d --- /dev/null +++ b/interface/web/dns/dns_dmarc_edit.php @@ -0,0 +1,409 @@ +auth->check_module_permissions('dns'); + +// Loading classes +$app->uses('tpl,tform,tform_actions,validate_dns'); +$app->load('tform_actions'); + +class page_action extends tform_actions { + function onShowNew() { + global $app, $conf; + // we will check only users, not admins + if($_SESSION["s"]["user"]["typ"] == 'user') { + + // Get the limits of the client + $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); + $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); + + // Check if the user may add another mailbox. + if($client["limit_dns_record"] >= 0) { + $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); + if($tmp["number"] >= $client["limit_dns_record"]) { + $app->error($app->tform->wordbook["limit_dns_record_txt"]); + } + } + } + + parent::onShowNew(); + } + + function onShowEnd() { + global $app, $conf; + + $zone = $app->functions->intval($_GET['zone']); + // get domain-name + $sql = "SELECT * FROM dns_soa WHERE id = ? AND ?"; + $rec = $app->db->queryOneRecord($sql, $zone, $app->tform->getAuthSQL('r')); + $domain_name = rtrim($rec['origin'], '.'); + + // set defaults + $dmarc_policy = 'none'; + $dmarc_adkim = 'r'; + $dmarc_aspf = 'r'; + $dmarc_rf = 'afrf'; + $dmarc_pct = 100; + $dmarc_ri = 86400; + $dmarc_sp = 'same'; + + //* check for an existing dmarc-record + $sql = "SELECT data, active FROM dns_rr WHERE data LIKE 'v=DMARC1%' AND zone = ? AND name = ? AND ?"; + $rec = $app->db->queryOneRecord($sql, $zone, '_dmarc.'.$domain_name.'.', $app->tform->getAuthSQL('r')); + if ( isset($rec) && !empty($rec) ) { + $this->id = 1; + $old_data = strtolower($rec['data']); + $app->tpl->setVar("data", $old_data); + if ($rec['active'] == 'Y') $app->tpl->setVar("active", "CHECKED"); + $dmarc_rua = ''; + $dmarc_ruf = ''; + $dmac_rf = ''; + $dmac_rua = ''; + $dmac_ruf = ''; + // browse through data + $temp = explode('; ', $old_data); + foreach ($temp as $part) { + if (preg_match("/^p=/", $part)) $dmarc_policy = str_replace('p=', '', $part); + if (preg_match("/^rua=/", $part)) $dmarc_rua = str_replace('rua=mailto:', '', $part).' '; + if (preg_match("/^ruf=/", $part)) $dmarc_ruf = str_replace('ruf=mailto:', '', $part).' '; + if (preg_match("/^fo:/", $part)) $dmarc_fo = str_replace('fo:', '', $part); + if (preg_match("/^adkim=/", $part)) $dmarc_adkim = str_replace('adkim=', '', $part); + if (preg_match("/^aspf=/", $part)) $dmarc_aspf = str_replace('aspf=', '', $part); + if (preg_match("/^rf=/", $part)) $dmarc_rf = str_replace('rf=', '', $part); + if (preg_match("/^(afrf:iodef|iodef:afrf)$/s", $dmarc_rf)) $dmarc_rf = str_replace(':', ' ', $dmarc_rf); + if (preg_match("/^pct=/", $part)) $dmarc_pct = str_replace('pct=', '', $part); + if (preg_match("/^ri=/", $part)) $dmarc_ri = str_replace('ri=', '', $part); + } + } + + //set html-values + $app->tpl->setVar('domain', $domain_name); + + //create dmarc-policy-list + $dmarc_policy_value = array( + 'none' => 'dmarc_policy_none_txt', + 'quarantine' => 'dmarc_policy_quarantine_txt', + 'reject' => 'dmarc_policy_reject_txt', + ); + $dmarc_policy_list=''; + foreach($dmarc_policy_value as $value => $txt) { + $selected = @($dmarc_policy == $value)?' selected':''; + $dmarc_policy_list .= "\r\n"; + } + $app->tpl->setVar('dmarc_policy', $dmarc_policy_list); + + if (!empty($dmarc_rua)) $app->tpl->setVar("dmarc_rua", $dmarc_rua); + + if (!empty($dmarc_ruf)) $app->tpl->setVar("dmarc_ruf", $dmarc_ruf); + + //set dmarc-fo-options + $temp = explode(':', $dmarc_fo); + if (is_array($temp)) + foreach ($temp as $fo => $value) $app->tpl->setVar("dmarc_fo".$value, 'CHECKED'); + else + $app->tpl->setVar("dmarc_fo0", 'CHECKED'); + + unset($temp); + + //create dmarc-adkim-list + $dmarc_adkim_value = array( + 'r' => 'dmarc_adkim_r_txt', + 's' => 'dmarc_adkim_s_txt', + ); + $dmarc_adkim_list=''; + foreach($dmarc_adkim_value as $value => $txt) { + $selected = @($dmarc_adkim == $value)?' selected':''; + $dmarc_adkim_list .= "\r\n"; + } + $app->tpl->setVar('dmarc_adkim', $dmarc_adkim_list); + + //create dmarc-aspf-list + $dmarc_aspf_value = array( + 'r' => 'dmarc_aspf_r_txt', + 's' => 'dmarc_aspf_s_txt', + ); + $dmarc_aspf_list=''; + foreach($dmarc_aspf_value as $value => $txt) { + $selected = @($dmarc_aspf == $value)?' selected':''; + $dmarc_aspf_list .= "\r\n"; + } + $app->tpl->setVar('dmarc_aspf', $dmarc_aspf_list); + + if ( strpos($dmarc_rf, 'afrf') !== false ) $app->tpl->setVar("dmarc_rf_afrf", 'CHECKED'); + if ( strpos($dmarc_rf, 'iodef') !== false ) $app->tpl->setVar("dmarc_rf_iodef", 'CHECKED'); + + $app->tpl->setVar("dmarc_pct", $dmarc_pct); + + $app->tpl->setVar("dmarc_ri", $dmarc_ri); + + //create dmarc-sp-list + $dmarc_sp_value = array( + 'same' => 'dmarc_sp_same_txt', + 'none' => 'dmarc_sp_none_txt', + 'quarantine' => 'dmarc_sp_quarantine_txt', + 'reject' => 'dmarc_sp_reject_txt', + ); + $dmarc_sp_list=''; + foreach($dmarc_sp_value as $value => $txt) { + $selected = @($dmarc_sp == $value)?' selected':''; + $dmarc_sp_list .= "\r\n"; + } + $app->tpl->setVar('dmarc_sp', $dmarc_sp_list); + + parent::onShowEnd(); + + } + + function onSubmit() { + global $app, $conf; + + // Get the parent soa record of the domain + $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND ?", $_POST['zone'], $app->tform->getAuthSQL('r')); + + // Check if Domain belongs to user + if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; + + // Check the client limits, if user is not the admin + if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin + // Get the limits of the client + $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); + $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); + + // Check if the user may add another mailbox. + if($this->id == 0 && $client["limit_dns_record"] >= 0) { + $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); + if($tmp["number"] >= $client["limit_dns_record"]) { + $app->error($app->tform->wordbook["limit_dns_record_txt"]); + } + } + } // end if user is not admin + + $domain_name = rtrim($soa['origin'], '.'); + // DMARC requieres at lest a spf OR dkim-record + // abort if more than 1 active spf-records (backward-compatibility) + $sql = "SELECT * FROM dns_rr WHERE name = ? AND type='TXT' AND data like 'v=spf1%' AND active='Y'"; + $temp = $app->db->queryAllRecords($sql, $domain_name.'.'); + if (is_array($temp[1])) { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_more_spf_txt'].$email; + } + + $sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND active = 'Y' AND (data LIKE 'v=DKIM1;%' OR data LIKE 'v=spf1%')"; + $temp = $app->db->queryAllRecords($sql, '%._domainkey.'.$domain_name.'.'); + if (empty($temp)) { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_no_dkim_spf_txt'].$email; + } + unset($temp); + //TODO: should DMARC requiere DKIM and SPF to be valid? This breaks draft-kucherawy-dmarc-base-07 but makes much more sense +/* + // DMARC requieres at least one active dkim-record... + $sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND data like 'v=DKIM1;%' AND active='Y'"; + $temp = $app->db->queryOneRecord($sql, '%._domainkey.'.$domain_name.'.'); + if (!is_array($temp)) { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_no_dkim_txt'].$email; + } + unset($temp); + + // ... and dkim-signed mails to allow "policy != none" + $sql = "SELECT * FROM mail_domain WHERE domain = '".$app->db->quote($domain_name)."'"; + $temp = $app->db->queryOneRecord($sql); + if ($temp['dkim'] != 'y' && $this->dataRecord['dmarc_policy'] != 'none') { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_policy_error_txt'].$email; + } + unset($temp); + + // DMARC requieres an active spf-record + $sql = "SELECT * FROM dns_rr WHERE name = ? AND type='TXT' AND data like 'v=spf1%' AND active='Y'"; + $temp = $app->db->queryAllRecords($sql, $domain_name.'.'); + // abort if more than 1 active spf-records (backward-compatibility) + if (is_array($temp[1])) { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_more_spf_txt'].$email; + } + if (empty($temp)) { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_no_spf_txt'].$email; + } + unset($temp); +*/ + //validate dmarc_pct + $this->dataRecord['dmarc_pct'] = $app->functions->intval($this->dataRecord['dmarc_pct']); + if ($this->dataRecord['dmarc_pct'] < 0) $this->dataRecord['dmarc_pct'] = 0; + if ($this->dataRecord['dmarc_pct'] > 100) $this->dataRecord['dmarc_pct'] = 100; + + //create dmarc-record + $dmarc_record[] = 'p='.$this->dataRecord['dmarc_policy']; + + /* TODO: + draft-kucherawy-dmarc-base-07 allows multiple rua and ruf-entries + */ + $dmarc_rua = trim($this->dataRecord['dmarc_rua']); + if (!empty($dmarc_rua)) { + if (!filter_var($dmarc_rua, FILTER_VALIDATE_EMAIL)) { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_email_txt'].$dmarc_rua; + } else { + /* TODO: + allow an external report-address. this requieres changes in a remote zone. + */ + $mail_domain = explode('@', $dmarc_rua); + if ($mail_domain[1] != $domain_name) { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_domain_txt'].$dmarc_ruf.' in '.$dmarc_ruf; + } else { + $dmarc_record[] = 'rua=mailto:'.$dmarc_rua; + } + } + } + unset ($dmarc_rua); + unset ($mail_domain); + + $dmarc_ruf = trim($this->dataRecord['dmarc_ruf']); + if (!empty($dmarc_ruf)) { + if (!filter_var($dmarc_ruf, FILTER_VALIDATE_EMAIL)) { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_email_txt'].$dmarc_ruf; + } else { + /* TODO: + allow an external report-address. this requieres changes in a remote zone. + */ + $mail_domain[1] = explode('@', $dmarc_ruf); + if ($mail_domain != $domain_name) { + if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_domain_txt'].$dmarc_ruf.' in '.$dmarc_ruf; + } else { + $dmarc_record[] = 'ruf=mailto:'.$dmarc_ruf; + } + } + } + unset ($dmarc_ruf); + unset ($mail_domain); + + $fo_rec = ''; + if (isset($this->dataRecord['dmarc_fo0'])) $fo_rec[] = '0'; + if (isset($this->dataRecord['dmarc_fo1'])) $fo_rec[] = '1'; + if (isset($this->dataRecord['dmarc_fod'])) $fo_rec[] = 'd'; + if (isset($this->dataRecord['dmarc_fos'])) $fo_rec[] = 's'; + if (is_array($fo_rec) && !empty($fo_rec)) + $dmarc_record[] = 'fo:'.implode(':', $fo_rec); + + if (!empty($this->dataRecord['dmarc_adkim']) && $this->dataRecord['dmarc_adkim'] != 'r' ) + $dmarc_record[] = 'adkim='.$this->dataRecord['dmarc_adkim']; + + if (!empty($this->dataRecord['dmarc_aspf']) && $this->dataRecord['dmarc_aspf'] != 'r' ) + $dmarc_record[] = 'aspf='.$this->dataRecord['dmarc_aspf']; + + if (isset($this->dataRecord['dmarc_rf_afrf']) && isset($this->dataRecord['dmarc_rf_iodef'])) + $dmarc_record[] = 'rf=afrf:iodef'; + else { + if (isset($this->dataRecord['dmarc_rf_iodef'])) + $dmarc_record[] = 'rf=iodef'; + } + unset($fo_rec); + + if (!empty($this->dataRecord['dmarc_pct']) && $this->dataRecord['dmarc_pct'] != 100) + $dmarc_record[] = 'pct='.$this->dataRecord['dmarc_pct']; + + if (!empty($this->dataRecord['dmarc_ri']) && $this->dataRecord['dmarc_ri'] != '86400') + $dmarc_record[] = 'ri='.$this->dataRecord['dmarc_ri']; + + if (!empty($this->dataRecord['dmarc_sp']) && $this->dataRecord['dmarc_sp'] != 'same') + $dmarc_record[] = 'sp='.$this->dataRecord['dmarc_sp']; + + $temp = implode('; ', $dmarc_record); + if (!empty($temp)) + $this->dataRecord['data'] = 'v=DMARC1; ' . $temp; + else $app->tform->errorMessage .= $app->tform->wordbook["dmarc_empty_txt"]; + + $this->dataRecord['name'] = '_dmarc.' . $soa['origin']; + if (isset($this->dataRecord['active'])) $this->dataRecord['active'] = 'Y'; + + // Set the server ID of the rr record to the same server ID as the parent record. + $this->dataRecord["server_id"] = $soa["server_id"]; + + // Update the serial number and timestamp of the RR record + $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); + $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); + $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); + + // always update an existing entry + $check=$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ? AND type = ? AND data LIKE 'v=DMARC1%' AND name = ?", $this->dataRecord['zone'], $this->dataRecord['type'], $this->dataRecord['name']); + $this->id = $check['id']; + if (!isset($this->dataRecord['active'])) $this->dataRecord['active'] = 'N'; + + parent::onSubmit(); + } + + function onAfterInsert() { + global $app, $conf; + + //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record + $soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = ? AND ?", $app->functions->intval($this->dataRecord["zone"]), $app->tform->getAuthSQL('r')); + $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + + //* Update the serial number of the SOA record + $soa_id = $app->functions->intval($_POST["zone"]); + $serial = $app->validate_dns->increase_serial($soa["serial"]); + $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + + } + + function onAfterUpdate() { + global $app, $conf; + + //* Update the serial number of the SOA record + $soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = ? AND ?", $app->functions->intval($this->dataRecord["zone"]), $app->tform->getAuthSQL('r')); + $soa_id = $app->functions->intval($_POST["zone"]); + $serial = $app->validate_dns->increase_serial($soa["serial"]); + $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + } + +} + +$page = new page_action; +$page->onLoad(); + +?> diff --git a/interface/web/dns/form/dns_dmarc.tform.php b/interface/web/dns/form/dns_dmarc.tform.php new file mode 100644 index 000000000..a1ecaa40c --- /dev/null +++ b/interface/web/dns/form/dns_dmarc.tform.php @@ -0,0 +1,164 @@ + 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"]['dns'] = array ( + 'title' => "DNS DMARC", + 'width' => 100, + 'template' => "templates/dns_dmarc_edit.htm", + 'fields' => array ( + //################################# + // Begin Datatable fields + //################################# + 'server_id' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'zone' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'default' => @$app->functions->intval($_REQUEST["zone"]), + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'name' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'IDNTOASCII'), + 1 => array( 'event' => 'SHOW', + 'type' => 'IDNTOUTF8'), + 2 => array( 'event' => 'SAVE', + 'type' => 'TOLOWER') + ), + 'validators' => array ( 0 => array ( 'type' => 'REGEX', + 'regex' => '/^[a-zA-Z0-9\.\-\_]{0,255}$/', + 'errmsg'=> 'name_error_regex'), + ), + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'type' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => 'TXT', + 'value' => '', + 'width' => '5', + 'maxlength' => '5' + ), + 'data' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + /* + 'aux' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'default' => '0', + 'value' => '', + 'width' => '10', + 'maxlength' => '10' + ), + */ + 'ttl' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'validators' => array ( 0 => array ( 'type' => 'RANGE', + 'range' => '60:', + 'errmsg'=> 'ttl_range_error'), + ), + 'default' => '3600', + 'value' => '', + 'width' => '10', + 'maxlength' => '10' + ), + 'active' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'Y', + ), + 'stamp' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), + 'serial' => array ( + 'datatype' => 'INTEGER', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '10', + 'maxlength' => '10' + ), + //################################# + // End Datatable fields + //################################# + ) +); + + + +?> diff --git a/interface/web/dns/lib/lang/ar_dns_dmarc.lng b/interface/web/dns/lib/lang/ar_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/ar_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/bg_dns_dmarc.lng b/interface/web/dns/lib/lang/bg_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/bg_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/br_dns_dmarc.lng b/interface/web/dns/lib/lang/br_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/br_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/cz_dns_dmarc.lng b/interface/web/dns/lib/lang/cz_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/cz_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/de_dns_dmarc.lng b/interface/web/dns/lib/lang/de_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/de_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/el_dns_dmarc.lng b/interface/web/dns/lib/lang/el_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/el_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/en_dns_dmarc.lng b/interface/web/dns/lib/lang/en_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/en_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/es_dns_dmarc.lng b/interface/web/dns/lib/lang/es_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/es_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/fi_dns_dmarc.lng b/interface/web/dns/lib/lang/fi_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/fi_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/fr_dns_dmarc.lng b/interface/web/dns/lib/lang/fr_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/fr_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/hr_dns_dmarc.lng b/interface/web/dns/lib/lang/hr_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/hr_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/hu_dns_dmarc.lng b/interface/web/dns/lib/lang/hu_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/hu_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/id_dns_dmarc.lng b/interface/web/dns/lib/lang/id_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/id_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/it_dns_dmarc.lng b/interface/web/dns/lib/lang/it_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/it_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/ja_dns_dmarc.lng b/interface/web/dns/lib/lang/ja_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/ja_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/nl_dns_dmarc.lng b/interface/web/dns/lib/lang/nl_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/nl_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/pl_dns_dmarc.lng b/interface/web/dns/lib/lang/pl_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/pl_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/pt_dns_dmarc.lng b/interface/web/dns/lib/lang/pt_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/pt_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/ro_dns_dmarc.lng b/interface/web/dns/lib/lang/ro_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/ro_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/ru_dns_dmarc.lng b/interface/web/dns/lib/lang/ru_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/ru_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/se_dns_dmarc.lng b/interface/web/dns/lib/lang/se_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/se_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/sk_dns_dmarc.lng b/interface/web/dns/lib/lang/sk_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/sk_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/lib/lang/tr_dns_dmarc.lng b/interface/web/dns/lib/lang/tr_dns_dmarc.lng new file mode 100644 index 000000000..ac7526663 --- /dev/null +++ b/interface/web/dns/lib/lang/tr_dns_dmarc.lng @@ -0,0 +1,48 @@ + diff --git a/interface/web/dns/templates/dns_dmarc_edit.htm b/interface/web/dns/templates/dns_dmarc_edit.htm new file mode 100644 index 000000000..0f1f5b49e --- /dev/null +++ b/interface/web/dns/templates/dns_dmarc_edit.htm @@ -0,0 +1,100 @@ +

+

+ +
+
+
+
+ + +
+
+ + + {tmpl_var name='dmarc_policy_note_txt'} +
+
+ + + {tmpl_var name='dmarc_rua_note_txt'} +
+
+ + + {tmpl_var name='dmarc_ruf_note_txt'} +
+
+

{tmpl_var name='dmarc_fo_txt'}

+
+ {tmpl_var name='dmarc_fo0_txt'}
+ {tmpl_var name='dmarc_fo1_txt'}
+ {tmpl_var name='dmarc_fod_txt'}
+ {tmpl_var name='dmarc_fos_txt'} +
+
+
+ + + {tmpl_var name='dmarc_adkim_note_txt'} +
+
+ + + {tmpl_var name='dmarc_aspf_note_txt'} +
+
+

{tmpl_var name='dmarc_rf_txt'}

+
+ {tmpl_var name='dmarc_rf_afrf_txt'}
+ {tmpl_var name='dmarc_rf_iodef_txt'} +
+
+
+ + + {tmpl_var name='dmarc_pct_note_txt'} +
+
+ + + {tmpl_var name='dmarc_ri_note_txt'} +
+
+ + +
+
+ + +
+ +
+

{tmpl_var name='active_txt'}

+
+ +
+
+
+ + + + + +
+ +
+ + +
+
+ +
+ -- GitLab From 5f82eefa552d533e744160410860f80fd0b087d1 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Sat, 6 Dec 2014 21:29:31 +0100 Subject: [PATCH 027/287] updated DKIM-Record-Editor --- interface/web/dns/dns_dkim_edit.php | 33 ++++--- interface/web/dns/dns_dkim_get.php | 86 ------------------- interface/web/dns/templates/dns_dkim_edit.htm | 5 +- 3 files changed, 22 insertions(+), 102 deletions(-) delete mode 100644 interface/web/dns/dns_dkim_get.php diff --git a/interface/web/dns/dns_dkim_edit.php b/interface/web/dns/dns_dkim_edit.php index 71741d00f..41a23852c 100644 --- a/interface/web/dns/dns_dkim_edit.php +++ b/interface/web/dns/dns_dkim_edit.php @@ -70,12 +70,20 @@ class page_action extends tform_actions { } parent::onShowNew(); + + $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND ?'", $_GET['zone'], $app->tform->getAuthSQL('r')); + $sql=$app->db->queryOneRecord("SELECT dkim_public, dkim_selector FROM mail_domain WHERE domain = ? AND dkim = 'y' AND ?", substr_replace($soa['origin'],'',-1), $app->tform->getAuthSQL('r')); + $public_key=str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"),'',$sql['dkim_public']); + $app->tpl->setVar('public_key', $public_key); + $app->tpl->setVar('selector', $sql['dkim_selector']); + $app->tpl->setVar('name', $soa['origin']); + } function onSubmit() { global $app, $conf; // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->intval($_POST["zone"])); + $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND ?", $_POST["zone"], $app->tform->getAuthSQL('r')); // Check if Domain belongs to user if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; @@ -101,16 +109,15 @@ class page_action extends tform_actions { $this->dataRecord['data']='v=DKIM1; t=s; p='.$this->dataRecord['data']; $this->dataRecord['name']=$this->dataRecord['selector'].'._domainkey.'.$this->dataRecord['name']; } - // Update the serial number and timestamp of the RR record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); - $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); - $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); - - // check for duplicate entry - $check=$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ? AND type = ? AND data = ? AND name = ?", $this->dataRecord['zone'], $this->dataRecord['type'], $this->dataRecord['data'], $this->dataRecord['name']); - if ($check!='') $app->tform->errorMessage .= $app->tform->wordbook["record_exists_txt"]; - if (empty($this->dataRecord['data'])) $app->tform->errorMessage .= $app->tform->wordbook["dkim_disabled_txt"]; - + // Update the serial number and timestamp of the RR record + $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); + $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); + $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); + + // check for duplicate entry + $check=$app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ? AND type = ? AND data = ? AND name = ?", $this->dataRecord["zone"], $this->dataRecord["type"], $this->dataRecord["data"], $this->dataRecord['name']); + if ($check!='') $app->tform->errorMessage .= $app->tform->wordbook["record_exists_txt"]; + if (empty($this->dataRecord['data'])) $app->tform->errorMessage .= $app->tform->wordbook["dkim_disabled_txt"]; parent::onSubmit(); } @@ -118,7 +125,7 @@ class page_action extends tform_actions { global $app, $conf; //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record - $soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->intval($this->dataRecord['zone'])); + $soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = ? AND ?", $this->dataRecord["zone"], $app->tform->getAuthSQL('r')); $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); //* Update the serial number of the SOA record @@ -131,7 +138,7 @@ class page_action extends tform_actions { global $app, $conf; //* Update the serial number of the SOA record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->intval($this->dataRecord["zone"])); + $soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = ? AND ?", $this->dataRecord["zone"], $app->tform->getAuthSQL('r')); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); diff --git a/interface/web/dns/dns_dkim_get.php b/interface/web/dns/dns_dkim_get.php deleted file mode 100644 index 9c33ce217..000000000 --- a/interface/web/dns/dns_dkim_get.php +++ /dev/null @@ -1,86 +0,0 @@ -auth->check_module_permissions('dns'); - -global $app, $conf; - -// Loading classes -$app->uses('tform,tform_actions'); - -header('Content-Type: text/xml; charset=utf-8'); -header('Cache-Control: must-revalidate, pre-check=0, no-store, no-cache, max-age=0, post-check=0'); - -/** -* This function fix PHP's messing up POST input containing characters space, dot, -* open square bracket and others to be compatible with with the deprecated register_globals -* @return array POST -*/ - -function getRealPOST() { - $pairs = explode("&", file_get_contents("php://input")); - $vars = array(); - foreach ($pairs as $pair) { - $nv = explode("=", $pair, 2); - $name = urldecode($nv[0]); - $value = $nv[1]; - $vars[$name] = $value; - } - return $vars; -} - -$_POST=getRealPost(); - -if (ctype_digit($_POST['zone'])) { - // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? and ?'", $app->db->quote($_POST['zone']), $app->tform->getAuthSQL('r')); - - $sql=$app->db->queryOneRecord("SELECT dkim_public, dkim_selector FROM mail_domain WHERE domain = ? AND dkim = 'Y' AND ?", substr_replace($soa['origin'],'',-1), $app->tform->getAuthSQL('r')); - $public_key=str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"),'',$sql['dkim_public']); - - echo "\n"; - echo "\n"; - echo "".$public_key."\n"; - echo "".$soa['origin']."\n"; - echo "".$sql['dkim_selector']."\n"; - echo "\n"; -} -?> diff --git a/interface/web/dns/templates/dns_dkim_edit.htm b/interface/web/dns/templates/dns_dkim_edit.htm index 052f6d56a..85773a106 100644 --- a/interface/web/dns/templates/dns_dkim_edit.htm +++ b/interface/web/dns/templates/dns_dkim_edit.htm @@ -6,11 +6,11 @@
- +
- +
@@ -38,5 +38,4 @@
- -- GitLab From 9e0cb0162a2ae8a2f4b102abefe7acfb120dd175 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Sat, 6 Dec 2014 21:45:53 +0100 Subject: [PATCH 028/287] updated dkim-handling --- interface/web/js/dns_dkim.js | 72 -------- interface/web/js/mail_domain_dkim.js | 25 ++- .../web/mail/mail_domain_dkim_create.php | 96 +++++------ interface/web/mail/mail_domain_edit.php | 161 ++++++++---------- .../web/mail/templates/mail_domain_edit.htm | 2 +- 5 files changed, 131 insertions(+), 225 deletions(-) delete mode 100644 interface/web/js/dns_dkim.js mode change 100644 => 100755 interface/web/mail/mail_domain_edit.php diff --git a/interface/web/js/dns_dkim.js b/interface/web/js/dns_dkim.js deleted file mode 100644 index 58f8dcf03..000000000 --- a/interface/web/js/dns_dkim.js +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright (c) 2007 - 2013, Till Brehm, projektfarm Gmbh -Copyright (c) 2013, Florian Schaal, info@schaal-24.de -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of ISPConfig nor the names of its contributors - may be used to endorse or promote products derived from this software without - specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -This Javascript is invoked by - * dns/templates/dns_dkim_edit.htm to get the public key -*/ - var request = false; - - function setRequest(zone) { - if (window.XMLHttpRequest) {request = new XMLHttpRequest();} - else if (window.ActiveXObject) { - try {request = new ActiveXObject('Msxml2.XMLHTTP');} - catch (e) { - try {request = new ActiveXObject('Microsoft.XMLHTTP');} - catch (e) {} - } - } - if (!request) { - alert("Error creating XMLHTTP-instance"); - return false; - } else { - request.open('POST', 'dns/dns_dkim_get.php', true); - request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - request.send('&zone='+zone); - request.onreadystatechange = interpretRequest; - } - } - - function interpretRequest() { - switch (request.readyState) { - case 4: - if (request.status != 200) {alert("Request done but NOK\nError:"+request.status);} - else { - document.getElementsByName('data')[0].value = request.responseXML.getElementsByTagName('data')[0].firstChild.nodeValue; - document.getElementsByName('name')[0].value = request.responseXML.getElementsByTagName('name')[0].firstChild.nodeValue; - document.getElementsByName('selector')[0].value = request.responseXML.getElementsByTagName('selector')[0].firstChild.nodeValue; - } - break; - default: - break; - } - } - -var serverType = jQuery('#zone').val(); -setRequest(serverType); diff --git a/interface/web/js/mail_domain_dkim.js b/interface/web/js/mail_domain_dkim.js index fdc7ae571..0b9ea59fa 100755 --- a/interface/web/js/mail_domain_dkim.js +++ b/interface/web/js/mail_domain_dkim.js @@ -31,15 +31,16 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This Javascript is invoked by * mail/templates/mail_domain_edit.htm to show and/or create the key-pair */ -var request = false; - $('.subsectiontoggle').on('click', function(){ $(this).children().toggleClass('showing').end().next().slideToggle(); }); -function setRequest(action) { +var request = false; + +//function setRequest(action) { +function setRequest() { if (window.XMLHttpRequest) { - request = new XMLHttpRequest(); + request = new XMLHttpRequest(); } else if (window.ActiveXObject) { try { request = new ActiveXObject('Msxml2.XMLHTTP'); @@ -51,7 +52,6 @@ function setRequest(action) { catch (e) {} } } - if (!request) { alert("Error creating XMLHTTP-instance"); return false; @@ -64,12 +64,20 @@ function setRequest(action) { } else { var domain = jQuery('#domain').val(); } + + // we nedd the client-id to get the dkim-strength of the right mail-server + try { + var clientid = document.getElementById("client_group_id").selectedIndex; // admin and reseller + } + catch (e) { + var clientid = jQuery('#client_id').val();; // user + } + var selector=jQuery('#dkim_selector').val(); var publickey=jQuery('#dkim_public').val(); - var privatekey=encodeURIComponent(document.getElementById("dkim_private").value) request.open('POST', 'mail/mail_domain_dkim_create.php', true); request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - request.send('domain='+domain+'&action='+action+'&dkim_selector='+selector+'&dkim_public='+publickey+'&dkim_private='+privatekey); + request.send('domain='+domain+'&dkim_selector='+selector+'&dkim_public='+publickey+'&client_id='+clientid); request.onreadystatechange = interpretRequest; } } @@ -86,10 +94,9 @@ function interpretRequest() { document.getElementsByName('dns_record')[0].value = request.responseXML.getElementsByTagName('dns_record')[0].firstChild.nodeValue; } break; - default: break; } } -setRequest('show'); +//setRequest('show'); diff --git a/interface/web/mail/mail_domain_dkim_create.php b/interface/web/mail/mail_domain_dkim_create.php index 4b595969c..565546c4f 100644 --- a/interface/web/mail/mail_domain_dkim_create.php +++ b/interface/web/mail/mail_domain_dkim_create.php @@ -56,23 +56,6 @@ function validate_selector($selector) { if ( preg_match($regex, $selector) === 1 ) return true; else return false; } -/** - * This function fix PHP's messing up POST input containing characters space, dot, - * open square bracket and others to be compatible with with the deprecated register_globals - * @return array POST - */ -function getRealPOST() { - $pairs = explode("&", file_get_contents("php://input")); - $vars = array(); - foreach ($pairs as $pair) { - $nv = explode("=", $pair, 2); - $name = urldecode($nv[0]); - $value = $nv[1]; - $vars[$name] = $value; - } - return $vars; -} - /** * This function formats the public-key * @param array $pubkey @@ -101,21 +84,32 @@ function get_public_key($private_key, $dkim_strength) { * @param string $old_selector * @return string selector */ -function new_selector ($old_selector, $domain) { +function new_selector ($old_selector, $domain, $client_id = -1) { global $app; //* validate post-values if ( validate_domain($domain) && validate_selector($old_selector) ) { //* get active selectors from dns - $soa_rec = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE active = 'Y' AND origin = ?", $domain.'.'); + $soa_rec = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE active = 'Y' AND origin = ?"); if ( isset($soa_rec) && !empty($soa_rec) ) { //* check for a dkim-record in the dns? - $dns_data = $app->db->queryOneRecord("SELECT name FROM dns_rr WHERE name = ? AND active = 'Y'", $old_selector.'._domainkey.'.$domain.'.'); - $selector = str_replace( '._domainkey.'.$domain.'.', '', $dns_data['name']); - if ( $old_selector == $selector) { - $selector = substr($old_selector, 0, 53) . time(); //* add unix-timestamp to delimiter to allow old and new key in the dns - } else { - $selector = $old_selector; + $dns_data = $app->db->queryOneRecord("SELECT name FROM dns_rr WHERE name = ? AND active = 'Y''", $old_selector.'._domainkey.'.$domain.'.'); + if ( !empty($dns_data) ){ + $selector = str_replace( '._domainkey.'.$domain.'.', '', $dns_data['name']); + } else { + } + } else { //* no dns-zone found - check for existing mail-domain to create a new selector (we need this if a external dns is used) + if ( $client_id >= 0 ) { + $sql = "SELECT * from mail_domain WHERE dkim = 'y' AND domain = ? AND dkim_selector = ?"; + $maildomain = $app->db->queryOneRecord($sql, $domain, $old_selector); + if ( !empty($maildomain) ) { + $selector = $maildomain['selector']; } + } + } + if ( $old_selector == $selector) { + $selector = substr($old_selector, 0, 53) . time(); //* add unix-timestamp to delimiter to allow old and new key in the dns + } else { + $selector = $old_selector; } } else { $selector = 'invalid domain or selector'; @@ -123,35 +117,35 @@ function new_selector ($old_selector, $domain) { return $selector; } +$client_id = $app->functions->intval($_POST['client_id']); + //* get dkim-strength for server_id -//$mail_server_id = $app->functions->intval( $app->db->queryOneRecord("SELECT server_id from mail_domain WHERE domain = ?", $_POST['domain']) ); -//$dkim_strength = $app->functions->intval( $app->getconf->get_server_config($mail_server_id, 'mail')['dkim_strength'] ); -$rec = $app->db->queryOneRecord("SELECT server_id from mail_domain WHERE domain = ?", $_POST['domain']); -$mail_server_id = $app->functions->intval($rec['server_id']); -unset ($rec); -$rec = $app->getconf->get_server_config($mail_server_id, 'mail'); -$dkim_strength = $app->functions->intval($rec['dkim_strength']); -unset ($rec); -if ( empty($dkim_strength) ) $dkim_strength = 1024; - -switch ($_POST['action']) { - case 'create': /* create DKIM Private-key */ - $_POST=getRealPOST(); - $rnd_val = $dkim_strength * 10; - exec('openssl rand -out ../../temp/random-data.bin '.$rnd_val.' 2> /dev/null', $output, $result); - exec('openssl genrsa -rand ../../temp/random-data.bin '.$dkim_strength.' 2> /dev/null', $privkey, $result); - unlink('../../temp/random-data.bin'); - foreach($privkey as $values) $private_key=$private_key.$values."\n"; - //* check the selector for updated dkim-settings only - if ( isset($_POST['dkim_public']) && !empty($_POST['dkim_public']) ) $selector = new_selector($_POST['dkim_selector'], $_POST['domain']); - break; - - case 'show': /* show the DNS-Record onLoad */ - $private_key=$_POST['dkim_private']; - break; +$sql = "SELECT server_id from mail_domain WHERE domain = ?"; +$mail_server = $app->db->queryOneRecord($sql, $_POST['domain']); +if ( is_array($mail_server) ) { //* we are adding an existing mail-domain + $mail_server_id = $app->functions->intval( $mail_server['server_id'] ); +} else { + $sql = "SELECT default_mailserver FROM client WHERE client_id = ?"; + $mail_server = $app->db->queryOneRecord($sql, $client_id); + $mail_server_id = $app->functions->intval( $mail_server['default_mailserver'] ); } +unset($mail_server); +$mail_config = $app->getconf->get_server_config($mail_server_id, 'mail'); +$dkim_strength = $app->functions->intval($mail_config['dkim_strength']); +unset($mail_config); + +if ( empty($dkim_strength) ) $dkim_strength = 2048; + +$rnd_val = $dkim_strength * 10; +exec('openssl rand -out ../../temp/random-data.bin '.$rnd_val.' 2> /dev/null', $output, $result); +exec('openssl genrsa -rand ../../temp/random-data.bin '.$dkim_strength.' 2> /dev/null', $privkey, $result); +unlink("../../temp/random-data.bin"); +foreach($privkey as $values) $private_key=$private_key.$values."\n"; +//* check the selector for updated dkim-settings only +if ( isset($_POST['dkim_public']) && !empty($_POST['dkim_public']) ) $selector = new_selector($_POST['dkim_selector'], $_POST['domain'], $client_id); + +if ( !isset($public_key) ) $public_key=get_public_key($private_key, $dkim_strength); -$public_key=get_public_key($private_key, $dkim_strength); $dns_record=str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"),'',$public_key); if ( !isset($selector) ) { diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php old mode 100644 new mode 100755 index b3ea30bce..db2a8f3cc --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -206,6 +206,16 @@ class page_action extends tform_actions { $app->tpl->setVar("edit_disabled", 0); } + // load dkim-values + $sql = "SELECT domain, dkim_private, dkim_public, dkim_selector FROM mail_domain WHERE domain_id = ?"; + $rec = $app->db->queryOneRecord($sql, $app->functions->intval($_GET['id'])); + $dns_key = str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"),'',$rec['dkim_public']); + $dns_record = '.' . $rec['dkim_selector'] . '_domainkey._' . $rec['domain'] . '. 3600 TXT v=DKIM1; t=s; p=' . $dns_key; + $app->tpl->setVar('dkim_selector', $rec['dkim_selector']); + $app->tpl->setVar('dkim_private', $rec['dkim_private']); + $app->tpl->setVar('dkim_public', $rec['dkim_public']); + if (isset($rec['dkim_public'])) $app->tpl->setVar('dns_record', $dns_record); + parent::onShowEnd(); } @@ -286,36 +296,6 @@ class page_action extends tform_actions { } } // endif spamfilter policy - //* create dns-record with dkim-values if the zone exists - if ( (isset($this->dataRecord['dkim']) && $this->dataRecord['dkim'] == 'y') && (isset($this->dataRecord['active']) && $this->dataRecord['active'] == 'y') ) { - $soa_rec = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $this->dataRecord['domain'].'.'); - if ( isset($soa_rec) && !empty($soa_rec) ) { - //* check for a dkim-record in the dns - $dns_data = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE name = ? AND sys_groupid = ?", $this->dataRecord['dkim_selector'].'._domainkey.'.$this->dataRecord['domain'].'.', $_SESSION["s"]["user"]['sys_groupid']); - if ( isset($dns_data) && !empty($dns_data) ) { - $dns_data['data'] = 'v=DKIM1; t=s; p='.str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"), '', $this->dataRecord['dkim_public']); - $dns_data['active'] = 'Y'; - $dns_data['stamp'] = date('Y-m-d H:i:s'); - $dns_data['serial'] = $app->validate_dns->increase_serial($dns_data['serial']); - $app->db->datalogUpdate('dns_rr', $dns_data, 'id', $dns_data['id']); - $zone = $app->db->queryOneRecord("SELECT id, serial FROM dns_soa WHERE active = 'Y' AND id = ?", $dns_data['zone']); - $new_serial = $app->validate_dns->increase_serial($zone['serial']); - $app->db->datalogUpdate('dns_soa', "serial = '".$new_serial."'", 'id', $zone['id']); - } else { //* no dkim-record found - create new record - $dns_data = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $this->dataRecord['domain'].'.'); - $dns_data['name'] = $this->dataRecord['dkim_selector'].'._domainkey.'.$this->dataRecord['domain'].'.'; - $dns_data['type'] = 'TXT'; - $dns_data['data'] = 'v=DKIM1; t=s; p='.str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"), '', $this->dataRecord['dkim_public']); - $dns_data['aux'] = 0; - $dns_data['active'] = 'Y'; - $dns_data['stamp'] = date('Y-m-d H:i:s'); - $dns_data['serial'] = $app->validate_dns->increase_serial($dns_data['serial']); - $app->db->datalogInsert('dns_rr', $dns_data, 'id', $dns_data['zone']); - $new_serial = $app->validate_dns->increase_serial($soa_rec['serial']); - $app->db->datalogUpdate('dns_soa', "serial = '".$new_serial."'", 'id', $soa_rec['zone']); - } - } - } //* endif add dns-record } function onBeforeUpdate() { @@ -343,68 +323,6 @@ class page_action extends tform_actions { unset($rec); } - //* update dns-record when the dkim record was changed - // NOTE: only if the domain-name was not changed - - //* get domain-data from the db - $mail_data = $app->db->queryOneRecord("SELECT * FROM mail_domain WHERE domain = ?", $this->dataRecord['domain']); - - if ( isset($mail_data) && !empty($mail_data) ) { - $post_data = $mail_data; - $post_data['dkim_selector'] = $this->dataRecord['dkim_selector']; - $post_data['dkim_public'] = $this->dataRecord['dkim_public']; - $post_data['dkim_private'] = $this->dataRecord['dkim_private']; - if ( isset($this->dataRecord['dkim']) ) $post_data['dkim'] = 'y'; else $post_data['dkim'] = 'n'; - if ( isset($this->dataRecord['active']) ) $post_data['active'] = 'y'; else $post_data['active'] = 'n'; - } - - //* dkim-value changed - if ( $mail_data != $post_data ) { - //* get the dns-record for the public from the db - $dns_data = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE name = ? AND sys_groupid = ?", $mail_data['dkim_selector'].'._domainkey.'.$mail_data['domain'].'.', $mail_data['sys_groupid']); - - //* we modify dkim dns-values for active mail-domains only - if ( $post_data['active'] == 'y' ) { - if ( $post_data['dkim'] == 'n' ) { - $new_dns_data['active'] = 'N'; - } else { - if ( $post_data['dkim_selector'] != $mail_data['dkim_selector'] ) - $new_dns_data['name'] = $post_data['dkim_selector'].'._domainkey.'.$post_data['domain'].'.'; - if ( $post_data['dkim'] != $mail_data['dkim'] ) - $new_dns_data['active'] = 'Y'; - if ( $post_data['active'] != $mail_data['active'] && $post_data['active'] == 'y' ) - $new_dns_data['active'] = 'Y'; - if ( $post_data['dkim_public'] != $mail_data['dkim_public'] ) - $new_dns_data['data'] = 'v=DKIM1; t=s; p='.str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"), '', $post_data['dkim_public']); - } - } else $new_dns_data['active'] = 'N'; - - if ( isset($dns_data) && !empty($dns_data) && isset($new_dns_data) ) { - //* update dns-record - $new_dns_data['serial'] = $app->validate_dns->increase_serial($dns_data['serial']); - $app->db->datalogUpdate('dns_rr', $new_dns_data, 'id', $dns_data['id']); - $zone = $app->db->queryOneRecord("SELECT id, serial FROM dns_soa WHERE active = 'Y' AND id = ?", $dns_data['zone']); - $new_serial = $app->validate_dns->increase_serial($zone['serial']); - $app->db->datalogUpdate('dns_soa', "serial = '".$new_serial."'", 'id', $zone['id']); - } else { - //* create a new dns-record - $new_dns_data = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $mail_data['domain'].'.'); - //* create a new record only if the dns-zone exists - if ( isset($new_dns_data) && !empty($new_dns_data) && $post_data['dkim'] == 'y' ) { - $new_dns_data['name'] = $post_data['dkim_selector'].'._domainkey.'.$post_data['domain'].'.'; - $new_dns_data['type'] = 'TXT'; - $new_dns_data['data'] = 'v=DKIM1; t=s; p='.str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"), '', $post_data['dkim_public']); - $new_dns_data['aux'] = 0; - $new_dns_data['active'] = 'Y'; - $new_dns_data['stamp'] = date('Y-m-d H:i:s'); - $new_dns_data['serial'] = $app->validate_dns->increase_serial($new_dns_data['serial']); - $app->db->datalogInsert('dns_rr', $new_dns_data, 'id', $new_dns_data['zone']); - $zone = $app->db->queryOneRecord("SELECT id, serial FROM dns_soa WHERE active = 'Y' AND id = ?", $new_dns_data['zone']); - $new_serial = $app->validate_dns->increase_serial($zone['serial']); - $app->db->datalogUpdate('dns_soa', "serial = '".$new_serial."'", 'id', $zone['id']); - } - } - } //* endif $mail_data != $post_data } function onAfterUpdate() { @@ -482,6 +400,65 @@ class page_action extends tform_actions { } // end if domain name changed + //* update dns-record when the dkim record was changed + // NOTE: only if the domain-name was not changed + if ( $this->dataRecord['active'] == 'y' && $this->dataRecord['domain'] == $this->oldDataRecord['domain'] ) { + $dkim_active = @($this->dataRecord['dkim'] == 'y') ? true : false; + $selector = @($this->dataRecord['dkim_selector'] != $this->oldDataRecord['dkim_selector']) ? true : false; + $dkim_private = @($this->dataRecord['dkim_private'] != $this->oldDataRecord['dkim_private']) ? true : false; + + $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $this->dataRecord['domain']); + + if ( ($selector || $dkim_private || $dkim_active) && $dkim_active ) + //* create a new record only if the dns-zone exists + if ( isset($soa) && !empty($soa) ) { + $this->update_dns($this->dataRecord, $soa); + } + elseif ( !isset($this->dataRecord['dkim']) ) { + // updated existing dmarc-record to policy 'none' + $sql = "SELECT * from dns_rr WHERE name ='_dmarc.?.' AND data LIKE 'v=DMARC1%' AND ?"; + $rec = $app->db->queryOneRecord($sql, $this->dataRecord['domain'], $app->tform->getAuthSQL('r')); + if (is_array($rec)) + if (strpos($rec['data'], 'p=none=') === false) { + $rec['data'] = str_replace(array('quarantine', 'reject'), 'none', $rec['data']); + $app->db->datalogUpdate('dns_rr', $rec, 'id', $rec['id']); + $soa_id = $app->functions->intval($soa['zone']); + $serial = $app->validate_dns->increase_serial($soa["serial"]); + $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + } + } + } + + } + + private function update_dns($dataRecord, $new_rr) { + global $app, $conf; + + // purge old rr-record(s) + $sql = "SELECT * FROM dns_rr WHERE name LIKE '%._domainkey.?.' AND data LIKE 'v=DKIM1%' AND ? ORDER BY serial DESC"; + $rec = $app->db->queryAllRecords($sql, $dataRecord['domain'], $app->tform->getAuthSQL('r')); + if (is_array($rec[1])) { + for ($i=1; $i < count($rec); ++$i) + $app->db->datalogDelete('dns_rr', 'id', $rec[$i]['id']); + } + // also delete a dsn-records with same selector + $sql = "SELECT * from dns_rr WHERE name ='?._domainkey.?.' AND data LIKE 'v=DKIM1%' AND ?"; + $rec = $app->db->queryAllRecords($sql, $dataRecord['dkim_selector'], $dataRecord['domain'], $app->tform->getAuthSQL('r')); + if (is_array($rec)) + foreach ($rec as $del) + $app->db->datalogDelete('dns_rr', 'id', $del['id']); + + $new_rr['name'] = $dataRecord['dkim_selector'].'._domainkey.'.$dataRecord['domain'].'.'; + $new_rr['type'] = 'TXT'; + $new_rr['data'] = 'v=DKIM1; t=s; p='.str_replace(array('-----BEGIN PUBLIC KEY-----','-----END PUBLIC KEY-----',"\r","\n"), '', $this->dataRecord['dkim_public']); + $new_rr['aux'] = 0; + $new_rr['active'] = 'Y'; + $new_rr['stamp'] = date('Y-m-d H:i:s'); + $new_rr['serial'] = $app->validate_dns->increase_serial($new_rr['serial']); + $app->db->datalogInsert('dns_rr', $new_rr, 'id', $new_rr['zone']); + $zone = $app->db->queryOneRecord("SELECT id, serial FROM dns_soa WHERE active = 'Y' AND id = ".$app->functions->intval($new_rr['zone'])); + $new_serial = $app->validate_dns->increase_serial($zone['serial']); + $app->db->datalogUpdate('dns_soa', "serial = '".$new_serial."'", 'id', $zone['id']); } } diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm index dbd5c6ef1..04380dbc2 100755 --- a/interface/web/mail/templates/mail_domain_edit.htm +++ b/interface/web/mail/templates/mail_domain_edit.htm @@ -102,7 +102,7 @@
-{tmpl_var name='dkim_generate_txt'} + {tmpl_var name='dkim_generate_txt'}
-- GitLab From 78d02d715edcbe5e18556f650baa2e1873629759 Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Mon, 8 Dec 2014 14:35:32 +0100 Subject: [PATCH 029/287] stats: add backup stats --- interface/web/sites/backup_stats.php | 33 ++++++++ interface/web/sites/lib/module.conf.php | 7 ++ .../web/sites/list/backup_stats.list.php | 52 ++++++++++++ .../web/sites/templates/backup_stats_list.htm | 82 +++++++++++++++++++ 4 files changed, 174 insertions(+) create mode 100644 interface/web/sites/backup_stats.php create mode 100644 interface/web/sites/list/backup_stats.list.php create mode 100644 interface/web/sites/templates/backup_stats_list.htm diff --git a/interface/web/sites/backup_stats.php b/interface/web/sites/backup_stats.php new file mode 100644 index 000000000..3774f6342 --- /dev/null +++ b/interface/web/sites/backup_stats.php @@ -0,0 +1,33 @@ +auth->check_module_permissions('sites'); + +$app->load('listform_actions','functions'); + +class list_action extends listform_actions { + + public function prepareDataRow($rec) + { + $rec = parent::prepareDataRow($rec); + + $rec['active'] = "
Yes
"; + if ($rec['backup_interval'] === 'none') { + $rec['active'] = "
No
"; + } + + return $rec; + } +} + +$list = new list_action; +$list->SQLExtWhere = ""; +$list->onLoad(); diff --git a/interface/web/sites/lib/module.conf.php b/interface/web/sites/lib/module.conf.php index 5b3a2f84a..b6d506a15 100644 --- a/interface/web/sites/lib/module.conf.php +++ b/interface/web/sites/lib/module.conf.php @@ -189,6 +189,13 @@ $items[] = array( 'title' => 'Database quota', 'link' => 'sites/database_quota_stats.php', 'html_id' => 'databse_quota_stats'); +$items[] = array ( + 'title' => 'Backup Stats', + 'target' => 'content', + 'link' => 'sites/backup_stats.php', + 'html_id' => 'backup_stats' +); + $module['nav'][] = array( 'title' => 'Statistics', 'open' => 1, 'items' => $items); diff --git a/interface/web/sites/list/backup_stats.list.php b/interface/web/sites/list/backup_stats.list.php new file mode 100644 index 000000000..cc7358b99 --- /dev/null +++ b/interface/web/sites/list/backup_stats.list.php @@ -0,0 +1,52 @@ + 'server_id', + 'datatype' => 'INTEGER', + 'formtype' => 'SELECT', + 'op' => '=', + 'prefix' => '', + 'width' => '', + 'value' => '', + 'suffix' => '', + 'datasource' => array ( + 'type' => 'SQL', + 'querystring' => 'SELECT a.server_id, a.server_name FROM server a, web_domain b WHERE (a.server_id = b.server_id) ORDER BY a.server_name', + 'keyfield' => 'server_id', + 'valuefield' => 'server_name' + ) +); diff --git a/interface/web/sites/templates/backup_stats_list.htm b/interface/web/sites/templates/backup_stats_list.htm new file mode 100644 index 000000000..543b4a71c --- /dev/null +++ b/interface/web/sites/templates/backup_stats_list.htm @@ -0,0 +1,82 @@ +

+

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
{tmpl_var name="active"}{tmpl_var name="domain"}{tmpl_var name="backup_copies"}{tmpl_var name="server_id"}{tmpl_var name="backup_interval"}
+
+
+
+ + -- GitLab From 0c1fecfdf0db2be953c11d70521817d0fda76df4 Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Mon, 8 Dec 2014 16:49:11 +0100 Subject: [PATCH 030/287] backup_stats: add links & add backup counter --- interface/web/sites/backup_stats.php | 8 ++- .../sites/lib/lang/de_backup_stats_list.lng | 9 ++++ .../sites/lib/lang/en_backup_stats_list.lng | 9 ++++ .../web/sites/templates/backup_stats_list.htm | 54 ++++--------------- 4 files changed, 35 insertions(+), 45 deletions(-) create mode 100644 interface/web/sites/lib/lang/de_backup_stats_list.lng create mode 100644 interface/web/sites/lib/lang/en_backup_stats_list.lng diff --git a/interface/web/sites/backup_stats.php b/interface/web/sites/backup_stats.php index 3774f6342..dc170c433 100644 --- a/interface/web/sites/backup_stats.php +++ b/interface/web/sites/backup_stats.php @@ -17,13 +17,19 @@ class list_action extends listform_actions { public function prepareDataRow($rec) { + global $app; + $rec = parent::prepareDataRow($rec); $rec['active'] = "
Yes
"; if ($rec['backup_interval'] === 'none') { - $rec['active'] = "
No
"; + $rec['active'] = "
No
"; + $rec['backup_copies'] = 0; } + $recBackup = $app->db->queryOneRecord('SELECT COUNT(backup_id) AS backup_count FROM web_backup WHERE parent_domain_id = ?', $rec['domain_id']); + $rec['backup_copies_exists'] = $recBackup['backup_count']; + return $rec; } } diff --git a/interface/web/sites/lib/lang/de_backup_stats_list.lng b/interface/web/sites/lib/lang/de_backup_stats_list.lng new file mode 100644 index 000000000..d4451dd32 --- /dev/null +++ b/interface/web/sites/lib/lang/de_backup_stats_list.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/sites/lib/lang/en_backup_stats_list.lng b/interface/web/sites/lib/lang/en_backup_stats_list.lng new file mode 100644 index 000000000..47e81bf2d --- /dev/null +++ b/interface/web/sites/lib/lang/en_backup_stats_list.lng @@ -0,0 +1,9 @@ + diff --git a/interface/web/sites/templates/backup_stats_list.htm b/interface/web/sites/templates/backup_stats_list.htm index 543b4a71c..5e42335bf 100644 --- a/interface/web/sites/templates/backup_stats_list.htm +++ b/interface/web/sites/templates/backup_stats_list.htm @@ -13,25 +13,25 @@ - - - - - + + + + + - {tmpl_var name="active"} - {tmpl_var name="domain"} - {tmpl_var name="backup_copies"} - {tmpl_var name="server_id"} - {tmpl_var name="backup_interval"} + {tmpl_var name="active"} + {tmpl_var name="domain"} + {tmpl_var name="server_id"} + {tmpl_var name="backup_interval"} / {tmpl_var name="backup_copies"} + {tmpl_var name="backup_copies_exists"} @@ -46,37 +46,3 @@
- - -- GitLab From f7ec00b2f8ba3efc5bdeacef9c813f8a826ae3be Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Tue, 9 Dec 2014 14:42:25 +0100 Subject: [PATCH 031/287] add Spdy option - http://en.wikipedia.org/wiki/SPDY --- install/sql/incremental/upd_0080.sql | 1 + install/sql/ispconfig3.sql | 1 + install/tpl/server.ini.master | 1 + interface/web/admin/form/server_config.tform.php | 9 +++++++++ interface/web/admin/lib/lang/de_server_config.lng | 1 + interface/web/admin/lib/lang/en_server_config.lng | 1 + .../web/admin/templates/server_config_web_edit.htm | 8 ++++++++ interface/web/sites/form/web_vhost_domain.tform.php | 9 +++++++++ interface/web/sites/lib/lang/de_web_vhost_domain.lng | 1 + interface/web/sites/lib/lang/en_web_vhost_domain.lng | 1 + .../web/sites/templates/web_vhost_domain_advanced.htm | 2 +- interface/web/sites/templates/web_vhost_domain_ssl.htm | 8 +++++++- server/conf/apache_apps.vhost.master | 10 ++++++++-- server/conf/nginx_vhost.conf.master | 4 ++-- server/plugins-available/nginx_plugin.inc.php | 6 ++++++ 15 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 install/sql/incremental/upd_0080.sql diff --git a/install/sql/incremental/upd_0080.sql b/install/sql/incremental/upd_0080.sql new file mode 100644 index 000000000..fcdcb622e --- /dev/null +++ b/install/sql/incremental/upd_0080.sql @@ -0,0 +1 @@ +ALTER TABLE `web_domain` ADD COLUMN `enable_spdy` ENUM('y','n') NULL DEFAULT 'n' AFTER `proxy_directives`; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 6af74fb98..b6390e712 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1877,6 +1877,7 @@ CREATE TABLE `web_domain` ( `traffic_quota_lock` enum('n','y') NOT NULL default 'n', `fastcgi_php_version` varchar(255) DEFAULT NULL, `proxy_directives` mediumtext, + `enable_spdy` ENUM('y','n') NULL DEFAULT 'n', `last_quota_notification` date NULL default NULL, `rewrite_rules` mediumtext, `added_date` date NOT NULL DEFAULT '0000-00-00', diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index c563650c7..7805988a7 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -85,6 +85,7 @@ php_ini_path_apache=/etc/php5/apache2/php.ini php_ini_path_cgi=/etc/php5/cgi/php.ini check_apache_config=y enable_sni=y +enable_spdy=n enable_ip_wildcard=y overtraffic_notify_admin=y overtraffic_notify_client=y diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index debceae71..209a0a4c5 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -1021,6 +1021,15 @@ $form["tabs"]['web'] = array( 'width' => '40', 'maxlength' => '255' ), + 'enable_spdy' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'y', + 'value' => array ( + 0 => 'n', + 1 => 'y' + ) + ), 'apps_vhost_port' => array( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index 6a8e42187..fa9ee445e 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -262,4 +262,5 @@ $wb['php_ini_check_minutes_txt'] = 'Prüfe php.ini alle X Minuten auf Änderunge $wb['php_ini_check_minutes_error_empty'] = 'Bitte geben Sie einen Wert an, wie oft die php.ini auf Änderungen geprüft werden soll.'; $wb['php_ini_check_minutes_info_txt'] = '0 = keine Prüfung'; $wb['php_handler_txt'] = 'Standard-PHP-Handler'; +$wb['enable_spdy_txt'] = 'Stellt Spdy zur Verfügung'; ?> diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index b6288341a..1134e9f96 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -263,4 +263,5 @@ $wb['network_filesystem_txt'] = 'Network Filesystem'; $wb['php_ini_check_minutes_txt'] = 'Check php.ini every X minutes for changes'; $wb['php_ini_check_minutes_error_empty'] = 'Please specify a value how often php.ini should be checked for changes.'; $wb['php_ini_check_minutes_info_txt'] = '0 = no check'; +$wb['enable_spdy_txt'] = 'enables spdy'; ?> diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm index 1ea52554a..1ad90ba9b 100644 --- a/interface/web/admin/templates/server_config_web_edit.htm +++ b/interface/web/admin/templates/server_config_web_edit.htm @@ -101,6 +101,14 @@ +
+

+ +

+
+ +
+

{tmpl_var name='enable_ip_wildcard_txt'}

diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php index 4d6b161db..c342605c9 100644 --- a/interface/web/sites/form/web_vhost_domain.tform.php +++ b/interface/web/sites/form/web_vhost_domain.tform.php @@ -523,6 +523,15 @@ if($ssl_available) { 'default' => '', 'value' => array('' => 'none_txt', 'save' => 'save_certificate_txt', 'create' => 'create_certificate_txt', 'del' => 'delete_certificate_txt') ), + 'enable_spdy' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array ( + 0 => 'n', + 1 => 'y' + ) + ), //################################# // ENDE Datatable fields //################################# diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain.lng b/interface/web/sites/lib/lang/de_web_vhost_domain.lng index 7cce81680..ddf32fbce 100644 --- a/interface/web/sites/lib/lang/de_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/de_web_vhost_domain.lng @@ -136,4 +136,5 @@ $wb['invalid_system_user_or_group_txt'] = 'Invalid system user or group'; $wb['apache_directive_blocked_error'] = 'Die Apache Direktive wurde durch die Sicherheitsrichtline blockiert:'; $wb['btn_save_txt'] = 'Speichern'; $wb['btn_cancel_txt'] = 'Abbrechen'; +$wb['enable_spdy_txt'] = 'Aktiviere Spdy'; ?> diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng index 1f6b45568..65a2f6287 100644 --- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng @@ -139,4 +139,5 @@ $wb['backup_excludes_error_regex'] = 'The excluded directories contain invalid c $wb['subdomain_error_empty'] = 'The subdommain field is empty or contains invalid characters.'; $wb['btn_save_txt'] = "Save"; $wb['btn_cancel_txt'] = "Cancel"; +$wb['enable_spdy_txt'] = 'activate Spdy'; ?> diff --git a/interface/web/sites/templates/web_vhost_domain_advanced.htm b/interface/web/sites/templates/web_vhost_domain_advanced.htm index d2c3bb871..8529819b6 100644 --- a/interface/web/sites/templates/web_vhost_domain_advanced.htm +++ b/interface/web/sites/templates/web_vhost_domain_advanced.htm @@ -176,4 +176,4 @@ }); } - \ No newline at end of file + diff --git a/interface/web/sites/templates/web_vhost_domain_ssl.htm b/interface/web/sites/templates/web_vhost_domain_ssl.htm index 4869c19aa..75bf9e681 100644 --- a/interface/web/sites/templates/web_vhost_domain_ssl.htm +++ b/interface/web/sites/templates/web_vhost_domain_ssl.htm @@ -64,6 +64,12 @@ {tmpl_var name='ssl_action'}
+
+

{tmpl_var name='enable_spdy_txt'}

+
+ {tmpl_var name="enable_spdy"} +
+
@@ -74,4 +80,4 @@
- \ No newline at end of file + diff --git a/server/conf/apache_apps.vhost.master b/server/conf/apache_apps.vhost.master index bc6c6bcfb..7d6d66590 100644 --- a/server/conf/apache_apps.vhost.master +++ b/server/conf/apache_apps.vhost.master @@ -10,11 +10,17 @@ ServerAdmin webmaster@localhost {tmpl_var name='apps_vhost_servername'} - + SetHandler None - + + {tmpl_if name="enable_spdy" op="==" value="y"} + + SpdyEnabled on + + {/tmpl_if} + DocumentRoot {tmpl_var name='apps_vhost_dir'} AddType application/x-httpd-php .php diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master index 222bf2989..41e08c800 100644 --- a/server/conf/nginx_vhost.conf.master +++ b/server/conf/nginx_vhost.conf.master @@ -5,7 +5,7 @@ server { - listen :443 ssl; + listen :443 ssl{tmpl_if name='enable_spdy' op='==' value='y'} spdy{/tmpl_if}; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; listen []:443 ssl; @@ -242,4 +242,4 @@ server { } } - \ No newline at end of file + diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index c256ae18f..27c17f25a 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -925,6 +925,12 @@ class nginx_plugin { } } + // Spdy + $tpl->setVar('spdy_enabled', ''); + if($data['new']['enable_spdy'] == 'y') { + $tpl->setVar('spdy_enabled', ' spdy'); + } + // PHP-FPM // Support for multiple PHP versions /* -- GitLab From 28b1b49d9d9bc581cc895418c9cb5cdbeecb0913 Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Thu, 11 Dec 2014 16:34:07 +0100 Subject: [PATCH 032/287] server_config.tform: changed enable_spdy default to n see: - http://git.ispconfig.org/panders/ispconfig3/commit/f7ec00b2f8ba3efc5bdeacef9c813f8a826ae3be#note_448 --- interface/web/admin/form/server_config.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index 209a0a4c5..190c8c4df 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -1024,7 +1024,7 @@ $form["tabs"]['web'] = array( 'enable_spdy' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', - 'default' => 'y', + 'default' => 'n', 'value' => array ( 0 => 'n', 1 => 'y' -- GitLab From fdda8edab91726a8199c1b52cb4f97abf82e4ed7 Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Thu, 11 Dec 2014 16:39:53 +0100 Subject: [PATCH 033/287] changed translations see: - http://git.ispconfig.org/panders/ispconfig3/commit/f7ec00b2f8ba3efc5bdeacef9c813f8a826ae3be#note_453 - http://git.ispconfig.org/panders/ispconfig3/commit/f7ec00b2f8ba3efc5bdeacef9c813f8a826ae3be#note_452 - http://git.ispconfig.org/panders/ispconfig3/commit/f7ec00b2f8ba3efc5bdeacef9c813f8a826ae3be#note_450 - http://git.ispconfig.org/panders/ispconfig3/commit/f7ec00b2f8ba3efc5bdeacef9c813f8a826ae3be#note_449 --- interface/web/admin/lib/lang/de_server_config.lng | 2 +- interface/web/admin/lib/lang/en_server_config.lng | 2 +- interface/web/sites/lib/lang/de_web_vhost_domain.lng | 2 +- interface/web/sites/lib/lang/en_web_vhost_domain.lng | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index fa9ee445e..14474114c 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -262,5 +262,5 @@ $wb['php_ini_check_minutes_txt'] = 'Prüfe php.ini alle X Minuten auf Änderunge $wb['php_ini_check_minutes_error_empty'] = 'Bitte geben Sie einen Wert an, wie oft die php.ini auf Änderungen geprüft werden soll.'; $wb['php_ini_check_minutes_info_txt'] = '0 = keine Prüfung'; $wb['php_handler_txt'] = 'Standard-PHP-Handler'; -$wb['enable_spdy_txt'] = 'Stellt Spdy zur Verfügung'; +$wb['enable_spdy_txt'] = 'Stellt SPDY zur Verfügung'; ?> diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index 1134e9f96..8affba0c1 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -263,5 +263,5 @@ $wb['network_filesystem_txt'] = 'Network Filesystem'; $wb['php_ini_check_minutes_txt'] = 'Check php.ini every X minutes for changes'; $wb['php_ini_check_minutes_error_empty'] = 'Please specify a value how often php.ini should be checked for changes.'; $wb['php_ini_check_minutes_info_txt'] = '0 = no check'; -$wb['enable_spdy_txt'] = 'enables spdy'; +$wb['enable_spdy_txt'] = 'Makes SPDY available'; ?> diff --git a/interface/web/sites/lib/lang/de_web_vhost_domain.lng b/interface/web/sites/lib/lang/de_web_vhost_domain.lng index ddf32fbce..a6b866df3 100644 --- a/interface/web/sites/lib/lang/de_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/de_web_vhost_domain.lng @@ -136,5 +136,5 @@ $wb['invalid_system_user_or_group_txt'] = 'Invalid system user or group'; $wb['apache_directive_blocked_error'] = 'Die Apache Direktive wurde durch die Sicherheitsrichtline blockiert:'; $wb['btn_save_txt'] = 'Speichern'; $wb['btn_cancel_txt'] = 'Abbrechen'; -$wb['enable_spdy_txt'] = 'Aktiviere Spdy'; +$wb['enable_spdy_txt'] = 'Aktiviere SPDY'; ?> diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng index 65a2f6287..1d0fd10cc 100644 --- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng @@ -139,5 +139,5 @@ $wb['backup_excludes_error_regex'] = 'The excluded directories contain invalid c $wb['subdomain_error_empty'] = 'The subdommain field is empty or contains invalid characters.'; $wb['btn_save_txt'] = "Save"; $wb['btn_cancel_txt'] = "Cancel"; -$wb['enable_spdy_txt'] = 'activate Spdy'; +$wb['enable_spdy_txt'] = 'enable SPDY'; ?> -- GitLab From a4a902022ab198385a427347f4a70cc3e301848a Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Thu, 11 Dec 2014 16:42:02 +0100 Subject: [PATCH 034/287] server_config_web_edit: moved enable_spdy after enable_sni --- .../admin/templates/server_config_web_edit.htm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm index 1ad90ba9b..c4079bf2f 100644 --- a/interface/web/admin/templates/server_config_web_edit.htm +++ b/interface/web/admin/templates/server_config_web_edit.htm @@ -101,14 +101,6 @@ -
-

- -

-
- -
-

{tmpl_var name='enable_ip_wildcard_txt'}

@@ -169,6 +161,14 @@ {tmpl_var name='enable_sni'}
+
+

+ +

+
+ +
+
-- GitLab From d026314636b61129b45d6608bcbd71f482d4f10d Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Thu, 11 Dec 2014 16:43:38 +0100 Subject: [PATCH 035/287] nginx_vhost.conf.master: add spdy listen argument for ipv6 see: - http://git.ispconfig.org/panders/ispconfig3/commit/f7ec00b2f8ba3efc5bdeacef9c813f8a826ae3be#note_454 --- server/conf/nginx_vhost.conf.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/conf/nginx_vhost.conf.master b/server/conf/nginx_vhost.conf.master index 41e08c800..5236a1958 100644 --- a/server/conf/nginx_vhost.conf.master +++ b/server/conf/nginx_vhost.conf.master @@ -8,7 +8,7 @@ server { listen :443 ssl{tmpl_if name='enable_spdy' op='==' value='y'} spdy{/tmpl_if}; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - listen []:443 ssl; + listen []:443 ssl{tmpl_if name='enable_spdy' op='==' value='y'} spdy{/tmpl_if};; ssl_certificate /ssl/.crt; ssl_certificate_key /ssl/.key; -- GitLab From a774472532e0c48cf1675d063532b62da21e8b49 Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Thu, 11 Dec 2014 16:46:44 +0100 Subject: [PATCH 036/287] nginx_plugin.inc: cleanup leftovers see: - http://git.ispconfig.org/panders/ispconfig3/commit/f7ec00b2f8ba3efc5bdeacef9c813f8a826ae3be#note_455 --- server/plugins-available/nginx_plugin.inc.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 27c17f25a..c256ae18f 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -925,12 +925,6 @@ class nginx_plugin { } } - // Spdy - $tpl->setVar('spdy_enabled', ''); - if($data['new']['enable_spdy'] == 'y') { - $tpl->setVar('spdy_enabled', ' spdy'); - } - // PHP-FPM // Support for multiple PHP versions /* -- GitLab From 38659f807034258085b1790d96bae9e8057fc5c4 Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Thu, 11 Dec 2014 17:06:05 +0100 Subject: [PATCH 037/287] en_web_vhost_domain: fix typo --- interface/web/sites/lib/lang/en_web_vhost_domain.lng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/sites/lib/lang/en_web_vhost_domain.lng b/interface/web/sites/lib/lang/en_web_vhost_domain.lng index 1d0fd10cc..3be30d054 100644 --- a/interface/web/sites/lib/lang/en_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/en_web_vhost_domain.lng @@ -139,5 +139,5 @@ $wb['backup_excludes_error_regex'] = 'The excluded directories contain invalid c $wb['subdomain_error_empty'] = 'The subdommain field is empty or contains invalid characters.'; $wb['btn_save_txt'] = "Save"; $wb['btn_cancel_txt'] = "Cancel"; -$wb['enable_spdy_txt'] = 'enable SPDY'; +$wb['enable_spdy_txt'] = 'Enable SPDY'; ?> -- GitLab From dcf94ebdc9644ac2df05933c480743dc1a25e214 Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Fri, 12 Dec 2014 15:09:50 +0100 Subject: [PATCH 038/287] web_vhost_domain_ssl: check if spdy is enabled on server configuration --- interface/web/sites/templates/web_vhost_domain_ssl.htm | 2 ++ interface/web/sites/web_vhost_domain_edit.php | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/interface/web/sites/templates/web_vhost_domain_ssl.htm b/interface/web/sites/templates/web_vhost_domain_ssl.htm index 75bf9e681..e910e22b1 100644 --- a/interface/web/sites/templates/web_vhost_domain_ssl.htm +++ b/interface/web/sites/templates/web_vhost_domain_ssl.htm @@ -64,12 +64,14 @@ {tmpl_var name='ssl_action'}
+ {tmpl_if name="is_spdy_enabled"}

{tmpl_var name='enable_spdy_txt'}

{tmpl_var name="enable_spdy"}
+ {/tmpl_if} diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 893571306..27ece43ef 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -699,6 +699,8 @@ class page_action extends tform_actions { $app->tpl->setVar('vhostdomain_type', $this->_vhostdomain_type); + $app->tpl->setVar('is_spdy_enabled', ($web_config['enable_spdy'] === 'y')); + parent::onShowEnd(); } @@ -1068,6 +1070,10 @@ class page_action extends tform_actions { } } + if($web_config['enable_spdy'] === 'n') { + unset($app->tform->formDef["tabs"]['ssl']['fields']['enable_spdy']); + } + parent::onSubmit(); } -- GitLab From 12e1474515200ed1657075cab6f8f61cf01b3e2c Mon Sep 17 00:00:00 2001 From: Falko Timme Date: Sat, 13 Dec 2014 22:16:55 +0100 Subject: [PATCH 039/287] - Added VAT ID check (for EU VAT IDs) to client/reseller form. --- interface/lib/classes/validate_client.inc.php | 78 +++++++++++++++++++ interface/web/client/form/client.tform.php | 7 +- interface/web/client/form/reseller.tform.php | 7 +- interface/web/client/lib/lang/de_client.lng | 3 +- interface/web/client/lib/lang/de_reseller.lng | 3 +- interface/web/client/lib/lang/en_client.lng | 1 + interface/web/client/lib/lang/en_reseller.lng | 1 + 7 files changed, 96 insertions(+), 4 deletions(-) diff --git a/interface/lib/classes/validate_client.inc.php b/interface/lib/classes/validate_client.inc.php index 0f90a5b3d..198701bc4 100644 --- a/interface/lib/classes/validate_client.inc.php +++ b/interface/lib/classes/validate_client.inc.php @@ -136,7 +136,85 @@ class validate_client { } } + function check_vat_id ($field_name, $field_value, $validator){ + global $app, $page; + + $vatid = trim($field_value); + if(isset($app->remoting_lib->primary_id)) { + $country = $app->remoting_lib->dataRecord['country']; + } else { + $country = $page->dataRecord['country']; + } + + // check if country is member of EU + $country_details = $app->db->queryOneRecord("SELECT * FROM country WHERE iso = '".$country."'"); + if($country_details['eu'] == 'y' && $vatid != ''){ + + $vatid = preg_replace('/\s+/', '', $vatid); + $vatid = str_replace(array('.', '-', ','), '', $vatid); + $cc = substr($vatid, 0, 2); + $vn = substr($vatid, 2); + + // Test if the country of the VAT-ID matches the country of the customer + if($country != ''){ + if(strtoupper($cc) != $country){ + $errmsg = $validator['errmsg']; + if(isset($app->tform->wordbook[$errmsg])) { + return $app->tform->wordbook[$errmsg]."
\r\n"; + } else { + return $errmsg."
\r\n"; + } + } + } + $client = new SoapClient("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"); + + if($client){ + $params = array('countryCode' => $cc, 'vatNumber' => $vn); + try{ + $r = $client->checkVat($params); + if($r->valid == true){ + } else { + $errmsg = $validator['errmsg']; + if(isset($app->tform->wordbook[$errmsg])) { + return $app->tform->wordbook[$errmsg]."
\r\n"; + } else { + return $errmsg."
\r\n"; + } + } + + // This foreach shows every single line of the returned information + /* + foreach($r as $k=>$prop){ + echo $k . ': ' . $prop; + } + */ + + } catch(SoapFault $e) { + //echo 'Error, see message: '.$e->faultstring; + switch ($e->faultstring) { + case 'INVALID_INPUT': + $errmsg = $validator['errmsg']; + if(isset($app->tform->wordbook[$errmsg])) { + return $app->tform->wordbook[$errmsg]."
\r\n"; + } else { + return $errmsg."
\r\n"; + } + break; + // the following cases shouldn't be the user's fault, so we return no error + case 'SERVICE_UNAVAILABLE': + case 'MS_UNAVAILABLE': + case 'TIMEOUT': + case 'SERVER_BUSY': + break; + } + } + } else { + // Connection to host not possible, europe.eu down? + // this shouldn't be the user's fault, so we return no error + } + } + } } diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php index 362545256..8d2ce8985 100644 --- a/interface/web/client/form/client.tform.php +++ b/interface/web/client/form/client.tform.php @@ -367,7 +367,12 @@ $form["tabs"]['address'] = array ( 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', + 'class' => 'validate_client', + 'function' => 'check_vat_id', + 'errmsg'=> 'invalid_vat_id'), + ), ), 'company_id' => array ( 'datatype' => 'VARCHAR', diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php index 8efedf710..b70c76538 100644 --- a/interface/web/client/form/reseller.tform.php +++ b/interface/web/client/form/reseller.tform.php @@ -364,7 +364,12 @@ $form["tabs"]['address'] = array ( 'width' => '30', 'maxlength' => '255', 'rows' => '', - 'cols' => '' + 'cols' => '', + 'validators' => array ( 0 => array ( 'type' => 'CUSTOM', + 'class' => 'validate_client', + 'function' => 'check_vat_id', + 'errmsg'=> 'invalid_vat_id'), + ), ), 'company_id' => array ( 'datatype' => 'VARCHAR', diff --git a/interface/web/client/lib/lang/de_client.lng b/interface/web/client/lib/lang/de_client.lng index e5ba066ee..7ee7226d8 100644 --- a/interface/web/client/lib/lang/de_client.lng +++ b/interface/web/client/lib/lang/de_client.lng @@ -110,7 +110,7 @@ $wb['limit_webdav_user_error_notint'] = 'Das WebDAV Benutzer Limit muss eine Zah $wb['limit_backup_txt'] = 'Backupfunktion verfügbar'; $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['vat_id_txt'] = 'USt.-ID'; $wb['required_fields_txt'] = '* Benötigte Felder'; $wb['limit_mailmailinglist_txt'] = 'Max. Anzahl an Mailinglisten'; $wb['limit_mailmailinglist_error_notint'] = 'Das Mailinglisten Limit muss eine Zahl sein.'; @@ -176,4 +176,5 @@ $wb['limit_database_quota_error_notint'] = 'Das Datenbank-quota muß eine Nummer $wb['reseller_txt'] = 'Reseller'; $wb['btn_save_txt'] = 'Speichern'; $wb['btn_cancel_txt'] = 'Abbrechen'; +$wb['invalid_vat_id'] = 'Die USt.-ID ist ungültig.'; ?> diff --git a/interface/web/client/lib/lang/de_reseller.lng b/interface/web/client/lib/lang/de_reseller.lng index 1595e567b..541b5d2dd 100644 --- a/interface/web/client/lib/lang/de_reseller.lng +++ b/interface/web/client/lib/lang/de_reseller.lng @@ -106,7 +106,7 @@ $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'; +$wb['vat_id_txt'] = 'USt.-ID'; $wb['required_fields_txt'] = '* Benötigte Felder'; $wb['limit_webdav_user_txt'] = 'Max. Anzahl an WebDAV Benutzern'; $wb['limit_webdav_user_error_notint'] = 'Das WebDAV Benutzer Limit muss eine Zahl sein.'; @@ -160,4 +160,5 @@ $wb['limit_domainmodule_error_notint'] = 'Domainmodule limit must be a number.'; $wb['limit_domainmodule_txt'] = 'Domainmodule Limit'; $wb['client_limits_txt'] = 'Client Limits'; $wb['err_msg_master_tpl_set'] = 'All custom limit settings are ignored if any master template other than \\"custom\\" is selected.'; +$wb['invalid_vat_id'] = 'Die USt.-ID ist ungültig.'; ?> diff --git a/interface/web/client/lib/lang/en_client.lng b/interface/web/client/lib/lang/en_client.lng index 225b304d6..e7e634bf0 100644 --- a/interface/web/client/lib/lang/en_client.lng +++ b/interface/web/client/lib/lang/en_client.lng @@ -179,4 +179,5 @@ $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a n $wb['reseller_txt'] = 'Reseller'; $wb['btn_save_txt'] = "Save"; $wb['btn_cancel_txt'] = "Cancel"; +$wb['invalid_vat_id'] = 'The VAT ID is invalid.'; ?> diff --git a/interface/web/client/lib/lang/en_reseller.lng b/interface/web/client/lib/lang/en_reseller.lng index b94c30e86..e23657c05 100644 --- a/interface/web/client/lib/lang/en_reseller.lng +++ b/interface/web/client/lib/lang/en_reseller.lng @@ -178,4 +178,5 @@ $wb['limit_domainmodule_error_notint'] = 'Domainmodule limit must be a number.'; $wb['limit_domainmodule_txt'] = 'Domainmodule Limit'; $wb['client_limits_txt'] = 'Client Limits'; $wb['err_msg_master_tpl_set'] = 'All custom limit settings are ignored if any master template other than "custom" is selected.'; +$wb['invalid_vat_id'] = 'The VAT ID is invalid.'; ?> -- GitLab From 21ae0cf403dddc943ad6fcf1c118714874708585 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Sun, 14 Dec 2014 13:45:54 +0100 Subject: [PATCH 040/287] DMARC: allow multiple adresses for aggregate mail reports (rua) and forensic mail reports (ruf) --- interface/web/dns/dns_dmarc_edit.php | 84 +++++++++---------- interface/web/dns/lib/lang/ar_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/bg_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/br_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/cz_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/de_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/el_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/en_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/es_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/fi_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/fr_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/hr_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/hu_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/id_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/it_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/ja_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/nl_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/pl_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/pt_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/ro_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/ru_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/se_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/sk_dns_dmarc.lng | 10 ++- interface/web/dns/lib/lang/tr_dns_dmarc.lng | 10 ++- .../web/dns/templates/dns_dmarc_edit.htm | 2 +- 25 files changed, 179 insertions(+), 137 deletions(-) diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php index 4c6402a0d..c4bc2b3fa 100644 --- a/interface/web/dns/dns_dmarc_edit.php +++ b/interface/web/dns/dns_dmarc_edit.php @@ -104,9 +104,15 @@ class page_action extends tform_actions { $temp = explode('; ', $old_data); foreach ($temp as $part) { if (preg_match("/^p=/", $part)) $dmarc_policy = str_replace('p=', '', $part); - if (preg_match("/^rua=/", $part)) $dmarc_rua = str_replace('rua=mailto:', '', $part).' '; - if (preg_match("/^ruf=/", $part)) $dmarc_ruf = str_replace('ruf=mailto:', '', $part).' '; - if (preg_match("/^fo:/", $part)) $dmarc_fo = str_replace('fo:', '', $part); + if (preg_match("/^rua=/", $part)) { + $dmarc_rua = str_replace(array('rua=','mailto:'), '', $part).' '; + $dmarc_rua = str_replace(',', ' ', $dmarc_rua); + } + if (preg_match("/^ruf=/", $part)) { + $dmarc_ruf = str_replace(array('ruf=','mailto:'), '', $part).' '; + $dmarc_ruf = str_replace(',', ' ', $dmarc_ruf); + } + if (preg_match("/^fo=/", $part)) $dmarc_fo = str_replace('fo=', '', $part); if (preg_match("/^adkim=/", $part)) $dmarc_adkim = str_replace('adkim=', '', $part); if (preg_match("/^aspf=/", $part)) $dmarc_aspf = str_replace('aspf=', '', $part); if (preg_match("/^rf=/", $part)) $dmarc_rf = str_replace('rf=', '', $part); @@ -137,10 +143,10 @@ class page_action extends tform_actions { if (!empty($dmarc_ruf)) $app->tpl->setVar("dmarc_ruf", $dmarc_ruf); //set dmarc-fo-options - $temp = explode(':', $dmarc_fo); - if (is_array($temp)) + if (isset($dmarc_fo)) { + $temp = explode(':', $dmarc_fo); foreach ($temp as $fo => $value) $app->tpl->setVar("dmarc_fo".$value, 'CHECKED'); - else + } else $app->tpl->setVar("dmarc_fo0", 'CHECKED'); unset($temp); @@ -277,63 +283,53 @@ class page_action extends tform_actions { //create dmarc-record $dmarc_record[] = 'p='.$this->dataRecord['dmarc_policy']; - /* TODO: - draft-kucherawy-dmarc-base-07 allows multiple rua and ruf-entries - */ - $dmarc_rua = trim($this->dataRecord['dmarc_rua']); - if (!empty($dmarc_rua)) { - if (!filter_var($dmarc_rua, FILTER_VALIDATE_EMAIL)) { - if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; - $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_email_txt'].$dmarc_rua; - } else { - /* TODO: - allow an external report-address. this requieres changes in a remote zone. - */ - $mail_domain = explode('@', $dmarc_rua); - if ($mail_domain[1] != $domain_name) { + if (!empty($this->dataRecord['dmarc_rua'])) { + $dmarc_rua = explode(' ', $this->dataRecord['dmarc_rua']); + $dmarc_rua = array_filter($dmarc_rua); + foreach ($dmarc_rua as $rec) { + if (!filter_var($rec, FILTER_VALIDATE_EMAIL)) { if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; - $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_domain_txt'].$dmarc_ruf.' in '.$dmarc_ruf; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_email_txt'].$dmarc_rua; } else { - $dmarc_record[] = 'rua=mailto:'.$dmarc_rua; + $temp .= 'mailto:'.$rec.','; } } + $dmarc_record[] = 'rua='.rtrim($temp, ','); + unset ($dmarc_rua); + unset($temp); } - unset ($dmarc_rua); - unset ($mail_domain); - - $dmarc_ruf = trim($this->dataRecord['dmarc_ruf']); - if (!empty($dmarc_ruf)) { - if (!filter_var($dmarc_ruf, FILTER_VALIDATE_EMAIL)) { - if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; - $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_email_txt'].$dmarc_ruf; - } else { - /* TODO: - allow an external report-address. this requieres changes in a remote zone. - */ - $mail_domain[1] = explode('@', $dmarc_ruf); - if ($mail_domain != $domain_name) { + + if (!empty($this->dataRecord['dmarc_ruf'])) { + $dmarc_ruf = explode(' ', $this->dataRecord['dmarc_ruf']); + $dmarc_ruf = array_filter($dmarc_ruf); + foreach ($dmarc_ruf as $rec) { + if (!filter_var($rec, FILTER_VALIDATE_EMAIL)) { if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; - $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_domain_txt'].$dmarc_ruf.' in '.$dmarc_ruf; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_email_txt'].$dmarc_rua; } else { - $dmarc_record[] = 'ruf=mailto:'.$dmarc_ruf; + $temp .= 'mailto:'.$rec.','; } } + $dmarc_record[] = 'ruf='.rtrim($temp, ','); + unset ($dmarc_ruf); + unset($temp); } - unset ($dmarc_ruf); - unset ($mail_domain); $fo_rec = ''; if (isset($this->dataRecord['dmarc_fo0'])) $fo_rec[] = '0'; if (isset($this->dataRecord['dmarc_fo1'])) $fo_rec[] = '1'; if (isset($this->dataRecord['dmarc_fod'])) $fo_rec[] = 'd'; if (isset($this->dataRecord['dmarc_fos'])) $fo_rec[] = 's'; - if (is_array($fo_rec) && !empty($fo_rec)) - $dmarc_record[] = 'fo:'.implode(':', $fo_rec); + if (is_array($fo_rec) && !empty($fo_rec)) { + $rec = 'fo='.implode(':', $fo_rec); + if ($rec != 'fo=0') $dmarc_record[] = 'fo='.implode(':', $fo_rec); + unset($rec); + } - if (!empty($this->dataRecord['dmarc_adkim']) && $this->dataRecord['dmarc_adkim'] != 'r' ) + if ($this->dataRecord['dmarc_adkim'] != 'r' ) $dmarc_record[] = 'adkim='.$this->dataRecord['dmarc_adkim']; - if (!empty($this->dataRecord['dmarc_aspf']) && $this->dataRecord['dmarc_aspf'] != 'r' ) + if ($this->dataRecord['dmarc_aspf'] != 'r' ) $dmarc_record[] = 'aspf='.$this->dataRecord['dmarc_aspf']; if (isset($this->dataRecord['dmarc_rf_afrf']) && isset($this->dataRecord['dmarc_rf_iodef'])) diff --git a/interface/web/dns/lib/lang/ar_dns_dmarc.lng b/interface/web/dns/lib/lang/ar_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/ar_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/ar_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/bg_dns_dmarc.lng b/interface/web/dns/lib/lang/bg_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/bg_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/bg_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/br_dns_dmarc.lng b/interface/web/dns/lib/lang/br_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/br_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/br_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/cz_dns_dmarc.lng b/interface/web/dns/lib/lang/cz_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/cz_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/cz_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/de_dns_dmarc.lng b/interface/web/dns/lib/lang/de_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/de_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/de_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/el_dns_dmarc.lng b/interface/web/dns/lib/lang/el_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/el_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/el_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/en_dns_dmarc.lng b/interface/web/dns/lib/lang/en_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/en_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/en_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/es_dns_dmarc.lng b/interface/web/dns/lib/lang/es_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/es_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/es_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/fi_dns_dmarc.lng b/interface/web/dns/lib/lang/fi_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/fi_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/fi_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/fr_dns_dmarc.lng b/interface/web/dns/lib/lang/fr_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/fr_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/fr_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/hr_dns_dmarc.lng b/interface/web/dns/lib/lang/hr_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/hr_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/hr_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/hu_dns_dmarc.lng b/interface/web/dns/lib/lang/hu_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/hu_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/hu_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/id_dns_dmarc.lng b/interface/web/dns/lib/lang/id_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/id_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/id_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/it_dns_dmarc.lng b/interface/web/dns/lib/lang/it_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/it_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/it_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/ja_dns_dmarc.lng b/interface/web/dns/lib/lang/ja_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/ja_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/ja_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/nl_dns_dmarc.lng b/interface/web/dns/lib/lang/nl_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/nl_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/nl_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/pl_dns_dmarc.lng b/interface/web/dns/lib/lang/pl_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/pl_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/pl_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/pt_dns_dmarc.lng b/interface/web/dns/lib/lang/pt_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/pt_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/pt_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/ro_dns_dmarc.lng b/interface/web/dns/lib/lang/ro_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/ro_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/ro_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/ru_dns_dmarc.lng b/interface/web/dns/lib/lang/ru_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/ru_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/ru_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/se_dns_dmarc.lng b/interface/web/dns/lib/lang/se_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/se_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/se_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/sk_dns_dmarc.lng b/interface/web/dns/lib/lang/sk_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/sk_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/sk_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/lib/lang/tr_dns_dmarc.lng b/interface/web/dns/lib/lang/tr_dns_dmarc.lng index ac7526663..8da5d3535 100644 --- a/interface/web/dns/lib/lang/tr_dns_dmarc.lng +++ b/interface/web/dns/lib/lang/tr_dns_dmarc.lng @@ -2,14 +2,14 @@ $wb['data_txt'] = 'DMARC Record'; $wb['domain_txt'] = 'Domain'; $wb['dmarc_policy_txt'] = 'Mail Receiver Policy'; -$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.'; +$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF or DKIM (DMARC).'; $wb['dmarc_policy_none_txt'] = 'none'; $wb['dmarc_policy_quarantine_txt'] = 'quarantine'; $wb['dmarc_policy_reject_txt'] = 'reject'; $wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address'; -$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address'; -$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.'; +$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing DMARC checks for the domain (separated by whitespaces).'; $wb['dmarc_fo_txt'] = 'Forensic reporting options'; $wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result."; $wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.'; @@ -37,8 +37,10 @@ $wb['dmarc_sp_quarantine_txt'] = 'quarantine'; $wb['dmarc_sp_reject_txt'] = 'reject'; $wb['ttl_txt'] = 'TTL'; $wb['active_txt'] = 'Active'; +$wb['dmarc_policy_error_txt'] = "Only policy 'none' is allowed without DKIM-signed emails."; +$wb['dmarc_no_dkim_txt'] = 'No active DKIM Record.'; +$wb['dmarc_no_spf_txt'] = 'No active SPF Record.'; $wb['dmarc_more_spf_txt'] = 'More than one active SPF Record'; -$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.'; $wb['dmarc_invalid_email_txt'] = 'Invalid Email'; $wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option'; $wb['record_exists_txt'] = 'DNS-Record already exists'; diff --git a/interface/web/dns/templates/dns_dmarc_edit.htm b/interface/web/dns/templates/dns_dmarc_edit.htm index 0f1f5b49e..373ec4b03 100644 --- a/interface/web/dns/templates/dns_dmarc_edit.htm +++ b/interface/web/dns/templates/dns_dmarc_edit.htm @@ -79,7 +79,7 @@

{tmpl_var name='active_txt'}

- +
-- GitLab From f4a8466316036ec433870c2860370e4e9485a2d5 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 16 Dec 2014 16:27:51 +0100 Subject: [PATCH 041/287] allow SPF-includes like_spf.google.com --- interface/web/dns/dns_spf_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/dns_spf_edit.php b/interface/web/dns/dns_spf_edit.php index 32955c4b8..e95227ab3 100644 --- a/interface/web/dns/dns_spf_edit.php +++ b/interface/web/dns/dns_spf_edit.php @@ -202,7 +202,7 @@ class page_action extends tform_actions { if (!empty($spf_domain)) { $rec = split(' ', $spf_domain); foreach ($rec as $domain) { - if (preg_match('/^[a-zA-Z0-9\\.\\-\\*]{0,64}$/', $domain)) + if (preg_match('/_^[a-zA-Z0-9\\.\\-\\*]{0,64}$/', $domain)) $spf_record[] = 'include:' . $domain; else { if (isset($app->tform->errorMessage )) $app->tform->errorMessage .= '
' . $app->tform->wordbook["spf_invalid_domain_txt"]. $domain; -- GitLab From a01942762f934169471b3632d0de877ee3d8200f Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 16 Dec 2014 16:28:41 +0100 Subject: [PATCH 042/287] allow verification records for DMARC in a TXT-record (like example.com._report._dmarc.external.com. v=DMARC1;) --- interface/web/dns/form/dns_txt.tform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/dns/form/dns_txt.tform.php b/interface/web/dns/form/dns_txt.tform.php index 6cfb3450d..96abd1b4e 100644 --- a/interface/web/dns/form/dns_txt.tform.php +++ b/interface/web/dns/form/dns_txt.tform.php @@ -117,7 +117,7 @@ $form["tabs"]['dns'] = array ( ), 2 => array ( 'type' => 'REGEX', - 'regex' => "/^((?!v=DMARC).)*$/s", + 'regex' => "/^((?!v=DMARC1; ).)*$/s", 'errmsg'=> 'invalid_type_dmarc'), 3 => array ( 'type' => 'REGEX', -- GitLab From a20782eb1d1e71e95cfa71e61e093a315e9abe3d Mon Sep 17 00:00:00 2001 From: Patrick Anders Date: Wed, 17 Dec 2014 16:32:55 +0100 Subject: [PATCH 043/287] add missing translation for email_error_isemail --- interface/web/mail/lib/lang/de_mail_forward.lng | 1 + interface/web/mail/lib/lang/en_mail_forward.lng | 1 + 2 files changed, 2 insertions(+) diff --git a/interface/web/mail/lib/lang/de_mail_forward.lng b/interface/web/mail/lib/lang/de_mail_forward.lng index a392ac4e3..e0ef8c7d0 100644 --- a/interface/web/mail/lib/lang/de_mail_forward.lng +++ b/interface/web/mail/lib/lang/de_mail_forward.lng @@ -6,4 +6,5 @@ $wb['limit_mailforward_txt'] = 'Die maximale Anzahl an E-Mail Weiterleitungen f $wb['duplicate_mailbox_txt'] = 'Es existiert bereits ein E-Mail Konto mit dieser Adresse.'; $wb['domain_txt'] = 'Domain'; $wb['source_txt'] = 'Quell E-Mail Adresse'; +$wb['email_error_isemail'] = 'Bitte geben Sie eine gültige E-Mail Adresse an.'; ?> diff --git a/interface/web/mail/lib/lang/en_mail_forward.lng b/interface/web/mail/lib/lang/en_mail_forward.lng index 448259365..5d371eee7 100644 --- a/interface/web/mail/lib/lang/en_mail_forward.lng +++ b/interface/web/mail/lib/lang/en_mail_forward.lng @@ -6,4 +6,5 @@ $wb["limit_mailforward_txt"] = 'The max. number of email forwarders for your acc $wb["duplicate_mailbox_txt"] = 'There is already a mailbox with this email address'; $wb['domain_txt'] = 'Domain'; $wb["source_txt"] = 'Source Email'; +$wb['email_error_isemail'] = 'Please enter a valid email address.'; ?> -- GitLab From ccfc84e610de6a58eeb3b8f49209b82a9124c309 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Fri, 19 Dec 2014 10:42:40 +0100 Subject: [PATCH 044/287] - Fixed missing quotes on db selection --- interface/lib/classes/db_mysql.inc.php | 2 +- server/lib/classes/db_mysql.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index c8d569b6b..d9ec9b8d0 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -86,7 +86,7 @@ class db extends mysqli $this->_sqlerror('Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!'); return false; } - if(!((bool)mysqli_query( $this->_iConnId, "USE $this->dbName"))) { + if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) { $this->close(); $this->_sqlerror('Datenbank nicht gefunden / Database not found'); return false; diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index c0eed64b2..6f443fb00 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -86,7 +86,7 @@ class db extends mysqli $this->_sqlerror('Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!'); return false; } - if(!((bool)mysqli_query( $this->_iConnId, "USE $this->dbName"))) { + if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) { $this->close(); $this->_sqlerror('Datenbank nicht gefunden / Database not found'); return false; -- GitLab From 77cc4a99b15f4639b56c29a1207dc04b459c5d54 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Fri, 19 Dec 2014 18:18:11 +0100 Subject: [PATCH 045/287] - re-added jquery ui --- interface/web/themes/default/templates/main.tpl.htm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm index c87bec21c..160aa78fd 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -17,6 +17,9 @@ /assets/stylesheets/pushy.min.css' /> /assets/stylesheets/responsive.min.css' /> /assets/stylesheets/themes/default/theme.min.css' /> + + + -- GitLab From 7002a56285e3840197e4f43f893f92a2235d38be Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Fri, 19 Dec 2014 18:52:25 +0100 Subject: [PATCH 046/287] readd check that the dkim-path is not a symlink --- server/plugins-available/mail_plugin_dkim.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/plugins-available/mail_plugin_dkim.inc.php b/server/plugins-available/mail_plugin_dkim.inc.php index 3e00ada4a..9fb927ee7 100755 --- a/server/plugins-available/mail_plugin_dkim.inc.php +++ b/server/plugins-available/mail_plugin_dkim.inc.php @@ -143,7 +143,12 @@ class mail_plugin_dkim { mkdir($mail_config['dkim_path'], 0755, true); $app->log('No user amavis or vscan found - using root for '.$mail_config['dkim_path'], LOGLEVEL_WARNING); } - } + } else { + if (!$app->system->checkpath($mail_config['dkim_path'])) { + $app->log('Unable to write DKIM settings - invalid DKIM-Path (symlink?)', LOGLEVEL_ERROR); + $check=false; + } + } if (!is_writeable($mail_config['dkim_path'])) { $app->log('DKIM Path '.$mail_config['dkim_path'].' not writeable.', LOGLEVEL_ERROR); -- GitLab From bde8b10699fa250f22f1b813c28d8195bf397544 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Fri, 19 Dec 2014 19:07:29 +0100 Subject: [PATCH 047/287] DMARC requieres SPF and DKIM (this breaks the current draft but DMARC is useless if you use spf OR dkim) --- interface/web/dns/dns_dmarc_edit.php | 44 +++++----------------------- 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php index c4bc2b3fa..c3c219d38 100644 --- a/interface/web/dns/dns_dmarc_edit.php +++ b/interface/web/dns/dns_dmarc_edit.php @@ -225,56 +225,28 @@ class page_action extends tform_actions { } // end if user is not admin $domain_name = rtrim($soa['origin'], '.'); - // DMARC requieres at lest a spf OR dkim-record - // abort if more than 1 active spf-records (backward-compatibility) - $sql = "SELECT * FROM dns_rr WHERE name = ? AND type='TXT' AND data like 'v=spf1%' AND active='Y'"; - $temp = $app->db->queryAllRecords($sql, $domain_name.'.'); - if (is_array($temp[1])) { - if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; - $app->tform->errorMessage .= $app->tform->wordbook['dmarc_more_spf_txt'].$email; - } - - $sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND active = 'Y' AND (data LIKE 'v=DKIM1;%' OR data LIKE 'v=spf1%')"; - $temp = $app->db->queryAllRecords($sql, '%._domainkey.'.$domain_name.'.'); - if (empty($temp)) { - if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; - $app->tform->errorMessage .= $app->tform->wordbook['dmarc_no_dkim_spf_txt'].$email; - } - unset($temp); - //TODO: should DMARC requiere DKIM and SPF to be valid? This breaks draft-kucherawy-dmarc-base-07 but makes much more sense -/* // DMARC requieres at least one active dkim-record... $sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND data like 'v=DKIM1;%' AND active='Y'"; - $temp = $app->db->queryOneRecord($sql, '%._domainkey.'.$domain_name.'.'); + $temp = $app->db->queryAllRecords($sql, '%._domainkey.$domain_name'.'.'); if (!is_array($temp)) { if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; $app->tform->errorMessage .= $app->tform->wordbook['dmarc_no_dkim_txt'].$email; } - unset($temp); - // ... and dkim-signed mails to allow "policy != none" - $sql = "SELECT * FROM mail_domain WHERE domain = '".$app->db->quote($domain_name)."'"; - $temp = $app->db->queryOneRecord($sql); - if ($temp['dkim'] != 'y' && $this->dataRecord['dmarc_policy'] != 'none') { - if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; - $app->tform->errorMessage .= $app->tform->wordbook['dmarc_policy_error_txt'].$email; - } - unset($temp); - - // DMARC requieres an active spf-record - $sql = "SELECT * FROM dns_rr WHERE name = ? AND type='TXT' AND data like 'v=spf1%' AND active='Y'"; + // ... and an active spf-record (this breaks the current draft but DMARC is useless if you use DKIM or SPF + $sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND type='TXT' AND (data LIKE 'v=spf1;%' AND active = 'y')"; $temp = $app->db->queryAllRecords($sql, $domain_name.'.'); // abort if more than 1 active spf-records (backward-compatibility) if (is_array($temp[1])) { if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; - $app->tform->errorMessage .= $app->tform->wordbook['dmarc_more_spf_txt'].$email; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_more_spf_txt']; } if (empty($temp)) { if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; - $app->tform->errorMessage .= $app->tform->wordbook['dmarc_no_spf_txt'].$email; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_no_spf_txt']; } unset($temp); -*/ + //validate dmarc_pct $this->dataRecord['dmarc_pct'] = $app->functions->intval($this->dataRecord['dmarc_pct']); if ($this->dataRecord['dmarc_pct'] < 0) $this->dataRecord['dmarc_pct'] = 0; @@ -289,7 +261,7 @@ class page_action extends tform_actions { foreach ($dmarc_rua as $rec) { if (!filter_var($rec, FILTER_VALIDATE_EMAIL)) { if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; - $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_email_txt'].$dmarc_rua; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_email_txt'].': '.$dmarc_rua; } else { $temp .= 'mailto:'.$rec.','; } @@ -305,7 +277,7 @@ class page_action extends tform_actions { foreach ($dmarc_ruf as $rec) { if (!filter_var($rec, FILTER_VALIDATE_EMAIL)) { if (isset($app->tform->errorMessage )) $app->tform->errorMessage = '
' . $app->tform->errorMessage; - $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_email_txt'].$dmarc_rua; + $app->tform->errorMessage .= $app->tform->wordbook['dmarc_invalid_email_txt'].': '.$dmarc_rua; } else { $temp .= 'mailto:'.$rec.','; } -- GitLab From 825dd6792d2d46b7d97e1f1626a9071382977cd2 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Fri, 19 Dec 2014 21:15:19 +0100 Subject: [PATCH 048/287] - First run of template converting for new layout --- .../templates/directive_snippets_edit.htm | 55 +-- .../templates/directive_snippets_list.htm | 67 ++- .../web/admin/templates/firewall_edit.htm | 53 +- .../web/admin/templates/firewall_list.htm | 73 ++- interface/web/admin/templates/groups_edit.htm | 35 +- interface/web/admin/templates/groups_list.htm | 61 ++- .../web/admin/templates/iptables_edit.htm | 102 ++-- .../web/admin/templates/iptables_list.htm | 96 ++-- .../web/admin/templates/language_add.htm | 37 +- .../web/admin/templates/language_complete.htm | 24 +- .../web/admin/templates/language_edit.htm | 19 +- .../web/admin/templates/language_export.htm | 32 +- .../web/admin/templates/language_import.htm | 48 +- .../web/admin/templates/language_list.htm | 52 +- .../templates/remote_action_ispcupdate.htm | 26 +- .../templates/remote_action_osupdate.htm | 29 +- .../web/admin/templates/remote_user_edit.htm | 47 +- .../web/admin/templates/remote_user_list.htm | 63 ++- .../templates/server_config_cron_edit.htm | 47 +- .../templates/server_config_dns_edit.htm | 63 ++- .../templates/server_config_fastcgi_edit.htm | 87 ++-- .../templates/server_config_getmail_edit.htm | 31 +- .../templates/server_config_jailkit_edit.htm | 55 +-- .../admin/templates/server_config_list.htm | 40 +- .../templates/server_config_mail_edit.htm | 201 ++++---- .../templates/server_config_rescue_edit.htm | 31 +- .../templates/server_config_server_edit.htm | 185 ++++--- .../templates/server_config_ufw_edit.htm | 79 ++- .../templates/server_config_vlogger_edit.htm | 31 +- .../templates/server_config_web_edit.htm | 431 +++++++++-------- .../admin/templates/server_edit_config.htm | 27 +- .../admin/templates/server_edit_services.htm | 83 ++-- .../web/admin/templates/server_ip_edit.htm | 67 ++- .../web/admin/templates/server_ip_list.htm | 85 ++-- interface/web/admin/templates/server_list.htm | 78 +-- .../templates/server_php_fastcgi_edit.htm | 37 +- .../admin/templates/server_php_fpm_edit.htm | 45 +- .../web/admin/templates/server_php_list.htm | 67 ++- .../admin/templates/server_php_name_edit.htm | 45 +- .../admin/templates/software_package_edit.htm | 34 +- .../templates/software_package_install.htm | 24 +- .../admin/templates/software_package_list.htm | 61 ++- .../admin/templates/software_repo_edit.htm | 57 ++- .../admin/templates/software_repo_list.htm | 67 ++- .../admin/templates/software_update_list.htm | 52 +- .../templates/system_config_domains_edit.htm | 33 +- .../templates/system_config_mail_edit.htm | 139 +++--- .../templates/system_config_misc_edit.htm | 187 ++++---- .../templates/system_config_sites_edit.htm | 123 +++-- .../web/admin/templates/tpl_default_basic.htm | 29 +- .../web/admin/templates/users_groups_edit.htm | 37 +- interface/web/admin/templates/users_list.htm | 75 ++- .../web/admin/templates/users_user_edit.htm | 89 ++-- .../client/templates/client_circle_edit.htm | 45 +- .../client/templates/client_circle_list.htm | 73 ++- interface/web/client/templates/client_del.htm | 19 +- .../client/templates/client_edit_address.htm | 291 ++++++----- .../client/templates/client_edit_limits.htm | 436 ++++++++--------- .../web/client/templates/client_message.htm | 51 +- .../client_message_template_list.htm | 53 +- .../templates/client_template_edit_limits.htm | 413 ++++++++-------- .../client_template_edit_template.htm | 37 +- .../client/templates/client_template_list.htm | 67 ++- .../web/client/templates/clients_list.htm | 95 ++-- .../web/client/templates/domain_edit.htm | 37 +- .../web/client/templates/domain_list.htm | 55 ++- .../web/client/templates/message_template.htm | 44 +- .../templates/message_template_list.htm | 53 +- .../templates/reseller_edit_address.htm | 291 ++++++----- .../client/templates/reseller_edit_limits.htm | 452 +++++++++--------- .../web/client/templates/resellers_list.htm | 93 ++-- .../dashboard/dashlets/templates/limits.htm | 4 +- .../dashlets/templates/mailquota.htm | 6 +- .../dashboard/dashlets/templates/quota.htm | 6 +- interface/web/dns/templates/dns_a_edit.htm | 51 +- interface/web/dns/templates/dns_a_list.htm | 91 ++-- interface/web/dns/templates/dns_aaaa_edit.htm | 51 +- .../web/dns/templates/dns_alias_edit.htm | 51 +- .../web/dns/templates/dns_cname_edit.htm | 51 +- interface/web/dns/templates/dns_dkim_edit.htm | 48 +- .../web/dns/templates/dns_hinfo_edit.htm | 51 +- interface/web/dns/templates/dns_import.htm | 61 ++- interface/web/dns/templates/dns_mx_edit.htm | 59 ++- interface/web/dns/templates/dns_ns_edit.htm | 51 +- interface/web/dns/templates/dns_ptr_edit.htm | 51 +- .../web/dns/templates/dns_records_edit.htm | 4 +- interface/web/dns/templates/dns_rp_edit.htm | 51 +- .../dns/templates/dns_slave_admin_list.htm | 77 ++- .../web/dns/templates/dns_slave_edit.htm | 85 ++-- .../web/dns/templates/dns_slave_list.htm | 71 ++- .../web/dns/templates/dns_soa_admin_list.htm | 89 ++-- interface/web/dns/templates/dns_soa_edit.htm | 163 ++++--- interface/web/dns/templates/dns_soa_list.htm | 81 ++-- interface/web/dns/templates/dns_srv_edit.htm | 75 ++- .../web/dns/templates/dns_template_edit.htm | 45 +- .../web/dns/templates/dns_template_list.htm | 61 ++- interface/web/dns/templates/dns_txt_edit.htm | 51 +- interface/web/dns/templates/dns_wizard.htm | 115 +++-- interface/web/help/templates/faq_edit.htm | 37 +- .../templates/faq_manage_questions_list.htm | 51 +- .../web/help/templates/faq_sections_edit.htm | 25 +- .../web/help/templates/help_faq_list.htm | 4 +- .../help/templates/help_faq_sections_list.htm | 53 +- .../help/templates/support_message_edit.htm | 41 +- .../help/templates/support_message_list.htm | 67 ++- .../help/templates/support_message_view.htm | 31 +- interface/web/login/templates/index.htm | 38 +- .../web/login/templates/password_reset.htm | 32 +- .../web/mail/templates/mail_alias_edit.htm | 47 +- .../web/mail/templates/mail_alias_list.htm | 67 ++- .../mail/templates/mail_aliasdomain_edit.htm | 43 +- .../mail/templates/mail_aliasdomain_list.htm | 67 ++- .../mail/templates/mail_blacklist_edit.htm | 51 +- .../mail/templates/mail_blacklist_list.htm | 73 ++- .../templates/mail_content_filter_edit.htm | 67 ++- .../templates/mail_content_filter_list.htm | 73 ++- .../mail/templates/mail_domain_admin_list.htm | 73 ++- .../templates/mail_domain_catchall_edit.htm | 45 +- .../templates/mail_domain_catchall_list.htm | 67 ++- .../web/mail/templates/mail_domain_edit.htm | 114 +++-- .../web/mail/templates/mail_domain_list.htm | 67 ++- .../web/mail/templates/mail_forward_edit.htm | 43 +- .../web/mail/templates/mail_forward_list.htm | 67 ++- .../web/mail/templates/mail_get_edit.htm | 75 ++- .../web/mail/templates/mail_get_list.htm | 79 ++- .../mail/templates/mail_mailinglist_edit.htm | 97 ++-- .../mail/templates/mail_mailinglist_list.htm | 63 ++- .../templates/mail_relay_recipient_edit.htm | 43 +- .../templates/mail_relay_recipient_list.htm | 67 ++- .../mail/templates/mail_transport_edit.htm | 77 ++- .../mail/templates/mail_transport_list.htm | 79 ++- .../mail_user_autoresponder_edit.htm | 56 +-- .../web/mail/templates/mail_user_backup.htm | 37 +- .../mail/templates/mail_user_backup_list.htm | 38 +- .../templates/mail_user_custom_rules_edit.htm | 25 +- .../mail/templates/mail_user_filter_edit.htm | 45 +- .../mail/templates/mail_user_filter_list.htm | 42 +- .../web/mail/templates/mail_user_list.htm | 101 ++-- .../mail/templates/mail_user_mailbox_edit.htm | 113 +++-- .../templates/mail_user_mailfilter_edit.htm | 27 +- .../mail/templates/mail_user_stats_list.htm | 62 +-- .../mail/templates/mail_whitelist_edit.htm | 51 +- .../mail/templates/mail_whitelist_list.htm | 73 ++- .../templates/spamfilter_blacklist_edit.htm | 59 ++- .../templates/spamfilter_blacklist_list.htm | 79 ++- .../spamfilter_config_getmail_edit.htm | 21 +- .../mail/templates/spamfilter_config_list.htm | 55 ++- .../templates/spamfilter_config_mail_edit.htm | 83 ++-- .../spamfilter_config_server_edit.htm | 43 +- .../mail/templates/spamfilter_other_edit.htm | 133 +++--- .../mail/templates/spamfilter_policy_edit.htm | 85 ++-- .../mail/templates/spamfilter_policy_list.htm | 79 ++- .../templates/spamfilter_quarantine_edit.htm | 69 ++- .../templates/spamfilter_taglevel_edit.htm | 85 ++-- .../mail/templates/spamfilter_users_edit.htm | 69 ++- .../mail/templates/spamfilter_users_list.htm | 79 ++- .../templates/spamfilter_whitelist_edit.htm | 59 ++- .../templates/spamfilter_whitelist_list.htm | 79 ++- .../mail/templates/user_quota_stats_list.htm | 62 +-- interface/web/mailuser/templates/index.htm | 32 +- .../mail_user_autoresponder_edit.htm | 51 +- .../mailuser/templates/mail_user_cc_edit.htm | 33 +- .../templates/mail_user_filter_edit.htm | 49 +- .../templates/mail_user_filter_list.htm | 57 ++- .../templates/mail_user_password_edit.htm | 37 +- .../templates/mail_user_spamfilter_edit.htm | 33 +- .../web/monitor/templates/datalog_list.htm | 60 +-- interface/web/monitor/templates/show_data.htm | 8 +- interface/web/monitor/templates/show_log.htm | 28 +- .../web/monitor/templates/show_monit.htm | 4 +- .../web/monitor/templates/show_munin.htm | 4 +- .../web/monitor/templates/show_sys_state.htm | 28 +- .../web/monitor/templates/syslog_list.htm | 62 +-- .../sites/templates/aps_install_package.htm | 45 +- .../sites/templates/aps_instances_list.htm | 66 ++- .../templates/aps_packagedetails_show.htm | 42 +- .../web/sites/templates/aps_packages_list.htm | 54 +-- .../templates/aps_update_packagelist.htm | 26 +- interface/web/sites/templates/cron_edit.htm | 95 ++-- interface/web/sites/templates/cron_list.htm | 103 ++-- .../sites/templates/database_admin_list.htm | 101 ++-- .../web/sites/templates/database_edit.htm | 135 +++--- .../web/sites/templates/database_list.htm | 93 ++-- .../templates/database_quota_stats_list.htm | 62 +-- .../templates/database_user_admin_list.htm | 55 ++- .../sites/templates/database_user_edit.htm | 57 ++- .../sites/templates/database_user_list.htm | 55 ++- .../web/sites/templates/ftp_user_advanced.htm | 89 ++-- .../templates/ftp_user_advanced_client.htm | 33 +- .../web/sites/templates/ftp_user_edit.htm | 61 ++- .../web/sites/templates/ftp_user_list.htm | 75 ++- .../sites/templates/shell_user_advanced.htm | 53 +- .../web/sites/templates/shell_user_edit.htm | 79 ++- .../web/sites/templates/shell_user_list.htm | 73 ++- .../sites/templates/user_quota_stats_list.htm | 70 +-- .../web/sites/templates/web_backup_list.htm | 42 +- .../templates/web_childdomain_advanced.htm | 25 +- .../sites/templates/web_childdomain_edit.htm | 113 +++-- .../sites/templates/web_childdomain_list.htm | 73 ++- .../templates/web_directive_snippets.htm | 8 +- .../web/sites/templates/web_folder_edit.htm | 43 +- .../web/sites/templates/web_folder_list.htm | 73 ++- .../sites/templates/web_folder_user_edit.htm | 55 +-- .../sites/templates/web_folder_user_list.htm | 67 ++- .../sites/templates/web_sites_stats_list.htm | 74 +-- .../templates/web_vhost_domain_admin_list.htm | 85 ++-- .../templates/web_vhost_domain_advanced.htm | 143 +++--- .../templates/web_vhost_domain_backup.htm | 45 +- .../sites/templates/web_vhost_domain_edit.htm | 249 +++++----- .../sites/templates/web_vhost_domain_list.htm | 79 ++- .../templates/web_vhost_domain_redirect.htm | 49 +- .../sites/templates/web_vhost_domain_ssl.htm | 99 ++-- .../templates/web_vhost_domain_stats.htm | 45 +- .../web/sites/templates/webdav_user_edit.htm | 65 ++- .../web/sites/templates/webdav_user_list.htm | 73 ++- .../web/themes/blue/templates/main.tpl.htm | 10 +- .../web/themes/default/templates/main.tpl.htm | 14 +- .../themes/default/templates/module.tpl.htm | 2 +- .../default/templates/module_tree.tpl.htm | 2 +- .../default_64_navimg/templates/main.tpl.htm | 6 +- .../default_combobox/templates/main.tpl.htm | 10 +- .../default_no_navimg/templates/main.tpl.htm | 6 +- .../web/tools/templates/dns_import_tupa.htm | 59 ++- .../web/tools/templates/import_ispconfig.htm | 134 +++--- .../web/tools/templates/import_plesk.htm | 99 ++-- .../web/tools/templates/import_vpopmail.htm | 66 +-- interface/web/tools/templates/index.htm | 12 +- .../tools/templates/interface_settings.htm | 37 +- interface/web/tools/templates/resync.htm | 201 ++++---- interface/web/tools/templates/tpl_default.htm | 23 +- .../web/tools/templates/user_settings.htm | 41 +- interface/web/vm/templates/openvz_action.htm | 65 ++- interface/web/vm/templates/openvz_ip_edit.htm | 51 +- interface/web/vm/templates/openvz_ip_list.htm | 73 ++- .../vm/templates/openvz_ostemplate_edit.htm | 61 ++- .../vm/templates/openvz_ostemplate_list.htm | 79 ++- .../openvz_template_advanced_edit.htm | 205 ++++---- .../web/vm/templates/openvz_template_edit.htm | 117 +++-- .../web/vm/templates/openvz_template_list.htm | 61 ++- .../vm/templates/openvz_vm_advanced_edit.htm | 107 ++--- interface/web/vm/templates/openvz_vm_edit.htm | 123 +++-- interface/web/vm/templates/openvz_vm_list.htm | 93 ++-- 242 files changed, 8249 insertions(+), 8699 deletions(-) mode change 100755 => 100644 interface/web/mail/templates/mail_domain_edit.htm diff --git a/interface/web/admin/templates/directive_snippets_edit.htm b/interface/web/admin/templates/directive_snippets_edit.htm index ca5cb9651..cc4530988 100644 --- a/interface/web/admin/templates/directive_snippets_edit.htm +++ b/interface/web/admin/templates/directive_snippets_edit.htm @@ -1,47 +1,44 @@ -

+

-
- -
-
-
- - -
-
- - +
+
+ +
-
-
- +
+
+   {tmpl_var name='variables_txt'}: {DOCROOT}, {FASTCGIPASS}
-
-

{tmpl_var name='customer_viewable_txt'}

-
+
+ +
{tmpl_var name='customer_viewable'}
-
-

{tmpl_var name='active_txt'}

-
+
+ +
{tmpl_var name='active'}
- + -
- - -
-
- -
+
+ + +
diff --git a/interface/web/dns/templates/dns_hinfo_edit.htm b/interface/web/dns/templates/dns_hinfo_edit.htm index 0a9e0282f..55ee2514a 100644 --- a/interface/web/dns/templates/dns_hinfo_edit.htm +++ b/interface/web/dns/templates/dns_hinfo_edit.htm @@ -1,38 +1,35 @@ -

+

-
-
-
-
- - -
-
- - -
-
- - -
-
-

{tmpl_var name='active_txt'}

-
+ +
+ +
+
+
+ +
+
+
+ +
+
+
+ +
{tmpl_var name='active'}
-
+ -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/dns/templates/dns_import.htm b/interface/web/dns/templates/dns_import.htm index d4806e10f..c25dcda6c 100644 --- a/interface/web/dns/templates/dns_import.htm +++ b/interface/web/dns/templates/dns_import.htm @@ -1,48 +1,48 @@ -

+

-
-
-
+ -
- - {tmpl_var name='server_id'} -
-
- - {tmpl_var name='client_group_id'} -
+
-
- - {tmpl_var name='server_id'} -
+
-
- +
+ - {tmpl_var name='domain_option'} - - - +
+
+

-
- +
+
@@ -55,15 +55,10 @@ -
- - -
- - -
- -
+
+ + +
diff --git a/interface/web/mail/templates/mail_domain_list.htm b/interface/web/mail/templates/mail_domain_list.htm index 402515067..24fad5ce5 100644 --- a/interface/web/mail/templates/mail_domain_list.htm +++ b/interface/web/mail/templates/mail_domain_list.htm @@ -1,9 +1,9 @@ -

+

-
-
@@ -20,42 +20,42 @@

-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + - - - - - + + + + - - - - + + + @@ -67,11 +67,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="domain"} - {tmpl_var name='delete_txt'} + {tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="domain"} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/mail_forward_edit.htm b/interface/web/mail/templates/mail_forward_edit.htm index 5e076dc55..909600f5a 100644 --- a/interface/web/mail/templates/mail_forward_edit.htm +++ b/interface/web/mail/templates/mail_forward_edit.htm @@ -1,37 +1,34 @@ -

+

-
-
-
-
-

* {tmpl_var name='email_txt'}

-
- - - + +
+ +
+ + +
-
- +
+
-
-

{tmpl_var name='active_txt'}

-
+
+ +
{tmpl_var name='active'}
-
+ -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/mail_forward_list.htm b/interface/web/mail/templates/mail_forward_list.htm index 48e85f10a..c68fa361f 100644 --- a/interface/web/mail/templates/mail_forward_list.htm +++ b/interface/web/mail/templates/mail_forward_list.htm @@ -1,9 +1,9 @@ -

+

-
-
@@ -20,42 +20,42 @@

-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + - - - - - + + + + - - - - + + + @@ -67,11 +67,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="active"}{tmpl_var name="source"}{tmpl_var name="destination"} - {tmpl_var name='delete_txt'} + {tmpl_var name="active"}{tmpl_var name="source"}{tmpl_var name="destination"} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/mail_get_edit.htm b/interface/web/mail/templates/mail_get_edit.htm index 1f5e6a936..61e61233a 100644 --- a/interface/web/mail/templates/mail_get_edit.htm +++ b/interface/web/mail/templates/mail_get_edit.htm @@ -1,60 +1,57 @@ -

+

-
-
-
-
- - {tmpl_var name='type'} -
-
- - -
-
- - -
-
- +
+
+ +
+
+
+ +
+
+
+
-
-

{tmpl_var name='source_delete_txt'}

-
+
+ +
{tmpl_var name='source_delete'} {tmpl_var name="source_delete_note_txt"}
-
-

{tmpl_var name='source_read_all_txt'}

-
+
+ +
{tmpl_var name='source_read_all'}
-
- - {tmpl_var name='destination'} -
-
-

{tmpl_var name='active_txt'}

-
+
+
+ +
{tmpl_var name='active'}
- + -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/mail_get_list.htm b/interface/web/mail/templates/mail_get_list.htm index a4784f967..417da8adf 100644 --- a/interface/web/mail/templates/mail_get_list.htm +++ b/interface/web/mail/templates/mail_get_list.htm @@ -1,9 +1,9 @@ -

+

-
-
@@ -20,48 +20,48 @@

-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + @@ -73,11 +73,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="source_server"}{tmpl_var name="source_username"}{tmpl_var name="destination"} - {tmpl_var name='delete_txt'} + {tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="source_server"}{tmpl_var name="source_username"}{tmpl_var name="destination"} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file +
+ + \ No newline at end of file diff --git a/interface/web/mail/templates/mail_mailinglist_edit.htm b/interface/web/mail/templates/mail_mailinglist_edit.htm index d9ec0ca6f..e7256b7f2 100644 --- a/interface/web/mail/templates/mail_mailinglist_edit.htm +++ b/interface/web/mail/templates/mail_mailinglist_edit.htm @@ -1,86 +1,83 @@ -

+

-
-
-
Mailing List + Mailing List -
- - {tmpl_var name='client_group_id'} -
+
-
- - {tmpl_var name='client_group_id'} -
+
-
- - {tmpl_var name='domain_option'} - +
-
- - - +
+ +
+
-
- - - +
+ +
+
-
- - {tmpl_var name='domain_option'} -
-
- - -
-
- - -
+
+
+ +
+
+
+ +
+
-
- +
+  {tmpl_var name='generate_password_txt'}
-
-

{tmpl_var name='password_strength_txt'}

+
+

 

-
- +
+
- + -
- - -
-
- -
+
+ + +
diff --git a/interface/web/mail/templates/mail_mailinglist_list.htm b/interface/web/mail/templates/mail_mailinglist_list.htm index 12ddd957b..ff1c0c464 100644 --- a/interface/web/mail/templates/mail_mailinglist_list.htm +++ b/interface/web/mail/templates/mail_mailinglist_list.htm @@ -1,8 +1,8 @@ -

+ -
-
@@ -19,42 +19,42 @@

-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + - - - - + + + - - - + + @@ -66,11 +66,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="listname"}{tmpl_var name="domain"} + {tmpl_var name="listname"}{tmpl_var name="domain"} - {tmpl_var name='mailinglist_txt'} + {tmpl_var name='mailinglist_txt'} - {tmpl_var name='delete_txt'} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file +
+ + \ No newline at end of file diff --git a/interface/web/mail/templates/mail_relay_recipient_edit.htm b/interface/web/mail/templates/mail_relay_recipient_edit.htm index 0e5999c08..563492193 100644 --- a/interface/web/mail/templates/mail_relay_recipient_edit.htm +++ b/interface/web/mail/templates/mail_relay_recipient_edit.htm @@ -1,35 +1,32 @@ -

+

-
-
-
Relay recipient -
- - {tmpl_var name='server_id'} -
-
- - -
-
-

{tmpl_var name='active_txt'}

-
+
+
+ +
+
+
+ +
{tmpl_var name='active'}
-
+ -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/mail_relay_recipient_list.htm b/interface/web/mail/templates/mail_relay_recipient_list.htm index 33f528156..aca3b6fec 100644 --- a/interface/web/mail/templates/mail_relay_recipient_list.htm +++ b/interface/web/mail/templates/mail_relay_recipient_list.htm @@ -1,8 +1,8 @@ -

+ -
-
@@ -19,42 +19,42 @@

-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + - - - - - + + + + - - - - + + + @@ -66,11 +66,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="source"} - {tmpl_var name='delete_txt'} + {tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="source"} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/mail_transport_edit.htm b/interface/web/mail/templates/mail_transport_edit.htm index cd1e8c99b..07e774c5d 100644 --- a/interface/web/mail/templates/mail_transport_edit.htm +++ b/interface/web/mail/templates/mail_transport_edit.htm @@ -1,56 +1,53 @@ -

+

-
-
-
-
- - {tmpl_var name='server_id'} -
-
- - -
-
- - +
+
+ +
+
+
+ +
+
+
-
-

{tmpl_var name='mx_txt'}

-
- -
-
-
- - -
-
- - +
+
+ +
-
-
-

{tmpl_var name='active_txt'}

-
+
+
+ +
{tmpl_var name='active'}
- + -
- - -
-
- - \ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/mail_transport_list.htm b/interface/web/mail/templates/mail_transport_list.htm index cac01bd42..3dfed0aa9 100644 --- a/interface/web/mail/templates/mail_transport_list.htm +++ b/interface/web/mail/templates/mail_transport_list.htm @@ -1,9 +1,9 @@ -

+

-
-
@@ -20,48 +20,48 @@

-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + @@ -73,11 +73,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="domain"}{tmpl_var name="transport"}{tmpl_var name="sort_order"} - {tmpl_var name='delete_txt'} + {tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="domain"}{tmpl_var name="transport"}{tmpl_var name="sort_order"} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/mail_user_autoresponder_edit.htm b/interface/web/mail/templates/mail_user_autoresponder_edit.htm index 4ff8c813e..88e86165b 100644 --- a/interface/web/mail/templates/mail_user_autoresponder_edit.htm +++ b/interface/web/mail/templates/mail_user_autoresponder_edit.htm @@ -1,44 +1,38 @@ -

+

-
- -
-
-
- - -
-
- + + +
+ +
+
+
+
-
- - + +
-
-
- +
+
+ {tmpl_var name='autoresponder_start_date'}  {tmpl_var name='now_txt'}
-
- +
+ {tmpl_var name='autoresponder_end_date'}
-
+ -
- - + -
-
- -
\ No newline at end of file + \ No newline at end of file diff --git a/interface/web/mail/templates/mail_user_backup.htm b/interface/web/mail/templates/mail_user_backup.htm index e3aa096bc..a6e2650bc 100644 --- a/interface/web/mail/templates/mail_user_backup.htm +++ b/interface/web/mail/templates/mail_user_backup.htm @@ -1,4 +1,6 @@ -

+

@@ -10,30 +12,25 @@ -
-
-
Backup -
- - {tmpl_var name='backup_interval'} -
-
- - {tmpl_var name='backup_copies'} -
-
+
+ {tmpl_var name='backup_records'} -
- - -
- - - +
+ + +
diff --git a/interface/web/mail/templates/mail_user_backup_list.htm b/interface/web/mail/templates/mail_user_backup_list.htm index 7fc61fd09..6b00afd89 100644 --- a/interface/web/mail/templates/mail_user_backup_list.htm +++ b/interface/web/mail/templates/mail_user_backup_list.htm @@ -6,29 +6,28 @@

-
- -
-
- - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + - - - - + + + @@ -41,7 +40,6 @@
{tmpl_var name='search_limit'}
{tmpl_var name="date"}{tmpl_var name="filename"}{tmpl_var name="filesize"} + {tmpl_var name="date"}{tmpl_var name="filename"}{tmpl_var name="filesize"}
- -
-
-
-
+ + diff --git a/interface/web/mail/templates/mail_user_custom_rules_edit.htm b/interface/web/mail/templates/mail_user_custom_rules_edit.htm index 31549df0d..3ce8bb098 100644 --- a/interface/web/mail/templates/mail_user_custom_rules_edit.htm +++ b/interface/web/mail/templates/mail_user_custom_rules_edit.htm @@ -1,22 +1,19 @@ -

+

-
-
-
-
- + +
+
-
+ -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/mail_user_filter_edit.htm b/interface/web/mail/templates/mail_user_filter_edit.htm index f7fb4c70a..5ded556a6 100644 --- a/interface/web/mail/templates/mail_user_filter_edit.htm +++ b/interface/web/mail/templates/mail_user_filter_edit.htm @@ -1,38 +1,35 @@ -

+

-
-
-
-
- - -
-
- + +
+ +
+
+
+

-
+
-
- +
+

-
+
-
- +
+ {tmpl_var name='active'}
-
+ -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/mail_user_filter_list.htm b/interface/web/mail/templates/mail_user_filter_list.htm index 2d7a6deb7..6b79ac019 100644 --- a/interface/web/mail/templates/mail_user_filter_list.htm +++ b/interface/web/mail/templates/mail_user_filter_list.htm @@ -16,35 +16,35 @@
{tmpl_var name="toolsarea_head_txt"} -
- -
+
- -
-
- - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + - - - + + - - + @@ -56,9 +56,9 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="rulename"} - {tmpl_var name='delete_txt'} + {tmpl_var name="rulename"} + {tmpl_var name='delete_txt'}
-
-
\ No newline at end of file + + diff --git a/interface/web/mail/templates/mail_user_list.htm b/interface/web/mail/templates/mail_user_list.htm index 3d9f09f9b..d0c9746b0 100644 --- a/interface/web/mail/templates/mail_user_list.htm +++ b/interface/web/mail/templates/mail_user_list.htm @@ -1,9 +1,9 @@ -

+

-
-
@@ -20,64 +20,64 @@

-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + + + + + - - - - - - + + + + + - + - - - - - - - - + + + + + + @@ -89,11 +89,10 @@ - +
{tmpl_var name='search_limit'}
- - - - - +
+ + + + +
{tmpl_var name="email"}{tmpl_var name="email"} + {tmpl_var name="login"} {tmpl_var name="name"}{tmpl_var name="autoresponder"}{tmpl_var name="postfix"}{tmpl_var name="disablesmtp"}{tmpl_var name="disableimap"}{tmpl_var name="disablepop3"} + {tmpl_var name="name"}{tmpl_var name="autoresponder"}{tmpl_var name="postfix"}{tmpl_var name="disablesmtp"}{tmpl_var name="disableimap"}{tmpl_var name="disablepop3"} - {tmpl_var name="webmail_txt"} + {tmpl_var name="webmail_txt"} - {tmpl_var name='delete_txt'} + {tmpl_var name='delete_txt'}
98">
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/mail_user_mailbox_edit.htm b/interface/web/mail/templates/mail_user_mailbox_edit.htm index 186b03d4e..650835a32 100644 --- a/interface/web/mail/templates/mail_user_mailbox_edit.htm +++ b/interface/web/mail/templates/mail_user_mailbox_edit.htm @@ -1,91 +1,88 @@ -

+

-
-
-
-
- -   {tmpl_var name='name_optional_txt'} -
-
-

* {tmpl_var name='email_txt'}

-
- - - + +
+ +
  {tmpl_var name='name_optional_txt'} +
+
+ +
+ + +
-
- - +
+ +
-
- +
+  {tmpl_var name='generate_password_txt'}
-
-

{tmpl_var name='password_strength_txt'}

+
+

 

-
- +
+
-
- -

MB

-
-
- -   {tmpl_var name='name_optional_txt'} {tmpl_var name='cc_note_txt'} -
-
- -   {tmpl_var name='name_optional_txt'} {tmpl_var name='sender_cc_note_txt'} +
+ +
-
- -   {tmpl_var name='name_optional_txt'} {tmpl_var name='cc_note_txt'} +
+
+ +
  {tmpl_var name='name_optional_txt'} {tmpl_var name='sender_cc_note_txt'} +
+
+ +
-
-
-

{tmpl_var name='postfix_txt'}

-
+
+
+ +
{tmpl_var name='postfix'}
-
-

{tmpl_var name='disablesmtp_txt'}

-
+
+ +
{tmpl_var name='disablesmtp'}
-
-

{tmpl_var name='disableimap_txt'}

-
+
+ +
{tmpl_var name='disableimap'}
-
-

{tmpl_var name='disablepop3_txt'}

-
+
+ +
{tmpl_var name='disablepop3'}
-
+ -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/mail_user_mailfilter_edit.htm b/interface/web/mail/templates/mail_user_mailfilter_edit.htm index 3274685fe..b1de5c97c 100644 --- a/interface/web/mail/templates/mail_user_mailfilter_edit.htm +++ b/interface/web/mail/templates/mail_user_mailfilter_edit.htm @@ -1,26 +1,23 @@ -

+

-
-
-
-
-

{tmpl_var name='move_junk_txt'}

-
+ +
+ +
{tmpl_var name='move_junk'}
-
+ {tmpl_var name='filter_records'} -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/mail_user_stats_list.htm b/interface/web/mail/templates/mail_user_stats_list.htm index 35e2235e6..23b316366 100644 --- a/interface/web/mail/templates/mail_user_stats_list.htm +++ b/interface/web/mail/templates/mail_user_stats_list.htm @@ -1,40 +1,41 @@ -

+

-
-
-
- - - - - - - - - +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + + @@ -46,11 +47,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="email"}{tmpl_var name="this_month"}{tmpl_var name="last_month"}{tmpl_var name="this_year"}{tmpl_var name="last_year"}{tmpl_var name="email"}{tmpl_var name="this_month"}{tmpl_var name="last_month"}{tmpl_var name="this_year"}{tmpl_var name="last_year"}
-
-
-
+ + diff --git a/interface/web/mail/templates/mail_whitelist_edit.htm b/interface/web/mail/templates/mail_whitelist_edit.htm index d36434941..da1d93656 100644 --- a/interface/web/mail/templates/mail_whitelist_edit.htm +++ b/interface/web/mail/templates/mail_whitelist_edit.htm @@ -1,41 +1,38 @@ -

+

-
-
-
-
- - {tmpl_var name='server_id'} -
-
- - -
-
- - +
+
+ +
-
-
-

{tmpl_var name='active_txt'}

-
+
+
+ +
{tmpl_var name='active'}
- + -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/mail_whitelist_list.htm b/interface/web/mail/templates/mail_whitelist_list.htm index 882aa581d..d7ab68eb5 100644 --- a/interface/web/mail/templates/mail_whitelist_list.htm +++ b/interface/web/mail/templates/mail_whitelist_list.htm @@ -1,48 +1,48 @@ -

+

-
-
-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + - - - - - - + + + + + - - - - - + + + + @@ -54,11 +54,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="source"}{tmpl_var name="type"} - {tmpl_var name='delete_txt'} + {tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="source"}{tmpl_var name="type"} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_blacklist_edit.htm b/interface/web/mail/templates/spamfilter_blacklist_edit.htm index ae5b3eecb..aff0b2e0b 100644 --- a/interface/web/mail/templates/spamfilter_blacklist_edit.htm +++ b/interface/web/mail/templates/spamfilter_blacklist_edit.htm @@ -1,49 +1,46 @@ -

+

-
-
-
+ -
- - {tmpl_var name='rid'} -
-
- - -
-
- - +
+
+ +
-
-
-

{tmpl_var name='active_txt'}

-
+
+
+ +
{tmpl_var name='active'}
- + -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_blacklist_list.htm b/interface/web/mail/templates/spamfilter_blacklist_list.htm index 3407d4a71..87cb73ab7 100644 --- a/interface/web/mail/templates/spamfilter_blacklist_list.htm +++ b/interface/web/mail/templates/spamfilter_blacklist_list.htm @@ -1,51 +1,51 @@ -

+

-
-
-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + @@ -57,11 +57,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="priority"}{tmpl_var name="rid"}{tmpl_var name="email"} - {tmpl_var name='delete_txt'} + {tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="priority"}{tmpl_var name="rid"}{tmpl_var name="email"} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_config_getmail_edit.htm b/interface/web/mail/templates/spamfilter_config_getmail_edit.htm index 4dd0710f4..a59f29b38 100644 --- a/interface/web/mail/templates/spamfilter_config_getmail_edit.htm +++ b/interface/web/mail/templates/spamfilter_config_getmail_edit.htm @@ -1,22 +1,19 @@ -

+

-
-
- - - + +
+
- - -
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_config_list.htm b/interface/web/mail/templates/spamfilter_config_list.htm index cd43b4d4d..64eef6c5e 100644 --- a/interface/web/mail/templates/spamfilter_config_list.htm +++ b/interface/web/mail/templates/spamfilter_config_list.htm @@ -1,39 +1,39 @@ -

+

-
-
-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - + +

+
+
 
+ + + + - - - + + - - + @@ -45,11 +45,10 @@ - +
 
- +
+
{tmpl_var name="server_name"} - {tmpl_var name='delete_txt'} + {tmpl_var name="server_name"} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_config_mail_edit.htm b/interface/web/mail/templates/spamfilter_config_mail_edit.htm index 22f5b9fb0..e9d275618 100644 --- a/interface/web/mail/templates/spamfilter_config_mail_edit.htm +++ b/interface/web/mail/templates/spamfilter_config_mail_edit.htm @@ -1,66 +1,63 @@ -

+

-
-
- + - - - + +
+
- - - + +
+
- - - + +
+
- - - + +
+
- - - + +
+
- - - + +
+
- - - + +
+
- - - + +
+
- - - + +
+
- - - + +
+
- - - + +
+
- - -
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_config_server_edit.htm b/interface/web/mail/templates/spamfilter_config_server_edit.htm index e91d4a0ea..7420edd4d 100644 --- a/interface/web/mail/templates/spamfilter_config_server_edit.htm +++ b/interface/web/mail/templates/spamfilter_config_server_edit.htm @@ -1,38 +1,35 @@ -

+

-
-
- - - + +
+
- - - + +
+
- - - + +
+
- - - + +
+
- - - + +
+
- - + +
-
- -
diff --git a/interface/web/mail/templates/spamfilter_other_edit.htm b/interface/web/mail/templates/spamfilter_other_edit.htm index a25a2e70e..911e34dc1 100644 --- a/interface/web/mail/templates/spamfilter_other_edit.htm +++ b/interface/web/mail/templates/spamfilter_other_edit.htm @@ -1,80 +1,77 @@ -

+

-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - +
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
-
-
- - {tmpl_var name='warnbannedrecip'} -
-
- - {tmpl_var name='warnbadhrecip'} -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -  Bytes -
-
- - -
- +
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
 Bytes +
+
+ +
+
+ -
- - -
- - - +
+ + +
diff --git a/interface/web/mail/templates/spamfilter_policy_edit.htm b/interface/web/mail/templates/spamfilter_policy_edit.htm index 3ed6b8371..e1698a06e 100644 --- a/interface/web/mail/templates/spamfilter_policy_edit.htm +++ b/interface/web/mail/templates/spamfilter_policy_edit.htm @@ -1,64 +1,61 @@ -

+

-
-
-
-
- - -
-
- - +
+
+ +
-
-
- - {tmpl_var name='spam_lover'} -
-
- - {tmpl_var name='banned_files_lover'} -
-
- - {tmpl_var name='bad_header_lover'} -
-
- - {tmpl_var name='bypass_virus_checks'} -
-
- - {tmpl_var name='bypass_banned_checks'} -
-
- - {tmpl_var name='bypass_header_checks'} -
- +
+ -
- - -
- - - \ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_policy_list.htm b/interface/web/mail/templates/spamfilter_policy_list.htm index 269c5144f..c7443b322 100644 --- a/interface/web/mail/templates/spamfilter_policy_list.htm +++ b/interface/web/mail/templates/spamfilter_policy_list.htm @@ -1,51 +1,51 @@ -

+

-
-
-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + @@ -58,11 +58,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="policy_name"}{tmpl_var name="virus_lover"}{tmpl_var name="spam_lover"}{tmpl_var name="banned_files_lover"}{tmpl_var name="bad_header_lover"} - {tmpl_var name='delete_txt'} + {tmpl_var name="policy_name"}{tmpl_var name="virus_lover"}{tmpl_var name="spam_lover"}{tmpl_var name="banned_files_lover"}{tmpl_var name="bad_header_lover"} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_quarantine_edit.htm b/interface/web/mail/templates/spamfilter_quarantine_edit.htm index 4a38d7ffb..053e94b9c 100644 --- a/interface/web/mail/templates/spamfilter_quarantine_edit.htm +++ b/interface/web/mail/templates/spamfilter_quarantine_edit.htm @@ -1,44 +1,41 @@ -

+

-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
+ +
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
-
+ -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_taglevel_edit.htm b/interface/web/mail/templates/spamfilter_taglevel_edit.htm index 059ab155b..c9d27aa0a 100644 --- a/interface/web/mail/templates/spamfilter_taglevel_edit.htm +++ b/interface/web/mail/templates/spamfilter_taglevel_edit.htm @@ -1,52 +1,49 @@ -

+

-
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - +
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
-
-
- - -
-
- - -
- +
+
+ +
+
+
+ +
+
+ -
- - -
- - - \ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_users_edit.htm b/interface/web/mail/templates/spamfilter_users_edit.htm index 52e5945f4..15847ae5c 100644 --- a/interface/web/mail/templates/spamfilter_users_edit.htm +++ b/interface/web/mail/templates/spamfilter_users_edit.htm @@ -1,50 +1,47 @@ -

+

-
-
-
-
- - {tmpl_var name='server_id'} -
-
- - {tmpl_var name='priority'} -
-
- - {tmpl_var name='policy_id'} -
-
- - -
-
- - -
-
- - +
+
+ +
+
+
+ +
-
- +
+ -
- - -
- - - \ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_users_list.htm b/interface/web/mail/templates/spamfilter_users_list.htm index 34b4b2de1..d62d9c091 100644 --- a/interface/web/mail/templates/spamfilter_users_list.htm +++ b/interface/web/mail/templates/spamfilter_users_list.htm @@ -1,51 +1,51 @@ -

+

-
-
-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + @@ -57,11 +57,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="local"}{tmpl_var name="server_id"}{tmpl_var name="priority"}{tmpl_var name="policy_id"}{tmpl_var name="fullname"} - {tmpl_var name='delete_txt'} + {tmpl_var name="local"}{tmpl_var name="server_id"}{tmpl_var name="priority"}{tmpl_var name="policy_id"}{tmpl_var name="fullname"} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_whitelist_edit.htm b/interface/web/mail/templates/spamfilter_whitelist_edit.htm index efb70186f..beb752500 100644 --- a/interface/web/mail/templates/spamfilter_whitelist_edit.htm +++ b/interface/web/mail/templates/spamfilter_whitelist_edit.htm @@ -1,49 +1,46 @@ -

+

-
-
-
+ -
- - {tmpl_var name='rid'} -
-
- - -
-
- - +
+
+ +
-
-
-

{tmpl_var name='active_txt'}

-
+
+
+ +
{tmpl_var name='active'}
- + -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mail/templates/spamfilter_whitelist_list.htm b/interface/web/mail/templates/spamfilter_whitelist_list.htm index ea4d7240a..1d6af875f 100644 --- a/interface/web/mail/templates/spamfilter_whitelist_list.htm +++ b/interface/web/mail/templates/spamfilter_whitelist_list.htm @@ -1,51 +1,51 @@ -

+

-
-
-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + @@ -58,11 +58,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="priority"}{tmpl_var name="rid"}{tmpl_var name="email"} - {tmpl_var name='delete_txt'} + {tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="priority"}{tmpl_var name="rid"}{tmpl_var name="email"} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mail/templates/user_quota_stats_list.htm b/interface/web/mail/templates/user_quota_stats_list.htm index e700557ab..e01f571bf 100644 --- a/interface/web/mail/templates/user_quota_stats_list.htm +++ b/interface/web/mail/templates/user_quota_stats_list.htm @@ -1,39 +1,40 @@ -

+ -
-
-
- - - - - - - - - +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + + - - - - - - - + + + + + + - - - - - - + + + + + + @@ -44,11 +45,10 @@ - +
{tmpl_var name='search_limit'}
    - +
    +
{tmpl_var name="email"}{tmpl_var name="name"}{tmpl_var name="used"}{tmpl_var name="quota"}{tmpl_var name="percentage"}{tmpl_var name="email"}{tmpl_var name="name"}{tmpl_var name="used"}{tmpl_var name="quota"}{tmpl_var name="percentage"}
-
-
-
+ + diff --git a/interface/web/mailuser/templates/index.htm b/interface/web/mailuser/templates/index.htm index c320253e1..e9ac8ad0e 100644 --- a/interface/web/mailuser/templates/index.htm +++ b/interface/web/mailuser/templates/index.htm @@ -1,34 +1,36 @@ -

+

-
-
-

{tmpl_var name='email_txt'}

+ +
+

{tmpl_var name='email'}

-
-

{tmpl_var name='login_txt'}

+
+

{tmpl_var name='login'}

-
-

{tmpl_var name='server_address_txt'}

+
+

{tmpl_var name='server_name'}

-
-

{tmpl_var name='quota_txt'}

+
+

{tmpl_var name='quota'}

-
-

{tmpl_var name='cc_txt'}

+
+

{tmpl_var name='cc'}

-
+
  -
-
+
+ \ No newline at end of file diff --git a/interface/web/mailuser/templates/mail_user_autoresponder_edit.htm b/interface/web/mailuser/templates/mail_user_autoresponder_edit.htm index 34b7f0d23..bb4ebc7ef 100644 --- a/interface/web/mailuser/templates/mail_user_autoresponder_edit.htm +++ b/interface/web/mailuser/templates/mail_user_autoresponder_edit.htm @@ -1,37 +1,34 @@ -

+

-
- -
-
-
- - -
-
- + + +
+ +
+
+
+
-
- - -
-
- +
+ +
+
+
+ {tmpl_var name='autoresponder_start_date'}  {tmpl_var name='now_txt'}
-
- +
+ {tmpl_var name='autoresponder_end_date'}
-
+ -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mailuser/templates/mail_user_cc_edit.htm b/interface/web/mailuser/templates/mail_user_cc_edit.htm index 3b82c4647..0ba06e8a1 100644 --- a/interface/web/mailuser/templates/mail_user_cc_edit.htm +++ b/interface/web/mailuser/templates/mail_user_cc_edit.htm @@ -1,26 +1,23 @@ -

+

-
-
-
-
-

{tmpl_var name='email_txt'}

+ +
+

{tmpl_var name='email'}

-
- -   {tmpl_var name='name_optional_txt'} {tmpl_var name='cc_note_txt'} -
-
+
+ +
  {tmpl_var name='name_optional_txt'} {tmpl_var name='cc_note_txt'} +
+ -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mailuser/templates/mail_user_filter_edit.htm b/interface/web/mailuser/templates/mail_user_filter_edit.htm index 320567742..2004c2c4b 100644 --- a/interface/web/mailuser/templates/mail_user_filter_edit.htm +++ b/interface/web/mailuser/templates/mail_user_filter_edit.htm @@ -1,38 +1,35 @@ -

+

-
-
-
-
- - -
-
- + +
+ +
+
+
+ - -
-
- +
+
+
+ - -
-
- +
+
+
+ {tmpl_var name='active'}
-
+ -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mailuser/templates/mail_user_filter_list.htm b/interface/web/mailuser/templates/mail_user_filter_list.htm index 072518309..69d5a6c59 100644 --- a/interface/web/mailuser/templates/mail_user_filter_list.htm +++ b/interface/web/mailuser/templates/mail_user_filter_list.htm @@ -1,38 +1,38 @@ -

+ -
- -
-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - + +

+
+
 
+ + + + - - - + + - - + @@ -45,11 +45,10 @@ - +
 
- +
+
{tmpl_var name="rulename"} - {tmpl_var name='delete_txt'} + {tmpl_var name="rulename"} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/mailuser/templates/mail_user_password_edit.htm b/interface/web/mailuser/templates/mail_user_password_edit.htm index b28d3a35e..48c5a3e67 100644 --- a/interface/web/mailuser/templates/mail_user_password_edit.htm +++ b/interface/web/mailuser/templates/mail_user_password_edit.htm @@ -1,37 +1,34 @@ -

+

-
-
-
-
-

{tmpl_var name='email_txt'}

+ +
+

{tmpl_var name='email'}

-
- +
+  {tmpl_var name='generate_password_txt'}
-
-

{tmpl_var name='password_strength_txt'}

+
+

 

-
- +
+
-
+ -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/mailuser/templates/mail_user_spamfilter_edit.htm b/interface/web/mailuser/templates/mail_user_spamfilter_edit.htm index 4fdc5f86f..39e8670f9 100644 --- a/interface/web/mailuser/templates/mail_user_spamfilter_edit.htm +++ b/interface/web/mailuser/templates/mail_user_spamfilter_edit.htm @@ -1,28 +1,25 @@ -

+

-
-
-
-
-

{tmpl_var name='email_txt'}

+ +
+

{tmpl_var name='email'}

-
- - {tmpl_var name='policy'} -
-
+
+ -
- - -
- - - \ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/monitor/templates/datalog_list.htm b/interface/web/monitor/templates/datalog_list.htm index 480aa9471..2f4e1865d 100644 --- a/interface/web/monitor/templates/datalog_list.htm +++ b/interface/web/monitor/templates/datalog_list.htm @@ -1,38 +1,39 @@ -

+

-
-
-
- - - - - - - - +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + - - - - - - + + + + + - - - - - + + + + @@ -44,11 +45,10 @@ - +
{tmpl_var name='search_limit'}
  - +
 
+
{tmpl_var name="tstamp"}{tmpl_var name="server_id"}{tmpl_var name="action"}{tmpl_var name="dbtable"} - + {tmpl_var name="tstamp"}{tmpl_var name="server_id"}{tmpl_var name="action"}{tmpl_var name="dbtable"} +
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/monitor/templates/show_data.htm b/interface/web/monitor/templates/show_data.htm index 818208d64..9e2cd9ac3 100644 --- a/interface/web/monitor/templates/show_data.htm +++ b/interface/web/monitor/templates/show_data.htm @@ -1,12 +1,14 @@ -

+

-
+

-
+
\ No newline at end of file diff --git a/interface/web/monitor/templates/show_log.htm b/interface/web/monitor/templates/show_log.htm index 271d46bf5..befb5ebd4 100644 --- a/interface/web/monitor/templates/show_log.htm +++ b/interface/web/monitor/templates/show_log.htm @@ -1,25 +1,23 @@ -

+

-
-
-
-
-
- - {tmpl_var name='refresh'} -
+
-
+
-
+

-
-
- -
\ No newline at end of file + + \ No newline at end of file diff --git a/interface/web/monitor/templates/show_monit.htm b/interface/web/monitor/templates/show_monit.htm index 27265bd13..5053458a6 100644 --- a/interface/web/monitor/templates/show_monit.htm +++ b/interface/web/monitor/templates/show_monit.htm @@ -1,4 +1,6 @@ -

+

diff --git a/interface/web/monitor/templates/show_munin.htm b/interface/web/monitor/templates/show_munin.htm index 86d33f190..311941355 100644 --- a/interface/web/monitor/templates/show_munin.htm +++ b/interface/web/monitor/templates/show_munin.htm @@ -1,4 +1,6 @@ -

+

diff --git a/interface/web/monitor/templates/show_sys_state.htm b/interface/web/monitor/templates/show_sys_state.htm index ceb419573..262425c8e 100644 --- a/interface/web/monitor/templates/show_sys_state.htm +++ b/interface/web/monitor/templates/show_sys_state.htm @@ -1,25 +1,23 @@ -

+

-
-
-
-
-
- - {tmpl_var name='refresh'} -
+
-
+
-
+

-
-
- -
\ No newline at end of file + +
\ No newline at end of file diff --git a/interface/web/monitor/templates/syslog_list.htm b/interface/web/monitor/templates/syslog_list.htm index a14f68d0b..2458d14c4 100644 --- a/interface/web/monitor/templates/syslog_list.htm +++ b/interface/web/monitor/templates/syslog_list.htm @@ -1,42 +1,43 @@ -

+

-
-
-
- - - - - - - - +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + - - - - - - + + + + + - - - - - + + + + @@ -49,11 +50,10 @@ - +
{tmpl_var name='search_limit'}
  - +
 
+
{tmpl_var name="tstamp"}{tmpl_var name="server_id"}{tmpl_var name="loglevel"}{tmpl_var name="message"} + {tmpl_var name="tstamp"}{tmpl_var name="server_id"}{tmpl_var name="loglevel"}{tmpl_var name="message"} - {tmpl_var name='delete_txt'} + {tmpl_var name='delete_txt'} - {tmpl_var name='delete_txt'} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file +
+ + \ No newline at end of file diff --git a/interface/web/sites/templates/aps_install_package.htm b/interface/web/sites/templates/aps_install_package.htm index c911ced39..8ccfee101 100644 --- a/interface/web/sites/templates/aps_install_package.htm +++ b/interface/web/sites/templates/aps_install_package.htm @@ -11,28 +11,26 @@

ERROR

    {tmpl_var name='error'}
-
- -
-
+ + {tmpl_var name='basic_settings_txt'} -
- +
+
http(s):// 
DOMAIN_LIST_SPACE
 / 
- -
+
+
-
- - -
+
+ +
+
PKG_SETTINGS_SPACE {tmpl_var name='license_txt'} -
- +
+ {tmpl_var name='pkg_license_name'}
{tmpl_var name='pkg_license_content'} @@ -40,17 +38,14 @@
-
- - checked />  {tmpl_var name='acceptance_text'} +
+ +
checked
/>  {tmpl_var name='acceptance_text'}
-
+ -
- - -
-
- -
+
+ + +
diff --git a/interface/web/sites/templates/aps_instances_list.htm b/interface/web/sites/templates/aps_instances_list.htm index 2d9c50f6d..bb659999f 100644 --- a/interface/web/sites/templates/aps_instances_list.htm +++ b/interface/web/sites/templates/aps_instances_list.htm @@ -1,50 +1,49 @@

{tmpl_var name="list_head_txt"}

-
- -
-
{tmpl_var name="list_head_txt"} - - - - - + +

{tmpl_var name="list_head_txt"}

+
+
{tmpl_var name='name_txt'}{tmpl_var name='version_txt'}
+ + + + - + - - - + + + - - - + + + - + - - - + + - - + + - + - - - + + @@ -52,11 +51,10 @@ - +
{tmpl_var name='name_txt'}{tmpl_var name='version_txt'} {tmpl_var name='install_location_txt'}{tmpl_var name='status_txt'} {tmpl_var name='install_location_txt'}{tmpl_var name='status_txt'} 
  - +   +
{tmpl_var name='package_name'}{tmpl_var name='package_version'}-{tmpl_var name='package_release'}{tmpl_var name='package_name'}{tmpl_var name='package_version'}-{tmpl_var name='package_release'} {tmpl_var name='install_location_short'}{tmpl_var name='instance_status'} + {tmpl_var name='install_location_short'}{tmpl_var name='instance_status'} - {tmpl_var name='delete_txt'} + {tmpl_var name='delete_txt'} - {tmpl_var name='reinstall_txt'} + {tmpl_var name='reinstall_txt'}
{tmpl_var name='paging'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/sites/templates/aps_packagedetails_show.htm b/interface/web/sites/templates/aps_packagedetails_show.htm index 5456a8985..9e5056570 100644 --- a/interface/web/sites/templates/aps_packagedetails_show.htm +++ b/interface/web/sites/templates/aps_packagedetails_show.htm @@ -9,13 +9,12 @@
-
- -
+
-

 

 

@@ -42,41 +41,42 @@
-
- + +
+
- + - + - + - + - + - + - + - + - + + - + - + - + - +
{tmpl_var name='version_txt'} {tmpl_var name='pkg_version'} (Release {tmpl_var name='pkg_release'})
{tmpl_var name='category_txt'} {tmpl_var name='pkg_category'}
{tmpl_var name='description_txt'} {tmpl_var name='pkg_description'}
{tmpl_var name='homepage_txt'} {tmpl_var name='pkg_homepage'}
{tmpl_var name='installed_size_txt'} {tmpl_var name='pkg_installed_size'}
{tmpl_var name='supported_languages_txt'} {tmpl_var name='pkg_languages'}
{tmpl_var name='config_script_txt'} {tmpl_var name='pkg_config_script'}
{tmpl_var name='license_txt'} {tmpl_var name='pkg_license_name'}
@@ -88,7 +88,7 @@
{tmpl_var name='ScreenDescription'}
@@ -99,7 +99,7 @@ -
    @@ -115,27 +115,27 @@
{tmpl_var name='php_extensions_txt'} {tmpl_var name='pkg_requirements_php_extensions'}
{tmpl_var name='php_settings_txt'} {tmpl_var name='PHPSettingName'} = {tmpl_var name='PHPSettingValue'}
{tmpl_var name='supported_php_versions_txt'} {tmpl_var name='pkg_requirements_supported_php_versions'}
{tmpl_var name='database_txt'} {tmpl_var name='pkg_requirements_database'}
+
- \ No newline at end of file diff --git a/interface/web/sites/templates/aps_packages_list.htm b/interface/web/sites/templates/aps_packages_list.htm index 1042e7116..26f65d16e 100644 --- a/interface/web/sites/templates/aps_packages_list.htm +++ b/interface/web/sites/templates/aps_packages_list.htm @@ -1,40 +1,39 @@

{tmpl_var name="list_head_txt"}

-
- -
-
{tmpl_var name="list_head_txt"} ({tmpl_var name='package_count'}) - - - - - - + +

{tmpl_var name="list_head_txt"} ({tmpl_var name='package_count'})

+
+
{tmpl_var name='name_txt'}{tmpl_var name='version_txt'}{tmpl_var name='category_txt'}
+ + + + + - + - + - - - - + + + + - + - + - - - + + + - + - + @@ -45,11 +44,10 @@ - +
{tmpl_var name='name_txt'}{tmpl_var name='version_txt'}{tmpl_var name='category_txt'} {tmpl_var name='status_txt'}{tmpl_var name='status_txt'}   
{tmpl_var name='name'}{tmpl_var name='version'}-{tmpl_var name='release'}{tmpl_var name='category'}{tmpl_var name='name'}{tmpl_var name='version'}-{tmpl_var name='release'}{tmpl_var name='category'} {tmpl_var name='package_status'}{tmpl_var name='package_status'}   
{tmpl_var name='paging'}
-
-
- -
\ No newline at end of file + + + \ No newline at end of file diff --git a/interface/web/sites/templates/aps_update_packagelist.htm b/interface/web/sites/templates/aps_update_packagelist.htm index bd8edfd42..b36638601 100644 --- a/interface/web/sites/templates/aps_update_packagelist.htm +++ b/interface/web/sites/templates/aps_update_packagelist.htm @@ -1,20 +1,12 @@ -

+

-
- -
-
{tmpl_var name="legend_txt"} - -
- - -
-
- - - -
- -
+ {tmpl_var name="legend_txt"} + +
+ + +
diff --git a/interface/web/sites/templates/cron_edit.htm b/interface/web/sites/templates/cron_edit.htm index 20b1922cd..a27e16358 100644 --- a/interface/web/sites/templates/cron_edit.htm +++ b/interface/web/sites/templates/cron_edit.htm @@ -1,74 +1,71 @@ -

+

-
-
-
Cron Job -
+ Cron Job +
- - {tmpl_var name='parent_domain_id'} - +
- - {tmpl_var name='parent_domain_id'} - +
-
- - -

e.g. *, */3, 10-20

+
+ +
+

e.g. *, */3, 10-20

-
- - -

e.g. *, */2, 0, 10-12

+
+ +
+

e.g. *, */2, 0, 10-12

-
- - -

e.g. *, */4, 1-5

+
+ +
+

e.g. *, */4, 1-5

-
- - -

e.g. *, 1-6

+
+ +
+

e.g. *, 1-6

-
- - -

e.g. *, 0, 1-5

+
+ +
+

e.g. *, 0, 1-5

-
- - -

{tmpl_var name='command_hint_txt'}

+
+ +
+

{tmpl_var name='command_hint_txt'}

-
-

{tmpl_var name='log_output_txt'}

-
+
+ +
{tmpl_var name='log'}
-
-

{tmpl_var name='active_txt'}

-
+
+ +
{tmpl_var name='active'}
- + -
- - -
-
- -
\ No newline at end of file +
+ + +
\ No newline at end of file diff --git a/interface/web/sites/templates/cron_list.htm b/interface/web/sites/templates/cron_list.htm index 42d04e3ce..8b5b462cd 100644 --- a/interface/web/sites/templates/cron_list.htm +++ b/interface/web/sites/templates/cron_list.htm @@ -1,64 +1,64 @@ -

+

-
-
-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + @@ -71,11 +71,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="parent_domain_id"}{tmpl_var name="run_min"}{tmpl_var name="run_hour"}{tmpl_var name="run_mday"}{tmpl_var name="run_month"}{tmpl_var name="run_wday"}{tmpl_var name="command"} + {tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="parent_domain_id"}{tmpl_var name="run_min"}{tmpl_var name="run_hour"}{tmpl_var name="run_mday"}{tmpl_var name="run_month"}{tmpl_var name="run_wday"}{tmpl_var name="command"}
-
-
- -
\ No newline at end of file +
+ + \ No newline at end of file diff --git a/interface/web/sites/templates/database_admin_list.htm b/interface/web/sites/templates/database_admin_list.htm index d7fecea39..46dc57bdc 100644 --- a/interface/web/sites/templates/database_admin_list.htm +++ b/interface/web/sites/templates/database_admin_list.htm @@ -1,63 +1,63 @@ -

+ -
-
-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + + + + + - - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + @@ -69,11 +69,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="active"}{tmpl_var name="remote_access"}{tmpl_var name="type"}{tmpl_var name="sys_groupid"}{tmpl_var name="server_id"}{tmpl_var name="parent_domain_id"}{tmpl_var name="database_user_id"}{tmpl_var name="database_name"} + {tmpl_var name="active"}{tmpl_var name="remote_access"}{tmpl_var name="type"}{tmpl_var name="sys_groupid"}{tmpl_var name="server_id"}{tmpl_var name="parent_domain_id"}{tmpl_var name="database_user_id"}{tmpl_var name="database_name"} - {tmpl_var name='admin_txt'} + {tmpl_var name='admin_txt'} - {tmpl_var name='edit_txt'} - {tmpl_var name='delete_txt'} + {tmpl_var name='edit_txt'} + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file +
+ + \ No newline at end of file diff --git a/interface/web/sites/templates/database_edit.htm b/interface/web/sites/templates/database_edit.htm index 3e1489cf9..d8bb87e7d 100644 --- a/interface/web/sites/templates/database_edit.htm +++ b/interface/web/sites/templates/database_edit.htm @@ -1,124 +1,121 @@ -

+

-
-
-
+ -
+
- - {tmpl_var name='server_id'} - +
- - {tmpl_var name='server_id'} - +
-
+
- - {tmpl_var name='server_id'} - +
- - {tmpl_var name='server_id'} - +
-
- - {tmpl_var name='parent_domain_id'} -
-
- - {tmpl_var name='type'} -
-
- +
+
+

{tmpl_var name='database_name_prefix'}

- - +
+
- -
+
+
-
- -  MB -
-
- -  MB +
+
+ +
-
-
- - {tmpl_var name='database_ro_user_id'}  {tmpl_var name='optional_txt'} -
-
+
+
- - {tmpl_var name='database_charset'} - +
- - {tmpl_var name='database_charset'} - +
-
-

{tmpl_var name='remote_access_txt'}

-
+
+ +
{tmpl_var name='remote_access'}
-
- - -
-
-

{tmpl_var name='active_txt'}

-
+
+ +
+
+
+ +
{tmpl_var name='active'}
- + -
- - -
-
- -
+
+ + +
\ No newline at end of file diff --git a/interface/web/vm/templates/openvz_vm_list.htm b/interface/web/vm/templates/openvz_vm_list.htm index d525f3827..73fdc017f 100644 --- a/interface/web/vm/templates/openvz_vm_list.htm +++ b/interface/web/vm/templates/openvz_vm_list.htm @@ -1,57 +1,57 @@ -

+ -
-
-
{tmpl_var name="toolsarea_head_txt"} -
- -
-
-
+ + -
-
- - - - - - - - - - - + +

+
+
{tmpl_var name='search_limit'}
+ + + + + + + + + + - - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + @@ -63,11 +63,10 @@ - +
{tmpl_var name='search_limit'}
- +
+
{tmpl_var name="veid"}{tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="ostemplate_id"}{tmpl_var name="template_id"}{tmpl_var name="hostname"}{tmpl_var name="ip_address"} - Action - {tmpl_var name='delete_txt'} + {tmpl_var name="veid"}{tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="ostemplate_id"}{tmpl_var name="template_id"}{tmpl_var name="hostname"}{tmpl_var name="ip_address"} + Action + {tmpl_var name='delete_txt'}
-
-
- -
\ No newline at end of file +
+ + \ No newline at end of file -- GitLab From d48a08cab8343b4ef4824db9d395772450a277de Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Mon, 22 Dec 2014 14:19:04 +0100 Subject: [PATCH 049/287] dkim / dmarc: cosmetical changes --- interface/web/dns/templates/dns_dmarc_edit.htm | 2 +- interface/web/mail/mail_domain_edit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/dns/templates/dns_dmarc_edit.htm b/interface/web/dns/templates/dns_dmarc_edit.htm index 373ec4b03..cc874e03c 100644 --- a/interface/web/dns/templates/dns_dmarc_edit.htm +++ b/interface/web/dns/templates/dns_dmarc_edit.htm @@ -79,7 +79,7 @@

{tmpl_var name='active_txt'}

- +
diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index db2a8f3cc..210b88fb1 100755 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -214,7 +214,7 @@ class page_action extends tform_actions { $app->tpl->setVar('dkim_selector', $rec['dkim_selector']); $app->tpl->setVar('dkim_private', $rec['dkim_private']); $app->tpl->setVar('dkim_public', $rec['dkim_public']); - if (isset($rec['dkim_public'])) $app->tpl->setVar('dns_record', $dns_record); + if (!empty($rec['dkim_public'])) $app->tpl->setVar('dns_record', $dns_record); parent::onShowEnd(); } -- GitLab From 6bd166ea3754cf42c485c7ecdbdf65efa9889c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20M=C3=BCller?= Date: Sat, 3 Jan 2015 15:24:49 +0100 Subject: [PATCH 050/287] Added APS-Funktions to remote API Removed possibility of reinstalling Instances --- .../lib/classes/aps_guicontroller.inc.php | 220 ++++++------ interface/lib/classes/remote.d/aps.inc.php | 318 ++++++++++++++++++ .../sites_web_vhost_domain_plugin.inc.php | 2 - interface/web/sites/aps_do_operation.php | 25 -- .../web/sites/aps_installedpackages_list.php | 4 - .../sites/lib/lang/ar_aps_instances_list.lng | 2 - .../sites/lib/lang/bg_aps_instances_list.lng | 2 - .../sites/lib/lang/br_aps_instances_list.lng | 2 - .../sites/lib/lang/cz_aps_instances_list.lng | 2 - .../sites/lib/lang/de_aps_instances_list.lng | 2 - .../sites/lib/lang/el_aps_instances_list.lng | 2 - .../sites/lib/lang/en_aps_instances_list.lng | 2 - .../sites/lib/lang/es_aps_instances_list.lng | 2 - .../sites/lib/lang/fi_aps_instances_list.lng | 2 - .../sites/lib/lang/fr_aps_instances_list.lng | 2 - .../sites/lib/lang/hr_aps_instances_list.lng | 2 - .../sites/lib/lang/hu_aps_instances_list.lng | 2 - .../sites/lib/lang/id_aps_instances_list.lng | 2 - .../sites/lib/lang/it_aps_instances_list.lng | 2 - .../sites/lib/lang/ja_aps_instances_list.lng | 2 - .../sites/lib/lang/nl_aps_instances_list.lng | 2 - .../sites/lib/lang/pl_aps_instances_list.lng | 2 - .../sites/lib/lang/pt_aps_instances_list.lng | 2 - .../sites/lib/lang/ro_aps_instances_list.lng | 2 - .../sites/lib/lang/ru_aps_instances_list.lng | 2 - .../sites/lib/lang/se_aps_instances_list.lng | 2 - .../sites/lib/lang/sk_aps_instances_list.lng | 2 - .../sites/lib/lang/tr_aps_instances_list.lng | 2 - interface/web/sites/lib/remote.conf.php | 2 +- .../sites/templates/aps_instances_list.htm | 5 +- remoting_client/API-docs/navigation.html | 11 +- .../sites_aps_available_packages_list.html | 29 ++ .../sites_aps_get_package_details.html | 29 ++ .../API-docs/sites_aps_get_package_file.html | 29 ++ .../sites_aps_get_package_settings.html | 29 ++ .../API-docs/sites_aps_install_package.html | 29 ++ .../API-docs/sites_aps_instance_delete.html | 29 ++ .../API-docs/sites_aps_instance_get.html | 29 ++ .../sites_aps_instance_settings_get.html | 29 ++ .../sites_aps_update_package_list.html | 29 ++ server/lib/classes/aps_installer.inc.php | 2 +- 41 files changed, 696 insertions(+), 200 deletions(-) create mode 100644 interface/lib/classes/remote.d/aps.inc.php create mode 100644 remoting_client/API-docs/sites_aps_available_packages_list.html create mode 100644 remoting_client/API-docs/sites_aps_get_package_details.html create mode 100644 remoting_client/API-docs/sites_aps_get_package_file.html create mode 100644 remoting_client/API-docs/sites_aps_get_package_settings.html create mode 100644 remoting_client/API-docs/sites_aps_install_package.html create mode 100644 remoting_client/API-docs/sites_aps_instance_delete.html create mode 100644 remoting_client/API-docs/sites_aps_instance_get.html create mode 100644 remoting_client/API-docs/sites_aps_instance_settings_get.html create mode 100644 remoting_client/API-docs/sites_aps_update_package_list.html diff --git a/interface/lib/classes/aps_guicontroller.inc.php b/interface/lib/classes/aps_guicontroller.inc.php index f6a0ff4e3..1f1862886 100644 --- a/interface/lib/classes/aps_guicontroller.inc.php +++ b/interface/lib/classes/aps_guicontroller.inc.php @@ -211,8 +211,93 @@ class ApsGUIController extends ApsBase return true; } - - + public function createDatabaseForPackageInstance(&$settings, $websrv) { + global $app; + + $app->uses('tools_sites'); + + $global_config = $app->getconf->get_global_config('sites'); + + $tmp = array(); + $tmp['parent_domain_id'] = $websrv['domain_id']; + $tmp['sys_groupid'] = $websrv['sys_groupid']; + $dbname_prefix = $app->tools_sites->replacePrefix($global_config['dbname_prefix'], $tmp); + $dbuser_prefix = $app->tools_sites->replacePrefix($global_config['dbuser_prefix'], $tmp); + unset($tmp); + + // get information if the webserver is a db server, too + $web_server = $app->db->queryOneRecord("SELECT server_id,server_name,db_server FROM server WHERE server_id = ".$app->functions->intval($websrv['server_id'])); + if($web_server['db_server'] == 1) { + // create database on "localhost" (webserver) + $mysql_db_server_id = $app->functions->intval($websrv['server_id']); + $settings['main_database_host'] = 'localhost'; + $mysql_db_remote_access = 'n'; + $mysql_db_remote_ips = ''; + } else { + //* get the default database server of the client + $client = $app->db->queryOneRecord("SELECT default_dbserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ".$app->functions->intval($websrv['sys_groupid'])); + if(is_array($client) && $client['default_dbserver'] > 0 && $client['default_dbserver'] != $websrv['server_id']) { + $mysql_db_server_id = $app->functions->intval($client['default_dbserver']); + $dbserver_config = $web_config = $app->getconf->get_server_config($app->functions->intval($mysql_db_server_id), 'server'); + $settings['main_database_host'] = $dbserver_config['ip_address']; + $mysql_db_remote_access = 'y'; + $webserver_config = $app->getconf->get_server_config($app->functions->intval($websrv['server_id']), 'server'); + $mysql_db_remote_ips = $webserver_config['ip_address']; + } else { + /* I left this in place for a fallback that should NEVER! happen. + * if we reach this point it means that there is NO default db server for the client + * AND the webserver has NO db service enabled. + * We have to abort the aps installation here... so I added a return false + * although this does not present any error message to the user. + */ + return false; + + /*$mysql_db_server_id = $websrv['server_id']; + $settings['main_database_host'] = 'localhost'; + $mysql_db_remote_access = 'n'; + $mysql_db_remote_ips = '';*/ + } + } + + if (empty($settings['main_database_name'])) { + //* Find a free db name for the app + for($n = 1; $n <= 1000; $n++) { + $mysql_db_name = $app->db->quote(($dbname_prefix != '' ? $dbname_prefix.'aps'.$n : uniqid('aps'))); + $tmp = $app->db->queryOneRecord("SELECT count(database_id) as number FROM web_database WHERE database_name = '".$app->db->quote($mysql_db_name)."'"); + if($tmp['number'] == 0) break; + } + $settings['main_database_name'] = $mysql_db_name; + } + if (empty($settings['main_database_login'])) { + //* Find a free db username for the app + for($n = 1; $n <= 1000; $n++) { + $mysql_db_user = $app->db->quote(($dbuser_prefix != '' ? $dbuser_prefix.'aps'.$n : uniqid('aps'))); + $tmp = $app->db->queryOneRecord("SELECT count(database_user_id) as number FROM web_database_user WHERE database_user = '".$app->db->quote($mysql_db_user)."'"); + if($tmp['number'] == 0) break; + } + $settings['main_database_login'] = $mysql_db_user; + } + + //* Create the mysql database user if not existing + $tmp = $app->db->queryOneRecord("SELECT database_user_id FROM web_database_user WHERE database_user = '".$app->db->quote($settings['main_database_login'])."'"); + if(!$tmp) { + $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `database_user`, `database_user_prefix`, `database_password`) + VALUES( ".$app->functions->intval($websrv['sys_userid']).", ".$app->functions->intval($websrv['sys_groupid']).", 'riud', '".$app->functions->intval($websrv['sys_perm_group'])."', '', 0, '".$settings['main_database_login']."', '".$app->db->quote($dbuser_prefix) . "', PASSWORD('".$settings['main_database_password']."'))"; + $mysql_db_user_id = $app->db->datalogInsert('web_database_user', $insert_data, 'database_user_id'); + } + else $mysql_db_user_id = $tmp['database_user_id']; + + //* Create the mysql database if not existing + $tmp = $app->db->queryOneRecord("SELECT count(database_id) as number FROM web_database WHERE database_name = '".$app->db->quote($settings['main_database_name'])."'"); + if($tmp['number'] == 0) { + $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `parent_domain_id`, `type`, `database_name`, `database_name_prefix`, `database_user_id`, `database_ro_user_id`, `database_charset`, `remote_access`, `remote_ips`, `backup_copies`, `active`, `backup_interval`) + VALUES( ".$app->functions->intval($websrv['sys_userid']).", ".$app->functions->intval($websrv['sys_groupid']).", 'riud', '".$app->functions->intval($websrv['sys_perm_group'])."', '', $mysql_db_server_id, ".$app->functions->intval($websrv['domain_id']).", 'mysql', '".$settings['main_database_name']."', '" . $app->db->quote($dbname_prefix) . "', '$mysql_db_user_id', 0, '', '$mysql_db_remote_access', '$mysql_db_remote_ips', ".$app->functions->intval($websrv['backup_copies']).", 'y', '".$app->functions->intval($websrv['backup_interval'])."')"; + $app->db->datalogInsert('web_database', $insert_data, 'database_id'); + } + + return true; + } + /** * Creates a new database record for the package instance and * an install task @@ -250,86 +335,15 @@ class ApsGUIController extends ApsBase } - //* Create the MySQL database for the application + //* Create the MySQL database for the application if necessary $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($packageid).';'); $metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml'; $sxe = $this->readInMetaFile($metafile); $db_id = parent::getXPathValue($sxe, '//db:id'); if (!empty($db_id)) { - $global_config = $app->getconf->get_global_config('sites'); - - $tmp = array(); - $tmp['parent_domain_id'] = $websrv['domain_id']; - $tmp['sys_groupid'] = $websrv['sys_groupid']; - $dbname_prefix = $app->tools_sites->replacePrefix($global_config['dbname_prefix'], $tmp); - $dbuser_prefix = $app->tools_sites->replacePrefix($global_config['dbuser_prefix'], $tmp); - unset($tmp); - - // get information if the webserver is a db server, too - $web_server = $app->db->queryOneRecord("SELECT server_id,server_name,db_server FROM server WHERE server_id = ".$app->functions->intval($websrv['server_id'])); - if($web_server['db_server'] == 1) { - // create database on "localhost" (webserver) - $mysql_db_server_id = $app->functions->intval($websrv['server_id']); - $mysql_db_host = 'localhost'; - $mysql_db_remote_access = 'n'; - $mysql_db_remote_ips = ''; - } else { - //* get the default database server of the client - $client = $app->db->queryOneRecord("SELECT default_dbserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ".$app->functions->intval($websrv['sys_groupid'])); - if(is_array($client) && $client['default_dbserver'] > 0 && $client['default_dbserver'] != $websrv['server_id']) { - $mysql_db_server_id = $app->functions->intval($client['default_dbserver']); - $dbserver_config = $web_config = $app->getconf->get_server_config($app->functions->intval($mysql_db_server_id), 'server'); - $mysql_db_host = $dbserver_config['ip_address']; - $mysql_db_remote_access = 'y'; - $webserver_config = $app->getconf->get_server_config($app->functions->intval($websrv['server_id']), 'server'); - $mysql_db_remote_ips = $webserver_config['ip_address']; - } else { - /* I left this in place for a fallback that should NEVER! happen. - * if we reach this point it means that there is NO default db server for the client - * AND the webserver has NO db service enabled. - * We have to abort the aps installation here... so I added a return false - * although this does not present any error message to the user. - */ - return false; - - /*$mysql_db_server_id = $websrv['server_id']; - $mysql_db_host = 'localhost'; - $mysql_db_remote_access = 'n'; - $mysql_db_remote_ips = '';*/ - } - } - - //* Find a free db name for the app - for($n = 1; $n <= 1000; $n++) { - $mysql_db_name = $app->db->quote(($dbname_prefix != '' ? $dbname_prefix.'aps'.$n : uniqid('aps'))); - $tmp = $app->db->queryOneRecord("SELECT count(database_id) as number FROM web_database WHERE database_name = '".$app->db->quote($mysql_db_name)."'"); - if($tmp['number'] == 0) break; - } - //* Find a free db username for the app - for($n = 1; $n <= 1000; $n++) { - $mysql_db_user = $app->db->quote(($dbuser_prefix != '' ? $dbuser_prefix.'aps'.$n : uniqid('aps'))); - $tmp = $app->db->queryOneRecord("SELECT count(database_user_id) as number FROM web_database_user WHERE database_user = '".$app->db->quote($mysql_db_user)."'"); - if($tmp['number'] == 0) break; - } - - $mysql_db_password = $settings['main_database_password']; - - //* Create the mysql database user - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `database_user`, `database_user_prefix`, `database_password`) - VALUES( ".$app->functions->intval($websrv['sys_userid']).", ".$app->functions->intval($websrv['sys_groupid']).", 'riud', '".$app->functions->intval($websrv['sys_perm_group'])."', '', 0, '$mysql_db_user', '".$app->db->quote($dbuser_prefix) . "', PASSWORD('$mysql_db_password'))"; - $mysql_db_user_id = $app->db->datalogInsert('web_database_user', $insert_data, 'database_user_id'); - - //* Create the mysql database - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `parent_domain_id`, `type`, `database_name`, `database_name_prefix`, `database_user_id`, `database_ro_user_id`, `database_charset`, `remote_access`, `remote_ips`, `backup_copies`, `active`, `backup_interval`) - VALUES( ".$app->functions->intval($websrv['sys_userid']).", ".$app->functions->intval($websrv['sys_groupid']).", 'riud', '".$app->functions->intval($websrv['sys_perm_group'])."', '', $mysql_db_server_id, ".$app->functions->intval($websrv['domain_id']).", 'mysql', '$mysql_db_name', '" . $app->db->quote($dbname_prefix) . "', '$mysql_db_user_id', 0, '', '$mysql_db_remote_access', '$mysql_db_remote_ips', ".$app->functions->intval($websrv['backup_copies']).", 'y', '".$app->functions->intval($websrv['backup_interval'])."')"; - $app->db->datalogInsert('web_database', $insert_data, 'database_id'); - - //* Add db details to package settings - $settings['main_database_host'] = $mysql_db_host; - $settings['main_database_name'] = $mysql_db_name; - $settings['main_database_login'] = $mysql_db_user; - + // mysql-database-name is updated inside if not set already + if (!$this->createDatabaseForPackageInstance($settings, $websrv)) return false; } //* Insert new package instance @@ -348,15 +362,13 @@ class ApsGUIController extends ApsBase $app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_INSTALL, 'id', $InstanceID); } - - /** * Sets the status of an instance to "should be removed" and creates a * datalog entry to give the ISPConfig server a real removal advice * * @param $instanceid the instance to delete */ - public function deleteInstance($instanceid) + public function deleteInstance($instanceid, $keepdatabase = false) { global $app; /* @@ -370,48 +382,20 @@ class ApsGUIController extends ApsBase $app->db->datalogSave('aps', 'DELETE', 'id', $instanceid, array(), $datalog); */ - $sql = "SELECT web_database.database_id as database_id, web_database.database_user_id as `database_user_id` FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ".$instanceid." LIMIT 0,1"; - $tmp = $app->db->queryOneRecord($sql); - if($tmp['database_id'] > 0) $app->db->datalogDelete('web_database', 'database_id', $tmp['database_id']); - - $database_user = $tmp['database_user_id']; - $tmp = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `database_user_id` = '" . $app->functions->intval($database_user) . "' OR `database_ro_user_id` = '" . $app->functions->intval($database_user) . "'"); - if($tmp['cnt'] < 1) $app->db->datalogDelete('web_database_user', 'database_user_id', $database_user); + if (!$keepdatabase) { + $sql = "SELECT web_database.database_id as database_id, web_database.database_user_id as `database_user_id` FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ".$instanceid." LIMIT 0,1"; + $tmp = $app->db->queryOneRecord($sql); + if($tmp['database_id'] > 0) $app->db->datalogDelete('web_database', 'database_id', $tmp['database_id']); + + $database_user = $tmp['database_user_id']; + $tmp = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `database_user_id` = '" . $app->functions->intval($database_user) . "' OR `database_ro_user_id` = '" . $app->functions->intval($database_user) . "'"); + if($tmp['cnt'] < 1) $app->db->datalogDelete('web_database_user', 'database_user_id', $database_user); + } $app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_REMOVE, 'id', $instanceid); } - - - /** - * Sets the status of an instance to "installation planned" and creates a - * datalog entry to re-install the package. The existing package is simply overwritten. - * - * @param $instanceid the instance to delete - */ - public function reinstallInstance($instanceid) - { - global $app; - - /* - $app->db->query("UPDATE aps_instances SET instance_status = ".INSTANCE_INSTALL." WHERE id = ".$instanceid.";"); - - $webserver_id = $this->getInstanceDataForDatalog($instanceid); - if($webserver_id == '') return; - - // Create a sys_datalog entry for re-installation - $datalog = array('instance_id' => $instanceid, 'server_id' => $webserver_id); - $app->db->datalogSave('aps', 'INSERT', 'id', $instanceid, array(), $datalog); - */ - - $sql = "SELECT web_database.database_id as database_id FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.value = aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ".$app->db->quote($instanceid)." LIMIT 0,1"; - $tmp = $app->db->queryOneRecord($sql); - if($tmp['database_id'] > 0) $app->db->datalogDelete('web_database', 'database_id', $tmp['database_id']); - - $app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_INSTALL, 'id', $instanceid); - } - /** * Read the settings to be filled when installing * @@ -608,6 +592,10 @@ class ApsGUIController extends ApsBase if(isset($pkg_details['Requirements Database']) && $pkg_details['Requirements Database'] != '') { + if (isset($postinput['main_database_host'])) $input['main_database_host'] = $postinput['main_database_host']; + if (isset($postinput['main_database_name'])) $input['main_database_name'] = $postinput['main_database_name']; + if (isset($postinput['main_database_login'])) $input['main_database_login'] = $postinput['main_database_login']; + if(isset($postinput['main_database_password'])) { if($postinput['main_database_password'] == '') $error[] = $app->lng('error_no_database_pw'); diff --git a/interface/lib/classes/remote.d/aps.inc.php b/interface/lib/classes/remote.d/aps.inc.php new file mode 100644 index 000000000..78c066c5e --- /dev/null +++ b/interface/lib/classes/remote.d/aps.inc.php @@ -0,0 +1,318 @@ + +Copyright (c) Profi Webdesign Dominik Müller + +*/ + +class remoting_aps extends remoting { + //* Functions for APS + public function sites_aps_update_package_list($session_id) + { + global $app; + + if(!$this->checkPerm($session_id, 'sites_aps_update_package')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + $app->load('aps_crawler'); + $aps = new ApsCrawler($app, false); // true = Interface mode, false = Server mode + $aps->startCrawler(); + $aps->parseFolderToDB(); + $aps->fixURLs(); + + return true; + } + + public function sites_aps_available_packages_list($session_id, $params) + { + global $app; + + if(!$this->checkPerm($session_id, 'sites_aps_available_packages_list')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + $app->load('aps_base'); + + if (isset($params['all_packages']) && ($params['all_packages'] == true)) { + $where = '(aps_packages.package_status = '.PACKAGE_ENABLED.' OR aps_packages.package_status = '.PACKAGE_LOCKED.')'; + } + else { + $where = 'aps_packages.package_status = '.PACKAGE_ENABLED; + } + + $sql = 'SELECT * FROM aps_packages WHERE '.$where.' ORDER BY aps_packages.name, aps_packages.version'; + return $app->db->queryAllRecords($sql); + } + + public function sites_aps_get_package_details($session_id, $primary_id) + { + global $app; + + if(!$this->checkPerm($session_id, 'sites_aps_get_package_details')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + $app->load('aps_guicontroller'); + $gui = new ApsGUIController($app); + + // Package-ID Check + if (isset($primary_id)) + { + $newest_pkg_id = $gui->getNewestPackageID($pkg_id); + if($newest_pkg_id != 0) $primary_id = $newest_pkg_id; + } + + // Make sure an integer ID is given + if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag + $this->server->fault('package_error', 'The given Package ID is not valid.'); + return false; + } + + // Get package details + $details = $gui->getPackageDetails($primary_id); + if (isset($details['error'])) { + $this->server->fault('package_error', $details['error']); + return false; + } + + // encode all parts to ensure SOAP-XML-format + array_walk_recursive($details, function(&$item, &$key) { $item = utf8_encode($item); } ); + // Special handling for license-text because of too much problems with soap-transport + $details['License content'] = base64_encode($details['License content']); + + return $details; + } + + public function sites_aps_get_package_file($session_id, $primary_id, $filename) { + global $app; + + if(!$this->checkPerm($session_id, 'sites_aps_get_package_file')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + $app->load('aps_guicontroller'); + $gui = new ApsGUIController($app); + + // Package-ID Check + if (isset($primary_id)) + { + $newest_pkg_id = $gui->getNewestPackageID($pkg_id); + if($newest_pkg_id != 0) $primary_id = $newest_pkg_id; + } + + // Make sure an integer ID is given + if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag + $this->server->fault('package_error', 'The given Package ID is not valid.'); + return false; + } + + // Get package details + $details = $gui->getPackageDetails($primary_id); + if (isset($details['error'])) { + $this->server->fault('package_error', $details['error']); + return false; + } + + // find file in details + $found = false; + if (basename($details['Icon']) == $filename) $found = true; + if (!$found && isset($details['Screenshots']) && is_array($details['Screenshots'])) + foreach ($details['Screenshots'] as $screen) { if (basename($screen['ScreenPath']) == $filename) { $found = true; break; } } + + if (!$found) { + $this->server->fault('package_error', 'File not found in package.'); + return false; + } + + return base64_encode(file_get_contents(ISPC_ROOT_PATH.'/web/sites/aps_meta_packages/'.$details['path'].'/'.$filename)); + } + + public function sites_aps_get_package_settings($session_id, $primary_id) + { + global $app; + + if(!$this->checkPerm($session_id, 'sites_aps_get_package_details')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + $app->load('aps_guicontroller'); + $gui = new ApsGUIController($app); + + // Package-ID Check + if (isset($primary_id)) + { + $newest_pkg_id = $gui->getNewestPackageID($pkg_id); + if($newest_pkg_id != 0) $primary_id = $newest_pkg_id; + } + + // Make sure an integer ID is given + if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag + $this->server->fault('package_error', 'The given Package ID is not valid.'); + return false; + } + + // Get package settings + $settings = $gui->getPackageSettings($primary_id); + if (isset($settings['error'])) { + $this->server->fault('package_error', $settings['error']); + return false; + } + + // encode all parts to ensure SOAP-XML-format + array_walk_recursive($settings, function(&$item, &$key) { $item = utf8_encode($item); } ); + + return $settings; + } + + public function sites_aps_install_package($session_id, $primary_id, $params) + { + global $app; + + if(!$this->checkPerm($session_id, 'sites_aps_install_package')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + $app->load('aps_guicontroller'); + $gui = new ApsGUIController($app); + + // Package-ID Check + if (isset($primary_id)) + { + $newest_pkg_id = $gui->getNewestPackageID($primary_id); + if($newest_pkg_id != 0) $primary_id = $newest_pkg_id; + } + + // Make sure an integer ID is given + if (!isset($primary_id) || !$gui->isValidPackageID($primary_id, true)) {// always adminflag + $this->server->fault('package_error', 'The given Package ID is not valid.'); + return false; + } + + // Get package details + $details = $gui->getPackageDetails($primary_id); + if (isset($details['error'])) { + $this->server->fault('package_error', $details['error']); + return false; + } + $settings = $gui->getPackageSettings($primary_id); + if (isset($settings['error'])) { + $this->server->fault('package_error', $settings['error']); + return false; + } + + // Check given Site/VHostDomain + if (!isset($params['main_domain'])) { + $this->server->fault('invalid parameters', 'No valid domain given.'); + return false; + } + + $sql = "SELECT * FROM web_domain WHERE domain = '".$app->db->quote($params['main_domain'])."'"; + $domain = $app->db->queryOneRecord($sql); + + if (!$domain) { + $this->server->fault('invalid parameters', 'No valid domain given.'); + return false; + } + + $domains = array($domain['domain']); // Simulate correct Domain-List + $result = $gui->validateInstallerInput($params, $details, $domains, $settings); + if(empty($result['error'])) + { + return $gui->createPackageInstance($result['input'], $primary_id); + } + + $this->server->fault('invalid parameters', implode('
', $result['error'])); + return false; + } + + public function sites_aps_instance_get($session_id, $primary_id) + { + global $app; + + if(!$this->checkPerm($session_id, 'sites_aps_instance_get')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + $sql = "SELECT * FROM aps_instances WHERE id = ".$app->functions->intval($primary_id); + $result = $app->db->queryOneRecord($sql); + return $result; + } + + public function sites_aps_instance_settings_get($session_id, $primary_id) + { + global $app; + + if(!$this->checkPerm($session_id, 'sites_aps_instance_get')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + $sql = "SELECT * FROM aps_instances_settings WHERE instance_id = ".$app->functions->intval($primary_id); + $result = $app->db->queryAllRecords($sql); + return $result; + } + + public function sites_aps_instance_delete($session_id, $primary_id, $params = array()) + { + global $app; + + if(!$this->checkPerm($session_id, 'sites_aps_instance_delete')) { + $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + + $app->load('aps_guicontroller'); + $gui = new ApsGUIController($app); + + // Check if Instance exists + $sql = "SELECT * FROM aps_instances WHERE id = ".$app->functions->intval($primary_id); + $result = $app->db->queryOneRecord($sql); + + if (!$result) { + $this->server->fault('instance_error', 'No valid instance id given.'); + return false; + } + + $gui->deleteInstance($primary_id, (isset($params['keep_database']) && ($params['keep_database'] === true))); + + return true; + } +} + +?> diff --git a/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php b/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php index d063fbbec..b65c05bf2 100644 --- a/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php +++ b/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php @@ -212,8 +212,6 @@ class sites_web_vhost_domain_plugin { if(is_array($records) && !empty($records)){ foreach($records as $rec){ $app->db->datalogUpdate('aps_instances_settings', "value = '".$app->db->quote($page_form->dataRecord["domain"])."'", 'id', $rec['id']); - // Reinstall of package needed? - //$app->db->datalogUpdate('aps_instances', "instance_status = '1'", 'id', $rec['instance_id']); } } unset($records); diff --git a/interface/web/sites/aps_do_operation.php b/interface/web/sites/aps_do_operation.php index b4d949316..ffc8c031d 100644 --- a/interface/web/sites/aps_do_operation.php +++ b/interface/web/sites/aps_do_operation.php @@ -84,29 +84,4 @@ else if($_GET['action'] == 'delete_instance') //echo $app->lng('Installation_remove'); @header('Location:aps_installedpackages_list.php'); } -else if($_GET['action'] == 'reinstall_instance') - { - // Make sure a valid package ID is given (also corresponding to the calling user) - $client_id = 0; - $is_admin = ($_SESSION['s']['user']['typ'] == 'admin') ? true : false; - if(!$is_admin) - { - $cid = $app->db->queryOneRecord("SELECT client_id FROM client WHERE username = '".$app->db->quote($_SESSION['s']['user']['username'])."';"); - $client_id = $cid['client_id']; - } - // Assume that the given instance belongs to the currently calling client_id. Unimportant if status is admin - if(!$gui->isValidInstanceID($_GET['id'], $client_id, $is_admin)) die($app->lng('Invalid ID')); - - // We've an InstanceID, so make sure the package is not enabled and InstanceStatus is still "installed" - $check = $app->db->queryOneRecord("SELECT aps_instances.id FROM aps_instances, aps_packages - WHERE aps_instances.package_id = aps_packages.id - AND aps_instances.instance_status = ".INSTANCE_SUCCESS." - AND aps_packages.package_status = ".PACKAGE_ENABLED." - AND aps_instances.id = ".$app->db->quote($_GET['id']).";"); - if(!$check) die('Check failed'); // normally this might not happen at all, so just die - - $gui->reinstallInstance($_GET['id']); - //echo $app->lng('Installation_task'); - @header('Location:aps_installedpackages_list.php'); - } ?> diff --git a/interface/web/sites/aps_installedpackages_list.php b/interface/web/sites/aps_installedpackages_list.php index 418cc43c1..a0a934ef4 100644 --- a/interface/web/sites/aps_installedpackages_list.php +++ b/interface/web/sites/aps_installedpackages_list.php @@ -125,10 +125,6 @@ if(is_array($records)) else $ils = $rec['install_location']; $rec['install_location_short'] = $ils; - // Also set a boolean-like variable for the reinstall button (vlibTemplate doesn't allow variable comparisons) - // For a reinstall, the package must be already installed successfully and (still be) enabled - if($rec['instance_status'] == INSTANCE_SUCCESS && $rec['package_status'] == PACKAGE_ENABLED) - $rec['reinstall_possible'] = 'true'; // Of course an instance can only then be removed when it's not already tagged for removal if($rec['instance_status'] != INSTANCE_REMOVE && $rec['instance_status'] != INSTANCE_INSTALL) $rec['delete_possible'] = 'true'; diff --git a/interface/web/sites/lib/lang/ar_aps_instances_list.lng b/interface/web/sites/lib/lang/ar_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/ar_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/ar_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/bg_aps_instances_list.lng b/interface/web/sites/lib/lang/bg_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/bg_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/bg_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/br_aps_instances_list.lng b/interface/web/sites/lib/lang/br_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/br_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/br_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/cz_aps_instances_list.lng b/interface/web/sites/lib/lang/cz_aps_instances_list.lng index 16e863ee9..8f7c248a6 100644 --- a/interface/web/sites/lib/lang/cz_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/cz_aps_instances_list.lng @@ -6,9 +6,7 @@ $wb['customer_txt'] = 'Klient'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Umístění instalace'; $wb['pkg_delete_confirmation'] = 'Opravdu chcete smazat tuto instalaci ?'; -$wb['pkg_reinstall_confirmation'] = 'Opravdu chcete přeinstalovat tento balíček se stejným nastavením ?'; $wb['filter_txt'] = 'Hledat'; $wb['delete_txt'] = 'Smazat'; -$wb['reinstall_txt'] = 'Přeinstalovat'; ?> diff --git a/interface/web/sites/lib/lang/de_aps_instances_list.lng b/interface/web/sites/lib/lang/de_aps_instances_list.lng index e5f8b7b7f..ba381e8bd 100644 --- a/interface/web/sites/lib/lang/de_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/de_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Kunde'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Installationsort'; $wb['pkg_delete_confirmation'] = 'Soll diese Installation wirklich gelöscht werden?'; -$wb['pkg_reinstall_confirmation'] = 'Soll das Paket wirklich mit den gleichen Einstellungen erneut installiert werden?'; $wb['filter_txt'] = 'Suche'; $wb['delete_txt'] = 'Löschen'; -$wb['reinstall_txt'] = 'Neuinstallieren'; ?> diff --git a/interface/web/sites/lib/lang/el_aps_instances_list.lng b/interface/web/sites/lib/lang/el_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/el_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/el_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/en_aps_instances_list.lng b/interface/web/sites/lib/lang/en_aps_instances_list.lng index 611c37efa..ce6df1a3f 100644 --- a/interface/web/sites/lib/lang/en_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/en_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> \ No newline at end of file diff --git a/interface/web/sites/lib/lang/es_aps_instances_list.lng b/interface/web/sites/lib/lang/es_aps_instances_list.lng index f302a7a29..71ccd53fa 100644 --- a/interface/web/sites/lib/lang/es_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/es_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Cliente'; $wb['status_txt'] = 'Estado'; $wb['install_location_txt'] = 'Localización de instalación'; $wb['pkg_delete_confirmation'] = '¿Realmente quieres eliminar esta instalación?'; -$wb['pkg_reinstall_confirmation'] = '¿Realmente quieres reinstalar este paquete con la misma configuración?'; $wb['filter_txt'] = 'Buscar'; $wb['delete_txt'] = 'Eliminar'; -$wb['reinstall_txt'] = 'Reinstalar'; ?> diff --git a/interface/web/sites/lib/lang/fi_aps_instances_list.lng b/interface/web/sites/lib/lang/fi_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/fi_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/fi_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/fr_aps_instances_list.lng b/interface/web/sites/lib/lang/fr_aps_instances_list.lng index 6a2dba1e8..63145b04f 100644 --- a/interface/web/sites/lib/lang/fr_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/fr_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Statut'; $wb['install_location_txt'] = 'Chemin d\'installation'; $wb['pkg_delete_confirmation'] = 'Etes-vous sûr de vouloir supprimer cette installation ?'; -$wb['pkg_reinstall_confirmation'] = 'Etes-vous sûr de vouloir réinstaller ce package avec la même configuration ?'; $wb['filter_txt'] = 'Chercher'; $wb['delete_txt'] = 'Supprimer'; -$wb['reinstall_txt'] = 'Réinstaller'; ?> diff --git a/interface/web/sites/lib/lang/hr_aps_instances_list.lng b/interface/web/sites/lib/lang/hr_aps_instances_list.lng index 2d737a6f7..5215f3596 100644 --- a/interface/web/sites/lib/lang/hr_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/hr_aps_instances_list.lng @@ -6,10 +6,8 @@ $wb['customer_txt'] = 'Klijent'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Lokacija instalacije'; $wb['pkg_delete_confirmation'] = 'Da li stvarno želite obrisati ovu instalaciju?'; -$wb['pkg_reinstall_confirmation'] = 'Da li stvarno želite reinstalirati ovaj paket sa istim postavkama?'; $wb['filter_txt'] = 'Traži'; $wb['delete_txt'] = 'Obriši'; -$wb['reinstall_txt'] = 'Reinstaliraj'; ?> diff --git a/interface/web/sites/lib/lang/hu_aps_instances_list.lng b/interface/web/sites/lib/lang/hu_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/hu_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/hu_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/id_aps_instances_list.lng b/interface/web/sites/lib/lang/id_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/id_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/id_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/it_aps_instances_list.lng b/interface/web/sites/lib/lang/it_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/it_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/it_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/ja_aps_instances_list.lng b/interface/web/sites/lib/lang/ja_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/ja_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/ja_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/nl_aps_instances_list.lng b/interface/web/sites/lib/lang/nl_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/nl_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/nl_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/pl_aps_instances_list.lng b/interface/web/sites/lib/lang/pl_aps_instances_list.lng index 186dc7dc1..b587dc74e 100644 --- a/interface/web/sites/lib/lang/pl_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/pl_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Klient'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Lokalizacja instalacji'; $wb['pkg_delete_confirmation'] = 'Na pewno chcesz usunąć tę instalację?'; -$wb['pkg_reinstall_confirmation'] = 'Na pewno chcesz przeinstalować ten pakiet z tymi samymi ustawieniami?'; $wb['filter_txt'] = 'Szukaj'; $wb['delete_txt'] = 'Usuń'; -$wb['reinstall_txt'] = 'Przeinstaluj'; ?> diff --git a/interface/web/sites/lib/lang/pt_aps_instances_list.lng b/interface/web/sites/lib/lang/pt_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/pt_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/pt_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/ro_aps_instances_list.lng b/interface/web/sites/lib/lang/ro_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/ro_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/ro_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/ru_aps_instances_list.lng b/interface/web/sites/lib/lang/ru_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/ru_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/ru_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/se_aps_instances_list.lng b/interface/web/sites/lib/lang/se_aps_instances_list.lng index a9428aa73..ae2791d63 100644 --- a/interface/web/sites/lib/lang/se_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/se_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Kund'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Installationsplats'; $wb['pkg_delete_confirmation'] = 'Vill du verkligen radera denna installation?'; -$wb['pkg_reinstall_confirmation'] = 'Vill du verkligen installera om det här paketet med samma inställningar?'; $wb['filter_txt'] = 'Sök'; $wb['delete_txt'] = 'Radera'; -$wb['reinstall_txt'] = 'Ominstallera'; ?> diff --git a/interface/web/sites/lib/lang/sk_aps_instances_list.lng b/interface/web/sites/lib/lang/sk_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/sk_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/sk_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/lang/tr_aps_instances_list.lng b/interface/web/sites/lib/lang/tr_aps_instances_list.lng index 052d834a7..5742b7a6e 100644 --- a/interface/web/sites/lib/lang/tr_aps_instances_list.lng +++ b/interface/web/sites/lib/lang/tr_aps_instances_list.lng @@ -6,8 +6,6 @@ $wb['customer_txt'] = 'Client'; $wb['status_txt'] = 'Status'; $wb['install_location_txt'] = 'Install location'; $wb['pkg_delete_confirmation'] = 'Do you really want to delete this installation?'; -$wb['pkg_reinstall_confirmation'] = 'Do you really want to reinstall this package with the same settings?'; $wb['filter_txt'] = 'Search'; $wb['delete_txt'] = 'Delete'; -$wb['reinstall_txt'] = 'Reinstall'; ?> diff --git a/interface/web/sites/lib/remote.conf.php b/interface/web/sites/lib/remote.conf.php index 30e41b929..5ba2b7d6f 100644 --- a/interface/web/sites/lib/remote.conf.php +++ b/interface/web/sites/lib/remote.conf.php @@ -8,6 +8,6 @@ $function_list['sites_web_domain_get,sites_web_domain_add,sites_web_domain_updat $function_list['sites_web_domain_backup'] = 'Sites Backup functions'; $function_list['sites_web_aliasdomain_get,sites_web_aliasdomain_add,sites_web_aliasdomain_update,sites_web_aliasdomain_delete'] = 'Sites Aliasdomain functions'; $function_list['sites_web_subdomain_get,sites_web_subdomain_add,sites_web_subdomain_update,sites_web_subdomain_delete'] = 'Sites Subdomain functions'; - +$function_list['sites_aps_update_package_list,sites_aps_available_packages_list,sites_aps_install_package,sites_aps_get_package_details,sites_aps_get_package_file,sites_aps_get_package_settings,sites_aps_instance_get,sites_aps_instance_delete''] = 'Sites APS functions'; ?> diff --git a/interface/web/sites/templates/aps_instances_list.htm b/interface/web/sites/templates/aps_instances_list.htm index 2d9c50f6d..19b47a050 100644 --- a/interface/web/sites/templates/aps_instances_list.htm +++ b/interface/web/sites/templates/aps_instances_list.htm @@ -43,10 +43,7 @@ {tmpl_var name='delete_txt'} - - {tmpl_var name='reinstall_txt'} - - + diff --git a/remoting_client/API-docs/navigation.html b/remoting_client/API-docs/navigation.html index e0eebb000..6829df5ca 100644 --- a/remoting_client/API-docs/navigation.html +++ b/remoting_client/API-docs/navigation.html @@ -196,6 +196,15 @@

S

server_get

server_get_serverid_by_ip

+

sites_aps_available_packages_list

+

sites_aps_get_package_details

+

sites_aps_get_package_file

+

sites_aps_get_package_settings

+

sites_aps_install_package

+

sites_aps_instance_get

+

sites_aps_instance_delete

+

sites_aps_instance_settings_get

+

sites_aps_update_package_list

sites_cron_add

sites_cron_delete

sites_cron_get

@@ -226,7 +235,7 @@

sites_web_domain_get

sites_web_domain_set_status

sites_web_domain_update

- p>sites_web_domain_backup_list

+

sites_web_domain_backup_list

sites_web_domain_backup

sites_web_subdomain_add

sites_web_subdomain_delete

diff --git a/remoting_client/API-docs/sites_aps_available_packages_list.html b/remoting_client/API-docs/sites_aps_available_packages_list.html new file mode 100644 index 000000000..1d069debc --- /dev/null +++ b/remoting_client/API-docs/sites_aps_available_packages_list.html @@ -0,0 +1,29 @@ + +ISPCOnfig 3 remote API documentation + + + + + + + + + + +
+

sites_aps_available_packages_list($session_id, $params);

+
+

Description:

+

Reads all available packages with state PACKAGE_ENABLED. If set param all_packages to true, also includes PACKAGE_LOCKED.


+

Input Variables:

+

$session_id, $params

+

Parameters (in $params):

+

all_packages  (boolean)

+

Output:

+

Returns array with all selected package records.

+ +
+ + diff --git a/remoting_client/API-docs/sites_aps_get_package_details.html b/remoting_client/API-docs/sites_aps_get_package_details.html new file mode 100644 index 000000000..56049d8b1 --- /dev/null +++ b/remoting_client/API-docs/sites_aps_get_package_details.html @@ -0,0 +1,29 @@ + +ISPCOnfig 3 remote API documentation + + + + + + + + + + +
+

sites_aps_get_package_details($session_id, $primary_id);

+
+

Description:

+

Gets all possible details for selected package.


+

Input Variables:

+

$session_id, $primary_id

+

Parameters (in $params):

+

None

+

Output:

+

Returns array with all details of selected package.

+ +
+ + diff --git a/remoting_client/API-docs/sites_aps_get_package_file.html b/remoting_client/API-docs/sites_aps_get_package_file.html new file mode 100644 index 000000000..9a6472db0 --- /dev/null +++ b/remoting_client/API-docs/sites_aps_get_package_file.html @@ -0,0 +1,29 @@ + +ISPCOnfig 3 remote API documentation + + + + + + + + + + +
+

sites_aps_get_package_file($session_id, $primary_id, $filename);

+
+

Description:

+

Gets the file with given name (like screenshots or icon) of the selected package. Use sites_aps_get_package_details to get all available files of this package.


+

Input Variables:

+

$session_id, $primary_id, $filename

+

Parameters (in $params):

+

None

+

Output:

+

Returns base64_encoded file content of selected file.
Use the followoing example code to save file content over remote api:
file_put_contents($file, base64_decode(sites_aps_get_package_file($session_id, $primary_id, $filename)));

+ +
+ + diff --git a/remoting_client/API-docs/sites_aps_get_package_settings.html b/remoting_client/API-docs/sites_aps_get_package_settings.html new file mode 100644 index 000000000..4a47c9b9d --- /dev/null +++ b/remoting_client/API-docs/sites_aps_get_package_settings.html @@ -0,0 +1,29 @@ + +ISPCOnfig 3 remote API documentation + + + + + + + + + + +
+

sites_aps_get_package_settings($session_id, $primary_id);

+
+

Description:

+

Gets all possible settings for selected package.


+

Input Variables:

+

$session_id, $primary_id

+

Parameters (in $params):

+

None

+

Output:

+

Returns array with all settings of selected package.

+ +
+ + diff --git a/remoting_client/API-docs/sites_aps_install_package.html b/remoting_client/API-docs/sites_aps_install_package.html new file mode 100644 index 000000000..340dc8253 --- /dev/null +++ b/remoting_client/API-docs/sites_aps_install_package.html @@ -0,0 +1,29 @@ + +ISPCOnfig 3 remote API documentation + + + + + + + + + + +
+

sites_aps_install_package($session_id, $primary_id, $params);

+
+

Description:

+

Starts installation of the selected package in given main_domains webfolder.


+

Input Variables:

+

$session_id, $primary_id, $params

+

Parameters (in $params):

+

main_domain  (varchar(255))

+

Output:

+

Returns new instance id or false.

+ +
+ + diff --git a/remoting_client/API-docs/sites_aps_instance_delete.html b/remoting_client/API-docs/sites_aps_instance_delete.html new file mode 100644 index 000000000..654a3c5df --- /dev/null +++ b/remoting_client/API-docs/sites_aps_instance_delete.html @@ -0,0 +1,29 @@ + +ISPCOnfig 3 remote API documentation + + + + + + + + + + +
+

sites_aps_instance_delete($session_id, $primary_id, $params);

+
+

Description:

+

Starts deletion of the selected APS instance. If param keep_database is set true, database will not be deleted.


+

Input Variables:

+

$session_id, $primary_id, $params

+

Parameters (in $params):

+

keep_database  (boolean)

+

Output:

+

Returns true if deletion is started.

+ +
+ + diff --git a/remoting_client/API-docs/sites_aps_instance_get.html b/remoting_client/API-docs/sites_aps_instance_get.html new file mode 100644 index 000000000..64bfbe51e --- /dev/null +++ b/remoting_client/API-docs/sites_aps_instance_get.html @@ -0,0 +1,29 @@ + +ISPCOnfig 3 remote API documentation + + + + + + + + + + +
+

sites_aps_instance_get($session_id, $primary_id);

+
+

Description:

+

Gets record of given instance id.


+

Input Variables:

+

$session_id, $primary_id

+

Parameters (in $params):

+

None

+

Output:

+

Returns record of APS instance.

+ +
+ + diff --git a/remoting_client/API-docs/sites_aps_instance_settings_get.html b/remoting_client/API-docs/sites_aps_instance_settings_get.html new file mode 100644 index 000000000..bf793d892 --- /dev/null +++ b/remoting_client/API-docs/sites_aps_instance_settings_get.html @@ -0,0 +1,29 @@ + +ISPCOnfig 3 remote API documentation + + + + + + + + + + +
+

sites_aps_instance_settings_get($session_id, $primary_id);

+
+

Description:

+

Gets record of given instance ids settings.


+

Input Variables:

+

$session_id, $primary_id

+

Parameters (in $params):

+

None

+

Output:

+

Returns record of APS instance settings.

+ +
+ + diff --git a/remoting_client/API-docs/sites_aps_update_package_list.html b/remoting_client/API-docs/sites_aps_update_package_list.html new file mode 100644 index 000000000..e581a7230 --- /dev/null +++ b/remoting_client/API-docs/sites_aps_update_package_list.html @@ -0,0 +1,29 @@ + +ISPCOnfig 3 remote API documentation + + + + + + + + + + +
+

sites_aps_update_package_list($session_id);

+
+

Description:

+

Update available package list. Starts the ApsCrawler in server mode. May take a while.


+

Input Variables:

+

$session_id

+

Parameters (in $params):

+

None

+

Output:

+

always true

+ +
+ + diff --git a/server/lib/classes/aps_installer.inc.php b/server/lib/classes/aps_installer.inc.php index 089c7ab22..fbb807968 100644 --- a/server/lib/classes/aps_installer.inc.php +++ b/server/lib/classes/aps_installer.inc.php @@ -376,7 +376,7 @@ class ApsInstaller extends ApsBase setups get enough time to create the database */ if($this->handle_type == 'install') { for($n = 1; $n < 15; $n++) { - $link = mysql_connect($newdb_host, $newdb_login, $newdb_pw); + $link = mysqli_connect($newdb_host, $newdb_login, $newdb_pw); if (!$link) { unset($link); sleep(5); -- GitLab From 5fd2b145c2e55ae0d4c394cb2fe0b903802316ce Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Mon, 5 Jan 2015 07:39:58 +0100 Subject: [PATCH 051/287] Fixed: FS#3780 - bastille firewall missing eno+ in Centos 7, its blocking all connections. --- server/conf/bastille-firewall.cfg.master | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/conf/bastille-firewall.cfg.master b/server/conf/bastille-firewall.cfg.master index b2b653625..2bb1bf28e 100644 --- a/server/conf/bastille-firewall.cfg.master +++ b/server/conf/bastille-firewall.cfg.master @@ -75,7 +75,7 @@ DNS_SERVERS="{DNS_SERVERS}" # use the "\" continuation character (so Bastille can change the # values if it is run more than once) TRUSTED_IFACES="lo" # MINIMAL/SAFEST -PUBLIC_IFACES="eth+ ppp+ slip+ venet+ bond+" # SAFEST +PUBLIC_IFACES="eth+ ppp+ slip+ venet+ bond+ eno+" # SAFEST INTERNAL_IFACES="" # SAFEST -- GitLab From e5c4be518d37f7aba4ff80f4c5f46bf2606cb848 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 6 Jan 2015 09:40:38 +0100 Subject: [PATCH 052/287] fixed php-errors --- interface/web/dns/lib/lang/fr_dns_wizard.lng | 2 +- interface/web/mail/lib/lang/es_mail_get.lng | 2 +- interface/web/sites/lib/remote.conf.php | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/interface/web/dns/lib/lang/fr_dns_wizard.lng b/interface/web/dns/lib/lang/fr_dns_wizard.lng index 6b31c304a..5ab5f5fa2 100644 --- a/interface/web/dns/lib/lang/fr_dns_wizard.lng +++ b/interface/web/dns/lib/lang/fr_dns_wizard.lng @@ -6,7 +6,7 @@ $wb['btn_save_txt'] = 'Cré l\'enregistrement DNS'; $wb['btn_cancel_txt'] = 'Annuler'; $wb['domain_txt'] = 'Domaine'; $wb['email_txt'] = 'Email'; -$wb['dkim_txt'] = 'DKIM activé +$wb['dkim_txt'] = 'DKIM activé'; $wb['ns1_txt'] = 'NS 1'; $wb['ns2_txt'] = 'NS 2'; $wb['ip_txt'] = 'Adresse IP'; diff --git a/interface/web/mail/lib/lang/es_mail_get.lng b/interface/web/mail/lib/lang/es_mail_get.lng index f7ffc9689..0ee18c55a 100644 --- a/interface/web/mail/lib/lang/es_mail_get.lng +++ b/interface/web/mail/lib/lang/es_mail_get.lng @@ -14,6 +14,6 @@ $wb['source_password_error_isempty'] = 'La contraseña está vacía.'; $wb['destination_error_isemail'] = 'No se ha seleccionado el destino.'; $wb['source_server_error_regex'] = 'Servidor POP3/IMAP no es un nombre de dominio válido.'; $wb['source_read_all_txt'] = 'Recoger todos los correos (incluído correos leídos)'; -$wb['error_delete_read_all_combination'] = 'Combinación de opciones no permitida. No puedes desactivar 'Borrar los correos después de recogerlos' y activar 'Recoger todos los correos''; +$wb['error_delete_read_all_combination'] = "Combinación de opciones no permitida. No puedes desactivar 'Borrar los correos después de recogerlos' y activar 'Recoger todos los correos'"; $wb['source_delete_note_txt'] = 'Por favor compruebe primero si la recogida de correo funciona antes de activar esta opción.'; ?> diff --git a/interface/web/sites/lib/remote.conf.php b/interface/web/sites/lib/remote.conf.php index 5ba2b7d6f..6548ef02c 100644 --- a/interface/web/sites/lib/remote.conf.php +++ b/interface/web/sites/lib/remote.conf.php @@ -8,6 +8,5 @@ $function_list['sites_web_domain_get,sites_web_domain_add,sites_web_domain_updat $function_list['sites_web_domain_backup'] = 'Sites Backup functions'; $function_list['sites_web_aliasdomain_get,sites_web_aliasdomain_add,sites_web_aliasdomain_update,sites_web_aliasdomain_delete'] = 'Sites Aliasdomain functions'; $function_list['sites_web_subdomain_get,sites_web_subdomain_add,sites_web_subdomain_update,sites_web_subdomain_delete'] = 'Sites Subdomain functions'; -$function_list['sites_aps_update_package_list,sites_aps_available_packages_list,sites_aps_install_package,sites_aps_get_package_details,sites_aps_get_package_file,sites_aps_get_package_settings,sites_aps_instance_get,sites_aps_instance_delete''] = 'Sites APS functions'; - +$function_list['sites_aps_update_package_list,sites_aps_available_packages_list,sites_aps_install_package,sites_aps_get_package_details,sites_aps_get_package_file,sites_aps_get_package_settings,sites_aps_instance_get,sites_aps_instance_delete'] = 'Sites APS functions'; ?> -- GitLab From 0380585631623770b0d9d4ffdfcda8e007a2bb5d Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 6 Jan 2015 10:02:30 +0100 Subject: [PATCH 053/287] updated default dns-template to use spf and dkim (when active for the mail-domain) --- install/sql/incremental/upd_0081.sql | 19 +++++++++++++++++++ install/sql/ispconfig3.sql | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 install/sql/incremental/upd_0081.sql diff --git a/install/sql/incremental/upd_0081.sql b/install/sql/incremental/upd_0081.sql new file mode 100644 index 000000000..415eb3cac --- /dev/null +++ b/install/sql/incremental/upd_0081.sql @@ -0,0 +1,19 @@ +UPDATE `dns_template` SET `fields` = 'DOMAIN,IP,NS1,NS2,EMAIL,DKIM' WHERE `dns_template`.`template_id` =1; +UPDATE `dbispconfig`.`dns_template` SET `template` = '[ZONE] +origin={DOMAIN}. +ns={NS1}. +mbox={EMAIL}. +refresh=7200 +retry=540 +expire=604800 +minimum=86400 +ttl=3600 + +[DNS_RECORDS] +A|{DOMAIN}.|{IP}|0|3600 +A|www|{IP}|0|3600 +A|mail|{IP}|0|3600 +NS|{DOMAIN}.|{NS1}.|0|3600 +NS|{DOMAIN}.|{NS2}.|0|3600 +MX|{DOMAIN}.|mail.{DOMAIN}.|10|3600 +TXT|{DOMAIN}.|v=spf1 mx a ~all|0|3600' WHERE `dns_template`.`template_id` = 1; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index b6390e712..6c57ce00f 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -2218,7 +2218,8 @@ INSERT INTO `country` (`iso`, `name`, `printable_name`, `iso3`, `numcode`, `eu`) -- Dumping data for table `dns_template` -- -INSERT INTO `dns_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `name`, `fields`, `template`, `visible`) VALUES (1, 1, 1, 'riud', 'riud', '', 'Default', 'DOMAIN,IP,NS1,NS2,EMAIL', '[ZONE]\norigin={DOMAIN}.\nns={NS1}.\nmbox={EMAIL}.\nrefresh=7200\nretry=540\nexpire=604800\nminimum=86400\nttl=3600\n\n[DNS_RECORDS]\nA|{DOMAIN}.|{IP}|0|3600\nA|www|{IP}|0|3600\nA|mail|{IP}|0|3600\nNS|{DOMAIN}.|{NS1}.|0|3600\nNS|{DOMAIN}.|{NS2}.|0|3600\nMX|{DOMAIN}.|mail.{DOMAIN}.|10|3600', 'y'); +INSERT INTO `dns_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `name`, `fields`, `template`, `visible`) VALUES (1, 1, 1, 'riud', 'riud', '', 'Default', 'DOMAIN,IP,NS1,NS2,EMAIL,DKIM', '[ZONE]\norigin={DOMAIN}.\nns={NS1}.\nmbox={EMAIL}.\nrefresh=7200\nretry=540\nexpire=604800\nminimum=86400\nttl=3600\n\n[DNS_RECORDS]\nA|{DOMAIN}.|{IP}|0|3600\nA|www|{IP}|0|3600\nA|mail|{IP}|0|3600\nNS|{DOMAIN}.|{NS1}.|0|3600\nNS|{DOMAIN}.|{NS2}.|0|3600\nMX|{DOMAIN}.|mail.{DOMAIN}.|10|3600\nTXT|{DOMAIN}.|v=spf1 mx a ~all|0|3600', 'y'); + -- -------------------------------------------------------- -- GitLab From d2713e4bf2090bcd85e0c1d7b99f08575d12f133 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Tue, 6 Jan 2015 16:36:10 +0100 Subject: [PATCH 054/287] - Fixed bug in quota lib - New dashboard layout --- interface/lib/classes/quota_lib.inc.php | 17 +++- interface/web/dashboard/dashlets/limits.php | 7 +- .../dashboard/dashlets/templates/limits.htm | 39 ++++++--- .../dashlets/templates/mailquota.htm | 57 +++++++------ .../dashboard/dashlets/templates/modules.htm | 20 +++-- .../dashboard/dashlets/templates/quota.htm | 55 ++++++------ .../web/dashboard/templates/dashboard.htm | 84 +++++++------------ .../default/assets/stylesheets/ispconfig.css | 2 +- .../assets/stylesheets/ispconfig.min.css | 2 +- .../web/themes/default/templates/main.tpl.htm | 8 ++ 10 files changed, 157 insertions(+), 134 deletions(-) diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php index b9ef6aab2..613c5244b 100644 --- a/interface/lib/classes/quota_lib.inc.php +++ b/interface/lib/classes/quota_lib.inc.php @@ -14,7 +14,7 @@ class quota_lib { //print_r($monitor_data); // select all websites or websites belonging to client - $sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost'".(($clientid != null)?" AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)":''), $app->functions->intval($client_id)); + $sites = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE active = 'y' AND type = 'vhost'".(($clientid != null)?" AND sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)":''), $clientid); //print_r($sites); if(is_array($sites) && !empty($sites)){ @@ -35,7 +35,13 @@ class quota_lib { if (!is_numeric($sites[$i]['soft'])) $sites[$i]['soft']=$sites[$i]['soft'][1]; if (!is_numeric($sites[$i]['hard'])) $sites[$i]['hard']=$sites[$i]['hard'][1]; if (!is_numeric($sites[$i]['files'])) $sites[$i]['files']=$sites[$i]['files'][1]; - + + $sites[$i]['used_raw'] = $sites[$i]['used']; + $sites[$i]['soft_raw'] = $sites[$i]['soft']; + $sites[$i]['hard_raw'] = $sites[$i]['hard']; + $sites[$i]['files_raw'] = $sites[$i]['files']; + $sites[$i]['used_percentage'] = ($sites[$i]['soft'] > 0 && $sites[$i]['used'] > 0 ? round($sites[$i]['used'] * 100 / $sites[$i]['soft']) : 0); + if ($readable) { // colours $sites[$i]['display_colour'] = '#000000'; @@ -109,7 +115,7 @@ class quota_lib { //print_r($monitor_data); // select all email accounts or email accounts belonging to client - $emails = $app->db->queryAllRecords("SELECT * FROM mail_user".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : ''), $app->functions->intval($client_id)); + $emails = $app->db->queryAllRecords("SELECT * FROM mail_user".(($clientid != null)? " WHERE sys_groupid = (SELECT default_group FROM sys_user WHERE client_id=?)" : ''), $clientid); //print_r($emails); if(is_array($emails) && !empty($emails)){ @@ -120,6 +126,11 @@ class quota_lib { if (!is_numeric($emails[$i]['used'])) $emails[$i]['used']=$emails[$i]['used'][1]; + $emails[$i]['quota_raw'] = $emails[$i]['quota']; + $emails[$i]['used_raw'] = $emails[$i]['used']; + $emails[$i]['used_percentage'] = ($emails[$i]['quota'] > 0 && $emails[$i]['used'] > 0 ? round($emails[$i]['used'] * 100 / $emails[$i]['quota']) : 0); + + if ($readable) { // colours $emails[$i]['display_colour'] = '#000000'; diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php index 87898eb8a..70113f396 100644 --- a/interface/web/dashboard/dashlets/limits.php +++ b/interface/web/dashboard/dashlets/limits.php @@ -143,10 +143,15 @@ class dashlet_limits { } if($value != 0 || $value == $wb['unlimited_txt']) { $value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value; + $usage = $this->_get_limit_usage($limit); + $percentage = ($value == '-1' || $value == 0 ? 0 : round(100 * $usage / $value)); $rows[] = array('field' => $field, 'field_txt' => $wb[$field.'_txt'], 'value' => $value_formatted, - 'usage' => $this->_get_limit_usage($limit)); + 'value_raw' => $value, + 'usage' => $usage, + 'usage_raw' => $usage, + 'percentage' => $percentage); } } $tpl->setLoop('rows', $rows); diff --git a/interface/web/dashboard/dashlets/templates/limits.htm b/interface/web/dashboard/dashlets/templates/limits.htm index 396ba42eb..35445ab89 100644 --- a/interface/web/dashboard/dashlets/templates/limits.htm +++ b/interface/web/dashboard/dashlets/templates/limits.htm @@ -1,13 +1,26 @@ -

{tmpl_var name='limits_txt'}

-
-
- - - - - - - -
{tmpl_var name='field_txt'}{tmpl_var name='usage'} {tmpl_var name='of_txt'} {tmpl_var name='value'}
-
-
\ No newline at end of file +
+ + + + + + + + + + + + + + + + + +
{tmpl_var name='limits_txt'}
  
{tmpl_var name='field_txt'}{tmpl_var name='usage'} {tmpl_var name='of_txt'} {tmpl_var name='value'} +
+
+ {tmpl_var name='usage'} {tmpl_var name='of_txt'} {tmpl_var name='value'} +
+
+
+
diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm index 45f97c9b0..a4b87a31e 100644 --- a/interface/web/dashboard/dashlets/templates/mailquota.htm +++ b/interface/web/dashboard/dashlets/templates/mailquota.htm @@ -1,31 +1,30 @@ -
-

{tmpl_var name='mailquota_txt'}

-
-
- +
+
+ - - - - - - + + + + + + - - - - - - - - - - - - - - -
{tmpl_var name='mailquota_txt'}
{tmpl_var name='email_txt'}{tmpl_var name='name_txt'}{tmpl_var name='used_txt'}{tmpl_var name='quota_txt'}
{tmpl_var name='email_txt'}{tmpl_var name='name_txt'}{tmpl_var name='used_txt'}{tmpl_var name='quota_txt'}
{tmpl_var name='email'}{tmpl_var name='name'}{tmpl_var name='used'}{tmpl_var name='quota'}
{tmpl_var name='no_email_accounts_txt'}
-
-
-
\ No newline at end of file + + + + {tmpl_var name='email'} + {tmpl_var name='name'} + {tmpl_var name='used'} + {tmpl_var name='quota'} + +
+
+ {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='quota'} +
+
+ + +
+ + +
\ No newline at end of file diff --git a/interface/web/dashboard/dashlets/templates/modules.htm b/interface/web/dashboard/dashlets/templates/modules.htm index 03fb8cb88..442e10243 100644 --- a/interface/web/dashboard/dashlets/templates/modules.htm +++ b/interface/web/dashboard/dashlets/templates/modules.htm @@ -1,10 +1,18 @@

{tmpl_var name='available_modules_txt'}

-
+
+
\ No newline at end of file diff --git a/interface/web/dashboard/dashlets/templates/quota.htm b/interface/web/dashboard/dashlets/templates/quota.htm index 68470dd17..823de6fe0 100644 --- a/interface/web/dashboard/dashlets/templates/quota.htm +++ b/interface/web/dashboard/dashlets/templates/quota.htm @@ -1,31 +1,30 @@ -
-

{tmpl_var name='quota_txt'}

-
-
- +
+
+ - - - - - - + + + + + + - - - - - - - - - - - - - - -
{tmpl_var name='quota_txt'}
{tmpl_var name='domain_txt'}{tmpl_var name='used_txt'}{tmpl_var name='soft_txt'}{tmpl_var name='hard_txt'}
{tmpl_var name='domain_txt'}{tmpl_var name='used_txt'}{tmpl_var name='soft_txt'}{tmpl_var name='hard_txt'}
{tmpl_var name='domain'}{tmpl_var name='used'}{tmpl_var name='soft'}{tmpl_var name='hard'}
{tmpl_var name='no_sites_txt'}
-
+ + + + {tmpl_var name='domain'} + {tmpl_var name='used'} + {tmpl_var name='soft'} + {tmpl_var name='hard'} + +
+
+ {tmpl_var name='used'} {tmpl_var name='of_txt'} {tmpl_var name='soft'} +
+
+ + +
+ +
-
\ No newline at end of file diff --git a/interface/web/dashboard/templates/dashboard.htm b/interface/web/dashboard/templates/dashboard.htm index 231fb54bf..65ccc7eae 100644 --- a/interface/web/dashboard/templates/dashboard.htm +++ b/interface/web/dashboard/templates/dashboard.htm @@ -1,52 +1,32 @@ -

-
-
-
- -
-
-
- - {tmpl_var name='error_msg'} - -
-
-
- -
-
-
- - {tmpl_var name='warning_msg'} - -
-
-
- -
-
-
- - {tmpl_var name='info_msg'} - -
-
-
-
-
- - {tmpl_var name='content'} - -

 

-
-
-
-
- - {tmpl_var name='content'} - -

 

-
-
-
-
\ No newline at end of file + + + +
+ + {tmpl_var name='error_msg'} + +
+
+ +
+ + {tmpl_var name='warning_msg'} + +
+
+ +
+ + {tmpl_var name='info_msg'} + +
+
+ + + {tmpl_var name='content'} + + + {tmpl_var name='content'} + diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css index 3c9a949bb..0915b72ad 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css @@ -217,7 +217,7 @@ body { .progress { display: inline-block; margin-bottom: 0; - width: 300px; + width: 150px; height: 10px; } .content-tab-wrapper { diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.min.css b/interface/web/themes/default/assets/stylesheets/ispconfig.min.css index fa4df1d88..b4de7690f 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.min.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.min.css @@ -1 +1 @@ -body{overflow-y:scroll}.left{float:left}.right{float:right}.clear:after{content:"";display:table;clear:both}.marginTop15{margin-top:15px}.paddingX5{padding-left:5px !important;padding-right:5px !important}.width65{width:65px}.form-group input[type='checkbox']{margin-top:10px}.control-label{font-weight:normal}.control-label:after{content:":"}.formbutton-default{padding:6px 30px;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-success{padding:6px 30px;border-style:solid;border-width:1px;border-bottom-width:solid;font-size:12px;font-weight:bold;transition:all ease 500ms}#main-wrapper{margin:0 auto;width:950px}#logo{float:left;width:200px;height:65px;background:url("../images/logo.png") no-repeat}#logo a{display:block;width:100%;height:100%}#headerbar{float:right}#searchform{float:right;margin-top:16px}#searchform>div{position:relative;display:table}#searchform>div>div{display:table-cell;padding-right:8px;vertical-align:top}#searchform .icon{padding:0 2px;font-size:16px}#logout-button{float:right;margin-top:16px;margin-left:25px;border-bottom-style:solid;border-bottom-width:2px;transition:all ease 500ms}#main-navigation{margin-top:24px}#main-navigation a{padding:0 12px;height:70px;border-bottom-style:solid;botder-bottom-width:2px;transition:all ease 500ms}#main-navigation .icon{font-size:32px}#main-navigation .title{margin-top:2px;font-weight:bold}.btn-group-justified .btn{border-right-width:0}.btn-group-justified .btn:last-of-type{border-right-width:1px}#content{width:710px}#sidebar{margin-top:27px;width:215px;border-style:solid;border-width:1px;border-radius:4px}#sidebar header{margin:1px;padding:0 10px;height:40px;line-height:40px;font-weight:bold;border-top-left-radius:2px;border-top-right-radius:2px}#sidebar ul{margin:0;padding:0;list-style:none}#sidebar li{padding:10px;border-top-style:solid;border-top-width:1px;font-size:12px}#sidebar a{text-decoration:none;transition:color ease 500ms}.page-header{margin:20px 0;padding:0}.alert-notification a{font-weight:bold;text-decoration:none;transition:color ease 500ms}.alert-label,.alert-content{display:inline-block;vertical-align:top}.alert-label{width:60px}.modules{margin:0;padding:0;list-style:none}.modules li{float:left;margin-right:15px;margin-bottom:15px;padding:8px;width:200px;border-radius:4px;border-style:solid;border-width:1px}.modules .icon{float:left;margin-right:15px;font-size:50px}.modules .left{margin-top:5px}.modules .title{margin-top:6px;margin-left:20px;font-size:16px;font-weight:bold}.modules .button{margin-top:10px;width:100%;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.modules a{text-decoration:none}.table-wrapper{margin-bottom:20px;border-radius:4px;border-style:solid;border-width:1px}.table{margin-bottom:1px}.table caption{padding:5px 10px;text-align:left;font-weight:bold;font-size:18px;border-bottom-style:solid;border-bottom-width:1px}.table tbody tr{border-top-style:solid;border-top-width:1px;transition:background ease 500ms}.table tbody tr:last-child{border-radius:4px}.tfooter{margin-top:-1px;height:40px;border-top-style:solid;border-top-width:1px}.progress{display:inline-block;margin-bottom:0;width:300px;height:10px}.content-tab-wrapper{border-style:solid;border-width:1px;border-radius:4px}.content-tab-wrapper .nav-tabs>li>a{border-radius:0;border:none !important;border-right-style:solid !important;border-right-width:1px !important;outline:0;font-weight:bold;transition:background ease 500ms}.content-tab-wrapper .nav-tabs li:not(:first-child) a{margin-left:-2px}.tab-content{padding:25px 10px}.input-group-btn .icon-calendar{font-size:18px}thead.dark th{height:40px;line-height:40px;font-weight:normal}#footer{margin:20px 0;padding-top:20px;border-top-style:solid;border-top-width:1px;text-align:center;font-size:10px}.menu-btn{display:none;cursor:pointer}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#logo{background-image:url("../images/logo@2x.png");background-size:200px 65px}} \ No newline at end of file +body{overflow-y:scroll}.left{float:left}.right{float:right}.clear:after{content:"";display:table;clear:both}.marginTop15{margin-top:15px}.paddingX5{padding-left:5px !important;padding-right:5px !important}.width65{width:65px}.form-group input[type='checkbox']{margin-top:10px}.control-label{font-weight:normal}.control-label:after{content:":"}.formbutton-default{padding:6px 30px;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-success{padding:6px 30px;border-style:solid;border-width:1px;border-bottom-width:solid;font-size:12px;font-weight:bold;transition:all ease 500ms}#main-wrapper{margin:0 auto;width:950px}#logo{float:left;width:200px;height:65px;background:url("../images/logo.png") no-repeat}#logo a{display:block;width:100%;height:100%}#headerbar{float:right}#searchform{float:right;margin-top:16px}#searchform>div{position:relative;display:table}#searchform>div>div{display:table-cell;padding-right:8px;vertical-align:top}#searchform .icon{padding:0 2px;font-size:16px}#logout-button{float:right;margin-top:16px;margin-left:25px;border-bottom-style:solid;border-bottom-width:2px;transition:all ease 500ms}#main-navigation{margin-top:24px}#main-navigation a{padding:0 12px;height:70px;border-bottom-style:solid;botder-bottom-width:2px;transition:all ease 500ms}#main-navigation .icon{font-size:32px}#main-navigation .title{margin-top:2px;font-weight:bold}.btn-group-justified .btn{border-right-width:0}.btn-group-justified .btn:last-of-type{border-right-width:1px}#content{width:710px}#sidebar{margin-top:27px;width:215px;border-style:solid;border-width:1px;border-radius:4px}#sidebar header{margin:1px;padding:0 10px;height:40px;line-height:40px;font-weight:bold;border-top-left-radius:2px;border-top-right-radius:2px}#sidebar ul{margin:0;padding:0;list-style:none}#sidebar li{padding:10px;border-top-style:solid;border-top-width:1px;font-size:12px}#sidebar a{text-decoration:none;transition:color ease 500ms}.page-header{margin:20px 0;padding:0}.alert-notification a{font-weight:bold;text-decoration:none;transition:color ease 500ms}.alert-label,.alert-content{display:inline-block;vertical-align:top}.alert-label{width:60px}.modules{margin:0;padding:0;list-style:none}.modules li{float:left;margin-right:15px;margin-bottom:15px;padding:8px;width:200px;border-radius:4px;border-style:solid;border-width:1px}.modules .icon{float:left;margin-right:15px;font-size:50px}.modules .left{margin-top:5px}.modules .title{margin-top:6px;margin-left:20px;font-size:16px;font-weight:bold}.modules .button{margin-top:10px;width:100%;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.modules a{text-decoration:none}.table-wrapper{margin-bottom:20px;border-radius:4px;border-style:solid;border-width:1px}.table{margin-bottom:1px}.table caption{padding:5px 10px;text-align:left;font-weight:bold;font-size:18px;border-bottom-style:solid;border-bottom-width:1px}.table tbody tr{border-top-style:solid;border-top-width:1px;transition:background ease 500ms}.table tbody tr:last-child{border-radius:4px}.tfooter{margin-top:-1px;height:40px;border-top-style:solid;border-top-width:1px}.progress{display:inline-block;margin-bottom:0;width:150px;height:10px}.content-tab-wrapper{border-style:solid;border-width:1px;border-radius:4px}.content-tab-wrapper .nav-tabs>li>a{border-radius:0;border:none !important;border-right-style:solid !important;border-right-width:1px !important;outline:0;font-weight:bold;transition:background ease 500ms}.content-tab-wrapper .nav-tabs li:not(:first-child) a{margin-left:-2px}.tab-content{padding:25px 10px}.input-group-btn .icon-calendar{font-size:18px}thead.dark th{height:40px;line-height:40px;font-weight:normal}#footer{margin:20px 0;padding-top:20px;border-top-style:solid;border-top-width:1px;text-align:center;font-size:10px}.menu-btn{display:none;cursor:pointer}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#logo{background-image:url("../images/logo@2x.png");background-size:200px 65px}} \ 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 bb40c5095..264689f3e 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -148,6 +148,14 @@ loadContent(content_to_load); }); + $(document).on('click', 'a[data-capp],button[data-capp]', function(e) { + e.preventDefault(); + var content_to_load = $(this).attr('data-capp'); + if(!content_to_load) return this; + + capp(content_to_load); + }); + $(document).bind("keypress", function(event) { //Use $ submit with keypress Enter in panel filterbar if (event.which == '13' && $(".panel #Filter").length > 0 && $(event.target).hasClass('ui-autocomplete-input') == false ) { -- GitLab From e3be66a454ab085a63d95e6cb605786f7c16641b Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Tue, 6 Jan 2015 17:35:19 +0100 Subject: [PATCH 055/287] - Tipsy updated - Select2 combobox --- interface/web/dns/templates/dns_dkim_edit.htm | 3 +- .../web/js/jquery-ui-1.11.1.custom.min.js | 13 - interface/web/js/jquery.combobox.js | 129 ---- interface/web/js/jquery.tipsy.js | 696 +++++++---------- interface/web/js/scrigo.js.php | 8 +- interface/web/js/select2/select2.min.js | 23 + interface/web/js/select2/select2_locale_ar.js | 19 + interface/web/js/select2/select2_locale_az.js | 20 + interface/web/js/select2/select2_locale_bg.js | 20 + interface/web/js/select2/select2_locale_ca.js | 19 + interface/web/js/select2/select2_locale_cs.js | 51 ++ interface/web/js/select2/select2_locale_da.js | 19 + interface/web/js/select2/select2_locale_de.js | 18 + interface/web/js/select2/select2_locale_el.js | 19 + interface/web/js/select2/select2_locale_es.js | 19 + interface/web/js/select2/select2_locale_et.js | 19 + interface/web/js/select2/select2_locale_eu.js | 45 ++ interface/web/js/select2/select2_locale_fa.js | 21 + interface/web/js/select2/select2_locale_fi.js | 30 + interface/web/js/select2/select2_locale_fr.js | 18 + interface/web/js/select2/select2_locale_gl.js | 45 ++ interface/web/js/select2/select2_locale_he.js | 19 + interface/web/js/select2/select2_locale_hr.js | 24 + interface/web/js/select2/select2_locale_hu.js | 17 + interface/web/js/select2/select2_locale_id.js | 19 + interface/web/js/select2/select2_locale_is.js | 17 + interface/web/js/select2/select2_locale_it.js | 17 + interface/web/js/select2/select2_locale_ja.js | 17 + interface/web/js/select2/select2_locale_ka.js | 19 + interface/web/js/select2/select2_locale_ko.js | 19 + interface/web/js/select2/select2_locale_lt.js | 26 + interface/web/js/select2/select2_locale_lv.js | 19 + interface/web/js/select2/select2_locale_mk.js | 19 + interface/web/js/select2/select2_locale_ms.js | 19 + interface/web/js/select2/select2_locale_nb.js | 22 + interface/web/js/select2/select2_locale_nl.js | 17 + interface/web/js/select2/select2_locale_pl.js | 54 ++ .../web/js/select2/select2_locale_pt-BR.js | 18 + .../web/js/select2/select2_locale_pt-PT.js | 17 + interface/web/js/select2/select2_locale_ro.js | 17 + interface/web/js/select2/select2_locale_rs.js | 19 + interface/web/js/select2/select2_locale_ru.js | 23 + interface/web/js/select2/select2_locale_sk.js | 50 ++ interface/web/js/select2/select2_locale_sv.js | 19 + interface/web/js/select2/select2_locale_th.js | 19 + interface/web/js/select2/select2_locale_tr.js | 19 + .../web/js/select2/select2_locale_ug-CN.js | 16 + interface/web/js/select2/select2_locale_uk.js | 25 + interface/web/js/select2/select2_locale_vi.js | 20 + .../web/js/select2/select2_locale_zh-CN.js | 16 + .../web/js/select2/select2_locale_zh-TW.js | 16 + .../web/mail/templates/mail_domain_edit.htm | 2 +- .../sites/templates/aps_instances_list.htm | 2 +- .../assets/stylesheets/select2-bootstrap.css | 87 +++ .../default/assets/stylesheets/select2.css | 704 ++++++++++++++++++ .../web/themes/default/templates/main.tpl.htm | 5 +- 56 files changed, 2103 insertions(+), 589 deletions(-) delete mode 100755 interface/web/js/jquery-ui-1.11.1.custom.min.js delete mode 100755 interface/web/js/jquery.combobox.js create mode 100644 interface/web/js/select2/select2.min.js create mode 100644 interface/web/js/select2/select2_locale_ar.js create mode 100644 interface/web/js/select2/select2_locale_az.js create mode 100644 interface/web/js/select2/select2_locale_bg.js create mode 100644 interface/web/js/select2/select2_locale_ca.js create mode 100644 interface/web/js/select2/select2_locale_cs.js create mode 100644 interface/web/js/select2/select2_locale_da.js create mode 100644 interface/web/js/select2/select2_locale_de.js create mode 100644 interface/web/js/select2/select2_locale_el.js create mode 100644 interface/web/js/select2/select2_locale_es.js create mode 100644 interface/web/js/select2/select2_locale_et.js create mode 100644 interface/web/js/select2/select2_locale_eu.js create mode 100644 interface/web/js/select2/select2_locale_fa.js create mode 100644 interface/web/js/select2/select2_locale_fi.js create mode 100644 interface/web/js/select2/select2_locale_fr.js create mode 100644 interface/web/js/select2/select2_locale_gl.js create mode 100644 interface/web/js/select2/select2_locale_he.js create mode 100644 interface/web/js/select2/select2_locale_hr.js create mode 100644 interface/web/js/select2/select2_locale_hu.js create mode 100644 interface/web/js/select2/select2_locale_id.js create mode 100644 interface/web/js/select2/select2_locale_is.js create mode 100644 interface/web/js/select2/select2_locale_it.js create mode 100644 interface/web/js/select2/select2_locale_ja.js create mode 100644 interface/web/js/select2/select2_locale_ka.js create mode 100644 interface/web/js/select2/select2_locale_ko.js create mode 100644 interface/web/js/select2/select2_locale_lt.js create mode 100644 interface/web/js/select2/select2_locale_lv.js create mode 100644 interface/web/js/select2/select2_locale_mk.js create mode 100644 interface/web/js/select2/select2_locale_ms.js create mode 100644 interface/web/js/select2/select2_locale_nb.js create mode 100644 interface/web/js/select2/select2_locale_nl.js create mode 100644 interface/web/js/select2/select2_locale_pl.js create mode 100644 interface/web/js/select2/select2_locale_pt-BR.js create mode 100644 interface/web/js/select2/select2_locale_pt-PT.js create mode 100644 interface/web/js/select2/select2_locale_ro.js create mode 100644 interface/web/js/select2/select2_locale_rs.js create mode 100644 interface/web/js/select2/select2_locale_ru.js create mode 100644 interface/web/js/select2/select2_locale_sk.js create mode 100644 interface/web/js/select2/select2_locale_sv.js create mode 100644 interface/web/js/select2/select2_locale_th.js create mode 100644 interface/web/js/select2/select2_locale_tr.js create mode 100644 interface/web/js/select2/select2_locale_ug-CN.js create mode 100644 interface/web/js/select2/select2_locale_uk.js create mode 100644 interface/web/js/select2/select2_locale_vi.js create mode 100644 interface/web/js/select2/select2_locale_zh-CN.js create mode 100644 interface/web/js/select2/select2_locale_zh-TW.js create mode 100644 interface/web/themes/default/assets/stylesheets/select2-bootstrap.css create mode 100644 interface/web/themes/default/assets/stylesheets/select2.css diff --git a/interface/web/dns/templates/dns_dkim_edit.htm b/interface/web/dns/templates/dns_dkim_edit.htm index c13d16b31..9c2982e10 100644 --- a/interface/web/dns/templates/dns_dkim_edit.htm +++ b/interface/web/dns/templates/dns_dkim_edit.htm @@ -7,7 +7,7 @@
- +
@@ -36,4 +36,3 @@
- diff --git a/interface/web/js/jquery-ui-1.11.1.custom.min.js b/interface/web/js/jquery-ui-1.11.1.custom.min.js deleted file mode 100755 index 6a4e1d1f3..000000000 --- a/interface/web/js/jquery-ui-1.11.1.custom.min.js +++ /dev/null @@ -1,13 +0,0 @@ -/*! jQuery UI - v1.11.1 - 2014-09-21 -* http://jqueryui.com -* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, resizable.js, selectable.js, sortable.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, menu.js, progressbar.js, selectmenu.js, slider.js, spinner.js, tabs.js, tooltip.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js -* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ - -(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function s(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=a(e("
"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",o)}function o(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function r(t,i){e.extend(t,i);for(var s in i)null==i[s]&&(t[s]=i[s]);return t}function h(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.1",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var l=0,u=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,n=u.call(arguments,1),a=0,o=n.length;o>a;a++)for(i in n[a])s=n[a][i],n[a].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(n){var a="string"==typeof n,o=u.call(arguments,1),r=this;return n=!a&&o.length?e.widget.extend.apply(null,[n].concat(o)):n,a?this.each(function(){var i,a=e.data(this,s);return"instance"===n?(r=a,!1):a?e.isFunction(a[n])&&"_"!==n.charAt(0)?(i=a[n].apply(a,o),i!==a&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+n+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+n+"'")}):this.each(function(){var t=e.data(this,s);t?(t.option(n||{}),t._init&&t._init()):e.data(this,s,new i(n,this))}),r}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget;var d=!1;e(document).mouseup(function(){d=!1}),e.widget("ui.mouse",{version:"1.11.1",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!d){this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,s=1===t.which,n="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),d=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):t.which?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),d=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e("
"),a=s.children()[0];return e("body").append(s),t=a.offsetWidth,s.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===i||"auto"===i&&t.widthi?"left":t>0?"right":"center",vertical:0>a?"top":s>0?"bottom":"middle"};d>m&&m>r(t+i)&&(h.horizontal="center"),c>g&&g>r(s+a)&&(h.vertical="middle"),h.important=o(r(t),r(i))>o(r(s),r(a))?"horizontal":"vertical",n.using.call(this,e,h)}),u.offset(e.extend(M,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=e.left-t.collisionPosition.marginLeft,h=n-r,l=r+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=o(e.left-r,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,h=n-r,l=r+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=o(e.top-r,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,d=l+t.collisionWidth-o-h,c="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+c+p+f+t.collisionWidth-o-a,(0>i||r(u)>i)&&(e.left+=c+p+f)):d>0&&(s=e.left-t.collisionPosition.marginLeft+c+p+f-h,(s>0||d>r(s))&&(e.left+=c+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,d=l+t.collisionHeight-o-h,c="top"===t.my[1],p=c?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-a,e.top+p+f+m>u&&(0>s||r(u)>s)&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,e.top+p+f+m>d&&(i>0||d>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,o,r=document.getElementsByTagName("body")[0],h=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)t.style[o]=s[o];t.appendChild(h),i=r||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML="",i.removeChild(t)}()}(),e.ui.position,e.widget("ui.draggable",e.ui.mouse,{version:"1.11.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(t){var i=this.document[0],s=this.options;try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&e(i.activeElement).blur()}catch(n){}return this.helper||s.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(s.iframeFix===!0?"iframe":s.iframeFix).each(function(){e("
").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options,a=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,e(a).width()-this.helperProportions.width-this.margins.left,(e(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,s,n,a,o=this.options,r=this._isRootNode(this.scrollParent[0]),h=e.pageX,l=e.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.lefti[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a),"y"===o.axis&&(h=this.originalPageX),"x"===o.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)} -},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s,this],!0),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,s){var n=s.options,a=e.extend({},i,{item:s.element});s.sortables=[],e(n.connectToSortable).each(function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,a))})},stop:function(t,i,s){var n=e.extend({},i,{item:s.element});e.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,n))})},drag:function(t,i,s){var n=this;e.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,e.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",t),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",t),s.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,s){var n=e("body"),a=s.options;n.css("cursor")&&(a._cursor=n.css("cursor")),n.css("cursor",a.cursor)},stop:function(t,i,s){var n=s.options;n._cursor&&e("body").css("cursor",n._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("opacity")&&(a._opacity=n.css("opacity")),n.css("opacity",a.opacity)},stop:function(t,i,s){var n=s.options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,s){var n=s.options,a=!1,o=s.scrollParentNotHidden[0],r=s.document[0];o!==r&&"HTML"!==o.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+o.offsetHeight-t.pageY=0;c--)h=s.snapElements[c].left,l=h+s.snapElements[c].width,u=s.snapElements[c].top,d=u+s.snapElements[c].height,h-m>v||g>l+m||u-m>b||y>d+m||!e.contains(s.snapElements[c].item.ownerDocument,s.snapElements[c].item)?(s.snapElements[c].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(n=m>=Math.abs(u-b),a=m>=Math.abs(d-y),o=m>=Math.abs(h-v),r=m>=Math.abs(l-g),n&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top-s.margins.top),a&&(i.position.top=s._convertPositionTo("relative",{top:d,left:0}).top-s.margins.top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left-s.margins.left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left-s.margins.left)),p=n||a||o||r,"outer"!==f.snapMode&&(n=m>=Math.abs(u-y),a=m>=Math.abs(d-b),o=m>=Math.abs(h-g),r=m>=Math.abs(l-v),n&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top-s.margins.top),a&&(i.position.top=s._convertPositionTo("relative",{top:d-s.helperProportions.height,left:0}).top-s.margins.top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left-s.margins.left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left-s.margins.left)),!s.snapElements[c].snapping&&(n||a||o||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=n||a||o||r||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,s){var n,a=s.options,o=e.makeArray(e(a.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});o.length&&(n=parseInt(e(o[0]).css("zIndex"),10)||0,e(o).each(function(t){e(this).css("zIndex",n+t)}),this.css("zIndex",n+o.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("zIndex")&&(a._zIndex=n.css("zIndex")),n.css("zIndex",a.zIndex)},stop:function(t,i,s){var n=s.options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}}),e.ui.draggable,e.widget("ui.droppable",{version:"1.11.1",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(s)?s:function(e){return e.is(s)},this.proportions=function(){return arguments.length?(t=arguments[0],void 0):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var s=e.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=e(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&t+i>e}return function(t,i,s,n){if(!i.offset)return!1;var a=(t.positionAbs||t.position.absolute).left,o=(t.positionAbs||t.position.absolute).top,r=a+t.helperProportions.width,h=o+t.helperProportions.height,l=i.offset.left,u=i.offset.top,d=l+i.proportions().width,c=u+i.proportions().height;switch(s){case"fit":return a>=l&&d>=r&&o>=u&&c>=h;case"intersect":return a+t.helperProportions.width/2>l&&d>r-t.helperProportions.width/2&&o+t.helperProportions.height/2>u&&c>h-t.helperProportions.height/2;case"pointer":return e(n.pageY,u,i.proportions().height)&&e(n.pageX,l,i.proportions().width);case"touch":return(o>=u&&c>=o||h>=u&&c>=h||u>o&&h>c)&&(a>=l&&d>=a||r>=l&&d>=r||l>a&&r>d);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance,i),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===n}),a.length&&(s=e(a[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},e.ui.droppable,e.widget("ui.resizable",e.ui.mouse,{version:"1.11.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return t[s]>0?!0:(t[s]=1,n=t[s]>0,t[s]=0,n)},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("
"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=this.element.children(this.handles[i]).first().show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var i,s,n,a=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),a.containment&&(i+=e(a.containment).scrollLeft()||0,s+=e(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===n?this.axis+"-resize":n),o.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,s,n=this.originalMousePosition,a=this.axis,o=t.pageX-n.left||0,r=t.pageY-n.top||0,h=this._change[a];return this._updatePrevProperties(),h?(i=h.apply(this,[t,o,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,i,s,n,a,o=this.options;a={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,s=a.minWidth/this.aspectRatio,i=a.maxHeight*this.aspectRatio,n=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),s>a.minHeight&&(a.minHeight=s),a.maxWidth>i&&(a.maxWidth=i),a.maxHeight>n&&(a.maxHeight=n)),this._vBoundaries=a},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,s=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===s&&(e.left=t.left+(i.width-e.width),e.top=null),"nw"===s&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,s=this._isNumber(e.width)&&t.maxWidth&&t.maxWidthe.width,o=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,r=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,l=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return a&&(e.width=t.minWidth),o&&(e.height=t.minHeight),s&&(e.width=t.maxWidth),n&&(e.height=t.maxHeight),a&&l&&(e.left=r-t.minWidth),s&&l&&(e.left=r-t.maxWidth),o&&u&&(e.top=h-t.minHeight),n&&u&&(e.top=h-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],s=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],n=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];4>t;t++)i[t]=parseInt(s[t],10)||0,i[t]+=parseInt(n[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("
"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,i,s,n,a,o,r,h=e(this).resizable("instance"),l=h.options,u=h.element,d=l.containment,c=d instanceof e?d.get(0):/parent/.test(d)?u.parent().get(0):d;c&&(h.containerElement=e(c),/document/.test(d)||d===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(c),i=[],e(["Top","Right","Left","Bottom"]).each(function(e,s){i[e]=h._num(t.css("padding"+s))}),h.containerOffset=t.offset(),h.containerPosition=t.position(),h.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,a=h.containerSize.width,o=h._hasScroll(c,"left")?c.scrollWidth:a,r=h._hasScroll(c)?c.scrollHeight:n,h.parentData={element:c,left:s.left,top:s.top,width:o,height:r}))},resize:function(t){var i,s,n,a,o=e(this).resizable("instance"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,d={top:0,left:0},c=o.containerElement,p=!0;c[0]!==document&&/static/.test(c.css("position"))&&(d=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-d.left),u&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?h.top:0),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),i=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-d.left:o.offset.left-h.left)),s=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-d.top:o.offset.top-h.top)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).resizable("instance"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(t,s){e(t).each(function(){var t=e(this),n=e(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&i>=0&&(a[t]=i||null)}),t.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):e.each(n.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,i=e(this).resizable("instance"),s=i.options,n=i.size,a=i.originalSize,o=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,u=h[1]||1,d=Math.round((n.width-a.width)/l)*l,c=Math.round((n.height-a.height)/u)*u,p=a.width+d,f=a.height+c,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,v=s.minWidth&&s.minWidth>p,y=s.minHeight&&s.minHeight>f;s.grid=h,v&&(p+=l),y&&(f+=u),m&&(p-=l),g&&(f-=u),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=o.top-c):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=o.left-d):((0>=f-u||0>=p-l)&&(t=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=o.top-c):(f=u-t.height,i.size.height=f,i.position.top=o.top+a.height-f),p-l>0?(i.size.width=p,i.position.left=o.left-d):(p=u-t.height,i.size.width=p,i.position.left=o.left+a.width-p))}}),e.ui.resizable,e.widget("ui.selectable",e.ui.mouse,{version:"1.11.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this; -this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("
")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||this._isFloating(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,a.widgetName+"-item")===a?(s=e(this),!1):void 0}),e.data(t.target,a.widgetName+"-item")===a&&(s=e(t.target)),s?!this.options.handle||i||(e(this.options.handle,s).find("*").addBack().each(function(){this===t.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=e("").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!e.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each(function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")}),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=e.left,o=a+e.width,r=e.top,h=r+e.height,l=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||s+l>r&&h>s+l,c="y"===this.options.axis||t+u>a&&o>t+u,p=d&&c;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:t+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),s=t&&i,n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return s?this.floating?a&&"right"===a||"down"===n?2:1:n&&("down"===n?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&t||"up"===s&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){r.push(this)}var s,n,a,o,r=[],h=[],l=this._connectWith();if(l&&t)for(s=l.length-1;s>=0;s--)for(a=e(l[s]),n=a.length-1;n>=0;n--)o=e.data(a[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&h.push([e.isFunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(h.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return e(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;t.length>i;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,u=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],c=this._connectWith();if(c&&this.ready)for(i=c.length-1;i>=0;i--)for(n=e(c[i]),s=n.length-1;s>=0;s--)a=e.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(d.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a));for(i=d.length-1;i>=0;i--)for(o=d[i][1],r=d[i][0],s=0,l=r.length;l>s;s++)h=e(r[s]),h.data(this.widgetName+"-item",o),u.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item,t||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,s=t.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=t.currentItem[0].nodeName.toLowerCase(),n=e("<"+s+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?t.currentItem.children().each(function(){e(" ",t.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",t.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(e,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_contactContainers:function(t){var i,s,n,a,o,r,h,l,u,d,c=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(c&&e.contains(this.containers[i].element[0],c.element[0]))continue;c=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,a=null,u=c.floating||this._isFloating(this.currentItem),o=u?"left":"top",r=u?"width":"height",d=u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[o],l=!1,t[d]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(t[d]-h)&&(n=Math.abs(t[d]-h),a=this.items[s],this.direction=l?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=e(n.containment)[0],i=e(n.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n=this.options,a=t.pageX,o=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.leftthis.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&n.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(n.push(function(e){this._trigger("remove",e,this._uiHash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)t||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!t){for(this._trigger("beforeStop",e,this._uiHash()),s=0;n.length>s;s++)n[s].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!1}if(t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!t){for(s=0;n.length>s;s++)n[s].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.widget("ui.accordion",{version:"1.11.1",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)),void 0)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,s=this.headers.length,n=this.headers.index(t.target),a=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(e(t.target).attr("tabIndex",-1),e(a).attr("tabIndex",0),a.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var t,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),i=t.uniqueId().attr("id"),s=t.next(),n=s.uniqueId().attr("id"); -t.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(t=n.height(),this.element.siblings(":visible").each(function(){var i=e(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?e():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?e():n,newPanel:r};t.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",t,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?e():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,t):(s.hide(),i.show(),this._toggleComplete(t)),s.attr({"aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,t,i){var s,n,a,o=this,r=0,h=e.length&&(!t.length||e.index()",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){function i(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,h=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:h=!1,n=this.previousFilter||"",a=String.fromCharCode(t.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.find(this.options.items).filter(function(){return r.test(e(this).text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(t.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.find(this.options.items).filter(function(){return r.test(e(this).text())})),s.length?(this.focus(t,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),s=e("").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",i.attr("id"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);s._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("
-
-
+
diff --git a/interface/web/admin/templates/server_config_dns_edit.htm b/interface/web/admin/templates/server_config_dns_edit.htm index fb801018e..b501bb1d8 100644 --- a/interface/web/admin/templates/server_config_dns_edit.htm +++ b/interface/web/admin/templates/server_config_dns_edit.htm @@ -7,24 +7,19 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/admin/templates/server_config_fastcgi_edit.htm b/interface/web/admin/templates/server_config_fastcgi_edit.htm index 2105d6c2f..8db25a98d 100644 --- a/interface/web/admin/templates/server_config_fastcgi_edit.htm +++ b/interface/web/admin/templates/server_config_fastcgi_edit.htm @@ -7,32 +7,25 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
+
diff --git a/interface/web/admin/templates/server_config_jailkit_edit.htm b/interface/web/admin/templates/server_config_jailkit_edit.htm index 3aa02f857..89a903c8c 100644 --- a/interface/web/admin/templates/server_config_jailkit_edit.htm +++ b/interface/web/admin/templates/server_config_jailkit_edit.htm @@ -7,20 +7,16 @@
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/admin/templates/server_config_mail_edit.htm b/interface/web/admin/templates/server_config_mail_edit.htm index cef264ed4..fcc320e4f 100644 --- a/interface/web/admin/templates/server_config_mail_edit.htm +++ b/interface/web/admin/templates/server_config_mail_edit.htm @@ -13,16 +13,13 @@
-
-
+
-
-
+
-
-
+
@@ -49,20 +46,16 @@
-
-
+
-
-
+
-
-
+
-
-
+
@@ -71,23 +64,20 @@
-
-
+
-
-
+
- -
+
-
 MB +
 MB
-
 MB +
 MB
@@ -97,7 +87,7 @@
-
 {tmpl_var name='realtime_blackhole_list_note_txt'} +
 {tmpl_var name='realtime_blackhole_list_note_txt'}
@@ -113,7 +103,7 @@
-
 {tmpl_var name='overquota_notify_freq_note_txt'} +
 {tmpl_var name='overquota_notify_freq_note_txt'}
diff --git a/interface/web/admin/templates/server_config_server_edit.htm b/interface/web/admin/templates/server_config_server_edit.htm index fbcc3016a..3cf6af500 100644 --- a/interface/web/admin/templates/server_config_server_edit.htm +++ b/interface/web/admin/templates/server_config_server_edit.htm @@ -13,28 +13,22 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-

{tmpl_var name='nameservers_hint_txt'}

+

{tmpl_var name='nameservers_hint_txt'}

@@ -56,8 +50,7 @@
-
-
+
@@ -78,28 +71,24 @@
-
 {tmpl_var name='monit_url_note_txt'}
[SERVERNAME] +
 {tmpl_var name='monit_url_note_txt'}
[SERVERNAME]
-
-
+
-
-
+
-
 {tmpl_var name='munin_url_note_txt'}
[SERVERNAME] +
 {tmpl_var name='munin_url_note_txt'}
[SERVERNAME]
-
-
+
-
-
+
diff --git a/interface/web/admin/templates/server_config_vlogger_edit.htm b/interface/web/admin/templates/server_config_vlogger_edit.htm index cee979731..307f315cf 100644 --- a/interface/web/admin/templates/server_config_vlogger_edit.htm +++ b/interface/web/admin/templates/server_config_vlogger_edit.htm @@ -7,8 +7,7 @@
-
-
+
diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm index fd46ba5ac..9f621e0d4 100644 --- a/interface/web/admin/templates/server_config_web_edit.htm +++ b/interface/web/admin/templates/server_config_web_edit.htm @@ -15,16 +15,13 @@
-
-
+
-
-
+
-
-
+
@@ -39,7 +36,7 @@
-
 {tmpl_var name='website_autoalias_note_txt'}
[client_id], [client_username], [website_id], [website_domain] +
 {tmpl_var name='website_autoalias_note_txt'}
[client_id], [client_username], [website_id], [website_domain]
@@ -49,20 +46,16 @@
-
-
+
-
-
+
-
-
+
-
-
+
@@ -79,28 +72,22 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
@@ -145,7 +132,7 @@
-
 {tmpl_var name='overquota_notify_freq_note_txt'} +
 {tmpl_var name='overquota_notify_freq_note_txt'}
@@ -171,12 +158,10 @@
-
-
+
- -
+
{tmpl_var name='permissions_txt'}
@@ -206,46 +191,37 @@
-
-
+
{tmpl_var name='php_settings_txt'}
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
 {tmpl_var name='php_ini_check_minutes_info_txt'} +
 {tmpl_var name='php_ini_check_minutes_info_txt'}
@@ -260,35 +236,28 @@
-
-
+
-
-
+
-
-
+
{tmpl_var name='awstats_settings_txt'}
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/admin/templates/server_edit_services.htm b/interface/web/admin/templates/server_edit_services.htm index 47f0ab4fa..b59bc7efb 100644 --- a/interface/web/admin/templates/server_edit_services.htm +++ b/interface/web/admin/templates/server_edit_services.htm @@ -7,8 +7,7 @@
-
-
+
diff --git a/interface/web/admin/templates/server_ip_edit.htm b/interface/web/admin/templates/server_ip_edit.htm index 0a4f91a12..922157368 100644 --- a/interface/web/admin/templates/server_ip_edit.htm +++ b/interface/web/admin/templates/server_ip_edit.htm @@ -25,8 +25,7 @@
-
-
+
@@ -35,8 +34,7 @@
-
-
+
diff --git a/interface/web/admin/templates/server_php_fastcgi_edit.htm b/interface/web/admin/templates/server_php_fastcgi_edit.htm index bdada2a7e..bfeb982c0 100644 --- a/interface/web/admin/templates/server_php_fastcgi_edit.htm +++ b/interface/web/admin/templates/server_php_fastcgi_edit.htm @@ -7,12 +7,10 @@
-
-
+
-
-
+
diff --git a/interface/web/admin/templates/server_php_fpm_edit.htm b/interface/web/admin/templates/server_php_fpm_edit.htm index 3b20c181e..7239d3b6f 100644 --- a/interface/web/admin/templates/server_php_fpm_edit.htm +++ b/interface/web/admin/templates/server_php_fpm_edit.htm @@ -7,16 +7,13 @@
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/admin/templates/server_php_name_edit.htm b/interface/web/admin/templates/server_php_name_edit.htm index aad4eba70..2f1dcd0d7 100644 --- a/interface/web/admin/templates/server_php_name_edit.htm +++ b/interface/web/admin/templates/server_php_name_edit.htm @@ -19,8 +19,7 @@
-
-
+
diff --git a/interface/web/admin/templates/software_package_edit.htm b/interface/web/admin/templates/software_package_edit.htm index da526a1df..2e87a6373 100644 --- a/interface/web/admin/templates/software_package_edit.htm +++ b/interface/web/admin/templates/software_package_edit.htm @@ -11,8 +11,7 @@
-
-
+
diff --git a/interface/web/admin/templates/software_package_install.htm b/interface/web/admin/templates/software_package_install.htm index 19a044693..dd9327112 100644 --- a/interface/web/admin/templates/software_package_install.htm +++ b/interface/web/admin/templates/software_package_install.htm @@ -16,8 +16,7 @@

 

-
-
+
diff --git a/interface/web/admin/templates/software_repo_edit.htm b/interface/web/admin/templates/software_repo_edit.htm index d8bdaf117..6ab4696d3 100644 --- a/interface/web/admin/templates/software_repo_edit.htm +++ b/interface/web/admin/templates/software_repo_edit.htm @@ -7,20 +7,16 @@
-
-
+
-
-
+
-
-
+
- -
+
diff --git a/interface/web/admin/templates/system_config_mail_edit.htm b/interface/web/admin/templates/system_config_mail_edit.htm index b50204f7d..20dca2a64 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='webmail_url_note_txt'}
[SERVERNAME] +
 {tmpl_var name='webmail_url_note_txt'}
[SERVERNAME]
@@ -47,16 +47,13 @@
-
-
+
-
-
+
-
-
+
@@ -65,20 +62,16 @@
-
-
+
-
-
+
-
-
+
- -
+
-
+
-
-
+
-
-
+
-
-
+
-
 {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} +
 {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"}
-
 {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} +
 {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"}
-
 {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} +
 {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"}
-
 {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} +
 {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"}
-
 {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} +
 {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"}
-
 {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"} +
 {tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"}
@@ -71,20 +67,16 @@
-
-
+
-
-
+
-
-
+
-
-
+
@@ -93,8 +85,7 @@
-
-
+
-
+
-
-
+
-
-
+
-
-
+
-
-
+
@@ -33,12 +28,11 @@
-
 {tmpl_var name='phpmyadmin_url_note_txt'}
[SERVERNAME], [DATABASENAME] +
 {tmpl_var name='phpmyadmin_url_note_txt'}
[SERVERNAME], [DATABASENAME]
-
-
+
diff --git a/interface/web/admin/templates/tpl_default_basic.htm b/interface/web/admin/templates/tpl_default_basic.htm index 3520f3a0a..b5981fec1 100644 --- a/interface/web/admin/templates/tpl_default_basic.htm +++ b/interface/web/admin/templates/tpl_default_basic.htm @@ -7,7 +7,7 @@
-
152x46px +
152x46px
diff --git a/interface/web/admin/templates/users_user_edit.htm b/interface/web/admin/templates/users_user_edit.htm index 738a33498..54ad0ddf9 100644 --- a/interface/web/admin/templates/users_user_edit.htm +++ b/interface/web/admin/templates/users_user_edit.htm @@ -7,11 +7,10 @@
-
-
+
@@ -20,8 +19,7 @@
- -
+
diff --git a/interface/web/client/templates/client_circle_edit.htm b/interface/web/client/templates/client_circle_edit.htm index 3438b739d..f54df8c46 100644 --- a/interface/web/client/templates/client_circle_edit.htm +++ b/interface/web/client/templates/client_circle_edit.htm @@ -7,8 +7,7 @@ {tmpl_var name='circle_txt'}
-
-
+
diff --git a/interface/web/client/templates/client_del.htm b/interface/web/client/templates/client_del.htm index 7a435f094..63632413a 100644 --- a/interface/web/client/templates/client_del.htm +++ b/interface/web/client/templates/client_del.htm @@ -16,7 +16,7 @@
-
+
diff --git a/interface/web/client/templates/client_edit_address.htm b/interface/web/client/templates/client_edit_address.htm index 3ff897c81..e2508575a 100644 --- a/interface/web/client/templates/client_edit_address.htm +++ b/interface/web/client/templates/client_edit_address.htm @@ -7,8 +7,7 @@ Address
-
-
+
-
+
-
-
+
-
-
+
-
-
+
@@ -43,8 +38,7 @@
- -
+
@@ -61,20 +55,16 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm index e643b5d13..dccb2ecf3 100644 --- a/interface/web/client/templates/client_edit_limits.htm +++ b/interface/web/client/templates/client_edit_limits.htm @@ -48,8 +48,7 @@
-
-
+
{tmpl_var name='web_limits_txt'}
@@ -61,15 +60,14 @@
-
-
+
-
 MB +
 MB
-
 MB +
 MB
@@ -133,20 +131,16 @@
-
-
+
-
-
+
-
-
+
-
-
+
@@ -155,8 +149,7 @@
-
-
+
@@ -174,60 +167,47 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
 MB +
 MB
-
-
+
-
-
+
-
-
+
{tmpl_var name='database_limits_txt'}
@@ -239,19 +219,17 @@
-
-
+
-
 MB +
 MB
{tmpl_var name='cron_job_limits_txt'}
-
-
+
-
+
{tmpl_var name='dns_limits_txt'}
@@ -273,8 +250,7 @@
-
-
+
-
+
-
-
+
{tmpl_var name='virtualization_limits_txt'}
-
-
+
-
+
diff --git a/interface/web/client/templates/client_message.htm b/interface/web/client/templates/client_message.htm index 72432f8da..0ef1855ea 100644 --- a/interface/web/client/templates/client_message.htm +++ b/interface/web/client/templates/client_message.htm @@ -13,8 +13,7 @@
-
-
+
-
+
 {tmpl_var name="variables_txt"} {tmpl_var name="message_variables"} diff --git a/interface/web/client/templates/client_template_edit_limits.htm b/interface/web/client/templates/client_template_edit_limits.htm index 374d9c3d7..88896601a 100644 --- a/interface/web/client/templates/client_template_edit_limits.htm +++ b/interface/web/client/templates/client_template_edit_limits.htm @@ -15,15 +15,14 @@
-
-
+
-
 MB +
 MB
-
 MB +
 MB
@@ -87,20 +86,16 @@
-
-
+
-
-
+
-
-
+
-
-
+
@@ -109,8 +104,7 @@
-
-
+
@@ -128,60 +122,46 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
{tmpl_var name='database_limits_txt'}
@@ -193,19 +173,17 @@
-
-
+
-
 MB +
 MB
{tmpl_var name='cron_job_limits_txt'}
-
-
+
-
+
{tmpl_var name='dns_limits_txt'}
@@ -227,8 +204,7 @@
-
-
+
-
+
-
-
+
{tmpl_var name='virtualization_limits_txt'}
-
-
+
-
+
{tmpl_var name='client_limits_txt'}
-
-
+
-
-
+
diff --git a/interface/web/client/templates/client_template_edit_template.htm b/interface/web/client/templates/client_template_edit_template.htm index 293133ff5..42fd92566 100644 --- a/interface/web/client/templates/client_template_edit_template.htm +++ b/interface/web/client/templates/client_template_edit_template.htm @@ -13,8 +13,7 @@
-
-
+
diff --git a/interface/web/client/templates/domain_edit.htm b/interface/web/client/templates/domain_edit.htm index 90a045443..b1faf4b1b 100644 --- a/interface/web/client/templates/domain_edit.htm +++ b/interface/web/client/templates/domain_edit.htm @@ -5,10 +5,8 @@
-
-
-
-
+
+
diff --git a/interface/web/client/templates/message_template.htm b/interface/web/client/templates/message_template.htm index b2b15ce22..190b836d2 100644 --- a/interface/web/client/templates/message_template.htm +++ b/interface/web/client/templates/message_template.htm @@ -15,12 +15,10 @@
-
-
+
-
-

{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"}
{tmpl_var name='variables_description_txt'} +

{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"}
{tmpl_var name='variables_description_txt'}
diff --git a/interface/web/client/templates/reseller_edit_address.htm b/interface/web/client/templates/reseller_edit_address.htm index ef62e3169..9b8d62007 100644 --- a/interface/web/client/templates/reseller_edit_address.htm +++ b/interface/web/client/templates/reseller_edit_address.htm @@ -7,8 +7,7 @@ Address
-
-
+
-
+
-
-
+
-
-
+
-
-
+
@@ -43,8 +38,7 @@
- -
+
@@ -61,20 +55,16 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm index 68762d9df..020497dfc 100644 --- a/interface/web/client/templates/reseller_edit_limits.htm +++ b/interface/web/client/templates/reseller_edit_limits.htm @@ -45,16 +45,13 @@
-
-
+
-
-
+
-
-
+
{tmpl_var name='web_limits_txt'}
@@ -65,15 +62,14 @@
-
-
+
-
 MB +
 MB
-
 MB +
 MB
@@ -137,20 +133,16 @@
-
-
+
-
-
+
-
-
+
-
-
+
@@ -159,8 +151,7 @@
-
-
+
@@ -178,60 +169,47 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
 MB +
 MB
-
-
+
-
-
+
-
-
+
{tmpl_var name='database_limits_txt'}
@@ -243,15 +221,13 @@
-
-
+
{tmpl_var name='cron_job_limits_txt'}
-
-
+
-
+
{tmpl_var name='dns_limits_txt'}
@@ -273,8 +248,7 @@
-
-
+
-
+
-
-
+
{tmpl_var name='virtualization_limits_txt'}
-
-
+
-
+
{tmpl_var name='client_limits_txt'}
-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_a_edit.htm b/interface/web/dns/templates/dns_a_edit.htm index acc577e15..67ddaf247 100644 --- a/interface/web/dns/templates/dns_a_edit.htm +++ b/interface/web/dns/templates/dns_a_edit.htm @@ -7,17 +7,14 @@
-
-

{tmpl_var name='name_hint_txt'}

+

{tmpl_var name='name_hint_txt'}

-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_aaaa_edit.htm b/interface/web/dns/templates/dns_aaaa_edit.htm index 7c9ca9fd6..e66b23de0 100644 --- a/interface/web/dns/templates/dns_aaaa_edit.htm +++ b/interface/web/dns/templates/dns_aaaa_edit.htm @@ -7,17 +7,14 @@
-
-

{tmpl_var name='name_hint_txt'}

+

{tmpl_var name='name_hint_txt'}

-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_alias_edit.htm b/interface/web/dns/templates/dns_alias_edit.htm index 79ddccbd5..c7542bf29 100644 --- a/interface/web/dns/templates/dns_alias_edit.htm +++ b/interface/web/dns/templates/dns_alias_edit.htm @@ -7,16 +7,13 @@
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_cname_edit.htm b/interface/web/dns/templates/dns_cname_edit.htm index 3ec2322b5..42308bae2 100644 --- a/interface/web/dns/templates/dns_cname_edit.htm +++ b/interface/web/dns/templates/dns_cname_edit.htm @@ -7,16 +7,13 @@
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_dkim_edit.htm b/interface/web/dns/templates/dns_dkim_edit.htm index a73f50665..4c78b86bf 100644 --- a/interface/web/dns/templates/dns_dkim_edit.htm +++ b/interface/web/dns/templates/dns_dkim_edit.htm @@ -11,12 +11,10 @@
-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_hinfo_edit.htm b/interface/web/dns/templates/dns_hinfo_edit.htm index 0071116ee..7f6b397f7 100644 --- a/interface/web/dns/templates/dns_hinfo_edit.htm +++ b/interface/web/dns/templates/dns_hinfo_edit.htm @@ -7,16 +7,13 @@
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_import.htm b/interface/web/dns/templates/dns_import.htm index 12e4e1d55..fcf32e888 100644 --- a/interface/web/dns/templates/dns_import.htm +++ b/interface/web/dns/templates/dns_import.htm @@ -37,8 +37,7 @@ {tmpl_var name='domain_option'}
-
-
+

diff --git a/interface/web/dns/templates/dns_mx_edit.htm b/interface/web/dns/templates/dns_mx_edit.htm index f5e2b0413..f25b5eb2b 100644 --- a/interface/web/dns/templates/dns_mx_edit.htm +++ b/interface/web/dns/templates/dns_mx_edit.htm @@ -7,20 +7,16 @@
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_ns_edit.htm b/interface/web/dns/templates/dns_ns_edit.htm index 992f74ad0..ef177eaa9 100644 --- a/interface/web/dns/templates/dns_ns_edit.htm +++ b/interface/web/dns/templates/dns_ns_edit.htm @@ -7,16 +7,13 @@
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_ptr_edit.htm b/interface/web/dns/templates/dns_ptr_edit.htm index 3c5f69515..c59fb9d59 100644 --- a/interface/web/dns/templates/dns_ptr_edit.htm +++ b/interface/web/dns/templates/dns_ptr_edit.htm @@ -7,16 +7,13 @@
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_rp_edit.htm b/interface/web/dns/templates/dns_rp_edit.htm index f1ffefaa8..4d22a17c4 100644 --- a/interface/web/dns/templates/dns_rp_edit.htm +++ b/interface/web/dns/templates/dns_rp_edit.htm @@ -7,16 +7,13 @@
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_slave_edit.htm b/interface/web/dns/templates/dns_slave_edit.htm index 90676f1af..73804b60b 100644 --- a/interface/web/dns/templates/dns_slave_edit.htm +++ b/interface/web/dns/templates/dns_slave_edit.htm @@ -46,19 +46,16 @@ {tmpl_var name='domain_option'}
-
-
+

{tmpl_var name='eg_domain_tld'}

-
-

{tmpl_var name='ipv4_form_txt'}

+

{tmpl_var name='ipv4_form_txt'}

-
-
+
diff --git a/interface/web/dns/templates/dns_soa_edit.htm b/interface/web/dns/templates/dns_soa_edit.htm index 3f91854fb..04ebe0954 100644 --- a/interface/web/dns/templates/dns_soa_edit.htm +++ b/interface/web/dns/templates/dns_soa_edit.htm @@ -65,52 +65,46 @@ {tmpl_var name='domain_option'}
-
-
+

{tmpl_var name='eg_domain_tld'}

-
-

{tmpl_var name='eg_ns1_domain_tld'}

+

{tmpl_var name='eg_ns1_domain_tld'}

-
-

{tmpl_var name='eg_webmaster_domain_tld'}

+

{tmpl_var name='eg_webmaster_domain_tld'}

-
 {tmpl_var name='seconds_txt'} +
 {tmpl_var name='seconds_txt'}
-
 {tmpl_var name='seconds_txt'} +
 {tmpl_var name='seconds_txt'}
-
 {tmpl_var name='seconds_txt'} +
 {tmpl_var name='seconds_txt'}
-
 {tmpl_var name='seconds_txt'} +
 {tmpl_var name='seconds_txt'}
-
 {tmpl_var name='seconds_txt'} +
 {tmpl_var name='seconds_txt'}
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_srv_edit.htm b/interface/web/dns/templates/dns_srv_edit.htm index a9b8c315d..ad80a9ce5 100644 --- a/interface/web/dns/templates/dns_srv_edit.htm +++ b/interface/web/dns/templates/dns_srv_edit.htm @@ -7,28 +7,22 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_template_edit.htm b/interface/web/dns/templates/dns_template_edit.htm index e19bc562a..a5ea77654 100644 --- a/interface/web/dns/templates/dns_template_edit.htm +++ b/interface/web/dns/templates/dns_template_edit.htm @@ -7,8 +7,7 @@
-
-
+
diff --git a/interface/web/dns/templates/dns_txt_edit.htm b/interface/web/dns/templates/dns_txt_edit.htm index b797caae8..e122ef80f 100644 --- a/interface/web/dns/templates/dns_txt_edit.htm +++ b/interface/web/dns/templates/dns_txt_edit.htm @@ -7,16 +7,13 @@
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/dns/templates/dns_wizard.htm b/interface/web/dns/templates/dns_wizard.htm index aeaa456d6..6361f29de 100644 --- a/interface/web/dns/templates/dns_wizard.htm +++ b/interface/web/dns/templates/dns_wizard.htm @@ -60,39 +60,33 @@ {tmpl_var name='domain_option'}
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/help/templates/faq_edit.htm b/interface/web/help/templates/faq_edit.htm index a241d25af..7b79bd132 100644 --- a/interface/web/help/templates/faq_edit.htm +++ b/interface/web/help/templates/faq_edit.htm @@ -8,8 +8,7 @@
-
-
+
diff --git a/interface/web/help/templates/faq_sections_edit.htm b/interface/web/help/templates/faq_sections_edit.htm index 3e4e6a3be..c4369cbb9 100644 --- a/interface/web/help/templates/faq_sections_edit.htm +++ b/interface/web/help/templates/faq_sections_edit.htm @@ -2,8 +2,7 @@ {tmpl_var name='faq_section_name_txt'}
-
-
+
diff --git a/interface/web/help/templates/support_message_edit.htm b/interface/web/help/templates/support_message_edit.htm index ea0c72984..894b8d4a7 100644 --- a/interface/web/help/templates/support_message_edit.htm +++ b/interface/web/help/templates/support_message_edit.htm @@ -13,8 +13,7 @@
-
-
+
diff --git a/interface/web/login/templates/index.htm b/interface/web/login/templates/index.htm index ebe94efcf..45f6716d4 100644 --- a/interface/web/login/templates/index.htm +++ b/interface/web/login/templates/index.htm @@ -16,18 +16,15 @@ {tmpl_var name='login_txt'}Login
-
-
+
- -
+
-
-
+
diff --git a/interface/web/login/templates/password_reset.htm b/interface/web/login/templates/password_reset.htm index 46207a7dd..86dc7a08d 100644 --- a/interface/web/login/templates/password_reset.htm +++ b/interface/web/login/templates/password_reset.htm @@ -16,12 +16,10 @@ {tmpl_var name='pw_reset_txt'}
-
-
+
-
-
+
diff --git a/interface/web/mail/templates/mail_blacklist_edit.htm b/interface/web/mail/templates/mail_blacklist_edit.htm index df5039617..b448f4812 100644 --- a/interface/web/mail/templates/mail_blacklist_edit.htm +++ b/interface/web/mail/templates/mail_blacklist_edit.htm @@ -13,8 +13,7 @@
-
-
+
-
+
-
-
+
-
+
diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm index 8ab90c358..9ad308b8a 100644 --- a/interface/web/mail/templates/mail_domain_edit.htm +++ b/interface/web/mail/templates/mail_domain_edit.htm @@ -67,8 +67,7 @@ {tmpl_var name='domain_option'}
-
-
+
@@ -97,8 +96,7 @@
-
-
+
diff --git a/interface/web/mail/templates/mail_get_edit.htm b/interface/web/mail/templates/mail_get_edit.htm index c17bdebb3..5a9b80ff1 100644 --- a/interface/web/mail/templates/mail_get_edit.htm +++ b/interface/web/mail/templates/mail_get_edit.htm @@ -13,16 +13,13 @@
-
-
+
-
-
+
- -
+
diff --git a/interface/web/mail/templates/mail_mailinglist_edit.htm b/interface/web/mail/templates/mail_mailinglist_edit.htm index 0dd1f5300..b1c73f42a 100644 --- a/interface/web/mail/templates/mail_mailinglist_edit.htm +++ b/interface/web/mail/templates/mail_mailinglist_edit.htm @@ -34,13 +34,11 @@
-
-
+
-
-
+
@@ -51,16 +49,14 @@
-
-
+
-
-
+
@@ -69,8 +65,7 @@
- -
+
diff --git a/interface/web/mail/templates/mail_mailinglist_list.htm b/interface/web/mail/templates/mail_mailinglist_list.htm index a75d1f496..1eaf97eff 100644 --- a/interface/web/mail/templates/mail_mailinglist_list.htm +++ b/interface/web/mail/templates/mail_mailinglist_list.htm @@ -50,7 +50,7 @@ {tmpl_var name="domain"} - {tmpl_var name='mailinglist_txt'} + diff --git a/interface/web/mail/templates/mail_relay_recipient_edit.htm b/interface/web/mail/templates/mail_relay_recipient_edit.htm index ae491de11..3e64586fc 100644 --- a/interface/web/mail/templates/mail_relay_recipient_edit.htm +++ b/interface/web/mail/templates/mail_relay_recipient_edit.htm @@ -13,8 +13,7 @@
-
-
+
diff --git a/interface/web/mail/templates/mail_transport_edit.htm b/interface/web/mail/templates/mail_transport_edit.htm index fe02054a5..066413fa0 100644 --- a/interface/web/mail/templates/mail_transport_edit.htm +++ b/interface/web/mail/templates/mail_transport_edit.htm @@ -13,8 +13,7 @@
-
-
+
-
+
-
-
+
-
+
@@ -16,8 +15,7 @@
-
+ onclick="AR_ResetDates();" {tmpl_var name='ar_active'} />
{tmpl_var name='autoresponder_start_date'}  diff --git a/interface/web/mail/templates/mail_user_filter_edit.htm b/interface/web/mail/templates/mail_user_filter_edit.htm index d60ed92dc..c130f5ae3 100644 --- a/interface/web/mail/templates/mail_user_filter_edit.htm +++ b/interface/web/mail/templates/mail_user_filter_edit.htm @@ -7,8 +7,7 @@
-
-
+
diff --git a/interface/web/mail/templates/mail_user_list.htm b/interface/web/mail/templates/mail_user_list.htm index 445cb30dc..339e11a73 100644 --- a/interface/web/mail/templates/mail_user_list.htm +++ b/interface/web/mail/templates/mail_user_list.htm @@ -73,7 +73,7 @@
{tmpl_var name="disablepop3"} - {tmpl_var name="webmail_txt"} + diff --git a/interface/web/mail/templates/mail_user_mailbox_edit.htm b/interface/web/mail/templates/mail_user_mailbox_edit.htm index 4888b04cf..dc67f360a 100644 --- a/interface/web/mail/templates/mail_user_mailbox_edit.htm +++ b/interface/web/mail/templates/mail_user_mailbox_edit.htm @@ -7,7 +7,7 @@
@@ -42,11 +41,11 @@
-
  {tmpl_var name='name_optional_txt'} {tmpl_var name='cc_note_txt'} +
  {tmpl_var name='name_optional_txt'} {tmpl_var name='cc_note_txt'}
-
  {tmpl_var name='name_optional_txt'} {tmpl_var name='sender_cc_note_txt'} +
  {tmpl_var name='name_optional_txt'} {tmpl_var name='sender_cc_note_txt'}
diff --git a/interface/web/mail/templates/mail_whitelist_edit.htm b/interface/web/mail/templates/mail_whitelist_edit.htm index f417c61d7..d6309960f 100644 --- a/interface/web/mail/templates/mail_whitelist_edit.htm +++ b/interface/web/mail/templates/mail_whitelist_edit.htm @@ -13,8 +13,7 @@
-
-
+
-
+
-
+
diff --git a/interface/web/mail/templates/spamfilter_config_mail_edit.htm b/interface/web/mail/templates/spamfilter_config_mail_edit.htm index 5858c8ea8..e0afc785d 100644 --- a/interface/web/mail/templates/spamfilter_config_mail_edit.htm +++ b/interface/web/mail/templates/spamfilter_config_mail_edit.htm @@ -11,48 +11,37 @@ -
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/mail/templates/spamfilter_config_server_edit.htm b/interface/web/mail/templates/spamfilter_config_server_edit.htm index aa061bdc3..ad95e347f 100644 --- a/interface/web/mail/templates/spamfilter_config_server_edit.htm +++ b/interface/web/mail/templates/spamfilter_config_server_edit.htm @@ -7,24 +7,19 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/mail/templates/spamfilter_other_edit.htm b/interface/web/mail/templates/spamfilter_other_edit.htm index 4ef6ac857..00a6bf650 100644 --- a/interface/web/mail/templates/spamfilter_other_edit.htm +++ b/interface/web/mail/templates/spamfilter_other_edit.htm @@ -7,20 +7,16 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
 Bytes +
 Bytes
-
-
+
diff --git a/interface/web/mail/templates/spamfilter_policy_edit.htm b/interface/web/mail/templates/spamfilter_policy_edit.htm index 5eab1be95..e265cd9f2 100644 --- a/interface/web/mail/templates/spamfilter_policy_edit.htm +++ b/interface/web/mail/templates/spamfilter_policy_edit.htm @@ -7,8 +7,7 @@
-
-
+
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/mail/templates/spamfilter_taglevel_edit.htm b/interface/web/mail/templates/spamfilter_taglevel_edit.htm index f82dad781..3f7a94810 100644 --- a/interface/web/mail/templates/spamfilter_taglevel_edit.htm +++ b/interface/web/mail/templates/spamfilter_taglevel_edit.htm @@ -7,24 +7,19 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
+
-
-
+
diff --git a/interface/web/mail/templates/spamfilter_users_edit.htm b/interface/web/mail/templates/spamfilter_users_edit.htm index 359a19782..e18aa5e32 100644 --- a/interface/web/mail/templates/spamfilter_users_edit.htm +++ b/interface/web/mail/templates/spamfilter_users_edit.htm @@ -25,12 +25,10 @@
-
-
+
-
-
+
-
+
-
+
-
-
+
{tmpl_var name='autoresponder_start_date'}  diff --git a/interface/web/mailuser/templates/mail_user_cc_edit.htm b/interface/web/mailuser/templates/mail_user_cc_edit.htm index 56908ac2a..27c5ecf25 100644 --- a/interface/web/mailuser/templates/mail_user_cc_edit.htm +++ b/interface/web/mailuser/templates/mail_user_cc_edit.htm @@ -11,7 +11,7 @@
-
  {tmpl_var name='name_optional_txt'} {tmpl_var name='cc_note_txt'} +
  {tmpl_var name='name_optional_txt'} {tmpl_var name='cc_note_txt'}
diff --git a/interface/web/mailuser/templates/mail_user_filter_edit.htm b/interface/web/mailuser/templates/mail_user_filter_edit.htm index deed91148..619c62e73 100644 --- a/interface/web/mailuser/templates/mail_user_filter_edit.htm +++ b/interface/web/mailuser/templates/mail_user_filter_edit.htm @@ -7,19 +7,16 @@
-
-
+
-
-
+
-
-
+
{tmpl_var name='active'} diff --git a/interface/web/mailuser/templates/mail_user_password_edit.htm b/interface/web/mailuser/templates/mail_user_password_edit.htm index 9c6d18728..3850bf0de 100644 --- a/interface/web/mailuser/templates/mail_user_password_edit.htm +++ b/interface/web/mailuser/templates/mail_user_password_edit.htm @@ -11,7 +11,7 @@
@@ -20,8 +20,7 @@
- -
+
diff --git a/interface/web/sites/templates/aps_install_package.htm b/interface/web/sites/templates/aps_install_package.htm index b942b9e62..c09b86dc3 100644 --- a/interface/web/sites/templates/aps_install_package.htm +++ b/interface/web/sites/templates/aps_install_package.htm @@ -17,13 +17,11 @@
http(s):// 
DOMAIN_LIST_SPACE
 / 
-
-
+
-
-
+
PKG_SETTINGS_SPACE @@ -40,7 +38,7 @@
-
checked
/>  {tmpl_var name='acceptance_text'} +
checked
/>  {tmpl_var name='acceptance_text'}
diff --git a/interface/web/sites/templates/cron_edit.htm b/interface/web/sites/templates/cron_edit.htm index 705ce4e63..2a3e753dc 100644 --- a/interface/web/sites/templates/cron_edit.htm +++ b/interface/web/sites/templates/cron_edit.htm @@ -21,33 +21,27 @@
-
-

e.g. *, */3, 10-20

+

e.g. *, */3, 10-20

-
-

e.g. *, */2, 0, 10-12

+

e.g. *, */2, 0, 10-12

-
-

e.g. *, */4, 1-5

+

e.g. *, */4, 1-5

-
-

e.g. *, 1-6

+

e.g. *, 1-6

-
-

e.g. *, 0, 1-5

+

e.g. *, 0, 1-5

-
-

{tmpl_var name='command_hint_txt'}

+

{tmpl_var name='command_hint_txt'}

diff --git a/interface/web/sites/templates/database_edit.htm b/interface/web/sites/templates/database_edit.htm index 84cc1bf38..51a8c9f79 100644 --- a/interface/web/sites/templates/database_edit.htm +++ b/interface/web/sites/templates/database_edit.htm @@ -56,15 +56,13 @@

{tmpl_var name='database_name_prefix'}

-
-
+
-
-
+
-
 MB +
 MB
@@ -100,8 +98,7 @@
-
-
+
diff --git a/interface/web/sites/templates/database_user_edit.htm b/interface/web/sites/templates/database_user_edit.htm index 813fffb6e..936601789 100644 --- a/interface/web/sites/templates/database_user_edit.htm +++ b/interface/web/sites/templates/database_user_edit.htm @@ -24,11 +24,10 @@

{tmpl_var name='database_user_prefix'}

-
-
+
@@ -37,8 +36,7 @@
- -
+
diff --git a/interface/web/sites/templates/ftp_user_advanced.htm b/interface/web/sites/templates/ftp_user_advanced.htm index 5e72d0f3d..b5fac132e 100644 --- a/interface/web/sites/templates/ftp_user_advanced.htm +++ b/interface/web/sites/templates/ftp_user_advanced.htm @@ -7,16 +7,13 @@
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/sites/templates/ftp_user_advanced_client.htm b/interface/web/sites/templates/ftp_user_advanced_client.htm index 214fca01e..a4c3cea49 100644 --- a/interface/web/sites/templates/ftp_user_advanced_client.htm +++ b/interface/web/sites/templates/ftp_user_advanced_client.htm @@ -7,8 +7,7 @@
-
-
+
{tmpl_var name='expires'} diff --git a/interface/web/sites/templates/ftp_user_edit.htm b/interface/web/sites/templates/ftp_user_edit.htm index ccdd9854d..997fa75fe 100644 --- a/interface/web/sites/templates/ftp_user_edit.htm +++ b/interface/web/sites/templates/ftp_user_edit.htm @@ -14,11 +14,10 @@

{tmpl_var name='username_prefix'}

-
-
+
@@ -27,8 +26,7 @@
- -
+
diff --git a/interface/web/sites/templates/shell_user_advanced.htm b/interface/web/sites/templates/shell_user_advanced.htm index 090f1087f..c7cc2fe84 100644 --- a/interface/web/sites/templates/shell_user_advanced.htm +++ b/interface/web/sites/templates/shell_user_advanced.htm @@ -7,20 +7,16 @@
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/sites/templates/shell_user_edit.htm b/interface/web/sites/templates/shell_user_edit.htm index 4b1653934..207b425d2 100644 --- a/interface/web/sites/templates/shell_user_edit.htm +++ b/interface/web/sites/templates/shell_user_edit.htm @@ -22,11 +22,10 @@

{tmpl_var name='username_prefix'}

-
-
+
@@ -35,8 +34,7 @@
- -
+
diff --git a/interface/web/sites/templates/web_childdomain_edit.htm b/interface/web/sites/templates/web_childdomain_edit.htm index ec7784f6e..04a355d29 100644 --- a/interface/web/sites/templates/web_childdomain_edit.htm +++ b/interface/web/sites/templates/web_childdomain_edit.htm @@ -14,8 +14,7 @@
-
-
+
@@ -38,8 +37,7 @@
-
-
+
@@ -56,8 +54,7 @@
-
-
+
diff --git a/interface/web/sites/templates/web_folder_edit.htm b/interface/web/sites/templates/web_folder_edit.htm index 1a0e717e2..717736561 100644 --- a/interface/web/sites/templates/web_folder_edit.htm +++ b/interface/web/sites/templates/web_folder_edit.htm @@ -13,8 +13,7 @@
-
-
+
diff --git a/interface/web/sites/templates/web_folder_user_edit.htm b/interface/web/sites/templates/web_folder_user_edit.htm index 2ae25060d..be941b1db 100644 --- a/interface/web/sites/templates/web_folder_user_edit.htm +++ b/interface/web/sites/templates/web_folder_user_edit.htm @@ -13,11 +13,10 @@
-
-
+
@@ -26,8 +25,7 @@
- -
+
diff --git a/interface/web/sites/templates/web_vhost_domain_advanced.htm b/interface/web/sites/templates/web_vhost_domain_advanced.htm index 1374d55c3..dbeaf077f 100644 --- a/interface/web/sites/templates/web_vhost_domain_advanced.htm +++ b/interface/web/sites/templates/web_vhost_domain_advanced.htm @@ -17,12 +17,10 @@
-
-
+
-
-
+
@@ -35,8 +33,7 @@
-
-
+
@@ -55,33 +52,27 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
 s +
 s
-
-
+
-
-
+
 {tmpl_var name="available_php_directive_snippets_txt"}

 {tmpl_var name="php_directive_snippets_txt"} diff --git a/interface/web/sites/templates/web_vhost_domain_backup.htm b/interface/web/sites/templates/web_vhost_domain_backup.htm index 19e3a1720..4213a92cc 100644 --- a/interface/web/sites/templates/web_vhost_domain_backup.htm +++ b/interface/web/sites/templates/web_vhost_domain_backup.htm @@ -28,7 +28,7 @@
-
 {tmpl_var name='backup_excludes_note_txt'} +
 {tmpl_var name='backup_excludes_note_txt'}
diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm index 23947ca56..6f480e867 100644 --- a/interface/web/sites/templates/web_vhost_domain_edit.htm +++ b/interface/web/sites/templates/web_vhost_domain_edit.htm @@ -87,12 +87,11 @@ {tmpl_var name='domain_option'}
-
-
+
-
 MB +
 MB
@@ -105,8 +104,7 @@
-
-
+
@@ -122,7 +120,7 @@
-
readonly="readonly"
/> +
readonly="readonly"
/>
@@ -134,8 +132,7 @@ {tmpl_var name='domain_option'}
-
-
+
@@ -145,12 +142,12 @@
-
readonly="readonly"
/> +
readonly="readonly"
/>
-
 MB
+
 MB
diff --git a/interface/web/sites/templates/web_vhost_domain_redirect.htm b/interface/web/sites/templates/web_vhost_domain_redirect.htm index 4f10fea8e..355791e6d 100644 --- a/interface/web/sites/templates/web_vhost_domain_redirect.htm +++ b/interface/web/sites/templates/web_vhost_domain_redirect.htm @@ -22,8 +22,7 @@
-
-
+
-
+
-
-
+
-
-
+
-
-
+
 {tmpl_var name='generate_password_txt'} +
 
{tmpl_var name='generate_password_txt'}
@@ -28,8 +28,7 @@
- -
+
diff --git a/interface/web/sites/templates/webdav_user_edit.htm b/interface/web/sites/templates/webdav_user_edit.htm index 051cf8a8a..7301c7b82 100644 --- a/interface/web/sites/templates/webdav_user_edit.htm +++ b/interface/web/sites/templates/webdav_user_edit.htm @@ -22,11 +22,11 @@

{tmpl_var name='username_prefix'}

-
disabled="disabled"
/> +
disabled="disabled"
/>
@@ -35,8 +35,7 @@
- -
+
@@ -48,7 +47,7 @@

webdav/

-
disabled="disabled"
/> +
disabled="disabled"
/>
diff --git a/interface/web/themes/blue/templates/main.tpl.htm b/interface/web/themes/blue/templates/main.tpl.htm index 260c727b0..055c47f4e 100644 --- a/interface/web/themes/blue/templates/main.tpl.htm +++ b/interface/web/themes/blue/templates/main.tpl.htm @@ -161,8 +161,7 @@
-
-
+
 
@@ -178,9 +177,7 @@ diff --git a/interface/web/themes/default_64_navimg/templates/main.tpl.htm b/interface/web/themes/default_64_navimg/templates/main.tpl.htm index c2a733b6b..7fc5021b1 100644 --- a/interface/web/themes/default_64_navimg/templates/main.tpl.htm +++ b/interface/web/themes/default_64_navimg/templates/main.tpl.htm @@ -168,8 +168,7 @@
-
-
+
 
diff --git a/interface/web/themes/default_combobox/templates/main.tpl.htm b/interface/web/themes/default_combobox/templates/main.tpl.htm index 5a412743e..a0bd05b6d 100644 --- a/interface/web/themes/default_combobox/templates/main.tpl.htm +++ b/interface/web/themes/default_combobox/templates/main.tpl.htm @@ -163,7 +163,7 @@ select = this.element.hide(), selected = select.children( ":selected" ), value = selected.val() ? selected.text() : ""; - var input = this.input = $( "
" ) + var input = this.input = $( "
" ) .insertAfter( select ) .width( oldWidth ) .val( value ) @@ -323,8 +323,7 @@
-
-
+
 
diff --git a/interface/web/themes/default_no_navimg/templates/main.tpl.htm b/interface/web/themes/default_no_navimg/templates/main.tpl.htm index 36afa4153..bcc75a8af 100644 --- a/interface/web/themes/default_no_navimg/templates/main.tpl.htm +++ b/interface/web/themes/default_no_navimg/templates/main.tpl.htm @@ -169,8 +169,7 @@
-
-
+
 
diff --git a/interface/web/tools/templates/dns_import_tupa.htm b/interface/web/tools/templates/dns_import_tupa.htm index 7a5f5f808..e858b9846 100644 --- a/interface/web/tools/templates/dns_import_tupa.htm +++ b/interface/web/tools/templates/dns_import_tupa.htm @@ -6,26 +6,22 @@
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/tools/templates/import_ispconfig.htm b/interface/web/tools/templates/import_ispconfig.htm index ecd9574ca..0dbdfd0fc 100644 --- a/interface/web/tools/templates/import_ispconfig.htm +++ b/interface/web/tools/templates/import_ispconfig.htm @@ -10,20 +10,18 @@
-
(e.g. https://www.example.com:8080/remote/ ) +
(e.g. https://www.example.com:8080/remote/ )
-
-
+
-
-
+
@@ -45,38 +43,32 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/tools/templates/import_plesk.htm b/interface/web/tools/templates/import_plesk.htm index 0bf97efd2..f0c1d31ae 100644 --- a/interface/web/tools/templates/import_plesk.htm +++ b/interface/web/tools/templates/import_plesk.htm @@ -6,51 +6,43 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/tools/templates/import_vpopmail.htm b/interface/web/tools/templates/import_vpopmail.htm index 90cd905b7..15a08efb6 100644 --- a/interface/web/tools/templates/import_vpopmail.htm +++ b/interface/web/tools/templates/import_vpopmail.htm @@ -10,32 +10,27 @@
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/tools/templates/resync.htm b/interface/web/tools/templates/resync.htm index 21c29d787..81b6ea4b3 100644 --- a/interface/web/tools/templates/resync.htm +++ b/interface/web/tools/templates/resync.htm @@ -7,8 +7,7 @@
-
-
+
@@ -24,8 +23,7 @@
-
-
+
@@ -41,8 +39,7 @@
-
-
+
@@ -58,8 +55,7 @@
-
-
+
@@ -75,8 +71,7 @@
-
-
+
@@ -92,8 +87,7 @@
-
-
+
@@ -109,8 +103,7 @@
-
-
+
@@ -126,8 +119,7 @@
-
-
+
@@ -142,8 +134,7 @@
-
-
+
@@ -159,8 +150,7 @@
-
-
+
@@ -176,8 +166,7 @@
-
-
+
@@ -192,8 +181,7 @@
-
-
+
diff --git a/interface/web/tools/templates/user_settings.htm b/interface/web/tools/templates/user_settings.htm index 0ed27d1b0..483e1d3fe 100644 --- a/interface/web/tools/templates/user_settings.htm +++ b/interface/web/tools/templates/user_settings.htm @@ -7,7 +7,7 @@
@@ -16,8 +16,7 @@
- -
+
diff --git a/interface/web/vm/templates/openvz_action.htm b/interface/web/vm/templates/openvz_action.htm index 49ca4e879..8b1cb5feb 100644 --- a/interface/web/vm/templates/openvz_action.htm +++ b/interface/web/vm/templates/openvz_action.htm @@ -16,29 +16,25 @@
-
-
+
-
-
+
-
-
+
-
-
 {tmpl_var name='ostemplate_desc_txt'} +
 {tmpl_var name='ostemplate_desc_txt'}
diff --git a/interface/web/vm/templates/openvz_ip_edit.htm b/interface/web/vm/templates/openvz_ip_edit.htm index 3f51c7901..2d981dbd6 100644 --- a/interface/web/vm/templates/openvz_ip_edit.htm +++ b/interface/web/vm/templates/openvz_ip_edit.htm @@ -13,8 +13,7 @@
-
-
+
-
+
-
-
+
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
-
-
+
diff --git a/interface/web/vm/templates/openvz_template_edit.htm b/interface/web/vm/templates/openvz_template_edit.htm index 9859d211d..0fcff401a 100644 --- a/interface/web/vm/templates/openvz_template_edit.htm +++ b/interface/web/vm/templates/openvz_template_edit.htm @@ -7,40 +7,38 @@ Template
-
-
+
-
 GB +
 GB
-
 MB +
 MB
-
 MB +
 MB
-
 (8 - 500000) +
 (8 - 500000)
-
 (1 - 64) +
 (1 - 64)
-
 (10 - 6400) +
 (10 - 6400)
-
 (0 - 7) +
 (0 - 7)
-
-
+
@@ -49,7 +47,7 @@
-
 {tmpl_var name='nameserver_desc_txt'} +
 {tmpl_var name='nameserver_desc_txt'}
diff --git a/interface/web/vm/templates/openvz_vm_advanced_edit.htm b/interface/web/vm/templates/openvz_vm_advanced_edit.htm index 721eed1ff..ca2bf02f8 100644 --- a/interface/web/vm/templates/openvz_vm_advanced_edit.htm +++ b/interface/web/vm/templates/openvz_vm_advanced_edit.htm @@ -7,8 +7,7 @@ Advanced
-
-
+
@@ -17,40 +16,39 @@
-
 GB +
 GB
-
 MB +
 MB
-
 MB +
 MB
-
 (8 - 500000) +
 (8 - 500000)
-
 (1 - 64) +
 (1 - 64)
-
 (10 - 6400) +
 (10 - 6400)
-
 (0 - 7) +
 (0 - 7)
-
 {tmpl_var name='nameserver_desc_txt'} +
 {tmpl_var name='nameserver_desc_txt'}
-
-
+
diff --git a/interface/web/vm/templates/openvz_vm_edit.htm b/interface/web/vm/templates/openvz_vm_edit.htm index b34d82887..871094aec 100644 --- a/interface/web/vm/templates/openvz_vm_edit.htm +++ b/interface/web/vm/templates/openvz_vm_edit.htm @@ -65,12 +65,10 @@
-
-
+
-
-
+
@@ -85,8 +83,7 @@
-
-
+
-- GitLab From 680c56f95b14b1b33e0218f1eb62a58f9f491483 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 8 Jan 2015 10:11:57 +0100 Subject: [PATCH 064/287] Layout improvements (column width) --- .../templates/directive_snippets_list.htm | 8 ++--- .../web/admin/templates/firewall_list.htm | 8 ++--- .../web/admin/templates/iptables_list.htm | 6 ++-- .../web/admin/templates/language_list.htm | 2 +- .../web/admin/templates/remote_user_list.htm | 2 +- .../admin/templates/server_config_list.htm | 2 +- interface/web/admin/templates/server_list.htm | 2 +- .../admin/templates/software_package_list.htm | 2 +- .../admin/templates/software_repo_list.htm | 6 ++-- interface/web/admin/templates/users_list.htm | 8 ++--- .../client/templates/client_circle_list.htm | 8 ++--- .../client/templates/client_template_list.htm | 2 +- .../web/client/templates/clients_list.htm | 2 +- .../web/client/templates/domain_list.htm | 2 +- .../web/client/templates/resellers_list.htm | 2 +- interface/web/dns/templates/dns_a_list.htm | 8 ++--- .../dns/templates/dns_slave_admin_list.htm | 8 ++--- .../web/dns/templates/dns_slave_list.htm | 8 ++--- .../web/dns/templates/dns_soa_admin_list.htm | 8 ++--- interface/web/dns/templates/dns_soa_list.htm | 8 ++--- .../web/dns/templates/dns_template_list.htm | 2 +- .../templates/faq_manage_questions_list.htm | 2 +- .../help/templates/support_message_list.htm | 2 +- .../web/mail/templates/mail_alias_list.htm | 8 ++--- .../mail/templates/mail_aliasdomain_list.htm | 8 ++--- .../mail/templates/mail_blacklist_list.htm | 8 ++--- .../templates/mail_content_filter_list.htm | 8 ++--- .../mail/templates/mail_domain_admin_list.htm | 8 ++--- .../templates/mail_domain_catchall_list.htm | 8 ++--- .../web/mail/templates/mail_domain_list.htm | 8 ++--- .../web/mail/templates/mail_forward_list.htm | 8 ++--- .../web/mail/templates/mail_get_list.htm | 8 ++--- .../mail/templates/mail_mailinglist_list.htm | 2 +- .../templates/mail_relay_recipient_list.htm | 8 ++--- .../mail/templates/mail_transport_list.htm | 8 ++--- .../mail/templates/mail_user_backup_list.htm | 2 +- .../web/mail/templates/mail_user_list.htm | 32 +++++++++---------- .../mail/templates/mail_user_stats_list.htm | 2 +- .../mail/templates/mail_whitelist_list.htm | 8 ++--- .../templates/spamfilter_blacklist_list.htm | 8 ++--- .../mail/templates/spamfilter_policy_list.htm | 2 +- .../mail/templates/spamfilter_users_list.htm | 2 +- .../templates/spamfilter_whitelist_list.htm | 8 ++--- .../mail/templates/user_quota_stats_list.htm | 2 +- .../web/monitor/templates/datalog_list.htm | 2 +- .../web/monitor/templates/syslog_list.htm | 2 +- .../sites/templates/aps_instances_list.htm | 2 +- .../web/sites/templates/aps_packages_list.htm | 2 +- interface/web/sites/templates/cron_list.htm | 8 ++--- .../sites/templates/database_admin_list.htm | 14 ++++---- .../web/sites/templates/database_list.htm | 14 ++++---- .../templates/database_quota_stats_list.htm | 2 +- .../templates/database_user_admin_list.htm | 2 +- .../sites/templates/database_user_list.htm | 2 +- .../web/sites/templates/ftp_user_list.htm | 8 ++--- .../web/sites/templates/shell_user_list.htm | 8 ++--- .../sites/templates/user_quota_stats_list.htm | 2 +- .../web/sites/templates/web_backup_list.htm | 2 +- .../sites/templates/web_childdomain_list.htm | 8 ++--- .../web/sites/templates/web_folder_list.htm | 8 ++--- .../sites/templates/web_folder_user_list.htm | 8 ++--- .../sites/templates/web_sites_stats_list.htm | 2 +- .../templates/web_vhost_domain_admin_list.htm | 8 ++--- .../sites/templates/web_vhost_domain_list.htm | 8 ++--- .../web/sites/templates/webdav_user_list.htm | 8 ++--- .../default/assets/stylesheets/ispconfig.css | 6 ++++ .../assets/stylesheets/ispconfig.min.css | 2 +- interface/web/vm/templates/openvz_ip_list.htm | 2 +- .../vm/templates/openvz_ostemplate_list.htm | 8 ++--- .../web/vm/templates/openvz_template_list.htm | 8 ++--- interface/web/vm/templates/openvz_vm_list.htm | 8 ++--- 71 files changed, 212 insertions(+), 206 deletions(-) diff --git a/interface/web/admin/templates/directive_snippets_list.htm b/interface/web/admin/templates/directive_snippets_list.htm index e2fbf055e..c1ac201f0 100644 --- a/interface/web/admin/templates/directive_snippets_list.htm +++ b/interface/web/admin/templates/directive_snippets_list.htm @@ -16,13 +16,13 @@ - + - + - + - +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
@@ -33,7 +33,7 @@
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="name"} {tmpl_var name="type"} diff --git a/interface/web/admin/templates/firewall_list.htm b/interface/web/admin/templates/firewall_list.htm index 8d07ba8b7..2a6836c39 100644 --- a/interface/web/admin/templates/firewall_list.htm +++ b/interface/web/admin/templates/firewall_list.htm @@ -16,14 +16,14 @@ - + - + - + @@ -35,7 +35,7 @@ - + diff --git a/interface/web/admin/templates/iptables_list.htm b/interface/web/admin/templates/iptables_list.htm index 661217605..3fb85567d 100644 --- a/interface/web/admin/templates/iptables_list.htm +++ b/interface/web/admin/templates/iptables_list.htm @@ -15,7 +15,7 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="tcp_port"} {tmpl_var name="udp_port"}
- + @@ -26,7 +26,7 @@ - + @@ -42,7 +42,7 @@ - + diff --git a/interface/web/admin/templates/language_list.htm b/interface/web/admin/templates/language_list.htm index 8021391ca..e2ac1342b 100644 --- a/interface/web/admin/templates/language_list.htm +++ b/interface/web/admin/templates/language_list.htm @@ -24,7 +24,7 @@ - + diff --git a/interface/web/admin/templates/remote_user_list.htm b/interface/web/admin/templates/remote_user_list.htm index 719ef0518..3c0e0e955 100644 --- a/interface/web/admin/templates/remote_user_list.htm +++ b/interface/web/admin/templates/remote_user_list.htm @@ -17,7 +17,7 @@ - + diff --git a/interface/web/admin/templates/server_config_list.htm b/interface/web/admin/templates/server_config_list.htm index d0a22c0d6..2bf40cd7b 100644 --- a/interface/web/admin/templates/server_config_list.htm +++ b/interface/web/admin/templates/server_config_list.htm @@ -10,7 +10,7 @@ - + diff --git a/interface/web/admin/templates/server_list.htm b/interface/web/admin/templates/server_list.htm index 1660c0e7d..0c7522eec 100644 --- a/interface/web/admin/templates/server_list.htm +++ b/interface/web/admin/templates/server_list.htm @@ -16,7 +16,7 @@ - + diff --git a/interface/web/admin/templates/software_package_list.htm b/interface/web/admin/templates/software_package_list.htm index 4a2d241b9..dd9abee57 100644 --- a/interface/web/admin/templates/software_package_list.htm +++ b/interface/web/admin/templates/software_package_list.htm @@ -20,7 +20,7 @@ - + diff --git a/interface/web/admin/templates/software_repo_list.htm b/interface/web/admin/templates/software_repo_list.htm index 794465e10..3076b792b 100644 --- a/interface/web/admin/templates/software_repo_list.htm +++ b/interface/web/admin/templates/software_repo_list.htm @@ -16,13 +16,13 @@
 
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="table"} {tmpl_var name="protocol"}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
 
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
- + - + - + - + - + - + - + - + - + - + - + - + diff --git a/interface/web/client/templates/clients_list.htm b/interface/web/client/templates/clients_list.htm index 807002079..c3b952094 100644 --- a/interface/web/client/templates/clients_list.htm +++ b/interface/web/client/templates/clients_list.htm @@ -23,7 +23,7 @@ - + diff --git a/interface/web/client/templates/domain_list.htm b/interface/web/client/templates/domain_list.htm index d3fb7f71f..fa26d5529 100644 --- a/interface/web/client/templates/domain_list.htm +++ b/interface/web/client/templates/domain_list.htm @@ -18,7 +18,7 @@ - + diff --git a/interface/web/client/templates/resellers_list.htm b/interface/web/client/templates/resellers_list.htm index b2556487d..555244d1b 100644 --- a/interface/web/client/templates/resellers_list.htm +++ b/interface/web/client/templates/resellers_list.htm @@ -23,7 +23,7 @@ - + diff --git a/interface/web/dns/templates/dns_a_list.htm b/interface/web/dns/templates/dns_a_list.htm index fb70e86a2..aa0e1da8b 100644 --- a/interface/web/dns/templates/dns_a_list.htm +++ b/interface/web/dns/templates/dns_a_list.htm @@ -39,16 +39,16 @@
 
@@ -33,7 +33,7 @@
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="repo_name"} {tmpl_var name="repo_url"} diff --git a/interface/web/admin/templates/users_list.htm b/interface/web/admin/templates/users_list.htm index b96ed7a46..2562f46dc 100644 --- a/interface/web/admin/templates/users_list.htm +++ b/interface/web/admin/templates/users_list.htm @@ -18,14 +18,14 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
@@ -37,7 +37,7 @@
{tmpl_var name="client_id"}{tmpl_var name="active"}{tmpl_var name="active"}
{tmpl_var name="typ"}
{tmpl_var name="groups"} diff --git a/interface/web/client/templates/client_circle_list.htm b/interface/web/client/templates/client_circle_list.htm index 60257f258..2e3654a9e 100644 --- a/interface/web/client/templates/client_circle_list.htm +++ b/interface/web/client/templates/client_circle_list.htm @@ -17,14 +17,14 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
@@ -36,7 +36,7 @@
{tmpl_var name="circle_id"}{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="circle_name"} {tmpl_var name="description"} diff --git a/interface/web/client/templates/client_template_list.htm b/interface/web/client/templates/client_template_list.htm index fa0eb67c7..6cec1a36c 100644 --- a/interface/web/client/templates/client_template_list.htm +++ b/interface/web/client/templates/client_template_list.htm @@ -19,7 +19,7 @@ {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
- + - + - + @@ -62,7 +62,7 @@ - + diff --git a/interface/web/dns/templates/dns_slave_admin_list.htm b/interface/web/dns/templates/dns_slave_admin_list.htm index 0ca821aaa..4eb0a2681 100644 --- a/interface/web/dns/templates/dns_slave_admin_list.htm +++ b/interface/web/dns/templates/dns_slave_admin_list.htm @@ -32,15 +32,15 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="type"} {tmpl_var name="name"} {tmpl_var name="data"}
- + - + - + @@ -53,7 +53,7 @@ - + diff --git a/interface/web/dns/templates/dns_slave_list.htm b/interface/web/dns/templates/dns_slave_list.htm index 6a162291c..d7a9d63d7 100644 --- a/interface/web/dns/templates/dns_slave_list.htm +++ b/interface/web/dns/templates/dns_slave_list.htm @@ -32,14 +32,14 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="sys_groupid"} {tmpl_var name="server_id"} {tmpl_var name="origin"}
- + - + - + @@ -51,7 +51,7 @@ - + diff --git a/interface/web/dns/templates/dns_soa_admin_list.htm b/interface/web/dns/templates/dns_soa_admin_list.htm index 4fae01eb8..f32854bb7 100644 --- a/interface/web/dns/templates/dns_soa_admin_list.htm +++ b/interface/web/dns/templates/dns_soa_admin_list.htm @@ -34,16 +34,16 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="origin"} {tmpl_var name="ns"}
- + - + - + @@ -57,7 +57,7 @@ - + diff --git a/interface/web/dns/templates/dns_soa_list.htm b/interface/web/dns/templates/dns_soa_list.htm index 161727b9c..ad997013f 100644 --- a/interface/web/dns/templates/dns_soa_list.htm +++ b/interface/web/dns/templates/dns_soa_list.htm @@ -34,15 +34,15 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="sys_groupid"} {tmpl_var name="server_id"} {tmpl_var name="origin"}
- + - + - + @@ -55,7 +55,7 @@ - + diff --git a/interface/web/dns/templates/dns_template_list.htm b/interface/web/dns/templates/dns_template_list.htm index 699190dac..3f78c507b 100644 --- a/interface/web/dns/templates/dns_template_list.htm +++ b/interface/web/dns/templates/dns_template_list.htm @@ -18,7 +18,7 @@ - + diff --git a/interface/web/help/templates/faq_manage_questions_list.htm b/interface/web/help/templates/faq_manage_questions_list.htm index b920e4f8a..2de35d29c 100644 --- a/interface/web/help/templates/faq_manage_questions_list.htm +++ b/interface/web/help/templates/faq_manage_questions_list.htm @@ -12,7 +12,7 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="origin"} {tmpl_var name="ns"}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
- + diff --git a/interface/web/help/templates/support_message_list.htm b/interface/web/help/templates/support_message_list.htm index f9739bade..c97a00b7b 100644 --- a/interface/web/help/templates/support_message_list.htm +++ b/interface/web/help/templates/support_message_list.htm @@ -19,7 +19,7 @@ - + diff --git a/interface/web/mail/templates/mail_alias_list.htm b/interface/web/mail/templates/mail_alias_list.htm index 4745e28f6..60d18d1c9 100644 --- a/interface/web/mail/templates/mail_alias_list.htm +++ b/interface/web/mail/templates/mail_alias_list.htm @@ -32,13 +32,13 @@
{tmpl_var name="faq_question_txt"}{tmpl_var name="faq_question_txt"} {tmpl_var name="faq_section_name_txt"} {tmpl_var name="faq_delete_txt"} {tmpl_var name="faq_edit_txt"} {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
- + - + - + - +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
@@ -49,7 +49,7 @@
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="source"} {tmpl_var name="destination"} diff --git a/interface/web/mail/templates/mail_aliasdomain_list.htm b/interface/web/mail/templates/mail_aliasdomain_list.htm index aa8cfeec1..209a43134 100644 --- a/interface/web/mail/templates/mail_aliasdomain_list.htm +++ b/interface/web/mail/templates/mail_aliasdomain_list.htm @@ -32,13 +32,13 @@ - + - + - + - +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
@@ -49,7 +49,7 @@
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="source"} {tmpl_var name="destination"} diff --git a/interface/web/mail/templates/mail_blacklist_list.htm b/interface/web/mail/templates/mail_blacklist_list.htm index d31555876..60b923140 100644 --- a/interface/web/mail/templates/mail_blacklist_list.htm +++ b/interface/web/mail/templates/mail_blacklist_list.htm @@ -32,14 +32,14 @@ - + - + - + @@ -51,7 +51,7 @@ - + diff --git a/interface/web/mail/templates/mail_content_filter_list.htm b/interface/web/mail/templates/mail_content_filter_list.htm index cf1702406..90191cf58 100644 --- a/interface/web/mail/templates/mail_content_filter_list.htm +++ b/interface/web/mail/templates/mail_content_filter_list.htm @@ -32,14 +32,14 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="source"} {tmpl_var name="type"}
- + - + - + @@ -51,7 +51,7 @@ - + diff --git a/interface/web/mail/templates/mail_domain_admin_list.htm b/interface/web/mail/templates/mail_domain_admin_list.htm index 872e1f723..bd2a9f920 100644 --- a/interface/web/mail/templates/mail_domain_admin_list.htm +++ b/interface/web/mail/templates/mail_domain_admin_list.htm @@ -15,14 +15,14 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="pattern"} {tmpl_var name="action"}
- + - + - + @@ -34,7 +34,7 @@ - + diff --git a/interface/web/mail/templates/mail_domain_catchall_list.htm b/interface/web/mail/templates/mail_domain_catchall_list.htm index 82d5102db..6452f7156 100644 --- a/interface/web/mail/templates/mail_domain_catchall_list.htm +++ b/interface/web/mail/templates/mail_domain_catchall_list.htm @@ -32,13 +32,13 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="sys_groupid"} {tmpl_var name="server_id"} {tmpl_var name="domain"}
- + - + - + - +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
@@ -49,7 +49,7 @@
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="source"} {tmpl_var name="destination"} diff --git a/interface/web/mail/templates/mail_domain_list.htm b/interface/web/mail/templates/mail_domain_list.htm index cf5402c28..011fcd598 100644 --- a/interface/web/mail/templates/mail_domain_list.htm +++ b/interface/web/mail/templates/mail_domain_list.htm @@ -32,13 +32,13 @@ - + - + - + - + ";while(h'+e[this.language].daysMin[(h++)%7]+""}i+="";this.picker.find(".datetimepicker-days thead").append(i)},fillMonths:function(){var j="",h=0;while(h<12){j+=''+e[this.language].monthsShort[h++]+""}this.picker.find(".datetimepicker-months td").html(j)},fill:function(){if(this.date==null||this.viewDate==null){return}var F=new Date(this.viewDate),s=F.getUTCFullYear(),G=F.getUTCMonth(),m=F.getUTCDate(),B=F.getUTCHours(),w=F.getUTCMinutes(),x=this.startDate!==-Infinity?this.startDate.getUTCFullYear():-Infinity,C=this.startDate!==-Infinity?this.startDate.getUTCMonth()+1:-Infinity,o=this.endDate!==Infinity?this.endDate.getUTCFullYear():Infinity,y=this.endDate!==Infinity?this.endDate.getUTCMonth()+1:Infinity,p=(new g(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate())).valueOf(),E=new Date();this.picker.find(".datetimepicker-days thead th:eq(1)").text(e[this.language].months[G]+" "+s);if(this.formatViewType=="time"){var j=this.getFormattedDate();this.picker.find(".datetimepicker-hours thead th:eq(1)").text(j);this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(j)}else{this.picker.find(".datetimepicker-hours thead th:eq(1)").text(m+" "+e[this.language].months[G]+" "+s);this.picker.find(".datetimepicker-minutes thead th:eq(1)").text(m+" "+e[this.language].months[G]+" "+s)}this.picker.find("tfoot th.today").text(e[this.language].today).toggle(this.todayBtn!==false);this.updateNavArrows();this.fillMonths();var I=g(s,G-1,28,0,0,0,0),A=c.getDaysInMonth(I.getUTCFullYear(),I.getUTCMonth());I.setUTCDate(A);I.setUTCDate(A-(I.getUTCDay()-this.weekStart+7)%7);var h=new Date(I);h.setUTCDate(h.getUTCDate()+42);h=h.valueOf();var q=[];var t;while(I.valueOf()")}t="";if(I.getUTCFullYear()s||(I.getUTCFullYear()==s&&I.getUTCMonth()>G)){t+=" new"}}if(this.todayHighlight&&I.getUTCFullYear()==E.getFullYear()&&I.getUTCMonth()==E.getMonth()&&I.getUTCDate()==E.getDate()){t+=" today"}if(I.valueOf()==p){t+=" active"}if((I.valueOf()+86400000)<=this.startDate||I.valueOf()>this.endDate||d.inArray(I.getUTCDay(),this.daysOfWeekDisabled)!==-1){t+=" disabled"}q.push('");if(I.getUTCDay()==this.weekEnd){q.push("")}I.setUTCDate(I.getUTCDate()+1)}this.picker.find(".datetimepicker-days tbody").empty().append(q.join(""));q=[];var u="",D="",r="";var k=this.hoursDisabled||[];for(var z=0;z<24;z++){if(k.indexOf(z)!==-1){continue}var v=g(s,G,m,z);t="";if((v.valueOf()+3600000)<=this.startDate||v.valueOf()>this.endDate){t+=" disabled"}else{if(B==z){t+=" active"}}if(this.showMeridian&&e[this.language].meridiem.length==2){D=(z<12?e[this.language].meridiem[0]:e[this.language].meridiem[1]);if(D!=r){if(r!=""){q.push("")}q.push('
'+D.toUpperCase()+"")}r=D;u=(z%12?z%12:12);q.push(''+u+"");if(z==23){q.push("
")}}else{u=z+":00";q.push(''+u+"")}}this.picker.find(".datetimepicker-hours td").html(q.join(""));q=[];u="",D="",r="";var l=this.minutesDisabled||[];for(var z=0;z<60;z+=this.minuteStep){if(l.indexOf(z)!==-1){continue}var v=g(s,G,m,B,z,0);t="";if(v.valueOf()this.endDate){t+=" disabled"}else{if(Math.floor(w/this.minuteStep)==Math.floor(z/this.minuteStep)){t+=" active"}}if(this.showMeridian&&e[this.language].meridiem.length==2){D=(B<12?e[this.language].meridiem[0]:e[this.language].meridiem[1]);if(D!=r){if(r!=""){q.push("")}q.push('
'+D.toUpperCase()+"")}r=D;u=(B%12?B%12:12);q.push(''+u+":"+(z<10?"0"+z:z)+"");if(z==59){q.push("
")}}else{u=z+":00";q.push(''+B+":"+(z<10?"0"+z:z)+"")}}this.picker.find(".datetimepicker-minutes td").html(q.join(""));var J=this.date.getUTCFullYear();var n=this.picker.find(".datetimepicker-months").find("th:eq(1)").text(s).end().find("span").removeClass("active");if(J==s){n.eq(this.date.getUTCMonth()+2).addClass("active")}if(so){n.addClass("disabled")}if(s==x){n.slice(0,C+1).addClass("disabled")}if(s==o){n.slice(y).addClass("disabled")}q="";s=parseInt(s/10,10)*10;var H=this.picker.find(".datetimepicker-years").find("th:eq(1)").text(s+"-"+(s+9)).end().find("td");s-=1;for(var z=-1;z<11;z++){q+='o?" disabled":"")+'">'+s+"";s+=1}H.html(q);this.place()},updateNavArrows:function(){var l=new Date(this.viewDate),j=l.getUTCFullYear(),k=l.getUTCMonth(),i=l.getUTCDate(),h=l.getUTCHours();switch(this.viewMode){case 0:if(this.startDate!==-Infinity&&j<=this.startDate.getUTCFullYear()&&k<=this.startDate.getUTCMonth()&&i<=this.startDate.getUTCDate()&&h<=this.startDate.getUTCHours()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&j>=this.endDate.getUTCFullYear()&&k>=this.endDate.getUTCMonth()&&i>=this.endDate.getUTCDate()&&h>=this.endDate.getUTCHours()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 1:if(this.startDate!==-Infinity&&j<=this.startDate.getUTCFullYear()&&k<=this.startDate.getUTCMonth()&&i<=this.startDate.getUTCDate()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&j>=this.endDate.getUTCFullYear()&&k>=this.endDate.getUTCMonth()&&i>=this.endDate.getUTCDate()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 2:if(this.startDate!==-Infinity&&j<=this.startDate.getUTCFullYear()&&k<=this.startDate.getUTCMonth()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&j>=this.endDate.getUTCFullYear()&&k>=this.endDate.getUTCMonth()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break;case 3:case 4:if(this.startDate!==-Infinity&&j<=this.startDate.getUTCFullYear()){this.picker.find(".prev").css({visibility:"hidden"})}else{this.picker.find(".prev").css({visibility:"visible"})}if(this.endDate!==Infinity&&j>=this.endDate.getUTCFullYear()){this.picker.find(".next").css({visibility:"hidden"})}else{this.picker.find(".next").css({visibility:"visible"})}break}},mousewheel:function(i){i.preventDefault();i.stopPropagation();if(this.wheelPause){return}this.wheelPause=true;var h=i.originalEvent;var k=h.wheelDelta;var j=k>0?1:(k===0)?0:-1;if(this.wheelViewModeNavigationInverseDirection){j=-j}this.showMode(j);setTimeout(d.proxy(function(){this.wheelPause=false},this),this.wheelViewModeNavigationDelay)},click:function(l){l.stopPropagation();l.preventDefault();var m=d(l.target).closest("span, td, th, legend");if(m.is("."+this.icontype)){m=d(m).parent().closest("span, td, th, legend")}if(m.length==1){if(m.is(".disabled")){this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});return}switch(m[0].nodeName.toLowerCase()){case"th":switch(m[0].className){case"switch":this.showMode(1);break;case"prev":case"next":var h=c.modes[this.viewMode].navStep*(m[0].className=="prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,h);break;case 1:this.viewDate=this.moveDate(this.viewDate,h);break;case 2:this.viewDate=this.moveMonth(this.viewDate,h);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,h);break}this.fill();this.element.trigger({type:m[0].className+":"+this.convertViewModeText(this.viewMode),date:this.viewDate,startDate:this.startDate,endDate:this.endDate});break;case"today":var i=new Date();i=g(i.getFullYear(),i.getMonth(),i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),0);if(ithis.endDate){i=this.endDate}}this.viewMode=this.startViewMode;this.showMode(0);this._setDate(i);this.fill();if(this.autoclose){this.hide()}break}break;case"span":if(!m.is(".disabled")){var o=this.viewDate.getUTCFullYear(),n=this.viewDate.getUTCMonth(),p=this.viewDate.getUTCDate(),q=this.viewDate.getUTCHours(),j=this.viewDate.getUTCMinutes(),r=this.viewDate.getUTCSeconds();if(m.is(".month")){this.viewDate.setUTCDate(1);n=m.parent().find("span").index(m);p=this.viewDate.getUTCDate();this.viewDate.setUTCMonth(n);this.element.trigger({type:"changeMonth",date:this.viewDate});if(this.viewSelect>=3){this._setDate(g(o,n,p,q,j,r,0))}}else{if(m.is(".year")){this.viewDate.setUTCDate(1);o=parseInt(m.text(),10)||0;this.viewDate.setUTCFullYear(o);this.element.trigger({type:"changeYear",date:this.viewDate});if(this.viewSelect>=4){this._setDate(g(o,n,p,q,j,r,0))}}else{if(m.is(".hour")){q=parseInt(m.text(),10)||0;if(m.hasClass("hour_am")||m.hasClass("hour_pm")){if(q==12&&m.hasClass("hour_am")){q=0}else{if(q!=12&&m.hasClass("hour_pm")){q+=12}}}this.viewDate.setUTCHours(q);this.element.trigger({type:"changeHour",date:this.viewDate});if(this.viewSelect>=1){this._setDate(g(o,n,p,q,j,r,0))}}else{if(m.is(".minute")){j=parseInt(m.text().substr(m.text().indexOf(":")+1),10)||0;this.viewDate.setUTCMinutes(j);this.element.trigger({type:"changeMinute",date:this.viewDate});if(this.viewSelect>=0){this._setDate(g(o,n,p,q,j,r,0))}}}}}if(this.viewMode!=0){var k=this.viewMode;this.showMode(-1);this.fill();if(k==this.viewMode&&this.autoclose){this.hide()}}else{this.fill();if(this.autoclose){this.hide()}}}break;case"td":if(m.is(".day")&&!m.is(".disabled")){var p=parseInt(m.text(),10)||1;var o=this.viewDate.getUTCFullYear(),n=this.viewDate.getUTCMonth(),q=this.viewDate.getUTCHours(),j=this.viewDate.getUTCMinutes(),r=this.viewDate.getUTCSeconds();if(m.is(".old")){if(n===0){n=11;o-=1}else{n-=1}}else{if(m.is(".new")){if(n==11){n=0;o+=1}else{n+=1}}}this.viewDate.setUTCFullYear(o);this.viewDate.setUTCMonth(n,p);this.element.trigger({type:"changeDay",date:this.viewDate});if(this.viewSelect>=2){this._setDate(g(o,n,p,q,j,r,0))}}var k=this.viewMode;this.showMode(-1);this.fill();if(k==this.viewMode&&this.autoclose){this.hide()}break}}},_setDate:function(h,j){if(!j||j=="date"){this.date=h}if(!j||j=="view"){this.viewDate=h}this.fill();this.setValue();var i;if(this.isInput){i=this.element}else{if(this.component){i=this.element.find("input")}}if(i){i.change();if(this.autoclose&&(!j||j=="date")){}}this.element.trigger({type:"changeDate",date:this.date})},moveMinute:function(i,h){if(!h){return i}var j=new Date(i.valueOf());j.setUTCMinutes(j.getUTCMinutes()+(h*this.minuteStep));return j},moveHour:function(i,h){if(!h){return i}var j=new Date(i.valueOf());j.setUTCHours(j.getUTCHours()+h);return j},moveDate:function(i,h){if(!h){return i}var j=new Date(i.valueOf());j.setUTCDate(j.getUTCDate()+h);return j},moveMonth:function(h,j){if(!j){return h}var m=new Date(h.valueOf()),q=m.getUTCDate(),n=m.getUTCMonth(),l=Math.abs(j),p,o;j=j>0?1:-1;if(l==1){o=j==-1?function(){return m.getUTCMonth()==n}:function(){return m.getUTCMonth()!=p};p=n+j;m.setUTCMonth(p);if(p<0||p>11){p=(p+12)%12}}else{for(var k=0;k=this.startDate&&h<=this.endDate},keydown:function(l){if(this.picker.is(":not(:visible)")){if(l.keyCode==27){this.show()}return}var n=false,i,o,m,p,h;switch(l.keyCode){case 27:this.hide();l.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation){break}i=l.keyCode==37?-1:1;viewMode=this.viewMode;if(l.ctrlKey){viewMode+=2}else{if(l.shiftKey){viewMode+=1}}if(viewMode==4){p=this.moveYear(this.date,i);h=this.moveYear(this.viewDate,i)}else{if(viewMode==3){p=this.moveMonth(this.date,i);h=this.moveMonth(this.viewDate,i)}else{if(viewMode==2){p=this.moveDate(this.date,i);h=this.moveDate(this.viewDate,i)}else{if(viewMode==1){p=this.moveHour(this.date,i);h=this.moveHour(this.viewDate,i)}else{if(viewMode==0){p=this.moveMinute(this.date,i);h=this.moveMinute(this.viewDate,i)}}}}}if(this.dateWithinRange(p)){this.date=p;this.viewDate=h;this.setValue();this.update();l.preventDefault();n=true}break;case 38:case 40:if(!this.keyboardNavigation){break}i=l.keyCode==38?-1:1;viewMode=this.viewMode;if(l.ctrlKey){viewMode+=2}else{if(l.shiftKey){viewMode+=1}}if(viewMode==4){p=this.moveYear(this.date,i);h=this.moveYear(this.viewDate,i)}else{if(viewMode==3){p=this.moveMonth(this.date,i);h=this.moveMonth(this.viewDate,i)}else{if(viewMode==2){p=this.moveDate(this.date,i*7);h=this.moveDate(this.viewDate,i*7)}else{if(viewMode==1){if(this.showMeridian){p=this.moveHour(this.date,i*6);h=this.moveHour(this.viewDate,i*6)}else{p=this.moveHour(this.date,i*4);h=this.moveHour(this.viewDate,i*4)}}else{if(viewMode==0){p=this.moveMinute(this.date,i*4);h=this.moveMinute(this.viewDate,i*4)}}}}}if(this.dateWithinRange(p)){this.date=p;this.viewDate=h;this.setValue();this.update();l.preventDefault();n=true}break;case 13:if(this.viewMode!=0){var k=this.viewMode;this.showMode(-1);this.fill();if(k==this.viewMode&&this.autoclose){this.hide()}}else{this.fill();if(this.autoclose){this.hide()}}l.preventDefault();break;case 9:this.hide();break}if(n){var j;if(this.isInput){j=this.element}else{if(this.component){j=this.element.find("input")}}if(j){j.change()}this.element.trigger({type:"changeDate",date:this.date})}},showMode:function(h){if(h){var i=Math.max(0,Math.min(c.modes.length-1,this.viewMode+h));if(i>=this.minView&&i<=this.maxView){this.element.trigger({type:"changeMode",date:this.viewDate,oldViewMode:this.viewMode,newViewMode:i});this.viewMode=i}}this.picker.find(">div").hide().filter(".datetimepicker-"+c.modes[this.viewMode].clsName).css("display","block");this.updateNavArrows()},reset:function(h){this._setDate(null,"date")},convertViewModeText:function(h){switch(h){case 4:return"decade";case 3:return"year";case 2:return"month";case 1:return"day";case 0:return"hour"}}};var a=d.fn.datetimepicker;d.fn.datetimepicker=function(j){var h=Array.apply(null,arguments);h.shift();var i;this.each(function(){var m=d(this),l=m.data("datetimepicker"),k=typeof j=="object"&&j;if(!l){m.data("datetimepicker",(l=new f(this,d.extend({},d.fn.datetimepicker.defaults,k))))}if(typeof j=="string"&&typeof l[j]=="function"){i=l[j].apply(l,h);if(i!==undefined){return false}}});if(i!==undefined){return i}else{return this}};d.fn.datetimepicker.defaults={};d.fn.datetimepicker.Constructor=f;var e=d.fn.datetimepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["am","pm"],suffix:["st","nd","rd","th"],today:"Today"}};var c={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(h){return(((h%4===0)&&(h%100!==0))||(h%400===0))},getDaysInMonth:function(h,i){return[31,(c.isLeapYear(h)?29:28),31,30,31,30,31,31,30,31,30,31][i]},getDefaultFormat:function(h,i){if(h=="standard"){if(i=="input"){return"yyyy-mm-dd hh:ii"}else{return"yyyy-mm-dd hh:ii:ss"}}else{if(h=="php"){if(i=="input"){return"Y-m-d H:i"}else{return"Y-m-d H:i:s"}}else{throw new Error("Invalid format type.")}}},validParts:function(h){if(h=="standard"){return/hh?|HH?|p|P|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g}else{if(h=="php"){return/[dDjlNwzFmMnStyYaABgGhHis]/g}else{throw new Error("Invalid format type.")}}},nonpunctuation:/[^ -\/:-@\[-`{-~\t\n\rTZ]+/g,parseFormat:function(k,i){var h=k.replace(this.validParts(i),"\0").split("\0"),j=k.match(this.validParts(i));if(!h||!h.length||!j||j.length==0){throw new Error("Invalid date format.")}return{separators:h,parts:j}},parseDate:function(m,v,p,t){if(m instanceof Date){var x=new Date(m.valueOf()-m.getTimezoneOffset()*60000);x.setMilliseconds(0);return x}if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(m)){v=this.parseFormat("yyyy-mm-dd",t)}if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(m)){v=this.parseFormat("yyyy-mm-dd hh:ii",t)}if(/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(m)){v=this.parseFormat("yyyy-mm-dd hh:ii:ss",t)}if(/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(m)){var y=/([-+]\d+)([dmwy])/,n=m.match(/([-+]\d+)([dmwy])/g),h,l;m=new Date();for(var o=0;o
',headTemplateV3:'',contTemplate:'',footTemplate:''};c.template='
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
@@ -49,7 +49,7 @@
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="domain"} diff --git a/interface/web/mail/templates/mail_forward_list.htm b/interface/web/mail/templates/mail_forward_list.htm index 830637388..6f6d171a3 100644 --- a/interface/web/mail/templates/mail_forward_list.htm +++ b/interface/web/mail/templates/mail_forward_list.htm @@ -32,13 +32,13 @@ - + - + - + - + diff --git a/server/plugins-available/backup_plugin.inc.php b/server/plugins-available/backup_plugin.inc.php index 975a5dd4e..3a06dc272 100644 --- a/server/plugins-available/backup_plugin.inc.php +++ b/server/plugins-available/backup_plugin.inc.php @@ -75,7 +75,7 @@ class backup_plugin { $backup_dir_is_ready = true; //* mount backup directory, if necessary - if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $backup_dir_is_ready = false; + if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($server_config['backup_dir']) ) $backup_dir_is_ready = false; if($backup_dir_is_ready){ //* Make backup available for download -- GitLab From 9e5a1137350361387168dd6bb1598f0a3df84c19 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:27:58 +0200 Subject: [PATCH 214/287] - ported some patches --- interface/lib/classes/remote.d/client.inc.php | 21 +++++++++++++++++++ interface/web/client/lib/remote.conf.php | 2 +- interface/web/sites/web_vhost_domain_edit.php | 8 +++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/interface/lib/classes/remote.d/client.inc.php b/interface/lib/classes/remote.d/client.inc.php index 2fb436352..d1c753279 100644 --- a/interface/lib/classes/remote.d/client.inc.php +++ b/interface/lib/classes/remote.d/client.inc.php @@ -476,6 +476,27 @@ class remoting_client extends remoting { return false; } } + + public function client_get_by_customer_no($session_id, $customer_no) { + global $app; + if(!$this->checkPerm($session_id, 'client_get_by_customer_no')) { + throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); + return false; + } + $customer_no = trim($customer_no); + if($customer_no == '') { + throw new SoapFault('permission_denied', 'There was no customer number specified.'); + return false; + } + $customer_no = $app->db->quote($customer_no); + $rec = $app->db->queryOneRecord("SELECT * FROM client WHERE customer_no = '".$customer_no."'"); + if (isset($rec)) { + return $rec; + } else { + throw new SoapFault('no_client_found', 'There is no user account for this customer number.'); + return false; + } + } /** * Get All client_id's from database diff --git a/interface/web/client/lib/remote.conf.php b/interface/web/client/lib/remote.conf.php index 6ac8ae1f8..d58029e85 100644 --- a/interface/web/client/lib/remote.conf.php +++ b/interface/web/client/lib/remote.conf.php @@ -1,6 +1,6 @@ ['.$php_directive_snippet['name'].'] '; } } @@ -420,6 +421,7 @@ class page_action extends tform_actions { $apache_directive_snippets_txt = ''; if(is_array($apache_directive_snippets) && !empty($apache_directive_snippets)){ foreach($apache_directive_snippets as $apache_directive_snippet){ + $apache_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $apache_directive_snippet['snippet'] . PHP_EOL; $apache_directive_snippets_txt .= '['.$apache_directive_snippet['name'].'] '; } } @@ -432,6 +434,7 @@ class page_action extends tform_actions { $nginx_directive_snippets_txt = ''; if(is_array($nginx_directive_snippets) && !empty($nginx_directive_snippets)){ foreach($nginx_directive_snippets as $nginx_directive_snippet){ + $nginx_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $nginx_directive_snippet['snippet'] . PHP_EOL; $nginx_directive_snippets_txt .= '['.$nginx_directive_snippet['name'].'] '; } } @@ -443,6 +446,7 @@ class page_action extends tform_actions { $proxy_directive_snippets_txt = ''; if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){ foreach($proxy_directive_snippets as $proxy_directive_snippet){ + $proxy_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $proxy_directive_snippet['snippet'] . PHP_EOL; $proxy_directive_snippets_txt .= '['.$proxy_directive_snippet['name'].'] '; } } @@ -573,6 +577,7 @@ class page_action extends tform_actions { $php_directive_snippets_txt = ''; if(is_array($php_directive_snippets) && !empty($php_directive_snippets)){ foreach($php_directive_snippets as $php_directive_snippet){ + $php_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $php_directive_snippet['snippet'] . PHP_EOL; $php_directive_snippets_txt .= '['.$php_directive_snippet['name'].'] '; } } @@ -584,6 +589,7 @@ class page_action extends tform_actions { $apache_directive_snippets_txt = ''; if(is_array($apache_directive_snippets) && !empty($apache_directive_snippets)){ foreach($apache_directive_snippets as $apache_directive_snippet){ + $apache_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $apache_directive_snippet['snippet'] . PHP_EOL; $apache_directive_snippets_txt .= '['.$apache_directive_snippet['name'].'] '; } } @@ -596,6 +602,7 @@ class page_action extends tform_actions { $nginx_directive_snippets_txt = ''; if(is_array($nginx_directive_snippets) && !empty($nginx_directive_snippets)){ foreach($nginx_directive_snippets as $nginx_directive_snippet){ + $nginx_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $nginx_directive_snippet['snippet'] . PHP_EOL; $nginx_directive_snippets_txt .= '['.$nginx_directive_snippet['name'].'] '; } } @@ -607,6 +614,7 @@ class page_action extends tform_actions { $proxy_directive_snippets_txt = ''; if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){ foreach($proxy_directive_snippets as $proxy_directive_snippet){ + $proxy_directive_snippet['snippet'] = PHP_EOL . PHP_EOL . $proxy_directive_snippet['snippet'] . PHP_EOL; $proxy_directive_snippets_txt .= '['.$proxy_directive_snippet['name'].'] '; } } -- GitLab From d19abd5cf6237561faf11fcd5873d460f68ed583 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:32:50 +0200 Subject: [PATCH 215/287] - ported some patches --- interface/web/login/index.php | 4 +++- interface/web/login/templates/index.htm | 4 ++-- server/lib/classes/cron.d/500-backup.inc.php | 21 ++++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/interface/web/login/index.php b/interface/web/login/index.php index 87b899607..1bc2db7df 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -322,7 +322,7 @@ class login_index { // Maintenance mode - show message when people try to log in and also when people are forcedly logged off if($maintenance_mode_error != '') $error = ''.$maintenance_mode_error.'

'.$error; if($error != ''){ - $error = '

Error

'.$error.'
'; + $error = '
'.$error.'
'; } $app->load('getconf'); @@ -335,6 +335,8 @@ class login_index { } $app->tpl->setVar('error', $error); + $app->tpl->setVar('error_txt', $app->lng('error_txt')); + $app->tpl->setVar('login_txt', $app->lng('login_txt')); $app->tpl->setVar('pw_lost_txt', $app->lng('pw_lost_txt')); $app->tpl->setVar('username_txt', $app->lng('username_txt')); $app->tpl->setVar('password_txt', $app->lng('password_txt')); diff --git a/interface/web/login/templates/index.htm b/interface/web/login/templates/index.htm index 35f78bfe2..d6972b9ef 100644 --- a/interface/web/login/templates/index.htm +++ b/interface/web/login/templates/index.htm @@ -9,11 +9,11 @@

- +

{tmpl_var name='error_txt'}


{tmpl_var name='pw_lost_txt'}
- {tmpl_var name='login_txt'}Login + {tmpl_var name='login_txt'}
diff --git a/server/lib/classes/cron.d/500-backup.inc.php b/server/lib/classes/cron.d/500-backup.inc.php index 87321d5fc..a9fa3f91f 100644 --- a/server/lib/classes/cron.d/500-backup.inc.php +++ b/server/lib/classes/cron.d/500-backup.inc.php @@ -363,6 +363,27 @@ class cronjob_backup extends cronjob { } } } + + // delete files from backup download dir (/var/www/example.com/backup) + unset($records, $entry, $files); + $sql = "SELECT * FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND active = 'y'"; + $records = $app->db->queryAllRecords($sql, $conf['server_id']); + if(is_array($records)) { + foreach($records as $rec) { + $backup_download_dir = $rec['document_root'].'/backup'; + if(is_dir($backup_download_dir)){ + $dir_handle = dir($backup_download_dir); + $files = array(); + while (false !== ($entry = $dir_handle->read())) { + if($entry != '.' && $entry != '..' && is_file($backup_download_dir.'/'.$entry)) { + // delete files older than 3 days + if(time() - filemtime($backup_download_dir.'/'.$entry) >= 60*60*24*3) @unlink($backup_download_dir.'/'.$entry); + } + } + $dir_handle->close(); + } + } + } parent::onRunJob(); } -- GitLab From ccccf1d72fd27990e166464eab48b0a6c0d427c7 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:36:42 +0200 Subject: [PATCH 216/287] - ported some patches --- install/tpl/system.ini.master | 3 ++ interface/lib/classes/plugin_listview.inc.php | 52 +++++++++++++++++++ interface/lib/classes/validate_client.inc.php | 2 + .../mail_user_autoresponder_edit.htm | 10 ++-- .../mail/templates/mail_user_filter_edit.htm | 15 +++--- .../mail/templates/mail_user_filter_list.htm | 2 +- 6 files changed, 71 insertions(+), 13 deletions(-) diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master index 74ab068ec..92ae51869 100644 --- a/install/tpl/system.ini.master +++ b/install/tpl/system.ini.master @@ -8,6 +8,9 @@ [mail] enable_custom_login=n +mailbox_show_autoresponder_tab=y +mailbox_show_mail_filter_tab=y +mailbox_show_custom_rules_tab=y mailboxlist_webmail_link=y webmail_url=/webmail dkim_path=/var/lib/amavis/dkim diff --git a/interface/lib/classes/plugin_listview.inc.php b/interface/lib/classes/plugin_listview.inc.php index c50cb9177..bc764caef 100644 --- a/interface/lib/classes/plugin_listview.inc.php +++ b/interface/lib/classes/plugin_listview.inc.php @@ -174,6 +174,58 @@ class plugin_listview extends plugin_base { $_SESSION["s"]["form"]["return_to"] = $list_name; //die(print_r($_SESSION["s"]["list"][$list_name])); + // defaults + $listTpl->setVar('app_title', $app->_conf['app_title']); + if(isset($_SESSION['s']['user'])) { + $listTpl->setVar('app_version', $app->_conf['app_version']); + // get pending datalog changes + $datalog = $app->db->datalogStatus(); + $listTpl->setVar('datalog_changes_txt', $app->lng('datalog_changes_txt')); + $listTpl->setVar('datalog_changes_end_txt', $app->lng('datalog_changes_end_txt')); + $listTpl->setVar('datalog_changes_count', $datalog['count']); + $listTpl->setLoop('datalog_changes', $datalog['entries']); + } else { + $listTpl->setVar('app_version', ''); + } + $listTpl->setVar('app_link', $app->_conf['app_link']); + + $listTpl->setVar('app_logo', $app->_conf['logo']); + + $listTpl->setVar('phpsessid', session_id()); + + $listTpl->setVar('theme', $_SESSION['s']['theme']); + $listTpl->setVar('html_content_encoding', $app->_conf['html_content_encoding']); + + $listTpl->setVar('delete_confirmation', $app->lng('delete_confirmation')); + //print_r($_SESSION); + if(isset($_SESSION['s']['module']['name'])) { + $listTpl->setVar('app_module', $_SESSION['s']['module']['name']); + } + if(isset($_SESSION['s']['user']) && $_SESSION['s']['user']['typ'] == 'admin') { + $listTpl->setVar('is_admin', 1); + } + if(isset($_SESSION['s']['user']) && $app->auth->has_clients($_SESSION['s']['user']['userid'])) { + $listTpl->setVar('is_reseller', 1); + } + /* Show username */ + if(isset($_SESSION['s']['user'])) { + $listTpl->setVar('cpuser', $_SESSION['s']['user']['username']); + $listTpl->setVar('logout_txt', $app->lng('logout_txt')); + /* Show search field only for normal users, not mail users */ + if(stristr($_SESSION['s']['user']['username'], '@')){ + $listTpl->setVar('usertype', 'mailuser'); + } else { + $listTpl->setVar('usertype', 'normaluser'); + } + } + + /* Global Search */ + $listTpl->setVar('globalsearch_resultslimit_of_txt', $app->lng('globalsearch_resultslimit_of_txt')); + $listTpl->setVar('globalsearch_resultslimit_results_txt', $app->lng('globalsearch_resultslimit_results_txt')); + $listTpl->setVar('globalsearch_noresults_text_txt', $app->lng('globalsearch_noresults_text_txt')); + $listTpl->setVar('globalsearch_noresults_limit_txt', $app->lng('globalsearch_noresults_limit_txt')); + $listTpl->setVar('globalsearch_searchfield_watermark_txt', $app->lng('globalsearch_searchfield_watermark_txt')); + return $listTpl->grab(); } diff --git a/interface/lib/classes/validate_client.inc.php b/interface/lib/classes/validate_client.inc.php index 468a02201..db55b04f1 100644 --- a/interface/lib/classes/validate_client.inc.php +++ b/interface/lib/classes/validate_client.inc.php @@ -161,6 +161,8 @@ class validate_client { // Test if the country of the VAT-ID matches the country of the customer if($country != ''){ + // Greece + if($country == 'GR') $country = 'EL'; if(strtoupper($cc) != $country){ $errmsg = $validator['errmsg']; if(isset($app->tform->wordbook[$errmsg])) { diff --git a/interface/web/mail/templates/mail_user_autoresponder_edit.htm b/interface/web/mail/templates/mail_user_autoresponder_edit.htm index 03cb71568..afefb7950 100644 --- a/interface/web/mail/templates/mail_user_autoresponder_edit.htm +++ b/interface/web/mail/templates/mail_user_autoresponder_edit.htm @@ -14,16 +14,16 @@
-
+
+
- {tmpl_var name='autoresponder_start_date'}  - {tmpl_var name='now_txt'} +
{tmpl_var name='autoresponder_start_date'}  + {tmpl_var name='now_txt'}
- {tmpl_var name='autoresponder_end_date'} +
{tmpl_var name='autoresponder_end_date'}
diff --git a/interface/web/mail/templates/mail_user_filter_edit.htm b/interface/web/mail/templates/mail_user_filter_edit.htm index 7de61b119..cb2d79a24 100644 --- a/interface/web/mail/templates/mail_user_filter_edit.htm +++ b/interface/web/mail/templates/mail_user_filter_edit.htm @@ -7,21 +7,22 @@
-
+
+
-
-


-
+
+
+
-


-
+
+
- {tmpl_var name='active'} +
{tmpl_var name='active'}
diff --git a/interface/web/mail/templates/mail_user_filter_list.htm b/interface/web/mail/templates/mail_user_filter_list.htm index 9c854d515..990558bd1 100644 --- a/interface/web/mail/templates/mail_user_filter_list.htm +++ b/interface/web/mail/templates/mail_user_filter_list.htm @@ -54,7 +54,7 @@
- +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
@@ -49,7 +49,7 @@
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="source"} {tmpl_var name="destination"} diff --git a/interface/web/mail/templates/mail_get_list.htm b/interface/web/mail/templates/mail_get_list.htm index b90ee97f7..aae94b719 100644 --- a/interface/web/mail/templates/mail_get_list.htm +++ b/interface/web/mail/templates/mail_get_list.htm @@ -32,15 +32,15 @@ - + - + - + @@ -53,7 +53,7 @@ - + diff --git a/interface/web/mail/templates/mail_mailinglist_list.htm b/interface/web/mail/templates/mail_mailinglist_list.htm index 1eaf97eff..4b175e753 100644 --- a/interface/web/mail/templates/mail_mailinglist_list.htm +++ b/interface/web/mail/templates/mail_mailinglist_list.htm @@ -33,7 +33,7 @@ - + diff --git a/interface/web/mail/templates/mail_relay_recipient_list.htm b/interface/web/mail/templates/mail_relay_recipient_list.htm index 8c201de82..ec75ca1a9 100644 --- a/interface/web/mail/templates/mail_relay_recipient_list.htm +++ b/interface/web/mail/templates/mail_relay_recipient_list.htm @@ -31,13 +31,13 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="source_server"} {tmpl_var name="source_username"}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
- + - + - + - + - + - +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
@@ -48,7 +48,7 @@
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="source"} diff --git a/interface/web/mail/templates/mail_transport_list.htm b/interface/web/mail/templates/mail_transport_list.htm index fa6954123..8b64a3827 100644 --- a/interface/web/mail/templates/mail_transport_list.htm +++ b/interface/web/mail/templates/mail_transport_list.htm @@ -32,15 +32,15 @@ - + - + - + @@ -53,7 +53,7 @@ - + diff --git a/interface/web/mail/templates/mail_user_backup_list.htm b/interface/web/mail/templates/mail_user_backup_list.htm index 8b2e1d6e5..da78f2706 100644 --- a/interface/web/mail/templates/mail_user_backup_list.htm +++ b/interface/web/mail/templates/mail_user_backup_list.htm @@ -15,7 +15,7 @@ - + diff --git a/interface/web/mail/templates/mail_user_list.htm b/interface/web/mail/templates/mail_user_list.htm index 339e11a73..95f58715e 100644 --- a/interface/web/mail/templates/mail_user_list.htm +++ b/interface/web/mail/templates/mail_user_list.htm @@ -35,22 +35,22 @@ - - - - - - + + + + + + - - + @@ -66,11 +66,11 @@ - - - - - + + + + + - + diff --git a/interface/web/mail/templates/mail_whitelist_list.htm b/interface/web/mail/templates/mail_whitelist_list.htm index 842420633..26d9f2dc7 100644 --- a/interface/web/mail/templates/mail_whitelist_list.htm +++ b/interface/web/mail/templates/mail_whitelist_list.htm @@ -16,14 +16,14 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="domain"} {tmpl_var name="transport"} {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
-
-
-
+
+
+
+
{tmpl_var name="name"}{tmpl_var name="autoresponder"}{tmpl_var name="postfix"}{tmpl_var name="disablesmtp"}{tmpl_var name="disableimap"}{tmpl_var name="disablepop3"}{tmpl_var name="autoresponder"}{tmpl_var name="postfix"}{tmpl_var name="disablesmtp"}{tmpl_var name="disableimap"}{tmpl_var name="disablepop3"} diff --git a/interface/web/mail/templates/mail_user_stats_list.htm b/interface/web/mail/templates/mail_user_stats_list.htm index f946bc3c6..f7412b771 100644 --- a/interface/web/mail/templates/mail_user_stats_list.htm +++ b/interface/web/mail/templates/mail_user_stats_list.htm @@ -14,7 +14,7 @@ {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
- + - + - + @@ -35,7 +35,7 @@ - + diff --git a/interface/web/mail/templates/spamfilter_blacklist_list.htm b/interface/web/mail/templates/spamfilter_blacklist_list.htm index 79745d9cc..f5eb87194 100644 --- a/interface/web/mail/templates/spamfilter_blacklist_list.htm +++ b/interface/web/mail/templates/spamfilter_blacklist_list.htm @@ -16,15 +16,15 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="source"} {tmpl_var name="type"}
- + - + - + @@ -37,7 +37,7 @@ - + diff --git a/interface/web/mail/templates/spamfilter_policy_list.htm b/interface/web/mail/templates/spamfilter_policy_list.htm index 1df9880be..45383a775 100644 --- a/interface/web/mail/templates/spamfilter_policy_list.htm +++ b/interface/web/mail/templates/spamfilter_policy_list.htm @@ -21,7 +21,7 @@ - + diff --git a/interface/web/mail/templates/spamfilter_users_list.htm b/interface/web/mail/templates/spamfilter_users_list.htm index b06c38f93..c3454c757 100644 --- a/interface/web/mail/templates/spamfilter_users_list.htm +++ b/interface/web/mail/templates/spamfilter_users_list.htm @@ -21,7 +21,7 @@ - + diff --git a/interface/web/mail/templates/spamfilter_whitelist_list.htm b/interface/web/mail/templates/spamfilter_whitelist_list.htm index 61eb8b5bf..7caf8ab7c 100644 --- a/interface/web/mail/templates/spamfilter_whitelist_list.htm +++ b/interface/web/mail/templates/spamfilter_whitelist_list.htm @@ -16,15 +16,15 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="priority"} {tmpl_var name="rid"} {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
- + - + - + @@ -37,7 +37,7 @@ - + diff --git a/interface/web/mail/templates/user_quota_stats_list.htm b/interface/web/mail/templates/user_quota_stats_list.htm index 78e387375..2def274bb 100644 --- a/interface/web/mail/templates/user_quota_stats_list.htm +++ b/interface/web/mail/templates/user_quota_stats_list.htm @@ -13,7 +13,7 @@ - + diff --git a/interface/web/monitor/templates/datalog_list.htm b/interface/web/monitor/templates/datalog_list.htm index 74bb1e202..e7e90c0da 100644 --- a/interface/web/monitor/templates/datalog_list.htm +++ b/interface/web/monitor/templates/datalog_list.htm @@ -13,7 +13,7 @@ - + diff --git a/interface/web/monitor/templates/syslog_list.htm b/interface/web/monitor/templates/syslog_list.htm index c7c968f97..7bf140540 100644 --- a/interface/web/monitor/templates/syslog_list.htm +++ b/interface/web/monitor/templates/syslog_list.htm @@ -13,7 +13,7 @@ - + diff --git a/interface/web/sites/templates/aps_instances_list.htm b/interface/web/sites/templates/aps_instances_list.htm index 50e9cc247..b67cf95f8 100644 --- a/interface/web/sites/templates/aps_instances_list.htm +++ b/interface/web/sites/templates/aps_instances_list.htm @@ -13,7 +13,7 @@ - + diff --git a/interface/web/sites/templates/aps_packages_list.htm b/interface/web/sites/templates/aps_packages_list.htm index 5e734accc..eb80c8698 100644 --- a/interface/web/sites/templates/aps_packages_list.htm +++ b/interface/web/sites/templates/aps_packages_list.htm @@ -12,7 +12,7 @@ - + diff --git a/interface/web/sites/templates/cron_list.htm b/interface/web/sites/templates/cron_list.htm index 92ff1bf29..66191418c 100644 --- a/interface/web/sites/templates/cron_list.htm +++ b/interface/web/sites/templates/cron_list.htm @@ -16,7 +16,7 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="priority"} {tmpl_var name="rid"} {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
  {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
  {tmpl_var name='install_location_txt'} {tmpl_var name='status_txt'}  
{tmpl_var name='status_txt'}   
- + @@ -25,10 +25,10 @@ - + - + @@ -45,7 +45,7 @@ - + diff --git a/interface/web/sites/templates/database_admin_list.htm b/interface/web/sites/templates/database_admin_list.htm index 7c0c33076..e16721dd6 100644 --- a/interface/web/sites/templates/database_admin_list.htm +++ b/interface/web/sites/templates/database_admin_list.htm @@ -15,19 +15,19 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} {tmpl_var name="run_min"}
- - + + - + - - + + @@ -42,8 +42,8 @@ - - + + diff --git a/interface/web/sites/templates/database_list.htm b/interface/web/sites/templates/database_list.htm index c00faaebf..a7fec3a8b 100644 --- a/interface/web/sites/templates/database_list.htm +++ b/interface/web/sites/templates/database_list.htm @@ -32,18 +32,18 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="remote_access"}{tmpl_var name="active"}{tmpl_var name="remote_access"} {tmpl_var name="type"} {tmpl_var name="sys_groupid"} {tmpl_var name="server_id"}
- - + + - + - - + + @@ -57,8 +57,8 @@ - - + + diff --git a/interface/web/sites/templates/database_quota_stats_list.htm b/interface/web/sites/templates/database_quota_stats_list.htm index 2fd32e575..1218225a5 100644 --- a/interface/web/sites/templates/database_quota_stats_list.htm +++ b/interface/web/sites/templates/database_quota_stats_list.htm @@ -13,7 +13,7 @@ + diff --git a/interface/web/sites/templates/database_user_admin_list.htm b/interface/web/sites/templates/database_user_admin_list.htm index 4a984e77b..4d1a91ed2 100644 --- a/interface/web/sites/templates/database_user_admin_list.htm +++ b/interface/web/sites/templates/database_user_admin_list.htm @@ -17,7 +17,7 @@ - + diff --git a/interface/web/sites/templates/database_user_list.htm b/interface/web/sites/templates/database_user_list.htm index b083279d5..b84513e5d 100644 --- a/interface/web/sites/templates/database_user_list.htm +++ b/interface/web/sites/templates/database_user_list.htm @@ -33,7 +33,7 @@ - + diff --git a/interface/web/sites/templates/ftp_user_list.htm b/interface/web/sites/templates/ftp_user_list.htm index 048350a40..b34650282 100644 --- a/interface/web/sites/templates/ftp_user_list.htm +++ b/interface/web/sites/templates/ftp_user_list.htm @@ -32,14 +32,14 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="remote_access"}{tmpl_var name="active"}{tmpl_var name="remote_access"} {tmpl_var name="type"} {tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} - {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
- + - + - + @@ -51,7 +51,7 @@ - + diff --git a/interface/web/sites/templates/shell_user_list.htm b/interface/web/sites/templates/shell_user_list.htm index a04469cb2..ce907e4e4 100644 --- a/interface/web/sites/templates/shell_user_list.htm +++ b/interface/web/sites/templates/shell_user_list.htm @@ -32,14 +32,14 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} {tmpl_var name="username"}
- + - + - + @@ -51,7 +51,7 @@ - + diff --git a/interface/web/sites/templates/user_quota_stats_list.htm b/interface/web/sites/templates/user_quota_stats_list.htm index 93109856e..26d0954e9 100644 --- a/interface/web/sites/templates/user_quota_stats_list.htm +++ b/interface/web/sites/templates/user_quota_stats_list.htm @@ -14,7 +14,7 @@ - + diff --git a/interface/web/sites/templates/web_backup_list.htm b/interface/web/sites/templates/web_backup_list.htm index e46eda6d8..b47a6668d 100644 --- a/interface/web/sites/templates/web_backup_list.htm +++ b/interface/web/sites/templates/web_backup_list.htm @@ -16,7 +16,7 @@ - + diff --git a/interface/web/sites/templates/web_childdomain_list.htm b/interface/web/sites/templates/web_childdomain_list.htm index bb5ab5249..b6b97800a 100644 --- a/interface/web/sites/templates/web_childdomain_list.htm +++ b/interface/web/sites/templates/web_childdomain_list.htm @@ -32,14 +32,14 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} {tmpl_var name="username"} {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
- + - + - + @@ -51,7 +51,7 @@ - + diff --git a/interface/web/sites/templates/web_folder_list.htm b/interface/web/sites/templates/web_folder_list.htm index 07c555658..8b523f7b5 100644 --- a/interface/web/sites/templates/web_folder_list.htm +++ b/interface/web/sites/templates/web_folder_list.htm @@ -31,14 +31,14 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} {tmpl_var name="domain"}
- + - + - + @@ -50,7 +50,7 @@ - + diff --git a/interface/web/sites/templates/web_folder_user_list.htm b/interface/web/sites/templates/web_folder_user_list.htm index 6c4f53a3a..c80778bb3 100644 --- a/interface/web/sites/templates/web_folder_user_list.htm +++ b/interface/web/sites/templates/web_folder_user_list.htm @@ -31,13 +31,13 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} {tmpl_var name="path"}
- + - + - + - + - + diff --git a/interface/web/sites/templates/web_vhost_domain_admin_list.htm b/interface/web/sites/templates/web_vhost_domain_admin_list.htm index 945b79e71..e40b8a55c 100644 --- a/interface/web/sites/templates/web_vhost_domain_admin_list.htm +++ b/interface/web/sites/templates/web_vhost_domain_admin_list.htm @@ -16,16 +16,16 @@ - + - + - + @@ -39,7 +39,7 @@ - + diff --git a/interface/web/sites/templates/web_vhost_domain_list.htm b/interface/web/sites/templates/web_vhost_domain_list.htm index 116b5af12..0e11ba76e 100644 --- a/interface/web/sites/templates/web_vhost_domain_list.htm +++ b/interface/web/sites/templates/web_vhost_domain_list.htm @@ -33,15 +33,15 @@ - + - + - + @@ -54,7 +54,7 @@ - + diff --git a/interface/web/sites/templates/webdav_user_list.htm b/interface/web/sites/templates/webdav_user_list.htm index 5e7b5132b..c4f0bc9a9 100644 --- a/interface/web/sites/templates/webdav_user_list.htm +++ b/interface/web/sites/templates/webdav_user_list.htm @@ -32,14 +32,14 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
@@ -48,7 +48,7 @@
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="web_folder_id"} {tmpl_var name="username"} diff --git a/interface/web/sites/templates/web_sites_stats_list.htm b/interface/web/sites/templates/web_sites_stats_list.htm index c771276d1..2b8651610 100644 --- a/interface/web/sites/templates/web_sites_stats_list.htm +++ b/interface/web/sites/templates/web_sites_stats_list.htm @@ -14,7 +14,7 @@ {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="domain_id"}{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="sys_groupid"} {tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="domain_id"}{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} {tmpl_var name="domain"}
- + - + - + @@ -51,7 +51,7 @@ - + diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css index cb33002ec..a0fa9e4b9 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css @@ -260,6 +260,12 @@ thead.dark th { line-height: 40px; font-weight: normal; } +thead.dark th.small-col { + width: 14%; } + +thead.dark th.tiny-col { + width: 7%; } + thead.dark td input, thead.dark td select { width: 100%; } diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.min.css b/interface/web/themes/default/assets/stylesheets/ispconfig.min.css index cfa1c3554..6f70dc1fd 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.min.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.min.css @@ -1 +1 @@ -body{overflow-y:scroll}.left{float:left}.right{float:right}.clear:after{content:"";display:table;clear:both}.marginTop15{margin-top:15px}.paddingX5{padding-left:5px!important;padding-right:5px!important}.width65{width:65px}.form-group input[type='checkbox']{margin-top:10px}.control-label{font-weight:normal}.control-label:after{content:":"}.formbutton-default{padding:6px 30px;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-success,.formbutton-danger{padding:6px 30px;border-style:solid;border-width:1px;border-bottom-width:solid;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-narrow{padding:6px 8px;margin-left:2px;margin-right:2px}.formbutton-narrower{padding:4px 6px}#main-wrapper{margin:0 auto;width:95%;max-width:1260px}#logo{float:left;width:200px;height:65px;background:url("../images/logo.png") no-repeat}#logo a{display:block;width:100%;height:100%}#headerbar{float:right}#searchform{float:right;margin-top:16px}#searchform>div{position:relative;display:table}#searchform>div>div{display:table-cell;padding-right:8px;vertical-align:top}#searchform .icon{padding:0 2px;font-size:16px}#logout-button{float:right;margin-top:16px;margin-left:25px;border-bottom-style:solid;border-bottom-width:2px;transition:all ease 500ms}#main-navigation{margin-top:24px}#main-navigation a{padding:0 12px;height:70px;border-bottom-style:solid;botder-bottom-width:2px;transition:all ease 500ms}#main-navigation .icon{font-size:32px}#main-navigation .title{margin-top:2px;font-weight:bold}.btn-group-justified .btn{border-right-width:0}.btn-group-justified .btn:last-of-type{border-right-width:1px}#content{width:78%}#sidebar{margin-top:27px;width:18%;border-style:solid;border-width:1px;border-radius:4px}#sidebar header{margin:1px;padding:0 10px;height:40px;line-height:40px;font-weight:bold;border-top-left-radius:2px;border-top-right-radius:2px}#sidebar ul{margin:0;padding:0;list-style:none}#sidebar li{padding:10px;border-top-style:solid;border-top-width:1px;font-size:12px}#sidebar a{text-decoration:none;transition:color ease 500ms}.page-header{margin:20px 0;padding:0}.alert-notification a{font-weight:bold;text-decoration:none;transition:color ease 500ms}.alert-label,.alert-content{display:inline-block;vertical-align:top}.alert-label{width:60px}.modules{margin:0;padding:0;list-style:none}.modules li{float:left;margin-right:15px;margin-bottom:15px;padding:8px;width:200px;border-radius:4px;border-style:solid;border-width:1px}.modules .icon{float:left;margin-right:15px;font-size:50px}.modules .left{margin-top:5px}.modules .title{margin-top:6px;margin-left:20px;font-size:16px;font-weight:bold}.modules .button{margin-top:10px;width:100%;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.modules a{text-decoration:none}.table-wrapper{margin-bottom:20px;border-radius:4px;border-style:solid;border-width:1px}.table{table-layout:fixed;margin-bottom:1px}.table caption{padding:5px 10px;text-align:left;font-weight:bold;font-size:18px;border-bottom-style:solid;border-bottom-width:1px}.table tbody tr{border-top-style:solid;border-top-width:1px;transition:background ease 500ms}.table tbody tr:last-child{border-radius:4px}.tfooter{margin-top:-1px;height:40px;border-top-style:solid;border-top-width:1px}.pagination{margin:10px 0}.progress{display:inline-block;margin-bottom:0;width:150px;height:10px}.content-tab-wrapper{border-style:solid;border-width:1px;border-radius:4px}.content-tab-wrapper .nav-tabs>li>a{border-radius:0;border:none!important;border-right-style:solid!important;border-right-width:1px!important;outline:0;font-weight:bold;transition:background ease 500ms}.content-tab-wrapper .nav-tabs li:not(:first-child) a{margin-left:-2px}.tab-content{padding:25px 10px}.input-group-btn .icon-calendar{font-size:18px}thead.dark th{height:40px;line-height:40px;font-weight:normal}thead.dark td input,thead.dark td select{width:100%}#footer{margin:20px 0;padding-top:20px;border-top-style:solid;border-top-width:1px;text-align:center;font-size:10px}.menu-btn{display:none;cursor:pointer}.df-container,.gs-container{position:relative}.gs-container:after{content:"";display:table;clear:both}ul.df-resultbox,ul.gs-resultbox{display:block;position:absolute;left:0;top:100%;margin:0;padding:0 0 10px;min-width:250px;max-width:500px;z-index:999999;background:#fff;list-style:none;box-shadow:2px 2px 5px #c5c5c5;border-radius:5px}ul.df-resultbox li,ul.gs-resultbox li{float:none;display:block;cursor:pointer;padding:0 10px}ul.gs-resultbox li{padding:3px 10px;line-height:1.1;font-size:.9em}ul.df-resultbox li:nth-child(even),ul.gs-resultbox li:nth-child(even){background:#f2f5f7}ul.df-resultbox li.df-cheader,ul.gs-resultbox li.gs-cheader{background:#fff;padding-top:10px;margin-bottom:10px}ul.df-resultbox li p,ul.gs-resultbox li p{margin-bottom:0;color:inherit}ul.df-resultbox li.df-cheader p.df-cheader-title,ul.gs-resultbox li.gs-cheader p.gs-cheader-title{font-weight:bold;margin-bottom:0}ul.df-resultbox li.df-cheader p.df-cheader-limit,ul.gs-resultbox li.gs-cheader p.gs-cheader-limit{font-weight:normal}ul.df-resultbox li.df-cdata img,ul.gs-resultbox li.gs-cdata img{margin-right:12px}ul.df-resultbox li.df-cdata p span.df-cdata-title,ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{font-weight:bold}ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{display:block}ul.df-resultbox li:first-child,ul.gs-resultbox li:first-child{border-top-left-radius:5px;border-top-right-radius:5px}ul.df-resultbox li:last-child,ul.gs-resultbox li:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#logo{background-image:url("../images/logo@2x.png");background-size:200px 65px}} \ No newline at end of file +body{overflow-y:scroll}.left{float:left}.right{float:right}.clear:after{content:"";display:table;clear:both}.marginTop15{margin-top:15px}.paddingX5{padding-left:5px!important;padding-right:5px!important}.width65{width:65px}.form-group input[type='checkbox']{margin-top:10px}.control-label{font-weight:normal}.control-label:after{content:":"}.formbutton-default{padding:6px 30px;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-success,.formbutton-danger{padding:6px 30px;border-style:solid;border-width:1px;border-bottom-width:solid;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-narrow{padding:6px 8px;margin-left:2px;margin-right:2px}.formbutton-narrower{padding:4px 6px}#main-wrapper{margin:0 auto;width:95%;max-width:1260px}#logo{float:left;width:200px;height:65px;background:url("../images/logo.png") no-repeat}#logo a{display:block;width:100%;height:100%}#headerbar{float:right}#searchform{float:right;margin-top:16px}#searchform>div{position:relative;display:table}#searchform>div>div{display:table-cell;padding-right:8px;vertical-align:top}#searchform .icon{padding:0 2px;font-size:16px}#logout-button{float:right;margin-top:16px;margin-left:25px;border-bottom-style:solid;border-bottom-width:2px;transition:all ease 500ms}#main-navigation{margin-top:24px}#main-navigation a{padding:0 12px;height:70px;border-bottom-style:solid;botder-bottom-width:2px;transition:all ease 500ms}#main-navigation .icon{font-size:32px}#main-navigation .title{margin-top:2px;font-weight:bold}.btn-group-justified .btn{border-right-width:0}.btn-group-justified .btn:last-of-type{border-right-width:1px}#content{width:78%}#sidebar{margin-top:27px;width:18%;border-style:solid;border-width:1px;border-radius:4px}#sidebar header{margin:1px;padding:0 10px;height:40px;line-height:40px;font-weight:bold;border-top-left-radius:2px;border-top-right-radius:2px}#sidebar ul{margin:0;padding:0;list-style:none}#sidebar li{padding:10px;border-top-style:solid;border-top-width:1px;font-size:12px}#sidebar a{text-decoration:none;transition:color ease 500ms}.page-header{margin:20px 0;padding:0}.alert-notification a{font-weight:bold;text-decoration:none;transition:color ease 500ms}.alert-label,.alert-content{display:inline-block;vertical-align:top}.alert-label{width:60px}.modules{margin:0;padding:0;list-style:none}.modules li{float:left;margin-right:15px;margin-bottom:15px;padding:8px;width:200px;border-radius:4px;border-style:solid;border-width:1px}.modules .icon{float:left;margin-right:15px;font-size:50px}.modules .left{margin-top:5px}.modules .title{margin-top:6px;margin-left:20px;font-size:16px;font-weight:bold}.modules .button{margin-top:10px;width:100%;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.modules a{text-decoration:none}.table-wrapper{margin-bottom:20px;border-radius:4px;border-style:solid;border-width:1px}.table{table-layout:fixed;margin-bottom:1px}.table caption{padding:5px 10px;text-align:left;font-weight:bold;font-size:18px;border-bottom-style:solid;border-bottom-width:1px}.table tbody tr{border-top-style:solid;border-top-width:1px;transition:background ease 500ms}.table tbody tr:last-child{border-radius:4px}.tfooter{margin-top:-1px;height:40px;border-top-style:solid;border-top-width:1px}.pagination{margin:10px 0}.progress{display:inline-block;margin-bottom:0;width:150px;height:10px}.content-tab-wrapper{border-style:solid;border-width:1px;border-radius:4px}.content-tab-wrapper .nav-tabs>li>a{border-radius:0;border:none!important;border-right-style:solid!important;border-right-width:1px!important;outline:0;font-weight:bold;transition:background ease 500ms}.content-tab-wrapper .nav-tabs li:not(:first-child) a{margin-left:-2px}.tab-content{padding:25px 10px}.input-group-btn .icon-calendar{font-size:18px}thead.dark th{height:40px;line-height:40px;font-weight:normal}thead.dark th.small-col{width:14%}thead.dark th.tiny-col{width:7%}thead.dark td input,thead.dark td select{width:100%}#footer{margin:20px 0;padding-top:20px;border-top-style:solid;border-top-width:1px;text-align:center;font-size:10px}.menu-btn{display:none;cursor:pointer}.df-container,.gs-container{position:relative}.gs-container:after{content:"";display:table;clear:both}ul.df-resultbox,ul.gs-resultbox{display:block;position:absolute;left:0;top:100%;margin:0;padding:0 0 10px;min-width:250px;max-width:500px;z-index:999999;background:#fff;list-style:none;box-shadow:2px 2px 5px #c5c5c5;border-radius:5px}ul.df-resultbox li,ul.gs-resultbox li{float:none;display:block;cursor:pointer;padding:0 10px}ul.gs-resultbox li{padding:3px 10px;line-height:1.1;font-size:.9em}ul.df-resultbox li:nth-child(even),ul.gs-resultbox li:nth-child(even){background:#f2f5f7}ul.df-resultbox li.df-cheader,ul.gs-resultbox li.gs-cheader{background:#fff;padding-top:10px;margin-bottom:10px}ul.df-resultbox li p,ul.gs-resultbox li p{margin-bottom:0;color:inherit}ul.df-resultbox li.df-cheader p.df-cheader-title,ul.gs-resultbox li.gs-cheader p.gs-cheader-title{font-weight:bold;margin-bottom:0}ul.df-resultbox li.df-cheader p.df-cheader-limit,ul.gs-resultbox li.gs-cheader p.gs-cheader-limit{font-weight:normal}ul.df-resultbox li.df-cdata img,ul.gs-resultbox li.gs-cdata img{margin-right:12px}ul.df-resultbox li.df-cdata p span.df-cdata-title,ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{font-weight:bold}ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{display:block}ul.df-resultbox li:first-child,ul.gs-resultbox li:first-child{border-top-left-radius:5px;border-top-right-radius:5px}ul.df-resultbox li:last-child,ul.gs-resultbox li:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#logo{background-image:url("../images/logo@2x.png");background-size:200px 65px}} \ No newline at end of file diff --git a/interface/web/vm/templates/openvz_ip_list.htm b/interface/web/vm/templates/openvz_ip_list.htm index a5d5f8b37..f51581710 100644 --- a/interface/web/vm/templates/openvz_ip_list.htm +++ b/interface/web/vm/templates/openvz_ip_list.htm @@ -19,7 +19,7 @@ - + diff --git a/interface/web/vm/templates/openvz_ostemplate_list.htm b/interface/web/vm/templates/openvz_ostemplate_list.htm index d01bd1eb7..26313ca83 100644 --- a/interface/web/vm/templates/openvz_ostemplate_list.htm +++ b/interface/web/vm/templates/openvz_ostemplate_list.htm @@ -15,15 +15,15 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} {tmpl_var name="username"} {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
- + - + - + @@ -36,7 +36,7 @@ - + diff --git a/interface/web/vm/templates/openvz_template_list.htm b/interface/web/vm/templates/openvz_template_list.htm index 0942c37f2..3585e8bc8 100644 --- a/interface/web/vm/templates/openvz_template_list.htm +++ b/interface/web/vm/templates/openvz_template_list.htm @@ -15,12 +15,12 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="ostemplate_id"} {tmpl_var name="template_name"} {tmpl_var name="server_id"}
- + - + - + - + - + - + - + @@ -41,7 +41,7 @@ - + -- GitLab From f36346d45a8f1bc90fe852df78547795c6f8f64f Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 8 Jan 2015 10:41:05 +0100 Subject: [PATCH 065/287] - Layout fixes (column width and alignment) --- .../admin/templates/directive_snippets_list.htm | 8 ++++---- interface/web/admin/templates/firewall_list.htm | 8 ++++---- interface/web/admin/templates/groups_list.htm | 6 +++--- interface/web/admin/templates/iptables_list.htm | 8 ++++---- interface/web/admin/templates/language_list.htm | 2 +- .../web/admin/templates/remote_user_list.htm | 6 +++--- .../web/admin/templates/server_config_list.htm | 6 +++--- interface/web/admin/templates/server_ip_list.htm | 6 +++--- interface/web/admin/templates/server_list.htm | 6 +++--- .../web/admin/templates/server_php_list.htm | 6 +++--- .../admin/templates/software_package_list.htm | 4 ++-- .../web/admin/templates/software_repo_list.htm | 8 ++++---- interface/web/admin/templates/users_list.htm | 8 ++++---- .../web/client/templates/client_circle_list.htm | 8 ++++---- .../templates/client_message_template_list.htm | 6 +++--- .../client/templates/client_template_list.htm | 6 +++--- interface/web/client/templates/clients_list.htm | 6 +++--- interface/web/client/templates/domain_list.htm | 6 +++--- .../client/templates/message_template_list.htm | 6 +++--- .../web/client/templates/resellers_list.htm | 6 +++--- interface/web/dns/templates/dns_a_list.htm | 8 ++++---- .../web/dns/templates/dns_slave_admin_list.htm | 8 ++++---- interface/web/dns/templates/dns_slave_list.htm | 8 ++++---- .../web/dns/templates/dns_soa_admin_list.htm | 8 ++++---- interface/web/dns/templates/dns_soa_list.htm | 8 ++++---- .../web/dns/templates/dns_template_list.htm | 6 +++--- .../help/templates/faq_manage_questions_list.htm | 8 ++++---- .../help/templates/help_faq_sections_list.htm | 8 ++++---- .../web/help/templates/support_message_list.htm | 6 +++--- interface/web/mail/templates/mail_alias_list.htm | 8 ++++---- .../web/mail/templates/mail_aliasdomain_list.htm | 8 ++++---- .../web/mail/templates/mail_blacklist_list.htm | 8 ++++---- .../mail/templates/mail_content_filter_list.htm | 8 ++++---- .../mail/templates/mail_domain_admin_list.htm | 8 ++++---- .../mail/templates/mail_domain_catchall_list.htm | 8 ++++---- .../web/mail/templates/mail_domain_list.htm | 8 ++++---- .../web/mail/templates/mail_forward_list.htm | 8 ++++---- interface/web/mail/templates/mail_get_list.htm | 8 ++++---- .../web/mail/templates/mail_mailinglist_list.htm | 6 +++--- .../mail/templates/mail_relay_recipient_list.htm | 8 ++++---- .../web/mail/templates/mail_transport_list.htm | 8 ++++---- .../web/mail/templates/mail_user_backup_list.htm | 4 ++-- .../web/mail/templates/mail_user_filter_list.htm | 6 +++--- interface/web/mail/templates/mail_user_list.htm | 16 ++++++++-------- .../web/mail/templates/mail_user_stats_list.htm | 6 +++--- .../web/mail/templates/mail_whitelist_list.htm | 8 ++++---- .../mail/templates/spamfilter_blacklist_list.htm | 8 ++++---- .../mail/templates/spamfilter_config_list.htm | 6 +++--- .../mail/templates/spamfilter_policy_list.htm | 6 +++--- .../web/mail/templates/spamfilter_users_list.htm | 6 +++--- .../mail/templates/spamfilter_whitelist_list.htm | 8 ++++---- .../web/mail/templates/user_quota_stats_list.htm | 6 +++--- .../mailuser/templates/mail_user_filter_list.htm | 6 +++--- interface/web/monitor/templates/datalog_list.htm | 6 +++--- interface/web/monitor/templates/syslog_list.htm | 6 +++--- .../web/sites/templates/aps_instances_list.htm | 6 +++--- .../web/sites/templates/aps_packages_list.htm | 6 +++--- interface/web/sites/templates/cron_list.htm | 8 ++++---- .../web/sites/templates/database_admin_list.htm | 10 +++++----- interface/web/sites/templates/database_list.htm | 10 +++++----- .../templates/database_quota_stats_list.htm | 6 +++--- .../sites/templates/database_user_admin_list.htm | 6 +++--- .../web/sites/templates/database_user_list.htm | 6 +++--- interface/web/sites/templates/ftp_user_list.htm | 8 ++++---- .../web/sites/templates/shell_user_list.htm | 8 ++++---- .../sites/templates/user_quota_stats_list.htm | 6 +++--- .../web/sites/templates/web_backup_list.htm | 4 ++-- .../web/sites/templates/web_childdomain_list.htm | 8 ++++---- .../web/sites/templates/web_folder_list.htm | 8 ++++---- .../web/sites/templates/web_folder_user_list.htm | 8 ++++---- .../web/sites/templates/web_sites_stats_list.htm | 8 ++++---- .../templates/web_vhost_domain_admin_list.htm | 11 ++++++----- .../sites/templates/web_vhost_domain_list.htm | 11 ++++++----- .../web/sites/templates/webdav_user_list.htm | 8 ++++---- .../default/assets/stylesheets/ispconfig.css | 4 +++- .../default/assets/stylesheets/ispconfig.min.css | 2 +- interface/web/vm/templates/openvz_ip_list.htm | 6 +++--- .../web/vm/templates/openvz_ostemplate_list.htm | 8 ++++---- .../web/vm/templates/openvz_template_list.htm | 8 ++++---- interface/web/vm/templates/openvz_vm_list.htm | 8 ++++---- 80 files changed, 286 insertions(+), 282 deletions(-) diff --git a/interface/web/admin/templates/directive_snippets_list.htm b/interface/web/admin/templates/directive_snippets_list.htm index c1ac201f0..8b7077fa5 100644 --- a/interface/web/admin/templates/directive_snippets_list.htm +++ b/interface/web/admin/templates/directive_snippets_list.htm @@ -19,13 +19,13 @@ - + - + - @@ -36,7 +36,7 @@ - diff --git a/interface/web/admin/templates/firewall_list.htm b/interface/web/admin/templates/firewall_list.htm index 2a6836c39..f4f1f753e 100644 --- a/interface/web/admin/templates/firewall_list.htm +++ b/interface/web/admin/templates/firewall_list.htm @@ -20,14 +20,14 @@ - + - + - @@ -39,7 +39,7 @@ - diff --git a/interface/web/admin/templates/groups_list.htm b/interface/web/admin/templates/groups_list.htm index 3478b87a3..03b69ea45 100644 --- a/interface/web/admin/templates/groups_list.htm +++ b/interface/web/admin/templates/groups_list.htm @@ -19,12 +19,12 @@ - + - @@ -34,7 +34,7 @@ - diff --git a/interface/web/admin/templates/iptables_list.htm b/interface/web/admin/templates/iptables_list.htm index 3fb85567d..2e9595757 100644 --- a/interface/web/admin/templates/iptables_list.htm +++ b/interface/web/admin/templates/iptables_list.htm @@ -23,10 +23,10 @@ - + - + @@ -34,7 +34,7 @@ - @@ -50,7 +50,7 @@ - diff --git a/interface/web/admin/templates/language_list.htm b/interface/web/admin/templates/language_list.htm index e2ac1342b..1e89b50b6 100644 --- a/interface/web/admin/templates/language_list.htm +++ b/interface/web/admin/templates/language_list.htm @@ -24,7 +24,7 @@ - + diff --git a/interface/web/admin/templates/remote_user_list.htm b/interface/web/admin/templates/remote_user_list.htm index 3c0e0e955..fddb78232 100644 --- a/interface/web/admin/templates/remote_user_list.htm +++ b/interface/web/admin/templates/remote_user_list.htm @@ -17,12 +17,12 @@ - + - @@ -32,7 +32,7 @@ - diff --git a/interface/web/admin/templates/server_config_list.htm b/interface/web/admin/templates/server_config_list.htm index 2bf40cd7b..2bfb08f5c 100644 --- a/interface/web/admin/templates/server_config_list.htm +++ b/interface/web/admin/templates/server_config_list.htm @@ -10,11 +10,11 @@ - + - @@ -23,7 +23,7 @@ - diff --git a/interface/web/admin/templates/server_ip_list.htm b/interface/web/admin/templates/server_ip_list.htm index 0ec6ddbdc..512f65791 100644 --- a/interface/web/admin/templates/server_ip_list.htm +++ b/interface/web/admin/templates/server_ip_list.htm @@ -21,7 +21,7 @@ - + @@ -30,7 +30,7 @@ - @@ -44,7 +44,7 @@ - diff --git a/interface/web/admin/templates/server_list.htm b/interface/web/admin/templates/server_list.htm index 0c7522eec..c40f51915 100644 --- a/interface/web/admin/templates/server_list.htm +++ b/interface/web/admin/templates/server_list.htm @@ -16,7 +16,7 @@ - + @@ -26,7 +26,7 @@ - @@ -41,7 +41,7 @@ - diff --git a/interface/web/admin/templates/server_php_list.htm b/interface/web/admin/templates/server_php_list.htm index 3151a827f..56047cf96 100644 --- a/interface/web/admin/templates/server_php_list.htm +++ b/interface/web/admin/templates/server_php_list.htm @@ -18,13 +18,13 @@ - + - @@ -35,7 +35,7 @@ - diff --git a/interface/web/admin/templates/software_package_list.htm b/interface/web/admin/templates/software_package_list.htm index dd9abee57..2f833c980 100644 --- a/interface/web/admin/templates/software_package_list.htm +++ b/interface/web/admin/templates/software_package_list.htm @@ -20,7 +20,7 @@ - + @@ -31,7 +31,7 @@ - diff --git a/interface/web/admin/templates/software_repo_list.htm b/interface/web/admin/templates/software_repo_list.htm index 3076b792b..dcdba6122 100644 --- a/interface/web/admin/templates/software_repo_list.htm +++ b/interface/web/admin/templates/software_repo_list.htm @@ -19,13 +19,13 @@ - + - + - @@ -36,7 +36,7 @@ - diff --git a/interface/web/admin/templates/users_list.htm b/interface/web/admin/templates/users_list.htm index 2562f46dc..16100cc07 100644 --- a/interface/web/admin/templates/users_list.htm +++ b/interface/web/admin/templates/users_list.htm @@ -21,14 +21,14 @@ - + - + - @@ -40,7 +40,7 @@ - - + - + - @@ -39,7 +39,7 @@ - diff --git a/interface/web/client/templates/client_message_template_list.htm b/interface/web/client/templates/client_message_template_list.htm index a7ab5cd2a..e70ba1a63 100644 --- a/interface/web/client/templates/client_message_template_list.htm +++ b/interface/web/client/templates/client_message_template_list.htm @@ -17,12 +17,12 @@ - + - + @@ -30,7 +30,7 @@ - - + - @@ -36,7 +36,7 @@ - diff --git a/interface/web/client/templates/clients_list.htm b/interface/web/client/templates/clients_list.htm index c3b952094..6a1e37e35 100644 --- a/interface/web/client/templates/clients_list.htm +++ b/interface/web/client/templates/clients_list.htm @@ -23,7 +23,7 @@ - + @@ -33,7 +33,7 @@ - @@ -48,7 +48,7 @@ - - + - + @@ -31,7 +31,7 @@ - diff --git a/interface/web/client/templates/message_template_list.htm b/interface/web/client/templates/message_template_list.htm index 869645955..bbbe1e030 100644 --- a/interface/web/client/templates/message_template_list.htm +++ b/interface/web/client/templates/message_template_list.htm @@ -17,12 +17,12 @@ - + - + @@ -30,7 +30,7 @@ - - + @@ -33,7 +33,7 @@ - @@ -48,7 +48,7 @@ - diff --git a/interface/web/dns/templates/dns_a_list.htm b/interface/web/dns/templates/dns_a_list.htm index aa0e1da8b..edba1ae9d 100644 --- a/interface/web/dns/templates/dns_a_list.htm +++ b/interface/web/dns/templates/dns_a_list.htm @@ -45,16 +45,16 @@ - + - + - @@ -68,7 +68,7 @@ - diff --git a/interface/web/dns/templates/dns_slave_admin_list.htm b/interface/web/dns/templates/dns_slave_admin_list.htm index 4eb0a2681..50fd84b6b 100644 --- a/interface/web/dns/templates/dns_slave_admin_list.htm +++ b/interface/web/dns/templates/dns_slave_admin_list.htm @@ -37,15 +37,15 @@ - + - + - @@ -58,7 +58,7 @@ - diff --git a/interface/web/dns/templates/dns_slave_list.htm b/interface/web/dns/templates/dns_slave_list.htm index d7a9d63d7..2c1039f43 100644 --- a/interface/web/dns/templates/dns_slave_list.htm +++ b/interface/web/dns/templates/dns_slave_list.htm @@ -36,14 +36,14 @@ - + - + - @@ -55,7 +55,7 @@ - diff --git a/interface/web/dns/templates/dns_soa_admin_list.htm b/interface/web/dns/templates/dns_soa_admin_list.htm index f32854bb7..9063e99c6 100644 --- a/interface/web/dns/templates/dns_soa_admin_list.htm +++ b/interface/web/dns/templates/dns_soa_admin_list.htm @@ -40,16 +40,16 @@ - + - + - @@ -63,7 +63,7 @@ - diff --git a/interface/web/dns/templates/dns_soa_list.htm b/interface/web/dns/templates/dns_soa_list.htm index ad997013f..a0b5a2fe7 100644 --- a/interface/web/dns/templates/dns_soa_list.htm +++ b/interface/web/dns/templates/dns_soa_list.htm @@ -39,15 +39,15 @@ - + - + - @@ -60,7 +60,7 @@ - diff --git a/interface/web/dns/templates/dns_template_list.htm b/interface/web/dns/templates/dns_template_list.htm index 3f78c507b..f9a8be1ac 100644 --- a/interface/web/dns/templates/dns_template_list.htm +++ b/interface/web/dns/templates/dns_template_list.htm @@ -18,12 +18,12 @@ - + - @@ -33,7 +33,7 @@ - diff --git a/interface/web/help/templates/faq_manage_questions_list.htm b/interface/web/help/templates/faq_manage_questions_list.htm index 2de35d29c..843141fd9 100644 --- a/interface/web/help/templates/faq_manage_questions_list.htm +++ b/interface/web/help/templates/faq_manage_questions_list.htm @@ -14,8 +14,8 @@ - - + + @@ -23,10 +23,10 @@ - - diff --git a/interface/web/help/templates/help_faq_sections_list.htm b/interface/web/help/templates/help_faq_sections_list.htm index 906237e9a..a24c84ad9 100644 --- a/interface/web/help/templates/help_faq_sections_list.htm +++ b/interface/web/help/templates/help_faq_sections_list.htm @@ -17,18 +17,18 @@ - - + + - - diff --git a/interface/web/help/templates/support_message_list.htm b/interface/web/help/templates/support_message_list.htm index c97a00b7b..1c6434c7d 100644 --- a/interface/web/help/templates/support_message_list.htm +++ b/interface/web/help/templates/support_message_list.htm @@ -19,13 +19,13 @@ - + - @@ -36,7 +36,7 @@ - diff --git a/interface/web/mail/templates/mail_alias_list.htm b/interface/web/mail/templates/mail_alias_list.htm index 60d18d1c9..c03cb7296 100644 --- a/interface/web/mail/templates/mail_alias_list.htm +++ b/interface/web/mail/templates/mail_alias_list.htm @@ -35,13 +35,13 @@ - + - + - @@ -52,7 +52,7 @@ - diff --git a/interface/web/mail/templates/mail_aliasdomain_list.htm b/interface/web/mail/templates/mail_aliasdomain_list.htm index 209a43134..3da4474f2 100644 --- a/interface/web/mail/templates/mail_aliasdomain_list.htm +++ b/interface/web/mail/templates/mail_aliasdomain_list.htm @@ -35,13 +35,13 @@ - + - + - @@ -52,7 +52,7 @@ - diff --git a/interface/web/mail/templates/mail_blacklist_list.htm b/interface/web/mail/templates/mail_blacklist_list.htm index 60b923140..965f95fef 100644 --- a/interface/web/mail/templates/mail_blacklist_list.htm +++ b/interface/web/mail/templates/mail_blacklist_list.htm @@ -36,14 +36,14 @@ - + - + - @@ -55,7 +55,7 @@ - diff --git a/interface/web/mail/templates/mail_content_filter_list.htm b/interface/web/mail/templates/mail_content_filter_list.htm index 90191cf58..d5bcf60ef 100644 --- a/interface/web/mail/templates/mail_content_filter_list.htm +++ b/interface/web/mail/templates/mail_content_filter_list.htm @@ -36,14 +36,14 @@ - + - + - @@ -55,7 +55,7 @@ - diff --git a/interface/web/mail/templates/mail_domain_admin_list.htm b/interface/web/mail/templates/mail_domain_admin_list.htm index bd2a9f920..699c9e935 100644 --- a/interface/web/mail/templates/mail_domain_admin_list.htm +++ b/interface/web/mail/templates/mail_domain_admin_list.htm @@ -19,14 +19,14 @@ - + - + - @@ -38,7 +38,7 @@ - diff --git a/interface/web/mail/templates/mail_domain_catchall_list.htm b/interface/web/mail/templates/mail_domain_catchall_list.htm index 6452f7156..de6d0e7e7 100644 --- a/interface/web/mail/templates/mail_domain_catchall_list.htm +++ b/interface/web/mail/templates/mail_domain_catchall_list.htm @@ -35,13 +35,13 @@ - + - + - @@ -52,7 +52,7 @@ - diff --git a/interface/web/mail/templates/mail_domain_list.htm b/interface/web/mail/templates/mail_domain_list.htm index 011fcd598..2daccf2c0 100644 --- a/interface/web/mail/templates/mail_domain_list.htm +++ b/interface/web/mail/templates/mail_domain_list.htm @@ -35,13 +35,13 @@ - + - + - @@ -52,7 +52,7 @@ - diff --git a/interface/web/mail/templates/mail_forward_list.htm b/interface/web/mail/templates/mail_forward_list.htm index 6f6d171a3..dfa60b592 100644 --- a/interface/web/mail/templates/mail_forward_list.htm +++ b/interface/web/mail/templates/mail_forward_list.htm @@ -35,13 +35,13 @@ - + - + - @@ -52,7 +52,7 @@ - diff --git a/interface/web/mail/templates/mail_get_list.htm b/interface/web/mail/templates/mail_get_list.htm index aae94b719..b246d6280 100644 --- a/interface/web/mail/templates/mail_get_list.htm +++ b/interface/web/mail/templates/mail_get_list.htm @@ -37,15 +37,15 @@ - + - + - @@ -58,7 +58,7 @@ - diff --git a/interface/web/mail/templates/mail_mailinglist_list.htm b/interface/web/mail/templates/mail_mailinglist_list.htm index 4b175e753..2deb59d7c 100644 --- a/interface/web/mail/templates/mail_mailinglist_list.htm +++ b/interface/web/mail/templates/mail_mailinglist_list.htm @@ -33,12 +33,12 @@ - + - @@ -48,7 +48,7 @@ - - + - + - @@ -51,7 +51,7 @@ - diff --git a/interface/web/mail/templates/mail_transport_list.htm b/interface/web/mail/templates/mail_transport_list.htm index 8b64a3827..311c150e0 100644 --- a/interface/web/mail/templates/mail_transport_list.htm +++ b/interface/web/mail/templates/mail_transport_list.htm @@ -37,15 +37,15 @@ - + - + - @@ -58,7 +58,7 @@ - diff --git a/interface/web/mail/templates/mail_user_backup_list.htm b/interface/web/mail/templates/mail_user_backup_list.htm index da78f2706..9fd42a04d 100644 --- a/interface/web/mail/templates/mail_user_backup_list.htm +++ b/interface/web/mail/templates/mail_user_backup_list.htm @@ -15,7 +15,7 @@ - + @@ -24,7 +24,7 @@ - diff --git a/interface/web/monitor/templates/syslog_list.htm b/interface/web/monitor/templates/syslog_list.htm index 7bf140540..a4203393a 100644 --- a/interface/web/monitor/templates/syslog_list.htm +++ b/interface/web/monitor/templates/syslog_list.htm @@ -13,14 +13,14 @@ - + - @@ -32,7 +32,7 @@ - - + @@ -23,7 +23,7 @@ - @@ -38,7 +38,7 @@ - - + @@ -21,7 +21,7 @@ - + @@ -33,7 +33,7 @@ - + diff --git a/interface/web/sites/templates/cron_list.htm b/interface/web/sites/templates/cron_list.htm index 66191418c..c0e6585eb 100644 --- a/interface/web/sites/templates/cron_list.htm +++ b/interface/web/sites/templates/cron_list.htm @@ -25,10 +25,10 @@ - + - + @@ -37,7 +37,7 @@ - @@ -54,7 +54,7 @@ - - + - - + + - @@ -50,7 +50,7 @@ - - + - - + + - @@ -64,7 +64,7 @@ - + @@ -21,7 +21,7 @@ - @@ -34,7 +34,7 @@ - + diff --git a/interface/web/sites/templates/database_user_admin_list.htm b/interface/web/sites/templates/database_user_admin_list.htm index 4d1a91ed2..faa296aef 100644 --- a/interface/web/sites/templates/database_user_admin_list.htm +++ b/interface/web/sites/templates/database_user_admin_list.htm @@ -17,18 +17,18 @@ - + - + - diff --git a/interface/web/sites/templates/database_user_list.htm b/interface/web/sites/templates/database_user_list.htm index b84513e5d..5c64d5f5e 100644 --- a/interface/web/sites/templates/database_user_list.htm +++ b/interface/web/sites/templates/database_user_list.htm @@ -33,18 +33,18 @@ - + - + - diff --git a/interface/web/sites/templates/ftp_user_list.htm b/interface/web/sites/templates/ftp_user_list.htm index b34650282..7d8603cfb 100644 --- a/interface/web/sites/templates/ftp_user_list.htm +++ b/interface/web/sites/templates/ftp_user_list.htm @@ -36,14 +36,14 @@ - + - + - @@ -55,7 +55,7 @@ - - + - + - @@ -55,7 +55,7 @@ - diff --git a/interface/web/sites/templates/user_quota_stats_list.htm b/interface/web/sites/templates/user_quota_stats_list.htm index 26d0954e9..138241331 100644 --- a/interface/web/sites/templates/user_quota_stats_list.htm +++ b/interface/web/sites/templates/user_quota_stats_list.htm @@ -14,7 +14,7 @@ - + @@ -23,7 +23,7 @@ - @@ -37,7 +37,7 @@ - + diff --git a/interface/web/sites/templates/web_backup_list.htm b/interface/web/sites/templates/web_backup_list.htm index b47a6668d..9a20890ad 100644 --- a/interface/web/sites/templates/web_backup_list.htm +++ b/interface/web/sites/templates/web_backup_list.htm @@ -16,7 +16,7 @@ - + @@ -26,7 +26,7 @@ - - + - + - @@ -55,7 +55,7 @@ - diff --git a/interface/web/sites/templates/web_folder_list.htm b/interface/web/sites/templates/web_folder_list.htm index 8b523f7b5..1b5ace034 100644 --- a/interface/web/sites/templates/web_folder_list.htm +++ b/interface/web/sites/templates/web_folder_list.htm @@ -35,14 +35,14 @@ - + - + - @@ -54,7 +54,7 @@ - diff --git a/interface/web/sites/templates/web_folder_user_list.htm b/interface/web/sites/templates/web_folder_user_list.htm index c80778bb3..f63ac8153 100644 --- a/interface/web/sites/templates/web_folder_user_list.htm +++ b/interface/web/sites/templates/web_folder_user_list.htm @@ -34,13 +34,13 @@ - + - + - @@ -51,7 +51,7 @@ - diff --git a/interface/web/sites/templates/web_sites_stats_list.htm b/interface/web/sites/templates/web_sites_stats_list.htm index 2b8651610..8f28b115d 100644 --- a/interface/web/sites/templates/web_sites_stats_list.htm +++ b/interface/web/sites/templates/web_sites_stats_list.htm @@ -14,7 +14,7 @@ - + @@ -22,7 +22,7 @@ - @@ -35,7 +35,7 @@ - + @@ -49,7 +49,7 @@ - + diff --git a/interface/web/sites/templates/web_vhost_domain_admin_list.htm b/interface/web/sites/templates/web_vhost_domain_admin_list.htm index e40b8a55c..939e5856f 100644 --- a/interface/web/sites/templates/web_vhost_domain_admin_list.htm +++ b/interface/web/sites/templates/web_vhost_domain_admin_list.htm @@ -21,16 +21,16 @@ - + - + - @@ -43,8 +43,9 @@ - - + diff --git a/interface/web/sites/templates/web_vhost_domain_list.htm b/interface/web/sites/templates/web_vhost_domain_list.htm index 0e11ba76e..d2badfa03 100644 --- a/interface/web/sites/templates/web_vhost_domain_list.htm +++ b/interface/web/sites/templates/web_vhost_domain_list.htm @@ -37,15 +37,15 @@ - + - + - @@ -57,8 +57,9 @@ - - + diff --git a/interface/web/sites/templates/webdav_user_list.htm b/interface/web/sites/templates/webdav_user_list.htm index c4f0bc9a9..610128ac4 100644 --- a/interface/web/sites/templates/webdav_user_list.htm +++ b/interface/web/sites/templates/webdav_user_list.htm @@ -36,14 +36,14 @@ - + - + - @@ -55,7 +55,7 @@ - diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css index a0fa9e4b9..e17343975 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css @@ -264,7 +264,9 @@ thead.dark th.small-col { width: 14%; } thead.dark th.tiny-col { - width: 7%; } + width: 8%; + overflow: hidden; + text-overflow: ellipsis; } thead.dark td input, thead.dark td select { diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.min.css b/interface/web/themes/default/assets/stylesheets/ispconfig.min.css index 6f70dc1fd..693063a87 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.min.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.min.css @@ -1 +1 @@ -body{overflow-y:scroll}.left{float:left}.right{float:right}.clear:after{content:"";display:table;clear:both}.marginTop15{margin-top:15px}.paddingX5{padding-left:5px!important;padding-right:5px!important}.width65{width:65px}.form-group input[type='checkbox']{margin-top:10px}.control-label{font-weight:normal}.control-label:after{content:":"}.formbutton-default{padding:6px 30px;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-success,.formbutton-danger{padding:6px 30px;border-style:solid;border-width:1px;border-bottom-width:solid;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-narrow{padding:6px 8px;margin-left:2px;margin-right:2px}.formbutton-narrower{padding:4px 6px}#main-wrapper{margin:0 auto;width:95%;max-width:1260px}#logo{float:left;width:200px;height:65px;background:url("../images/logo.png") no-repeat}#logo a{display:block;width:100%;height:100%}#headerbar{float:right}#searchform{float:right;margin-top:16px}#searchform>div{position:relative;display:table}#searchform>div>div{display:table-cell;padding-right:8px;vertical-align:top}#searchform .icon{padding:0 2px;font-size:16px}#logout-button{float:right;margin-top:16px;margin-left:25px;border-bottom-style:solid;border-bottom-width:2px;transition:all ease 500ms}#main-navigation{margin-top:24px}#main-navigation a{padding:0 12px;height:70px;border-bottom-style:solid;botder-bottom-width:2px;transition:all ease 500ms}#main-navigation .icon{font-size:32px}#main-navigation .title{margin-top:2px;font-weight:bold}.btn-group-justified .btn{border-right-width:0}.btn-group-justified .btn:last-of-type{border-right-width:1px}#content{width:78%}#sidebar{margin-top:27px;width:18%;border-style:solid;border-width:1px;border-radius:4px}#sidebar header{margin:1px;padding:0 10px;height:40px;line-height:40px;font-weight:bold;border-top-left-radius:2px;border-top-right-radius:2px}#sidebar ul{margin:0;padding:0;list-style:none}#sidebar li{padding:10px;border-top-style:solid;border-top-width:1px;font-size:12px}#sidebar a{text-decoration:none;transition:color ease 500ms}.page-header{margin:20px 0;padding:0}.alert-notification a{font-weight:bold;text-decoration:none;transition:color ease 500ms}.alert-label,.alert-content{display:inline-block;vertical-align:top}.alert-label{width:60px}.modules{margin:0;padding:0;list-style:none}.modules li{float:left;margin-right:15px;margin-bottom:15px;padding:8px;width:200px;border-radius:4px;border-style:solid;border-width:1px}.modules .icon{float:left;margin-right:15px;font-size:50px}.modules .left{margin-top:5px}.modules .title{margin-top:6px;margin-left:20px;font-size:16px;font-weight:bold}.modules .button{margin-top:10px;width:100%;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.modules a{text-decoration:none}.table-wrapper{margin-bottom:20px;border-radius:4px;border-style:solid;border-width:1px}.table{table-layout:fixed;margin-bottom:1px}.table caption{padding:5px 10px;text-align:left;font-weight:bold;font-size:18px;border-bottom-style:solid;border-bottom-width:1px}.table tbody tr{border-top-style:solid;border-top-width:1px;transition:background ease 500ms}.table tbody tr:last-child{border-radius:4px}.tfooter{margin-top:-1px;height:40px;border-top-style:solid;border-top-width:1px}.pagination{margin:10px 0}.progress{display:inline-block;margin-bottom:0;width:150px;height:10px}.content-tab-wrapper{border-style:solid;border-width:1px;border-radius:4px}.content-tab-wrapper .nav-tabs>li>a{border-radius:0;border:none!important;border-right-style:solid!important;border-right-width:1px!important;outline:0;font-weight:bold;transition:background ease 500ms}.content-tab-wrapper .nav-tabs li:not(:first-child) a{margin-left:-2px}.tab-content{padding:25px 10px}.input-group-btn .icon-calendar{font-size:18px}thead.dark th{height:40px;line-height:40px;font-weight:normal}thead.dark th.small-col{width:14%}thead.dark th.tiny-col{width:7%}thead.dark td input,thead.dark td select{width:100%}#footer{margin:20px 0;padding-top:20px;border-top-style:solid;border-top-width:1px;text-align:center;font-size:10px}.menu-btn{display:none;cursor:pointer}.df-container,.gs-container{position:relative}.gs-container:after{content:"";display:table;clear:both}ul.df-resultbox,ul.gs-resultbox{display:block;position:absolute;left:0;top:100%;margin:0;padding:0 0 10px;min-width:250px;max-width:500px;z-index:999999;background:#fff;list-style:none;box-shadow:2px 2px 5px #c5c5c5;border-radius:5px}ul.df-resultbox li,ul.gs-resultbox li{float:none;display:block;cursor:pointer;padding:0 10px}ul.gs-resultbox li{padding:3px 10px;line-height:1.1;font-size:.9em}ul.df-resultbox li:nth-child(even),ul.gs-resultbox li:nth-child(even){background:#f2f5f7}ul.df-resultbox li.df-cheader,ul.gs-resultbox li.gs-cheader{background:#fff;padding-top:10px;margin-bottom:10px}ul.df-resultbox li p,ul.gs-resultbox li p{margin-bottom:0;color:inherit}ul.df-resultbox li.df-cheader p.df-cheader-title,ul.gs-resultbox li.gs-cheader p.gs-cheader-title{font-weight:bold;margin-bottom:0}ul.df-resultbox li.df-cheader p.df-cheader-limit,ul.gs-resultbox li.gs-cheader p.gs-cheader-limit{font-weight:normal}ul.df-resultbox li.df-cdata img,ul.gs-resultbox li.gs-cdata img{margin-right:12px}ul.df-resultbox li.df-cdata p span.df-cdata-title,ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{font-weight:bold}ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{display:block}ul.df-resultbox li:first-child,ul.gs-resultbox li:first-child{border-top-left-radius:5px;border-top-right-radius:5px}ul.df-resultbox li:last-child,ul.gs-resultbox li:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#logo{background-image:url("../images/logo@2x.png");background-size:200px 65px}} \ No newline at end of file +body{overflow-y:scroll}.left{float:left}.right{float:right}.clear:after{content:"";display:table;clear:both}.marginTop15{margin-top:15px}.paddingX5{padding-left:5px!important;padding-right:5px!important}.width65{width:65px}.form-group input[type='checkbox']{margin-top:10px}.control-label{font-weight:normal}.control-label:after{content:":"}.formbutton-default{padding:6px 30px;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-success,.formbutton-danger{padding:6px 30px;border-style:solid;border-width:1px;border-bottom-width:solid;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-narrow{padding:6px 8px;margin-left:2px;margin-right:2px}.formbutton-narrower{padding:4px 6px}#main-wrapper{margin:0 auto;width:95%;max-width:1260px}#logo{float:left;width:200px;height:65px;background:url("../images/logo.png") no-repeat}#logo a{display:block;width:100%;height:100%}#headerbar{float:right}#searchform{float:right;margin-top:16px}#searchform>div{position:relative;display:table}#searchform>div>div{display:table-cell;padding-right:8px;vertical-align:top}#searchform .icon{padding:0 2px;font-size:16px}#logout-button{float:right;margin-top:16px;margin-left:25px;border-bottom-style:solid;border-bottom-width:2px;transition:all ease 500ms}#main-navigation{margin-top:24px}#main-navigation a{padding:0 12px;height:70px;border-bottom-style:solid;botder-bottom-width:2px;transition:all ease 500ms}#main-navigation .icon{font-size:32px}#main-navigation .title{margin-top:2px;font-weight:bold}.btn-group-justified .btn{border-right-width:0}.btn-group-justified .btn:last-of-type{border-right-width:1px}#content{width:78%}#sidebar{margin-top:27px;width:18%;border-style:solid;border-width:1px;border-radius:4px}#sidebar header{margin:1px;padding:0 10px;height:40px;line-height:40px;font-weight:bold;border-top-left-radius:2px;border-top-right-radius:2px}#sidebar ul{margin:0;padding:0;list-style:none}#sidebar li{padding:10px;border-top-style:solid;border-top-width:1px;font-size:12px}#sidebar a{text-decoration:none;transition:color ease 500ms}.page-header{margin:20px 0;padding:0}.alert-notification a{font-weight:bold;text-decoration:none;transition:color ease 500ms}.alert-label,.alert-content{display:inline-block;vertical-align:top}.alert-label{width:60px}.modules{margin:0;padding:0;list-style:none}.modules li{float:left;margin-right:15px;margin-bottom:15px;padding:8px;width:200px;border-radius:4px;border-style:solid;border-width:1px}.modules .icon{float:left;margin-right:15px;font-size:50px}.modules .left{margin-top:5px}.modules .title{margin-top:6px;margin-left:20px;font-size:16px;font-weight:bold}.modules .button{margin-top:10px;width:100%;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.modules a{text-decoration:none}.table-wrapper{margin-bottom:20px;border-radius:4px;border-style:solid;border-width:1px}.table{table-layout:fixed;margin-bottom:1px}.table caption{padding:5px 10px;text-align:left;font-weight:bold;font-size:18px;border-bottom-style:solid;border-bottom-width:1px}.table tbody tr{border-top-style:solid;border-top-width:1px;transition:background ease 500ms}.table tbody tr:last-child{border-radius:4px}.tfooter{margin-top:-1px;height:40px;border-top-style:solid;border-top-width:1px}.pagination{margin:10px 0}.progress{display:inline-block;margin-bottom:0;width:150px;height:10px}.content-tab-wrapper{border-style:solid;border-width:1px;border-radius:4px}.content-tab-wrapper .nav-tabs>li>a{border-radius:0;border:none!important;border-right-style:solid!important;border-right-width:1px!important;outline:0;font-weight:bold;transition:background ease 500ms}.content-tab-wrapper .nav-tabs li:not(:first-child) a{margin-left:-2px}.tab-content{padding:25px 10px}.input-group-btn .icon-calendar{font-size:18px}thead.dark th{height:40px;line-height:40px;font-weight:normal}thead.dark th.small-col{width:14%}thead.dark th.tiny-col{width:8%;overflow:hidden;text-overflow:ellipsis}thead.dark td input,thead.dark td select{width:100%}#footer{margin:20px 0;padding-top:20px;border-top-style:solid;border-top-width:1px;text-align:center;font-size:10px}.menu-btn{display:none;cursor:pointer}.df-container,.gs-container{position:relative}.gs-container:after{content:"";display:table;clear:both}ul.df-resultbox,ul.gs-resultbox{display:block;position:absolute;left:0;top:100%;margin:0;padding:0 0 10px;min-width:250px;max-width:500px;z-index:999999;background:#fff;list-style:none;box-shadow:2px 2px 5px #c5c5c5;border-radius:5px}ul.df-resultbox li,ul.gs-resultbox li{float:none;display:block;cursor:pointer;padding:0 10px}ul.gs-resultbox li{padding:3px 10px;line-height:1.1;font-size:.9em}ul.df-resultbox li:nth-child(even),ul.gs-resultbox li:nth-child(even){background:#f2f5f7}ul.df-resultbox li.df-cheader,ul.gs-resultbox li.gs-cheader{background:#fff;padding-top:10px;margin-bottom:10px}ul.df-resultbox li p,ul.gs-resultbox li p{margin-bottom:0;color:inherit}ul.df-resultbox li.df-cheader p.df-cheader-title,ul.gs-resultbox li.gs-cheader p.gs-cheader-title{font-weight:bold;margin-bottom:0}ul.df-resultbox li.df-cheader p.df-cheader-limit,ul.gs-resultbox li.gs-cheader p.gs-cheader-limit{font-weight:normal}ul.df-resultbox li.df-cdata img,ul.gs-resultbox li.gs-cdata img{margin-right:12px}ul.df-resultbox li.df-cdata p span.df-cdata-title,ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{font-weight:bold}ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{display:block}ul.df-resultbox li:first-child,ul.gs-resultbox li:first-child{border-top-left-radius:5px;border-top-right-radius:5px}ul.df-resultbox li:last-child,ul.gs-resultbox li:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#logo{background-image:url("../images/logo@2x.png");background-size:200px 65px}} \ No newline at end of file diff --git a/interface/web/vm/templates/openvz_ip_list.htm b/interface/web/vm/templates/openvz_ip_list.htm index f51581710..03d274fed 100644 --- a/interface/web/vm/templates/openvz_ip_list.htm +++ b/interface/web/vm/templates/openvz_ip_list.htm @@ -19,14 +19,14 @@ - + - @@ -38,7 +38,7 @@ - diff --git a/interface/web/vm/templates/openvz_ostemplate_list.htm b/interface/web/vm/templates/openvz_ostemplate_list.htm index 26313ca83..3da8b1b1e 100644 --- a/interface/web/vm/templates/openvz_ostemplate_list.htm +++ b/interface/web/vm/templates/openvz_ostemplate_list.htm @@ -20,15 +20,15 @@ - + - + - @@ -41,7 +41,7 @@ - diff --git a/interface/web/vm/templates/openvz_template_list.htm b/interface/web/vm/templates/openvz_template_list.htm index 3585e8bc8..de2a9dfb3 100644 --- a/interface/web/vm/templates/openvz_template_list.htm +++ b/interface/web/vm/templates/openvz_template_list.htm @@ -17,12 +17,12 @@ - + - + - @@ -32,7 +32,7 @@ - diff --git a/interface/web/vm/templates/openvz_vm_list.htm b/interface/web/vm/templates/openvz_vm_list.htm index 154bb4dd6..55c5bbbc4 100644 --- a/interface/web/vm/templates/openvz_vm_list.htm +++ b/interface/web/vm/templates/openvz_vm_list.htm @@ -22,17 +22,17 @@ - + - + - @@ -47,7 +47,7 @@ - -- GitLab From e645fa3551f547817e7589c9e6da68c1139ce556 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 8 Jan 2015 11:24:07 +0100 Subject: [PATCH 066/287] Layout improvement - select boxes with flags --- .../templates/directive_snippets_edit.htm | 4 +- .../web/admin/templates/firewall_edit.htm | 4 +- .../web/admin/templates/iptables_edit.htm | 16 +- .../web/admin/templates/language_add.htm | 6 +- .../web/admin/templates/language_complete.htm | 6 +- .../web/admin/templates/language_export.htm | 6 +- .../web/admin/templates/language_list.htm | 5 +- .../templates/remote_action_ispcupdate.htm | 4 +- .../templates/remote_action_osupdate.htm | 4 +- .../templates/server_config_fastcgi_edit.htm | 4 +- .../templates/server_config_mail_edit.htm | 16 +- .../templates/server_config_server_edit.htm | 16 +- .../templates/server_config_ufw_edit.htm | 20 +- .../templates/server_config_web_edit.htm | 12 +- .../admin/templates/server_edit_services.htm | 8 +- .../web/admin/templates/server_ip_edit.htm | 12 +- .../admin/templates/server_php_name_edit.htm | 8 +- .../admin/templates/software_update_list.htm | 3 +- .../templates/system_config_mail_edit.htm | 8 +- .../templates/system_config_misc_edit.htm | 4 +- .../templates/system_config_sites_edit.htm | 8 +- .../web/admin/templates/users_groups_edit.htm | 4 +- .../web/admin/templates/users_user_edit.htm | 10 +- .../client/templates/client_edit_address.htm | 20 +- .../client/templates/client_edit_limits.htm | 40 +-- .../web/client/templates/client_message.htm | 4 +- .../templates/client_template_edit_limits.htm | 28 +- .../client_template_edit_template.htm | 4 +- .../web/client/templates/domain_edit.htm | 4 +- .../web/client/templates/message_template.htm | 4 +- .../templates/reseller_edit_address.htm | 20 +- .../client/templates/reseller_edit_limits.htm | 36 +-- interface/web/dns/templates/dns_import.htm | 16 +- .../web/dns/templates/dns_slave_edit.htm | 20 +- interface/web/dns/templates/dns_soa_edit.htm | 28 +- interface/web/dns/templates/dns_wizard.htm | 24 +- interface/web/help/templates/faq_edit.htm | 4 +- .../help/templates/support_message_edit.htm | 4 +- interface/web/js/scrigo.js.php | 8 + .../web/mail/templates/mail_alias_edit.htm | 4 +- .../mail/templates/mail_aliasdomain_edit.htm | 8 +- .../mail/templates/mail_blacklist_edit.htm | 8 +- .../templates/mail_content_filter_edit.htm | 12 +- .../web/mail/templates/mail_domain_edit.htm | 32 +-- .../web/mail/templates/mail_get_edit.htm | 8 +- .../mail/templates/mail_mailinglist_edit.htm | 16 +- .../templates/mail_relay_recipient_edit.htm | 4 +- .../mail/templates/mail_transport_edit.htm | 12 +- .../web/mail/templates/mail_user_backup.htm | 8 +- .../mail/templates/mail_user_mailbox_edit.htm | 4 +- .../mail/templates/mail_whitelist_edit.htm | 8 +- .../templates/spamfilter_blacklist_edit.htm | 12 +- .../mail/templates/spamfilter_other_edit.htm | 12 +- .../mail/templates/spamfilter_policy_edit.htm | 28 +- .../templates/spamfilter_taglevel_edit.htm | 4 +- .../mail/templates/spamfilter_users_edit.htm | 16 +- .../templates/spamfilter_whitelist_edit.htm | 12 +- .../templates/mail_user_spamfilter_edit.htm | 4 +- interface/web/monitor/templates/show_log.htm | 3 +- .../web/monitor/templates/show_sys_state.htm | 3 +- interface/web/sites/templates/cron_edit.htm | 8 +- .../web/sites/templates/database_edit.htm | 40 +-- .../sites/templates/database_user_edit.htm | 8 +- .../web/sites/templates/ftp_user_edit.htm | 4 +- .../web/sites/templates/shell_user_edit.htm | 12 +- .../sites/templates/web_childdomain_edit.htm | 32 +-- .../templates/web_directive_snippets.htm | 4 +- .../web/sites/templates/web_folder_edit.htm | 4 +- .../sites/templates/web_folder_user_edit.htm | 4 +- .../templates/web_vhost_domain_advanced.htm | 4 +- .../templates/web_vhost_domain_backup.htm | 8 +- .../sites/templates/web_vhost_domain_edit.htm | 68 ++--- .../templates/web_vhost_domain_redirect.htm | 8 +- .../sites/templates/web_vhost_domain_ssl.htm | 14 +- .../templates/web_vhost_domain_stats.htm | 4 +- .../web/sites/templates/webdav_user_edit.htm | 8 +- .../default/assets/images/flags_sprite.png | Bin 0 -> 88755 bytes .../default/assets/stylesheets/ispconfig.css | 252 ++++++++++++++++++ .../assets/stylesheets/ispconfig.min.css | 2 +- .../web/tools/templates/import_ispconfig.htm | 8 +- .../tools/templates/interface_settings.htm | 8 +- interface/web/tools/templates/resync.htm | 44 +-- .../web/tools/templates/user_settings.htm | 6 +- interface/web/vm/templates/openvz_ip_edit.htm | 8 +- .../vm/templates/openvz_ostemplate_edit.htm | 4 +- interface/web/vm/templates/openvz_vm_edit.htm | 32 +-- 86 files changed, 760 insertions(+), 504 deletions(-) create mode 100644 interface/web/themes/default/assets/images/flags_sprite.png diff --git a/interface/web/admin/templates/directive_snippets_edit.htm b/interface/web/admin/templates/directive_snippets_edit.htm index 4366a6892..2bb7da5ff 100644 --- a/interface/web/admin/templates/directive_snippets_edit.htm +++ b/interface/web/admin/templates/directive_snippets_edit.htm @@ -12,8 +12,8 @@
-
+ +
  {tmpl_var name='variables_txt'}: {DOCROOT}, {FASTCGIPASS} diff --git a/interface/web/admin/templates/firewall_edit.htm b/interface/web/admin/templates/firewall_edit.htm index c629d4487..f864b8550 100644 --- a/interface/web/admin/templates/firewall_edit.htm +++ b/interface/web/admin/templates/firewall_edit.htm @@ -9,8 +9,8 @@
-
+ +
diff --git a/interface/web/admin/templates/iptables_edit.htm b/interface/web/admin/templates/iptables_edit.htm index 4a5b76396..c1ead2b1e 100644 --- a/interface/web/admin/templates/iptables_edit.htm +++ b/interface/web/admin/templates/iptables_edit.htm @@ -8,20 +8,20 @@
-
+ +
-
+ +
-
+ +
@@ -41,8 +41,8 @@
-
+ +
diff --git a/interface/web/admin/templates/language_add.htm b/interface/web/admin/templates/language_add.htm index 5c0e81f14..72bb15d2a 100644 --- a/interface/web/admin/templates/language_add.htm +++ b/interface/web/admin/templates/language_add.htm @@ -7,10 +7,10 @@ Language Add
-
{tmpl_var name='language_option'} - -
+
+

{tmpl_var name='language_new_hint_txt'}

diff --git a/interface/web/admin/templates/language_complete.htm b/interface/web/admin/templates/language_complete.htm index dc722c788..584ac47ce 100644 --- a/interface/web/admin/templates/language_complete.htm +++ b/interface/web/admin/templates/language_complete.htm @@ -16,10 +16,10 @@ Language Complete
-
{tmpl_var name='language_option'} - -
+
+
diff --git a/interface/web/admin/templates/language_export.htm b/interface/web/admin/templates/language_export.htm index d18ba1005..15184a59c 100644 --- a/interface/web/admin/templates/language_export.htm +++ b/interface/web/admin/templates/language_export.htm @@ -7,10 +7,10 @@ Language Export
-
{tmpl_var name='language_option'} - -
+
+
diff --git a/interface/web/admin/templates/language_list.htm b/interface/web/admin/templates/language_list.htm index 1e89b50b6..55c27eb10 100644 --- a/interface/web/admin/templates/language_list.htm +++ b/interface/web/admin/templates/language_list.htm @@ -8,11 +8,10 @@
-
{tmpl_var name='language_option'} - +
-
diff --git a/interface/web/admin/templates/remote_action_ispcupdate.htm b/interface/web/admin/templates/remote_action_ispcupdate.htm index 5761726a6..1fe5f7677 100644 --- a/interface/web/admin/templates/remote_action_ispcupdate.htm +++ b/interface/web/admin/templates/remote_action_ispcupdate.htm @@ -19,8 +19,8 @@
-
+ + diff --git a/interface/web/admin/templates/remote_action_osupdate.htm b/interface/web/admin/templates/remote_action_osupdate.htm index 72990d5d7..ba43e0816 100644 --- a/interface/web/admin/templates/remote_action_osupdate.htm +++ b/interface/web/admin/templates/remote_action_osupdate.htm @@ -9,8 +9,8 @@
-
+ + diff --git a/interface/web/admin/templates/server_config_fastcgi_edit.htm b/interface/web/admin/templates/server_config_fastcgi_edit.htm index 8db25a98d..b8676c5fc 100644 --- a/interface/web/admin/templates/server_config_fastcgi_edit.htm +++ b/interface/web/admin/templates/server_config_fastcgi_edit.htm @@ -30,8 +30,8 @@
-
+ + diff --git a/interface/web/admin/templates/server_config_mail_edit.htm b/interface/web/admin/templates/server_config_mail_edit.htm index fcc320e4f..30f9de010 100644 --- a/interface/web/admin/templates/server_config_mail_edit.htm +++ b/interface/web/admin/templates/server_config_mail_edit.htm @@ -9,8 +9,8 @@
-
+ +
@@ -25,24 +25,24 @@
-
+ +
-
+
+
-
+
+
diff --git a/interface/web/admin/templates/server_config_server_edit.htm b/interface/web/admin/templates/server_config_server_edit.htm index 3cf6af500..3cda9418d 100644 --- a/interface/web/admin/templates/server_config_server_edit.htm +++ b/interface/web/admin/templates/server_config_server_edit.htm @@ -34,20 +34,20 @@
-
+ +
-
+ +
-
+ +
@@ -61,8 +61,8 @@
-
+ +
diff --git a/interface/web/admin/templates/server_config_ufw_edit.htm b/interface/web/admin/templates/server_config_ufw_edit.htm index 0c71ae9d6..941f35928 100644 --- a/interface/web/admin/templates/server_config_ufw_edit.htm +++ b/interface/web/admin/templates/server_config_ufw_edit.htm @@ -27,32 +27,32 @@
-
+
+
-
+ +
-
+ +
-
+ +
-
+ + diff --git a/interface/web/admin/templates/server_config_web_edit.htm b/interface/web/admin/templates/server_config_web_edit.htm index 9f621e0d4..855fea5f1 100644 --- a/interface/web/admin/templates/server_config_web_edit.htm +++ b/interface/web/admin/templates/server_config_web_edit.htm @@ -10,8 +10,8 @@
-
+ +
@@ -61,8 +61,8 @@
-
+
+
@@ -228,8 +228,8 @@
-
+
+
{tmpl_var name='apps_vhost_settings_txt'}
diff --git a/interface/web/admin/templates/server_edit_services.htm b/interface/web/admin/templates/server_edit_services.htm index b59bc7efb..d7c068d07 100644 --- a/interface/web/admin/templates/server_edit_services.htm +++ b/interface/web/admin/templates/server_edit_services.htm @@ -48,14 +48,14 @@
-
+ +
-
+ + diff --git a/interface/web/admin/templates/server_ip_edit.htm b/interface/web/admin/templates/server_ip_edit.htm index 922157368..7901c9359 100644 --- a/interface/web/admin/templates/server_ip_edit.htm +++ b/interface/web/admin/templates/server_ip_edit.htm @@ -9,20 +9,20 @@
-
+ +
-
+ +
-
+ +
diff --git a/interface/web/admin/templates/server_php_name_edit.htm b/interface/web/admin/templates/server_php_name_edit.htm index 2f1dcd0d7..e46d84ce1 100644 --- a/interface/web/admin/templates/server_php_name_edit.htm +++ b/interface/web/admin/templates/server_php_name_edit.htm @@ -9,14 +9,14 @@
-
+ +
-
+ +
diff --git a/interface/web/admin/templates/software_update_list.htm b/interface/web/admin/templates/software_update_list.htm index 60ee779e5..edeac05ec 100644 --- a/interface/web/admin/templates/software_update_list.htm +++ b/interface/web/admin/templates/software_update_list.htm @@ -12,9 +12,8 @@ - + - diff --git a/interface/web/admin/templates/system_config_mail_edit.htm b/interface/web/admin/templates/system_config_mail_edit.htm index 20dca2a64..72d332cfc 100644 --- a/interface/web/admin/templates/system_config_mail_edit.htm +++ b/interface/web/admin/templates/system_config_mail_edit.htm @@ -76,14 +76,14 @@
-
+ +
-
+ + diff --git a/interface/web/admin/templates/system_config_misc_edit.htm b/interface/web/admin/templates/system_config_misc_edit.htm index 7e813096c..69d723d7c 100644 --- a/interface/web/admin/templates/system_config_misc_edit.htm +++ b/interface/web/admin/templates/system_config_misc_edit.htm @@ -90,8 +90,8 @@
-
+ +
diff --git a/interface/web/admin/templates/system_config_sites_edit.htm b/interface/web/admin/templates/system_config_sites_edit.htm index 25bd29eb5..a3a39c8c2 100644 --- a/interface/web/admin/templates/system_config_sites_edit.htm +++ b/interface/web/admin/templates/system_config_sites_edit.htm @@ -61,14 +61,14 @@
-
+
+
-
+ + diff --git a/interface/web/admin/templates/users_groups_edit.htm b/interface/web/admin/templates/users_groups_edit.htm index b7fd454e6..f9fbc8302 100644 --- a/interface/web/admin/templates/users_groups_edit.htm +++ b/interface/web/admin/templates/users_groups_edit.htm @@ -9,8 +9,8 @@
-
+ +
diff --git a/interface/web/admin/templates/users_user_edit.htm b/interface/web/admin/templates/users_user_edit.htm index 54ad0ddf9..d55351f9d 100644 --- a/interface/web/admin/templates/users_user_edit.htm +++ b/interface/web/admin/templates/users_user_edit.htm @@ -32,8 +32,8 @@
-
+
+
@@ -54,10 +54,10 @@
-
{tmpl_var name='language'} - -
+
+
diff --git a/interface/web/client/templates/client_edit_address.htm b/interface/web/client/templates/client_edit_address.htm index e2508575a..255a85d01 100644 --- a/interface/web/client/templates/client_edit_address.htm +++ b/interface/web/client/templates/client_edit_address.htm @@ -12,8 +12,8 @@
-
+
+
@@ -43,16 +43,16 @@
-
{tmpl_var name='language'} - -
+ +
-
+ +
@@ -67,10 +67,10 @@
-
{tmpl_var name='country'} - -
+ +
diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm index dccb2ecf3..f01acce9d 100644 --- a/interface/web/client/templates/client_edit_limits.htm +++ b/interface/web/client/templates/client_edit_limits.htm @@ -19,14 +19,14 @@
-
+ +
-
+ +
@@ -44,8 +44,8 @@
-
+
+
@@ -56,8 +56,8 @@
-
+ +
@@ -163,8 +163,8 @@
-
+ +
@@ -215,8 +215,8 @@
-
+ +
@@ -234,8 +234,8 @@
-
+ +
@@ -246,8 +246,8 @@
-
+ +
@@ -255,8 +255,8 @@
-
+ +
@@ -273,8 +273,8 @@
-
+ +
{tmpl_var name='aps_limits_txt'}
diff --git a/interface/web/client/templates/client_message.htm b/interface/web/client/templates/client_message.htm index 0ef1855ea..caa7391bc 100644 --- a/interface/web/client/templates/client_message.htm +++ b/interface/web/client/templates/client_message.htm @@ -18,8 +18,8 @@
-
+ +
diff --git a/interface/web/client/templates/client_template_edit_limits.htm b/interface/web/client/templates/client_template_edit_limits.htm index 88896601a..09cbd6631 100644 --- a/interface/web/client/templates/client_template_edit_limits.htm +++ b/interface/web/client/templates/client_template_edit_limits.htm @@ -11,8 +11,8 @@
-
+ +
@@ -118,8 +118,8 @@
-
+ +
@@ -169,8 +169,8 @@
-
+ +
@@ -188,8 +188,8 @@
-
+ +
@@ -200,8 +200,8 @@
-
+ +
@@ -209,8 +209,8 @@
-
+ +
@@ -227,8 +227,8 @@
-
+ +
{tmpl_var name='aps_limits_txt'}
diff --git a/interface/web/client/templates/client_template_edit_template.htm b/interface/web/client/templates/client_template_edit_template.htm index 42fd92566..6009a3e7a 100644 --- a/interface/web/client/templates/client_template_edit_template.htm +++ b/interface/web/client/templates/client_template_edit_template.htm @@ -9,8 +9,8 @@
-
+ +
diff --git a/interface/web/client/templates/domain_edit.htm b/interface/web/client/templates/domain_edit.htm index b1faf4b1b..7e6fdeb79 100644 --- a/interface/web/client/templates/domain_edit.htm +++ b/interface/web/client/templates/domain_edit.htm @@ -12,8 +12,8 @@
-
+ + diff --git a/interface/web/client/templates/message_template.htm b/interface/web/client/templates/message_template.htm index 190b836d2..9855768b1 100644 --- a/interface/web/client/templates/message_template.htm +++ b/interface/web/client/templates/message_template.htm @@ -11,8 +11,8 @@
-
+ +
diff --git a/interface/web/client/templates/reseller_edit_address.htm b/interface/web/client/templates/reseller_edit_address.htm index 9b8d62007..e0cf2164d 100644 --- a/interface/web/client/templates/reseller_edit_address.htm +++ b/interface/web/client/templates/reseller_edit_address.htm @@ -12,8 +12,8 @@
-
+ +
@@ -43,16 +43,16 @@
-
{tmpl_var name='language'} - -
+ +
-
+ +
@@ -67,10 +67,10 @@
-
{tmpl_var name='country'} - -
+ +
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm index 020497dfc..db616f68b 100644 --- a/interface/web/client/templates/reseller_edit_limits.htm +++ b/interface/web/client/templates/reseller_edit_limits.htm @@ -22,14 +22,14 @@
-
+ +
-
+ +
@@ -58,8 +58,8 @@
-
+
+
@@ -165,8 +165,8 @@
-
+ +
@@ -217,8 +217,8 @@
-
+ +
@@ -232,8 +232,8 @@
-
+ +
@@ -244,8 +244,8 @@
-
+ +
@@ -253,8 +253,8 @@
-
+ +
@@ -271,8 +271,8 @@
-
+ +
{tmpl_var name='aps_limits_txt'}
diff --git a/interface/web/dns/templates/dns_import.htm b/interface/web/dns/templates/dns_import.htm index fcf32e888..43dd3ff63 100644 --- a/interface/web/dns/templates/dns_import.htm +++ b/interface/web/dns/templates/dns_import.htm @@ -10,14 +10,14 @@
-
+ +
-
+ + @@ -26,8 +26,8 @@
-
+ +
@@ -35,8 +35,8 @@
-
+
+

diff --git a/interface/web/dns/templates/dns_slave_edit.htm b/interface/web/dns/templates/dns_slave_edit.htm index 73804b60b..b60aa54f3 100644 --- a/interface/web/dns/templates/dns_slave_edit.htm +++ b/interface/web/dns/templates/dns_slave_edit.htm @@ -11,22 +11,22 @@

-
+ +
-
+ +
-
+ +
@@ -35,8 +35,8 @@
-
+ +
@@ -44,8 +44,8 @@
-
+
+

{tmpl_var name='eg_domain_tld'}

diff --git a/interface/web/dns/templates/dns_soa_edit.htm b/interface/web/dns/templates/dns_soa_edit.htm index 04ebe0954..1a4d3b4d2 100644 --- a/interface/web/dns/templates/dns_soa_edit.htm +++ b/interface/web/dns/templates/dns_soa_edit.htm @@ -11,22 +11,22 @@
-
+ +
-
+ +
-
+ +
@@ -37,14 +37,14 @@
-
+ +
-
+ + @@ -54,8 +54,8 @@
-
+ +
@@ -63,8 +63,8 @@
-
+
+

{tmpl_var name='eg_domain_tld'}

diff --git a/interface/web/dns/templates/dns_wizard.htm b/interface/web/dns/templates/dns_wizard.htm index 6361f29de..b607a27ae 100644 --- a/interface/web/dns/templates/dns_wizard.htm +++ b/interface/web/dns/templates/dns_wizard.htm @@ -13,22 +13,22 @@
-
+ +
-
+ +
-
+ +
@@ -38,8 +38,8 @@
-
+ +
@@ -48,8 +48,8 @@
-
+ +
@@ -58,8 +58,8 @@
-
+ +
diff --git a/interface/web/help/templates/faq_edit.htm b/interface/web/help/templates/faq_edit.htm index 7b79bd132..1a1bc4a37 100644 --- a/interface/web/help/templates/faq_edit.htm +++ b/interface/web/help/templates/faq_edit.htm @@ -4,8 +4,8 @@
-
+ +
diff --git a/interface/web/help/templates/support_message_edit.htm b/interface/web/help/templates/support_message_edit.htm index 894b8d4a7..6a033898c 100644 --- a/interface/web/help/templates/support_message_edit.htm +++ b/interface/web/help/templates/support_message_edit.htm @@ -9,8 +9,8 @@
-
+ +
diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php index 0c79fc455..65bfe64ce 100644 --- a/interface/web/js/scrigo.js.php +++ b/interface/web/js/scrigo.js.php @@ -100,6 +100,14 @@ if($server_config_array['misc']['use_combobox'] == 'y'){ width: 'element', selectOnBlur: true, allowClear: true, + formatResult: function(o) { + if(o.id && $(o.element).parent().hasClass('flags')) return '' + o.text; + else return o.text; + }, + formatSelection: function(o) { + if(o.id && $(o.element).parent().hasClass('flags')) return '' + o.text; + else return o.text; + } }).on('change', function(e) { if (jQuery("#pageForm .table #Filter").length > 0) { jQuery("#pageForm .table #Filter").trigger('click'); diff --git a/interface/web/mail/templates/mail_alias_edit.htm b/interface/web/mail/templates/mail_alias_edit.htm index d98fd0383..612447bec 100644 --- a/interface/web/mail/templates/mail_alias_edit.htm +++ b/interface/web/mail/templates/mail_alias_edit.htm @@ -17,8 +17,8 @@
-
+ +
diff --git a/interface/web/mail/templates/mail_aliasdomain_edit.htm b/interface/web/mail/templates/mail_aliasdomain_edit.htm index 697e22942..3770d10b7 100644 --- a/interface/web/mail/templates/mail_aliasdomain_edit.htm +++ b/interface/web/mail/templates/mail_aliasdomain_edit.htm @@ -9,14 +9,14 @@
-
+
+
-
+ +
diff --git a/interface/web/mail/templates/mail_blacklist_edit.htm b/interface/web/mail/templates/mail_blacklist_edit.htm index b448f4812..0e12de345 100644 --- a/interface/web/mail/templates/mail_blacklist_edit.htm +++ b/interface/web/mail/templates/mail_blacklist_edit.htm @@ -9,8 +9,8 @@
-
+
+
@@ -18,8 +18,8 @@
-
+ +
diff --git a/interface/web/mail/templates/mail_content_filter_edit.htm b/interface/web/mail/templates/mail_content_filter_edit.htm index 3ced2f8f5..8b679d4f9 100644 --- a/interface/web/mail/templates/mail_content_filter_edit.htm +++ b/interface/web/mail/templates/mail_content_filter_edit.htm @@ -9,14 +9,14 @@
-
+
+
-
+ +
@@ -27,8 +27,8 @@
-
+ +
diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm index 9ad308b8a..1278381b2 100644 --- a/interface/web/mail/templates/mail_domain_edit.htm +++ b/interface/web/mail/templates/mail_domain_edit.htm @@ -11,22 +11,22 @@
-
+
+
-
+
+
-
+ +
@@ -37,14 +37,14 @@
-
+ +
-
+ + @@ -55,8 +55,8 @@
-
+ + @@ -65,16 +65,16 @@
-
+ +
-
+ +
diff --git a/interface/web/mail/templates/mail_get_edit.htm b/interface/web/mail/templates/mail_get_edit.htm index 5a9b80ff1..a848d02a9 100644 --- a/interface/web/mail/templates/mail_get_edit.htm +++ b/interface/web/mail/templates/mail_get_edit.htm @@ -9,8 +9,8 @@
-
+
+
@@ -36,8 +36,8 @@
-
+ +
diff --git a/interface/web/mail/templates/mail_mailinglist_edit.htm b/interface/web/mail/templates/mail_mailinglist_edit.htm index b1c73f42a..ad1343474 100644 --- a/interface/web/mail/templates/mail_mailinglist_edit.htm +++ b/interface/web/mail/templates/mail_mailinglist_edit.htm @@ -10,8 +10,8 @@
-
+
+ @@ -19,8 +19,8 @@
-
+ +
@@ -28,8 +28,8 @@
-
+ +
@@ -45,8 +45,8 @@
-
+ +
diff --git a/interface/web/mail/templates/mail_relay_recipient_edit.htm b/interface/web/mail/templates/mail_relay_recipient_edit.htm index 3e64586fc..685527bd7 100644 --- a/interface/web/mail/templates/mail_relay_recipient_edit.htm +++ b/interface/web/mail/templates/mail_relay_recipient_edit.htm @@ -9,8 +9,8 @@
-
+ +
diff --git a/interface/web/mail/templates/mail_transport_edit.htm b/interface/web/mail/templates/mail_transport_edit.htm index 066413fa0..121e35fb8 100644 --- a/interface/web/mail/templates/mail_transport_edit.htm +++ b/interface/web/mail/templates/mail_transport_edit.htm @@ -9,8 +9,8 @@
-
+ +
@@ -18,8 +18,8 @@
-
+ +
@@ -32,8 +32,8 @@
-
+
+
diff --git a/interface/web/mail/templates/mail_user_backup.htm b/interface/web/mail/templates/mail_user_backup.htm index 873a04046..cfe4e1cd2 100644 --- a/interface/web/mail/templates/mail_user_backup.htm +++ b/interface/web/mail/templates/mail_user_backup.htm @@ -18,14 +18,14 @@
-
+
+
-
+ + {tmpl_var name='backup_records'} diff --git a/interface/web/mail/templates/mail_user_mailbox_edit.htm b/interface/web/mail/templates/mail_user_mailbox_edit.htm index dc67f360a..b35061fff 100644 --- a/interface/web/mail/templates/mail_user_mailbox_edit.htm +++ b/interface/web/mail/templates/mail_user_mailbox_edit.htm @@ -51,8 +51,8 @@
-
+ +
diff --git a/interface/web/mail/templates/mail_whitelist_edit.htm b/interface/web/mail/templates/mail_whitelist_edit.htm index d6309960f..77e949b6e 100644 --- a/interface/web/mail/templates/mail_whitelist_edit.htm +++ b/interface/web/mail/templates/mail_whitelist_edit.htm @@ -9,8 +9,8 @@
-
+
+
@@ -18,8 +18,8 @@
-
+ +
diff --git a/interface/web/mail/templates/spamfilter_blacklist_edit.htm b/interface/web/mail/templates/spamfilter_blacklist_edit.htm index 01862be97..4667c6500 100644 --- a/interface/web/mail/templates/spamfilter_blacklist_edit.htm +++ b/interface/web/mail/templates/spamfilter_blacklist_edit.htm @@ -10,15 +10,15 @@
-
+
+ -->
-
+ +
@@ -26,8 +26,8 @@
-
+ +
diff --git a/interface/web/mail/templates/spamfilter_other_edit.htm b/interface/web/mail/templates/spamfilter_other_edit.htm index 00a6bf650..4a6f7398f 100644 --- a/interface/web/mail/templates/spamfilter_other_edit.htm +++ b/interface/web/mail/templates/spamfilter_other_edit.htm @@ -21,20 +21,20 @@
-
+
+
-
+ +
-
+ +
diff --git a/interface/web/mail/templates/spamfilter_policy_edit.htm b/interface/web/mail/templates/spamfilter_policy_edit.htm index e265cd9f2..ba53feb85 100644 --- a/interface/web/mail/templates/spamfilter_policy_edit.htm +++ b/interface/web/mail/templates/spamfilter_policy_edit.htm @@ -12,44 +12,44 @@
-
+ +
-
+ +
-
+ +
-
+ +
-
+ +
-
+ +
-
+ + diff --git a/interface/web/mail/templates/spamfilter_taglevel_edit.htm b/interface/web/mail/templates/spamfilter_taglevel_edit.htm index 3f7a94810..7a802e9a5 100644 --- a/interface/web/mail/templates/spamfilter_taglevel_edit.htm +++ b/interface/web/mail/templates/spamfilter_taglevel_edit.htm @@ -24,8 +24,8 @@
-
+ +
diff --git a/interface/web/mail/templates/spamfilter_users_edit.htm b/interface/web/mail/templates/spamfilter_users_edit.htm index e18aa5e32..0f6d18acd 100644 --- a/interface/web/mail/templates/spamfilter_users_edit.htm +++ b/interface/web/mail/templates/spamfilter_users_edit.htm @@ -9,20 +9,20 @@
-
+ +
-
+ +
-
+ +
@@ -33,8 +33,8 @@
-
+ + diff --git a/interface/web/mail/templates/spamfilter_whitelist_edit.htm b/interface/web/mail/templates/spamfilter_whitelist_edit.htm index 35c39c5eb..2f0d9775d 100644 --- a/interface/web/mail/templates/spamfilter_whitelist_edit.htm +++ b/interface/web/mail/templates/spamfilter_whitelist_edit.htm @@ -10,15 +10,15 @@
-
+ + -->
-
+ +
@@ -26,8 +26,8 @@
-
+ +
diff --git a/interface/web/mailuser/templates/mail_user_spamfilter_edit.htm b/interface/web/mailuser/templates/mail_user_spamfilter_edit.htm index 7b7328629..8ebe2a276 100644 --- a/interface/web/mailuser/templates/mail_user_spamfilter_edit.htm +++ b/interface/web/mailuser/templates/mail_user_spamfilter_edit.htm @@ -13,8 +13,8 @@
-
+
+ diff --git a/interface/web/monitor/templates/show_log.htm b/interface/web/monitor/templates/show_log.htm index befb5ebd4..df3bb8e0b 100644 --- a/interface/web/monitor/templates/show_log.htm +++ b/interface/web/monitor/templates/show_log.htm @@ -10,9 +10,8 @@
+
- diff --git a/interface/web/monitor/templates/show_sys_state.htm b/interface/web/monitor/templates/show_sys_state.htm index 262425c8e..ee4b42c35 100644 --- a/interface/web/monitor/templates/show_sys_state.htm +++ b/interface/web/monitor/templates/show_sys_state.htm @@ -10,9 +10,8 @@
+
- diff --git a/interface/web/sites/templates/cron_edit.htm b/interface/web/sites/templates/cron_edit.htm index 2a3e753dc..7fb59c766 100644 --- a/interface/web/sites/templates/cron_edit.htm +++ b/interface/web/sites/templates/cron_edit.htm @@ -10,14 +10,14 @@
-
+ +
-
+ +
diff --git a/interface/web/sites/templates/database_edit.htm b/interface/web/sites/templates/database_edit.htm index 51a8c9f79..a93011fef 100644 --- a/interface/web/sites/templates/database_edit.htm +++ b/interface/web/sites/templates/database_edit.htm @@ -11,14 +11,14 @@
-
+
+
-
+ + @@ -29,14 +29,14 @@
-
+ +
-
+ + @@ -44,14 +44,14 @@
-
+ +
-
+ +

{tmpl_var name='database_name_prefix'}

@@ -68,27 +68,27 @@
-
+ +
 {tmpl_var name='optional_txt'} -
+  {tmpl_var name='optional_txt'} +
-
+
+
-
+ +
diff --git a/interface/web/sites/templates/database_user_edit.htm b/interface/web/sites/templates/database_user_edit.htm index 936601789..b06de154a 100644 --- a/interface/web/sites/templates/database_user_edit.htm +++ b/interface/web/sites/templates/database_user_edit.htm @@ -10,16 +10,16 @@
-
+ +
-
+ +
diff --git a/interface/web/sites/templates/ftp_user_edit.htm b/interface/web/sites/templates/ftp_user_edit.htm index 997fa75fe..5e55ce47b 100644 --- a/interface/web/sites/templates/ftp_user_edit.htm +++ b/interface/web/sites/templates/ftp_user_edit.htm @@ -9,8 +9,8 @@
-
+ +

{tmpl_var name='username_prefix'}

diff --git a/interface/web/sites/templates/shell_user_edit.htm b/interface/web/sites/templates/shell_user_edit.htm index 207b425d2..0afee2109 100644 --- a/interface/web/sites/templates/shell_user_edit.htm +++ b/interface/web/sites/templates/shell_user_edit.htm @@ -10,14 +10,14 @@
-
+
+
-
+ +
@@ -41,8 +41,8 @@
-
+ +
diff --git a/interface/web/sites/templates/web_childdomain_edit.htm b/interface/web/sites/templates/web_childdomain_edit.htm index 04a355d29..1b65b19c3 100644 --- a/interface/web/sites/templates/web_childdomain_edit.htm +++ b/interface/web/sites/templates/web_childdomain_edit.htm @@ -9,8 +9,8 @@
-
-
+
+
@@ -20,13 +20,13 @@
-
+ +
-
-
+
+
@@ -34,8 +34,8 @@
-
+
+
@@ -43,15 +43,15 @@
-
+ +
-
+ +
@@ -60,14 +60,14 @@
-
+ +
-
+ +
diff --git a/interface/web/sites/templates/web_directive_snippets.htm b/interface/web/sites/templates/web_directive_snippets.htm index e89581fb5..93e8b94f8 100644 --- a/interface/web/sites/templates/web_directive_snippets.htm +++ b/interface/web/sites/templates/web_directive_snippets.htm @@ -10,5 +10,5 @@ {tmpl_var name='name'} - -
\ No newline at end of file + + \ No newline at end of file diff --git a/interface/web/sites/templates/web_folder_edit.htm b/interface/web/sites/templates/web_folder_edit.htm index 717736561..e02727a60 100644 --- a/interface/web/sites/templates/web_folder_edit.htm +++ b/interface/web/sites/templates/web_folder_edit.htm @@ -9,8 +9,8 @@
-
+ +
diff --git a/interface/web/sites/templates/web_folder_user_edit.htm b/interface/web/sites/templates/web_folder_user_edit.htm index be941b1db..f1e4cd179 100644 --- a/interface/web/sites/templates/web_folder_user_edit.htm +++ b/interface/web/sites/templates/web_folder_user_edit.htm @@ -9,8 +9,8 @@
-
+ +
diff --git a/interface/web/sites/templates/web_vhost_domain_advanced.htm b/interface/web/sites/templates/web_vhost_domain_advanced.htm index dbeaf077f..9a3a4f332 100644 --- a/interface/web/sites/templates/web_vhost_domain_advanced.htm +++ b/interface/web/sites/templates/web_vhost_domain_advanced.htm @@ -45,8 +45,8 @@
-
+ +
{tmpl_var name='pm_ondemand_hint_txt'}
diff --git a/interface/web/sites/templates/web_vhost_domain_backup.htm b/interface/web/sites/templates/web_vhost_domain_backup.htm index 4213a92cc..ae94a61d4 100644 --- a/interface/web/sites/templates/web_vhost_domain_backup.htm +++ b/interface/web/sites/templates/web_vhost_domain_backup.htm @@ -18,14 +18,14 @@
-
+ +
-
+ +
 {tmpl_var name='backup_excludes_note_txt'} diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm index 6f480e867..25d871121 100644 --- a/interface/web/sites/templates/web_vhost_domain_edit.htm +++ b/interface/web/sites/templates/web_vhost_domain_edit.htm @@ -21,22 +21,22 @@
-
+
+
-
+
+
-
+ +
@@ -47,14 +47,14 @@
-
+ +
-
+ + @@ -64,29 +64,29 @@
-
+ +
-
+ +
-
+ +
-
+
+
@@ -99,8 +99,8 @@
-
-
+
+
@@ -110,13 +110,13 @@
-
+ +
-
-
+
+
@@ -130,16 +130,16 @@
-
+
+
-
+ +
readonly="readonly"
/> @@ -196,8 +196,8 @@
-
+ +
@@ -208,14 +208,14 @@
-
+
+
-
+ + {tmpl_var name="directive_snippets_id"}
diff --git a/interface/web/sites/templates/web_vhost_domain_redirect.htm b/interface/web/sites/templates/web_vhost_domain_redirect.htm index 355791e6d..5367afff2 100644 --- a/interface/web/sites/templates/web_vhost_domain_redirect.htm +++ b/interface/web/sites/templates/web_vhost_domain_redirect.htm @@ -18,8 +18,8 @@
-
+ +
@@ -27,8 +27,8 @@
-
+ +
 {tmpl_var name="allowed_rewrite_rule_directives_txt"}

 break
 if
 return
 rewrite
 set

 http://wiki.nginx.org/HttpRewriteModule diff --git a/interface/web/sites/templates/web_vhost_domain_ssl.htm b/interface/web/sites/templates/web_vhost_domain_ssl.htm index 65ceb4f21..f5ddbeab7 100644 --- a/interface/web/sites/templates/web_vhost_domain_ssl.htm +++ b/interface/web/sites/templates/web_vhost_domain_ssl.htm @@ -28,16 +28,16 @@
-
{tmpl_var name='ssl_country'} - -
+ +
-
+ +
@@ -58,8 +58,8 @@
-
+ + {tmpl_if name="is_spdy_enabled"}
diff --git a/interface/web/sites/templates/web_vhost_domain_stats.htm b/interface/web/sites/templates/web_vhost_domain_stats.htm index e40b0521f..a0a41f98f 100644 --- a/interface/web/sites/templates/web_vhost_domain_stats.htm +++ b/interface/web/sites/templates/web_vhost_domain_stats.htm @@ -35,8 +35,8 @@
-
+ + diff --git a/interface/web/sites/templates/webdav_user_edit.htm b/interface/web/sites/templates/webdav_user_edit.htm index 7301c7b82..777c44e05 100644 --- a/interface/web/sites/templates/webdav_user_edit.htm +++ b/interface/web/sites/templates/webdav_user_edit.htm @@ -10,14 +10,14 @@
-
+ +
-
+ +
diff --git a/interface/web/themes/default/assets/images/flags_sprite.png b/interface/web/themes/default/assets/images/flags_sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..036a8aa41674a8e06d494a5f70e40734ed70b1f0 GIT binary patch literal 88755 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 XHFZ@a+U*rJ00000NkvXXu0mjfEZ#v4 literal 0 HcmV?d00001 diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css index e17343975..7064c57c4 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css @@ -367,6 +367,258 @@ ul.gs-resultbox li:last-child { border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; } +span.flags { + display: inline-block; + background-image: url("../images/flags_sprite.png"); + background-repeat: no-repeat; + height: 20px; + width: 30px; + vertical-align: middle; +} +span.flag-el {background-position:0 -1475px} +span.flag-ad {background-position:0 -1px} +span.flag-ae {background-position:0 -23px} +span.flag-af {background-position:0 -45px} +span.flag-ag {background-position:0 -67px} +span.flag-ai {background-position:0 -89px} +span.flag-al {background-position:0 -111px} +span.flag-am {background-position:0 -133px} +span.flag-an {background-position:0 -155px} +span.flag-ao {background-position:0 -177px} +span.flag-aq {background-position:0 -199px} +span.flag-ar {background-position:0 -221px} +span.flag-as {background-position:0 -243px} +span.flag-at {background-position:0 -265px} +span.flag-au {background-position:0 -287px} +span.flag-aw {background-position:0 -309px} +span.flag-ax {background-position:0 -331px} +span.flag-az {background-position:0 -353px} +span.flag-ba {background-position:0 -375px} +span.flag-bb {background-position:0 -397px} +span.flag-bd {background-position:0 -419px} +span.flag-be {background-position:0 -441px} +span.flag-bf {background-position:0 -463px} +span.flag-bg {background-position:0 -485px} +span.flag-bh {background-position:0 -507px} +span.flag-bi {background-position:0 -529px} +span.flag-bj {background-position:0 -551px} +span.flag-bm {background-position:0 -573px} +span.flag-bn {background-position:0 -595px} +span.flag-bo {background-position:0 -617px} +span.flag-br {background-position:0 -639px} +span.flag-bs {background-position:0 -661px} +span.flag-bt {background-position:0 -683px} +span.flag-bv {background-position:0 -705px} +span.flag-bw {background-position:0 -727px} +span.flag-by {background-position:0 -749px} +span.flag-bz {background-position:0 -771px} +span.flag-ca {background-position:0 -793px} +span.flag-cc {background-position:0 -837px} +span.flag-cd {background-position:0 -859px} +span.flag-cf {background-position:0 -881px} +span.flag-cg {background-position:0 -903px} +span.flag-ch {background-position:0 -925px} +span.flag-ci {background-position:0 -947px} +span.flag-ck {background-position:0 -969px} +span.flag-cl {background-position:0 -991px} +span.flag-cm {background-position:0 -1013px} +span.flag-cn {background-position:0 -1035px} +span.flag-co {background-position:0 -1057px} +span.flag-cr {background-position:0 -1079px} +span.flag-cs {background-position:0 -1101px} +span.flag-cu {background-position:0 -1123px} +span.flag-cv {background-position:0 -1145px} +span.flag-cx {background-position:0 -1167px} +span.flag-cy {background-position:0 -1189px} +span.flag-cz {background-position:0 -1211px} +span.flag-de {background-position:0 -1233px} +span.flag-dj {background-position:0 -1255px} +span.flag-dk {background-position:0 -1277px} +span.flag-dm {background-position:0 -1299px} +span.flag-do {background-position:0 -1321px} +span.flag-dz {background-position:0 -1343px} +span.flag-ec {background-position:0 -1365px} +span.flag-ee {background-position:0 -1387px} +span.flag-eg {background-position:0 -1409px} +span.flag-eh {background-position:0 -1431px} +span.flag-er {background-position:0 -1475px} +span.flag-es {background-position:0 -1497px} +span.flag-et {background-position:0 -1519px} +span.flag-fi {background-position:0 -1585px} +span.flag-fj {background-position:0 -1607px} +span.flag-fk {background-position:0 -1629px} +span.flag-fm {background-position:0 -1651px} +span.flag-fo {background-position:0 -1673px} +span.flag-fr {background-position:0 -1695px} +span.flag-ga {background-position:0 -1717px} +span.flag-gb {background-position:0 -1739px} +span.flag-gd {background-position:0 -1761px} +span.flag-ge {background-position:0 -1783px} +span.flag-gf {background-position:0 -1805px} +span.flag-gh {background-position:0 -1827px} +span.flag-gi {background-position:0 -1849px} +span.flag-gl {background-position:0 -1871px} +span.flag-gm {background-position:0 -1893px} +span.flag-gn {background-position:0 -1915px} +span.flag-gp {background-position:0 -1937px} +span.flag-gq {background-position:0 -1959px} +span.flag-gr {background-position:0 -1981px} +span.flag-gs {background-position:0 -2003px} +span.flag-gt {background-position:0 -2025px} +span.flag-gu {background-position:0 -2047px} +span.flag-gw {background-position:0 -2069px} +span.flag-gy {background-position:0 -2091px} +span.flag-hk {background-position:0 -2113px} +span.flag-hm {background-position:0 -2135px} +span.flag-hn {background-position:0 -2157px} +span.flag-hr {background-position:0 -2179px} +span.flag-ht {background-position:0 -2201px} +span.flag-hu {background-position:0 -2223px} +span.flag-id {background-position:0 -2245px} +span.flag-ie {background-position:0 -2267px} +span.flag-il {background-position:0 -2289px} +span.flag-in {background-position:0 -2311px} +span.flag-io {background-position:0 -2333px} +span.flag-iq {background-position:0 -2355px} +span.flag-ir {background-position:0 -2377px} +span.flag-is {background-position:0 -2399px} +span.flag-it {background-position:0 -2421px} +span.flag-jm {background-position:0 -2443px} +span.flag-jo {background-position:0 -2465px} +span.flag-jp {background-position:0 -2487px} +span.flag-ke {background-position:0 -2509px} +span.flag-kg {background-position:0 -2531px} +span.flag-kh {background-position:0 -2553px} +span.flag-ki {background-position:0 -2575px} +span.flag-km {background-position:0 -2597px} +span.flag-kn {background-position:0 -2619px} +span.flag-kp {background-position:0 -2641px} +span.flag-kr {background-position:0 -2663px} +span.flag-kw {background-position:0 -2685px} +span.flag-ky {background-position:0 -2707px} +span.flag-kz {background-position:0 -2729px} +span.flag-la {background-position:0 -2751px} +span.flag-lb {background-position:0 -2773px} +span.flag-lc {background-position:0 -2795px} +span.flag-li {background-position:0 -2817px} +span.flag-lk {background-position:0 -2839px} +span.flag-lr {background-position:0 -2861px} +span.flag-ls {background-position:0 -2883px} +span.flag-lt {background-position:0 -2905px} +span.flag-lu {background-position:0 -2927px} +span.flag-lv {background-position:0 -2949px} +span.flag-ly {background-position:0 -2971px} +span.flag-ma {background-position:0 -2993px} +span.flag-mc {background-position:0 -3015px} +span.flag-md {background-position:0 -3037px} +span.flag-me {background-position:0 -3059px} +span.flag-mg {background-position:0 -3081px} +span.flag-mh {background-position:0 -3103px} +span.flag-mk {background-position:0 -3125px} +span.flag-ml {background-position:0 -3147px} +span.flag-mm {background-position:0 -3169px} +span.flag-mn {background-position:0 -3191px} +span.flag-mo {background-position:0 -3213px} +span.flag-mp {background-position:0 -3235px} +span.flag-mq {background-position:0 -3257px} +span.flag-mr {background-position:0 -3279px} +span.flag-ms {background-position:0 -3301px} +span.flag-mt {background-position:0 -3323px} +span.flag-mu {background-position:0 -3345px} +span.flag-mv {background-position:0 -3367px} +span.flag-mw {background-position:0 -3389px} +span.flag-mx {background-position:0 -3411px} +span.flag-my {background-position:0 -3433px} +span.flag-mz {background-position:0 -3455px} +span.flag-na {background-position:0 -3477px} +span.flag-nc {background-position:0 -3499px} +span.flag-ne {background-position:0 -3521px} +span.flag-nf {background-position:0 -3543px} +span.flag-ng {background-position:0 -3565px} +span.flag-ni {background-position:0 -3587px} +span.flag-nl {background-position:0 -3609px} +span.flag-no {background-position:0 -3631px} +span.flag-np {background-position:0 -3653px} +span.flag-nr {background-position:0 -3675px} +span.flag-nu {background-position:0 -3697px} +span.flag-nz {background-position:0 -3719px} +span.flag-om {background-position:0 -3741px} +span.flag-pa {background-position:0 -3763px} +span.flag-pe {background-position:0 -3785px} +span.flag-pf {background-position:0 -3807px} +span.flag-pg {background-position:0 -3829px} +span.flag-ph {background-position:0 -3851px} +span.flag-pk {background-position:0 -3873px} +span.flag-pl {background-position:0 -3895px} +span.flag-pm {background-position:0 -3917px} +span.flag-pn {background-position:0 -3939px} +span.flag-pr {background-position:0 -3961px} +span.flag-ps {background-position:0 -3983px} +span.flag-pt {background-position:0 -4005px} +span.flag-pw {background-position:0 -4027px} +span.flag-py {background-position:0 -4049px} +span.flag-qa {background-position:0 -4071px} +span.flag-re {background-position:0 -4093px} +span.flag-ro {background-position:0 -4115px} +span.flag-rs {background-position:0 -4137px} +span.flag-ru {background-position:0 -4159px} +span.flag-rw {background-position:0 -4181px} +span.flag-sa {background-position:0 -4203px} +span.flag-sb {background-position:0 -4225px} +span.flag-sc {background-position:0 -4247px} +span.flag-sd {background-position:0 -4291px} +span.flag-se {background-position:0 -4313px} +span.flag-sg {background-position:0 -4335px} +span.flag-sh {background-position:0 -4357px} +span.flag-si {background-position:0 -4379px} +span.flag-sj {background-position:0 -4401px} +span.flag-sk {background-position:0 -4423px} +span.flag-sl {background-position:0 -4445px} +span.flag-sm {background-position:0 -4467px} +span.flag-sn {background-position:0 -4489px} +span.flag-so {background-position:0 -4511px} +span.flag-sr {background-position:0 -4533px} +span.flag-st {background-position:0 -4555px} +span.flag-sv {background-position:0 -4577px} +span.flag-sy {background-position:0 -4599px} +span.flag-sz {background-position:0 -4621px} +span.flag-tc {background-position:0 -4643px} +span.flag-td {background-position:0 -4665px} +span.flag-tf {background-position:0 -4687px} +span.flag-tg {background-position:0 -4709px} +span.flag-th {background-position:0 -4731px} +span.flag-tj {background-position:0 -4753px} +span.flag-tk {background-position:0 -4775px} +span.flag-tl {background-position:0 -4797px} +span.flag-tm {background-position:0 -4819px} +span.flag-tn {background-position:0 -4841px} +span.flag-to {background-position:0 -4863px} +span.flag-tr {background-position:0 -4885px} +span.flag-tt {background-position:0 -4907px} +span.flag-tv {background-position:0 -4929px} +span.flag-tw {background-position:0 -4951px} +span.flag-tz {background-position:0 -4973px} +span.flag-ua {background-position:0 -4995px} +span.flag-ug {background-position:0 -5017px} +span.flag-um {background-position:0 -5039px} +span.flag-us {background-position:0 -5061px} +span.flag-uy {background-position:0 -5083px} +span.flag-uz {background-position:0 -5105px} +span.flag-va {background-position:0 -5127px} +span.flag-vc {background-position:0 -5149px} +span.flag-ve {background-position:0 -5171px} +span.flag-vg {background-position:0 -5193px} +span.flag-vi {background-position:0 -5215px} +span.flag-vn {background-position:0 -5237px} +span.flag-vu {background-position:0 -5259px} +span.flag-wf {background-position:0 -5303px} +span.flag-ws {background-position:0 -5325px} +span.flag-ye {background-position:0 -5347px} +span.flag-yt {background-position:0 -5369px} +span.flag-za {background-position:0 -5391px} +span.flag-zm {background-position:0 -5413px} +span.flag-zw {background-position:0 -5435px} + @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { #logo { background-image: url("../images/logo@2x.png"); diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.min.css b/interface/web/themes/default/assets/stylesheets/ispconfig.min.css index 693063a87..326a9de69 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.min.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.min.css @@ -1 +1 @@ -body{overflow-y:scroll}.left{float:left}.right{float:right}.clear:after{content:"";display:table;clear:both}.marginTop15{margin-top:15px}.paddingX5{padding-left:5px!important;padding-right:5px!important}.width65{width:65px}.form-group input[type='checkbox']{margin-top:10px}.control-label{font-weight:normal}.control-label:after{content:":"}.formbutton-default{padding:6px 30px;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-success,.formbutton-danger{padding:6px 30px;border-style:solid;border-width:1px;border-bottom-width:solid;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-narrow{padding:6px 8px;margin-left:2px;margin-right:2px}.formbutton-narrower{padding:4px 6px}#main-wrapper{margin:0 auto;width:95%;max-width:1260px}#logo{float:left;width:200px;height:65px;background:url("../images/logo.png") no-repeat}#logo a{display:block;width:100%;height:100%}#headerbar{float:right}#searchform{float:right;margin-top:16px}#searchform>div{position:relative;display:table}#searchform>div>div{display:table-cell;padding-right:8px;vertical-align:top}#searchform .icon{padding:0 2px;font-size:16px}#logout-button{float:right;margin-top:16px;margin-left:25px;border-bottom-style:solid;border-bottom-width:2px;transition:all ease 500ms}#main-navigation{margin-top:24px}#main-navigation a{padding:0 12px;height:70px;border-bottom-style:solid;botder-bottom-width:2px;transition:all ease 500ms}#main-navigation .icon{font-size:32px}#main-navigation .title{margin-top:2px;font-weight:bold}.btn-group-justified .btn{border-right-width:0}.btn-group-justified .btn:last-of-type{border-right-width:1px}#content{width:78%}#sidebar{margin-top:27px;width:18%;border-style:solid;border-width:1px;border-radius:4px}#sidebar header{margin:1px;padding:0 10px;height:40px;line-height:40px;font-weight:bold;border-top-left-radius:2px;border-top-right-radius:2px}#sidebar ul{margin:0;padding:0;list-style:none}#sidebar li{padding:10px;border-top-style:solid;border-top-width:1px;font-size:12px}#sidebar a{text-decoration:none;transition:color ease 500ms}.page-header{margin:20px 0;padding:0}.alert-notification a{font-weight:bold;text-decoration:none;transition:color ease 500ms}.alert-label,.alert-content{display:inline-block;vertical-align:top}.alert-label{width:60px}.modules{margin:0;padding:0;list-style:none}.modules li{float:left;margin-right:15px;margin-bottom:15px;padding:8px;width:200px;border-radius:4px;border-style:solid;border-width:1px}.modules .icon{float:left;margin-right:15px;font-size:50px}.modules .left{margin-top:5px}.modules .title{margin-top:6px;margin-left:20px;font-size:16px;font-weight:bold}.modules .button{margin-top:10px;width:100%;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.modules a{text-decoration:none}.table-wrapper{margin-bottom:20px;border-radius:4px;border-style:solid;border-width:1px}.table{table-layout:fixed;margin-bottom:1px}.table caption{padding:5px 10px;text-align:left;font-weight:bold;font-size:18px;border-bottom-style:solid;border-bottom-width:1px}.table tbody tr{border-top-style:solid;border-top-width:1px;transition:background ease 500ms}.table tbody tr:last-child{border-radius:4px}.tfooter{margin-top:-1px;height:40px;border-top-style:solid;border-top-width:1px}.pagination{margin:10px 0}.progress{display:inline-block;margin-bottom:0;width:150px;height:10px}.content-tab-wrapper{border-style:solid;border-width:1px;border-radius:4px}.content-tab-wrapper .nav-tabs>li>a{border-radius:0;border:none!important;border-right-style:solid!important;border-right-width:1px!important;outline:0;font-weight:bold;transition:background ease 500ms}.content-tab-wrapper .nav-tabs li:not(:first-child) a{margin-left:-2px}.tab-content{padding:25px 10px}.input-group-btn .icon-calendar{font-size:18px}thead.dark th{height:40px;line-height:40px;font-weight:normal}thead.dark th.small-col{width:14%}thead.dark th.tiny-col{width:8%;overflow:hidden;text-overflow:ellipsis}thead.dark td input,thead.dark td select{width:100%}#footer{margin:20px 0;padding-top:20px;border-top-style:solid;border-top-width:1px;text-align:center;font-size:10px}.menu-btn{display:none;cursor:pointer}.df-container,.gs-container{position:relative}.gs-container:after{content:"";display:table;clear:both}ul.df-resultbox,ul.gs-resultbox{display:block;position:absolute;left:0;top:100%;margin:0;padding:0 0 10px;min-width:250px;max-width:500px;z-index:999999;background:#fff;list-style:none;box-shadow:2px 2px 5px #c5c5c5;border-radius:5px}ul.df-resultbox li,ul.gs-resultbox li{float:none;display:block;cursor:pointer;padding:0 10px}ul.gs-resultbox li{padding:3px 10px;line-height:1.1;font-size:.9em}ul.df-resultbox li:nth-child(even),ul.gs-resultbox li:nth-child(even){background:#f2f5f7}ul.df-resultbox li.df-cheader,ul.gs-resultbox li.gs-cheader{background:#fff;padding-top:10px;margin-bottom:10px}ul.df-resultbox li p,ul.gs-resultbox li p{margin-bottom:0;color:inherit}ul.df-resultbox li.df-cheader p.df-cheader-title,ul.gs-resultbox li.gs-cheader p.gs-cheader-title{font-weight:bold;margin-bottom:0}ul.df-resultbox li.df-cheader p.df-cheader-limit,ul.gs-resultbox li.gs-cheader p.gs-cheader-limit{font-weight:normal}ul.df-resultbox li.df-cdata img,ul.gs-resultbox li.gs-cdata img{margin-right:12px}ul.df-resultbox li.df-cdata p span.df-cdata-title,ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{font-weight:bold}ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{display:block}ul.df-resultbox li:first-child,ul.gs-resultbox li:first-child{border-top-left-radius:5px;border-top-right-radius:5px}ul.df-resultbox li:last-child,ul.gs-resultbox li:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#logo{background-image:url("../images/logo@2x.png");background-size:200px 65px}} \ No newline at end of file +body{overflow-y:scroll}.left{float:left}.right{float:right}.clear:after{content:"";display:table;clear:both}.marginTop15{margin-top:15px}.paddingX5{padding-left:5px!important;padding-right:5px!important}.width65{width:65px}.form-group input[type='checkbox']{margin-top:10px}.control-label{font-weight:normal}.control-label:after{content:":"}.formbutton-default{padding:6px 30px;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-success,.formbutton-danger{padding:6px 30px;border-style:solid;border-width:1px;border-bottom-width:solid;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-narrow{padding:6px 8px;margin-left:2px;margin-right:2px}.formbutton-narrower{padding:4px 6px}#main-wrapper{margin:0 auto;width:95%;max-width:1260px}#logo{float:left;width:200px;height:65px;background:url("../images/logo.png") no-repeat}#logo a{display:block;width:100%;height:100%}#headerbar{float:right}#searchform{float:right;margin-top:16px}#searchform>div{position:relative;display:table}#searchform>div>div{display:table-cell;padding-right:8px;vertical-align:top}#searchform .icon{padding:0 2px;font-size:16px}#logout-button{float:right;margin-top:16px;margin-left:25px;border-bottom-style:solid;border-bottom-width:2px;transition:all ease 500ms}#main-navigation{margin-top:24px}#main-navigation a{padding:0 12px;height:70px;border-bottom-style:solid;botder-bottom-width:2px;transition:all ease 500ms}#main-navigation .icon{font-size:32px}#main-navigation .title{margin-top:2px;font-weight:bold}.btn-group-justified .btn{border-right-width:0}.btn-group-justified .btn:last-of-type{border-right-width:1px}#content{width:78%}#sidebar{margin-top:27px;width:18%;border-style:solid;border-width:1px;border-radius:4px}#sidebar header{margin:1px;padding:0 10px;height:40px;line-height:40px;font-weight:bold;border-top-left-radius:2px;border-top-right-radius:2px}#sidebar ul{margin:0;padding:0;list-style:none}#sidebar li{padding:10px;border-top-style:solid;border-top-width:1px;font-size:12px}#sidebar a{text-decoration:none;transition:color ease 500ms}.page-header{margin:20px 0;padding:0}.alert-notification a{font-weight:bold;text-decoration:none;transition:color ease 500ms}.alert-label,.alert-content{display:inline-block;vertical-align:top}.alert-label{width:60px}.modules{margin:0;padding:0;list-style:none}.modules li{float:left;margin-right:15px;margin-bottom:15px;padding:8px;width:200px;border-radius:4px;border-style:solid;border-width:1px}.modules .icon{float:left;margin-right:15px;font-size:50px}.modules .left{margin-top:5px}.modules .title{margin-top:6px;margin-left:20px;font-size:16px;font-weight:bold}.modules .button{margin-top:10px;width:100%;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.modules a{text-decoration:none}.table-wrapper{margin-bottom:20px;border-radius:4px;border-style:solid;border-width:1px}.table{table-layout:fixed;margin-bottom:1px}.table caption{padding:5px 10px;text-align:left;font-weight:bold;font-size:18px;border-bottom-style:solid;border-bottom-width:1px}.table tbody tr{border-top-style:solid;border-top-width:1px;transition:background ease 500ms}.table tbody tr:last-child{border-radius:4px}.tfooter{margin-top:-1px;height:40px;border-top-style:solid;border-top-width:1px}.pagination{margin:10px 0}.progress{display:inline-block;margin-bottom:0;width:150px;height:10px}.content-tab-wrapper{border-style:solid;border-width:1px;border-radius:4px}.content-tab-wrapper .nav-tabs>li>a{border-radius:0;border:none!important;border-right-style:solid!important;border-right-width:1px!important;outline:0;font-weight:bold;transition:background ease 500ms}.content-tab-wrapper .nav-tabs li:not(:first-child) a{margin-left:-2px}.tab-content{padding:25px 10px}.input-group-btn .icon-calendar{font-size:18px}thead.dark th{height:40px;line-height:40px;font-weight:normal}thead.dark th.small-col{width:14%}thead.dark th.tiny-col{width:8%;overflow:hidden;text-overflow:ellipsis}thead.dark td input,thead.dark td select{width:100%}#footer{margin:20px 0;padding-top:20px;border-top-style:solid;border-top-width:1px;text-align:center;font-size:10px}.menu-btn{display:none;cursor:pointer}.df-container,.gs-container{position:relative}.gs-container:after{content:"";display:table;clear:both}ul.df-resultbox,ul.gs-resultbox{display:block;position:absolute;left:0;top:100%;margin:0;padding:0 0 10px;min-width:250px;max-width:500px;z-index:999999;background:#fff;list-style:none;box-shadow:2px 2px 5px #c5c5c5;border-radius:5px}ul.df-resultbox li,ul.gs-resultbox li{float:none;display:block;cursor:pointer;padding:0 10px}ul.gs-resultbox li{padding:3px 10px;line-height:1.1;font-size:.9em}ul.df-resultbox li:nth-child(even),ul.gs-resultbox li:nth-child(even){background:#f2f5f7}ul.df-resultbox li.df-cheader,ul.gs-resultbox li.gs-cheader{background:#fff;padding-top:10px;margin-bottom:10px}ul.df-resultbox li p,ul.gs-resultbox li p{margin-bottom:0;color:inherit}ul.df-resultbox li.df-cheader p.df-cheader-title,ul.gs-resultbox li.gs-cheader p.gs-cheader-title{font-weight:bold;margin-bottom:0}ul.df-resultbox li.df-cheader p.df-cheader-limit,ul.gs-resultbox li.gs-cheader p.gs-cheader-limit{font-weight:normal}ul.df-resultbox li.df-cdata img,ul.gs-resultbox li.gs-cdata img{margin-right:12px}ul.df-resultbox li.df-cdata p span.df-cdata-title,ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{font-weight:bold}ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{display:block}ul.df-resultbox li:first-child,ul.gs-resultbox li:first-child{border-top-left-radius:5px;border-top-right-radius:5px}ul.df-resultbox li:last-child,ul.gs-resultbox li:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}span.flags{display:inline-block;background-image:url("../images/flags_sprite.png");background-repeat:no-repeat;height:20px;width:30px;vertical-align:middle}span.flag-el{background-position:0 -1475px}span.flag-ad{background-position:0 -1px}span.flag-ae{background-position:0 -23px}span.flag-af{background-position:0 -45px}span.flag-ag{background-position:0 -67px}span.flag-ai{background-position:0 -89px}span.flag-al{background-position:0 -111px}span.flag-am{background-position:0 -133px}span.flag-an{background-position:0 -155px}span.flag-ao{background-position:0 -177px}span.flag-aq{background-position:0 -199px}span.flag-ar{background-position:0 -221px}span.flag-as{background-position:0 -243px}span.flag-at{background-position:0 -265px}span.flag-au{background-position:0 -287px}span.flag-aw{background-position:0 -309px}span.flag-ax{background-position:0 -331px}span.flag-az{background-position:0 -353px}span.flag-ba{background-position:0 -375px}span.flag-bb{background-position:0 -397px}span.flag-bd{background-position:0 -419px}span.flag-be{background-position:0 -441px}span.flag-bf{background-position:0 -463px}span.flag-bg{background-position:0 -485px}span.flag-bh{background-position:0 -507px}span.flag-bi{background-position:0 -529px}span.flag-bj{background-position:0 -551px}span.flag-bm{background-position:0 -573px}span.flag-bn{background-position:0 -595px}span.flag-bo{background-position:0 -617px}span.flag-br{background-position:0 -639px}span.flag-bs{background-position:0 -661px}span.flag-bt{background-position:0 -683px}span.flag-bv{background-position:0 -705px}span.flag-bw{background-position:0 -727px}span.flag-by{background-position:0 -749px}span.flag-bz{background-position:0 -771px}span.flag-ca{background-position:0 -793px}span.flag-cc{background-position:0 -837px}span.flag-cd{background-position:0 -859px}span.flag-cf{background-position:0 -881px}span.flag-cg{background-position:0 -903px}span.flag-ch{background-position:0 -925px}span.flag-ci{background-position:0 -947px}span.flag-ck{background-position:0 -969px}span.flag-cl{background-position:0 -991px}span.flag-cm{background-position:0 -1013px}span.flag-cn{background-position:0 -1035px}span.flag-co{background-position:0 -1057px}span.flag-cr{background-position:0 -1079px}span.flag-cs{background-position:0 -1101px}span.flag-cu{background-position:0 -1123px}span.flag-cv{background-position:0 -1145px}span.flag-cx{background-position:0 -1167px}span.flag-cy{background-position:0 -1189px}span.flag-cz{background-position:0 -1211px}span.flag-de{background-position:0 -1233px}span.flag-dj{background-position:0 -1255px}span.flag-dk{background-position:0 -1277px}span.flag-dm{background-position:0 -1299px}span.flag-do{background-position:0 -1321px}span.flag-dz{background-position:0 -1343px}span.flag-ec{background-position:0 -1365px}span.flag-ee{background-position:0 -1387px}span.flag-eg{background-position:0 -1409px}span.flag-eh{background-position:0 -1431px}span.flag-er{background-position:0 -1475px}span.flag-es{background-position:0 -1497px}span.flag-et{background-position:0 -1519px}span.flag-fi{background-position:0 -1585px}span.flag-fj{background-position:0 -1607px}span.flag-fk{background-position:0 -1629px}span.flag-fm{background-position:0 -1651px}span.flag-fo{background-position:0 -1673px}span.flag-fr{background-position:0 -1695px}span.flag-ga{background-position:0 -1717px}span.flag-gb{background-position:0 -1739px}span.flag-gd{background-position:0 -1761px}span.flag-ge{background-position:0 -1783px}span.flag-gf{background-position:0 -1805px}span.flag-gh{background-position:0 -1827px}span.flag-gi{background-position:0 -1849px}span.flag-gl{background-position:0 -1871px}span.flag-gm{background-position:0 -1893px}span.flag-gn{background-position:0 -1915px}span.flag-gp{background-position:0 -1937px}span.flag-gq{background-position:0 -1959px}span.flag-gr{background-position:0 -1981px}span.flag-gs{background-position:0 -2003px}span.flag-gt{background-position:0 -2025px}span.flag-gu{background-position:0 -2047px}span.flag-gw{background-position:0 -2069px}span.flag-gy{background-position:0 -2091px}span.flag-hk{background-position:0 -2113px}span.flag-hm{background-position:0 -2135px}span.flag-hn{background-position:0 -2157px}span.flag-hr{background-position:0 -2179px}span.flag-ht{background-position:0 -2201px}span.flag-hu{background-position:0 -2223px}span.flag-id{background-position:0 -2245px}span.flag-ie{background-position:0 -2267px}span.flag-il{background-position:0 -2289px}span.flag-in{background-position:0 -2311px}span.flag-io{background-position:0 -2333px}span.flag-iq{background-position:0 -2355px}span.flag-ir{background-position:0 -2377px}span.flag-is{background-position:0 -2399px}span.flag-it{background-position:0 -2421px}span.flag-jm{background-position:0 -2443px}span.flag-jo{background-position:0 -2465px}span.flag-jp{background-position:0 -2487px}span.flag-ke{background-position:0 -2509px}span.flag-kg{background-position:0 -2531px}span.flag-kh{background-position:0 -2553px}span.flag-ki{background-position:0 -2575px}span.flag-km{background-position:0 -2597px}span.flag-kn{background-position:0 -2619px}span.flag-kp{background-position:0 -2641px}span.flag-kr{background-position:0 -2663px}span.flag-kw{background-position:0 -2685px}span.flag-ky{background-position:0 -2707px}span.flag-kz{background-position:0 -2729px}span.flag-la{background-position:0 -2751px}span.flag-lb{background-position:0 -2773px}span.flag-lc{background-position:0 -2795px}span.flag-li{background-position:0 -2817px}span.flag-lk{background-position:0 -2839px}span.flag-lr{background-position:0 -2861px}span.flag-ls{background-position:0 -2883px}span.flag-lt{background-position:0 -2905px}span.flag-lu{background-position:0 -2927px}span.flag-lv{background-position:0 -2949px}span.flag-ly{background-position:0 -2971px}span.flag-ma{background-position:0 -2993px}span.flag-mc{background-position:0 -3015px}span.flag-md{background-position:0 -3037px}span.flag-me{background-position:0 -3059px}span.flag-mg{background-position:0 -3081px}span.flag-mh{background-position:0 -3103px}span.flag-mk{background-position:0 -3125px}span.flag-ml{background-position:0 -3147px}span.flag-mm{background-position:0 -3169px}span.flag-mn{background-position:0 -3191px}span.flag-mo{background-position:0 -3213px}span.flag-mp{background-position:0 -3235px}span.flag-mq{background-position:0 -3257px}span.flag-mr{background-position:0 -3279px}span.flag-ms{background-position:0 -3301px}span.flag-mt{background-position:0 -3323px}span.flag-mu{background-position:0 -3345px}span.flag-mv{background-position:0 -3367px}span.flag-mw{background-position:0 -3389px}span.flag-mx{background-position:0 -3411px}span.flag-my{background-position:0 -3433px}span.flag-mz{background-position:0 -3455px}span.flag-na{background-position:0 -3477px}span.flag-nc{background-position:0 -3499px}span.flag-ne{background-position:0 -3521px}span.flag-nf{background-position:0 -3543px}span.flag-ng{background-position:0 -3565px}span.flag-ni{background-position:0 -3587px}span.flag-nl{background-position:0 -3609px}span.flag-no{background-position:0 -3631px}span.flag-np{background-position:0 -3653px}span.flag-nr{background-position:0 -3675px}span.flag-nu{background-position:0 -3697px}span.flag-nz{background-position:0 -3719px}span.flag-om{background-position:0 -3741px}span.flag-pa{background-position:0 -3763px}span.flag-pe{background-position:0 -3785px}span.flag-pf{background-position:0 -3807px}span.flag-pg{background-position:0 -3829px}span.flag-ph{background-position:0 -3851px}span.flag-pk{background-position:0 -3873px}span.flag-pl{background-position:0 -3895px}span.flag-pm{background-position:0 -3917px}span.flag-pn{background-position:0 -3939px}span.flag-pr{background-position:0 -3961px}span.flag-ps{background-position:0 -3983px}span.flag-pt{background-position:0 -4005px}span.flag-pw{background-position:0 -4027px}span.flag-py{background-position:0 -4049px}span.flag-qa{background-position:0 -4071px}span.flag-re{background-position:0 -4093px}span.flag-ro{background-position:0 -4115px}span.flag-rs{background-position:0 -4137px}span.flag-ru{background-position:0 -4159px}span.flag-rw{background-position:0 -4181px}span.flag-sa{background-position:0 -4203px}span.flag-sb{background-position:0 -4225px}span.flag-sc{background-position:0 -4247px}span.flag-sd{background-position:0 -4291px}span.flag-se{background-position:0 -4313px}span.flag-sg{background-position:0 -4335px}span.flag-sh{background-position:0 -4357px}span.flag-si{background-position:0 -4379px}span.flag-sj{background-position:0 -4401px}span.flag-sk{background-position:0 -4423px}span.flag-sl{background-position:0 -4445px}span.flag-sm{background-position:0 -4467px}span.flag-sn{background-position:0 -4489px}span.flag-so{background-position:0 -4511px}span.flag-sr{background-position:0 -4533px}span.flag-st{background-position:0 -4555px}span.flag-sv{background-position:0 -4577px}span.flag-sy{background-position:0 -4599px}span.flag-sz{background-position:0 -4621px}span.flag-tc{background-position:0 -4643px}span.flag-td{background-position:0 -4665px}span.flag-tf{background-position:0 -4687px}span.flag-tg{background-position:0 -4709px}span.flag-th{background-position:0 -4731px}span.flag-tj{background-position:0 -4753px}span.flag-tk{background-position:0 -4775px}span.flag-tl{background-position:0 -4797px}span.flag-tm{background-position:0 -4819px}span.flag-tn{background-position:0 -4841px}span.flag-to{background-position:0 -4863px}span.flag-tr{background-position:0 -4885px}span.flag-tt{background-position:0 -4907px}span.flag-tv{background-position:0 -4929px}span.flag-tw{background-position:0 -4951px}span.flag-tz{background-position:0 -4973px}span.flag-ua{background-position:0 -4995px}span.flag-ug{background-position:0 -5017px}span.flag-um{background-position:0 -5039px}span.flag-us{background-position:0 -5061px}span.flag-uy{background-position:0 -5083px}span.flag-uz{background-position:0 -5105px}span.flag-va{background-position:0 -5127px}span.flag-vc{background-position:0 -5149px}span.flag-ve{background-position:0 -5171px}span.flag-vg{background-position:0 -5193px}span.flag-vi{background-position:0 -5215px}span.flag-vn{background-position:0 -5237px}span.flag-vu{background-position:0 -5259px}span.flag-wf{background-position:0 -5303px}span.flag-ws{background-position:0 -5325px}span.flag-ye{background-position:0 -5347px}span.flag-yt{background-position:0 -5369px}span.flag-za{background-position:0 -5391px}span.flag-zm{background-position:0 -5413px}span.flag-zw{background-position:0 -5435px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#logo{background-image:url("../images/logo@2x.png");background-size:200px 65px}} \ No newline at end of file diff --git a/interface/web/tools/templates/import_ispconfig.htm b/interface/web/tools/templates/import_ispconfig.htm index 0dbdfd0fc..830645012 100644 --- a/interface/web/tools/templates/import_ispconfig.htm +++ b/interface/web/tools/templates/import_ispconfig.htm @@ -32,14 +32,14 @@
-
+ +
-
+ +
diff --git a/interface/web/tools/templates/interface_settings.htm b/interface/web/tools/templates/interface_settings.htm index d13739fa2..54e55f5d4 100644 --- a/interface/web/tools/templates/interface_settings.htm +++ b/interface/web/tools/templates/interface_settings.htm @@ -10,15 +10,15 @@
-
+
+
-
+ + diff --git a/interface/web/tools/templates/resync.htm b/interface/web/tools/templates/resync.htm index 81b6ea4b3..31e111a2a 100644 --- a/interface/web/tools/templates/resync.htm +++ b/interface/web/tools/templates/resync.htm @@ -10,8 +10,8 @@
-
+ + {tmpl_var name="resync_no_server_txt"} @@ -26,8 +26,8 @@
-
+ + {tmpl_var name="resync_no_server_txt"} @@ -42,8 +42,8 @@
-
+ + {tmpl_var name="resync_no_server_txt"} @@ -58,8 +58,8 @@
-
+ + {tmpl_var name="resync_no_server_txt"} @@ -74,8 +74,8 @@
-
+ + {tmpl_var name="resync_no_server_txt"} @@ -90,8 +90,8 @@
-
+ + {tmpl_var name="resync_no_server_txt"} @@ -106,8 +106,8 @@
-
+ + {tmpl_var name="resync_no_server_txt"} @@ -122,8 +122,8 @@
-
+ + {tmpl_var name="resync_no_server_txt"} @@ -137,8 +137,8 @@
-
+ + {tmpl_var name="resync_no_server_txt"} @@ -153,8 +153,8 @@
-
+ + {tmpl_var name="resync_no_server_txt"} @@ -169,8 +169,8 @@
-
+ + {tmpl_var name="resync_no_server_txt"} diff --git a/interface/web/tools/templates/user_settings.htm b/interface/web/tools/templates/user_settings.htm index 483e1d3fe..cfc542553 100644 --- a/interface/web/tools/templates/user_settings.htm +++ b/interface/web/tools/templates/user_settings.htm @@ -21,10 +21,10 @@
-
{tmpl_var name='language'} - -
+ + diff --git a/interface/web/vm/templates/openvz_ip_edit.htm b/interface/web/vm/templates/openvz_ip_edit.htm index 2d981dbd6..d5a45169c 100644 --- a/interface/web/vm/templates/openvz_ip_edit.htm +++ b/interface/web/vm/templates/openvz_ip_edit.htm @@ -9,8 +9,8 @@
-
+ +
@@ -18,8 +18,8 @@
-
+ +
diff --git a/interface/web/vm/templates/openvz_ostemplate_edit.htm b/interface/web/vm/templates/openvz_ostemplate_edit.htm index b39fb1aa6..b4fa8c62f 100644 --- a/interface/web/vm/templates/openvz_ostemplate_edit.htm +++ b/interface/web/vm/templates/openvz_ostemplate_edit.htm @@ -15,8 +15,8 @@
-
+
+
diff --git a/interface/web/vm/templates/openvz_vm_edit.htm b/interface/web/vm/templates/openvz_vm_edit.htm index 871094aec..c4d449e4b 100644 --- a/interface/web/vm/templates/openvz_vm_edit.htm +++ b/interface/web/vm/templates/openvz_vm_edit.htm @@ -11,58 +11,58 @@
-
+
+
-
+
+
-
+ +
-
+ +
-
+ +
-
+ +
-
+ +
-
+ +
-- GitLab From 5c7919f4af2ca54d3766ffbf333a3b6cadee5305 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 8 Jan 2015 11:56:43 +0100 Subject: [PATCH 067/287] Layout improvement (flags and javascript) --- interface/web/admin/templates/remote_user_edit.htm | 4 ++-- interface/web/client/client_list.php | 2 +- interface/web/client/reseller_list.php | 2 +- interface/web/client/templates/clients_list.htm | 2 +- interface/web/client/templates/resellers_list.htm | 2 +- interface/web/js/scrigo.js.php | 6 +++--- .../web/sites/templates/database_user_edit.htm | 4 ++-- interface/web/sites/templates/ftp_user_edit.htm | 4 ++-- interface/web/sites/templates/shell_user_edit.htm | 4 ++-- .../default/assets/stylesheets/ispconfig.css | 5 ++--- .../default/assets/stylesheets/ispconfig.min.css | 2 +- .../web/themes/default/templates/main.tpl.htm | 14 +++++++------- 12 files changed, 25 insertions(+), 26 deletions(-) diff --git a/interface/web/admin/templates/remote_user_edit.htm b/interface/web/admin/templates/remote_user_edit.htm index bc59187e4..d518ebff6 100644 --- a/interface/web/admin/templates/remote_user_edit.htm +++ b/interface/web/admin/templates/remote_user_edit.htm @@ -7,8 +7,8 @@
-

{tmpl_var name='username_prefix'}

-
+
{tmpl_var name='username_prefix'}
+
diff --git a/interface/web/client/client_list.php b/interface/web/client/client_list.php index 7d0921771..43cc028b5 100644 --- a/interface/web/client/client_list.php +++ b/interface/web/client/client_list.php @@ -19,7 +19,7 @@ $app->uses('listform_actions'); $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->SQLExtSelect = ', LOWER(client.country) as countryiso'; $app->listform_actions->onLoad(); diff --git a/interface/web/client/reseller_list.php b/interface/web/client/reseller_list.php index 83f5d6199..d849ab964 100644 --- a/interface/web/client/reseller_list.php +++ b/interface/web/client/reseller_list.php @@ -49,7 +49,7 @@ $app->uses('listform_actions'); $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->SQLExtSelect = ', LOWER(client.country) as countryiso'; $app->listform_actions->onLoad(); diff --git a/interface/web/client/templates/clients_list.htm b/interface/web/client/templates/clients_list.htm index 6a1e37e35..263336ae8 100644 --- a/interface/web/client/templates/clients_list.htm +++ b/interface/web/client/templates/clients_list.htm @@ -47,7 +47,7 @@
- + - + - + - +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
@@ -30,7 +30,7 @@
{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="template_name"} diff --git a/interface/web/vm/templates/openvz_vm_list.htm b/interface/web/vm/templates/openvz_vm_list.htm index cb9908642..154bb4dd6 100644 --- a/interface/web/vm/templates/openvz_vm_list.htm +++ b/interface/web/vm/templates/openvz_vm_list.htm @@ -16,17 +16,17 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="veid"}{tmpl_var name="active"}{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="ostemplate_id"} {tmpl_var name="template_id"} {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="active"} {tmpl_var name="name"} {tmpl_var name="type"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="server_id"} {tmpl_var name="tcp_port"} {tmpl_var name="udp_port"} +
  
+
{tmpl_var name="name"} {tmpl_var name="description"} +
  
+
{tmpl_var name="multiport"} {tmpl_var name="state"} {tmpl_var name="target"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
  +
{tmpl_var name="remote_userid"} {tmpl_var name="remote_username"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="server_name"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="ip_address"} {tmpl_var name="virtualhost"} {tmpl_var name="virtualhost_port"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="file_server"} {tmpl_var name="db_server"} {tmpl_var name="vserver_server"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="server_id"} {tmpl_var name="client_id"} {tmpl_var name="name"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="package_title"} {tmpl_var name="package_description"} ispapp{tmpl_var name="package_id"} +   
+
{tmpl_var name="active"} {tmpl_var name="repo_name"} {tmpl_var name="repo_url"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="active"}
{tmpl_var name="typ"}
{tmpl_var name="groups"} + diff --git a/interface/web/client/templates/client_circle_list.htm b/interface/web/client/templates/client_circle_list.htm index 2e3654a9e..e125e036b 100644 --- a/interface/web/client/templates/client_circle_list.htm +++ b/interface/web/client/templates/client_circle_list.htm @@ -20,14 +20,14 @@ {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="active"} {tmpl_var name="circle_name"} {tmpl_var name="description"} +
  
{tmpl_var name="template_type"} {tmpl_var name="template_name"} + diff --git a/interface/web/client/templates/client_template_list.htm b/interface/web/client/templates/client_template_list.htm index 6cec1a36c..29f21ae61 100644 --- a/interface/web/client/templates/client_template_list.htm +++ b/interface/web/client/templates/client_template_list.htm @@ -19,13 +19,13 @@ {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="template_id"} {tmpl_var name="template_type"} {tmpl_var name="template_name"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="username"} {tmpl_var name="city"}
{tmpl_var name="country"}
+ diff --git a/interface/web/client/templates/domain_list.htm b/interface/web/client/templates/domain_list.htm index fa26d5529..657d3881d 100644 --- a/interface/web/client/templates/domain_list.htm +++ b/interface/web/client/templates/domain_list.htm @@ -18,12 +18,12 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="domain"} {tmpl_var name="sys_groupid"} +
  
{tmpl_var name="template_type"} {tmpl_var name="template_name"} + diff --git a/interface/web/client/templates/resellers_list.htm b/interface/web/client/templates/resellers_list.htm index 555244d1b..b59385a6c 100644 --- a/interface/web/client/templates/resellers_list.htm +++ b/interface/web/client/templates/resellers_list.htm @@ -23,7 +23,7 @@ {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="username"} {tmpl_var name="city"}
{tmpl_var name="country"}
+ {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="data"} {tmpl_var name="aux"} {tmpl_var name="ttl"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="server_id"} {tmpl_var name="origin"} {tmpl_var name="ns"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="server_id"} {tmpl_var name="origin"} {tmpl_var name="ns"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="origin"} {tmpl_var name="ns"} {tmpl_var name="mbox"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="origin"} {tmpl_var name="ns"} {tmpl_var name="mbox"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="visible"} {tmpl_var name="name"} +
{tmpl_var name="faq_question_txt"} {tmpl_var name="faq_section_name_txt"}{tmpl_var name="faq_delete_txt"}{tmpl_var name="faq_edit_txt"}{tmpl_var name="faq_delete_txt"}{tmpl_var name="faq_edit_txt"}
{tmpl_var name='hf_question'} {tmpl_var name='hf_section'} + +
{tmpl_var name="faq_section_name_txt"}{tmpl_var name="faq_delete_txt"}{tmpl_var name="faq_edit_txt"}{tmpl_var name="faq_delete_txt"}{tmpl_var name="faq_edit_txt"}
{tmpl_var name='hfs_name'} + +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
  +
{tmpl_var name="sender_id"} {tmpl_var name="subject"} {tmpl_var name="tstamp"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="active"} {tmpl_var name="source"} {tmpl_var name="destination"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="active"} {tmpl_var name="source"} {tmpl_var name="destination"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="server_id"} {tmpl_var name="source"} {tmpl_var name="type"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="server_id"} {tmpl_var name="pattern"} {tmpl_var name="action"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="sys_groupid"} {tmpl_var name="server_id"} {tmpl_var name="domain"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="active"} {tmpl_var name="source"} {tmpl_var name="destination"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="domain"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="active"} {tmpl_var name="source"} {tmpl_var name="destination"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="source_server"} {tmpl_var name="source_username"} {tmpl_var name="destination"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="listname"} {tmpl_var name="domain"} + diff --git a/interface/web/mail/templates/mail_relay_recipient_list.htm b/interface/web/mail/templates/mail_relay_recipient_list.htm index ec75ca1a9..555681b2d 100644 --- a/interface/web/mail/templates/mail_relay_recipient_list.htm +++ b/interface/web/mail/templates/mail_relay_recipient_list.htm @@ -34,13 +34,13 @@ {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="source"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="domain"} {tmpl_var name="transport"} {tmpl_var name="sort_order"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="date"} {tmpl_var name="filename"} {tmpl_var name="filesize"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
  +
{tmpl_var name="server_id"} {tmpl_var name="loglevel"} {tmpl_var name="message"} + diff --git a/interface/web/sites/templates/aps_instances_list.htm b/interface/web/sites/templates/aps_instances_list.htm index b67cf95f8..f8afad460 100644 --- a/interface/web/sites/templates/aps_instances_list.htm +++ b/interface/web/sites/templates/aps_instances_list.htm @@ -13,7 +13,7 @@ {tmpl_var name='install_location_txt'} {tmpl_var name='status_txt'}  
  +
{tmpl_var name='install_location_short'} {tmpl_var name='instance_status'} + diff --git a/interface/web/sites/templates/aps_packages_list.htm b/interface/web/sites/templates/aps_packages_list.htm index eb80c8698..8147326fc 100644 --- a/interface/web/sites/templates/aps_packages_list.htm +++ b/interface/web/sites/templates/aps_packages_list.htm @@ -12,7 +12,7 @@ {tmpl_var name='status_txt'}   
{tmpl_var name='package_status'}   
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="run_month"} {tmpl_var name="run_wday"} {tmpl_var name="command"} + diff --git a/interface/web/sites/templates/database_admin_list.htm b/interface/web/sites/templates/database_admin_list.htm index e16721dd6..ea2393877 100644 --- a/interface/web/sites/templates/database_admin_list.htm +++ b/interface/web/sites/templates/database_admin_list.htm @@ -23,18 +23,18 @@ {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="parent_domain_id"} {tmpl_var name="database_user_id"} {tmpl_var name="database_name"} + diff --git a/interface/web/sites/templates/database_list.htm b/interface/web/sites/templates/database_list.htm index a7fec3a8b..df903a45e 100644 --- a/interface/web/sites/templates/database_list.htm +++ b/interface/web/sites/templates/database_list.htm @@ -39,17 +39,17 @@ {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="parent_domain_id"} {tmpl_var name="database_user_id"} {tmpl_var name="database_name"} + diff --git a/interface/web/sites/templates/database_quota_stats_list.htm b/interface/web/sites/templates/database_quota_stats_list.htm index 1218225a5..f5b1def83 100644 --- a/interface/web/sites/templates/database_quota_stats_list.htm +++ b/interface/web/sites/templates/database_quota_stats_list.htm @@ -13,7 +13,7 @@ - {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
      +
{tmpl_var name="used"} {tmpl_var name="quota"} {tmpl_var name="percentage"}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="database_user"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="database_user"} + {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} {tmpl_var name="username"} + diff --git a/interface/web/sites/templates/shell_user_list.htm b/interface/web/sites/templates/shell_user_list.htm index ce907e4e4..080e738af 100644 --- a/interface/web/sites/templates/shell_user_list.htm +++ b/interface/web/sites/templates/shell_user_list.htm @@ -36,14 +36,14 @@ {tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} {tmpl_var name="username"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
      +
{tmpl_var name="soft"} {tmpl_var name="hard"} {tmpl_var name="files"}
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
{tmpl_var name="backup_type"} {tmpl_var name="filename"} {tmpl_var name="filesize"} +
diff --git a/interface/web/sites/templates/web_childdomain_list.htm b/interface/web/sites/templates/web_childdomain_list.htm index b6b97800a..4ca275bf1 100644 --- a/interface/web/sites/templates/web_childdomain_list.htm +++ b/interface/web/sites/templates/web_childdomain_list.htm @@ -36,14 +36,14 @@
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} {tmpl_var name="domain"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} {tmpl_var name="path"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="active"} {tmpl_var name="web_folder_id"} {tmpl_var name="username"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="last_month"} MB {tmpl_var name="this_year"} MB {tmpl_var name="last_year"} MB
{tmpl_var name="sum_last_month"} MB {tmpl_var name="sum_this_year"} MB {tmpl_var name="sum_last_year"} MB
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="sys_groupid"} {tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"}{tmpl_var name="domain"} + {tmpl_var name="domain"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="active"} {tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"}{tmpl_var name="domain"} + {tmpl_var name="domain"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="server_id"} {tmpl_var name="parent_domain_id"} {tmpl_var name="username"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="vm_id"} {tmpl_var name="ip_address"} {tmpl_var name="reserved"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="template_name"} {tmpl_var name="server_id"} {tmpl_var name="allservers"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="active"} {tmpl_var name="template_name"} +
{tmpl_var name='search_limit'}{tmpl_var name='search_limit'}
+
{tmpl_var name="template_id"} {tmpl_var name="hostname"} {tmpl_var name="ip_address"} + {tmpl_var name="customer_no"} {tmpl_var name="username"} {tmpl_var name="city"}
{tmpl_var name="country"}
{tmpl_var name="country"} diff --git a/interface/web/client/templates/resellers_list.htm b/interface/web/client/templates/resellers_list.htm index b59385a6c..176445d27 100644 --- a/interface/web/client/templates/resellers_list.htm +++ b/interface/web/client/templates/resellers_list.htm @@ -47,7 +47,7 @@ {tmpl_var name="customer_no"} {tmpl_var name="username"} {tmpl_var name="city"}
{tmpl_var name="country"}
{tmpl_var name="country"} diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php index 65bfe64ce..6aaf6fd01 100644 --- a/interface/web/js/scrigo.js.php +++ b/interface/web/js/scrigo.js.php @@ -95,17 +95,17 @@ if($server_config_array['misc']['use_combobox'] == 'y'){ ?> - $('#pageContent').find("select:not(.chosen-select)").select2({ + $('#pageContent,#sidebar').find("select:not(.chosen-select)").select2({ placeholder: '', width: 'element', selectOnBlur: true, allowClear: true, formatResult: function(o) { - if(o.id && $(o.element).parent().hasClass('flags')) return '' + o.text; + if(o.id && $(o.element).parent().hasClass('flags')) return '' + o.text + ''; else return o.text; }, formatSelection: function(o) { - if(o.id && $(o.element).parent().hasClass('flags')) return '' + o.text; + if(o.id && $(o.element).parent().hasClass('flags')) return '' + o.text + ''; else return o.text; } }).on('change', function(e) { diff --git a/interface/web/sites/templates/database_user_edit.htm b/interface/web/sites/templates/database_user_edit.htm index b06de154a..12d4aae83 100644 --- a/interface/web/sites/templates/database_user_edit.htm +++ b/interface/web/sites/templates/database_user_edit.htm @@ -23,8 +23,8 @@
-

{tmpl_var name='database_user_prefix'}

-
+
{tmpl_var name='database_user_prefix'}
+
 
{tmpl_var name='generate_password_txt'} diff --git a/interface/web/sites/templates/ftp_user_edit.htm b/interface/web/sites/templates/ftp_user_edit.htm index 5e55ce47b..ea8750216 100644 --- a/interface/web/sites/templates/ftp_user_edit.htm +++ b/interface/web/sites/templates/ftp_user_edit.htm @@ -13,8 +13,8 @@
-

{tmpl_var name='username_prefix'}

-
+
{tmpl_var name='username_prefix'}
+
 
{tmpl_var name='generate_password_txt'} diff --git a/interface/web/sites/templates/shell_user_edit.htm b/interface/web/sites/templates/shell_user_edit.htm index 0afee2109..937604ace 100644 --- a/interface/web/sites/templates/shell_user_edit.htm +++ b/interface/web/sites/templates/shell_user_edit.htm @@ -21,8 +21,8 @@
-

{tmpl_var name='username_prefix'}

-
+
{tmpl_var name='username_prefix'}
+
 
{tmpl_var name='generate_password_txt'} diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css index 7064c57c4..25b4679fd 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css @@ -368,11 +368,10 @@ ul.gs-resultbox li:last-child { border-bottom-right-radius: 5px; } span.flags { - display: inline-block; background-image: url("../images/flags_sprite.png"); background-repeat: no-repeat; - height: 20px; - width: 30px; + min-height: 20px; + padding-left: 27px; vertical-align: middle; } span.flag-el {background-position:0 -1475px} diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.min.css b/interface/web/themes/default/assets/stylesheets/ispconfig.min.css index 326a9de69..4ec3d1303 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.min.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.min.css @@ -1 +1 @@ -body{overflow-y:scroll}.left{float:left}.right{float:right}.clear:after{content:"";display:table;clear:both}.marginTop15{margin-top:15px}.paddingX5{padding-left:5px!important;padding-right:5px!important}.width65{width:65px}.form-group input[type='checkbox']{margin-top:10px}.control-label{font-weight:normal}.control-label:after{content:":"}.formbutton-default{padding:6px 30px;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-success,.formbutton-danger{padding:6px 30px;border-style:solid;border-width:1px;border-bottom-width:solid;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-narrow{padding:6px 8px;margin-left:2px;margin-right:2px}.formbutton-narrower{padding:4px 6px}#main-wrapper{margin:0 auto;width:95%;max-width:1260px}#logo{float:left;width:200px;height:65px;background:url("../images/logo.png") no-repeat}#logo a{display:block;width:100%;height:100%}#headerbar{float:right}#searchform{float:right;margin-top:16px}#searchform>div{position:relative;display:table}#searchform>div>div{display:table-cell;padding-right:8px;vertical-align:top}#searchform .icon{padding:0 2px;font-size:16px}#logout-button{float:right;margin-top:16px;margin-left:25px;border-bottom-style:solid;border-bottom-width:2px;transition:all ease 500ms}#main-navigation{margin-top:24px}#main-navigation a{padding:0 12px;height:70px;border-bottom-style:solid;botder-bottom-width:2px;transition:all ease 500ms}#main-navigation .icon{font-size:32px}#main-navigation .title{margin-top:2px;font-weight:bold}.btn-group-justified .btn{border-right-width:0}.btn-group-justified .btn:last-of-type{border-right-width:1px}#content{width:78%}#sidebar{margin-top:27px;width:18%;border-style:solid;border-width:1px;border-radius:4px}#sidebar header{margin:1px;padding:0 10px;height:40px;line-height:40px;font-weight:bold;border-top-left-radius:2px;border-top-right-radius:2px}#sidebar ul{margin:0;padding:0;list-style:none}#sidebar li{padding:10px;border-top-style:solid;border-top-width:1px;font-size:12px}#sidebar a{text-decoration:none;transition:color ease 500ms}.page-header{margin:20px 0;padding:0}.alert-notification a{font-weight:bold;text-decoration:none;transition:color ease 500ms}.alert-label,.alert-content{display:inline-block;vertical-align:top}.alert-label{width:60px}.modules{margin:0;padding:0;list-style:none}.modules li{float:left;margin-right:15px;margin-bottom:15px;padding:8px;width:200px;border-radius:4px;border-style:solid;border-width:1px}.modules .icon{float:left;margin-right:15px;font-size:50px}.modules .left{margin-top:5px}.modules .title{margin-top:6px;margin-left:20px;font-size:16px;font-weight:bold}.modules .button{margin-top:10px;width:100%;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.modules a{text-decoration:none}.table-wrapper{margin-bottom:20px;border-radius:4px;border-style:solid;border-width:1px}.table{table-layout:fixed;margin-bottom:1px}.table caption{padding:5px 10px;text-align:left;font-weight:bold;font-size:18px;border-bottom-style:solid;border-bottom-width:1px}.table tbody tr{border-top-style:solid;border-top-width:1px;transition:background ease 500ms}.table tbody tr:last-child{border-radius:4px}.tfooter{margin-top:-1px;height:40px;border-top-style:solid;border-top-width:1px}.pagination{margin:10px 0}.progress{display:inline-block;margin-bottom:0;width:150px;height:10px}.content-tab-wrapper{border-style:solid;border-width:1px;border-radius:4px}.content-tab-wrapper .nav-tabs>li>a{border-radius:0;border:none!important;border-right-style:solid!important;border-right-width:1px!important;outline:0;font-weight:bold;transition:background ease 500ms}.content-tab-wrapper .nav-tabs li:not(:first-child) a{margin-left:-2px}.tab-content{padding:25px 10px}.input-group-btn .icon-calendar{font-size:18px}thead.dark th{height:40px;line-height:40px;font-weight:normal}thead.dark th.small-col{width:14%}thead.dark th.tiny-col{width:8%;overflow:hidden;text-overflow:ellipsis}thead.dark td input,thead.dark td select{width:100%}#footer{margin:20px 0;padding-top:20px;border-top-style:solid;border-top-width:1px;text-align:center;font-size:10px}.menu-btn{display:none;cursor:pointer}.df-container,.gs-container{position:relative}.gs-container:after{content:"";display:table;clear:both}ul.df-resultbox,ul.gs-resultbox{display:block;position:absolute;left:0;top:100%;margin:0;padding:0 0 10px;min-width:250px;max-width:500px;z-index:999999;background:#fff;list-style:none;box-shadow:2px 2px 5px #c5c5c5;border-radius:5px}ul.df-resultbox li,ul.gs-resultbox li{float:none;display:block;cursor:pointer;padding:0 10px}ul.gs-resultbox li{padding:3px 10px;line-height:1.1;font-size:.9em}ul.df-resultbox li:nth-child(even),ul.gs-resultbox li:nth-child(even){background:#f2f5f7}ul.df-resultbox li.df-cheader,ul.gs-resultbox li.gs-cheader{background:#fff;padding-top:10px;margin-bottom:10px}ul.df-resultbox li p,ul.gs-resultbox li p{margin-bottom:0;color:inherit}ul.df-resultbox li.df-cheader p.df-cheader-title,ul.gs-resultbox li.gs-cheader p.gs-cheader-title{font-weight:bold;margin-bottom:0}ul.df-resultbox li.df-cheader p.df-cheader-limit,ul.gs-resultbox li.gs-cheader p.gs-cheader-limit{font-weight:normal}ul.df-resultbox li.df-cdata img,ul.gs-resultbox li.gs-cdata img{margin-right:12px}ul.df-resultbox li.df-cdata p span.df-cdata-title,ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{font-weight:bold}ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{display:block}ul.df-resultbox li:first-child,ul.gs-resultbox li:first-child{border-top-left-radius:5px;border-top-right-radius:5px}ul.df-resultbox li:last-child,ul.gs-resultbox li:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}span.flags{display:inline-block;background-image:url("../images/flags_sprite.png");background-repeat:no-repeat;height:20px;width:30px;vertical-align:middle}span.flag-el{background-position:0 -1475px}span.flag-ad{background-position:0 -1px}span.flag-ae{background-position:0 -23px}span.flag-af{background-position:0 -45px}span.flag-ag{background-position:0 -67px}span.flag-ai{background-position:0 -89px}span.flag-al{background-position:0 -111px}span.flag-am{background-position:0 -133px}span.flag-an{background-position:0 -155px}span.flag-ao{background-position:0 -177px}span.flag-aq{background-position:0 -199px}span.flag-ar{background-position:0 -221px}span.flag-as{background-position:0 -243px}span.flag-at{background-position:0 -265px}span.flag-au{background-position:0 -287px}span.flag-aw{background-position:0 -309px}span.flag-ax{background-position:0 -331px}span.flag-az{background-position:0 -353px}span.flag-ba{background-position:0 -375px}span.flag-bb{background-position:0 -397px}span.flag-bd{background-position:0 -419px}span.flag-be{background-position:0 -441px}span.flag-bf{background-position:0 -463px}span.flag-bg{background-position:0 -485px}span.flag-bh{background-position:0 -507px}span.flag-bi{background-position:0 -529px}span.flag-bj{background-position:0 -551px}span.flag-bm{background-position:0 -573px}span.flag-bn{background-position:0 -595px}span.flag-bo{background-position:0 -617px}span.flag-br{background-position:0 -639px}span.flag-bs{background-position:0 -661px}span.flag-bt{background-position:0 -683px}span.flag-bv{background-position:0 -705px}span.flag-bw{background-position:0 -727px}span.flag-by{background-position:0 -749px}span.flag-bz{background-position:0 -771px}span.flag-ca{background-position:0 -793px}span.flag-cc{background-position:0 -837px}span.flag-cd{background-position:0 -859px}span.flag-cf{background-position:0 -881px}span.flag-cg{background-position:0 -903px}span.flag-ch{background-position:0 -925px}span.flag-ci{background-position:0 -947px}span.flag-ck{background-position:0 -969px}span.flag-cl{background-position:0 -991px}span.flag-cm{background-position:0 -1013px}span.flag-cn{background-position:0 -1035px}span.flag-co{background-position:0 -1057px}span.flag-cr{background-position:0 -1079px}span.flag-cs{background-position:0 -1101px}span.flag-cu{background-position:0 -1123px}span.flag-cv{background-position:0 -1145px}span.flag-cx{background-position:0 -1167px}span.flag-cy{background-position:0 -1189px}span.flag-cz{background-position:0 -1211px}span.flag-de{background-position:0 -1233px}span.flag-dj{background-position:0 -1255px}span.flag-dk{background-position:0 -1277px}span.flag-dm{background-position:0 -1299px}span.flag-do{background-position:0 -1321px}span.flag-dz{background-position:0 -1343px}span.flag-ec{background-position:0 -1365px}span.flag-ee{background-position:0 -1387px}span.flag-eg{background-position:0 -1409px}span.flag-eh{background-position:0 -1431px}span.flag-er{background-position:0 -1475px}span.flag-es{background-position:0 -1497px}span.flag-et{background-position:0 -1519px}span.flag-fi{background-position:0 -1585px}span.flag-fj{background-position:0 -1607px}span.flag-fk{background-position:0 -1629px}span.flag-fm{background-position:0 -1651px}span.flag-fo{background-position:0 -1673px}span.flag-fr{background-position:0 -1695px}span.flag-ga{background-position:0 -1717px}span.flag-gb{background-position:0 -1739px}span.flag-gd{background-position:0 -1761px}span.flag-ge{background-position:0 -1783px}span.flag-gf{background-position:0 -1805px}span.flag-gh{background-position:0 -1827px}span.flag-gi{background-position:0 -1849px}span.flag-gl{background-position:0 -1871px}span.flag-gm{background-position:0 -1893px}span.flag-gn{background-position:0 -1915px}span.flag-gp{background-position:0 -1937px}span.flag-gq{background-position:0 -1959px}span.flag-gr{background-position:0 -1981px}span.flag-gs{background-position:0 -2003px}span.flag-gt{background-position:0 -2025px}span.flag-gu{background-position:0 -2047px}span.flag-gw{background-position:0 -2069px}span.flag-gy{background-position:0 -2091px}span.flag-hk{background-position:0 -2113px}span.flag-hm{background-position:0 -2135px}span.flag-hn{background-position:0 -2157px}span.flag-hr{background-position:0 -2179px}span.flag-ht{background-position:0 -2201px}span.flag-hu{background-position:0 -2223px}span.flag-id{background-position:0 -2245px}span.flag-ie{background-position:0 -2267px}span.flag-il{background-position:0 -2289px}span.flag-in{background-position:0 -2311px}span.flag-io{background-position:0 -2333px}span.flag-iq{background-position:0 -2355px}span.flag-ir{background-position:0 -2377px}span.flag-is{background-position:0 -2399px}span.flag-it{background-position:0 -2421px}span.flag-jm{background-position:0 -2443px}span.flag-jo{background-position:0 -2465px}span.flag-jp{background-position:0 -2487px}span.flag-ke{background-position:0 -2509px}span.flag-kg{background-position:0 -2531px}span.flag-kh{background-position:0 -2553px}span.flag-ki{background-position:0 -2575px}span.flag-km{background-position:0 -2597px}span.flag-kn{background-position:0 -2619px}span.flag-kp{background-position:0 -2641px}span.flag-kr{background-position:0 -2663px}span.flag-kw{background-position:0 -2685px}span.flag-ky{background-position:0 -2707px}span.flag-kz{background-position:0 -2729px}span.flag-la{background-position:0 -2751px}span.flag-lb{background-position:0 -2773px}span.flag-lc{background-position:0 -2795px}span.flag-li{background-position:0 -2817px}span.flag-lk{background-position:0 -2839px}span.flag-lr{background-position:0 -2861px}span.flag-ls{background-position:0 -2883px}span.flag-lt{background-position:0 -2905px}span.flag-lu{background-position:0 -2927px}span.flag-lv{background-position:0 -2949px}span.flag-ly{background-position:0 -2971px}span.flag-ma{background-position:0 -2993px}span.flag-mc{background-position:0 -3015px}span.flag-md{background-position:0 -3037px}span.flag-me{background-position:0 -3059px}span.flag-mg{background-position:0 -3081px}span.flag-mh{background-position:0 -3103px}span.flag-mk{background-position:0 -3125px}span.flag-ml{background-position:0 -3147px}span.flag-mm{background-position:0 -3169px}span.flag-mn{background-position:0 -3191px}span.flag-mo{background-position:0 -3213px}span.flag-mp{background-position:0 -3235px}span.flag-mq{background-position:0 -3257px}span.flag-mr{background-position:0 -3279px}span.flag-ms{background-position:0 -3301px}span.flag-mt{background-position:0 -3323px}span.flag-mu{background-position:0 -3345px}span.flag-mv{background-position:0 -3367px}span.flag-mw{background-position:0 -3389px}span.flag-mx{background-position:0 -3411px}span.flag-my{background-position:0 -3433px}span.flag-mz{background-position:0 -3455px}span.flag-na{background-position:0 -3477px}span.flag-nc{background-position:0 -3499px}span.flag-ne{background-position:0 -3521px}span.flag-nf{background-position:0 -3543px}span.flag-ng{background-position:0 -3565px}span.flag-ni{background-position:0 -3587px}span.flag-nl{background-position:0 -3609px}span.flag-no{background-position:0 -3631px}span.flag-np{background-position:0 -3653px}span.flag-nr{background-position:0 -3675px}span.flag-nu{background-position:0 -3697px}span.flag-nz{background-position:0 -3719px}span.flag-om{background-position:0 -3741px}span.flag-pa{background-position:0 -3763px}span.flag-pe{background-position:0 -3785px}span.flag-pf{background-position:0 -3807px}span.flag-pg{background-position:0 -3829px}span.flag-ph{background-position:0 -3851px}span.flag-pk{background-position:0 -3873px}span.flag-pl{background-position:0 -3895px}span.flag-pm{background-position:0 -3917px}span.flag-pn{background-position:0 -3939px}span.flag-pr{background-position:0 -3961px}span.flag-ps{background-position:0 -3983px}span.flag-pt{background-position:0 -4005px}span.flag-pw{background-position:0 -4027px}span.flag-py{background-position:0 -4049px}span.flag-qa{background-position:0 -4071px}span.flag-re{background-position:0 -4093px}span.flag-ro{background-position:0 -4115px}span.flag-rs{background-position:0 -4137px}span.flag-ru{background-position:0 -4159px}span.flag-rw{background-position:0 -4181px}span.flag-sa{background-position:0 -4203px}span.flag-sb{background-position:0 -4225px}span.flag-sc{background-position:0 -4247px}span.flag-sd{background-position:0 -4291px}span.flag-se{background-position:0 -4313px}span.flag-sg{background-position:0 -4335px}span.flag-sh{background-position:0 -4357px}span.flag-si{background-position:0 -4379px}span.flag-sj{background-position:0 -4401px}span.flag-sk{background-position:0 -4423px}span.flag-sl{background-position:0 -4445px}span.flag-sm{background-position:0 -4467px}span.flag-sn{background-position:0 -4489px}span.flag-so{background-position:0 -4511px}span.flag-sr{background-position:0 -4533px}span.flag-st{background-position:0 -4555px}span.flag-sv{background-position:0 -4577px}span.flag-sy{background-position:0 -4599px}span.flag-sz{background-position:0 -4621px}span.flag-tc{background-position:0 -4643px}span.flag-td{background-position:0 -4665px}span.flag-tf{background-position:0 -4687px}span.flag-tg{background-position:0 -4709px}span.flag-th{background-position:0 -4731px}span.flag-tj{background-position:0 -4753px}span.flag-tk{background-position:0 -4775px}span.flag-tl{background-position:0 -4797px}span.flag-tm{background-position:0 -4819px}span.flag-tn{background-position:0 -4841px}span.flag-to{background-position:0 -4863px}span.flag-tr{background-position:0 -4885px}span.flag-tt{background-position:0 -4907px}span.flag-tv{background-position:0 -4929px}span.flag-tw{background-position:0 -4951px}span.flag-tz{background-position:0 -4973px}span.flag-ua{background-position:0 -4995px}span.flag-ug{background-position:0 -5017px}span.flag-um{background-position:0 -5039px}span.flag-us{background-position:0 -5061px}span.flag-uy{background-position:0 -5083px}span.flag-uz{background-position:0 -5105px}span.flag-va{background-position:0 -5127px}span.flag-vc{background-position:0 -5149px}span.flag-ve{background-position:0 -5171px}span.flag-vg{background-position:0 -5193px}span.flag-vi{background-position:0 -5215px}span.flag-vn{background-position:0 -5237px}span.flag-vu{background-position:0 -5259px}span.flag-wf{background-position:0 -5303px}span.flag-ws{background-position:0 -5325px}span.flag-ye{background-position:0 -5347px}span.flag-yt{background-position:0 -5369px}span.flag-za{background-position:0 -5391px}span.flag-zm{background-position:0 -5413px}span.flag-zw{background-position:0 -5435px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#logo{background-image:url("../images/logo@2x.png");background-size:200px 65px}} \ No newline at end of file +body{overflow-y:scroll}.left{float:left}.right{float:right}.clear:after{content:"";display:table;clear:both}.marginTop15{margin-top:15px}.paddingX5{padding-left:5px!important;padding-right:5px!important}.width65{width:65px}.form-group input[type='checkbox']{margin-top:10px}.control-label{font-weight:normal}.control-label:after{content:":"}.formbutton-default{padding:6px 30px;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-success,.formbutton-danger{padding:6px 30px;border-style:solid;border-width:1px;border-bottom-width:solid;font-size:12px;font-weight:bold;transition:all ease 500ms}.formbutton-narrow{padding:6px 8px;margin-left:2px;margin-right:2px}.formbutton-narrower{padding:4px 6px}#main-wrapper{margin:0 auto;width:95%;max-width:1260px}#logo{float:left;width:200px;height:65px;background:url("../images/logo.png") no-repeat}#logo a{display:block;width:100%;height:100%}#headerbar{float:right}#searchform{float:right;margin-top:16px}#searchform>div{position:relative;display:table}#searchform>div>div{display:table-cell;padding-right:8px;vertical-align:top}#searchform .icon{padding:0 2px;font-size:16px}#logout-button{float:right;margin-top:16px;margin-left:25px;border-bottom-style:solid;border-bottom-width:2px;transition:all ease 500ms}#main-navigation{margin-top:24px}#main-navigation a{padding:0 12px;height:70px;border-bottom-style:solid;botder-bottom-width:2px;transition:all ease 500ms}#main-navigation .icon{font-size:32px}#main-navigation .title{margin-top:2px;font-weight:bold}.btn-group-justified .btn{border-right-width:0}.btn-group-justified .btn:last-of-type{border-right-width:1px}#content{width:78%}#sidebar{margin-top:27px;width:18%;border-style:solid;border-width:1px;border-radius:4px}#sidebar header{margin:1px;padding:0 10px;height:40px;line-height:40px;font-weight:bold;border-top-left-radius:2px;border-top-right-radius:2px}#sidebar ul{margin:0;padding:0;list-style:none}#sidebar li{padding:10px;border-top-style:solid;border-top-width:1px;font-size:12px}#sidebar a{text-decoration:none;transition:color ease 500ms}.page-header{margin:20px 0;padding:0}.alert-notification a{font-weight:bold;text-decoration:none;transition:color ease 500ms}.alert-label,.alert-content{display:inline-block;vertical-align:top}.alert-label{width:60px}.modules{margin:0;padding:0;list-style:none}.modules li{float:left;margin-right:15px;margin-bottom:15px;padding:8px;width:200px;border-radius:4px;border-style:solid;border-width:1px}.modules .icon{float:left;margin-right:15px;font-size:50px}.modules .left{margin-top:5px}.modules .title{margin-top:6px;margin-left:20px;font-size:16px;font-weight:bold}.modules .button{margin-top:10px;width:100%;border-bottom-style:solid;border-bottom-width:2px;font-size:12px;font-weight:bold;transition:all ease 500ms}.modules a{text-decoration:none}.table-wrapper{margin-bottom:20px;border-radius:4px;border-style:solid;border-width:1px}.table{table-layout:fixed;margin-bottom:1px}.table caption{padding:5px 10px;text-align:left;font-weight:bold;font-size:18px;border-bottom-style:solid;border-bottom-width:1px}.table tbody tr{border-top-style:solid;border-top-width:1px;transition:background ease 500ms}.table tbody tr:last-child{border-radius:4px}.tfooter{margin-top:-1px;height:40px;border-top-style:solid;border-top-width:1px}.pagination{margin:10px 0}.progress{display:inline-block;margin-bottom:0;width:150px;height:10px}.content-tab-wrapper{border-style:solid;border-width:1px;border-radius:4px}.content-tab-wrapper .nav-tabs>li>a{border-radius:0;border:none!important;border-right-style:solid!important;border-right-width:1px!important;outline:0;font-weight:bold;transition:background ease 500ms}.content-tab-wrapper .nav-tabs li:not(:first-child) a{margin-left:-2px}.tab-content{padding:25px 10px}.input-group-btn .icon-calendar{font-size:18px}thead.dark th{height:40px;line-height:40px;font-weight:normal}thead.dark th.small-col{width:14%}thead.dark th.tiny-col{width:8%;overflow:hidden;text-overflow:ellipsis}thead.dark td input,thead.dark td select{width:100%}#footer{margin:20px 0;padding-top:20px;border-top-style:solid;border-top-width:1px;text-align:center;font-size:10px}.menu-btn{display:none;cursor:pointer}.df-container,.gs-container{position:relative}.gs-container:after{content:"";display:table;clear:both}ul.df-resultbox,ul.gs-resultbox{display:block;position:absolute;left:0;top:100%;margin:0;padding:0 0 10px;min-width:250px;max-width:500px;z-index:999999;background:#fff;list-style:none;box-shadow:2px 2px 5px #c5c5c5;border-radius:5px}ul.df-resultbox li,ul.gs-resultbox li{float:none;display:block;cursor:pointer;padding:0 10px}ul.gs-resultbox li{padding:3px 10px;line-height:1.1;font-size:.9em}ul.df-resultbox li:nth-child(even),ul.gs-resultbox li:nth-child(even){background:#f2f5f7}ul.df-resultbox li.df-cheader,ul.gs-resultbox li.gs-cheader{background:#fff;padding-top:10px;margin-bottom:10px}ul.df-resultbox li p,ul.gs-resultbox li p{margin-bottom:0;color:inherit}ul.df-resultbox li.df-cheader p.df-cheader-title,ul.gs-resultbox li.gs-cheader p.gs-cheader-title{font-weight:bold;margin-bottom:0}ul.df-resultbox li.df-cheader p.df-cheader-limit,ul.gs-resultbox li.gs-cheader p.gs-cheader-limit{font-weight:normal}ul.df-resultbox li.df-cdata img,ul.gs-resultbox li.gs-cdata img{margin-right:12px}ul.df-resultbox li.df-cdata p span.df-cdata-title,ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{font-weight:bold}ul.gs-resultbox li.gs-cdata p span.gs-cdata-title{display:block}ul.df-resultbox li:first-child,ul.gs-resultbox li:first-child{border-top-left-radius:5px;border-top-right-radius:5px}ul.df-resultbox li:last-child,ul.gs-resultbox li:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}span.flags{background-image:url("../images/flags_sprite.png");background-repeat:no-repeat;min-height:20px;padding-left:27px;vertical-align:middle}span.flag-el{background-position:0 -1475px}span.flag-ad{background-position:0 -1px}span.flag-ae{background-position:0 -23px}span.flag-af{background-position:0 -45px}span.flag-ag{background-position:0 -67px}span.flag-ai{background-position:0 -89px}span.flag-al{background-position:0 -111px}span.flag-am{background-position:0 -133px}span.flag-an{background-position:0 -155px}span.flag-ao{background-position:0 -177px}span.flag-aq{background-position:0 -199px}span.flag-ar{background-position:0 -221px}span.flag-as{background-position:0 -243px}span.flag-at{background-position:0 -265px}span.flag-au{background-position:0 -287px}span.flag-aw{background-position:0 -309px}span.flag-ax{background-position:0 -331px}span.flag-az{background-position:0 -353px}span.flag-ba{background-position:0 -375px}span.flag-bb{background-position:0 -397px}span.flag-bd{background-position:0 -419px}span.flag-be{background-position:0 -441px}span.flag-bf{background-position:0 -463px}span.flag-bg{background-position:0 -485px}span.flag-bh{background-position:0 -507px}span.flag-bi{background-position:0 -529px}span.flag-bj{background-position:0 -551px}span.flag-bm{background-position:0 -573px}span.flag-bn{background-position:0 -595px}span.flag-bo{background-position:0 -617px}span.flag-br{background-position:0 -639px}span.flag-bs{background-position:0 -661px}span.flag-bt{background-position:0 -683px}span.flag-bv{background-position:0 -705px}span.flag-bw{background-position:0 -727px}span.flag-by{background-position:0 -749px}span.flag-bz{background-position:0 -771px}span.flag-ca{background-position:0 -793px}span.flag-cc{background-position:0 -837px}span.flag-cd{background-position:0 -859px}span.flag-cf{background-position:0 -881px}span.flag-cg{background-position:0 -903px}span.flag-ch{background-position:0 -925px}span.flag-ci{background-position:0 -947px}span.flag-ck{background-position:0 -969px}span.flag-cl{background-position:0 -991px}span.flag-cm{background-position:0 -1013px}span.flag-cn{background-position:0 -1035px}span.flag-co{background-position:0 -1057px}span.flag-cr{background-position:0 -1079px}span.flag-cs{background-position:0 -1101px}span.flag-cu{background-position:0 -1123px}span.flag-cv{background-position:0 -1145px}span.flag-cx{background-position:0 -1167px}span.flag-cy{background-position:0 -1189px}span.flag-cz{background-position:0 -1211px}span.flag-de{background-position:0 -1233px}span.flag-dj{background-position:0 -1255px}span.flag-dk{background-position:0 -1277px}span.flag-dm{background-position:0 -1299px}span.flag-do{background-position:0 -1321px}span.flag-dz{background-position:0 -1343px}span.flag-ec{background-position:0 -1365px}span.flag-ee{background-position:0 -1387px}span.flag-eg{background-position:0 -1409px}span.flag-eh{background-position:0 -1431px}span.flag-er{background-position:0 -1475px}span.flag-es{background-position:0 -1497px}span.flag-et{background-position:0 -1519px}span.flag-fi{background-position:0 -1585px}span.flag-fj{background-position:0 -1607px}span.flag-fk{background-position:0 -1629px}span.flag-fm{background-position:0 -1651px}span.flag-fo{background-position:0 -1673px}span.flag-fr{background-position:0 -1695px}span.flag-ga{background-position:0 -1717px}span.flag-gb{background-position:0 -1739px}span.flag-gd{background-position:0 -1761px}span.flag-ge{background-position:0 -1783px}span.flag-gf{background-position:0 -1805px}span.flag-gh{background-position:0 -1827px}span.flag-gi{background-position:0 -1849px}span.flag-gl{background-position:0 -1871px}span.flag-gm{background-position:0 -1893px}span.flag-gn{background-position:0 -1915px}span.flag-gp{background-position:0 -1937px}span.flag-gq{background-position:0 -1959px}span.flag-gr{background-position:0 -1981px}span.flag-gs{background-position:0 -2003px}span.flag-gt{background-position:0 -2025px}span.flag-gu{background-position:0 -2047px}span.flag-gw{background-position:0 -2069px}span.flag-gy{background-position:0 -2091px}span.flag-hk{background-position:0 -2113px}span.flag-hm{background-position:0 -2135px}span.flag-hn{background-position:0 -2157px}span.flag-hr{background-position:0 -2179px}span.flag-ht{background-position:0 -2201px}span.flag-hu{background-position:0 -2223px}span.flag-id{background-position:0 -2245px}span.flag-ie{background-position:0 -2267px}span.flag-il{background-position:0 -2289px}span.flag-in{background-position:0 -2311px}span.flag-io{background-position:0 -2333px}span.flag-iq{background-position:0 -2355px}span.flag-ir{background-position:0 -2377px}span.flag-is{background-position:0 -2399px}span.flag-it{background-position:0 -2421px}span.flag-jm{background-position:0 -2443px}span.flag-jo{background-position:0 -2465px}span.flag-jp{background-position:0 -2487px}span.flag-ke{background-position:0 -2509px}span.flag-kg{background-position:0 -2531px}span.flag-kh{background-position:0 -2553px}span.flag-ki{background-position:0 -2575px}span.flag-km{background-position:0 -2597px}span.flag-kn{background-position:0 -2619px}span.flag-kp{background-position:0 -2641px}span.flag-kr{background-position:0 -2663px}span.flag-kw{background-position:0 -2685px}span.flag-ky{background-position:0 -2707px}span.flag-kz{background-position:0 -2729px}span.flag-la{background-position:0 -2751px}span.flag-lb{background-position:0 -2773px}span.flag-lc{background-position:0 -2795px}span.flag-li{background-position:0 -2817px}span.flag-lk{background-position:0 -2839px}span.flag-lr{background-position:0 -2861px}span.flag-ls{background-position:0 -2883px}span.flag-lt{background-position:0 -2905px}span.flag-lu{background-position:0 -2927px}span.flag-lv{background-position:0 -2949px}span.flag-ly{background-position:0 -2971px}span.flag-ma{background-position:0 -2993px}span.flag-mc{background-position:0 -3015px}span.flag-md{background-position:0 -3037px}span.flag-me{background-position:0 -3059px}span.flag-mg{background-position:0 -3081px}span.flag-mh{background-position:0 -3103px}span.flag-mk{background-position:0 -3125px}span.flag-ml{background-position:0 -3147px}span.flag-mm{background-position:0 -3169px}span.flag-mn{background-position:0 -3191px}span.flag-mo{background-position:0 -3213px}span.flag-mp{background-position:0 -3235px}span.flag-mq{background-position:0 -3257px}span.flag-mr{background-position:0 -3279px}span.flag-ms{background-position:0 -3301px}span.flag-mt{background-position:0 -3323px}span.flag-mu{background-position:0 -3345px}span.flag-mv{background-position:0 -3367px}span.flag-mw{background-position:0 -3389px}span.flag-mx{background-position:0 -3411px}span.flag-my{background-position:0 -3433px}span.flag-mz{background-position:0 -3455px}span.flag-na{background-position:0 -3477px}span.flag-nc{background-position:0 -3499px}span.flag-ne{background-position:0 -3521px}span.flag-nf{background-position:0 -3543px}span.flag-ng{background-position:0 -3565px}span.flag-ni{background-position:0 -3587px}span.flag-nl{background-position:0 -3609px}span.flag-no{background-position:0 -3631px}span.flag-np{background-position:0 -3653px}span.flag-nr{background-position:0 -3675px}span.flag-nu{background-position:0 -3697px}span.flag-nz{background-position:0 -3719px}span.flag-om{background-position:0 -3741px}span.flag-pa{background-position:0 -3763px}span.flag-pe{background-position:0 -3785px}span.flag-pf{background-position:0 -3807px}span.flag-pg{background-position:0 -3829px}span.flag-ph{background-position:0 -3851px}span.flag-pk{background-position:0 -3873px}span.flag-pl{background-position:0 -3895px}span.flag-pm{background-position:0 -3917px}span.flag-pn{background-position:0 -3939px}span.flag-pr{background-position:0 -3961px}span.flag-ps{background-position:0 -3983px}span.flag-pt{background-position:0 -4005px}span.flag-pw{background-position:0 -4027px}span.flag-py{background-position:0 -4049px}span.flag-qa{background-position:0 -4071px}span.flag-re{background-position:0 -4093px}span.flag-ro{background-position:0 -4115px}span.flag-rs{background-position:0 -4137px}span.flag-ru{background-position:0 -4159px}span.flag-rw{background-position:0 -4181px}span.flag-sa{background-position:0 -4203px}span.flag-sb{background-position:0 -4225px}span.flag-sc{background-position:0 -4247px}span.flag-sd{background-position:0 -4291px}span.flag-se{background-position:0 -4313px}span.flag-sg{background-position:0 -4335px}span.flag-sh{background-position:0 -4357px}span.flag-si{background-position:0 -4379px}span.flag-sj{background-position:0 -4401px}span.flag-sk{background-position:0 -4423px}span.flag-sl{background-position:0 -4445px}span.flag-sm{background-position:0 -4467px}span.flag-sn{background-position:0 -4489px}span.flag-so{background-position:0 -4511px}span.flag-sr{background-position:0 -4533px}span.flag-st{background-position:0 -4555px}span.flag-sv{background-position:0 -4577px}span.flag-sy{background-position:0 -4599px}span.flag-sz{background-position:0 -4621px}span.flag-tc{background-position:0 -4643px}span.flag-td{background-position:0 -4665px}span.flag-tf{background-position:0 -4687px}span.flag-tg{background-position:0 -4709px}span.flag-th{background-position:0 -4731px}span.flag-tj{background-position:0 -4753px}span.flag-tk{background-position:0 -4775px}span.flag-tl{background-position:0 -4797px}span.flag-tm{background-position:0 -4819px}span.flag-tn{background-position:0 -4841px}span.flag-to{background-position:0 -4863px}span.flag-tr{background-position:0 -4885px}span.flag-tt{background-position:0 -4907px}span.flag-tv{background-position:0 -4929px}span.flag-tw{background-position:0 -4951px}span.flag-tz{background-position:0 -4973px}span.flag-ua{background-position:0 -4995px}span.flag-ug{background-position:0 -5017px}span.flag-um{background-position:0 -5039px}span.flag-us{background-position:0 -5061px}span.flag-uy{background-position:0 -5083px}span.flag-uz{background-position:0 -5105px}span.flag-va{background-position:0 -5127px}span.flag-vc{background-position:0 -5149px}span.flag-ve{background-position:0 -5171px}span.flag-vg{background-position:0 -5193px}span.flag-vi{background-position:0 -5215px}span.flag-vn{background-position:0 -5237px}span.flag-vu{background-position:0 -5259px}span.flag-wf{background-position:0 -5303px}span.flag-ws{background-position:0 -5325px}span.flag-ye{background-position:0 -5347px}span.flag-yt{background-position:0 -5369px}span.flag-za{background-position:0 -5391px}span.flag-zm{background-position:0 -5413px}span.flag-zw{background-position:0 -5435px}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#logo{background-image:url("../images/logo@2x.png");background-size:200px 65px}} \ 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 8a9646cd2..3e587ae63 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -107,7 +107,7 @@ $("#pageForm").submit(function(e){ //Prevent form submit: e.preventDefault() in lists - if ($(".panel #Filter").length > 0) { + if ($("#pageForm .table #Filter").length > 0) { e.preventDefault(); } }); @@ -130,9 +130,9 @@ $(document).on("change", function(event) { var elName = event.target.localName; - if ($(".panel #Filter").length > 0 && elName == 'select') { + if ($("#pageForm .table #Filter").length > 0 && elName == 'select') { event.preventDefault(); - $(".panel #Filter").trigger('click'); + $("#pageForm .table #Filter").trigger('click'); } if(elName == 'select' || elName == 'input' || elName == 'textarea') { if($(event.target).hasClass('no-page-form-change') == false) { @@ -160,9 +160,9 @@ $(document).bind("keypress", function(event) { //Use $ submit with keypress Enter in panel filterbar - if (event.which == '13' && $(".panel #Filter").length > 0 && $(event.target).hasClass('ui-autocomplete-input') == false ) { + if (event.which == '13' && $("#pageForm .table #Filter").length > 0 && $(event.target).hasClass('ui-autocomplete-input') == false ) { event.preventDefault(); - $(".panel #Filter").trigger('click'); + $("#pageForm .table #Filter").trigger('click'); } //Use $ submit with keypress Enter in forms if (event.which == '13' && $(".pnl_formsarea button.positive").length > 0 && event.target.localName != 'textarea' && $(event.target).is(':input')) { @@ -172,14 +172,14 @@ }); $(document).delegate('.pnl_listarea th', 'click', function(event) { - if($(this).attr('class').length > 0 && $(".panel #Filter").length > 0 && $(this).hasClass('tbl_col_buttons') == false && $(this).hasClass('tbl_col_limit') == false && $(this).hasClass('tbl_col_nosort') == false) { + if($(this).attr('class').length > 0 && $("#pageForm .table #Filter").length > 0 && $(this).hasClass('tbl_col_buttons') == false && $(this).hasClass('tbl_col_limit') == false && $(this).hasClass('tbl_col_nosort') == false) { event.preventDefault(); var clickevent = $('#Filter').attr('onclick'); var element = $(this).attr('class'); if(typeof clickevent == 'string') { $('#Filter').attr('onclick', clickevent.replace(".php')", ".php?orderby=" + element + "')")); } - $(".panel #Filter").trigger('click'); + $("#pageForm .table #Filter").trigger('click'); $("#pageForm").ajaxComplete(function() { if($("th."+element).css("background-position") == '0px -15px') { -- GitLab From 3fd01f4f60b54a46d358d59866dbd5256db8ef63 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 8 Jan 2015 12:01:37 +0100 Subject: [PATCH 068/287] Layout fix username prefixes --- interface/web/admin/templates/remote_user_edit.htm | 4 ++-- interface/web/sites/templates/database_user_edit.htm | 4 ++-- interface/web/sites/templates/ftp_user_edit.htm | 4 ++-- interface/web/sites/templates/shell_user_edit.htm | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/interface/web/admin/templates/remote_user_edit.htm b/interface/web/admin/templates/remote_user_edit.htm index d518ebff6..b460aef88 100644 --- a/interface/web/admin/templates/remote_user_edit.htm +++ b/interface/web/admin/templates/remote_user_edit.htm @@ -7,8 +7,8 @@
-
{tmpl_var name='username_prefix'}
-
+
{tmpl_var name='username_prefix'}
+
diff --git a/interface/web/sites/templates/database_user_edit.htm b/interface/web/sites/templates/database_user_edit.htm index 12d4aae83..50a28720b 100644 --- a/interface/web/sites/templates/database_user_edit.htm +++ b/interface/web/sites/templates/database_user_edit.htm @@ -23,8 +23,8 @@
-
{tmpl_var name='database_user_prefix'}
-
+
{tmpl_var name='database_user_prefix'}
+
 
{tmpl_var name='generate_password_txt'} diff --git a/interface/web/sites/templates/ftp_user_edit.htm b/interface/web/sites/templates/ftp_user_edit.htm index ea8750216..3b02dfdc8 100644 --- a/interface/web/sites/templates/ftp_user_edit.htm +++ b/interface/web/sites/templates/ftp_user_edit.htm @@ -13,8 +13,8 @@
-
{tmpl_var name='username_prefix'}
-
+
{tmpl_var name='username_prefix'}
+
 
{tmpl_var name='generate_password_txt'} diff --git a/interface/web/sites/templates/shell_user_edit.htm b/interface/web/sites/templates/shell_user_edit.htm index 937604ace..4db4630ec 100644 --- a/interface/web/sites/templates/shell_user_edit.htm +++ b/interface/web/sites/templates/shell_user_edit.htm @@ -21,8 +21,8 @@
-
{tmpl_var name='username_prefix'}
-
+
{tmpl_var name='username_prefix'}
+
 
{tmpl_var name='generate_password_txt'} -- GitLab From 72f804db02de804be7a1082493aa5233b10dce2b Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 8 Jan 2015 12:15:36 +0100 Subject: [PATCH 069/287] Layout fixes: field sizes --- .../templates/directive_snippets_edit.htm | 2 +- .../web/admin/templates/remote_user_edit.htm | 2 +- .../templates/server_config_rescue_edit.htm | 20 +++++++------- .../templates/system_config_domains_edit.htm | 2 +- .../web/admin/templates/users_user_edit.htm | 2 +- .../client/templates/client_edit_address.htm | 2 +- .../web/client/templates/client_message.htm | 4 +-- .../web/client/templates/message_template.htm | 4 +-- .../templates/reseller_edit_address.htm | 2 +- interface/web/js/jquery-2.1.1.min.js | 26 ------------------- interface/web/js/jquery.min.js | 4 +++ interface/web/js/scrigo.js.php | 19 +++++++++++++- .../mail/templates/mail_mailinglist_edit.htm | 2 +- .../mail/templates/mail_user_filter_list.htm | 4 +-- .../mail/templates/mail_user_mailbox_edit.htm | 2 +- .../templates/mail_user_password_edit.htm | 2 +- .../web/sites/templates/ftp_user_edit.htm | 2 +- .../web/sites/templates/shell_user_edit.htm | 2 +- .../templates/web_childdomain_advanced.htm | 2 +- .../sites/templates/web_folder_user_edit.htm | 2 +- .../templates/web_vhost_domain_advanced.htm | 10 +++---- .../templates/web_vhost_domain_redirect.htm | 2 +- .../templates/web_vhost_domain_stats.htm | 4 +-- .../web/sites/templates/webdav_user_edit.htm | 2 +- .../web/themes/default/templates/main.tpl.htm | 5 +--- .../web/tools/templates/user_settings.htm | 2 +- 26 files changed, 62 insertions(+), 70 deletions(-) delete mode 100755 interface/web/js/jquery-2.1.1.min.js create mode 100644 interface/web/js/jquery.min.js diff --git a/interface/web/admin/templates/directive_snippets_edit.htm b/interface/web/admin/templates/directive_snippets_edit.htm index 2bb7da5ff..e9a47bcf1 100644 --- a/interface/web/admin/templates/directive_snippets_edit.htm +++ b/interface/web/admin/templates/directive_snippets_edit.htm @@ -16,7 +16,7 @@
-
  {tmpl_var name='variables_txt'}: {DOCROOT}, {FASTCGIPASS} +
  {tmpl_var name='variables_txt'}: {DOCROOT}, {FASTCGIPASS}
diff --git a/interface/web/admin/templates/remote_user_edit.htm b/interface/web/admin/templates/remote_user_edit.htm index b460aef88..21afa867f 100644 --- a/interface/web/admin/templates/remote_user_edit.htm +++ b/interface/web/admin/templates/remote_user_edit.htm @@ -21,7 +21,7 @@
-
+
diff --git a/interface/web/admin/templates/server_config_rescue_edit.htm b/interface/web/admin/templates/server_config_rescue_edit.htm index b523e6959..ecab296a3 100644 --- a/interface/web/admin/templates/server_config_rescue_edit.htm +++ b/interface/web/admin/templates/server_config_rescue_edit.htm @@ -6,32 +6,32 @@ Rescue
-

{tmpl_var name='try_rescue_txt'}

-
+ +
{tmpl_var name='try_rescue'}
-

{tmpl_var name='do_not_try_rescue_httpd_txt'}

-
+ +
{tmpl_var name='do_not_try_rescue_httpd'}
-

{tmpl_var name='do_not_try_rescue_mongodb_txt'}

-
+ +
{tmpl_var name='do_not_try_rescue_mongodb'}
-

{tmpl_var name='do_not_try_rescue_mysql_txt'}

-
+ +
{tmpl_var name='do_not_try_rescue_mysql'}
-

{tmpl_var name='do_not_try_rescue_mail_txt'}

-
+ +
{tmpl_var name='do_not_try_rescue_mail'}
diff --git a/interface/web/admin/templates/system_config_domains_edit.htm b/interface/web/admin/templates/system_config_domains_edit.htm index da384d416..427c840f9 100644 --- a/interface/web/admin/templates/system_config_domains_edit.htm +++ b/interface/web/admin/templates/system_config_domains_edit.htm @@ -17,7 +17,7 @@
-
+
diff --git a/interface/web/admin/templates/users_user_edit.htm b/interface/web/admin/templates/users_user_edit.htm index d55351f9d..1b2603221 100644 --- a/interface/web/admin/templates/users_user_edit.htm +++ b/interface/web/admin/templates/users_user_edit.htm @@ -19,7 +19,7 @@
-
+
diff --git a/interface/web/client/templates/client_edit_address.htm b/interface/web/client/templates/client_edit_address.htm index 255a85d01..a1fc74760 100644 --- a/interface/web/client/templates/client_edit_address.htm +++ b/interface/web/client/templates/client_edit_address.htm @@ -38,7 +38,7 @@
-
+
diff --git a/interface/web/client/templates/client_message.htm b/interface/web/client/templates/client_message.htm index caa7391bc..6b4068b12 100644 --- a/interface/web/client/templates/client_message.htm +++ b/interface/web/client/templates/client_message.htm @@ -22,10 +22,10 @@
-
+
-
 {tmpl_var name="variables_txt"} {tmpl_var name="message_variables"} +
 {tmpl_var name="variables_txt"} {tmpl_var name="message_variables"}
diff --git a/interface/web/client/templates/message_template.htm b/interface/web/client/templates/message_template.htm index 9855768b1..4a20c836b 100644 --- a/interface/web/client/templates/message_template.htm +++ b/interface/web/client/templates/message_template.htm @@ -18,11 +18,11 @@
-

{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"}
{tmpl_var name='variables_description_txt'} +

{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"}
{tmpl_var name='variables_description_txt'}
-
+

{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"}
{tmpl_var name='variables_description_txt'}
diff --git a/interface/web/client/templates/reseller_edit_address.htm b/interface/web/client/templates/reseller_edit_address.htm index e0cf2164d..d43bf32b9 100644 --- a/interface/web/client/templates/reseller_edit_address.htm +++ b/interface/web/client/templates/reseller_edit_address.htm @@ -38,7 +38,7 @@
-
+
diff --git a/interface/web/js/jquery-2.1.1.min.js b/interface/web/js/jquery-2.1.1.min.js deleted file mode 100755 index 05fb1ec2b..000000000 --- a/interface/web/js/jquery-2.1.1.min.js +++ /dev/null @@ -1,26 +0,0 @@ -/*! - * jQuery JavaScript Library v2.1.1 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-05-01T17:11Z - */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=a.length,c=_.type(a);return"function"===c||_.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(hb.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=ob[a]={};return _.each(a.match(nb)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+Math.random()}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ub,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:tb.test(c)?_.parseJSON(c):c}catch(e){}sb.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Kb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)rb.set(a[c],"globalEval",!b||rb.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(rb.hasData(a)&&(f=rb.access(a),g=rb.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sb.hasData(a)&&(h=sb.access(a),i=_.extend({},h),sb.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&yb.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Ob[a];return c||(c=t(a,b),"none"!==c&&c||(Nb=(Nb||_(" -
- - diff --git a/interface/web/themes/default_64_navimg/css/additional.css b/interface/web/themes/default_64_navimg/css/additional.css deleted file mode 100644 index c064817d9..000000000 --- a/interface/web/themes/default_64_navimg/css/additional.css +++ /dev/null @@ -1,64 +0,0 @@ -@media all -{ - #topNav a { - background-color: #D3D3D3; - background-position: center top; - background-repeat: no-repeat; - color:black; - display:inline-block; - height:20px; - padding-top:68px; - text-align:center; - text-decoration:none; - width:97px; - } - - .topnav-admin { - background-image: url('/themes/default_304/icons/x64/system.png') !important; - } - - .topnav-client { - background-image: url('/themes/default_304/icons/x64/client.png') !important; - } - - .topnav-mail { - background-image: url('/themes/default_304/icons/x64/email.png') !important; - } - - .topnav-monitor { - background-image: url('/themes/default_304/icons/x64/monitor.png') !important; - } - - .topnav-sites { - background-image: url('/themes/default_304/icons/x64/sites.png') !important; - } - - .topnav-dns { - background-image: url('/themes/default_304/icons/x64/dns.png') !important; - } - - .topnav-tools { - background-image: url('/themes/default_304/icons/x64/tools.png') !important; - } - - .topnav-help { - background-image: url('/themes/default_304/icons/x64/help.png') !important; - } - - .topnav- { - background-image: url('/themes/default_304/icons/x64/login.png') !important; - } - - .topnav-domain { - background-image: url('/themes/default_304/icons/x64/domain.png') !important; - } - - .topnav-dashboard { - background-image: url('/themes/default_304/icons/x64/dashboard.png') !important; - } - - .topnav-vm { - background-image: url("/themes/default_304/icons/x64/drawer.png") !important; - } - -} \ No newline at end of file diff --git a/interface/web/themes/default_64_navimg/icons/x16/arrow.png b/interface/web/themes/default_64_navimg/icons/x16/arrow.png deleted file mode 100644 index 82cfae37cce484b4f63c7cabf3eb6ab65fe8ccd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 531 zcmV+u0_^>XP)%i>VJ7jQeha)oawB!fk+Y?+pf! z1}HuQ#W6%10K!H+*TFUd@tGM<{{IKj7E|uW5N!Ym8+Kg<*?6Y&>firU9{l?cVgp?l zgJFPf+r^nc!85pU#Fm68o<3C8fdfmwwxB*J#ht7aBq-}Z!#|i6R{SRL9@W0ob zoBv&=UH zYoGl$UHas|=Ddes?7Q{#e~^0F{9Onah^KFwDVDbJ3@)s?_4|Lm)nES`?fU*7#0RR6 z0UCk`1E3&-NXmK)ES$WKK_GtB8KE8j|I6+9{~yE_OjsQQQjcN)w{au`mr(=;=8jkl z!e=CQ{r?Z5c_Np@@VM7AuuAGMfB@V8T!2YbgMlq*?imnfwJVEZ7SlwLM>c>7i1~n6 z28gwQ*cgVHtcsU086}rM`Px7%3&i|D%#3URBM`Gg4G{xkDI8b~s+j|1Dck@`FaT6! V`gL9)4>$k-002ovPDHLkV1mOd{Wt&s diff --git a/interface/web/themes/default_64_navimg/icons/x16/arrow_180.png b/interface/web/themes/default_64_navimg/icons/x16/arrow_180.png deleted file mode 100644 index a1e5e6bc61f8403e588f24a32090b5ccae1eef74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 540 zcmV+%0^|LOP)575TE}wkQdETI)}-&AI9k9nSwtAPMEeE40>4{HLH{Mv_F?HGppxT587w zmW>5<6OttA**s7)wh8W&YJLPQ?l1vH4m_xhwc_m#T!c^y#>4-($|2G2%N-X0*JM{zLQArIW?QRjz% zBmDsPhjN@E`tFM$IIj!1LXVyik=Lq3WLAfau(hib0|4KI2)EdRh_Ge_3brf6d`g5~ zDv^6{v?|6F6EBR)Utl7lh*;t@VKrHDicKj+o!tA8K*SOI`7eLL9%7$QVkV9mVD>GC e@u#|AH~aw`Ci-F}_rJaX0000^k7{*VF%F;@yyhMwr4=u2kTOUNb5kw&Lr6QCLC|F7m8ePn;Bf8i{?u%7X1 z*3^8Cu=dullaMQKeiWJ421HiX;8;y@H3Zl%_6a@^Mum|aV88UnpjGw*Tnzz??Lx1< zkx z+ew0o#nFxt>}vMoeD81YOkSCOvXd`W^1ieip=`r$HQi5=43X z5A1IBqqxzhInntO>|K1ULvr2o=)0c9!UJuJ4;8t61`6uGV2f)IIn{kwU**NRD_z*( z83Oy6{Dx1u7xPM5l;hh zt4Jw!JClp*>VlU=hiaH+zN0_$aBer4Gs~vd}~A#?*E#I^_k{a z#N*p?ikX-ho=&8QNHp1&i?=sP4O1t3A_IQ00006oofaR^$+cIsQ;DLZxBpj6Q@#iD5oe5Iu;&fuf1Rmn2M!3MC2?s|l*HrnDDp zEQQK`pdTt6qD)R$TA4#X&RA3g5spq$j;pipTyNf(H!pm5owL_k`#xO)K$C&;FMRVT zBLqKse}gsia2GA9c`5jO@X~45`A1Q9e^8^+ zH-rNnVU7Jy!`SzP8Aes-FRepqdwh~jR;KRFAC%ty3Fr0iDE0=iwxJJ&^*ty!^+JQs zJlop#MeESKopH(eAwOM3{zo9QSq5toul zG;L#}%upd#OJX{WKT~WO6t}Wc@ce(z^jPxBy_WT7rP534x - - - <tmpl_var name="app_title"> <tmpl_var name="app_version"> - "/> - - - - - - - - - - - - - - - - - - -
-
- - - - - -
- -
-
-
 
-
-
- - -
-
- - -
-
-
-
-
 
- -
- -
- - - -
-
- - diff --git a/interface/web/themes/default_combobox/css/additional.css b/interface/web/themes/default_combobox/css/additional.css deleted file mode 100644 index be7769b33..000000000 --- a/interface/web/themes/default_combobox/css/additional.css +++ /dev/null @@ -1,153 +0,0 @@ -.list button.ui-widget{position:absolute} - -/* - * jQuery UI CSS Framework 1.8.16 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Theming/API - */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and ../images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - - - -/* Component containers -----------------------------------*/ -.ui-widget-content a { color: #333333; } -.ui-widget-header { border: 1px solid #e78f08; background: #f6a828; color: #ffffff; font-weight: bold; } -.ui-widget-header a { color: #ffffff; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #F5F5F5; font-weight: bold; color: #1c94c4; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #dfdfdf; background: #FFFACD; font-weight: bold; } -.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #dfdfdf; background: #ffffff; font-weight: bold;} -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(../images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } -.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } - - -/* Icons -----------------------------------*/ - -/* states and ../images */ -.ui-icon { width: 16px; height: 16px; background-image: url(../images/ui-image.png); } -.ui-widget-content .ui-icon {background-image: url(../images/ui-image.png); } -.ui-widget-header .ui-icon {background-image: url(../images/ui-icons_ffffff_256x240.png); } -.ui-state-default .ui-icon { background-image: url(../images/ui-image.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../images/ui-image.png); } -.ui-state-active .ui-icon {background-image: url(../images/ui-image.png); } -.ui-state-highlight .ui-icon {background-image: url(../images/ui-image.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../images/ui-image.png); } - -/* positioning */ -.ui-icon-triangle-1-s { background-position: -64px -16px; } - -.ui-autocomplete { position: absolute; cursor: default; } - -/* workarounds */ -* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ - - -.ui-menu { - list-style:none; - padding: 2px; - margin: 0; - display:block; - float: left; -} -.ui-menu .ui-menu { - margin-top: -3px; -} -.ui-menu .ui-menu-item { - margin:0; - padding: 0; - zoom: 1; - float: left; - clear: left; - width: 100%; -} -.ui-menu .ui-menu-item a {text-align:left;text-decoration:none; - display:block; - padding:.1em .4em; - line-height:1.5; - zoom:1; - height: 15px; -} -.ui-menu .ui-menu-item a.ui-state-hover, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} -.ui-widget-content{background:#fff;border:1px solid #DFDFDF} -.ui-autocomplete-input{width:60%} -.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ -.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ -button.ui-button-icon-only { width:17px } /* button elements seem to need a little more width */ -.ui-button-icons-only { width: 3.4em; } -button.ui-button-icons-only { width: 3.7em; } - -/*button text element */ -.ui-button .ui-button-text { display: block; line-height: 1; } -.ui-button-text-only .ui-button-text { padding: .4em 1em; } -.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .20em; text-indent: -9999999px; } -.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } -.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } -.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } -/* no icon support for input elements, provide padding by default */ -input.ui-button { padding: .4em 1em; } - -/*button icon element(s) */ -.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -10px; } -.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } -.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } -.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } -.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } - -/*button sets*/ -.ui-buttonset { margin-right: 7px; } -.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } - -/* workarounds */ -button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ \ No newline at end of file diff --git a/interface/web/themes/default_combobox/icons/x16/arrow.png b/interface/web/themes/default_combobox/icons/x16/arrow.png deleted file mode 100644 index 82cfae37cce484b4f63c7cabf3eb6ab65fe8ccd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 531 zcmV+u0_^>XP)%i>VJ7jQeha)oawB!fk+Y?+pf! z1}HuQ#W6%10K!H+*TFUd@tGM<{{IKj7E|uW5N!Ym8+Kg<*?6Y&>firU9{l?cVgp?l zgJFPf+r^nc!85pU#Fm68o<3C8fdfmwwxB*J#ht7aBq-}Z!#|i6R{SRL9@W0ob zoBv&=UH zYoGl$UHas|=Ddes?7Q{#e~^0F{9Onah^KFwDVDbJ3@)s?_4|Lm)nES`?fU*7#0RR6 z0UCk`1E3&-NXmK)ES$WKK_GtB8KE8j|I6+9{~yE_OjsQQQjcN)w{au`mr(=;=8jkl z!e=CQ{r?Z5c_Np@@VM7AuuAGMfB@V8T!2YbgMlq*?imnfwJVEZ7SlwLM>c>7i1~n6 z28gwQ*cgVHtcsU086}rM`Px7%3&i|D%#3URBM`Gg4G{xkDI8b~s+j|1Dck@`FaT6! V`gL9)4>$k-002ovPDHLkV1mOd{Wt&s diff --git a/interface/web/themes/default_combobox/icons/x16/arrow_180.png b/interface/web/themes/default_combobox/icons/x16/arrow_180.png deleted file mode 100644 index a1e5e6bc61f8403e588f24a32090b5ccae1eef74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 540 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 bvybZd;V*89<3#-Vok3<7vBoq*r^x>Suu-C# diff --git a/interface/web/themes/default_combobox/ispconfig_version b/interface/web/themes/default_combobox/ispconfig_version deleted file mode 100644 index bb19ac367..000000000 --- a/interface/web/themes/default_combobox/ispconfig_version +++ /dev/null @@ -1 +0,0 @@ -3.0.4.6 \ No newline at end of file diff --git a/interface/web/themes/default_combobox/templates/main.tpl.htm b/interface/web/themes/default_combobox/templates/main.tpl.htm deleted file mode 100644 index a3929558d..000000000 --- a/interface/web/themes/default_combobox/templates/main.tpl.htm +++ /dev/null @@ -1,342 +0,0 @@ - - - - <tmpl_var name="app_title"> <tmpl_var name="app_version"> - "/> - - - - - - - - - - - - - - - - - - -
-
- - - - - -
- -
-
-
 
-
-
- - -
-
- - -
-
-
-
-
 
- -
- -
- - - -
-
- - diff --git a/interface/web/themes/default_no_navimg/css/additional.css b/interface/web/themes/default_no_navimg/css/additional.css deleted file mode 100644 index d17ab55d2..000000000 --- a/interface/web/themes/default_no_navimg/css/additional.css +++ /dev/null @@ -1,68 +0,0 @@ -@media all -{ - #topNav a { - background-color: #D3D3D3; - background-position: center top; - background-repeat: no-repeat; - color:black; - display:inline-block; - height:20px; - padding-top:5px; - text-align:center; - text-decoration:none; - width:66px; - } - - .topnav-admin { - background-image: none !important; - } - - .topnav-client { - background-image: none !important; - } - - .topnav-mail { - background-image: none !important; - } - - .topnav-monitor { - background-image: none !important; - } - - .topnav-vm { - background-image: none !important; - } - - .topnav-sites { - background-image: none !important; - } - - .topnav-dns { - background-image: none !important; - } - - .topnav-tools { - background-image: none !important; - } - - .topnav-help { - background-image: none !important; - } - - .topnav- { - background-image: none !important; - } - - .topnav-domain { - background-image: none !important; - } - - .topnav-dashboard { - background-image: none !important; - } - - .topnav-billing { - background-image: none !important; - } - -} \ No newline at end of file diff --git a/interface/web/themes/default_no_navimg/icons/x16/arrow.png b/interface/web/themes/default_no_navimg/icons/x16/arrow.png deleted file mode 100644 index 82cfae37cce484b4f63c7cabf3eb6ab65fe8ccd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 531 zcmV+u0_^>XP)%i>VJ7jQeha)oawB!fk+Y?+pf! z1}HuQ#W6%10K!H+*TFUd@tGM<{{IKj7E|uW5N!Ym8+Kg<*?6Y&>firU9{l?cVgp?l zgJFPf+r^nc!85pU#Fm68o<3C8fdfmwwxB*J#ht7aBq-}Z!#|i6R{SRL9@W0ob zoBv&=UH zYoGl$UHas|=Ddes?7Q{#e~^0F{9Onah^KFwDVDbJ3@)s?_4|Lm)nES`?fU*7#0RR6 z0UCk`1E3&-NXmK)ES$WKK_GtB8KE8j|I6+9{~yE_OjsQQQjcN)w{au`mr(=;=8jkl z!e=CQ{r?Z5c_Np@@VM7AuuAGMfB@V8T!2YbgMlq*?imnfwJVEZ7SlwLM>c>7i1~n6 z28gwQ*cgVHtcsU086}rM`Px7%3&i|D%#3URBM`Gg4G{xkDI8b~s+j|1Dck@`FaT6! V`gL9)4>$k-002ovPDHLkV1mOd{Wt&s diff --git a/interface/web/themes/default_no_navimg/icons/x16/arrow_180.png b/interface/web/themes/default_no_navimg/icons/x16/arrow_180.png deleted file mode 100644 index a1e5e6bc61f8403e588f24a32090b5ccae1eef74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 540 zcmV+%0^|LOP)575TE}wkQdETI)}-&AI9k9nSwtAPMEeE40>4{HLH{Mv_F?HGppxT587w zmW>5<6OttA**s7)wh8W&YJLPQ?l1vH4m_xhwc_m#T!c^y#>4-($|2G2%N-X0*JM{zLQArIW?QRjz% zBmDsPhjN@E`tFM$IIj!1LXVyik=Lq3WLAfau(hib0|4KI2)EdRh_Ge_3brf6d`g5~ zDv^6{v?|6F6EBR)Utl7lh*;t@VKrHDicKj+o!tA8K*SOI`7eLL9%7$QVkV9mVD>GC e@u#|AH~aw`Ci-F}_rJaX0000^k7{*VF%F;@yyhMwr4=u2kTOUNb5kw&Lr6QCLC|F7m8ePn;Bf8i{?u%7X1 z*3^8Cu=dullaMQKeiWJ421HiX;8;y@H3Zl%_6a@^Mum|aV88UnpjGw*Tnzz??Lx1< zkx z+ew0o#nFxt>}vMoeD81YOkSCOvXd`W^1ieip=`r$HQi5=43X z5A1IBqqxzhInntO>|K1ULvr2o=)0c9!UJuJ4;8t61`6uGV2f)IIn{kwU**NRD_z*( z83Oy6{Dx1u7xPM5l;hh zt4Jw!JClp*>VlU=hiaH+zN0_$aBer4Gs~vd}~A#?*E#I^_k{a z#N*p?ikX-ho=&8QNHp1&i?=sP4O1t3A_IQ00006oofaR^$+cIsQ;DLZxBpj6Q@#iD5oe5Iu;&fuf1Rmn2M!3MC2?s|l*HrnDDp zEQQK`pdTt6qD)R$TA4#X&RA3g5spq$j;pipTyNf(H!pm5owL_k`#xO)K$C&;FMRVT zBLqKse}gsia2GA9c`5jO@X~45`A1Q9e^8^+ zH-rNnVU7Jy!`SzP8Aes-FRepqdwh~jR;KRFAC%ty3Fr0iDE0=iwxJJ&^*ty!^+JQs zJlop#MeESKopH(eAwOM3{zo9QSq5toul zG;L#}%upd#OJX{WKT~WO6t}Wc@ce(z^jPxBy_WT7rP534x - - - <tmpl_var name="app_title"> <tmpl_var name="app_version"> - "/> - - - - - - - - - - - - - - - - - - -
-
- - - - - -
- -
-
-
 
-
-
- - -
-
- - -
-
-
-
-
 
- -
- -
- - - -
-
- - -- GitLab From 6bdb100adcf7c96184d1e60a63a1ab915cbd1c85 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Sat, 11 Apr 2015 15:13:54 +0200 Subject: [PATCH 198/287] Another APS fix --- server/lib/classes/aps_installer.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/server/lib/classes/aps_installer.inc.php b/server/lib/classes/aps_installer.inc.php index 1b0182148..d0871caba 100644 --- a/server/lib/classes/aps_installer.inc.php +++ b/server/lib/classes/aps_installer.inc.php @@ -698,6 +698,7 @@ class ApsInstaller extends ApsBase curl_setopt($ch, CURLOPT_TIMEOUT, 0); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); if(curl_exec($ch) === false) $app->log(curl_error($ch), 1); fclose($fh); curl_close($ch); -- GitLab From 2af58c77572fbc32c1c617764ebdd0252be24292 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Tue, 14 Apr 2015 18:54:42 +0200 Subject: [PATCH 199/287] - finished rewriting of sql statements --- install/dist/lib/debian60.lib.php | 2 +- install/dist/lib/fedora.lib.php | 18 +- install/dist/lib/gentoo.lib.php | 10 +- install/dist/lib/opensuse.lib.php | 18 +- install/lib/installer_base.lib.php | 160 +-- install/lib/mysql.lib.php | 1090 ++++++++++++----- install/lib/update.lib.php | 34 +- interface/lib/classes/aps_crawler.inc.php | 2 +- .../lib/classes/aps_guicontroller.inc.php | 39 +- interface/lib/classes/db_mysql.inc.php | 28 +- interface/lib/classes/listform.inc.php | 6 +- .../lib/classes/listform_actions.inc.php | 1 + .../lib/classes/plugin_dbhistory.inc.php | 7 +- interface/lib/classes/remote.d/client.inc.php | 2 - interface/lib/classes/remote.d/mail.inc.php | 1 - interface/lib/classes/remote.d/sites.inc.php | 3 +- interface/lib/classes/remoting.inc.php | 9 +- interface/lib/classes/remoting_lib.inc.php | 18 +- interface/lib/classes/searchform.inc.php | 10 +- .../lib/classes/sites_database_plugin.inc.php | 2 +- interface/lib/classes/tform.inc.php | 24 +- interface/lib/classes/tform_base.inc.php | 16 +- interface/lib/classes/tools_sites.inc.php | 5 +- .../plugins/mail_user_filter_plugin.inc.php | 6 +- .../sites_web_vhost_domain_plugin.inc.php | 10 +- .../lib/plugins/vm_openvz_plugin.inc.php | 6 +- interface/web/admin/server_config_edit.php | 2 +- .../web/admin/software_package_install.php | 8 +- interface/web/admin/software_package_list.php | 50 +- interface/web/admin/software_update_list.php | 12 +- interface/web/admin/system_config_edit.php | 2 +- interface/web/admin/users_edit.php | 8 +- interface/web/client/client_edit.php | 116 +- interface/web/client/client_message.php | 4 +- interface/web/client/reseller_edit.php | 75 +- interface/web/dashboard/ajax_get_json.php | 26 +- interface/web/login/index.php | 6 +- interface/web/login/password_reset.php | 7 +- interface/web/mail/mail_alias_edit.php | 16 +- interface/web/mail/mail_aliasdomain_edit.php | 11 +- .../web/mail/mail_content_filter_edit.php | 2 +- .../web/mail/mail_domain_catchall_edit.php | 8 +- interface/web/mail/mail_domain_del.php | 10 +- interface/web/mail/mail_domain_edit.php | 54 +- interface/web/mail/mail_forward_edit.php | 10 +- interface/web/mail/mail_mailinglist_edit.php | 30 +- interface/web/mail/mail_spamfilter_edit.php | 10 +- interface/web/mail/mail_user_edit.php | 34 +- interface/web/mail/mail_user_filter_edit.php | 2 +- interface/web/mail/mail_user_stats.php | 8 +- interface/web/mail/mail_whitelist_edit.php | 2 +- interface/web/mail/spamfilter_config_edit.php | 4 +- .../web/mail/spamfilter_whitelist_edit.php | 20 +- interface/web/mail/user_quota_stats.php | 2 - interface/web/mail/xmpp_domain_edit.php | 32 +- interface/web/sites/ajax_get_ip.php | 2 +- interface/web/sites/ajax_get_json.php | 37 +- interface/web/sites/aps_install_package.php | 2 +- .../web/sites/aps_installedpackages_list.php | 2 +- .../web/sites/aps_packagedetails_show.php | 2 +- interface/web/sites/database_user_edit.php | 28 +- interface/web/sites/ftp_user_edit.php | 38 +- interface/web/sites/shell_user_edit.php | 6 +- interface/web/sites/user_quota_stats.php | 4 +- interface/web/sites/web_folder_edit.php | 18 +- interface/web/sites/web_folder_user_edit.php | 16 +- interface/web/sites/web_vhost_domain_del.php | 20 +- interface/web/sites/web_vhost_domain_edit.php | 161 ++- interface/web/sites/webdav_user_edit.php | 18 +- interface/web/tools/import_ispconfig.php | 14 +- interface/web/tools/import_vpopmail.php | 6 +- interface/web/vm/openvz_action.php | 53 +- interface/web/vm/openvz_template_edit.php | 9 +- interface/web/vm/openvz_vm_edit.php | 18 +- server/lib/app.inc.php | 2 +- server/lib/classes/cron.d/500-backup.inc.php | 11 - server/lib/classes/db_mysql.inc.php | 30 +- .../plugins-available/apache2_plugin.inc.php | 101 +- .../plugins-available/bind_dlz_plugin.inc.php | 34 +- .../mongo_clientdb_plugin.inc.php | 12 +- server/plugins-available/nginx_plugin.inc.php | 79 +- server/plugins-available/xmpp_plugin.inc.php | 32 +- 82 files changed, 1611 insertions(+), 1242 deletions(-) diff --git a/install/dist/lib/debian60.lib.php b/install/dist/lib/debian60.lib.php index fab5628a7..41837647a 100644 --- a/install/dist/lib/debian60.lib.php +++ b/install/dist/lib/debian60.lib.php @@ -38,7 +38,7 @@ class installer extends installer_base { // check if virtual_transport must be changed if ($this->is_update) { - $tmp = $this->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); + $tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); $ini_array = ini_to_array(stripslashes($tmp['config'])); // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni() diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index 0355a6aa8..486bfea35 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -182,7 +182,7 @@ 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 - $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ".$conf['server_id']); + $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ?", $conf['server_id']); $server_ini_array = ini_to_array(stripslashes($server_ini_rec['config'])); unset($server_ini_rec); @@ -396,7 +396,7 @@ class installer_dist extends installer_base { // check if virtual_transport must be changed if ($this->is_update) { - $tmp = $this->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); + $tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); $ini_array = ini_to_array(stripslashes($tmp['config'])); // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni() @@ -705,7 +705,7 @@ class installer_dist extends installer_base { $tpl = new tpl('apache_ispconfig.conf.master'); $tpl->setVar('apache_version',getapacheversion()); - $records = $this->db->queryAllRecords('SELECT * FROM '.$conf['mysql']['master_database'].'.server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'"); + $records = $this->db->queryAllRecords("SELECT * FROM ?? WHERE server_id = ? AND virtualhost = 'y'", $conf['mysql']['master_database'] . '.server_ip', $conf['server_id']); $ip_addresses = array(); if(is_array($records) && count($records) > 0) { @@ -813,7 +813,7 @@ class installer_dist extends installer_base { $tcp_public_services = ''; $udp_public_services = ''; - $row = $this->db->queryOneRecord('SELECT * FROM '.$conf["mysql"]["database"].'.firewall WHERE server_id = '.intval($conf['server_id'])); + $row = $this->db->queryOneRecord('SELECT * FROM ?? WHERE server_id = ?', $conf["mysql"]["database"] . '.firewall', $conf['server_id']); if(trim($row["tcp_port"]) != '' || trim($row["udp_port"]) != ''){ $tcp_public_services = trim(str_replace(',', ' ', $row["tcp_port"])); @@ -824,7 +824,7 @@ class installer_dist extends installer_base { } if(!stristr($tcp_public_services, $conf['apache']['vhost_port'])) { $tcp_public_services .= ' '.intval($conf['apache']['vhost_port']); - if($row["tcp_port"] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ',".intval($conf['apache']['vhost_port'])."' WHERE server_id = ".intval($conf['server_id'])); + if($row["tcp_port"] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ? WHERE server_id = ?", ',' . intval($conf['apache']['vhost_port']), $conf['server_id']); } $content = str_replace("{TCP_PUBLIC_SERVICES}", $tcp_public_services, $content); @@ -1024,13 +1024,11 @@ class installer_dist extends installer_base { $file_server_enabled = ($conf['services']['file'])?1:0; $db_server_enabled = ($conf['services']['db'])?1:0; $vserver_server_enabled = ($conf['services']['vserver'])?1:0; - $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled' WHERE server_id = ".intval($conf['server_id']); + $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ?, vserver_server = ? WHERE server_id = ?"; + $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']); if($conf['mysql']['master_slave_setup'] == 'y') { - $this->dbmaster->query($sql); - $this->db->query($sql); - } else { - $this->db->query($sql); + $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']); } // chown install dir to root and chmod 755 diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index e184e8cf5..9cd9b968d 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -540,7 +540,7 @@ class installer extends installer_base $tpl = new tpl('apache_ispconfig.conf.master'); $tpl->setVar('apache_version',getapacheversion()); - $records = $this->db->queryAllRecords('SELECT * FROM '.$conf['mysql']['master_database'].'.server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'"); + $records = $this->db->queryAllRecords("SELECT * FROM ?? WHERE server_id = ? AND virtualhost = 'y'", $conf['mysql']['master_database'] . '.server_ip', $conf['server_id']); $ip_addresses = array(); if(is_array($records) && count($records) > 0) { @@ -889,13 +889,11 @@ class installer extends installer_base $db_server_enabled = ($conf['services']['db'])?1:0; $vserver_server_enabled = ($conf['services']['vserver'])?1:0; - $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled' WHERE server_id = ".intval($conf['server_id']); + $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ?, vserver_server = ? WHERE server_id = ?"; + $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']); if($conf['mysql']['master_slave_setup'] == 'y') { - $this->dbmaster->query($sql); - $this->db->query($sql); - } else { - $this->db->query($sql); + $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']); } // chown install dir to root and chmod 755 diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index 1af8cd899..50d8aa74e 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -212,7 +212,7 @@ 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 - $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ".$conf['server_id']); + $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ?", $conf['server_id']); $server_ini_array = ini_to_array(stripslashes($server_ini_rec['config'])); unset($server_ini_rec); @@ -451,7 +451,7 @@ class installer_dist extends installer_base { // check if virtual_transport must be changed if ($this->is_update) { - $tmp = $this->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); + $tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); $ini_array = ini_to_array(stripslashes($tmp['config'])); // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni() @@ -737,7 +737,7 @@ class installer_dist extends installer_base { $tpl = new tpl('apache_ispconfig.conf.master'); $tpl->setVar('apache_version',getapacheversion()); - $records = $this->db->queryAllRecords('SELECT * FROM '.$conf['mysql']['master_database'].'.server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'"); + $records = $this->db->queryAllRecords("SELECT * FROM ?? WHERE server_id = ? AND virtualhost = 'y'", $conf['mysql']['master_database'] . '.server_ip', $conf['server_id']); $ip_addresses = array(); if(is_array($records) && count($records) > 0) { @@ -887,7 +887,7 @@ class installer_dist extends installer_base { $tcp_public_services = ''; $udp_public_services = ''; - $row = $this->db->queryOneRecord('SELECT * FROM '.$conf["mysql"]["database"].'.firewall WHERE server_id = '.intval($conf['server_id'])); + $row = $this->db->queryOneRecord('SELECT * FROM ?? WHERE server_id = ?', $conf["mysql"]["database"] . '.firewall', $conf['server_id']); if(trim($row["tcp_port"]) != '' || trim($row["udp_port"]) != ''){ $tcp_public_services = trim(str_replace(',', ' ', $row["tcp_port"])); @@ -899,7 +899,7 @@ class installer_dist extends installer_base { if(!stristr($tcp_public_services, $conf['apache']['vhost_port'])) { $tcp_public_services .= ' '.intval($conf['apache']['vhost_port']); - if($row["tcp_port"] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ',".intval($conf['apache']['vhost_port'])."' WHERE server_id = ".intval($conf['server_id'])); + if($row["tcp_port"] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ? WHERE server_id = ?", ',' . intval($conf['apache']['vhost_port']), $conf['server_id']); } $content = str_replace("{TCP_PUBLIC_SERVICES}", $tcp_public_services, $content); @@ -1097,13 +1097,11 @@ class installer_dist extends installer_base { $file_server_enabled = ($conf['services']['file'])?1:0; $db_server_enabled = ($conf['services']['db'])?1:0; $vserver_server_enabled = ($conf['services']['vserver'])?1:0; - $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled' WHERE server_id = ".intval($conf['server_id']); + $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ?, vserver_server = ? WHERE server_id = ?"; + $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']);); if($conf['mysql']['master_slave_setup'] == 'y') { - $this->dbmaster->query($sql); - $this->db->query($sql); - } else { - $this->db->query($sql); + $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']);); } // chown install dir to root and chmod 755 diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 62ff8606a..a59945584 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -167,7 +167,7 @@ class installer_base { global $conf; //** Create the database - if(!$this->db->query('CREATE DATABASE IF NOT EXISTS '.$conf['mysql']['database'].' DEFAULT CHARACTER SET '.$conf['mysql']['charset'])) { + if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['mysql']['database'], $conf['mysql']['charset'])) { $this->error('Unable to create MySQL database: '.$conf['mysql']['database'].'.'); } @@ -192,8 +192,8 @@ class installer_base { } //* Load system.ini into the sys_ini table - $system_ini = $this->db->quote(rf('tpl/system.ini.master')); - $this->db->query("UPDATE sys_ini SET config = '$system_ini' WHERE sysini_id = 1"); + $system_ini = rf('tpl/system.ini.master'); + $this->db->query("UPDATE sys_ini SET config = ? WHERE sysini_id = 1", $system_ini); } } @@ -210,15 +210,13 @@ class installer_base { } // Delete ISPConfig user in the local database, in case that it exists - $this->db->query("DELETE FROM mysql.user WHERE User = '".$conf['mysql']['ispconfig_user']."' AND Host = '".$from_host."';"); - $this->db->query("DELETE FROM mysql.db WHERE Db = '".$conf['mysql']['database']."' AND Host = '".$from_host."';"); - $this->db->query('FLUSH PRIVILEGES;'); + $this->db->query("DELETE FROM mysql.user WHERE User = ? AND Host = ?", $conf['mysql']['ispconfig_user'], $from_host); + $this->db->query("DELETE FROM mysql.db WHERE Db = ? AND Host = ?", $conf['mysql']['database'], $from_host); + $this->db->query('FLUSH PRIVILEGES'); //* Create the ISPConfig database user in the local database - $query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON '.$conf['mysql']['database'].".* " - ."TO '".$conf['mysql']['ispconfig_user']."'@'".$from_host."' " - ."IDENTIFIED BY '".$conf['mysql']['ispconfig_password']."';"; - if(!$this->db->query($query)) { + $query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON ?? TO ?@? IDENTIFIED BY ?'; + if(!$this->db->query($query, $conf['mysql']['database'] . ".*", $conf['mysql']['ispconfig_user'], $from_host, $conf['mysql']['ispconfig_password'])) { $this->error('Unable to create database user: '.$conf['mysql']['ispconfig_user'].' Error: '.$this->db->errorMessage); } @@ -309,14 +307,14 @@ class installer_base { if($conf['mysql']['master_slave_setup'] == 'y') { //* Insert the server record in master DB - $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (1, 1, 'riud', 'riud', 'r', '".$conf['hostname']."', '$mail_server_enabled', '$web_server_enabled', '$dns_server_enabled', '$file_server_enabled', '$db_server_enabled', '$vserver_server_enabled', '$server_ini_content', 0, 1, $current_db_version, $proxy_server_enabled, $firewall_server_enabled);"; - $this->dbmaster->query($sql); + $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (1, 1, 'riud', 'riud', 'r', ?, ?, ?, ?, ?, ?, ?, ?, 0, 1, ?, ?, ?);"; + $this->dbmaster->query($sql, $conf['hostname'], $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $server_ini_content, $current_db_version, $proxy_server_enabled, $firewall_server_enabled); $conf['server_id'] = $this->dbmaster->insertID(); $conf['server_id'] = $conf['server_id']; //* Insert the same record in the local DB - $sql = "INSERT INTO `server` (`server_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES ('".$conf['server_id']."',1, 1, 'riud', 'riud', 'r', '".$conf['hostname']."', '$mail_server_enabled', '$web_server_enabled', '$dns_server_enabled', '$file_server_enabled', '$db_server_enabled', '$vserver_server_enabled', '$server_ini_content', 0, 1, $current_db_version, $proxy_server_enabled, $firewall_server_enabled);"; - $this->db->query($sql); + $sql = "INSERT INTO `server` (`server_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (?,1, 1, 'riud', 'riud', 'r', ?, ?, ?, ?, ?, ?, ?, 0, 1, ?, ?, ?);"; + $this->db->query($sql, $conf['server_id'], $conf['hostname'], $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $server_ini_content, $current_db_version, $proxy_server_enabled, $firewall_server_enabled); //* username for the ispconfig user $conf['mysql']['master_ispconfig_user'] = 'ispcsrv'.$conf['server_id']; @@ -325,8 +323,8 @@ class installer_base { } else { //* Insert the server, if its not a mster / slave setup - $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (1, 1, 'riud', 'riud', 'r', '".$conf['hostname']."', '$mail_server_enabled', '$web_server_enabled', '$dns_server_enabled', '$file_server_enabled', '$db_server_enabled', '$vserver_server_enabled', '$server_ini_content', 0, 1, $current_db_version, $proxy_server_enabled, $firewall_server_enabled);"; - $this->db->query($sql); + $sql = "INSERT INTO `server` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_name`, `mail_server`, `web_server`, `dns_server`, `file_server`, `db_server`, `vserver_server`, `config`, `updated`, `active`, `dbversion`,`firewall_server`,`proxy_server`) VALUES (1, 1, 'riud', 'riud', 'r', ?, ?, ?, ?, ?, ?, ?, ?, 0, 1, ?, ?, ?);"; + $this->db->query($sql, $conf['hostname'], $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $server_ini_content, $current_db_version, $proxy_server_enabled, $firewall_server_enabled); $conf['server_id'] = $this->db->insertID(); $conf['server_id'] = $conf['server_id']; } @@ -388,141 +386,141 @@ class installer_base { * if not, the user already exists and we do not need the pwd */ if ($value['pwd'] != ''){ - $query = "CREATE USER '".$value['user']."'@'".$host."' IDENTIFIED BY '" . $value['pwd'] . "'"; + $query = "CREATE USER ?@? IDENTIFIED BY ?"; if ($verbose){ echo "\n\n" . $query ."\n"; } - $this->dbmaster->query($query); // ignore the error + $this->dbmaster->query($query, $value['user'], $host, $value['pwd']); // ignore the error } /* * Try to delete all rights of the user in case that it exists. * In Case that it will not exist, do nothing (ignore the error!) */ - $query = "REVOKE ALL PRIVILEGES, GRANT OPTION FROM '".$value['user']."'@'".$host."' "; + $query = "REVOKE ALL PRIVILEGES, GRANT OPTION FROM ?@?"; if ($verbose){ echo "\n\n" . $query ."\n"; } - $this->dbmaster->query($query); // ignore the error + $this->dbmaster->query($query, $value['user'], $host); // ignore the error //* Create the ISPConfig database user in the remote database - $query = "GRANT SELECT ON ".$value['db'].".`server` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.server', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, INSERT ON ".$value['db'].".`sys_log` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, INSERT ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.sys_log', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, UPDATE(`status`, `error`) ON ".$value['db'].".`sys_datalog` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, UPDATE(`status`, `error`) ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.sys_datalog', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, UPDATE(`status`) ON ".$value['db'].".`software_update_inst` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, UPDATE(`status`) ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.software_update_inst', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, UPDATE(`updated`) ON ".$value['db'].".`server` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, UPDATE(`updated`) ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.server', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, UPDATE (`ssl_request`, `ssl_cert`, `ssl_action`, `ssl_key`) ON ".$value['db'].".`web_domain` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, UPDATE (`ssl_request`, `ssl_cert`, `ssl_action`, `ssl_key`) ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.web_domain', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT ON ".$value['db'].".`sys_group` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.sys_group', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, UPDATE (`action_state`, `response`) ON ".$value['db'].".`sys_remoteaction` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, UPDATE (`action_state`, `response`) ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.sys_remoteaction', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, INSERT , DELETE ON ".$value['db'].".`monitor_data` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, INSERT , DELETE ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.monitor_data', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, INSERT, UPDATE ON ".$value['db'].".`mail_traffic` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, INSERT, UPDATE ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.mail_traffic', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, INSERT, UPDATE ON ".$value['db'].".`web_traffic` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, INSERT, UPDATE ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.web_traffic', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, UPDATE, DELETE ON ".$value['db'].".`aps_instances` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, UPDATE, DELETE ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.aps_instances', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, DELETE ON ".$value['db'].".`aps_instances_settings` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, DELETE ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.aps_instances_settings', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, INSERT, DELETE ON ".$value['db'].".`web_backup` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, INSERT, DELETE ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.web_backup', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } - $query = "GRANT SELECT, INSERT, DELETE ON ".$value['db'].".`mail_backup` TO '".$value['user']."'@'".$host."' "; + $query = "GRANT SELECT, INSERT, DELETE ON ?? TO ?@?"; if ($verbose){ echo $query ."\n"; } - if(!$this->dbmaster->query($query)) { + if(!$this->dbmaster->query($query, $value['db'] . '.mail_backup', $value['user'], $host)) { $this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage); } } @@ -530,7 +528,7 @@ class installer_base { /* * It is all done. Relod the rights... */ - $this->dbmaster->query('FLUSH PRIVILEGES;'); + $this->dbmaster->query('FLUSH PRIVILEGES'); } } @@ -732,7 +730,7 @@ class 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 - $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM `" . $this->db->quote($conf["mysql"]["database"]) . "`.`server` WHERE server_id = ".$conf['server_id']); + $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']); $server_ini_array = ini_to_array(stripslashes($server_ini_rec['config'])); unset($server_ini_rec); @@ -974,7 +972,7 @@ class installer_base { // check if virtual_transport must be changed if ($this->is_update) { - $tmp = $this->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); + $tmp = $this->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); $ini_array = ini_to_array(stripslashes($tmp['config'])); // ini_array needs not to be checked, because already done in update.php -> updateDbAndIni() @@ -1250,18 +1248,18 @@ class installer_base { global $conf; //* Create the database - if(!$this->db->query('CREATE DATABASE IF NOT EXISTS '.$conf['powerdns']['database'].' DEFAULT CHARACTER SET '.$conf['mysql']['charset'])) { + if(!$this->db->query('CREATE DATABASE IF NOT EXISTS ?? DEFAULT CHARACTER SET ?', $conf['powerdns']['database'], $conf['mysql']['charset'])) { $this->error('Unable to create MySQL database: '.$conf['powerdns']['database'].'.'); } //* Create the ISPConfig database user in the local database - $query = "GRANT ALL ON `".$conf['powerdns']['database']."` . * TO '".$conf['mysql']['ispconfig_user']."'@'localhost';"; - if(!$this->db->query($query)) { + $query = "GRANT ALL ON ?? TO ?@'localhost'"; + if(!$this->db->query($query, $conf['powerdns']['database'] . '.*', $conf['mysql']['ispconfig_user'])) { $this->error('Unable to create user for powerdns database Error: '.$this->db->errorMessage); } //* Reload database privelages - $this->db->query('FLUSH PRIVILEGES;'); + $this->db->query('FLUSH PRIVILEGES'); //* load the powerdns databse dump if($conf['mysql']['admin_password'] == '') { @@ -1324,7 +1322,7 @@ class installer_base { if(!@is_dir('/etc/metronome/status')) mkdir('/etc/metronome/status', 0755, true); unlink('/etc/metronome/metronome.cfg.lua'); - $row = $this->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ".$conf["server_id"].""); + $row = $this->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $conf["server_id"]); $server_name = $row["server_name"]; $tpl = new tpl('metronome_conf_main.master'); @@ -1483,7 +1481,7 @@ Email Address []: $tpl = new tpl('apache_ispconfig.conf.master'); $tpl->setVar('apache_version',getapacheversion()); - $records = $this->db->queryAllRecords('SELECT * FROM '.$conf['mysql']['master_database'].'.server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'"); + $records = $this->db->queryAllRecords("SELECT * FROM ?? WHERE server_id = ? AND virtualhost = 'y'", $conf['mysql']['master_database'] . '.server_ip', $conf['server_id']); $ip_addresses = array(); if(is_array($records) && count($records) > 0) { @@ -1566,36 +1564,6 @@ Email Address []: //* add a sshusers group $command = 'groupadd sshusers'; if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - - /* - $row = $this->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ".$conf["server_id"].""); - $ip_address = gethostbyname($row["server_name"]); - $server_name = $row["server_name"]; - - //setup proxy.conf - $configfile = 'proxy.conf'; - if(is_file($conf["nginx"]["config_dir"].'/'.$configfile)) copy($conf["nginx"]["config_dir"].'/'.$configfile,$conf["nginx"]["config_dir"].'/'.$configfile.'~'); - if(is_file($conf["nginx"]["config_dir"].'/'.$configfile.'~')) exec('chmod 400 '.$conf["nginx"]["config_dir"].'/'.$configfile.'~'); - $content = rf("tpl/nginx_".$configfile.".master"); - wf($conf["nginx"]["config_dir"].'/'.$configfile,$content); - exec('chmod 600 '.$conf["nginx"]["config_dir"].'/'.$configfile); - exec('chown root:root '.$conf["nginx"]["config_dir"].'/'.$configfile); - - //setup conf.d/cache.conf - $configfile = 'cache.conf'; - if(is_file($conf["nginx"]["config_dir"].'/conf.d/'.$configfile)) copy($conf["nginx"]["config_dir"].'/conf.d/'.$configfile,$conf["nginx"]["config_dir"].'/conf.d/'.$configfile.'~'); - if(is_file($conf["nginx"]["config_dir"].'/conf.d/'.$configfile.'~')) exec('chmod 400 '.$conf["nginx"]["config_dir"].'/conf.d/'.$configfile.'~'); - $content = rf("tpl/nginx_".$configfile.".master"); - wf($conf["nginx"]["config_dir"].'/conf.d/'.$configfile,$content); - exec('chmod 600 '.$conf["nginx"]["config_dir"].'/conf.d/'.$configfile); - exec('chown root:root '.$conf["nginx"]["config_dir"].'/conf.d/'.$configfile); - - //setup cache directories - mkdir('/var/cache/nginx/cache'); - exec('chown www-data:www-data /var/cache/nginx/cache'); - mkdir('/var/cache/nginx/temp'); - exec('chown www-data:www-data /var/cache/nginx/temp'); - */ } public function configure_fail2ban() { @@ -1605,7 +1573,7 @@ Email Address []: public function configure_squid() { global $conf; - $row = $this->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ".$conf["server_id"].""); + $row = $this->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $conf["server_id"]); $ip_address = gethostbyname($row["server_name"]); $server_name = $row["server_name"]; @@ -1652,7 +1620,7 @@ Email Address []: $tcp_public_services = ''; $udp_public_services = ''; - $row = $this->db->queryOneRecord('SELECT * FROM '.$conf["mysql"]["database"].'.firewall WHERE server_id = '.intval($conf['server_id'])); + $row = $this->db->queryOneRecord('SELECT * FROM ?? WHERE server_id = ?', $conf["mysql"]["database"] . '.firewall', $conf['server_id']); if(trim($row['tcp_port']) != '' || trim($row['udp_port']) != '') { $tcp_public_services = trim(str_replace(',', ' ', $row['tcp_port'])); @@ -1664,7 +1632,7 @@ Email Address []: if(!stristr($tcp_public_services, $conf['apache']['vhost_port'])) { $tcp_public_services .= ' '.intval($conf['apache']['vhost_port']); - if($row['tcp_port'] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ',".intval($conf['apache']['vhost_port'])."' WHERE server_id = ".intval($conf['server_id'])); + if($row['tcp_port'] != '') $this->db->query("UPDATE firewall SET tcp_port = tcp_port + ? WHERE server_id = ?", ',' . intval($conf['apache']['vhost_port']), $conf['server_id']); } $content = str_replace('{TCP_PUBLIC_SERVICES}', $tcp_public_services, $content); @@ -2091,13 +2059,11 @@ Email Address []: $firewall_server_enabled = ($conf['services']['firewall'])?1:0; $xmpp_server_enabled = ($conf['services']['xmpp'])?1:0; - $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled', proxy_server = '$proxy_server_enabled', firewall_server = '$firewall_server_enabled', xmpp_server = '.$xmpp_server_enabled.' WHERE server_id = ".intval($conf['server_id']); + $sql = "UPDATE `server` SET mail_server = '$mail_server_enabled', web_server = '$web_server_enabled', dns_server = '$dns_server_enabled', file_server = '$file_server_enabled', db_server = '$db_server_enabled', vserver_server = '$vserver_server_enabled', proxy_server = '$proxy_server_enabled', firewall_server = '$firewall_server_enabled', xmpp_server = '.$xmpp_server_enabled.' WHERE server_id = ?"; + $this->db->query($sql, $conf['server_id']); if($conf['mysql']['master_slave_setup'] == 'y') { - $this->dbmaster->query($sql); - $this->db->query($sql); - } else { - $this->db->query($sql); + $this->dbmaster->query($sql, $conf['server_id']); } diff --git a/install/lib/mysql.lib.php b/install/lib/mysql.lib.php index c5c2a83a6..1825eb3e3 100644 --- a/install/lib/mysql.lib.php +++ b/install/lib/mysql.lib.php @@ -1,190 +1,495 @@ dbHost = $conf["mysql"]["host"]; - //$this->dbName = $conf["mysql"]["database"]; + $this->dbName = ''; $this->dbUser = $conf["mysql"]["admin_user"]; $this->dbPass = $conf["mysql"]["admin_password"]; $this->dbCharset = $conf["mysql"]["charset"]; - //$this->connect(); - } + $this->dbNewLink = false; + $this->dbClientFlags = null; - // error handler - function updateError($location) - { - $this->errorNumber = mysqli_errno($this->linkId); - $this->errorMessage = mysqli_error($this->linkId); - $this->errorLocation = $location; - if($this->errorNumber && $this->show_error_messages) - { - echo '
'.$this->errorLocation.'
'.$this->errorMessage; - flush(); + $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); + $try = 0; + while((!is_object($this->_iConnId) || mysqli_connect_error()) && $try < 5) { + if($try > 0) sleep(1); + + $try++; + $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); } + + if(!is_object($this->_iConnId) || mysqli_connect_error()) { + $this->_iConnId = null; + $this->_sqlerror('Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!'); + return false; + } + if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) { + $this->close(); + $this->_sqlerror('Datenbank nicht gefunden / Database not found'); + return false; + } + + $this->_setCharset(); } - function connect() - { - if(!$this->linkId) - { - $this->linkId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); + public function __destruct() { + if($this->_iConnId) mysqli_close($this->_iConnId); + } - if(!$this->linkId) - { - $this->updateError('DB::connect()
mysqli_connect'); - return false; + public function close() { + if($this->_iConnId) mysqli_close($this->_iConnId); + $this->_iConnId = null; + } + + /* This allows our private variables to be "read" out side of the class */ + public function __get($var) { + return isset($this->$var) ? $this->$var : NULL; + } + + public function _build_query_string($sQuery = '') { + $iArgs = func_num_args(); + if($iArgs > 1) { + $aArgs = func_get_args(); + + if($iArgs == 3 && $aArgs[1] === true && is_array($aArgs[2])) { + $aArgs = $aArgs[2]; + $iArgs = count($aArgs); + } else { + array_shift($aArgs); // delete the query string that is the first arg! + } + + $iPos = 0; + $iPos2 = 0; + foreach($aArgs as $sKey => $sValue) { + $iPos2 = strpos($sQuery, '??', $iPos2); + $iPos = strpos($sQuery, '?', $iPos); + + if($iPos === false && $iPos2 === false) break; + + if($iPos2 !== false && ($iPos === false || $iPos2 <= $iPos)) { + $sTxt = $this->escape($sValue); + + if(strpos($sTxt, '.') !== false) $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt); + else $sTxt = '`' . $sTxt . '`'; + + $sQuery = substr_replace($sQuery, $sTxt, $iPos2, 2); + $iPos2 += strlen($sTxt); + $iPos = $iPos2; + } else { + if(is_int($sValue) || is_float($sValue)) { + $sTxt = $sValue; + } elseif(is_string($sValue) && (strcmp($sValue, '#NULL#') == 0)) { + $sTxt = 'NULL'; + } elseif(is_array($sValue)) { + $sTxt = ''; + foreach($sValue as $sVal) $sTxt .= ',\'' . $this->escape($sVal) . '\''; + $sTxt = '(' . substr($sTxt, 1) . ')'; + if($sTxt == '()') $sTxt = '(0)'; + } else { + $sTxt = '\'' . $this->escape($sValue) . '\''; + } + + $sQuery = substr_replace($sQuery, $sTxt, $iPos, 1); + $iPos += strlen($sTxt); + $iPos2 = $iPos; + } } - $this->queryId = @mysqli_query($this->linkId, 'SET NAMES '.$this->dbCharset); } - return true; + + return $sQuery; } - function query($queryString) - { - if(!$this->connect()) - { + /**#@-*/ + + + /**#@+ + * @access private + */ + private function _setCharset() { + mysqli_query($this->_iConnId, 'SET NAMES '.$this->dbCharset); + mysqli_query($this->_iConnId, "SET character_set_results = '".$this->dbCharset."', character_set_client = '".$this->dbCharset."', character_set_connection = '".$this->dbCharset."', character_set_database = '".$this->dbCharset."', character_set_server = '".$this->dbCharset."'"); + } + + private function _query($sQuery = '') { + global $app; + + //if($this->isConnected == false) return false; + if ($sQuery == '') { + $this->_sqlerror('Keine Anfrage angegeben / No query given'); return false; } - if($this->dbName != '') { - if(!mysqli_select_db($this->linkId, $this->dbName)) - { - $this->updateError('DB::connect()
mysqli_select_db'); - return false; + + $try = 0; + do { + $try++; + $ok = mysqli_ping($this->_iConnId); + if(!$ok) { + if(!mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, $this->dbName)) { + if($this->errorNumber == '111') { + // server is not available + if($try > 9) { + if(isset($app) && isset($app->forceErrorExit)) { + $app->forceErrorExit('Database connection failure!'); + } + // if we reach this, the app object is missing or has no exit method, so we continue as normal + } + sleep(30); // additional seconds, please! + } + + if($try > 9) { + $this->_sqlerror('DB::query -> reconnect'); + return false; + } else { + sleep(($try > 7 ? 5 : 1)); + } + } else { + $this->_setCharset(); + $ok = true; + } } - } - $this->queryId = @mysqli_query($this->linkId, $queryString); - $this->updateError('DB::query('.$queryString.')
mysqli_query'); - if(!$this->queryId) - { + } while($ok == false); + + $aArgs = func_get_args(); + $sQuery = call_user_func_array(array(&$this, '_build_query_string'), $aArgs); + + $this->_iQueryId = mysqli_query($this->_iConnId, $sQuery); + if (!$this->_iQueryId) { + $this->_sqlerror('Falsche Anfrage / Wrong Query', false, 'SQL-Query = ' . $sQuery); return false; } - $this->currentRow = 0; - return $this->queryId; + + return is_bool($this->_iQueryId) ? $this->_iQueryId : new db_result($this->_iQueryId, $this->_iConnId); } - // returns all records in an array - function queryAllRecords($queryString) - { - if(!$this->query($queryString)) - { - return false; - } - $ret = array(); - while($line = $this->nextRecord()) - { - $ret[] = $line; + /**#@-*/ + + + + + + /** + * Executes a query + * + * Executes a given query string, has a variable amount of parameters: + * - 1 parameter + * executes the given query + * - 2 parameters + * executes the given query, replaces the first ? in the query with the second parameter + * - 3 parameters + * if the 2nd parameter is a boolean true, the 3rd parameter has to be an array containing all the replacements for every occuring ? in the query, otherwise the second parameter replaces the first ?, the third parameter replaces the second ? in the query + * - 4 or more parameters + * all ? in the query are replaced from left to right by the parameters 2 to x + * + * @access public + * @param string $sQuery query string + * @param mixed ... one or more parameters + * @return db_result the result object of the query + */ + + + public function query($sQuery = '') { + $aArgs = func_get_args(); + return call_user_func_array(array(&$this, '_query'), $aArgs); + } + + /** + * Execute a query and get first result array + * + * Executes a query and returns the first result row as an array + * This is like calling $result = $db->query(), $result->get(), $result->free() + * Use of this function @see query + * + * @access public + * @param string $sQuery query to execute + * @param ... further params (see query()) + * @return array result row or NULL if none found + */ + public function queryOneRecord($sQuery = '') { + if(!preg_match('/limit \d+\s*,\s*\d+$/i', $sQuery)) $sQuery .= ' LIMIT 0,1'; + + $aArgs = func_get_args(); + $oResult = call_user_func_array(array(&$this, 'query'), $aArgs); + if(!$oResult) return null; + + $aReturn = $oResult->get(); + $oResult->free(); + + return $aReturn; + } + + public function queryOne($sQuery = '') { + return call_user_func_array(array(&$this, 'queryOneRecord'), func_get_args()); + } + + public function query_one($sQuery = '') { + return call_user_func_array(array(&$this, 'queryOneRecord'), func_get_args()); + } + + /** + * Execute a query and return all rows + * + * Executes a query and returns all result rows in an array + * Use this with extreme care!!! Uses lots of memory on big result sets. + * + * @access public + * @param string $sQuery query to execute + * @param ... further params (see query()) + * @return array all the rows in the result set + */ + public function queryAllRecords($sQuery = '') { + $aArgs = func_get_args(); + $oResult = call_user_func_array(array(&$this, 'query'), $aArgs); + if(!$oResult) return array(); + + $aResults = array(); + while($aRow = $oResult->get()) { + $aResults[] = $aRow; } - return $ret; + $oResult->free(); + + return $aResults; } - // returns one record in an array - function queryOneRecord($queryString) - { - if(!$this->query($queryString) || $this->numRows() == 0) - { - return false; + public function queryAll($sQuery = '') { + return call_user_func_array(array(&$this, 'queryAllRecords'), func_get_args()); + } + + public function query_all($sQuery = '') { + return call_user_func_array(array(&$this, 'queryAllRecords'), func_get_args()); + } + + /** + * Execute a query and return all rows as simple array + * + * Executes a query and returns all result rows in an array with elements + * Only first column is returned Uses lots of memory on big result sets. + * + * @access public + * @param string $sQuery query to execute + * @param ... further params (see query()) + * @return array all the rows in the result set + */ + public function queryAllArray($sQuery = '') { + $aArgs = func_get_args(); + $oResult = call_user_func_array(array(&$this, 'query'), $aArgs); + if(!$oResult) return array(); + + $aResults = array(); + while($aRow = $oResult->get()) { + $aResults[] = reset($aRow); } - return $this->nextRecord(); + $oResult->free(); + + return $aResults; } - // returns the next record in an array - function nextRecord() - { - $this->record = mysqli_fetch_assoc($this->queryId); - $this->updateError('DB::nextRecord()
mysqli_fetch_array'); - if(!$this->record || !is_array($this->record)) - { - return false; + public function query_all_array($sQuery = '') { + return call_user_func_array(array(&$this, 'queryAllArray'), func_get_args()); + } + + + + /** + * Get id of last inserted row + * + * Gives you the id of the last inserted row in a table with an auto-increment primary key + * + * @access public + * @return int id of last inserted row or 0 if none + */ + public function insert_id() { + $iRes = mysqli_query($this->_iConnId, 'SELECT LAST_INSERT_ID() as `newid`'); + if(!is_object($iRes)) return false; + + $aReturn = mysqli_fetch_assoc($iRes); + mysqli_free_result($iRes); + + return $aReturn['newid']; + } + + + + /** + * get affected row count + * + * Gets the amount of rows affected by the previous query + * + * @access public + * @return int affected rows + */ + public function affected() { + if(!is_object($this->_iConnId)) return 0; + $iRows = mysqli_affected_rows($this->_iConnId); + if(!$iRows) $iRows = 0; + return $iRows; + } + + + + /** + * check if a utf8 string is valid + * + * @access public + * @param string $string the string to check + * @return bool true if it is valid utf8, false otherwise + */ + private function check_utf8($str) { + $len = strlen($str); + for($i = 0; $i < $len; $i++){ + $c = ord($str[$i]); + if ($c > 128) { + if (($c > 247)) return false; + elseif ($c > 239) $bytes = 4; + elseif ($c > 223) $bytes = 3; + elseif ($c > 191) $bytes = 2; + else return false; + if (($i + $bytes) > $len) return false; + while ($bytes > 1) { + $i++; + $b = ord($str[$i]); + if ($b < 128 || $b > 191) return false; + $bytes--; + } + } + } + return true; + } // end of check_utf8 + + /** + * Escape a string for usage in a query + * + * @access public + * @param string $sString query string to escape + * @return string escaped string + */ + public function escape($sString) { + global $app; + if(!is_string($sString) && !is_numeric($sString)) { + $app->log('NON-String given in escape function! (' . gettype($sString) . ')', LOGLEVEL_INFO); + //$sAddMsg = getDebugBacktrace(); + $app->log($sAddMsg, LOGLEVEL_DEBUG); + $sString = ''; } - $this->currentRow++; - return $this->record; + + $cur_encoding = mb_detect_encoding($sString); + if($cur_encoding != "UTF-8") { + if($cur_encoding != 'ASCII') { + $app->log('String ' . substr($sString, 0, 25) . '... is ' . $cur_encoding . '.', LOGLEVEL_INFO); + if($cur_encoding) $sString = mb_convert_encoding($sString, 'UTF-8', $cur_encoding); + else $sString = mb_convert_encoding($sString, 'UTF-8'); + } + } elseif(!$this->check_utf8($sString)) { + $sString = utf8_encode($sString); + } + + if($this->_iConnId) return mysqli_real_escape_string($this->_iConnId, $sString); + else return addslashes($sString); } - // returns number of rows returned by the last select query - function numRows() - { - return mysqli_num_rows($this->queryId); + /** + * + * + * @access private + */ + private function _sqlerror($sErrormsg = 'Unbekannter Fehler', $sAddMsg = '') { + global $app, $conf; + + $mysql_error = (is_object($this->_iConnId) ? mysqli_error($this->_iConnId) : mysqli_connect_error()); + $mysql_errno = (is_object($this->_iConnId) ? mysqli_errno($this->_iConnId) : mysqli_connect_errno()); + + //$sAddMsg .= getDebugBacktrace(); + + if($this->show_error_messages && $conf['demo_mode'] === false) { + echo $sErrormsg . $sAddMsg; + } else if(is_object($app) && method_exists($app, 'log')) { + $app->log($sErrormsg . $sAddMsg . ' -> ' . $mysql_errno . ' (' . $mysql_error . ')', LOGLEVEL_WARN); + } } - function affectedRows() - { - return mysqli_affected_rows($this->linkId); + public function affectedRows() { + return $this->affected(); } // returns mySQL insert id - function insertID() - { - return mysqli_insert_id($this->linkId); + public function insertID() { + return $this->insert_id(); } - // Check der variablen - // deprecated, now use quote - function check($formfield) - { - return $this->quote($formfield); - } - // Check der variablen - function quote($formfield) - { - return mysqli_real_escape_string($this->linkId, $formfield); + //* Function to quote strings + public function quote($formfield) { + return $this->escape($formfield); } - // Check der variablen - function unquote($formfield) - { + //* Function to unquotae strings + public function unquote($formfield) { return stripslashes($formfield); } - function toLower($record) { + public function toLower($record) { if(is_array($record)) { foreach($record as $key => $val) { $key = strtolower($key); @@ -194,7 +499,7 @@ class db return $out; } - + /* TODO: rewrite SQL */ function insert($tablename, $form, $debug = 0) { if(is_array($form)){ @@ -213,7 +518,8 @@ class db if($debug == 1) echo "mySQL Error Message: ".$this->errorMessage; } } - + + /* TODO: rewrite SQL */ function update($tablename, $form, $bedingung, $debug = 0) { @@ -230,218 +536,174 @@ class db } } - function closeConn() { - - } - - function freeResult() { - - - } - - function delete() { - - } - - function Transaction($action) { - //action = begin, commit oder rollback - - } /* - $columns = array(action => add | alter | drop - name => Spaltenname - name_new => neuer Spaltenname, nur bei 'alter' belegt - type => 42go-Meta-Type: int16, int32, int64, double, char, varchar, text, blob - typeValue => Wert z.B. bei Varchar - defaultValue => Default Wert - notNull => true | false - autoInc => true | false - option => unique | primary | index) - - - */ - - function createTable($table_name, $columns) { - $index = ""; - $sql = "CREATE TABLE $table_name ("; + $columns = array(action => add | alter | drop + name => Spaltenname + name_new => neuer Spaltenname, nur bei 'alter' belegt + type => 42go-Meta-Type: int16, int32, int64, double, char, varchar, text, blob + typeValue => Wert z.B. bei Varchar + defaultValue => Default Wert + notNull => true | false + autoInc => true | false + option => unique | primary | index) + + + */ + /* TODO: rewrite SQL */ + public function createTable($table_name, $columns) { + $index = ''; + $sql = "CREATE TABLE ?? ("; foreach($columns as $col){ - $sql .= $col["name"]." ".$this->mapType($col["type"], $col["typeValue"])." "; + $sql .= $col['name'].' '.$this->mapType($col['type'], $col['typeValue']).' '; - if($col["defaultValue"] != "") { - if($col["defaultValue"] == "NULL" or $col["defaultValue"] == "NOT NULL") { - $sql .= "DEFAULT ".$col["defaultValue"]." "; - } else { - $sql .= "DEFAULT '".$col["defaultValue"]."' "; - } - - } elseif($col["defaultValue"] != false) { - $sql .= "DEFAULT '' "; - } - if($col["defaultValue"] != "NULL" && $col["defaultValue"] != "NOT NULL") { - if($col["notNull"] == true) { - $sql .= "NOT NULL "; - } else { - $sql .= "NULL "; - } + if($col['defaultValue'] != '') $sql .= "DEFAULT '".$col['defaultValue']."' "; + if($col['notNull'] == true) { + $sql .= 'NOT NULL '; + } else { + $sql .= 'NULL '; } - if($col["autoInc"] == true) $sql .= "auto_increment "; - $sql.= ","; + if($col['autoInc'] == true) $sql .= 'auto_increment '; + $sql.= ','; // key Definitionen - if($col["option"] == "primary") $index .= "PRIMARY KEY (".$col["name"]."),"; - if($col["option"] == "index") $index .= "INDEX (".$col["name"]."),"; - if($col["option"] == "unique") $index .= "UNIQUE (".$col["name"]."),"; + if($col['option'] == 'primary') $index .= 'PRIMARY KEY ('.$col['name'].'),'; + if($col['option'] == 'index') $index .= 'INDEX ('.$col['name'].'),'; + if($col['option'] == 'unique') $index .= 'UNIQUE ('.$col['name'].'),'; } $sql .= $index; $sql = substr($sql, 0, -1); - $sql .= ")"; - - $this->query($sql); + $sql .= ')'; + /* TODO: secure parameters */ + $this->query($sql, $table_name); return true; } /* - $columns = array(action => add | alter | drop - name => Spaltenname - name_new => neuer Spaltenname, nur bei 'alter' belegt - type => 42go-Meta-Type: int16, int32, int64, double, char, varchar, text, blob - typeValue => Wert z.B. bei Varchar - defaultValue => Default Wert - notNull => true | false - autoInc => true | false - option => unique | primary | index) - - - */ - function alterTable($table_name, $columns) { - $index = ""; - $sql = "ALTER TABLE $table_name "; + $columns = array(action => add | alter | drop + name => Spaltenname + name_new => neuer Spaltenname, nur bei 'alter' belegt + type => 42go-Meta-Type: int16, int32, int64, double, char, varchar, text, blob + typeValue => Wert z.B. bei Varchar + defaultValue => Default Wert + notNull => true | false + autoInc => true | false + option => unique | primary | index) + + + */ + /* TODO: rewrite SQL */ + public function alterTable($table_name, $columns) { + $index = ''; + $sql = "ALTER TABLE ?? "; foreach($columns as $col){ - if($col["action"] == 'add') { - $sql .= "ADD ".$col["name"]." ".$this->mapType($col["type"], $col["typeValue"])." "; - } elseif ($col["action"] == 'alter') { - $sql .= "CHANGE ".$col["name"]." ".$col["name_new"]." ".$this->mapType($col["type"], $col["typeValue"])." "; - } elseif ($col["action"] == 'drop') { - $sql .= "DROP ".$col["name"]." "; + if($col['action'] == 'add') { + $sql .= 'ADD '.$col['name'].' '.$this->mapType($col['type'], $col['typeValue']).' '; + } elseif ($col['action'] == 'alter') { + $sql .= 'CHANGE '.$col['name'].' '.$col['name_new'].' '.$this->mapType($col['type'], $col['typeValue']).' '; + } elseif ($col['action'] == 'drop') { + $sql .= 'DROP '.$col['name'].' '; } - if($col["action"] != 'drop') { - if($col["defaultValue"] != "") $sql .= "DEFAULT '".$col["defaultValue"]."' "; - if($col["notNull"] == true) { - $sql .= "NOT NULL "; + if($col['action'] != 'drop') { + if($col['defaultValue'] != '') $sql .= "DEFAULT '".$col['defaultValue']."' "; + if($col['notNull'] == true) { + $sql .= 'NOT NULL '; } else { - $sql .= "NULL "; + $sql .= 'NULL '; } - if($col["autoInc"] == true) $sql .= "auto_increment "; - $sql.= ","; - // key Definitionen - if($col["option"] == "primary") $index .= "PRIMARY KEY (".$col["name"]."),"; - if($col["option"] == "index") $index .= "INDEX (".$col["name"]."),"; - if($col["option"] == "unique") $index .= "UNIQUE (".$col["name"]."),"; + if($col['autoInc'] == true) $sql .= 'auto_increment '; + $sql.= ','; + // Index definitions + if($col['option'] == 'primary') $index .= 'PRIMARY KEY ('.$col['name'].'),'; + if($col['option'] == 'index') $index .= 'INDEX ('.$col['name'].'),'; + if($col['option'] == 'unique') $index .= 'UNIQUE ('.$col['name'].'),'; } } $sql .= $index; $sql = substr($sql, 0, -1); - + /* TODO: secure parameters */ //die($sql); - $this->query($sql); + $this->query($sql, $table_name); return true; } - function dropTable($table_name) { + public function dropTable($table_name) { $this->check($table_name); - $sql = "DROP TABLE '". $table_name."'"; - return $this->query($sql); + $sql = "DROP TABLE ??"; + return $this->query($sql, $table_name); } // gibt Array mit Tabellennamen zur�ck - function getTables($database_name = '') { - - if($database_name == ''){ - $database_name = $this->dbName; - } - - $tables = $this->queryAllRecords("SHOW TABLES FROM `$database_name`"); - $tb_names = array(); - if(is_array($tables) && !empty($tables)){ - for($i = 0; $i < sizeof($tables); $i++){ - $tb_names[$i] = $tables[$i]['Tables_in_'.$database_name]; - } - } - - /* - $result = mysqli_query("SHOW TABLES FROM `$database_name`"); - $tb_names = array(); - for ($i = 0; $i < mysqli_num_rows($result); $i++) { - $tb_names[$i] = mysql_tablename($result, $i); - } - */ + public function getTables($database_name = '') { + if(!is_object($this->_iConnId)) return false; + if($database_name == '') $database_name = $this->dbName; + $tb_names = $this->queryAllArray("SHOW TABLES FROM ??", $database_name); return $tb_names; } // gibt Feldinformationen zur Tabelle zur�ck /* - $columns = array(action => add | alter | drop - name => Spaltenname - name_new => neuer Spaltenname, nur bei 'alter' belegt - type => 42go-Meta-Type: int16, int32, int64, double, char, varchar, text, blob - typeValue => Wert z.B. bei Varchar - defaultValue => Default Wert - notNull => true | false - autoInc => true | false - option => unique | primary | index) - - - */ - + $columns = array(action => add | alter | drop + name => Spaltenname + name_new => neuer Spaltenname, nur bei 'alter' belegt + type => 42go-Meta-Type: int16, int32, int64, double, char, varchar, text, blob + typeValue => Wert z.B. bei Varchar + defaultValue => Default Wert + notNull => true | false + autoInc => true | false + option => unique | primary | index) + + + */ + /* TODO: rewrite SQL */ function tableInfo($table_name) { global $go_api, $go_info; // Tabellenfelder einlesen - if($rows = $go_api->db->queryAllRecords("SHOW FIELDS FROM ".$table_name)){ + if($rows = $go_api->db->queryAllRecords('SHOW FIELDS FROM ??', $table_name)){ foreach($rows as $row) { - $name = $row[0]; - $default = $row[4]; - $key = $row[3]; - $extra = $row[5]; - $isnull = $row[2]; - $type = $row[1]; + $name = $row['Field']; + $default = $row['Default']; + $key = $row['Key']; + $extra = $row['Extra']; + $isnull = $row['Null']; + $type = $row['Type']; $column = array(); - $column["name"] = $name; - //$column["type"] = $type; - $column["defaultValue"] = $default; - if(stristr($key, "PRI")) $column["option"] = "primary"; - if(stristr($isnull, "YES")) { - $column["notNull"] = false; + $column['name'] = $name; + //$column['type'] = $type; + $column['defaultValue'] = $default; + if(stristr($key, 'PRI')) $column['option'] = 'primary'; + if(stristr($isnull, 'YES')) { + $column['notNull'] = false; } else { - $column["notNull"] = true; + $column['notNull'] = true; } - if($extra == 'auto_increment') $column["autoInc"] = true; + if($extra == 'auto_increment') $column['autoInc'] = true; // Type in Metatype umsetzen - if(stristr($type, "int(")) $metaType = 'int32'; - if(stristr($type, "bigint")) $metaType = 'int64'; - if(stristr($type, "char")) { + if(stristr($type, 'int(')) $metaType = 'int32'; + if(stristr($type, 'bigint')) $metaType = 'int64'; + if(stristr($type, 'char')) { $metaType = 'char'; $tmp_typeValue = explode('(', $type); - $column["typeValue"] = substr($tmp_typeValue[1], 0, -1); + $column['typeValue'] = substr($tmp_typeValue[1], 0, -1); } - if(stristr($type, "varchar")) { + if(stristr($type, 'varchar')) { $metaType = 'varchar'; $tmp_typeValue = explode('(', $type); - $column["typeValue"] = substr($tmp_typeValue[1], 0, -1); + $column['typeValue'] = substr($tmp_typeValue[1], 0, -1); } - if(stristr($type, "text")) $metaType = 'text'; - if(stristr($type, "double")) $metaType = 'double'; - if(stristr($type, "blob")) $metaType = 'blob'; + if(stristr($type, 'text')) $metaType = 'text'; + if(stristr($type, 'double')) $metaType = 'double'; + if(stristr($type, 'blob')) $metaType = 'blob'; - $column["type"] = $metaType; + $column['type'] = $metaType; $columns[] = $column; } @@ -452,7 +714,7 @@ class db } - function mapType($metaType, $typeValue) { + public function mapType($metaType, $typeValue) { global $go_api; $metaType = strtolower($metaType); switch ($metaType) { @@ -472,7 +734,7 @@ class db return 'char'; break; case 'varchar': - if($typeValue < 1) die("Datenbank Fehler: F�r diesen Datentyp ist eine L�ngenangabe notwendig."); + if($typeValue < 1) die('Database failure: Lenght required for these data types.'); return 'varchar('.$typeValue.')'; break; case 'text': @@ -486,4 +748,238 @@ class db } +/** + * database query result class + * + * @package pxFramework + * + */ +class db_result { + + /** + * + * + * @access private + */ + private $_iResId = null; + private $_iConnection = null; + + + + /** + * + * + * @access private + */ + public function db_result($iResId, $iConnection) { + $this->_iResId = $iResId; + $this->_iConnection = $iConnection; + } + + + + /** + * get count of result rows + * + * Returns the amount of rows in the result set + * + * @access public + * @return int amount of rows + */ + public function rows() { + if(!is_object($this->_iResId)) return 0; + $iRows = mysqli_num_rows($this->_iResId); + if(!$iRows) $iRows = 0; + return $iRows; + } + + + + /** + * Get number of affected rows + * + * Returns the amount of rows affected by the previous query + * + * @access public + * @return int amount of affected rows + */ + public function affected() { + if(!is_object($this->_iConnection)) return 0; + $iRows = mysqli_affected_rows($this->_iConnection); + if(!$iRows) $iRows = 0; + return $iRows; + } + + + + /** + * Frees the result set + * + * @access public + */ + public function free() { + if(!is_object($this->_iResId)) return; + + mysqli_free_result($this->_iResId); + return; + } + + + + /** + * Get a result row (associative) + * + * Returns the next row in the result set. To be used in a while loop like while($currow = $result->get()) { do something ... } + * + * @access public + * @return array result row + */ + public function get() { + $aItem = null; + + if(is_object($this->_iResId)) { + $aItem = mysqli_fetch_assoc($this->_iResId); + if(!$aItem) $aItem = null; + } + return $aItem; + } + + + + /** + * Get a result row (array with numeric index) + * + * @access public + * @return array result row + */ + public function getAsRow() { + $aItem = null; + + if(is_object($this->_iResId)) { + $aItem = mysqli_fetch_row($this->_iResId); + if(!$aItem) $aItem = null; + } + return $aItem; + } + +} + +/** + * database query result class + * + * emulates a db result set out of an array so you can use array results and db results the same way + * + * @package pxFramework + * @see db_result + * + * + */ +class fakedb_result { + + /** + * + * + * @access private + */ + private $aResultData = array(); + + /** + * + * + * @access private + */ + private $aLimitedData = array(); + + + + /** + * + * + * @access private + */ + public function fakedb_result($aData) { + $this->aResultData = $aData; + $this->aLimitedData = $aData; + reset($this->aLimitedData); + } + + + + /** + * get count of result rows + * + * Returns the amount of rows in the result set + * + * @access public + * @return int amount of rows + */ + // Gibt die Anzahl Zeilen zurück + public function rows() { + return count($this->aLimitedData); + } + + + + /** + * Frees the result set + * + * @access public + */ + // Gibt ein Ergebnisset frei + public function free() { + $this->aResultData = array(); + $this->aLimitedData = array(); + return; + } + + + + /** + * Get a result row (associative) + * + * Returns the next row in the result set. To be used in a while loop like while($currow = $result->get()) { do something ... } + * + * @access public + * @return array result row + */ + // Gibt eine Ergebniszeile zurück + public function get() { + $aItem = null; + + if(!is_array($this->aLimitedData)) return $aItem; + + if(list($vKey, $aItem) = each($this->aLimitedData)) { + if(!$aItem) $aItem = null; + } + return $aItem; + } + + + + /** + * Get a result row (array with numeric index) + * + * @access public + * @return array result row + */ + public function getAsRow() { + return $this->get(); + } + + + + /** + * Limit the result (like a LIMIT x,y in a SQL query) + * + * @access public + * @param int $iStart offset to start read + * @param int iLength amount of datasets to read + */ + public function limit_result($iStart, $iLength) { + $this->aLimitedData = array_slice($this->aResultData, $iStart, $iLength, true); + } + +} + + ?> diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index d2d11bf11..56f6bd6fb 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -124,7 +124,7 @@ function updateDbAndIni() { global $inst, $conf; //* Update $conf array with values from the server.ini that shall be preserved - $tmp = $inst->db->queryOneRecord("SELECT * FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); + $tmp = $inst->db->queryOneRecord("SELECT * FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . '.server', $conf['server_id']); $ini_array = ini_to_array(stripslashes($tmp['config'])); $current_db_version = (isset($tmp['dbversion']))?intval($tmp['dbversion']):0; @@ -218,8 +218,8 @@ function updateDbAndIni() { } //* update the database version in server table - $inst->db->query("UPDATE ".$conf["mysql"]["database"].".server SET dbversion = '".$current_db_version."' WHERE server_id = ".$conf['server_id']); - if($inst->db->dbHost != $inst->dbmaster->dbHost) $inst->dbmaster->query("UPDATE ".$conf["mysql"]["master_database"].".server SET dbversion = '".$current_db_version."' WHERE server_id = ".$conf['server_id']); + $inst->db->query("UPDATE ?? SET dbversion = ? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $current_db_version, $conf['server_id']); + if($inst->db->dbHost != $inst->dbmaster->dbHost) $inst->dbmaster->query("UPDATE ?? SET dbversion = ? WHERE server_id = ?", $conf["mysql"]["master_database"] . ".server", $current_db_version, $conf['server_id']); //* If ISPConfig Version < 3.0.3, we will do a full db update @@ -228,7 +228,7 @@ function updateDbAndIni() { swriteln($inst->lng('Starting full database update.')); //** Delete the old database - if( !$inst->db->query('DROP DATABASE IF EXISTS '.$conf['mysql']['database']) ) { + if( !$inst->db->query('DROP DATABASE IF EXISTS ??', $conf['mysql']['database']) ) { $inst->error('Unable to drop MySQL database: '.$conf['mysql']['database'].'.'); } @@ -239,7 +239,7 @@ function updateDbAndIni() { $db_tables = $inst->db->getTables(); foreach($db_tables as $table) { - $inst->db->query("TRUNCATE $table"); + $inst->db->query("TRUNCATE ??", $table); } //** load old data back into database @@ -262,15 +262,15 @@ function updateDbAndIni() { } //* update the database version in server table - $inst->db->query("UPDATE ".$conf["mysql"]["database"].".server SET dbversion = '".$current_db_version."' WHERE server_id = ".$conf['server_id']); - if($inst->db->dbHost != $inst->dbmaster->dbHost) $inst->dbmaster->query("UPDATE ".$conf["mysql"]["master_database"].".server SET dbversion = '".$current_db_version."' WHERE server_id = ".$conf['server_id']); + $inst->db->query("UPDATE ?? SET dbversion = ? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $current_db_version, $conf['server_id']); + if($inst->db->dbHost != $inst->dbmaster->dbHost) $inst->dbmaster->query("UPDATE ?? SET dbversion = ? WHERE server_id = ?", $conf["mysql"]["master_database"] . ".server", $current_db_version, $conf['server_id']); if ($conf['powerdns']['installed']) { swriteln($inst->lng('Starting full PowerDNS database update.')); //** Delete the old PowerDNS database - if( !$inst->db->query('DROP DATABASE IF EXISTS '.$conf['powerdns']['database']) ) { + if( !$inst->db->query('DROP DATABASE IF EXISTS ??', $conf['powerdns']['database']) ) { $inst->error('Unable to drop MySQL database: '.$conf['powerdns']['database'].'.'); } @@ -288,7 +288,7 @@ function updateDbAndIni() { //** Update server ini - $tmp_server_rec = $inst->db->queryOneRecord("SELECT config FROM ".$conf["mysql"]["database"].".server WHERE server_id = ".$conf['server_id']); + $tmp_server_rec = $inst->db->queryOneRecord("SELECT config FROM ?? WHERE server_id = ?", $conf["mysql"]["database"] . ".server", $conf['server_id']); $old_ini_array = ini_to_array(stripslashes($tmp_server_rec['config'])); unset($tmp_server_rec); $tpl_ini_array = ini_to_array(rf('tpl/server.ini.master')); @@ -344,12 +344,12 @@ function updateDbAndIni() { } $new_ini = array_to_ini($tpl_ini_array); - $sql = "UPDATE ".$conf["mysql"]["database"].".server SET config = '".mysql_real_escape_string($new_ini)."' WHERE server_id = ".$conf['server_id']; - $inst->db->query($sql); + $sql = "UPDATE ?? SET config = ? WHERE server_id = ?"; + $inst->db->query($sql, $conf["mysql"]["database"] . ".server", $new_ini, $conf['server_id']); if($inst->db->dbHost != $inst->dbmaster->dbHost) { - $sql = "UPDATE ".$conf["mysql"]["master_database"].".server SET config = '".mysql_real_escape_string($new_ini)."' WHERE server_id = ".$conf['server_id']; - $inst->dbmaster->query($sql); + $sql = "UPDATE ?? SET config = ? WHERE server_id = ?"; + $inst->dbmaster->query($sql, $conf["mysql"]["master_database"].".server", $new_ini, $conf['server_id']); } unset($old_ini_array); unset($tpl_ini_array); @@ -357,7 +357,7 @@ function updateDbAndIni() { //** Update system ini - $tmp_server_rec = $inst->db->queryOneRecord("SELECT config FROM ".$conf["mysql"]["database"].".sys_ini WHERE sysini_id = 1"); + $tmp_server_rec = $inst->db->queryOneRecord("SELECT config FROM ?? WHERE sysini_id = 1", $conf["mysql"]["database"] . ".sys_ini"); $old_ini_array = ini_to_array(stripslashes($tmp_server_rec['config'])); unset($tmp_server_rec); $tpl_ini_array = ini_to_array(rf('tpl/system.ini.master')); @@ -372,11 +372,11 @@ function updateDbAndIni() { } $new_ini = array_to_ini($tpl_ini_array); - $tmp = $inst->db->queryOneRecord('SELECT count(sysini_id) as number FROM '.$conf["mysql"]["database"].'.sys_ini WHERE 1'); + $tmp = $inst->db->queryOneRecord('SELECT count(sysini_id) as number FROM ?? WHERE 1', $conf["mysql"]["database"] . '.sys_ini'); if($tmp['number'] == 0) { - $inst->db->query("INSERT INTO ".$conf["mysql"]["database"].".sys_ini (sysini_id, config) VALUES (1,'".mysql_real_escape_string($new_ini)."')"); + $inst->db->query("INSERT INTO ?? (sysini_id, config) VALUES (1,?)", $conf["mysql"]["database"] . ".sys_ini", $new_ini); } else { - $inst->db->query("UPDATE ".$conf["mysql"]["database"].".sys_ini SET config = '".mysql_real_escape_string($new_ini)."' WHERE sysini_id = 1"); + $inst->db->query("UPDATE ?? SET config = ? WHERE sysini_id = 1", $conf["mysql"]["database"] . ".sys_ini", $new_ini); } unset($old_ini_array); unset($tpl_ini_array); diff --git a/interface/lib/classes/aps_crawler.inc.php b/interface/lib/classes/aps_crawler.inc.php index 5f36a5db5..5349be0b1 100644 --- a/interface/lib/classes/aps_crawler.inc.php +++ b/interface/lib/classes/aps_crawler.inc.php @@ -608,7 +608,7 @@ class ApsCrawler extends ApsBase foreach($incomplete_pkgs as $incomplete_pkg){ $pkg_url = @file_get_contents($this->interface_pkg_dir.'/'.$incomplete_pkg['path'].'/PKG_URL'); if($pkg_url != ''){ - $app->db->datalogUpdate('aps_packages', "package_url = '".$app->db->quote($pkg_url)."'", 'id', $incomplete_pkg['id']); + $app->db->datalogUpdate('aps_packages', array("package_url" => $pkg_url), 'id', $incomplete_pkg['id']); } } } diff --git a/interface/lib/classes/aps_guicontroller.inc.php b/interface/lib/classes/aps_guicontroller.inc.php index d9c347421..84da2e0a3 100644 --- a/interface/lib/classes/aps_guicontroller.inc.php +++ b/interface/lib/classes/aps_guicontroller.inc.php @@ -268,7 +268,7 @@ class ApsGUIController extends ApsBase if (empty($settings['main_database_name'])) { //* Find a free db name for the app for($n = 1; $n <= 1000; $n++) { - $mysql_db_name = $app->db->quote(($dbname_prefix != '' ? $dbname_prefix.'aps'.$n : uniqid('aps'))); + $mysql_db_name = ($dbname_prefix != '' ? $dbname_prefix.'aps'.$n : uniqid('aps')); $tmp = $app->db->queryOneRecord("SELECT count(database_id) as number FROM web_database WHERE database_name = ?", $mysql_db_name); if($tmp['number'] == 0) break; } @@ -277,7 +277,7 @@ class ApsGUIController extends ApsBase if (empty($settings['main_database_login'])) { //* Find a free db username for the app for($n = 1; $n <= 1000; $n++) { - $mysql_db_user = $app->db->quote(($dbuser_prefix != '' ? $dbuser_prefix.'aps'.$n : uniqid('aps'))); + $mysql_db_user = ($dbuser_prefix != '' ? $dbuser_prefix.'aps'.$n : uniqid('aps')); $tmp = $app->db->queryOneRecord("SELECT count(database_user_id) as number FROM web_database_user WHERE database_user = ?", $mysql_db_user); if($tmp['number'] == 0) break; } @@ -287,8 +287,16 @@ class ApsGUIController extends ApsBase //* Create the mysql database user if not existing $tmp = $app->db->queryOneRecord("SELECT database_user_id FROM web_database_user WHERE database_user = ?", $settings['main_database_login']); if(!$tmp) { - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `database_user`, `database_user_prefix`, `database_password`) - VALUES( ".$app->functions->intval($websrv['sys_userid']).", ".$app->functions->intval($websrv['sys_groupid']).", 'riud', '".$app->functions->intval($websrv['sys_perm_group'])."', '', 0, '".$settings['main_database_login']."', '".$app->db->quote($dbuser_prefix) . "', PASSWORD('".$settings['main_database_password']."'))"; + $insert_data = array("sys_userid" => $websrv['sys_userid'], + "sys_groupid" => $websrv['sys_groupid'], + "sys_perm_user" => 'riud', + "sys_perm_group" => $websrv['sys_perm_group'], + "sys_perm_other" => '', + "server_id" => 0, + "database_user" => $settings['main_database_login'], + "database_user_prefix" => $dbuser_prefix, + "database_password" => "PASSWORD('" . $settings['main_database_password'] . "')" + ); $mysql_db_user_id = $app->db->datalogInsert('web_database_user', $insert_data, 'database_user_id'); } else $mysql_db_user_id = $tmp['database_user_id']; @@ -296,8 +304,25 @@ class ApsGUIController extends ApsBase //* Create the mysql database if not existing $tmp = $app->db->queryOneRecord("SELECT count(database_id) as number FROM web_database WHERE database_name = ?", $settings['main_database_name']); if($tmp['number'] == 0) { - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `parent_domain_id`, `type`, `database_name`, `database_name_prefix`, `database_user_id`, `database_ro_user_id`, `database_charset`, `remote_access`, `remote_ips`, `backup_copies`, `active`, `backup_interval`) - VALUES( ".$app->functions->intval($websrv['sys_userid']).", ".$app->functions->intval($websrv['sys_groupid']).", 'riud', '".$app->functions->intval($websrv['sys_perm_group'])."', '', $mysql_db_server_id, ".$app->functions->intval($websrv['domain_id']).", 'mysql', '".$settings['main_database_name']."', '" . $app->db->quote($dbname_prefix) . "', '$mysql_db_user_id', 0, '', '$mysql_db_remote_access', '$mysql_db_remote_ips', ".$app->functions->intval($websrv['backup_copies']).", 'y', '".$app->functions->intval($websrv['backup_interval'])."')"; + $insert_data = array("sys_userid" => $websrv['sys_userid'], + "sys_groupid" => $websrv['sys_groupid'], + "sys_perm_user" => 'riud', + "sys_perm_group" => $websrv['sys_perm_group'], + "sys_perm_other" => '', + "server_id" => $mysql_db_server_id, + "parent_domain_id" => $websrv['domain_id'], + "type" => 'mysql', + "database_name" => $settings['main_database_name'], + "database_name_prefix" => $dbname_prefix, + "database_user_id" => $mysql_db_user_id, + "database_ro_user_id" => 0, + "database_charset" => '', + "remote_access" => $mysql_db_remote_access, + "remote_ips" => $mysql_db_remote_ips, + "backup_copies" => $websrv['backup_copies'], + "active" => 'y', + "backup_interval" => $websrv['backup_interval'] + ); $app->db->datalogInsert('web_database', $insert_data, 'database_id'); } @@ -351,7 +376,7 @@ class ApsGUIController extends ApsBase // mysql-database-name is updated inside if not set already if (!$this->createDatabaseForPackageInstance($settings, $websrv)) return false; } - + //* Insert new package instance $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `customer_id`, `package_id`, `instance_status`) VALUES (".$app->functions->intval($websrv['sys_userid']).", ".$app->functions->intval($websrv['sys_groupid']).", 'riud', '".$app->db->quote($websrv['sys_perm_group'])."', '', ".$app->db->quote($webserver_id).",".$app->db->quote($customerid).", ".$app->db->quote($packageid).", ".INSTANCE_PENDING.")"; $InstanceID = $app->db->datalogInsert('aps_instances', $insert_data, 'id'); diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index 59dcff88a..f5de1e6cf 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -626,20 +626,26 @@ class db extends mysqli if(is_array($insert_data)) { $key_str = ''; $val_str = ''; + $params = array($tablename); + $v_params = array(); foreach($insert_data as $key => $val) { - $key_str .= "`".$key ."`,"; - $val_str .= "'".$this->escape($val)."',"; + $key_str .= '??,' + $params[] = $key; + + $val_str .= '?,'; + $v_params[] = $val; } $key_str = substr($key_str, 0, -1); $val_str = substr($val_str, 0, -1); $insert_data_str = '('.$key_str.') VALUES ('.$val_str.')'; + $this->query("INSERT INTO ?? $insert_data_str", true, $params + $v_params); } else { + /* TODO: deprecate this method! */ $insert_data_str = $insert_data; + $this->query("INSERT INTO ?? $insert_data_str", $tablename); } - /* TODO: reduce risk of insert_data_str! */ - + $old_rec = array(); - $this->query("INSERT INTO ?? $insert_data_str", $tablename); $index_value = $this->insertID(); $new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ? = ?", $tablename, $index_field, $index_value); $this->datalogSave($tablename, 'INSERT', $index_field, $index_value, $old_rec, $new_rec); @@ -658,17 +664,23 @@ class db extends mysqli $old_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value); if(is_array($update_data)) { + $params = array($tablename); $update_data_str = ''; foreach($update_data as $key => $val) { - $update_data_str .= "`".$key ."` = '".$this->escape($val)."',"; + $update_data_str .= '?? = ?,'; + $params[] = $key; + $params[] = $val; } + $params[] = $index_field; + $params[] = $index_value; $update_data_str = substr($update_data_str, 0, -1); + $this->query("UPDATE ?? SET $update_data_str WHERE ?? = ?", true, $params); } else { + /* TODO: deprecate this method! */ $update_data_str = $update_data; + $this->query("UPDATE ?? SET $update_data_str WHERE ?? = ?", $tablename, $index_field, $index_value); } - /* TODO: reduce risk of update_data_str */ - $this->query("UPDATE ?? SET $update_data_str WHERE ?? = ?", $tablename, $index_field, $index_value); $new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value); $this->datalogSave($tablename, 'UPDATE', $index_field, $index_value, $old_rec, $new_rec, $force_update); diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php index cc3f761ae..c8a9225a2 100644 --- a/interface/lib/classes/listform.inc.php +++ b/interface/lib/classes/listform.inc.php @@ -246,6 +246,7 @@ class listform { return $this->pagingValues[$key]; } + /* TODO: maybe rewrite sql */ public function getPagingSQL($sql_where = '1') { global $app, $conf; @@ -283,7 +284,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".($app->listform->listDef['additional_tables'] != ''? ','.$app->listform->listDef['additional_tables'] : '')." WHERE $sql_where"); + $record_count = $app->db->queryOneRecord("SELECT count(*) AS anzahl FROM ??".($app->listform->listDef['additional_tables'] != ''? ','.$app->listform->listDef['additional_tables'] : '')." WHERE $sql_where", $table); $pages = $app->functions->intval(($record_count['anzahl'] - 1) / $records_per_page); @@ -482,7 +483,8 @@ class listform { } return $record; } - + + /* TODO: check double quoting of SQL */ public function encode($record) { global $app; diff --git a/interface/lib/classes/listform_actions.inc.php b/interface/lib/classes/listform_actions.inc.php index 0062d8e3a..3a3ac6e12 100644 --- a/interface/lib/classes/listform_actions.inc.php +++ b/interface/lib/classes/listform_actions.inc.php @@ -190,6 +190,7 @@ class listform_actions { return $rec; } + /* TODO: maybe rewrite SQL */ public function getQueryString($no_limit = false) { global $app; $sql_where = ''; diff --git a/interface/lib/classes/plugin_dbhistory.inc.php b/interface/lib/classes/plugin_dbhistory.inc.php index c65473111..3ad5d42ec 100644 --- a/interface/lib/classes/plugin_dbhistory.inc.php +++ b/interface/lib/classes/plugin_dbhistory.inc.php @@ -47,12 +47,13 @@ class plugin_dbhistory extends plugin_base { $db_table_idx = $app->tform->formDef["db_table_idx"]; $primary_id = $this->form->id; if($_SESSION["s"]["user"]["typ"] == 'admin') { - $sql = "SELECT action, tstamp, user, data FROM sys_datalog WHERE dbtable = '".$db_table."' AND dbidx = '".$db_table_idx.":".$primary_id."'"; + $sql = "SELECT action, tstamp, user, data FROM sys_datalog WHERE dbtable = ? AND dbidx = ?"; + $records = $app->db->queryAllRecords($sql, $db_table, $db_table_idx.":".$primary_id); } else { - $sql = "SELECT action, tstamp, user, data FROM sys_datalog WHERE user = '".$_SESSION["s"]["user"]["username"]."' dbtable = '".$db_table."' AND dbidx = '".$db_table_idx.":".$primary_id."'"; + $sql = "SELECT action, tstamp, user, data FROM sys_datalog WHERE user = ? AND dbtable = ? AND dbidx = ?"; + $records = $app->db->queryAllRecords($sql, $_SESSION["s"]["user"]["username"], $db_table, $db_table_idx.":".$primary_id); } - $records = $app->db->queryAllRecords($sql); if(is_array($records)) { $content .= ''; foreach($records as $rec) { diff --git a/interface/lib/classes/remote.d/client.inc.php b/interface/lib/classes/remote.d/client.inc.php index f0c7b8f9f..2fb436352 100644 --- a/interface/lib/classes/remote.d/client.inc.php +++ b/interface/lib/classes/remote.d/client.inc.php @@ -468,7 +468,6 @@ class remoting_client extends remoting { throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); return false; } - $username = $app->db->quote($username); $rec = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE username = ?", $username); if (isset($rec)) { return $rec; @@ -519,7 +518,6 @@ class remoting_client extends remoting { $client_id = $app->functions->intval($client_id); $client = $app->db->queryOneRecord("SELECT client_id FROM client WHERE client_id = ?", $client_id); if($client['client_id'] > 0) { - $new_password = $app->db->quote($new_password); $sql = "UPDATE client SET password = md5(?) WHERE client_id = ?"; $app->db->query($sql, $new_password, $client_id); $sql = "UPDATE sys_user SET passwort = md5(?) WHERE client_id = ?"; diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php index 21ccb5b1a..b28adc103 100644 --- a/interface/lib/classes/remote.d/mail.inc.php +++ b/interface/lib/classes/remote.d/mail.inc.php @@ -1061,7 +1061,6 @@ class remoting_mail extends remoting { return false; } if (!empty($domain)) { - $domain = $app->db->quote($domain); $sql = "SELECT * FROM mail_domain WHERE domain = ?"; $result = $app->db->queryAllRecords($sql, $domain); return $result; diff --git a/interface/lib/classes/remote.d/sites.inc.php b/interface/lib/classes/remote.d/sites.inc.php index 34386cb4c..f4e6a79a5 100644 --- a/interface/lib/classes/remote.d/sites.inc.php +++ b/interface/lib/classes/remote.d/sites.inc.php @@ -102,7 +102,8 @@ class remoting_sites extends remoting { $app->remoting_lib->loadFormDef('../sites/form/database.tform.php'); return $app->remoting_lib->getDataRecord($primary_id); } - + + /* TODO: secure queries! */ //* Add a record public function sites_database_add($session_id, $client_id, $params) { diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php index a8c228cfc..241bad700 100644 --- a/interface/lib/classes/remoting.inc.php +++ b/interface/lib/classes/remoting.inc.php @@ -93,9 +93,6 @@ class remoting { $sql = "DELETE FROM remote_session WHERE tstamp < UNIX_TIMSTAMP()"; $app->db->query($sql); - $username = $app->db->quote($username); - $password = $app->db->quote($password); - if($client_login == true) { $sql = "SELECT * FROM sys_user WHERE USERNAME = ?"; $user = $app->db->queryOneRecord($sql, $username); @@ -175,8 +172,6 @@ class remoting { return false; } - $session_id = $app->db->quote($session_id); - $sql = "DELETE FROM remote_session WHERE remote_session = ?"; if($app->db->query($sql, $session_id) != false) { return true; @@ -201,7 +196,7 @@ class remoting { $sql = $app->remoting_lib->getSQL($params, 'INSERT', 0); //* Check if no system user with that username exists - $username = $app->db->quote($params["username"]); + $username = $params["username"]; $tmp = $app->db->queryOneRecord("SELECT count(userid) as number FROM sys_user WHERE username = ?", $username); if($tmp['number'] > 0) $app->remoting_lib->errorMessage .= "Duplicate username
"; @@ -471,8 +466,6 @@ class remoting { return false; } - $session_id = $app->db->quote($session_id); - $sql = "SELECT * FROM remote_session WHERE remote_session = ? AND tstamp >= UNIX_TIMSTAMP()"; $session = $app->db->queryOneRecord($sql, $session_id); if($session['remote_userid'] > 0) { diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php index af0143fee..a2e398895 100644 --- a/interface/lib/classes/remoting_lib.inc.php +++ b/interface/lib/classes/remoting_lib.inc.php @@ -262,12 +262,12 @@ class remoting_lib extends tform_base { function ispconfig_sysuser_add($params, $insert_id){ global $conf, $app, $sql1; - $username = $app->db->quote($params["username"]); - $password = $app->db->quote($params["password"]); + $username = $params["username"]; + $password = $params["password"]; if(!isset($params['modules'])) { $modules = $conf['interface_modules_enabled']; } else { - $modules = $app->db->quote($params['modules']); + $modules = $params['modules']; } if(isset($params['limit_client']) && $params['limit_client'] > 0) { $modules .= ',client'; @@ -276,18 +276,18 @@ class remoting_lib extends tform_base { if(!isset($params['startmodule'])) { $startmodule = 'dashboard'; } else { - $startmodule = $app->db->quote($params["startmodule"]); + $startmodule = $params["startmodule"]; if(!preg_match('/'.$startmodule.'/', $modules)) { $_modules = explode(',', $modules); $startmodule=$_modules[0]; } } - $usertheme = $app->db->quote($params["usertheme"]); + $usertheme = $params["usertheme"]; $type = 'user'; $active = 1; $insert_id = $app->functions->intval($insert_id); - $language = $app->db->quote($params["language"]); - $groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('$username','','$insert_id')", 'groupid'); + $language = $params["language"]; + $groupid = $app->db->datalogInsert('sys_group', array("name" => $username, "description" => "", "client_id" => $insert_id), 'groupid'); $groups = $groupid; if(!isset($params['_ispconfig_pw_crypted']) || $params['_ispconfig_pw_crypted'] != 1) $password = $app->auth->crypt_password(stripslashes($password)); $sql1 = "INSERT INTO sys_user (username,passwort,modules,startmodule,app_theme,typ,active,language,groups,default_group,client_id) @@ -297,8 +297,8 @@ class remoting_lib extends tform_base { function ispconfig_sysuser_update($params, $client_id){ global $app; - $username = $app->db->quote($params["username"]); - $clear_password = $app->db->quote($params["password"]); + $username = $params["username"]; + $clear_password = $params["password"]; $client_id = $app->functions->intval($client_id); if(!isset($params['_ispconfig_pw_crypted']) || $params['_ispconfig_pw_crypted'] != 1) $password = $app->auth->crypt_password(stripslashes($clear_password)); else $password = $clear_password; diff --git a/interface/lib/classes/searchform.inc.php b/interface/lib/classes/searchform.inc.php index cfa8f2836..0a290c1d6 100644 --- a/interface/lib/classes/searchform.inc.php +++ b/interface/lib/classes/searchform.inc.php @@ -177,7 +177,7 @@ class searchform { if($this->searchChanged == 1) $_SESSION['search'][$list_name]['page'] = 0; $sql_von = $_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 ?? WHERE $sql_where", $table); $pages = $app->functions->intval(($record_count['anzahl'] - 1) / $records_per_page); $vars['list_file'] = $this->listDef['file']; @@ -247,7 +247,7 @@ class searchform { $list_name = $this->listDef['name']; $settings = $_SESSION['search'][$list_name]; unset($settings['page']); - $data = $app->db->quote(serialize($settings)); + $data = serialize($settings); $userid = $_SESSION['s']['user']['userid']; $groupid = $_SESSION['s']['user']['default_group']; @@ -260,9 +260,8 @@ class searchform { $sql = 'INSERT INTO `searchform` ( ' .'`sys_userid` , `sys_groupid` , `sys_perm_user` , `sys_perm_group` , `sys_perm_other` , `module` , `searchform` , `title` , `data` ' - .')VALUES (' - ."'$userid', '$groupid', '$sys_perm_user', '$sys_perm_group', '$sys_perm_other', '$module', '$searchform', '$title', '$data')"; - $app->db->query($sql); + .')VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)'; + $app->db->query($sql, $userid, $groupid, $sys_perm_user, $sys_perm_group, $sys_perm_other, $module, $searchform, $title, $data); } public function decode($record) @@ -303,6 +302,7 @@ class searchform { return $record; } + /* TODO: check for double quoting mysql value */ public function encode($record) { global $app; diff --git a/interface/lib/classes/sites_database_plugin.inc.php b/interface/lib/classes/sites_database_plugin.inc.php index f6180c2f8..89cb7ce9c 100644 --- a/interface/lib/classes/sites_database_plugin.inc.php +++ b/interface/lib/classes/sites_database_plugin.inc.php @@ -44,7 +44,7 @@ class sites_database_plugin { //* The Database user shall be owned by the same group then the website $sys_groupid = $app->functions->intval($web['sys_groupid']); - $backup_interval = $app->db->quote($web['backup_interval']); + $backup_interval = $web['backup_interval']; $backup_copies = $app->functions->intval($web['backup_copies']); $sql = "UPDATE web_database SET sys_groupid = ?, backup_interval = ?, backup_copies = ? WHERE database_id = ?"; diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php index 8905be0f4..30a71db63 100644 --- a/interface/lib/classes/tform.inc.php +++ b/interface/lib/classes/tform.inc.php @@ -79,8 +79,8 @@ class tform extends tform_base { $escape = '`'; } - $sql = "SELECT ".$this->formDef['db_table_idx']." FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$record_id." AND ".$this->getAuthSQL($perm); - if($record = $app->db->queryOneRecord($sql)) { + $sql = "SELECT ?? FROM ?? WHERE ?? = ? AND ".$this->getAuthSQL($perm); + if($record = $app->db->queryOneRecord($sql, $this->formDef['db_table_idx'], $this->formDef['db_table'], $this->formDef['db_table_idx'], $record_id)) { return true; } else { return false; @@ -133,8 +133,8 @@ class tform extends tform_base { $escape = '`'; } - $sql = "SELECT sys_userid FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id; - $record = $app->db->queryOneRecord($sql); + $sql = "SELECT sys_userid FROM ?? WHERE ?? = ?"; + $record = $app->db->queryOneRecord($sql, $this->formDef['db_table'], $this->formDef['db_table_idx'], $primary_id); // return true if the readonly flag of the form is set and the current loggedin user is not the owner of the record. if(isset($this->formDef['tabs'][$tab]['readonly']) && $this->formDef['tabs'][$tab]['readonly'] == true && $record['sys_userid'] != $_SESSION["s"]["user"]["userid"]) { @@ -161,18 +161,17 @@ class tform extends tform_base { global $app; $check_passed = true; - $limit_name = $app->db->quote($limit_name); if($limit_name == '') $app->error('Limit name missing in function checkClientLimit.'); // Get the limits of the client that is currently logged in $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT $limit_name as number, parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); + $client = $app->db->queryOneRecord("SELECT ?? as number, parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $limit_name, $client_group_id); // Check if the user may add another item if($client["number"] >= 0) { - $sql = "SELECT count(".$this->formDef['db_table_idx'].") as number FROM ".$this->formDef['db_table']." WHERE ".$this->getAuthSQL('u'); + $sql = "SELECT count(??) as number FROM ?? WHERE ".$this->getAuthSQL('u'); if($sql_where != '') $sql .= ' and '.$sql_where; - $tmp = $app->db->queryOneRecord($sql); + $tmp = $app->db->queryOneRecord($sql, $this->formDef['db_table_idx'], $this->formDef['db_table']); if($tmp["number"] >= $client["number"]) $check_passed = false; } @@ -183,7 +182,6 @@ class tform extends tform_base { global $app; $check_passed = true; - $limit_name = $app->db->quote($limit_name); if($limit_name == '') $app->error('Limit name missing in function checkClientLimit.'); // Get the limits of the client that is currently logged in @@ -194,19 +192,19 @@ class tform extends tform_base { if($client['parent_client_id'] != 0) { //* first we need to know the groups of this reseller - $tmp = $app->db->queryOneRecord("SELECT userid, groups FROM sys_user WHERE client_id = ".$client['parent_client_id']); + $tmp = $app->db->queryOneRecord("SELECT userid, groups FROM sys_user WHERE client_id = ?", $client['parent_client_id']); $reseller_groups = $tmp["groups"]; $reseller_userid = $tmp["userid"]; // Get the limits of the reseller of the logged in client $client_group_id = $_SESSION["s"]["user"]["default_group"]; - $reseller = $app->db->queryOneRecord("SELECT $limit_name as number FROM client WHERE client_id = ".$client['parent_client_id']); + $reseller = $app->db->queryOneRecord("SELECT $limit_name as number FROM client WHERE client_id = ?", $client['parent_client_id']); // Check if the user may add another item if($reseller["number"] >= 0) { - $sql = "SELECT count(".$this->formDef['db_table_idx'].") as number FROM ".$this->formDef['db_table']." WHERE (sys_groupid IN (".$reseller_groups.") or sys_userid = ".$reseller_userid.")"; + $sql = "SELECT count(??) as number FROM ?? WHERE (sys_groupid IN ? or sys_userid = ?)"; if($sql_where != '') $sql .= ' and '.$sql_where; - $tmp = $app->db->queryOneRecord($sql); + $tmp = $app->db->queryOneRecord($sql, $this->formDef['db_table_idx'], $this->formDef['db_table'], explode(',', $reseller_groups), $reseller_userid); if($tmp["number"] >= $reseller["number"]) $check_passed = false; } } diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index 0924be07f..fb374346a 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -365,13 +365,13 @@ class tform_base { if($client['parent_client_id'] != 0) { //* first we need to know the groups of this reseller - $tmp = $app->db->queryOneRecord("SELECT userid, groups FROM sys_user WHERE client_id = ".$client['parent_client_id']); + $tmp = $app->db->queryOneRecord("SELECT userid, groups FROM sys_user WHERE client_id = ?", $client['parent_client_id']); $reseller_groups = $tmp["groups"]; $reseller_userid = $tmp["userid"]; // Get the limits of the reseller of the logged in client $client_group_id = $_SESSION["s"]["user"]["default_group"]; - $reseller = $app->db->queryOneRecord("SELECT ".$limit_parts[1]." as lm FROM client WHERE client_id = ".$client['parent_client_id']); + $reseller = $app->db->queryOneRecord("SELECT ".$limit_parts[1]." as lm FROM client WHERE client_id = ?", $client['parent_client_id']); $allowed = explode(',', $reseller['lm']); } else { return $values; @@ -853,7 +853,7 @@ class tform_base { if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n'; if($validator['allowempty'] == 'n' || ($validator['allowempty'] == 'y' && $field_value != '')){ if($this->action == 'NEW') { - $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM ".$escape.$this->formDef['db_table'].$escape. " WHERE $field_name = '".$app->db->quote($field_value)."'"); + $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM ?? WHERE ?? = ?", $this->formDef['db_table'], $field_name, $field_value); if($num_rec["number"] > 0) { $errmsg = $validator['errmsg']; if(isset($this->wordbook[$errmsg])) { @@ -863,7 +863,7 @@ class tform_base { } } } else { - $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM ".$escape.$this->formDef['db_table'].$escape. " WHERE $field_name = '".$app->db->quote($field_value)."' AND ".$this->formDef['db_table_idx']." != ".$this->primary_id); + $num_rec = $app->db->queryOneRecord("SELECT count(*) as number FROM ?? WHERE ?? = ? AND ?? != ?", $this->formDef['db_table'], $field_name, $field_value, $this->formDef['db_table_idx'], $this->primary_id); if($num_rec["number"] > 0) { $errmsg = $validator['errmsg']; if(isset($this->wordbook[$errmsg])) { @@ -1139,7 +1139,7 @@ class tform_base { $record[$key] = $app->auth->crypt_password(stripslashes($record[$key])); $sql_insert_val .= "'".$app->db->quote($record[$key])."', "; } elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') { - $tmp = $app->db->queryOneRecord("SELECT PASSWORD('".$app->db->quote(stripslashes($record[$key]))."') as `crypted`"); + $tmp = $app->db->queryOneRecord("SELECT PASSWORD(?) as `crypted`", stripslashes($record[$key])); $record[$key] = $tmp['crypted']; $sql_insert_val .= "'".$app->db->quote($record[$key])."', "; } else { @@ -1167,7 +1167,7 @@ class tform_base { $record[$key] = $app->auth->crypt_password(stripslashes($record[$key])); $sql_update .= "`$key` = '".$app->db->quote($record[$key])."', "; } elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') { - $tmp = $app->db->queryOneRecord("SELECT PASSWORD('".$app->db->quote(stripslashes($record[$key]))."') as `crypted`"); + $tmp = $app->db->queryOneRecord("SELECT PASSWORD(?) as `crypted`", stripslashes($record[$key])); $record[$key] = $tmp['crypted']; $sql_update .= "`$key` = '".$app->db->quote($record[$key])."', "; } else { @@ -1359,8 +1359,8 @@ class tform_base { function getDataRecord($primary_id) { global $app; $escape = '`'; - $sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id." AND ".$this->getAuthSQL('r', $this->formDef['db_table']); - return $app->db->queryOneRecord($sql); + $sql = "SELECT * FROM ?? WHERE ?? = ? AND ".$this->getAuthSQL('r', $this->formDef['db_table']); + return $app->db->queryOneRecord($sql, $this->formDef['db_table'], $this->formDef['db_table_idx'], $primary_id); } diff --git a/interface/lib/classes/tools_sites.inc.php b/interface/lib/classes/tools_sites.inc.php index 989b9eae8..b2881f57c 100644 --- a/interface/lib/classes/tools_sites.inc.php +++ b/interface/lib/classes/tools_sites.inc.php @@ -144,6 +144,7 @@ class tools_sites { return $res; } + /* TODO: rewrite SQL */ function getDomainModuleDomains($not_used_in_table = null, $selected_domain = null) { global $app; @@ -168,6 +169,7 @@ class tools_sites { return $app->db->queryAllRecords($sql, $not_used_in_table, $selected_domain); } + /* TODO: rewrite SQL */ function checkDomainModuleDomain($domain_id) { global $app; @@ -180,7 +182,8 @@ class tools_sites { if(!$domain || !$domain['domain_id']) return false; return $domain['domain']; } - + + /* TODO: rewrite SQL */ function getClientIdForDomain($domain_id) { global $app; diff --git a/interface/lib/plugins/mail_user_filter_plugin.inc.php b/interface/lib/plugins/mail_user_filter_plugin.inc.php index d5a44305c..640dab230 100644 --- a/interface/lib/plugins/mail_user_filter_plugin.inc.php +++ b/interface/lib/plugins/mail_user_filter_plugin.inc.php @@ -86,8 +86,7 @@ class mail_user_filter_plugin { $out = $new_rule . $out; } - $out = $app->db->quote($out); - $app->db->datalogUpdate('mail_user', "custom_mailfilter = '$out'", 'mailuser_id', $page_form->dataRecord["mailuser_id"]); + $app->db->datalogUpdate('mail_user', array("custom_mailfilter" => $out), 'mailuser_id', $page_form->dataRecord["mailuser_id"]); } @@ -111,8 +110,7 @@ class mail_user_filter_plugin { } } - $out = $app->db->quote($out); - $app->db->datalogUpdate('mail_user', "custom_mailfilter = '$out'", 'mailuser_id', $page_form->dataRecord["mailuser_id"]); + $app->db->datalogUpdate('mail_user', array("custom_mailfilter" => $out), 'mailuser_id', $page_form->dataRecord["mailuser_id"]); } diff --git a/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php b/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php index 3fce00ba3..dedc6d721 100644 --- a/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php +++ b/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php @@ -227,15 +227,15 @@ class sites_web_vhost_domain_plugin { if(empty($web_rec['php_open_basedir']) || (!empty($page_form->dataRecord["domain"]) && !empty($page_form->oldDataRecord["domain"]) && $page_form->dataRecord["domain"] != $page_form->oldDataRecord["domain"])) { $php_open_basedir = $web_rec['php_open_basedir']; - $php_open_basedir = $app->db->quote(str_replace($page_form->oldDataRecord['domain'], $web_rec['domain'], $php_open_basedir)); + $php_open_basedir = str_replace($page_form->oldDataRecord['domain'], $web_rec['domain'], $php_open_basedir); $sql = "UPDATE web_domain SET php_open_basedir = ? WHERE domain_id = ?"; $app->db->query($sql, $php_open_basedir, $page_form->id); } if(empty($web_rec['php_open_basedir']) || (isset($page_form->dataRecord["client_group_id"]) && $page_form->dataRecord["client_group_id"] != $page_form->oldDataRecord["sys_groupid"])) { - $document_root = $app->db->quote(str_replace("[client_id]", $client_id, $document_root)); + $document_root = str_replace("[client_id]", $client_id, $document_root); $php_open_basedir = str_replace("[website_path]", $document_root, $web_config["php_open_basedir"]); - $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir)); + $php_open_basedir = str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir); $sql = "UPDATE web_domain SET php_open_basedir = ? WHERE domain_id = ?"; $app->db->query($sql, $php_open_basedir, $page_form->id); } @@ -243,11 +243,11 @@ class sites_web_vhost_domain_plugin { //* Change database backup options when web backup options have been changed if(isset($page_form->dataRecord['backup_interval']) && ($page_form->dataRecord['backup_interval'] != $page_form->oldDataRecord['backup_interval'] || $page_form->dataRecord['backup_copies'] != $page_form->oldDataRecord['backup_copies'])) { //* Update all databases - $backup_interval = $app->db->quote($page_form->dataRecord['backup_interval']); + $backup_interval = $page_form->dataRecord['backup_interval']; $backup_copies = $app->functions->intval($page_form->dataRecord['backup_copies']); $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE parent_domain_id = ".$page_form->id); foreach($records as $rec) { - $app->db->datalogUpdate('web_database', "backup_interval = '$backup_interval', backup_copies = '$backup_copies'", 'database_id', $rec['database_id']); + $app->db->datalogUpdate('web_database', array("backup_interval" => $backup_interval, "backup_copies" => $backup_copies), 'database_id', $rec['database_id']); } unset($records); unset($rec); diff --git a/interface/lib/plugins/vm_openvz_plugin.inc.php b/interface/lib/plugins/vm_openvz_plugin.inc.php index 278a87de3..ac1b0801c 100644 --- a/interface/lib/plugins/vm_openvz_plugin.inc.php +++ b/interface/lib/plugins/vm_openvz_plugin.inc.php @@ -214,9 +214,9 @@ class vm_openvz_plugin { $full_hostname = str_replace('{VEID}', $vm['veid'], $vm['hostname']); $hostname_parts = explode('.', $full_hostname); - $hostname = $app->db->quote($hostname_parts[0]); + $hostname = $hostname_parts[0]; unset($hostname_parts[0]); - $zone = $app->db->quote((implode('.', $hostname_parts))); + $zone = implode('.', $hostname_parts); unset($hostname_parts); // Find the dns zone @@ -224,7 +224,7 @@ class vm_openvz_plugin { $rr_rec = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ? AND name = ?", $zone_rec['id'], $hostname); if($zone_rec['id'] > 0) { - $ip_address = $app->db->quote($vm['ip_address']); + $ip_address = $vm['ip_address']; $sys_userid = $app->functions->intval($zone_rec['sys_userid']); $sys_groupid = $app->functions->intval($zone_rec['sys_groupid']); $server_id = $app->functions->intval($zone_rec['server_id']); diff --git a/interface/web/admin/server_config_edit.php b/interface/web/admin/server_config_edit.php index e561b00ac..d64b6dd7d 100644 --- a/interface/web/admin/server_config_edit.php +++ b/interface/web/admin/server_config_edit.php @@ -96,7 +96,7 @@ class page_action extends tform_actions { $server_config_array[$section] = $app->tform->encode($this->dataRecord, $section); $server_config_str = $app->ini_parser->get_ini_string($server_config_array); - $app->db->datalogUpdate('server', "config = '".$app->db->quote($server_config_str)."'", 'server_id', $server_id); + $app->db->datalogUpdate('server', array("config" => $server_config_str), 'server_id', $server_id); } } diff --git a/interface/web/admin/software_package_install.php b/interface/web/admin/software_package_install.php index 80e1fe667..864e8d724 100644 --- a/interface/web/admin/software_package_install.php +++ b/interface/web/admin/software_package_install.php @@ -38,9 +38,9 @@ $app->auth->check_security_permissions('admin_allow_software_packages'); //* This is only allowed for administrators if(!$app->auth->is_admin()) die('only allowed for administrators.'); -$package_name = $app->db->quote($_REQUEST['package']); +$package_name = $_REQUEST['package']; $install_server_id = $app->functions->intval($_REQUEST['server_id']); -$install_key = $app->db->quote(trim($_REQUEST['install_key'])); +$install_key = trim($_REQUEST['install_key']); $package = $app->db->queryOneRecord("SELECT * FROM software_package WHERE package_name = ?", $package_name); @@ -105,7 +105,7 @@ if($install_server_id > 0 && $package_name != '' && ($package['package_installab if(!isset($package_config_array['remote_api'])) { $remote_user = 'ispapp'.$package['package_id']; $remote_password = md5(mt_rand()); - $remote_functions = $app->db->quote($package['package_remote_functions']); + $remote_functions = $package['package_remote_functions']; $package_config_array['remote_api'] = array( 'remote_hostname' => $_SERVER['HTTP_HOST'], @@ -116,7 +116,7 @@ if($install_server_id > 0 && $package_name != '' && ($package['package_installab $package_config_str = $app->ini_parser->get_ini_string($package_config_array); $package['package_config'] = $package_config_str; $remote_password_md5 = md5($remote_password); - $app->db->datalogUpdate('software_package', "package_config = '".$app->db->quote($package_config_str)."'", 'package_id', $package['package_id']); + $app->db->datalogUpdate('software_package', array("package_config" => $package_config_str), 'package_id', $package['package_id']); $sql = "INSERT INTO `remote_user` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `remote_username`, `remote_password`, `remote_functions`) VALUES (1, 1, 'riud', 'riud', '', ?, ?, ?)"; diff --git a/interface/web/admin/software_package_list.php b/interface/web/admin/software_package_list.php index c0c2f2517..19e637a6e 100644 --- a/interface/web/admin/software_package_list.php +++ b/interface/web/admin/software_package_list.php @@ -48,23 +48,40 @@ if(is_array($repos) && isset($_GET['action']) && $_GET['action'] == 'repoupdate' $packages = $client->get_packages($repo['repo_username'], $repo['repo_password']); if(is_array($packages)) { foreach($packages as $p) { - $package_name = $app->db->quote($p['name']); + $package_name = $p['name']; $tmp = $app->db->queryOneRecord("SELECT package_id FROM software_package WHERE package_name = ?", $package_name); - $package_title = $app->db->quote($p['title']); - $package_description = $app->db->quote($p['description']); + $package_title = $p['title']; + $package_description = $p['description']; $software_repo_id = $app->functions->intval($repo['software_repo_id']); - $package_type = $app->db->quote($p['type']); - $package_installable = $app->db->quote($p['installable']); - $package_requires_db = $app->db->quote($p['requires_db']); - $package_remote_functions = $app->db->quote($p['remote_functions']); + $package_type = $p['type']; + $package_installable = $p['installable']; + $package_requires_db = $p['requires_db']; + $package_remote_functions = $p['remote_functions']; if(empty($tmp['package_id'])) { - $insert_data = "(software_repo_id, package_name, package_title, package_description,package_type,package_installable,package_requires_db,package_remote_functions) VALUES ($software_repo_id, '$package_name', '$package_title', '$package_description','$package_type','$package_installable','$package_requires_db','$package_remote_functions')"; + $insert_data = array( + "software_repo_id" => $software_repo_id, + "package_name" => $package_name, + "package_title" => $package_title, + "package_description" => $package_description, + "package_type" => $package_type, + "package_installable" => $package_installable, + "package_requires_db" => $package_requires_db, + "package_remote_functions" => $package_remote_functions + ); $app->db->datalogInsert('software_package', $insert_data, 'package_id'); $packages_added++; } else { - $update_data = "software_repo_id = $software_repo_id, package_title = '$package_title', package_description = '$package_description', package_type = '$package_type', package_installable = '$package_installable', package_requires_db = '$package_requires_db', package_remote_functions = '$package_remote_functions'"; + $update_data = array( + "software_repo_id" => $software_repo_id, + "package_title" => $package_title, + "package_description" => $package_description, + "package_type" => $package_type, + "package_installable" => $package_installable, + "package_requires_db" => $package_requires_db, + "package_remote_functions" => $package_remote_functions + ); //echo $update_data; $app->db->datalogUpdate('software_package', $update_data, 'package_id', $tmp['package_id']); } @@ -99,8 +116,19 @@ if(is_array($repos) && isset($_GET['action']) && $_GET['action'] == 'repoupdate' $sql = "SELECT * FROM software_update WHERE package_name = ? and v1 = ? and v2 = ? and v3 = ? and v4 = ?"; $tmp = $app->db->queryOneRecord($sql, $package_name, $v1, $v2, $v3, $v4); if(!isset($tmp['software_update_id'])) { - $insert_data = "(software_repo_id, package_name, update_url, update_md5, update_dependencies, update_title, v1, v2, v3, v4, type) - VALUES ($software_repo_id, '$package_name', '$update_url', '$update_md5', '$update_dependencies', '$update_title', '$v1', '$v2', '$v3', '$v4', '$type')"; + $insert_data = array( + "software_repo_id" => $software_repo_id, + "package_name" => $package_name, + "update_url" => $update_url, + "update_md5" => $update_md5, + "update_dependencies" => $update_dependencies, + "update_title" => $update_title, + "v1" => $v1, + "v2" => $v2, + "v3" => $v3, + "v4" => $v4, + "type" => $type + ); $app->db->datalogInsert('software_update', $insert_data, 'software_update_id'); } diff --git a/interface/web/admin/software_update_list.php b/interface/web/admin/software_update_list.php index e813ded74..cc22b8053 100644 --- a/interface/web/admin/software_update_list.php +++ b/interface/web/admin/software_update_list.php @@ -72,13 +72,13 @@ if(is_array($repos)) { $v3 = $app->functions->intval($version_array[2]); $v4 = $app->functions->intval($version_array[3]); - $package_name = $app->db->quote($u['package_name']); + $package_name = $u['package_name']; $software_repo_id = $app->functions->intval($repo['software_repo_id']); - $update_url = $app->db->quote($u['url']); - $update_md5 = $app->db->quote($u['md5']); - $update_dependencies = (isset($u['dependencies']))?$app->db->quote($u['dependencies']):''; - $update_title = $app->db->quote($u['title']); - $type = $app->db->quote($u['type']); + $update_url = $u['url']; + $update_md5 = $u['md5']; + $update_dependencies = (isset($u['dependencies']))?$u['dependencies']:''; + $update_title = $u['title']; + $type = $u['type']; // Check that we do not have this update in the database yet $sql = "SELECT * FROM software_update WHERE package_name = ? and v1 = ? and v2 = ? and v3 = ? and v4 = ?"; diff --git a/interface/web/admin/system_config_edit.php b/interface/web/admin/system_config_edit.php index a9e567490..1e1fdc24f 100644 --- a/interface/web/admin/system_config_edit.php +++ b/interface/web/admin/system_config_edit.php @@ -165,7 +165,7 @@ class page_action extends tform_actions { $server_config_array[$section] = $new_config; $server_config_str = $app->ini_parser->get_ini_string($server_config_array); - if($conf['demo_mode'] != true) $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($server_config_str)."'", 'sysini_id', 1); + if($conf['demo_mode'] != true) $app->db->datalogUpdate('sys_ini', array("config" => $server_config_str), 'sysini_id', 1); /* * If we should use the domain-module, we have to insert all existing domains into the table diff --git a/interface/web/admin/users_edit.php b/interface/web/admin/users_edit.php index 78a86c633..11f783c2a 100644 --- a/interface/web/admin/users_edit.php +++ b/interface/web/admin/users_edit.php @@ -98,8 +98,8 @@ class page_action extends tform_actions { $client = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE userid = ?", $this->id); $client_id = $app->functions->intval($client['client_id']); - $username = $app->db->quote($this->dataRecord["username"]); - $old_username = $app->db->quote($this->oldDataRecord['username']); + $username = $this->dataRecord["username"]; + $old_username = $this->oldDataRecord['username']; // username changed if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) { @@ -112,7 +112,7 @@ class page_action extends tform_actions { // password changed if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord["passwort"]) && $this->dataRecord["passwort"] != '') { - $password = $app->db->quote($this->dataRecord["passwort"]); + $password = $this->dataRecord["passwort"]; $salt="$1$"; $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; for ($n=0;$n<8;$n++) { @@ -126,7 +126,7 @@ class page_action extends tform_actions { // language changed if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) { - $language = $app->db->quote($this->dataRecord["language"]); + $language = $this->dataRecord["language"]; $sql = "UPDATE client SET language = ? WHERE client_id = ? AND username = ?"; $app->db->query($sql, $language, $client_id, $username); } diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php index b03c09267..f9bd9a00c 100644 --- a/interface/web/client/client_edit.php +++ b/interface/web/client/client_edit.php @@ -103,7 +103,7 @@ class page_action extends tform_actions { } if($this->id != 0) { - $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ' . $this->id); + $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ?', $this->id); if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) { // check previous type of storing templates $tpls = explode('/', $this->oldDataRecord['template_additional']); @@ -140,7 +140,7 @@ class page_action extends tform_actions { $app->tpl->setVar('tpl_add_select', $option); // check for new-style records - $result = $app->db->queryAllRecords('SELECT assigned_template_id, client_template_id FROM client_template_assigned WHERE client_id = ' . $this->id); + $result = $app->db->queryAllRecords('SELECT assigned_template_id, client_template_id FROM client_template_assigned WHERE client_id = ?', $this->id); if($result && count($result) > 0) { // new style $items = array(); @@ -166,8 +166,8 @@ class page_action extends tform_actions { unset($tmprec); } else { // old style - $sql = "SELECT template_additional FROM client WHERE client_id = " . $this->id; - $result = $app->db->queryOneRecord($sql); + $sql = "SELECT template_additional FROM client WHERE client_id = ?"; + $result = $app->db->queryOneRecord($sql, $this->id); $tplAdd = explode("/", $result['template_additional']); $text = ''; foreach($tplAdd as $item){ @@ -196,31 +196,18 @@ class page_action extends tform_actions { $customer_no = $app->functions->intval($system_config['misc']['customer_no_start']+$system_config['misc']['customer_no_counter']); $customer_no_string = str_replace('[CUSTOMER_NO]',$customer_no,$system_config['misc']['customer_no_template']); $app->tpl->setVar('customer_no',$customer_no_string); - - //* save new counter value - /* - $system_config['misc']['customer_no_counter']++; - $system_config_str = $app->ini_parser->get_ini_string($system_config); - $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($system_config_str)."'", 'sysini_id', 1); - */ } } else { //* Logged in user must be a reseller //* get the record of the reseller $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $reseller = $app->db->queryOneRecord("SELECT client.client_id, client.customer_no_template, client.customer_no_counter, client.customer_no_start FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ".$client_group_id); + $reseller = $app->db->queryOneRecord("SELECT client.client_id, client.customer_no_template, client.customer_no_counter, client.customer_no_start FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ?", $client_group_id); if($reseller['customer_no_template'] != '') { //* Set customer no default $customer_no = $app->functions->intval($reseller['customer_no_start']+$reseller['customer_no_counter']); $customer_no_string = str_replace('[CUSTOMER_NO]',$customer_no,$reseller['customer_no_template']); $app->tpl->setVar('customer_no',$customer_no_string); - - //* save new counter value - /* - $customer_no_counter = $app->functions->intval($reseller['customer_no_counter']+1); - $app->db->query("UPDATE client SET customer_no_counter = $customer_no_counter WHERE client_id = ".$app->functions->intval($reseller['client_id'])); - */ } } } @@ -257,39 +244,39 @@ class page_action extends tform_actions { $groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('".$app->db->quote($this->dataRecord["username"])."','',".$this->id.")", 'groupid'); $groups = $groupid; - $username = $app->db->quote($this->dataRecord["username"]); - $password = $app->db->quote($this->dataRecord["password"]); + $username = $this->dataRecord["username"]; + $password = $this->dataRecord["password"]; $modules = $conf['interface_modules_enabled']; if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] > 0) $modules .= ',client'; $startmodule = (stristr($modules, 'dashboard'))?'dashboard':'client'; - $usertheme = $app->db->quote($this->dataRecord["usertheme"]); + $usertheme = $this->dataRecord["usertheme"]; $type = 'user'; $active = 1; - $language = $app->db->quote($this->dataRecord["language"]); + $language = $this->dataRecord["language"]; $password = $app->auth->crypt_password($password); // Create the controlpaneluser for the client //Generate ssh-rsa-keys exec('ssh-keygen -t rsa -C '.$username.'-rsa-key-'.time().' -f /tmp/id_rsa -N ""'); - $app->db->query("UPDATE client SET created_at = ".time().", id_rsa = '".$app->db->quote(@file_get_contents('/tmp/id_rsa'))."', ssh_rsa = '".$app->db->quote(@file_get_contents('/tmp/id_rsa.pub'))."' WHERE client_id = ".$this->id); + $app->db->query("UPDATE client SET created_at = UNIX_TIMESTAMP(), id_rsa = ?, ssh_rsa = ? WHERE client_id = ?", @file_get_contents('/tmp/id_rsa'), @file_get_contents('/tmp/id_rsa.pub'), $this->id); exec('rm -f /tmp/id_rsa /tmp/id_rsa.pub'); // Create the controlpaneluser for the client $sql = "INSERT INTO sys_user (username,passwort,modules,startmodule,app_theme,typ,active,language,groups,default_group,client_id) - VALUES ('$username','$password','$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,".$this->id.")"; - $app->db->query($sql); + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; + $app->db->query($sql, $username, $password, $modules, $startmodule, $usertheme, $type, $active, $language, $groups, $groupid, $this->id); //* If the user who inserted the client is a reseller (not admin), we will have to add this new client group //* to his groups, so he can administrate the records of this client. if($_SESSION['s']['user']['typ'] == 'user') { $app->auth->add_group_to_user($_SESSION['s']['user']['userid'], $groupid); - $app->db->query("UPDATE client SET parent_client_id = ".$app->functions->intval($_SESSION['s']['user']['client_id'])." WHERE client_id = ".$this->id); + $app->db->query("UPDATE client SET parent_client_id = ? WHERE client_id = ?", $_SESSION['s']['user']['client_id'], $this->id); } else { if($this->dataRecord['parent_client_id'] > 0) { //* get userid of the reseller and add it to the group of the client - $tmp = $app->db->queryOneRecord("SELECT sys_user.userid FROM sys_user,sys_group WHERE sys_user.default_group = sys_group.groupid AND sys_group.client_id = ".$app->functions->intval($this->dataRecord['parent_client_id'])); + $tmp = $app->db->queryOneRecord("SELECT sys_user.userid FROM sys_user,sys_group WHERE sys_user.default_group = sys_group.groupid AND sys_group.client_id = ?", $this->dataRecord['parent_client_id']); $app->auth->add_group_to_user($tmp['userid'], $groupid); - $app->db->query("UPDATE client SET parent_client_id = ".$app->functions->intval($this->dataRecord['parent_client_id'])." WHERE client_id = ".$this->id); + $app->db->query("UPDATE client SET parent_client_id = ? WHERE client_id = ?", $this->dataRecord['parent_client_id'], $this->id); unset($tmp); } } @@ -319,8 +306,8 @@ class page_action extends tform_actions { $default_dnsserver = $app->functions->intval($tmp['server_id']); } - $sql = "UPDATE client SET mail_servers = $default_mailserver, web_servers = $default_webserver, dns_servers = $default_dnsserver, default_slave_dnsserver = $default_dnsserver, db_servers = $default_dbserver WHERE client_id = ".$this->id; - $app->db->query($sql); + $sql = "UPDATE client SET mail_servers = ?, web_servers = ?, dns_servers = ?, default_slave_dnsserver = ?, db_servers = ? WHERE client_id = ?"; + $app->db->query($sql, $default_mailserver, $default_webserver, $default_dnsserver, $default_dnsserver, $default_dbserver, $this->id); if(isset($this->dataRecord['template_master'])) { $app->uses('client_templates'); @@ -344,20 +331,20 @@ class page_action extends tform_actions { //* Logged in user must be a reseller //* get the record of the reseller $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $reseller = $app->db->queryOneRecord("SELECT client.client_id, client.customer_no_template, client.customer_no_counter, client.customer_no_start FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ".$client_group_id); + $reseller = $app->db->queryOneRecord("SELECT client.client_id, client.customer_no_template, client.customer_no_counter, client.customer_no_start FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ?", $client_group_id); if($reseller['customer_no_template'] != '') { //* save new counter value $customer_no_counter = $app->functions->intval($reseller['customer_no_counter']+1); - $app->db->query("UPDATE client SET customer_no_counter = $customer_no_counter WHERE client_id = ".$app->functions->intval($reseller['client_id'])); + $app->db->query("UPDATE client SET customer_no_counter = ? WHERE client_id = ?", $customer_no_counter, $reseller['client_id']); } } } //* Send welcome email $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $sql = "SELECT * FROM client_message_template WHERE template_type = 'welcome' AND sys_groupid = ".$client_group_id; - $email_template = $app->db->queryOneRecord($sql); + $sql = "SELECT * FROM client_message_template WHERE template_type = 'welcome' AND sys_groupid = ?"; + $email_template = $app->db->queryOneRecord($sql, $client_group_id); $client = $app->tform->getDataRecord($this->id); if(is_array($email_template) && $client['email'] != '') { @@ -387,7 +374,7 @@ class page_action extends tform_actions { $from = $system_config['admin_mail']; } else { $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $reseller = $app->db->queryOneRecord("SELECT client.email FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ".$client_group_id); + $reseller = $app->db->queryOneRecord("SELECT client.email FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ?", $client_group_id); $from = $reseller["email"]; } @@ -408,19 +395,19 @@ class page_action extends tform_actions { global $app, $conf; // username changed if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) { - $username = $app->db->quote($this->dataRecord["username"]); + $username = $this->dataRecord["username"]; $client_id = $this->id; - $sql = "UPDATE sys_user SET username = '$username' WHERE client_id = $client_id"; - $app->db->query($sql); + $sql = "UPDATE sys_user SET username = ? WHERE client_id = ?"; + $app->db->query($sql, $username, $client_id); - $tmp = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = $client_id"); - $app->db->datalogUpdate("sys_group", "name = '$username'", 'groupid', $tmp['groupid']); + $tmp = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = ?", $client_id); + $app->db->datalogUpdate("sys_group", array("name" => $username), 'groupid', $tmp['groupid']); unset($tmp); } // password changed if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') { - $password = $app->db->quote($this->dataRecord["password"]); + $password = $this->dataRecord["password"]; $salt="$1$"; $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; for ($n=0;$n<8;$n++) { @@ -429,8 +416,8 @@ class page_action extends tform_actions { $salt.="$"; $password = crypt(stripslashes($password), $salt); $client_id = $this->id; - $sql = "UPDATE sys_user SET passwort = '$password' WHERE client_id = $client_id"; - $app->db->query($sql); + $sql = "UPDATE sys_user SET passwort = ? WHERE client_id = ?"; + $app->db->query($sql, $password, $client_id); } if(!isset($this->dataRecord['locked'])) $this->dataRecord['locked'] = 'n'; @@ -439,7 +426,7 @@ class page_action extends tform_actions { // get tmp_data of client - $client_data = $app->db->queryOneRecord('SELECT `tmp_data` FROM `client` WHERE `client_id` = ' . $this->id); + $client_data = $app->db->queryOneRecord('SELECT `tmp_data` FROM `client` WHERE `client_id` = ?', $this->id); if($client_data['tmp_data'] == '') $tmp_data = array(); else $tmp_data = unserialize($client_data['tmp_data']); @@ -463,8 +450,8 @@ class page_action extends tform_actions { 'web_folder_user' => 'web_folder_user_id' ); - $udata = $app->db->queryOneRecord('SELECT `userid` FROM `sys_user` WHERE `client_id` = ' . $this->id); - $gdata = $app->db->queryOneRecord('SELECT `groupid` FROM `sys_group` WHERE `client_id` = ' . $this->id); + $udata = $app->db->queryOneRecord('SELECT `userid` FROM `sys_user` WHERE `client_id` = ?', $this->id); + $gdata = $app->db->queryOneRecord('SELECT `groupid` FROM `sys_group` WHERE `client_id` = ?', $this->id); $sys_groupid = $gdata['groupid']; $sys_userid = $udata['userid']; @@ -486,7 +473,7 @@ class page_action extends tform_actions { if(!isset($prev_active[$current])) $prev_active[$current] = array(); if(!isset($prev_sysuser[$current])) $prev_sysuser[$current] = array(); - $entries = $app->db->queryAllRecords('SELECT `' . $keycolumn . '` as `id`, `sys_userid`, `' . $active_col . '` FROM `' . $current . '` WHERE `sys_groupid` = ' . $sys_groupid); + $entries = $app->db->queryAllRecords('SELECT ?? as `id`, `sys_userid`, ?? FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $active_col, $current, $sys_groupid); foreach($entries as $item) { if($item[$active_col] != 'y' && $reverse == false) $prev_active[$current][$item['id']][$active_col] = 'n'; @@ -500,7 +487,7 @@ class page_action extends tform_actions { $tmp_data['prev_active'] = $prev_active; $tmp_data['prev_sys_userid'] = $prev_sysuser; - $app->db->query("UPDATE `client` SET `tmp_data` = '" . $app->db->quote(serialize($tmp_data)) . "' WHERE `client_id` = " . $this->id); + $app->db->query("UPDATE `client` SET `tmp_data` = ? WHERE `client_id` = ?", serialize($tmp_data), $this->id); unset($prev_active); unset($prev_sysuser); } elseif($this->dataRecord['locked'] == 'n') { @@ -515,7 +502,7 @@ class page_action extends tform_actions { $reverse = true; } - $entries = $app->db->queryAllRecords('SELECT `' . $keycolumn . '` as `id` FROM `' . $current . '` WHERE `sys_groupid` = ' . $sys_groupid); + $entries = $app->db->queryAllRecords('SELECT ?? as `id` FROM ?? WHERE `sys_groupid` = ?', $keycolumn, $current, $sys_groupid); foreach($entries as $item) { $set_active = ($reverse == true ? 'n' : 'y'); $set_inactive = ($reverse == true ? 'y' : 'n'); @@ -533,7 +520,7 @@ class page_action extends tform_actions { } } if(array_key_exists('prev_active', $tmp_data)) unset($tmp_data['prev_active']); - $app->db->query("UPDATE `client` SET `tmp_data` = '" . $app->db->quote(serialize($tmp_data)) . "' WHERE `client_id` = " . $this->id); + $app->db->query("UPDATE `client` SET `tmp_data` = ? WHERE `client_id` = ?", serialize($tmp_data), $this->id); } unset($tmp_data); unset($entries); @@ -543,43 +530,42 @@ class page_action extends tform_actions { if(!isset($this->dataRecord['canceled'])) $this->dataRecord['canceled'] = 'n'; if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["canceled"] != $this->oldDataRecord['canceled']) { if($this->dataRecord['canceled'] == 'y') { - $sql = "UPDATE sys_user SET active = '0' WHERE client_id = " . $this->id; - $app->db->query($sql); + $sql = "UPDATE sys_user SET active = '0' WHERE client_id = ?"; + $app->db->query($sql, $this->id); } elseif($this->dataRecord['canceled'] == 'n') { - $sql = "UPDATE sys_user SET active = '1' WHERE client_id = " . $this->id; - $app->db->query($sql); + $sql = "UPDATE sys_user SET active = '1' WHERE client_id = ?"; + $app->db->query($sql, $this->id); } } // language changed if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) { - $language = $app->db->quote($this->dataRecord["language"]); + $language = $this->dataRecord["language"]; $client_id = $this->id; - $sql = "UPDATE sys_user SET language = '$language' WHERE client_id = $client_id"; - $app->db->query($sql); + $sql = "UPDATE sys_user SET language = ? WHERE client_id = ?"; + $app->db->query($sql, $language, $client_id); } //* reseller status changed if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] != $this->oldDataRecord["limit_client"]) { $modules = $conf['interface_modules_enabled']; if($this->dataRecord["limit_client"] > 0) $modules .= ',client'; - $modules = $app->db->quote($modules); $client_id = $this->id; - $sql = "UPDATE sys_user SET modules = '$modules' WHERE client_id = $client_id"; - $app->db->query($sql); + $sql = "UPDATE sys_user SET modules = ? WHERE client_id = ?"; + $app->db->query($sql, $modules, $client_id); } //* Client has been moved to another reseller if($_SESSION['s']['user']['typ'] == 'admin' && isset($this->dataRecord['parent_client_id']) && $this->dataRecord['parent_client_id'] != $this->oldDataRecord['parent_client_id']) { //* Get groupid of the client - $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".intval($this->id)); + $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $this->id); $groupid = $tmp['groupid']; unset($tmp); //* Remove sys_user of old reseller from client group if($this->oldDataRecord['parent_client_id'] > 0) { //* get userid of the old reseller remove it from the group of the client - $tmp = $app->db->queryOneRecord("SELECT sys_user.userid FROM sys_user,sys_group WHERE sys_user.default_group = sys_group.groupid AND sys_group.client_id = ".$app->functions->intval($this->oldDataRecord['parent_client_id'])); + $tmp = $app->db->queryOneRecord("SELECT sys_user.userid FROM sys_user,sys_group WHERE sys_user.default_group = sys_group.groupid AND sys_group.client_id = ?", $this->oldDataRecord['parent_client_id']); $app->auth->remove_group_from_user($tmp['userid'], $groupid); unset($tmp); } @@ -587,13 +573,13 @@ class page_action extends tform_actions { //* Add sys_user of new reseller to client group if($this->dataRecord['parent_client_id'] > 0) { //* get userid of the reseller and add it to the group of the client - $tmp = $app->db->queryOneRecord("SELECT sys_user.userid, sys_user.default_group FROM sys_user,sys_group WHERE sys_user.default_group = sys_group.groupid AND sys_group.client_id = ".$app->functions->intval($this->dataRecord['parent_client_id'])); + $tmp = $app->db->queryOneRecord("SELECT sys_user.userid, sys_user.default_group FROM sys_user,sys_group WHERE sys_user.default_group = sys_group.groupid AND sys_group.client_id = ?", $this->dataRecord['parent_client_id']); $app->auth->add_group_to_user($tmp['userid'], $groupid); - $app->db->query("UPDATE client SET sys_userid = ".$app->functions->intval($tmp['userid']).", sys_groupid = ".$app->functions->intval($tmp['default_group']).", parent_client_id = ".$app->functions->intval($this->dataRecord['parent_client_id'])." WHERE client_id = ".$this->id); + $app->db->query("UPDATE client SET sys_userid = ?, sys_groupid = ?, parent_client_id = ? WHERE client_id = ?", $tmp['userid'], $tmp['default_group'], $this->dataRecord['parent_client_id'], $this->id); unset($tmp); } else { //* Client is not assigned to a reseller anymore, so we assign it to the admin - $app->db->query("UPDATE client SET sys_userid = 1, sys_groupid = 1, parent_client_id = 0 WHERE client_id = ".$this->id); + $app->db->query("UPDATE client SET sys_userid = 1, sys_groupid = 1, parent_client_id = 0 WHERE client_id = ?", $this->id); } } diff --git a/interface/web/client/client_message.php b/interface/web/client/client_message.php index 3d6e1de93..0e3bd2e9f 100644 --- a/interface/web/client/client_message.php +++ b/interface/web/client/client_message.php @@ -120,8 +120,8 @@ if(isset($_POST) && count($_POST) > 1) { if($_SESSION["s"]["user"]["typ"] != 'admin'){ $client_id = $app->functions->intval($_SESSION['s']['user']['client_id']); if($client_id > 0){ - $sql = "SELECT email FROM client WHERE client_id = ".$client_id; - $client = $app->db->queryOneRecord($sql); + $sql = "SELECT email FROM client WHERE client_id = ?"; + $client = $app->db->queryOneRecord($sql, $client_id); if($client['email'] != '') $app->tpl->setVar('sender', $client['email']); } } diff --git a/interface/web/client/reseller_edit.php b/interface/web/client/reseller_edit.php index 2c5fcbc28..686c99e5c 100644 --- a/interface/web/client/reseller_edit.php +++ b/interface/web/client/reseller_edit.php @@ -96,7 +96,7 @@ class page_action extends tform_actions { } if($this->id != 0) { - $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ' . $this->id); + $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ?', $this->id); if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) { // check previous type of storing templates $tpls = explode('/', $this->oldDataRecord['template_additional']); @@ -134,7 +134,7 @@ class page_action extends tform_actions { $app->tpl->setVar('tpl_add_select', $option); // check for new-style records - $result = $app->db->queryAllRecords('SELECT assigned_template_id, client_template_id FROM client_template_assigned WHERE client_id = ' . $this->id); + $result = $app->db->queryAllRecords('SELECT assigned_template_id, client_template_id FROM client_template_assigned WHERE client_id = ?', $this->id); if($result && count($result) > 0) { // new style $items = array(); @@ -160,8 +160,8 @@ class page_action extends tform_actions { unset($tmprec); } else { // old style - $sql = "SELECT template_additional FROM client WHERE client_id = " . $this->id; - $result = $app->db->queryOneRecord($sql); + $sql = "SELECT template_additional FROM client WHERE client_id = ?"; + $result = $app->db->queryOneRecord($sql, $this->id); $tplAdd = explode("/", $result['template_additional']); $text = ''; foreach($tplAdd as $item){ @@ -186,13 +186,6 @@ class page_action extends tform_actions { $customer_no = $app->functions->intval($system_config['misc']['customer_no_start']+$system_config['misc']['customer_no_counter']); $customer_no_string = str_replace('[CUSTOMER_NO]',$customer_no,$system_config['misc']['customer_no_template']); $app->tpl->setVar('customer_no',$customer_no_string); - - //* save new counter value - /* - $system_config['misc']['customer_no_counter']++; - $system_config_str = $app->ini_parser->get_ini_string($system_config); - $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($system_config_str)."'", 'sysini_id', 1); - */ } } @@ -210,14 +203,14 @@ class page_action extends tform_actions { $groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('".$app->db->quote($this->dataRecord["username"])."','',".$this->id.")", 'groupid'); $groups = $groupid; - $username = $app->db->quote($this->dataRecord["username"]); - $password = $app->db->quote($this->dataRecord["password"]); - $modules = $app->db->quote($conf['interface_modules_enabled'] . ',client'); + $username = $this->dataRecord["username"]; + $password = $this->dataRecord["password"]; + $modules = $conf['interface_modules_enabled'] . ',client'; $startmodule = (stristr($modules, 'dashboard'))?'dashboard':'client'; - $usertheme = $app->db->quote($this->dataRecord["usertheme"]); + $usertheme = $this->dataRecord["usertheme"]; $type = 'user'; $active = 1; - $language = $app->db->quote($this->dataRecord["language"]); + $language = $this->dataRecord["language"]; $salt="$1$"; $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; @@ -229,11 +222,11 @@ class page_action extends tform_actions { // Create the controlpaneluser for the reseller $sql = "INSERT INTO sys_user (username,passwort,modules,startmodule,app_theme,typ,active,language,groups,default_group,client_id) - VALUES ('$username','$password','$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,".$this->id.")"; - $app->db->query($sql); + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; + $app->db->query($sql, $username, $password, $modules, $startmodule, $usertheme, $type, $active, $language, $groups, $groupid, $this->id); //* set the number of clients to 1 - $app->db->query("UPDATE client SET limit_client = 1 WHERE client_id = ".$this->id); + $app->db->query("UPDATE client SET limit_client = 1 WHERE client_id = ?", $this->id); //* Set the default servers $tmp = $app->db->queryOneRecord('SELECT server_id FROM server WHERE mail_server = 1 LIMIT 0,1'); @@ -245,8 +238,8 @@ 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_slave_dnsserver = $default_dnsserver, default_dbserver = $default_dbserver WHERE client_id = ".$this->id; - $app->db->query($sql); + $sql = "UPDATE client SET default_mailserver = ?, default_webserver = ?, default_dnsserver = ?, default_slave_dnsserver = ?, default_dbserver = ? WHERE client_id = ?"; + $app->db->query($sql, $default_mailserver, $default_webserver, $default_dnsserver, $default_dnsserver, $default_dbserver, $this->id); if(isset($this->dataRecord['template_master'])) { $app->uses('client_templates'); @@ -262,15 +255,15 @@ class page_action extends tform_actions { //* save new counter value $system_config['misc']['customer_no_counter']++; $system_config_str = $app->ini_parser->get_ini_string($system_config); - $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($system_config_str)."'", 'sysini_id', 1); + $app->db->datalogUpdate('sys_ini', array("config" => $system_config_str), 'sysini_id', 1); } } //* Send welcome email $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $sql = "SELECT * FROM client_message_template WHERE template_type = 'welcome' AND sys_groupid = ".$client_group_id; - $email_template = $app->db->queryOneRecord($sql); + $sql = "SELECT * FROM client_message_template WHERE template_type = 'welcome' AND sys_groupid = ?"; + $email_template = $app->db->queryOneRecord($sql, $client_group_id); $client = $app->tform->getDataRecord($this->id); if(is_array($email_template) && $client['email'] != '') { @@ -300,7 +293,7 @@ class page_action extends tform_actions { $from = $system_config['admin_mail']; } else { $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $reseller = $app->db->queryOneRecord("SELECT client.email FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ".$client_group_id); + $reseller = $app->db->queryOneRecord("SELECT client.email FROM sys_group,client WHERE client.client_id = sys_group.client_id and sys_group.groupid = ?", $client_group_id); $from = $reseller["email"]; } @@ -321,19 +314,19 @@ class page_action extends tform_actions { // username changed if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) { - $username = $app->db->quote($this->dataRecord["username"]); + $username = $this->dataRecord["username"]; $client_id = $this->id; - $sql = "UPDATE sys_user SET username = '$username' WHERE client_id = $client_id"; - $app->db->query($sql); + $sql = "UPDATE sys_user SET username = ? WHERE client_id = ?"; + $app->db->query($sql, $username, $client_id); - $tmp = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = $client_id"); - $app->db->datalogUpdate("sys_group", "name = '$username'", 'groupid', $tmp['groupid']); + $tmp = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = ?", $client_id); + $app->db->datalogUpdate("sys_group", array("name" => $username), 'groupid', $tmp['groupid']); unset($tmp); } // password changed if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') { - $password = $app->db->quote($this->dataRecord["password"]); + $password = $this->dataRecord["password"]; $client_id = $this->id; $salt="$1$"; $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; @@ -342,32 +335,32 @@ class page_action extends tform_actions { } $salt.="$"; $password = crypt(stripslashes($password), $salt); - $sql = "UPDATE sys_user SET passwort = '$password' WHERE client_id = $client_id"; - $app->db->query($sql); + $sql = "UPDATE sys_user SET passwort = ? WHERE client_id = ?"; + $app->db->query($sql, $password, $client_id); } // language changed if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) { - $language = $app->db->quote($this->dataRecord["language"]); + $language = $this->dataRecord["language"]; $client_id = $this->id; - $sql = "UPDATE sys_user SET language = '$language' WHERE client_id = $client_id"; - $app->db->query($sql); + $sql = "UPDATE sys_user SET language = ? WHERE client_id = ?"; + $app->db->query($sql, $language, $client_id); } // ensure that a reseller is not converted to a client in demo mode when client_id <= 2 if(isset($conf['demo_mode']) && $conf['demo_mode'] == true && $this->id <= 2) { if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] != -1) { - $app->db->query('UPDATE client set limit_client = -1 WHERE client_id = '.$this->id); + $app->db->query('UPDATE client set limit_client = -1 WHERE client_id = ?', $this->id); } } // reseller status changed if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] != $this->oldDataRecord["limit_client"]) { - $modules = $app->db->quote($conf['interface_modules_enabled'] . ',client'); - $modules = $app->db->quote($modules); + $modules = $conf['interface_modules_enabled'] . ',client'; + $modules = $modules; $client_id = $this->id; - $sql = "UPDATE sys_user SET modules = '$modules' WHERE client_id = $client_id"; - $app->db->query($sql); + $sql = "UPDATE sys_user SET modules = ? WHERE client_id = ?"; + $app->db->query($sql, $modules, $client_id); } if(isset($this->dataRecord['template_master'])) { diff --git a/interface/web/dashboard/ajax_get_json.php b/interface/web/dashboard/ajax_get_json.php index c5384ca3d..383cc090d 100644 --- a/interface/web/dashboard/ajax_get_json.php +++ b/interface/web/dashboard/ajax_get_json.php @@ -76,28 +76,6 @@ if($type == 'globalsearch'){ $result[] = _search('sites', 'shell_user'); // databases - /* - $result_databases = array('cheader' => array(), 'cdata' => array()); - if(in_array('sites', $modules)){ - $sql = "SELECT * FROM web_database WHERE database_name LIKE '%".$q."%' OR database_user LIKE '%".$q."%' OR remote_ips LIKE '%".$q."%'".$authsql." ORDER BY database_name"; - $results = $app->db->queryAllRecords($sql); - - if(is_array($results) && !empty($results)){ - $result_databases['cheader'] = array('title' => 'Databases', - 'total' => count($results), - 'limit' => count($results) - ); - foreach($results as $result){ - $description = 'Database User: '.$result['database_user'].' - Remote IPs: '.$result['remote_ips']; - $result_databases['cdata'][] = array('title' => $result['database_name'], - 'description' => $description, - 'onclick' => 'ISPConfig.capp(\'sites\',\'sites/database_edit.php?id='.$result['database_id'].'\');', - 'fill_text' => strtolower($result['database_name']) - ); - } - } - } - */ $result[] = _search('sites', 'database'); // database users @@ -205,8 +183,8 @@ function _search($module, $section, $additional_sql = ''){ $order_clause = ''; if($order_by != '') $order_clause = ' ORDER BY '.$order_by; - $sql = "SELECT * FROM ".$db_table." WHERE ".$where_clause.$authsql.$order_clause." LIMIT 0,10"; - $results = $app->db->queryAllRecords($sql); + $sql = "SELECT * FROM ?? WHERE ".$where_clause.$authsql.$order_clause." LIMIT 0,10"; + $results = $app->db->queryAllRecords($sql, $db_table); if(is_array($results) && !empty($results)){ $lng_file = '../'.$module.'/lib/lang/'.$_SESSION['s']['language'].'_'.$section.'.lng'; diff --git a/interface/web/login/index.php b/interface/web/login/index.php index 1c4f20d4d..87b899607 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -73,9 +73,9 @@ class login_index { if(!preg_match("/^.{1,64}$/i", $_POST['passwort'])) $error = $app->lng('pw_error_length'); //** iporting variables - $ip = $app->db->quote(ip2long($_SERVER['REMOTE_ADDR'])); - $username = $app->db->quote($_POST['username']); - $passwort = $app->db->quote($_POST['passwort']); + $ip = ip2long($_SERVER['REMOTE_ADDR']); + $username = $_POST['username']; + $passwort = $_POST['passwort']; $loginAs = false; $time = time(); diff --git a/interface/web/login/password_reset.php b/interface/web/login/password_reset.php index a83e6854b..96259349d 100644 --- a/interface/web/login/password_reset.php +++ b/interface/web/login/password_reset.php @@ -51,8 +51,8 @@ if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != ' if(!preg_match("/^[\w\.\-\_]{1,64}$/", $_POST['username'])) die($app->lng('user_regex_error')); if(!preg_match("/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z]{2,10}$/i", $_POST['email'])) die($app->lng('email_error')); - $username = $app->db->quote($_POST['username']); - $email = $app->db->quote($_POST['email']); + $username = $_POST['username']; + $email = $_POST['email']; $client = $app->db->queryOneRecord("SELECT client.*, sys_user.lost_password_function FROM client,sys_user WHERE client.username = ? AND client.email = ? AND client.client_id = sys_user.client_id", $username, $email); @@ -62,9 +62,8 @@ if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != ' if($client['client_id'] > 0) { $new_password = $app->auth->get_random_password(); $new_password_encrypted = $app->auth->crypt_password($new_password); - $new_password_encrypted = $app->db->quote($new_password_encrypted); - $username = $app->db->quote($client['username']); + $username = $client['username']; $app->db->query("UPDATE sys_user SET passwort = ? WHERE username = ?", $new_password_encrypted, $username); $app->db->query("UPDATE client SET password = ? WHERE username = ?", $new_password_encrypted, $username); $app->tpl->setVar("message", $wb['pw_reset']); diff --git a/interface/web/mail/mail_alias_edit.php b/interface/web/mail/mail_alias_edit.php index 4e1b358c3..98e6bac60 100644 --- a/interface/web/mail/mail_alias_edit.php +++ b/interface/web/mail/mail_alias_edit.php @@ -95,12 +95,12 @@ class page_action extends tform_actions { global $app, $conf; // Check if Domain belongs to user - $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["email_domain"]))."' AND ".$app->tform->getAuthSQL('r')); + $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"])); if($domain["domain"] != $app->functions->idn_encode($_POST["email_domain"])) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; //* Check if destination email belongs to user if(isset($_POST["destination"])) { - $email = $app->db->queryOneRecord("SELECT email FROM mail_user WHERE email = '".$app->db->quote($app->functions->idn_encode($_POST["destination"]))."' AND ".$app->tform->getAuthSQL('r')); + $email = $app->db->queryOneRecord("SELECT email FROM mail_user WHERE email = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["destination"])); if($email["email"] != $app->functions->idn_encode($_POST["destination"])) $app->tform->errorMessage .= $app->tform->lng("no_destination_perm"); } @@ -112,7 +112,7 @@ class page_action extends tform_actions { // Check if the user may add another mailbox. if($this->id == 0 && $client["limit_mailalias"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = $client_group_id AND type = 'alias'"); + $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = ? AND type = 'alias'", $client_group_id); if($tmp["number"] >= $client["limit_mailalias"]) { $app->tform->errorMessage .= $app->tform->wordbook["limit_mailalias_txt"]."
"; } @@ -130,15 +130,15 @@ class page_action extends tform_actions { unset($this->dataRecord["email_domain"]); //* Check if there is no active mailbox with this address - $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE postfix = 'y' AND email = '".$app->db->quote($this->dataRecord["source"])."'"); + $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE postfix = 'y' AND email = ?", $this->dataRecord["source"]); if($tmp['number'] > 0) $app->tform->errorMessage .= $app->tform->lng("duplicate_mailbox_txt")."
"; unset($tmp); //* Check if email alias exists if($this->id > 0) { - $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE source = '".$app->db->quote($this->dataRecord["source"])."' AND destination = '".$app->db->quote($this->dataRecord["destination"])."' AND forwarding_id != ".$this->id); + $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE source = ? AND destination = ? AND forwarding_id != ?", $this->dataRecord["source"], $this->dataRecord["destination"], $this->id); } else { - $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE source = '".$app->db->quote($this->dataRecord["source"])."' AND destination = '".$app->db->quote($this->dataRecord["destination"])."'"); + $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE source = ? AND destination = ?", $this->dataRecord["source"], $this->dataRecord["destination"]); } if($tmp['number'] > 0) $app->tform->errorMessage .= $app->tform->lng("duplicate_email_alias_txt")."
"; unset($tmp); @@ -149,8 +149,8 @@ class page_action extends tform_actions { function onAfterInsert() { global $app; - $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["email_domain"]))."' AND ".$app->tform->getAuthSQL('r')); - $app->db->query("update mail_forwarding SET sys_groupid = ".$app->functions->intval($domain['sys_groupid'])." WHERE forwarding_id = ".$this->id); + $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"]))); + $app->db->query("update mail_forwarding SET sys_groupid = ? WHERE forwarding_id = ?", $domain['sys_groupid'], $this->id); } diff --git a/interface/web/mail/mail_aliasdomain_edit.php b/interface/web/mail/mail_aliasdomain_edit.php index 25e048428..7e76ff04c 100644 --- a/interface/web/mail/mail_aliasdomain_edit.php +++ b/interface/web/mail/mail_aliasdomain_edit.php @@ -97,11 +97,11 @@ class page_action extends tform_actions { global $app, $conf; // Check if source Domain belongs to user - $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["source"]))."' AND ".$app->tform->getAuthSQL('r')); + $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["source"])); if($domain["domain"] != $app->functions->idn_encode($_POST["source"])) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; // Check if the destination domain belongs to the user - $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["destination"]))."' AND ".$app->tform->getAuthSQL('r')); + $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["destination"])); if($domain["domain"] != $app->functions->idn_encode($_POST["destination"])) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; // Check the client limits, if user is not the admin @@ -115,7 +115,8 @@ class page_action extends tform_actions { } // end if user is not admin if($this->dataRecord["source"] == $this->dataRecord["destination"]) $app->tform->errorMessage .= $app->tform->wordbook["source_destination_identical_txt"]; - + + /* TODO: check if this quoting is correkt! */ // compose the source and destination field $this->dataRecord["source"] = "@".$app->db->quote($this->dataRecord["source"]); $this->dataRecord["destination"] = "@".$app->db->quote($this->dataRecord["destination"]); @@ -128,8 +129,8 @@ class page_action extends tform_actions { function onAfterInsert() { global $app; - $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["destination"]))."' AND ".$app->tform->getAuthSQL('r')); - $app->db->query("update mail_forwarding SET sys_groupid = ".$app->functions->intval($domain['sys_groupid'])." WHERE forwarding_id = ".$this->id); + $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["destination"])); + $app->db->query("update mail_forwarding SET sys_groupid = ? WHERE forwarding_id = ?", $domain['sys_groupid'], $this->id); } diff --git a/interface/web/mail/mail_content_filter_edit.php b/interface/web/mail/mail_content_filter_edit.php index 5672135ca..dce1f0565 100644 --- a/interface/web/mail/mail_content_filter_edit.php +++ b/interface/web/mail/mail_content_filter_edit.php @@ -58,7 +58,7 @@ class page_action extends tform_actions { //* Check if the server has been changed // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { - $rec = $app->db->queryOneRecord("SELECT server_id from mail_content_filter WHERE content_filter_id = ".$this->id); + $rec = $app->db->queryOneRecord("SELECT server_id from mail_content_filter WHERE content_filter_id = ?", $this->id); if($rec['server_id'] != $this->dataRecord["server_id"]) { //* Add a error message and switch back to old server $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); diff --git a/interface/web/mail/mail_domain_catchall_edit.php b/interface/web/mail/mail_domain_catchall_edit.php index e6844c2fc..8dd2829ac 100644 --- a/interface/web/mail/mail_domain_catchall_edit.php +++ b/interface/web/mail/mail_domain_catchall_edit.php @@ -94,7 +94,7 @@ class page_action extends tform_actions { global $app, $conf; // Check if Domain belongs to user - $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["email_domain"]))."' AND ".$app->tform->getAuthSQL('r')); + $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"])); if($domain["domain"] != $app->functions->idn_encode($_POST["email_domain"])) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; // Check the client limits, if user is not the admin @@ -105,7 +105,7 @@ class page_action extends tform_actions { // Check if the user may add another catchall if($this->id == 0 && $client["limit_mailcatchall"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = $client_group_id AND type = 'catchall'"); + $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = ? AND type = 'catchall'", $client_group_id); if($tmp["number"] >= $client["limit_mailcatchall"]) { $app->tform->errorMessage .= $app->tform->wordbook["limit_mailcatchall_txt"]."
"; } @@ -127,8 +127,8 @@ class page_action extends tform_actions { function onAfterInsert() { global $app; - $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["email_domain"]))."' AND ".$app->tform->getAuthSQL('r')); - $app->db->query("update mail_forwarding SET sys_groupid = ".$app->functions->intval($domain['sys_groupid'])." WHERE forwarding_id = ".$this->id); + $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"]))); + $app->db->query("update mail_forwarding SET sys_groupid = ? WHERE forwarding_id = ?", $domain['sys_groupid'], $this->id); } diff --git a/interface/web/mail/mail_domain_del.php b/interface/web/mail/mail_domain_del.php index ba715a6df..6941cd608 100644 --- a/interface/web/mail/mail_domain_del.php +++ b/interface/web/mail/mail_domain_del.php @@ -60,31 +60,31 @@ class page_action extends tform_actions { // we will delete all depending records. // Delete all forwardings where the source or destination belongs to this domain - $records = $app->db->queryAllRecords("SELECT forwarding_id as id FROM mail_forwarding WHERE source like '%@".$app->db->quote($domain)."' OR (destination like '%@".$app->db->quote($domain)."' AND type != 'forward')"); + $records = $app->db->queryAllRecords("SELECT forwarding_id as id FROM mail_forwarding WHERE source like ? OR (destination like ? AND type != 'forward')", '%@' . $domain, '%@' . $domain); foreach($records as $rec) { $app->db->datalogDelete('mail_forwarding', 'forwarding_id', $rec['id']); } // Delete all fetchmail accounts where destination belongs to this domain - $records = $app->db->queryAllRecords("SELECT mailget_id as id FROM mail_get WHERE destination like '%@".$app->db->quote($domain)."'"); + $records = $app->db->queryAllRecords("SELECT mailget_id as id FROM mail_get WHERE destination like ?", '%@' . $domain); foreach($records as $rec) { $app->db->datalogDelete('mail_get', 'mailget_id', $rec['id']); } // Delete all mailboxes where destination belongs to this domain - $records = $app->db->queryAllRecords("SELECT mailuser_id as id FROM mail_user WHERE email like '%@".$app->db->quote($domain)."'"); + $records = $app->db->queryAllRecords("SELECT mailuser_id as id FROM mail_user WHERE email like ?", '%@' . $domain); foreach($records as $rec) { $app->db->datalogDelete('mail_user', 'mailuser_id', $rec['id']); } // Delete all spamfilters that belong to this domain - $records = $app->db->queryAllRecords("SELECT id FROM spamfilter_users WHERE email = '%@".$app->db->quote($domain)."'"); + $records = $app->db->queryAllRecords("SELECT id FROM spamfilter_users WHERE email = ?", '%@' . $domain); foreach($records as $rec) { $app->db->datalogDelete('spamfilter_users', 'id', $rec['id']); } // Delete all mailinglists that belong to this domain - $records = $app->db->queryAllRecords("SELECT mailinglist_id FROM mail_mailinglist WHERE domain = '".$app->db->quote($domain)."'"); + $records = $app->db->queryAllRecords("SELECT mailinglist_id FROM mail_mailinglist WHERE domain = ?", $domain); foreach($records as $rec) { $app->db->datalogDelete('mail_mailinglist', 'mailinglist_id', $rec['id']); } diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index 5e037b766..b09722fdd 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -95,18 +95,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(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"); + $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 = ? order by client.contact_name", $client_group_id); // 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]"); + $tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $client['default_mailserver']); $app->tpl->setVar("server_id", ""); unset($tmp); if ($settings['use_domain_module'] != 'y') { // Fill the client select field - $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 = ".$app->functions->intval($client['client_id'])." ORDER BY client.company_name, client.contact_name, sys_group.name"; - $clients = $app->db->queryAllRecords($sql); - $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id'])); + $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 = ? ORDER BY client.company_name, client.contact_name, sys_group.name"; + $clients = $app->db->queryAllRecords($sql, $client['client_id']); + $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client['client_id']); $client_select = ''; //$tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { @@ -133,8 +133,8 @@ class page_action extends tform_actions { $app->tpl->setVar('server_id_value', $client_mail['mail_servers_ids'][0]); } - $sql = "SELECT server_id, server_name FROM server WHERE server_id IN (" . $client_mail['mail_servers'] . ");"; - $mail_servers = $app->db->queryAllRecords($sql); + $sql = "SELECT server_id, server_name FROM server WHERE server_id IN ?"; + $mail_servers = $app->db->queryAllRecords($sql, $client_mail['mail_servers_ids']); $options_mail_servers = ""; @@ -183,7 +183,7 @@ class page_action extends tform_actions { // Get the spamfilter policys for the user - $tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = '@".$app->db->quote($this->dataRecord["domain"])."'"); + $tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = ?", '@' . $this->dataRecord["domain"]); $sql = "SELECT id, policy_name FROM spamfilter_policy WHERE ".$app->tform->getAuthSQL('r')." ORDER BY policy_name"; $policys = $app->db->queryAllRecords($sql); $policy_select = ""; @@ -245,7 +245,7 @@ class page_action extends tform_actions { // When the record is updated if($this->id > 0) { // restore the server ID if the user is not admin and record is edited - $tmp = $app->db->queryOneRecord("SELECT server_id FROM mail_domain WHERE domain_id = ".$app->functions->intval($this->id)); + $tmp = $app->db->queryOneRecord("SELECT server_id FROM mail_domain WHERE domain_id = ?", $this->id); $this->dataRecord["server_id"] = $tmp["server_id"]; unset($tmp); // When the record is inserted @@ -282,12 +282,12 @@ class page_action extends tform_actions { // Spamfilter policy $policy_id = $app->functions->intval($this->dataRecord["policy"]); if($policy_id > 0) { - $tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = '@".$app->db->quote($this->dataRecord["domain"])."'"); + $tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $this->dataRecord["domain"]); if($tmp_user["id"] > 0) { // There is already a record that we will update $app->db->datalogUpdate('spamfilter_users', "policy_id = $policy_id", 'id', $tmp_user["id"]); } else { - $tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ".$this->id); + $tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id); // We create a new record $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`) VALUES (".$_SESSION["s"]["user"]["userid"].", ".$app->functions->intval($tmp_domain["sys_groupid"]).", 'riud', 'riud', '', ".$app->functions->intval($this->dataRecord["server_id"]).", 5, ".$app->functions->intval($policy_id).", '@".$app->db->quote($this->dataRecord["domain"])."', '@".$app->db->quote($this->dataRecord["domain"])."', 'Y')"; @@ -310,7 +310,7 @@ class page_action extends tform_actions { //* Check if the server has been changed // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { - $rec = $app->db->queryOneRecord("SELECT server_id, domain from mail_domain WHERE domain_id = ".$this->id); + $rec = $app->db->queryOneRecord("SELECT server_id, domain from mail_domain WHERE domain_id = ?", $this->id); if($rec['server_id'] != $this->dataRecord["server_id"]) { //* Add a error message and switch back to old server $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); @@ -320,7 +320,7 @@ class page_action extends tform_actions { //* If the user is neither admin nor reseller } else { //* We do not allow users to change a domain which has been created by the admin - $rec = $app->db->queryOneRecord("SELECT domain from mail_domain WHERE domain_id = ".$this->id); + $rec = $app->db->queryOneRecord("SELECT domain from mail_domain WHERE domain_id = ?", $this->id); if($rec['domain'] != $this->dataRecord["domain"] && $app->tform->checkPerm($this->id, 'u')) { //* Add a error message and switch back to old server $app->tform->errorMessage .= $app->lng('The Domain can not be changed. Please ask your Administrator if you want to change the domain name.'); @@ -336,13 +336,13 @@ class page_action extends tform_actions { // Spamfilter policy $policy_id = $app->functions->intval($this->dataRecord["policy"]); - $tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = '@".$app->db->quote($this->dataRecord["domain"])."'"); + $tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $this->dataRecord["domain"]); if($policy_id > 0) { if($tmp_user["id"] > 0) { // There is already a record that we will update $app->db->datalogUpdate('spamfilter_users', "policy_id = $policy_id", 'id', $tmp_user["id"]); } else { - $tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ".$this->id); + $tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id); // We create a new record $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`) VALUES (".$_SESSION["s"]["user"]["userid"].", ".$app->functions->intval($tmp_domain["sys_groupid"]).", 'riud', 'riud', '', ".$app->functions->intval($this->dataRecord["server_id"]).", 5, ".$app->functions->intval($policy_id).", '@".$app->db->quote($this->dataRecord["domain"])."', '@".$app->db->quote($this->dataRecord["domain"])."', 'Y')"; @@ -361,9 +361,9 @@ class page_action extends tform_actions { $mail_config = $app->getconf->get_server_config($this->dataRecord["server_id"], 'mail'); //* Update the mailboxes - $mailusers = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE email like '%@".$app->db->quote($this->oldDataRecord['domain'])."'"); + $mailusers = $app->db->queryAllRecords("SELECT * FROM mail_user WHERE email like ?", '%@' . $this->oldDataRecord['domain']); $sys_groupid = $app->functions->intval((isset($this->dataRecord['client_group_id']))?$this->dataRecord['client_group_id']:$this->oldDataRecord['sys_groupid']); - $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = $client_group_id"); + $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $client_group_id); $client_user_id = $app->functions->intval(($tmp['userid'] > 0)?$tmp['userid']:1); if(is_array($mailusers)) { foreach($mailusers as $rec) { @@ -378,7 +378,7 @@ class page_action extends tform_actions { } //* Update the aliases - $forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source like '%@".$app->db->quote($this->oldDataRecord['domain'])."' OR destination like '%@".$app->db->quote($this->oldDataRecord['domain'])."'"); + $forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source like ? OR destination like ?", '%@' . $this->oldDataRecord['domain'], '%@' . $this->oldDataRecord['domain']); if(is_array($forwardings)) { foreach($forwardings as $rec) { $destination = $app->db->quote(str_replace($this->oldDataRecord['domain'], $this->dataRecord['domain'], $rec['destination'])); @@ -388,10 +388,10 @@ class page_action extends tform_actions { } //* Update the mailinglist - $app->db->query("UPDATE mail_mailinglist SET sys_userid = $client_user_id, sys_groupid = $sys_groupid WHERE domain = '".$app->db->quote($this->oldDataRecord['domain'])."'"); + $app->db->query("UPDATE mail_mailinglist SET sys_userid = ?, sys_groupid = ? WHERE domain = ?", $client_user_id, $sys_groupid, $this->oldDataRecord['domain']); //* Update fetchmail accounts - $fetchmail = $app->db->queryAllRecords("SELECT * FROM mail_get WHERE destination like '%@".$app->db->quote($this->oldDataRecord['domain'])."'"); + $fetchmail = $app->db->queryAllRecords("SELECT * FROM mail_get WHERE destination like ?", '%@' . $this->oldDataRecord['domain']); if(is_array($fetchmail)) { foreach($fetchmail as $rec) { $destination = $app->db->quote(str_replace($this->oldDataRecord['domain'], $this->dataRecord['domain'], $rec['destination'])); @@ -400,7 +400,7 @@ class page_action extends tform_actions { } //* Delete the old spamfilter record - $tmp = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = '@".$app->db->quote($this->oldDataRecord["domain"])."'"); + $tmp = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $this->oldDataRecord["domain"]); $app->db->datalogDelete('spamfilter_users', 'id', $tmp["id"]); unset($tmp); @@ -422,8 +422,8 @@ class page_action extends tform_actions { } if (! $dkim_active) { // updated existing dmarc-record to policy 'none' - $sql = "SELECT * from dns_rr WHERE name = ? AND data LIKE 'v=DMARC1%' AND ?"; - $rec = $app->db->queryOneRecord($sql, '_dmarc.'.$this->dataRecord['domain'].'.', $app->tform->getAuthSQL('r')); + $sql = "SELECT * from dns_rr WHERE name = ? AND data LIKE 'v=DMARC1%' AND " . $app->tform->getAuthSQL('r'); + $rec = $app->db->queryOneRecord($sql, '_dmarc.'.$this->dataRecord['domain'].'.'); if (is_array($rec)) if (strpos($rec['data'], 'p=none=') === false) { $rec['data'] = str_replace(array('quarantine', 'reject'), 'none', $rec['data']); @@ -441,15 +441,15 @@ class page_action extends tform_actions { global $app, $conf; // purge old rr-record(s) - $sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND data LIKE 'v=DKIM1%' AND ? ORDER BY serial DESC"; - $rec = $app->db->queryAllRecords($sql, '%._domainkey.'.$dataRecord['domain'].'.', $app->tform->getAuthSQL('r')); + $sql = "SELECT * FROM dns_rr WHERE name LIKE ? AND data LIKE 'v=DKIM1%' AND " . $app->tform->getAuthSQL('r') . " ORDER BY serial DESC"; + $rec = $app->db->queryAllRecords($sql, '%._domainkey.'.$dataRecord['domain'].'.'); if (is_array($rec[1])) { for ($i=1; $i < count($rec); ++$i) $app->db->datalogDelete('dns_rr', 'id', $rec[$i]['id']); } // also delete a dsn-records with same selector - $sql = "SELECT * from dns_rr WHERE name ? AND data LIKE 'v=DKIM1%' AND ?"; - $rec = $app->db->queryAllRecords($sql, '.._domainkey.'.$dataRecord['dkim_selector'].'.', $dataRecord['domain'], $app->tform->getAuthSQL('r')); + $sql = "SELECT * from dns_rr WHERE name ? AND data LIKE 'v=DKIM1%' AND " . $app->tform->getAuthSQL('r'); + $rec = $app->db->queryAllRecords($sql, '._domainkey.'.$dataRecord['dkim_selector'].'.', $dataRecord['domain']); if (is_array($rec)) foreach ($rec as $del) $app->db->datalogDelete('dns_rr', 'id', $del['id']); diff --git a/interface/web/mail/mail_forward_edit.php b/interface/web/mail/mail_forward_edit.php index 76e4a5e6f..e226cf501 100644 --- a/interface/web/mail/mail_forward_edit.php +++ b/interface/web/mail/mail_forward_edit.php @@ -93,7 +93,7 @@ class page_action extends tform_actions { global $app, $conf; // Check if Domain belongs to user - $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["email_domain"]))."' AND ".$app->tform->getAuthSQL('r')); + $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"])); if($domain["domain"] != $app->functions->idn_encode($_POST["email_domain"])) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; // Check the client limits, if user is not the admin @@ -104,7 +104,7 @@ class page_action extends tform_actions { // Check if the user may add another mailbox. if($this->id == 0 && $client["limit_mailforward"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = $client_group_id AND type = 'forward'"); + $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = ? AND type = 'forward'", $client_group_id); if($tmp["number"] >= $client["limit_mailforward"]) { $app->tform->errorMessage .= $app->tform->wordbook["limit_mailforward_txt"]."
"; } @@ -121,7 +121,7 @@ class page_action extends tform_actions { unset($this->dataRecord["email_domain"]); //* Check if there is no active mailbox with this address - $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE postfix = 'y' AND email = '".$app->db->quote($this->dataRecord["source"])."'"); + $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE postfix = 'y' AND email = ?", $this->dataRecord["source"]); if($tmp['number'] > 0) $app->tform->errorMessage .= $app->tform->lng("duplicate_mailbox_txt")."
"; unset($tmp); @@ -131,8 +131,8 @@ class page_action extends tform_actions { function onAfterInsert() { global $app; - $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["email_domain"]))."' AND ".$app->tform->getAuthSQL('r')); - $app->db->query("update mail_forwarding SET sys_groupid = ".$app->functions->intval($domain['sys_groupid'])." WHERE forwarding_id = ".$this->id); + $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"]))); + $app->db->query("update mail_forwarding SET sys_groupid = ? WHERE forwarding_id = ?", $domain['sys_groupid'], $this->id); } diff --git a/interface/web/mail/mail_mailinglist_edit.php b/interface/web/mail/mail_mailinglist_edit.php index 124b8d8fa..551567073 100644 --- a/interface/web/mail/mail_mailinglist_edit.php +++ b/interface/web/mail/mail_mailinglist_edit.php @@ -89,12 +89,12 @@ 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(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"); + $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 = ? order by contact_name", $client_group_id); // Fill the client select field - $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 = ".intval($client['client_id'])." ORDER BY client.company_name, client.contact_name, sys_group.name"; - $clients = $app->db->queryAllRecords($sql); - $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".intval($client['client_id'])); + $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 = ? ORDER BY client.company_name, client.contact_name, sys_group.name"; + $clients = $app->db->queryAllRecords($sql, $client['client_id']); + $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client['client_id']); $client_select = ''; $tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { @@ -142,24 +142,24 @@ class page_action extends tform_actions { //* Check if Domain belongs to user if(isset($_POST["domain"])) { - $domain = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = '".$app->db->quote($this->dataRecord["domain"])."' AND ".$app->tform->getAuthSQL('r')); + $domain = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $this->dataRecord["domain"]); if($domain["domain"] != $this->dataRecord["domain"]) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm"); } // When the record is updated if($this->id == 0) { //Check if email is in use - $check = $app->db->queryOneRecord("SELECT count(source) as number FROM mail_forwarding WHERE source = '".$app->db->quote($this->dataRecord["listname"])."@".$app->db->quote($this->dataRecord["domain"])."'"); + $check = $app->db->queryOneRecord("SELECT count(source) as number FROM mail_forwarding WHERE source = ?", $this->dataRecord["listname"]."@".$this->dataRecord["domain"]); if($check['number'] != 0) { $app->error($app->tform->wordbook["email_in_use_txt"]); } - $check = $app->db->queryOneRecord("SELECT count(email) as number FROM mail_user WHERE email = '".$app->db->quote($this->dataRecord["listname"])."@".$app->db->quote($this->dataRecord["domain"])."'"); + $check = $app->db->queryOneRecord("SELECT count(email) as number FROM mail_user WHERE email = ?", $this->dataRecord["listname"]."@".$this->dataRecord["domain"]); if($check['number'] != 0) { $app->error($app->tform->wordbook["email_in_use_txt"]); } - $check = $app->db->queryOneRecord("SELECT count(mailinglist_id) as number FROM mail_mailinglist WHERE listname = '".$app->db->quote($this->dataRecord["listname"])."' AND domain = '".$app->db->quote($this->dataRecord["domain"])."'"); + $check = $app->db->queryOneRecord("SELECT count(mailinglist_id) as number FROM mail_mailinglist WHERE listname = ? AND domain = ?", $this->dataRecord["listname"], $this->dataRecord["domain"]); if($check['number'] != 0) { $app->error($app->tform->wordbook["email_in_use_txt"]); } @@ -187,7 +187,7 @@ class page_action extends tform_actions { global $app, $conf; // Set the server id of the mailinglist = server ID of mail domain. - $domain = $app->db->queryOneRecord("SELECT server_id FROM mail_domain WHERE domain = '".$app->db->quote($this->dataRecord["domain"])."'"); + $domain = $app->db->queryOneRecord("SELECT server_id FROM mail_domain WHERE domain = ?", $this->dataRecord["domain"]); $this->dataRecord["server_id"] = $domain['server_id']; } @@ -198,11 +198,11 @@ class page_action extends tform_actions { // also make sure that the user can not delete domain created by a admin if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) { $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); - $app->db->query("UPDATE mail_mailinglist SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE mailinglist_id = ".$this->id); + $app->db->query("UPDATE mail_mailinglist SET sys_groupid = ?, sys_perm_group = 'ru' WHERE mailinglist_id = ?", $client_group_id, $this->id); } if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($this->dataRecord["client_group_id"])) { $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); - $app->db->query("UPDATE mail_mailinglist SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE mailinglist_id = ".$this->id); + $app->db->query("UPDATE mail_mailinglist SET sys_groupid = ?, sys_perm_group = 'riud' WHERE mailinglist_id = ?", $client_group_id, $this->id); } } @@ -212,13 +212,13 @@ class page_action extends tform_actions { //* Check if the server has been changed // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { - $rec = $app->db->queryOneRecord("SELECT server_id, domain from mail_mailinglist WHERE mailinglist_id = ".$this->id); + $rec = $app->db->queryOneRecord("SELECT server_id, domain from mail_mailinglist WHERE mailinglist_id = ?", $this->id); $this->dataRecord["server_id"] = $rec['server_id']; unset($rec); //* If the user is neither admin nor reseller } else { //* We do not allow users to change a domain which has been created by the admin - $rec = $app->db->queryOneRecord("SELECT domain from mail_mailinglist WHERE mailinglist_id = ".$this->id); + $rec = $app->db->queryOneRecord("SELECT domain from mail_mailinglist WHERE mailinglist_id = ?", $this->id); if($rec['domain'] != $this->dataRecord["domain"] && $app->tform->checkPerm($this->id, 'u')) { //* Add a error message and switch back to old server $app->tform->errorMessage .= $app->lng('The Domain can not be changed. Please ask your Administrator if you want to change the domain name.'); @@ -235,11 +235,11 @@ class page_action extends tform_actions { // also make sure that the user can not delete domain created by a admin if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) { $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); - $app->db->query("UPDATE mail_mailinglist SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE mailinglist_id = ".$this->id); + $app->db->query("UPDATE mail_mailinglist SET sys_groupid = ?, sys_perm_group = 'ru' WHERE mailinglist_id = ?", $client_group_id, $this->id); } if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($this->dataRecord["client_group_id"])) { $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); - $app->db->query("UPDATE mail_mailinglist SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE mailinglist_id = ".$this->id); + $app->db->query("UPDATE mail_mailinglist SET sys_groupid = ?, sys_perm_group = 'riud' WHERE mailinglist_id = ?", $client_group_id, $this->id); } } diff --git a/interface/web/mail/mail_spamfilter_edit.php b/interface/web/mail/mail_spamfilter_edit.php index 1219f9fd8..81a4fded3 100644 --- a/interface/web/mail/mail_spamfilter_edit.php +++ b/interface/web/mail/mail_spamfilter_edit.php @@ -76,8 +76,8 @@ class page_action extends tform_actions { } // Changing maildir to mailbox_id - $sql = "SELECT mailbox_id FROM mail_box WHERE maildir = '".$app->db->quote($this->dataRecord["spam_redirect_maildir"])."' AND ".$app->tform->getAuthSQL('r'); - $mailbox = $app->db->queryOneRecord($sql); + $sql = "SELECT mailbox_id FROM mail_box WHERE maildir = ? AND ".$app->tform->getAuthSQL('r'); + $mailbox = $app->db->queryOneRecord($sql, $this->dataRecord["spam_redirect_maildir"]); $this->dataRecord["spam_redirect_maildir"] = $mailbox["mailbox_id"]; parent::onShowEnd(); @@ -87,7 +87,7 @@ class page_action extends tform_actions { global $app, $conf; // Check if Domain belongs to user - $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($_POST["email_domain"])."' AND ".$app->tform->getAuthSQL('r')); + $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $_POST["email_domain"]); if($domain["domain"] != $_POST["email_domain"]) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; // compose the email field @@ -108,8 +108,8 @@ class page_action extends tform_actions { $this->dataRecord["spam_delete_score_int"] = $_POST["spam_delete_score_int"] * 100; // Changing mailbox_id to maildir - $sql = "SELECT maildir FROM mail_box WHERE mailbox_id = '".$app->functions->intval($_POST["spam_redirect_maildir"])."' AND ".$app->tform->getAuthSQL('r'); - $mailbox = $app->db->queryOneRecord($sql); + $sql = "SELECT maildir FROM mail_box WHERE mailbox_id = ? AND ".$app->tform->getAuthSQL('r'); + $mailbox = $app->db->queryOneRecord($sql, $_POST["spam_redirect_maildir"]); $this->dataRecord["spam_redirect_maildir"] = $mailbox["maildir"]; parent::onSubmit(); diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index a96ece008..5292c7781 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -92,7 +92,7 @@ class page_action extends tform_actions { unset($domain_select); // Get the spamfilter policys for the user - $tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = '".$app->db->quote($this->dataRecord["email"])."'"); + $tmp_user = $app->db->queryOneRecord("SELECT policy_id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]); $sql = "SELECT id, policy_name FROM spamfilter_policy WHERE ".$app->tform->getAuthSQL('r') . " ORDER BY policy_name"; $policys = $app->db->queryAllRecords($sql); $policy_select = ""; @@ -139,7 +139,7 @@ class page_action extends tform_actions { //* Check if Domain belongs to user if(isset($_POST["email_domain"])) { - $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["email_domain"]))."' AND ".$app->tform->getAuthSQL('r')); + $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"])); if($domain["domain"] != $app->functions->idn_encode($_POST["email_domain"])) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm"); } @@ -167,7 +167,7 @@ class page_action extends tform_actions { // Check the quota and adjust if(isset($_POST["quota"]) && $client["limit_mailquota"] >= 0 && (($app->functions->intval($this->dataRecord["quota"]) * 1024 * 1024 != $this->oldDataRecord['quota']) || ($_POST["quota"] <= 0))) { - $tmp = $app->db->queryOneRecord("SELECT sum(quota) as mailquota FROM mail_user WHERE mailuser_id != ".$app->functions->intval($this->id)." AND ".$app->tform->getAuthSQL('u')); + $tmp = $app->db->queryOneRecord("SELECT sum(quota) as mailquota FROM mail_user WHERE mailuser_id != ? AND ".$app->tform->getAuthSQL('u'), $this->id); $mailquota = $tmp["mailquota"] / 1024 / 1024; $new_mailbox_quota = $app->functions->intval($this->dataRecord["quota"]); if(($mailquota + $new_mailbox_quota > $client["limit_mailquota"]) || ($new_mailbox_quota == 0 && $client["limit_mailquota"] != -1)) { @@ -182,11 +182,11 @@ class page_action extends tform_actions { if($client['parent_client_id'] > 0) { // Get the limits of the reseller - $reseller = $app->db->queryOneRecord("SELECT limit_mailquota, limit_maildomain FROM client WHERE client_id = ".$client['parent_client_id']); + $reseller = $app->db->queryOneRecord("SELECT limit_mailquota, limit_maildomain FROM client WHERE client_id = ?", $client['parent_client_id']); //* Check the website quota of the client if(isset($_POST["quota"]) && $reseller["limit_mailquota"] >= 0 && $app->functions->intval($this->dataRecord["quota"]) * 1024 * 1024 != $this->oldDataRecord['quota']) { - $tmp = $app->db->queryOneRecord("SELECT sum(quota) as mailquota FROM mail_user, sys_group, client WHERE mail_user.sys_groupid=sys_group.groupid AND sys_group.client_id=client.client_id AND ".$client['parent_client_id']." IN (client.parent_client_id, client.client_id) AND mailuser_id != ".$app->functions->intval($this->id)); + $tmp = $app->db->queryOneRecord("SELECT sum(quota) as mailquota FROM mail_user, sys_group, client WHERE mail_user.sys_groupid=sys_group.groupid AND sys_group.client_id=client.client_id AND ? IN (client.parent_client_id, client.client_id) AND mailuser_id != ?", $client['parent_client_id'], $this->id); $mailquota = $tmp["mailquota"] / 1024 / 1024; $new_mailbox_quota = $app->functions->intval($this->dataRecord["quota"]); @@ -231,7 +231,7 @@ class page_action extends tform_actions { $this->dataRecord['gid'] = -1; //* Check if there is no alias or forward with this address - $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE active = 'y' AND source = '".$app->db->quote($this->dataRecord["email"])."'"); + $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE active = 'y' AND source = ?", $this->dataRecord["email"]); if($tmp['number'] > 0) $app->tform->errorMessage .= $app->tform->lng("duplicate_alias_or_forward_txt")."
"; unset($tmp); @@ -257,13 +257,13 @@ class page_action extends tform_actions { global $app, $conf; // Set the domain owner as mailbox owner - $domain = $app->db->queryOneRecord("SELECT sys_groupid, server_id FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["email_domain"]))."' AND ".$app->tform->getAuthSQL('r')); - $app->db->query("UPDATE mail_user SET sys_groupid = ".$app->functions->intval($domain["sys_groupid"])." WHERE mailuser_id = ".$this->id); + $domain = $app->db->queryOneRecord("SELECT sys_groupid, server_id FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"])); + $app->db->query("UPDATE mail_user SET sys_groupid = ? WHERE mailuser_id = ?", $domain["sys_groupid"], $this->id); // Spamfilter policy $policy_id = $app->functions->intval($this->dataRecord["policy"]); if($policy_id > 0) { - $tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = '".$app->db->quote($this->dataRecord["email"])."'"); + $tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]); if($tmp_user["id"] > 0) { // There is already a record that we will update $app->db->datalogUpdate('spamfilter_users', "policy_id = $policy_id", 'id', $tmp_user["id"]); @@ -283,8 +283,8 @@ class page_action extends tform_actions { $disabledeliver = ($this->dataRecord["postfix"] == 'y')?'n':'y'; $disablesmtp = ($this->dataRecord["disablesmtp"])?'y':'n'; - $sql = "UPDATE mail_user SET disableimap = '$disableimap', disablesieve = '$disableimap', disablepop3 = '$disablepop3', disablesmtp = '$disablesmtp', disabledeliver = '$disabledeliver', disablelda = '$disabledeliver', disabledoveadm = '$disableimap' WHERE mailuser_id = ".$this->id; - $app->db->query($sql); + $sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ?, disabledoveadm = ? WHERE mailuser_id = ?"; + $app->db->query($sql, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $disableimap, $this->id); } } @@ -293,12 +293,12 @@ class page_action extends tform_actions { // Set the domain owner as mailbox owner if(isset($_POST["email_domain"])) { - $domain = $app->db->queryOneRecord("SELECT sys_groupid, server_id FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["email_domain"]))."' AND ".$app->tform->getAuthSQL('r')); - $app->db->query("UPDATE mail_user SET sys_groupid = ".$app->functions->intval($domain["sys_groupid"])." WHERE mailuser_id = ".$this->id); + $domain = $app->db->queryOneRecord("SELECT sys_groupid, server_id FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"])); + $app->db->query("UPDATE mail_user SET sys_groupid = ? WHERE mailuser_id = ?", $domain["sys_groupid"], $this->id); // Spamfilter policy $policy_id = $app->functions->intval($this->dataRecord["policy"]); - $tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = '".$app->db->quote($this->dataRecord["email"])."'"); + $tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]); if($policy_id > 0) { if($tmp_user["id"] > 0) { // There is already a record that we will update @@ -324,8 +324,8 @@ class page_action extends tform_actions { $disabledeliver = ($this->dataRecord["postfix"] == 'y')?'n':'y'; $disablesmtp = (isset($this->dataRecord["disablesmtp"]) && $this->dataRecord["disablesmtp"])?'y':'n'; - $sql = "UPDATE mail_user SET disableimap = '$disableimap', disablesieve = '$disableimap', `disablesieve-filter` = '$disableimap', disablepop3 = '$disablepop3', disablesmtp = '$disablesmtp', disabledeliver = '$disabledeliver', disablelda = '$disabledeliver', disabledoveadm = '$disableimap' WHERE mailuser_id = ".$this->id; - $app->db->query($sql); + $sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, `disablesieve-filter` = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ?, disabledoveadm = ? WHERE mailuser_id = ?"; + $app->db->query($sql, $disableimap, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $disableimap, $this->id); } //** If the email address has been changed, change it in all aliases too @@ -333,7 +333,7 @@ class page_action extends tform_actions { //if($this->oldDataRecord['email'] != $this->dataRecord['email']) { //* Update the aliases - $forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE destination = '".$app->db->quote($this->oldDataRecord['email'])."'"); + $forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE destination = ?", $this->oldDataRecord['email']); if(is_array($forwardings)) { foreach($forwardings as $rec) { $destination = $app->db->quote($this->dataRecord['email']); diff --git a/interface/web/mail/mail_user_filter_edit.php b/interface/web/mail/mail_user_filter_edit.php index 1f3953b71..52cab0886 100644 --- a/interface/web/mail/mail_user_filter_edit.php +++ b/interface/web/mail/mail_user_filter_edit.php @@ -70,7 +70,7 @@ class page_action extends tform_actions { global $app, $conf; // Get the parent mail_user record - $mailuser = $app->db->queryOneRecord("SELECT * FROM mail_user WHERE mailuser_id = '".$app->functions->intval($_REQUEST["mailuser_id"])."' AND ".$app->tform->getAuthSQL('r')); + $mailuser = $app->db->queryOneRecord("SELECT * FROM mail_user WHERE mailuser_id = ? AND ".$app->tform->getAuthSQL('r'). $_REQUEST["mailuser_id"]); // Check if Domain belongs to user if($mailuser["mailuser_id"] != $_POST["mailuser_id"]) $app->tform->errorMessage .= $app->tform->wordbook["no_mailuser_perm"]; diff --git a/interface/web/mail/mail_user_stats.php b/interface/web/mail/mail_user_stats.php index 356d28cf3..abb5461e5 100644 --- a/interface/web/mail/mail_user_stats.php +++ b/interface/web/mail/mail_user_stats.php @@ -34,28 +34,28 @@ class list_action extends listform_actions { //* Set the statistics colums //** Traffic of the current month $tmp_date = date('Y-m'); - $tmp_rec = $app->db->queryOneRecord("SELECT traffic as t FROM mail_traffic WHERE mailuser_id = ".$app->functions->intval($rec['mailuser_id'])." AND month = '$tmp_date'"); + $tmp_rec = $app->db->queryOneRecord("SELECT traffic as t FROM mail_traffic WHERE mailuser_id = ? AND month = ?", $rec['mailuser_id'], $tmp_date); // $rec['this_month'] = number_format($app->functions->intval($tmp_rec['t'])/1024/1024, 0, '.', ' '); $rec['this_month'] = $app->functions->formatBytes($tmp_rec['t']); if ($rec['this_month'] == 'NAN') $rec['this_month'] = '0 KB'; //** Traffic of the current year $tmp_date = date('Y'); - $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic) as t FROM mail_traffic WHERE mailuser_id = ".$app->functions->intval($rec['mailuser_id'])." AND month like '$tmp_date%'"); + $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic) as t FROM mail_traffic WHERE mailuser_id = ? AND month like ?", $rec['mailuser_id'], $tmp_date . '%'); // $rec['this_year'] = number_format($app->functions->intval($tmp_rec['t'])/1024/1024, 0, '.', ' '); $rec['this_year'] = $app->functions->formatBytes($tmp_rec['t']); if ($rec['this_year'] == 'NAN') $rec['this_year'] = '0 KB'; //** Traffic of the last month $tmp_date = date('Y-m', mktime(0, 0, 0, date("m")-1, date("d"), date("Y"))); - $tmp_rec = $app->db->queryOneRecord("SELECT traffic as t FROM mail_traffic WHERE mailuser_id = ".$app->functions->intval($rec['mailuser_id'])." AND month = '$tmp_date'"); + $tmp_rec = $app->db->queryOneRecord("SELECT traffic as t FROM mail_traffic WHERE mailuser_id = ? AND month = ?", $rec['mailuser_id'], $tmp_date); // $rec['last_month'] = number_format($app->functions->intval($tmp_rec['t'])/1024/1024, 0, '.', ' '); $rec['last_month'] = $app->functions->formatBytes($tmp_rec['t']); if ($rec['last_month'] == 'NAN') $rec['last_month'] = '0 KB'; //** Traffic of the last year $tmp_date = date('Y', mktime(0, 0, 0, date("m"), date("d"), date("Y")-1)); - $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic) as t FROM mail_traffic WHERE mailuser_id = ".$app->functions->intval($rec['mailuser_id'])." AND month like '$tmp_date%'"); + $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic) as t FROM mail_traffic WHERE mailuser_id = ? AND month like ?", $rec['mailuser_id'], $tmp_date . '%'); // $rec['last_year'] = number_format($app->functions->intval($tmp_rec['t'])/1024/1024, 0, '.', ' '); $rec['last_year'] = $app->functions->formatBytes($tmp_rec['t']); if ($rec['last_year'] == 'NAN') $rec['last_year'] = '0 KB'; diff --git a/interface/web/mail/mail_whitelist_edit.php b/interface/web/mail/mail_whitelist_edit.php index cd28f84a2..4bec04199 100644 --- a/interface/web/mail/mail_whitelist_edit.php +++ b/interface/web/mail/mail_whitelist_edit.php @@ -72,7 +72,7 @@ class page_action extends tform_actions { //* Check if the server has been changed // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { - $rec = $app->db->queryOneRecord("SELECT server_id from mail_access WHERE access_id = ".$this->id); + $rec = $app->db->queryOneRecord("SELECT server_id from mail_access WHERE access_id = ?", $this->id); if($rec['server_id'] != $this->dataRecord["server_id"]) { //* Add a error message and switch back to old server $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); diff --git a/interface/web/mail/spamfilter_config_edit.php b/interface/web/mail/spamfilter_config_edit.php index 3584c2ff5..5b3062ab7 100644 --- a/interface/web/mail/spamfilter_config_edit.php +++ b/interface/web/mail/spamfilter_config_edit.php @@ -83,8 +83,8 @@ class page_action extends tform_actions { $server_config_array[$section] = $app->tform->encode($this->dataRecord, $section); $server_config_str = $app->ini_parser->get_ini_string($server_config_array); - $sql = "UPDATE server SET config = '".$app->db->quote($server_config_str)."' WHERE server_id = ".$app->functions->intval($server_id); - $app->db->query($sql); + $sql = "UPDATE server SET config = ? WHERE server_id = ?"; + $app->db->query($sql, $server_config_str, $server_id); } } diff --git a/interface/web/mail/spamfilter_whitelist_edit.php b/interface/web/mail/spamfilter_whitelist_edit.php index 00ce0d4e3..a404db0ef 100644 --- a/interface/web/mail/spamfilter_whitelist_edit.php +++ b/interface/web/mail/spamfilter_whitelist_edit.php @@ -65,24 +65,6 @@ class page_action extends tform_actions { parent::onShowNew(); } - /* - function onBeforeUpdate() { - global $app, $conf; - - //* Check if the server has been changed - // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway - if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { - $rec = $app->db->queryOneRecord("SELECT server_id from spamfilter_wblist WHERE id = ".$this->id); - if($rec['server_id'] != $this->dataRecord["server_id"]) { - //* Add a error message and switch back to old server - $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); - $this->dataRecord["server_id"] = $rec['server_id']; - } - unset($rec); - } - } - */ - function onSubmit() { global $app, $conf; @@ -103,7 +85,7 @@ class page_action extends tform_actions { } // end if user is not admin // Select and set the server_id so it matches the server_id of the spa,filter_users record - $tmp = $app->db->queryOneRecord("SELECT server_id FROM spamfilter_users WHERE id = ".$app->functions->intval($this->dataRecord["rid"])); + $tmp = $app->db->queryOneRecord("SELECT server_id FROM spamfilter_users WHERE id = ?", $this->dataRecord["rid"]); $this->dataRecord["server_id"] = $tmp["server_id"]; unset($tmp); diff --git a/interface/web/mail/user_quota_stats.php b/interface/web/mail/user_quota_stats.php index 88ab8f450..90a92558f 100644 --- a/interface/web/mail/user_quota_stats.php +++ b/interface/web/mail/user_quota_stats.php @@ -19,8 +19,6 @@ $app->uses('functions'); $app->load('listform_actions'); -// $tmp_rec = $app->db->queryOneRecord("SELECT data from monitor_data WHERE type = 'harddisk_quota' ORDER BY created DESC"); -// $monitor_data = unserialize($app->db->unquote($tmp_rec['data'])); $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)) { diff --git a/interface/web/mail/xmpp_domain_edit.php b/interface/web/mail/xmpp_domain_edit.php index 91566dc6a..851986b0e 100644 --- a/interface/web/mail/xmpp_domain_edit.php +++ b/interface/web/mail/xmpp_domain_edit.php @@ -123,13 +123,13 @@ 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, 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"); + $client = $app->db->queryOneRecord("SELECT client.client_id, 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 FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ? order by client.contact_name", $client_group_id); if ($settings['use_domain_module'] != 'y') { // Fill the client select field - $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 = ".$app->functions->intval($client['client_id'])." ORDER BY client.company_name, client.contact_name, sys_group.name"; - $clients = $app->db->queryAllRecords($sql); - $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id'])); + $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 = ? ORDER BY client.company_name, client.contact_name, sys_group.name"; + $clients = $app->db->queryAllRecords($sql, $client['client_id']); + $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client['client_id']); $client_select = ''; //$tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($clients)) { @@ -156,8 +156,8 @@ class page_action extends tform_actions { $app->tpl->setVar('server_id_value', $client_xmpp['xmpp_servers_ids'][0]); } - $sql = "SELECT server_id, server_name FROM server WHERE server_id IN (" . $client_xmpp['xmpp_servers'] . ");"; - $xmpp_servers = $app->db->queryAllRecords($sql); + $sql = "SELECT server_id, server_name FROM server WHERE server_id IN ?"; + $xmpp_servers = $app->db->queryAllRecords($sql, $client_xmpp['xmpp_servers_ids']); $options_xmpp_servers = ""; @@ -243,7 +243,7 @@ class page_action extends tform_actions { // When the record is updated if($this->id > 0) { // restore the server ID if the user is not admin and record is edited - $tmp = $app->db->queryOneRecord("SELECT server_id FROM xmpp_domain WHERE domain_id = ".$app->functions->intval($this->id)); + $tmp = $app->db->queryOneRecord("SELECT server_id FROM xmpp_domain WHERE domain_id = ?", $this->id); $this->dataRecord["server_id"] = $tmp["server_id"]; unset($tmp); // When the record is inserted @@ -281,7 +281,7 @@ class page_action extends tform_actions { case 1: $this->dataRecord["management_method"] = 'maildomain'; // Check for corresponding mail domain - $tmp = $app->db->queryOneRecord("SELECT count(domain_id) AS number FROM mail_domain WHERE domain = '".$this->dataRecord["domain"]."' AND ".$app->tform->getAuthSQL('r')." ORDER BY domain"); + $tmp = $app->db->queryOneRecord("SELECT count(domain_id) AS number FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r')." ORDER BY domain", $this->dataRecord["domain"]); if($tmp['number']==0){ $app->error($app->tform->wordbook["no_corresponding_maildomain_txt"]); break; @@ -318,11 +318,11 @@ class page_action extends tform_actions { // also make sure that the user can not delete domain created by a admin if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) { $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); - $app->db->query("UPDATE xmpp_domain SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE domain_id = ".$this->id); + $app->db->query("UPDATE xmpp_domain SET sys_groupid = ?, sys_perm_group = 'ru' WHERE domain_id = ?", $client_group_id, $this->id); } if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($this->dataRecord["client_group_id"])) { $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); - $app->db->query("UPDATE xmpp_domain SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE domain_id = ".$this->id); + $app->db->query("UPDATE xmpp_domain SET sys_groupid = ?, sys_perm_group = 'riud' WHERE domain_id = ?", $client_group_id, $this->id); } //* make sure that the xmpp domain is lowercase @@ -342,7 +342,7 @@ class page_action extends tform_actions { if($this->_xmpp_type == 'server') { // Check if the domain has been changed - $rec = $app->db->queryOneRecord("SELECT domain from xmpp_domain WHERE domain_id = ".$this->id); + $rec = $app->db->queryOneRecord("SELECT domain from xmpp_domain WHERE domain_id = ?", $this->id); if($this->dataRecord['domain']!=$rec['domain']) $app->error($app->tform->wordbook["cant_change_domainname_txt"]); @@ -350,7 +350,7 @@ class page_action extends tform_actions { // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { if (isset($this->dataRecord["server_id"])) { - $rec = $app->db->queryOneRecord("SELECT server_id from xmpp_domain WHERE domain_id = ".$this->id); + $rec = $app->db->queryOneRecord("SELECT server_id from xmpp_domain WHERE domain_id = ?", $this->id); if($rec['server_id'] != $this->dataRecord["server_id"]) { //* Add a error message and switch back to old server $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); @@ -361,7 +361,7 @@ class page_action extends tform_actions { //* If the user is neither admin nor reseller } else { //* We do not allow users to change a domain which has been created by the admin - $rec = $app->db->queryOneRecord("SELECT sys_perm_group, domain from xmpp_domain WHERE domain_id = ".$this->id); + $rec = $app->db->queryOneRecord("SELECT sys_perm_group, domain from xmpp_domain WHERE domain_id = ?", $this->id); if(isset($this->dataRecord["domain"]) && $rec['domain'] != $this->dataRecord["domain"] && $app->tform->checkPerm($this->id, 'u')) { //* Add a error message and switch back to old server $app->tform->errorMessage .= $app->lng('The Domain can not be changed. Please ask your Administrator if you want to change the domain name.'); @@ -411,7 +411,7 @@ class page_action extends tform_actions { private function update_dns($dataRecord, $new_rr) { global $app, $conf; - $rec = $app->db->queryOneRecord("SELECT use_pubsub, use_proxy, use_anon_host, use_vjud, use_muc_host from xmpp_domain WHERE domain_id = ".$this->id); + $rec = $app->db->queryOneRecord("SELECT use_pubsub, use_proxy, use_anon_host, use_vjud, use_muc_host from xmpp_domain WHERE domain_id = ?", $this->id); $required_hosts = array('xmpp'); if($rec['use_pubsub']=='y') $required_hosts[] = 'pubsub'; @@ -425,8 +425,8 @@ class page_action extends tform_actions { $required_hosts[] = 'muc'; // purge old rr-record - $sql = "SELECT * FROM dns_rr WHERE zone = ? AND (name IN ? AND type = 'CNAME' OR name LIKE ? AND type = 'SRV') AND ? ORDER BY serial DESC"; - $rec = $app->db->queryAllRecords($sql, $new_rr['zone'], array('xmpp', 'pubsub', 'proxy', 'anon', 'vjud', 'muc'), '_xmpp-%', $app->tform->getAuthSQL('r')); + $sql = "SELECT * FROM dns_rr WHERE zone = ? AND (name IN ? AND type = 'CNAME' OR name LIKE ? AND type = 'SRV') AND " . $app->tform->getAuthSQL('r') . " ORDER BY serial DESC"; + $rec = $app->db->queryAllRecords($sql, $new_rr['zone'], array('xmpp', 'pubsub', 'proxy', 'anon', 'vjud', 'muc'), '_xmpp-%'); if (is_array($rec[1])) { for ($i=0; $i < count($rec); ++$i) $app->db->datalogDelete('dns_rr', 'id', $rec[$i]['id']); diff --git a/interface/web/sites/ajax_get_ip.php b/interface/web/sites/ajax_get_ip.php index c50c1ba3c..205be4803 100644 --- a/interface/web/sites/ajax_get_ip.php +++ b/interface/web/sites/ajax_get_ip.php @@ -37,7 +37,7 @@ $app->uses('getconf'); $server_id = $app->functions->intval($_GET["server_id"]); $client_group_id = $app->functions->intval($_GET["client_group_id"]); -$ip_type = $app->db->quote($_GET['ip_type']); +$ip_type = $_GET['ip_type']; if($_SESSION["s"]["user"]["typ"] == 'admin' or $app->auth->has_clients($_SESSION['s']['user']['userid'])) { diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php index 243c158da..5e9384305 100644 --- a/interface/web/sites/ajax_get_json.php +++ b/interface/web/sites/ajax_get_json.php @@ -56,8 +56,8 @@ if($type == 'getservertype'){ if($type == 'getserverid'){ $json = '{"serverid":"'; - $sql = "SELECT server_id FROM web_domain WHERE domain_id = $web_id AND ".$app->tform->getAuthSQL('r'); - $server = $app->db->queryOneRecord($sql); + $sql = "SELECT server_id FROM web_domain WHERE domain_id = ?? AND ".$app->tform->getAuthSQL('r'); + $server = $app->db->queryOneRecord($sql, $web_id); $json .= $server['server_id']; unset($server); $json .= '"}'; @@ -77,7 +77,7 @@ if($type == 'getphpfastcgi'){ $sql_where = " AND (client_id = 0 OR client_id = ".$app->functions->intval($_SESSION["s"]["user"]["client_id"]) . ")"; //* Reseller: If the logged in user is not admin and has sub clients (is a reseller) } elseif ($_SESSION["s"]["user"]["typ"] != 'admin' && $app->auth->has_clients($_SESSION['s']['user']['userid'])) { - $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = $client_group_id"); + $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ?", $client_group_id); //$sql_where = " AND (client_id = 0 OR client_id = ".$_SESSION["s"]["user"]["client_id"]; $sql_where = " AND (client_id = 0"; if($app->functions->intval($client['client_id']) > 0) $sql_where .= " OR client_id = ".$app->functions->intval($client['client_id']); @@ -85,7 +85,7 @@ if($type == 'getphpfastcgi'){ //* Admin: If the logged in user is admin } else { //$sql_where = ''; - $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = $client_group_id"); + $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ?", $client_group_id); //$sql_where = " AND (client_id = 0 OR client_id = ".$_SESSION["s"]["user"]["client_id"]; $sql_where = " AND (client_id = 0"; if($app->functions->intval($client['client_id']) > 0) $sql_where .= " OR client_id = ".$app->functions->intval($client['client_id']); @@ -93,10 +93,9 @@ if($type == 'getphpfastcgi'){ } 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".$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".$sql_where); + $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 = ?".$sql_where, $server_id); + } elseif($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 = ?".$sql_where, $server_id); } $php_select = ""; if(is_array($php_records) && !empty($php_records)) { @@ -116,8 +115,8 @@ if($type == 'getphpfastcgi'){ if($type == 'getphptype'){ $json = '{"phptype":"'; - $sql = "SELECT php FROM web_domain WHERE domain_id = $web_id AND ".$app->tform->getAuthSQL('r'); - $php = $app->db->queryOneRecord($sql); + $sql = "SELECT php FROM web_domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL('r'); + $php = $app->db->queryOneRecord($sql, $web_id); $json .= $php['php']; unset($php); $json .= '"}'; @@ -125,8 +124,8 @@ if($type == 'getphptype'){ if($type == 'getredirecttype'){ $json = '{"redirecttype":"'; - $sql = "SELECT redirect_type FROM web_domain WHERE domain_id = $web_id AND ".$app->tform->getAuthSQL('r'); - $redirect = $app->db->queryOneRecord($sql); + $sql = "SELECT redirect_type FROM web_domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL('r'); + $redirect = $app->db->queryOneRecord($sql, $web_id); $json .= $redirect['redirect_type']; unset($redirect); $json .= '"}'; @@ -155,11 +154,11 @@ if($type == 'get_ipv6'){ if($type == 'getdatabaseusers') { $json = '{}'; - $sql = "SELECT sys_groupid FROM web_domain WHERE domain_id = $web_id AND ".$app->tform->getAuthSQL('r'); - $group = $app->db->queryOneRecord($sql); + $sql = "SELECT sys_groupid FROM web_domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL('r'); + $group = $app->db->queryOneRecord($sql, $web_id); if($group) { - $sql = "SELECT database_user_id, database_user FROM web_database_user WHERE sys_groupid = '" . $app->functions->intval($group['sys_groupid']) . "'"; - $records = $app->db->queryAllRecords($sql); + $sql = "SELECT database_user_id, database_user FROM web_database_user WHERE sys_groupid = ?"; + $records = $app->db->queryAllRecords($sql, $group['sys_groupid']); $tmp_array = array(); foreach($records as $record) { @@ -202,9 +201,9 @@ if ($type == 'getdirectivesnippet') { } if($type == 'getclientssldata'){ - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", intval($web_id)); - $sys_group = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE groupid = ?", intval($web['sys_groupid'])); - $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", intval($sys_group['client_id'])); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $web_id); + $sys_group = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE groupid = ?", $web['sys_groupid']); + $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", $sys_group['client_id']); if(is_array($client) && !empty($client)){ if($client['telephone'] == '' && $client['mobile'] != '') $client['telephone'] = $client['mobile']; diff --git a/interface/web/sites/aps_install_package.php b/interface/web/sites/aps_install_package.php index 0c19af8c9..05e4e9e4e 100644 --- a/interface/web/sites/aps_install_package.php +++ b/interface/web/sites/aps_install_package.php @@ -62,7 +62,7 @@ if($_SESSION["s"]["user"]["typ"] == 'user') { $adminflag = ($_SESSION['s']['user']['typ'] == 'admin') ? true : false; $gui = new ApsGUIController($app); -$pkg_id = (isset($_GET['id'])) ? $app->db->quote($_GET['id']) : ''; +$pkg_id = (isset($_GET['id'])) ? $_GET['id'] : ''; // Check if a newer version is available for the current package // Note: It's intended that here is no strict ID check (see below) diff --git a/interface/web/sites/aps_installedpackages_list.php b/interface/web/sites/aps_installedpackages_list.php index a0a934ef4..f323a9cc8 100644 --- a/interface/web/sites/aps_installedpackages_list.php +++ b/interface/web/sites/aps_installedpackages_list.php @@ -51,7 +51,7 @@ $client_ext = ''; $is_admin = ($_SESSION['s']['user']['typ'] == 'admin') ? true : false; if(!$is_admin) { - $cid = $app->db->queryOneRecord('SELECT client_id FROM client WHERE username = "'.$app->db->quote($_SESSION['s']['user']['username']).'";'); + $cid = $app->db->queryOneRecord('SELECT client_id FROM client WHERE username = ?', $_SESSION['s']['user']['username']); //$client_ext = ' AND aps_instances.customer_id = '.$cid['client_id']; $client_ext = ' AND '.$app->tform->getAuthSQL('r', 'aps_instances'); } diff --git a/interface/web/sites/aps_packagedetails_show.php b/interface/web/sites/aps_packagedetails_show.php index 7f8ca6bd2..6da561021 100644 --- a/interface/web/sites/aps_packagedetails_show.php +++ b/interface/web/sites/aps_packagedetails_show.php @@ -47,7 +47,7 @@ require_once $lngfile; $app->tpl->setVar($wb); $gui = new ApsGUIController($app); -$pkg_id = (isset($_GET['id'])) ? $app->db->quote($_GET['id']) : ''; +$pkg_id = (isset($_GET['id'])) ? $_GET['id'] : ''; // Check if a newer version is available for the current package // Note: It's intended that here is no strict ID check (see below) diff --git a/interface/web/sites/database_user_edit.php b/interface/web/sites/database_user_edit.php index ff366a374..90b28ef6e 100644 --- a/interface/web/sites/database_user_edit.php +++ b/interface/web/sites/database_user_edit.php @@ -69,9 +69,9 @@ 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(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 = ".$app->functions->intval($client['client_id'])." ORDER BY client.company_name, client.contact_name, sys_group.name"; - $records = $app->db->queryAllRecords($sql); - $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id'])); + $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 = ? ORDER BY client.company_name, client.contact_name, sys_group.name"; + $records = $app->db->queryAllRecords($sql, $client['client_id']); + $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client['client_id']); $client_select = ''; //$tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($records)) { @@ -128,7 +128,7 @@ class page_action extends tform_actions { $global_config = $app->getconf->get_global_config('sites'); $dbuser_prefix = $app->tools_sites->replacePrefix($global_config['dbuser_prefix'], $this->dataRecord); - $this->oldDataRecord = $app->db->queryOneRecord("SELECT * FROM web_database_user WHERE database_user_id = '".$this->id."'"); + $this->oldDataRecord = $app->db->queryOneRecord("SELECT * FROM web_database_user WHERE database_user_id = ?", $this->id); $dbuser_prefix = $app->tools_sites->getPrefix($this->oldDataRecord['database_user_prefix'], $dbuser_prefix); $this->dataRecord['database_user_prefix'] = $dbuser_prefix; @@ -200,11 +200,11 @@ class page_action extends tform_actions { if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) { $client_group_id = $app->functions->intval($this->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 = ".$this->id); + $app->db->query("UPDATE web_database_user SET sys_groupid = ?, sys_perm_group = 'riud' WHERE database_user_id = ?", $client_group_id, $this->id); } if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($this->dataRecord["client_group_id"])) { $client_group_id = $app->functions->intval($this->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 = ".$this->id); + $app->db->query("UPDATE web_database_user SET sys_groupid = ?, sys_perm_group = 'riud' WHERE database_user_id = ?", $client_group_id, $this->id); } } @@ -213,24 +213,12 @@ class page_action extends tform_actions { if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) { $client_group_id = $app->functions->intval($this->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 = ".$this->id); + $app->db->query("UPDATE web_database_user SET sys_groupid = ?, sys_perm_group = 'riud' WHERE database_user_id = ?", $client_group_id, $this->id); } if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($this->dataRecord["client_group_id"])) { $client_group_id = $app->functions->intval($this->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 = ".$this->id); + $app->db->query("UPDATE web_database_user SET sys_groupid = ?, sys_perm_group = 'riud' WHERE database_user_id = ?", $client_group_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) { - $new_rec = $this->dataRecord; - $new_rec['server_id'] = $rec['server_id']; - // Make sure to store the password in encrypted form in sys_datalog - $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);*/ } } diff --git a/interface/web/sites/ftp_user_edit.php b/interface/web/sites/ftp_user_edit.php index bdbf3c2b3..9de400ce0 100644 --- a/interface/web/sites/ftp_user_edit.php +++ b/interface/web/sites/ftp_user_edit.php @@ -96,11 +96,11 @@ class page_action extends tform_actions { // Get the record of the parent domain if(isset($this->dataRecord["parent_domain_id"])) { - $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r')); + $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL('r'), @$this->dataRecord["parent_domain_id"]); if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm"); } else { $tmp = $app->tform->getDataRecord($this->id); - $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval($tmp["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r')); + $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL('r'), $tmp["parent_domain_id"]); if(!$parent_domain) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm"); unset($tmp); } @@ -137,11 +137,11 @@ class page_action extends tform_actions { function onAfterInsert() { global $app, $conf; - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->dataRecord["parent_domain_id"])); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $this->dataRecord["parent_domain_id"]); $server_id = $app->functions->intval($web["server_id"]); - $dir = $app->db->quote($web["document_root"]); - $uid = $app->db->quote($web["system_user"]); - $gid = $app->db->quote($web["system_group"]); + $dir = $web["document_root"]; + $uid = $web["system_user"]; + $gid = $web["system_group"]; // Check system user and group if($app->functions->is_allowed_user($uid) == false || $app->functions->is_allowed_group($gid) == false) { @@ -151,8 +151,8 @@ class page_action extends tform_actions { // The FTP user shall be owned by the same group then the website $sys_groupid = $app->functions->intval($web['sys_groupid']); - $sql = "UPDATE ftp_user SET server_id = $server_id, dir = '$dir', uid = '$uid', gid = '$gid', sys_groupid = '$sys_groupid' WHERE ftp_user_id = ".$this->id; - $app->db->query($sql); + $sql = "UPDATE ftp_user SET server_id = ?, dir = ?, uid = ?, gid = ?, sys_groupid = ? WHERE ftp_user_id = ?"; + $app->db->query($sql, $server_id, $dir, $uid, $gid, $sys_groupid, $this->id); } function onBeforeUpdate() { @@ -181,17 +181,17 @@ class page_action extends tform_actions { //* When the site of the FTP user has been changed if(isset($this->dataRecord['parent_domain_id']) && $this->oldDataRecord['parent_domain_id'] != $this->dataRecord['parent_domain_id']) { - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->dataRecord["parent_domain_id"])); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $this->dataRecord["parent_domain_id"]); $server_id = $app->functions->intval($web["server_id"]); - $dir = $app->db->quote($web["document_root"]); - $uid = $app->db->quote($web["system_user"]); - $gid = $app->db->quote($web["system_group"]); + $dir = $web["document_root"]; + $uid = $web["system_user"]; + $gid = $web["system_group"]; // The FTP user shall be owned by the same group then the website $sys_groupid = $app->functions->intval($web['sys_groupid']); - $sql = "UPDATE ftp_user SET server_id = $server_id, dir = '$dir', uid = '$uid', gid = '$gid', sys_groupid = '$sys_groupid' WHERE ftp_user_id = ".$this->id; - $app->db->query($sql); + $sql = "UPDATE ftp_user SET server_id = ?, dir = ?, uid = ?, gid = ?, sys_groupid = ? WHERE ftp_user_id = ?"; + $app->db->query($sql, $server_id, $dir, $uid, $gid, $sys_groupid, $this->id); } //* 2. check to ensure that the FTP user path is not changed to a path outside of the docroot by a normal user @@ -201,11 +201,11 @@ class page_action extends tform_actions { //* 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 = $app->db->quote($web["document_root"]); - $sql = "UPDATE ftp_user SET dir = '$dir' WHERE ftp_user_id = ".$this->id; - $app->db->query($sql); + $ftp_data = $app->db->queryOneRecord("SELECT parent_domain_id FROM ftp_user WHERE ftp_user_id = ?", $app->tform->primary_id); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $ftp_data["parent_domain_id"]); + $dir = $web["document_root"]; + $sql = "UPDATE ftp_user SET dir = ? WHERE ftp_user_id = ?"; + $app->db->query($sql, $dir, $this->id); $app->log("Error in FTP path settings of FTP user ".$this->dataRecord['username'], 1); } diff --git a/interface/web/sites/shell_user_edit.php b/interface/web/sites/shell_user_edit.php index 1370d22a3..77c4509b4 100644 --- a/interface/web/sites/shell_user_edit.php +++ b/interface/web/sites/shell_user_edit.php @@ -164,9 +164,9 @@ class page_action extends tform_actions { $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $this->dataRecord["parent_domain_id"]); $server_id = $app->functions->intval($web["server_id"]); - $dir = $app->db->quote($web["document_root"]); - $uid = $app->db->quote($web["system_user"]); - $gid = $app->db->quote($web["system_group"]); + $dir = $web["document_root"]; + $uid = $web["system_user"]; + $gid = $web["system_group"]; // Check system user and group if($app->functions->is_allowed_user($uid) == false || $app->functions->is_allowed_group($gid) == false) { diff --git a/interface/web/sites/user_quota_stats.php b/interface/web/sites/user_quota_stats.php index dc71dc3df..9c9300807 100644 --- a/interface/web/sites/user_quota_stats.php +++ b/interface/web/sites/user_quota_stats.php @@ -19,8 +19,6 @@ $app->uses('functions'); $app->load('listform_actions'); -// $tmp_rec = $app->db->queryOneRecord("SELECT data from monitor_data WHERE type = 'harddisk_quota' ORDER BY created DESC"); -// $monitor_data = unserialize($app->db->unquote($tmp_rec['data'])); $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)) { @@ -43,7 +41,7 @@ class list_action extends listform_actions { $rec['bgcolor'] = $this->DataRowColor; $username = $rec['system_user']; - $server = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ".$rec['server_id']); + $server = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $rec['server_id']); $rec['domain'] = $rec['domain'].($server['server_name'] != '' ? ' ('.$server['server_name'].')' : ''); $rec['used'] = $monitor_data['user'][$username]['used']; diff --git a/interface/web/sites/web_folder_edit.php b/interface/web/sites/web_folder_edit.php index 009b039c1..04a80a1e9 100644 --- a/interface/web/sites/web_folder_edit.php +++ b/interface/web/sites/web_folder_edit.php @@ -55,7 +55,7 @@ class page_action extends tform_actions { global $app, $conf; // Get the record of the parent domain - $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r')); + $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL('r'), @$this->dataRecord["parent_domain_id"]); if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm"); // Set a few fixed values @@ -63,9 +63,9 @@ class page_action extends tform_actions { // make sure this folder isn't protected already if($this->id > 0){ - $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE parent_domain_id = ".$this->dataRecord['parent_domain_id']." AND path = '".$this->dataRecord['path']."' AND web_folder_id != ".$this->id); + $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE parent_domain_id = ? AND path = ? AND web_folder_id != ?", $this->dataRecord['parent_domain_id'], $this->dataRecord['path'], $this->id); } else { - $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE parent_domain_id = ".$this->dataRecord['parent_domain_id']." AND path = '".$this->dataRecord['path']."'"); + $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE parent_domain_id = ? AND path = ?", $this->dataRecord['parent_domain_id'], $this->dataRecord['path']); } if(is_array($folder) && !empty($folder)) $app->tform->errorMessage .= $app->tform->lng('error_folder_already_protected_txt'); @@ -75,13 +75,13 @@ class page_action extends tform_actions { function onAfterInsert() { global $app, $conf; - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->dataRecord["parent_domain_id"])); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $this->dataRecord["parent_domain_id"]); // The web folder entry shall be owned by the same group as the website $sys_groupid = $app->functions->intval($web['sys_groupid']); - $sql = "UPDATE web_folder SET sys_groupid = '$sys_groupid' WHERE web_folder_id = ".$this->id; - $app->db->query($sql); + $sql = "UPDATE web_folder SET sys_groupid = ? WHERE web_folder_id = ?"; + $app->db->query($sql, $sys_groupid, $this->id); } function onAfterUpdate() { @@ -89,13 +89,13 @@ class page_action extends tform_actions { //* When the site of the web folder has been changed if(isset($this->dataRecord['parent_domain_id']) && $this->oldDataRecord['parent_domain_id'] != $this->dataRecord['parent_domain_id']) { - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->dataRecord["parent_domain_id"])); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $this->dataRecord["parent_domain_id"]); // The web folder entry shall be owned by the same group as the website $sys_groupid = $app->functions->intval($web['sys_groupid']); - $sql = "UPDATE web_folder SET sys_groupid = '$sys_groupid' WHERE web_folder_id = ".$this->id; - $app->db->query($sql); + $sql = "UPDATE web_folder SET sys_groupid = ? WHERE web_folder_id = ?"; + $app->db->query($sql, $sys_groupid, $this->id); } } diff --git a/interface/web/sites/web_folder_user_edit.php b/interface/web/sites/web_folder_user_edit.php index ec3bdd1ed..999a2824f 100644 --- a/interface/web/sites/web_folder_user_edit.php +++ b/interface/web/sites/web_folder_user_edit.php @@ -55,7 +55,7 @@ class page_action extends tform_actions { global $app, $conf; // Get the record of the parent domain - $folder = $app->db->queryOneRecord("select * FROM web_folder WHERE web_folder_id = ".$app->functions->intval(@$this->dataRecord["web_folder_id"]) . " AND ".$app->tform->getAuthSQL('r')); + $folder = $app->db->queryOneRecord("select * FROM web_folder WHERE web_folder_id = ? AND ".$app->tform->getAuthSQL('r'), @$this->dataRecord["web_folder_id"]); if(!$folder || $folder['web_folder_id'] != @$this->dataRecord['web_folder_id']) $app->tform->errorMessage .= $app->tform->lng("no_folder_perm"); // Set a few fixed values @@ -63,9 +63,9 @@ class page_action extends tform_actions { // make sure this folder/user combination does not exist already if($this->id > 0){ - $user = $app->db->queryOneRecord("SELECT * FROM web_folder_user WHERE web_folder_id = ".$this->dataRecord['web_folder_id']." AND username = '".$this->dataRecord['username']."' AND web_folder_user_id != ".$this->id); + $user = $app->db->queryOneRecord("SELECT * FROM web_folder_user WHERE web_folder_id = ? AND username = ? AND web_folder_user_id != ?", $this->dataRecord['web_folder_id'], $this->dataRecord['username'], $this->id); } else { - $user = $app->db->queryOneRecord("SELECT * FROM web_folder_user WHERE web_folder_id = ".$this->dataRecord['web_folder_id']." AND username = '".$this->dataRecord['username']."'"); + $user = $app->db->queryOneRecord("SELECT * FROM web_folder_user WHERE web_folder_id = ? AND username = ?", $this->dataRecord['web_folder_id'], $this->dataRecord['username']); } if(is_array($user) && !empty($user)) $app->tform->errorMessage .= $app->tform->lng('error_user_exists_already_txt'); @@ -75,12 +75,12 @@ class page_action extends tform_actions { function onAfterInsert() { global $app, $conf; - $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE web_folder_id = ".$app->functions->intval($this->dataRecord["web_folder_id"])); + $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE web_folder_id = ?", $this->dataRecord["web_folder_id"]); // The web folder user entry shall be owned by the same group as the web folder $sys_groupid = $app->functions->intval($folder['sys_groupid']); - $sql = "UPDATE web_folder_user SET sys_groupid = '$sys_groupid' WHERE web_folder_user_id = ".$this->id; + $sql = "UPDATE web_folder_user SET sys_groupid = ? WHERE web_folder_user_id = ?", $sys_groupid, $this->id; $app->db->query($sql); } @@ -89,13 +89,13 @@ class page_action extends tform_actions { //* When the web folder has been changed if(isset($this->dataRecord['web_folder_id']) && $this->oldDataRecord['web_folder_id'] != $this->dataRecord['web_folder_id']) { - $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE web_folder_id = ".$app->functions->intval($this->dataRecord["web_folder_id"])); + $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE web_folder_id = ?", $this->dataRecord["web_folder_id"]); // The web folder user entry shall be owned by the same group as the web folder $sys_groupid = $app->functions->intval($folder['sys_groupid']); - $sql = "UPDATE web_folder_user SET sys_groupid = '$sys_groupid' WHERE web_folder_user_id = ".$this->id; - $app->db->query($sql); + $sql = "UPDATE web_folder_user SET sys_groupid = ? WHERE web_folder_user_id = ?"; + $app->db->query($sql, $sys_groupid, $this->id); } } diff --git a/interface/web/sites/web_vhost_domain_del.php b/interface/web/sites/web_vhost_domain_del.php index 25c7425b1..125d92f8e 100644 --- a/interface/web/sites/web_vhost_domain_del.php +++ b/interface/web/sites/web_vhost_domain_del.php @@ -72,45 +72,45 @@ class page_action extends tform_actions { if($app->tform->checkPerm($this->id, 'd') == false) $app->error($app->lng('error_no_delete_permission')); //* Delete all records that belong to this web. - $records = $app->db->queryAllRecords("SELECT domain_id FROM web_domain WHERE parent_domain_id = '".$app->functions->intval($this->id)."' AND type != 'vhost'"); + $records = $app->db->queryAllRecords("SELECT domain_id FROM web_domain WHERE parent_domain_id = ? AND type != 'vhost'", $this->id); foreach($records as $rec) { $app->db->datalogDelete('web_domain', 'domain_id', $rec['domain_id']); } //* Delete all records that belong to this web. - $records = $app->db->queryAllRecords("SELECT ftp_user_id FROM ftp_user WHERE parent_domain_id = '".$app->functions->intval($this->id)."'"); + $records = $app->db->queryAllRecords("SELECT ftp_user_id FROM ftp_user WHERE parent_domain_id = ?", $this->id); foreach($records as $rec) { $app->db->datalogDelete('ftp_user', 'ftp_user_id', $rec['ftp_user_id']); } //* Delete all records that belong to this web. - $records = $app->db->queryAllRecords("SELECT shell_user_id FROM shell_user WHERE parent_domain_id = '".$app->functions->intval($this->id)."'"); + $records = $app->db->queryAllRecords("SELECT shell_user_id FROM shell_user WHERE parent_domain_id = ?", $this->id); foreach($records as $rec) { $app->db->datalogDelete('shell_user', 'shell_user_id', $rec['shell_user_id']); } //* Delete all records that belong to this web. - $records = $app->db->queryAllRecords("SELECT id FROM cron WHERE parent_domain_id = '".$app->functions->intval($this->id)."'"); + $records = $app->db->queryAllRecords("SELECT id FROM cron WHERE parent_domain_id = ?", $this->id); foreach($records as $rec) { $app->db->datalogDelete('cron', 'id', $rec['id']); } //* Delete all records that belong to this web - $records = $app->db->queryAllRecords("SELECT webdav_user_id FROM webdav_user WHERE parent_domain_id = '".$app->functions->intval($this->id)."'"); + $records = $app->db->queryAllRecords("SELECT webdav_user_id FROM webdav_user WHERE parent_domain_id = ?", $this->id); foreach($records as $rec) { $app->db->datalogDelete('webdav_user', 'webdav_user_id', $rec['webdav_user_id']); } //* Delete all records that belong to this web - $records = $app->db->queryAllRecords("SELECT backup_id FROM web_backup WHERE parent_domain_id = '".$app->functions->intval($this->id)."'"); + $records = $app->db->queryAllRecords("SELECT backup_id FROM web_backup WHERE parent_domain_id = ?", $this->id); foreach($records as $rec) { $app->db->datalogDelete('web_backup', 'backup_id', $rec['backup_id']); } //* Delete all records that belog to this web. - $web_domain = $app->db->queryOneRecord("SELECT domain FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id)); + $web_domain = $app->db->queryOneRecord("SELECT domain FROM web_domain WHERE domain_id = ?", $this->id); if($web_domain['domain'] != ''){ - $aps_instances = $app->db->queryAllRecords("SELECT instance_id FROM aps_instances_settings WHERE name = 'main_domain' AND value = '".$app->db->quote($web_domain['domain'])."'"); + $aps_instances = $app->db->queryAllRecords("SELECT instance_id FROM aps_instances_settings WHERE name = 'main_domain' AND value = ?", $web_domain['domain']); if(is_array($aps_instances) && !empty($aps_instances)){ foreach($aps_instances as $aps_instance){ if($aps_instance['instance_id'] > 0){ @@ -123,10 +123,10 @@ class page_action extends tform_actions { } //* Delete all web folders - $records = $app->db->queryAllRecords("SELECT web_folder_id FROM web_folder WHERE parent_domain_id = '".$app->functions->intval($this->id)."'"); + $records = $app->db->queryAllRecords("SELECT web_folder_id FROM web_folder WHERE parent_domain_id = ?", $this->id); foreach($records as $rec) { //* Delete all web folder users - $records2 = $app->db->queryAllRecords("SELECT web_folder_user_id FROM web_folder_user WHERE web_folder_id = '".$app->functions->intval($rec['web_folder_id'])."'"); + $records2 = $app->db->queryAllRecords("SELECT web_folder_user_id FROM web_folder_user WHERE web_folder_id = ?", $rec['web_folder_id']); foreach($records2 as $rec2) { $app->db->datalogDelete('web_folder_user', 'web_folder_user_id', $rec2['web_folder_user_id']); } diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index f53a84352..d21da2a0b 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -167,8 +167,8 @@ class page_action extends tform_actions { $web_config[$web_server_id] = $app->getconf->get_server_config($web_server_id, 'web'); } - $sql = "SELECT server_id, server_name FROM server WHERE server_id IN (" . $client['web_servers'] . ");"; - $web_servers = $app->db->queryAllRecords($sql); + $sql = "SELECT server_id, server_name FROM server WHERE server_id IN ?"; + $web_servers = $app->db->queryAllRecords($sql, $client['web_servers_ids']); $options_web_servers = ""; @@ -181,7 +181,7 @@ class page_action extends tform_actions { if($this->id > 0) { if(!isset($this->dataRecord["server_id"])){ - $tmp = $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id)); + $tmp = $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE domain_id = ?", $this->id); $this->dataRecord["server_id"] = $tmp["server_id"]; unset($tmp); } @@ -200,8 +200,8 @@ class page_action extends tform_actions { } //* Fill the IPv4 select field with the IP addresses that are allowed for this client - $sql = "SELECT ip_address FROM server_ip WHERE server_id IN (" . $client['web_servers'] . ") AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")"; - $ips = $app->db->queryAllRecords($sql); + $sql = "SELECT ip_address FROM server_ip WHERE server_id IN ? AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")"; + $ips = $app->db->queryAllRecords($sql, explode(',', $client['web_servers'])); $ip_select = ($web_config[$server_id]['enable_ip_wildcard'] == 'y')?"":""; //if(!in_array($this->dataRecord["ip_address"], $ips)) $ip_select .= "\r\n"; //$ip_select = ""; @@ -216,8 +216,8 @@ class page_action extends tform_actions { unset($ips); //* Fill the IPv6 select field with the IP addresses that are allowed for this client - $sql = "SELECT ip_address FROM server_ip WHERE server_id IN (" . $client['web_servers'] . ") AND ip_type = 'IPv6' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")"; - $ips = $app->db->queryAllRecords($sql); + $sql = "SELECT ip_address FROM server_ip WHERE server_id IN ? AND ip_type = 'IPv6' AND (client_id = 0 OR client_id=?)"; + $ips = $app->db->queryAllRecords($sql, explode(',', $client['web_servers']), $_SESSION['s']['user']['client_id']); $ip_select = ""; //$ip_select = ""; if(is_array($ips)) { @@ -237,17 +237,17 @@ class page_action extends tform_actions { if($this->_vhostdomain_type == 'domain') { if($this->dataRecord['php'] == '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 = ".($this->id > 0 ? $app->functions->intval($this->dataRecord['server_id']) : $app->functions->intval($client['default_webserver']))." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_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 = ? AND (client_id = 0 OR client_id=?)", ($this->id > 0 ? $this->dataRecord['server_id'] : $client['default_webserver']), $_SESSION['s']['user']['client_id']); } if($this->dataRecord['php'] == 'fast-cgi'){ - $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".($this->id > 0 ? $app->functions->intval($this->dataRecord['server_id']) : $app->functions->intval($client['default_webserver']))." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")"); + $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?)", ($this->id > 0 ? $this->dataRecord['server_id'] : $client['default_webserver']), $_SESSION['s']['user']['client_id']); } } else { if($this->dataRecord['php'] == '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 = ".$app->functions->intval($parent_domain['server_id'])." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_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 = ? AND (client_id = 0 OR client_id=?)", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']); } if($this->dataRecord['php'] == 'fast-cgi'){ - $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".$app->functions->intval($parent_domain['server_id'])." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")"); + $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?)", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']); } } $php_select = ""; @@ -292,8 +292,8 @@ class page_action extends tform_actions { $web_config[$web_server_id] = $app->getconf->get_server_config($web_server_id, 'web'); } - $sql = "SELECT server_id, server_name FROM server WHERE server_id IN (" . $client['web_servers'] . ");"; - $web_servers = $app->db->queryAllRecords($sql); + $sql = "SELECT server_id, server_name FROM server WHERE server_id IN ?"; + $web_servers = $app->db->queryAllRecords($sql, $client['web_servers_ids']); $options_web_servers = ""; @@ -306,9 +306,9 @@ class page_action extends tform_actions { if ($settings['use_domain_module'] != 'y') { // Fill the client select field - $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 client.company_name, client.contact_name, sys_group.name"; - $records = $app->db->queryAllRecords($sql); - $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id'])); + $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 = ? ORDER BY client.company_name, client.contact_name, sys_group.name"; + $records = $app->db->queryAllRecords($sql, $client['client_id']); + $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client['client_id']); $client_select = ''; //$tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($records)) { @@ -333,8 +333,8 @@ class page_action extends tform_actions { } //* Fill the IPv4 select field with the IP addresses that are allowed for this client - $sql = "SELECT ip_address FROM server_ip WHERE server_id IN (" . $client['web_servers'] . ") AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")"; - $ips = $app->db->queryAllRecords($sql); + $sql = "SELECT ip_address FROM server_ip WHERE server_id IN ? AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=?)"; + $ips = $app->db->queryAllRecords($sql, explode(',', $client['web_servers']), $_SESSION['s']['user']['client_id']); $ip_select = ($web_config[$server_id]['enable_ip_wildcard'] == 'y')?"":""; //if(!in_array($this->dataRecord["ip_address"], $ips)) $ip_select .= "\r\n"; //$ip_select = ""; @@ -349,8 +349,8 @@ class page_action extends tform_actions { unset($ips); //* Fill the IPv6 select field with the IP addresses that are allowed for this client - $sql = "SELECT ip_address FROM server_ip WHERE server_id IN (" . $client['web_servers'] . ") AND ip_type = 'IPv6' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")"; - $ips = $app->db->queryAllRecords($sql); + $sql = "SELECT ip_address FROM server_ip WHERE server_id IN ? AND ip_type = 'IPv6' AND (client_id = 0 OR client_id=?)"; + $ips = $app->db->queryAllRecords($sql, $client['web_servers'], $_SESSION['s']['user']['client_id']); $ip_select = ""; //$ip_select = ""; if(is_array($ips)) { @@ -367,22 +367,21 @@ class page_action extends tform_actions { $server_type = 'apache'; if(!empty($web_config[$server_id]['server_type'])) $server_type = $web_config[$server_id]['server_type']; if($server_type == 'nginx' && $this->dataRecord['php'] == 'fast-cgi') $this->dataRecord['php'] = 'php-fpm'; - $selected_client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ".$app->functions->intval($selected_client_group_id)); - //$sql_where = " AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id']." OR client_id = ".intval($selected_client['client_id']).")"; - $sql_where = " AND (client_id = 0 OR client_id = ".intval($selected_client['client_id']).")"; + $selected_client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ?", $selected_client_group_id); + $sql_where = " AND (client_id = 0 OR client_id = ?)"; if($this->_vhostdomain_type == 'domain') { if($this->dataRecord['php'] == '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 = ".($this->id > 0 ? $app->functions->intval($this->dataRecord['server_id']) : $app->functions->intval($client['default_webserver'])).$sql_where); + $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 = ?".$sql_where, ($this->id > 0 ? $this->dataRecord['server_id'] : $client['default_webserver']), $selected_client['client_id']); } if($this->dataRecord['php'] == 'fast-cgi') { - $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".($this->id > 0 ? $app->functions->intval($this->dataRecord['server_id']) : $app->functions->intval($client['default_webserver'])).$sql_where); + $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ?".$sql_where, ($this->id > 0 ? $this->dataRecord['server_id'] : $client['default_webserver']), $selected_client['client_id']); } } else { if($this->dataRecord['php'] == '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 = ".$app->functions->intval($parent_domain['server_id'])." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_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 = ? AND (client_id = 0 OR client_id=?)", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']); } if($this->dataRecord['php'] == 'fast-cgi') { - $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".$app->functions->intval($parent_domain['server_id'])." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")"); + $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ? AND (client_id = 0 OR client_id=?)", $parent_domain['server_id'], $_SESSION['s']['user']['client_id']); } } $php_select = ""; @@ -460,7 +459,7 @@ class page_action extends tform_actions { // The user is admin, so we fill in all IP addresses of the server if($this->id > 0) { if(!isset($this->dataRecord["server_id"])){ - $tmp = $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id)); + $tmp = $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE domain_id = ?", $this->id); $this->dataRecord["server_id"] = $tmp["server_id"]; unset($tmp); } @@ -483,8 +482,8 @@ class page_action extends tform_actions { } //* Fill the IPv4 select field - $sql = "SELECT ip_address FROM server_ip WHERE ip_type = 'IPv4' AND server_id = ".$app->functions->intval($server_id); - $ips = $app->db->queryAllRecords($sql); + $sql = "SELECT ip_address FROM server_ip WHERE ip_type = 'IPv4' AND server_id = ?"; + $ips = $app->db->queryAllRecords($sql, $server_id); $ip_select = ($web_config['enable_ip_wildcard'] == 'y')?"":""; //$ip_select = ""; if(is_array($ips)) { @@ -498,8 +497,8 @@ class page_action extends tform_actions { unset($ips); //* Fill the IPv6 select field - $sql = "SELECT ip_address FROM server_ip WHERE ip_type = 'IPv6' AND server_id = ".$app->functions->intval($server_id); - $ips = $app->db->queryAllRecords($sql); + $sql = "SELECT ip_address FROM server_ip WHERE ip_type = 'IPv6' AND server_id = ?"; + $ips = $app->db->queryAllRecords($sql, $server_id); $ip_select = ""; //$ip_select = ""; if(is_array($ips)) { @@ -535,22 +534,21 @@ class page_action extends tform_actions { $server_type = 'apache'; if(!empty($web_config['server_type'])) $server_type = $web_config['server_type']; if($server_type == 'nginx' && $this->dataRecord['php'] == 'fast-cgi') $this->dataRecord['php'] = 'php-fpm'; - $selected_client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ".$app->functions->intval($selected_client_group_id)); - //$sql_where = " AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id']." OR client_id = ".intval($selected_client['client_id']).")"; - $sql_where = " AND (client_id = 0 OR client_id = ".$app->functions->intval($selected_client['client_id']).")"; + $selected_client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ?", $selected_client_group_id); + $sql_where = " AND (client_id = 0 OR client_id = ?)"; if($this->_vhostdomain_type == 'domain') { if($this->dataRecord['php'] == '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".$sql_where); + $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 = ?".$sql_where, $server_id, $selected_client['client_id']); } if($this->dataRecord['php'] == 'fast-cgi') { - $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".$app->functions->intval($server_id).$sql_where); + $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ?".$sql_where, $server_id, $selected_client['client_id']); } } else { if($this->dataRecord['php'] == '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 = " . $app->functions->intval($parent_domain['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 = ?", $parent_domain['server_id']); } if($this->dataRecord['php'] == 'fast-cgi') { - $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = " . $app->functions->intval($parent_domain['server_id'])); + $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ?", $parent_domain['server_id']); } } $php_select = ""; @@ -618,7 +616,7 @@ class page_action extends tform_actions { $ssl_domain_select = ''; $ssl_domains = array(); - $tmpd = $app->db->queryAllRecords("SELECT domain, type FROM web_domain WHERE domain_id = ".$this->id." OR parent_domain_id = ".$this->id); + $tmpd = $app->db->queryAllRecords("SELECT domain, type FROM web_domain WHERE domain_id = ? OR parent_domain_id = ?", $this->id, $this->id); foreach($tmpd as $tmp) { if($tmp['type'] == 'subdomain' || $tmp['type'] == 'vhostsubdomain') { $ssl_domains[] = $tmp["domain"]; @@ -692,7 +690,7 @@ class page_action extends tform_actions { // check for configuration errors in sys_datalog if($this->id > 0) { - $datalog = $app->db->queryOneRecord("SELECT sys_datalog.error, sys_log.tstamp FROM sys_datalog, sys_log WHERE sys_datalog.dbtable = 'web_domain' AND sys_datalog.dbidx = 'domain_id:".$app->functions->intval($this->id)."' AND sys_datalog.datalog_id = sys_log.datalog_id AND sys_log.message = CONCAT('Processed datalog_id ',sys_log.datalog_id) ORDER BY sys_datalog.tstamp DESC"); + $datalog = $app->db->queryOneRecord("SELECT sys_datalog.error, sys_log.tstamp FROM sys_datalog, sys_log WHERE sys_datalog.dbtable = 'web_domain' AND sys_datalog.dbidx = ? AND sys_datalog.datalog_id = sys_log.datalog_id AND sys_log.message = CONCAT('Processed datalog_id ',sys_log.datalog_id) ORDER BY sys_datalog.tstamp DESC", 'domain_id:' . $this->id); if(is_array($datalog) && !empty($datalog)){ if(trim($datalog['error']) != ''){ $app->tpl->setVar("config_error_msg", nl2br(htmlentities($datalog['error']))); @@ -733,12 +731,12 @@ class page_action extends tform_actions { } else { // Get the record of the parent domain if(!@$this->dataRecord["parent_domain_id"] && $this->id) { - $tmp = $app->db->queryOneRecord("SELECT parent_domain_id FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id)); + $tmp = $app->db->queryOneRecord("SELECT parent_domain_id FROM web_domain WHERE domain_id = ?", $this->id); if($tmp) $this->dataRecord["parent_domain_id"] = $tmp['parent_domain_id']; unset($tmp); } - $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r')); + $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL('r'), @$this->dataRecord["parent_domain_id"]); if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm"); if($this->_vhostdomain_type == 'subdomain') { @@ -800,14 +798,6 @@ class page_action extends tform_actions { // vhostaliasdomains do not have a quota of their own $this->dataRecord["hd_quota"] = 0; - - // check for duplicate folder usage - /* - $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_domain` WHERE `type` = 'vhostalias' AND `parent_domain_id` = '" . $app->functions->intval($this->dataRecord['parent_domain_id']) . "' AND `web_folder` = '" . $app->db->quote($this->dataRecord['web_folder']) . "' AND `domain_id` != '" . $app->functions->intval($this->id) . "'"); - if($check && $check['cnt'] > 0) { - $app->tform->errorMessage .= $app->tform->lng("web_folder_unique_txt")."
"; - } - */ } } @@ -832,7 +822,7 @@ class page_action extends tform_actions { // only generate quota and traffic warnings if value has changed if($this->id > 0) { - $old_web_values = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id)); + $old_web_values = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $this->id); } else { $old_web_values = array(); } @@ -840,7 +830,7 @@ class page_action extends tform_actions { if($this->_vhostdomain_type == 'domain') { //* Check the website quota of the client if(isset($_POST["hd_quota"]) && $client["limit_web_quota"] >= 0 && $_POST["hd_quota"] != $old_web_values["hd_quota"]) { - $tmp = $app->db->queryOneRecord("SELECT sum(hd_quota) as webquota FROM web_domain WHERE domain_id != ".$app->functions->intval($this->id)." AND type = 'vhost' AND ".$app->tform->getAuthSQL('u')); + $tmp = $app->db->queryOneRecord("SELECT sum(hd_quota) as webquota FROM web_domain WHERE domain_id != ? AND type = 'vhost' AND ".$app->tform->getAuthSQL('u'), $this->id); $webquota = $tmp["webquota"]; $new_web_quota = $app->functions->intval($this->dataRecord["hd_quota"]); if(($webquota + $new_web_quota > $client["limit_web_quota"]) || ($new_web_quota < 0 && $client["limit_web_quota"] >= 0)) { @@ -857,7 +847,7 @@ class page_action extends tform_actions { //* Check the traffic quota of the client if(isset($_POST["traffic_quota"]) && $client["limit_traffic_quota"] > 0 && $_POST["traffic_quota"] != $old_web_values["traffic_quota"]) { - $tmp = $app->db->queryOneRecord("SELECT sum(traffic_quota) as trafficquota FROM web_domain WHERE domain_id != ".$app->functions->intval($this->id)." AND ".$app->tform->getAuthSQL('u')); + $tmp = $app->db->queryOneRecord("SELECT sum(traffic_quota) as trafficquota FROM web_domain WHERE domain_id != ? AND ".$app->tform->getAuthSQL('u'), $this->id); $trafficquota = $tmp["trafficquota"]; $new_traffic_quota = $app->functions->intval($this->dataRecord["traffic_quota"]); if(($trafficquota + $new_traffic_quota > $client["limit_traffic_quota"]) || ($new_traffic_quota < 0 && $client["limit_traffic_quota"] >= 0)) { @@ -873,12 +863,12 @@ class page_action extends tform_actions { if($client['parent_client_id'] > 0) { // Get the limits of the reseller - $reseller = $app->db->queryOneRecord("SELECT limit_traffic_quota, limit_web_domain, limit_web_aliasdomain, limit_web_subdomain, web_servers, limit_web_quota FROM client WHERE client_id = ".$client['parent_client_id']); + $reseller = $app->db->queryOneRecord("SELECT limit_traffic_quota, limit_web_domain, limit_web_aliasdomain, limit_web_subdomain, web_servers, limit_web_quota FROM client WHERE client_id = ?", $client['parent_client_id']); if($this->_vhostdomain_type == 'domain') { //* Check the website quota of the client if(isset($_POST["hd_quota"]) && $reseller["limit_web_quota"] >= 0 && $_POST["hd_quota"] != $old_web_values["hd_quota"]) { - $tmp = $app->db->queryOneRecord("SELECT sum(hd_quota) as webquota FROM web_domain, sys_group, client WHERE web_domain.sys_groupid=sys_group.groupid AND sys_group.client_id=client.client_id AND ".$client['parent_client_id']." IN (client.parent_client_id, client.client_id) AND domain_id != ".$app->functions->intval($this->id)." AND type = 'vhost'"); + $tmp = $app->db->queryOneRecord("SELECT sum(hd_quota) as webquota FROM web_domain, sys_group, client WHERE web_domain.sys_groupid=sys_group.groupid AND sys_group.client_id=client.client_id AND ? IN (client.parent_client_id, client.client_id) AND domain_id != ? AND type = 'vhost'", $client['parent_client_id'], $this->id); $webquota = $tmp["webquota"]; $new_web_quota = $app->functions->intval($this->dataRecord["hd_quota"]); @@ -896,7 +886,7 @@ class page_action extends tform_actions { //* Check the traffic quota of the client if(isset($_POST["traffic_quota"]) && $reseller["limit_traffic_quota"] > 0 && $_POST["traffic_quota"] != $old_web_values["traffic_quota"]) { - $tmp = $app->db->queryOneRecord("SELECT sum(traffic_quota) as trafficquota FROM web_domain, sys_group, client WHERE web_domain.sys_groupid=sys_group.groupid AND sys_group.client_id=client.client_id AND ".$client['parent_client_id']." IN (client.parent_client_id, client.client_id) AND domain_id != ".$app->functions->intval($this->id)." AND type = 'vhost'"); + $tmp = $app->db->queryOneRecord("SELECT sum(traffic_quota) as trafficquota FROM web_domain, sys_group, client WHERE web_domain.sys_groupid=sys_group.groupid AND sys_group.client_id=client.client_id AND ? IN (client.parent_client_id, client.client_id) AND domain_id != ? AND type = 'vhost'", $client['parent_client_id'], $this->id); $trafficquota = $tmp["trafficquota"]; $new_traffic_quota = $app->functions->intval($this->dataRecord["traffic_quota"]); if(($trafficquota + $new_traffic_quota > $reseller["limit_traffic_quota"]) || ($new_traffic_quota < 0 && $reseller["limit_traffic_quota"] >= 0)) { @@ -914,7 +904,7 @@ class page_action extends tform_actions { // When the record is updated if($this->id > 0) { // restore the server ID if the user is not admin and record is edited - $tmp = $app->db->queryOneRecord("SELECT server_id, `system_user`, `system_group`, `web_folder`, `cgi`, `ssi`, `perl`, `ruby`, `python`, `suexec`, `errordocs`, `subdomain`, `ssl` FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id)); + $tmp = $app->db->queryOneRecord("SELECT server_id, `system_user`, `system_group`, `web_folder`, `cgi`, `ssi`, `perl`, `ruby`, `python`, `suexec`, `errordocs`, `subdomain`, `ssl` FROM web_domain WHERE domain_id = ?", $this->id); $this->dataRecord["server_id"] = $tmp["server_id"]; $this->dataRecord['web_folder'] = $tmp['web_folder']; // cannot be changed! $this->dataRecord['system_user'] = $tmp['system_user']; @@ -943,17 +933,17 @@ class page_action extends tform_actions { // Check if the user may add another web_domain if($this->_vhostdomain_type == 'domain' && $client["limit_web_domain"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM web_domain WHERE sys_groupid = $client_group_id and type = 'vhost'"); + $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM web_domain WHERE sys_groupid = ? and type = 'vhost'", $client_group_id); if($tmp["number"] >= $client["limit_web_domain"]) { $app->error($app->tform->wordbook["limit_web_domain_txt"]); } } elseif($this->_vhostdomain_type == 'aliasdomain' && $client["limit_web_aliasdomain"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM web_domain WHERE sys_groupid = $client_group_id and (type = 'alias' OR type = 'vhostalias')"); + $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM web_domain WHERE sys_groupid = ? and (type = 'alias' OR type = 'vhostalias')", $client_group_id); if($tmp["number"] >= $client["limit_web_aliasdomain"]) { $app->error($app->tform->wordbook["limit_web_aliasdomain_txt"]); } } elseif($this->_vhostdomain_type == 'subdomain' && $client["limit_web_subdomain"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM web_domain WHERE sys_groupid = $client_group_id and (type = 'subdomain' OR type = 'vhostsubdomain')"); + $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM web_domain WHERE sys_groupid = ? and (type = 'subdomain' OR type = 'vhostsubdomain')", $client_group_id); if($tmp["number"] >= $client["limit_web_subdomain"]) { $app->error($app->tform->wordbook["limit_web_subdomain_txt"]); } @@ -980,8 +970,8 @@ class page_action extends tform_actions { $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; - $tmp = $app->db->queryOneRecord($sql); + $sql = "SELECT count(domain_id) as number FROM web_domain WHERE `ssl` = 'y' AND ip_address = ? and domain_id != ?"; + $tmp = $app->db->queryOneRecord($sql, $this->dataRecord['ip_address'], $this->id); if($tmp['number'] > 0) $app->tform->errorMessage .= $app->tform->lng("error_no_sni_txt"); } @@ -1096,11 +1086,11 @@ class page_action extends tform_actions { // also make sure that the user can not delete domain created by a admin if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) { $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); - $app->db->query("UPDATE web_domain SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE domain_id = ".$this->id); + $app->db->query("UPDATE web_domain SET sys_groupid = ?, sys_perm_group = 'ru' WHERE domain_id = ?", $client_group_id, $this->id); } if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($this->dataRecord["client_group_id"])) { $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]); - $app->db->query("UPDATE web_domain SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE domain_id = ".$this->id); + $app->db->query("UPDATE web_domain SET sys_groupid = ?, sys_perm_group = 'riud' WHERE domain_id = ?", $client_group_id, $this->id); } // Get configuration for the web system @@ -1118,47 +1108,48 @@ class page_action extends tform_actions { // get the ID of the client if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) { $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = $client_group_id"); + $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ?", $client_group_id); $client_id = $app->functions->intval($client["client_id"]); } else { //$client_id = $app->functions->intval($this->dataRecord["client_group_id"]); - $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".$app->functions->intval($this->dataRecord["client_group_id"])); + $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ?", $this->dataRecord["client_group_id"]); $client_id = $app->functions->intval($client["client_id"]); } // Set the values for document_root, system_user and system_group - $system_user = $app->db->quote('web'.$this->id); - $system_group = $app->db->quote('client'.$client_id); + $system_user = 'web'.$this->id; + $system_group = 'client'.$client_id; $document_root = str_replace("[client_id]", $client_id, $document_root); $document_root = str_replace("[client_idhash_1]", $this->id_hash($client_id, 1), $document_root); $document_root = str_replace("[client_idhash_2]", $this->id_hash($client_id, 2), $document_root); $document_root = str_replace("[client_idhash_3]", $this->id_hash($client_id, 3), $document_root); $document_root = str_replace("[client_idhash_4]", $this->id_hash($client_id, 4), $document_root); - $document_root = $app->db->quote($document_root); + $document_root = $document_root; $php_open_basedir = str_replace("[website_path]", $document_root, $web_config["php_open_basedir"]); - $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir)); - $htaccess_allow_override = $app->db->quote($web_config["htaccess_allow_override"]); + $php_open_basedir = str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir); + $htaccess_allow_override = $web_config["htaccess_allow_override"]; $added_date = date($app->lng('conf_format_dateshort')); - $added_by = $app->db->quote($_SESSION['s']['user']['username']); + $added_by = $_SESSION['s']['user']['username']; - $sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir', added_date = '$added_date', added_by = '$added_by' WHERE domain_id = ".$this->id; + $sql = "UPDATE web_domain SET system_user = ?, system_group = ?, document_root = ?, allow_override = ?, php_open_basedir = ?, added_date = ?, added_by = ? WHERE domain_id = ?"; + $app->db->query($sql, $system_user, $system_group, $document_root, $htaccess_allow_override, $php_open_basedir, $added_date, $added_by, $this->id); } else { // Set the values for document_root, system_user and system_group - $system_user = $app->db->quote($this->parent_domain_record['system_user']); - $system_group = $app->db->quote($this->parent_domain_record['system_group']); - $document_root = $app->db->quote($this->parent_domain_record['document_root']); + $system_user = $this->parent_domain_record['system_user']; + $system_group = $this->parent_domain_record['system_group']; + $document_root = $this->parent_domain_record['document_root']; $php_open_basedir = str_replace("[website_path]/web", $document_root.'/'.$web_rec['web_folder'], $web_config["php_open_basedir"]); $php_open_basedir = str_replace("[website_domain]/web", $web_rec['domain'].'/'.$web_rec['web_folder'], $php_open_basedir); $php_open_basedir = str_replace("[website_path]", $document_root, $php_open_basedir); - $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir)); - $htaccess_allow_override = $app->db->quote($this->parent_domain_record['allow_override']); + $php_open_basedir = str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir); + $htaccess_allow_override = $this->parent_domain_record['allow_override']; $added_date = date($app->lng('conf_format_dateshort')); - $added_by = $app->db->quote($_SESSION['s']['user']['username']); - - $sql = "UPDATE web_domain SET sys_groupid = ".$app->functions->intval($this->parent_domain_record['sys_groupid']).",system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir', added_date = '$added_date', added_by = '$added_by' WHERE domain_id = ".$this->id; + $added_by = $_SESSION['s']['user']['username']; + + $sql = "UPDATE web_domain SET sys_groupid = ?, system_user = ?, system_group = ?, document_root = ?, allow_override = ?, php_open_basedir = ?, added_date = ?, added_by = ? WHERE domain_id = ?"; + $app->db->query($sql, $this->parent_domain_record['sys_groupid'], $system_user, $system_group, $document_root, $htaccess_allow_override, $php_open_basedir, $added_date, $added_by, $this->id); } - $app->db->query($sql); } function onBeforeUpdate () { @@ -1169,7 +1160,7 @@ class page_action extends tform_actions { // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) { if (isset($this->dataRecord["server_id"])) { - $rec = $app->db->queryOneRecord("SELECT server_id from web_domain WHERE domain_id = ".$this->id); + $rec = $app->db->queryOneRecord("SELECT server_id from web_domain WHERE domain_id = ?", $this->id); if($rec['server_id'] != $this->dataRecord["server_id"]) { //* Add a error message and switch back to old server $app->tform->errorMessage .= $app->lng('The Server can not be changed.'); @@ -1180,7 +1171,7 @@ class page_action extends tform_actions { //* If the user is neither admin nor reseller } else { //* We do not allow users to change a domain which has been created by the admin - $rec = $app->db->queryOneRecord("SELECT sys_perm_group, domain, ip_address, ipv6_address from web_domain WHERE domain_id = ".$this->id); + $rec = $app->db->queryOneRecord("SELECT sys_perm_group, domain, ip_address, ipv6_address from web_domain WHERE domain_id = ?", $this->id); if(isset($this->dataRecord["domain"]) && $rec['domain'] != $this->dataRecord["domain"] && $app->tform->checkPerm($this->id, 'u')) { //* Add a error message and switch back to old server $app->tform->errorMessage .= $app->lng('The Domain can not be changed. Please ask your Administrator if you want to change the domain name.'); diff --git a/interface/web/sites/webdav_user_edit.php b/interface/web/sites/webdav_user_edit.php index 174383bf0..42c75ca7e 100644 --- a/interface/web/sites/webdav_user_edit.php +++ b/interface/web/sites/webdav_user_edit.php @@ -102,7 +102,7 @@ class page_action extends tform_actions { global $app, $conf; /* Get the record of the parent domain */ - $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r')); + $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ? AND ".$app->tform->getAuthSQL('r'), @$this->dataRecord["parent_domain_id"]); if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm"); /* @@ -145,7 +145,7 @@ class page_action extends tform_actions { function onAfterInsert() { global $app, $conf; - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->dataRecord["parent_domain_id"])); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $this->dataRecord["parent_domain_id"]); $server_id = $app->functions->intval($web["server_id"]); // The webdav user shall be owned by the same group then the website @@ -157,8 +157,8 @@ class page_action extends tform_actions { $hash = md5($this->dataRecord["username"] . ':' . $this->dataRecord["dir"] . ':' . $this->dataRecord["password"]); $this->dataRecord["password"] = $hash; - $sql = "UPDATE webdav_user SET server_id = ".$server_id.", sys_groupid = '".$sys_groupid."', password = '".$this->dataRecord["password"]."' WHERE webdav_user_id = ".$this->id; - $app->db->query($sql); + $sql = "UPDATE webdav_user SET server_id = ?, sys_groupid = ?, password = ? WHERE webdav_user_id = ?"; + $app->db->query($sql, $server_id, $sys_groupid, $this->dataRecord["password"], $this->id); } @@ -169,7 +169,7 @@ class page_action extends tform_actions { * we can not change the username and the dir, so get the "old" - data from the db * and set it */ - $data = $app->db->queryOneRecord("SELECT * FROM webdav_user WHERE webdav_user_id = ".$app->functions->intval($this->id)); + $data = $app->db->queryOneRecord("SELECT * FROM webdav_user WHERE webdav_user_id = ?", $this->id); $this->dataRecord["username"] = $data['username']; $this->dataRecord["dir"] = $data['dir']; $this->dataRecord['username_prefix'] = $data['username_prefix']; @@ -183,14 +183,14 @@ class page_action extends tform_actions { //* When the site of the webdav user has been changed if(isset($this->dataRecord['parent_domain_id']) && $this->oldDataRecord['parent_domain_id'] != $this->dataRecord['parent_domain_id']) { - $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval($this->dataRecord["parent_domain_id"])); + $web = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $this->dataRecord["parent_domain_id"]); $server_id = $app->functions->intval($web["server_id"]); // The webdav user shall be owned by the same group then the website $sys_groupid = $app->functions->intval($web['sys_groupid']); - $sql = "UPDATE webdav_user SET server_id = $server_id, sys_groupid = '$sys_groupid' WHERE webdav_user_id = ".$this->id; - $app->db->query($sql); + $sql = "UPDATE webdav_user SET server_id = ?, sys_groupid = ? WHERE webdav_user_id = ?"; + $app->db->query($sql, $server_id, $sys_groupid, $this->id); } /* @@ -200,7 +200,7 @@ class page_action extends tform_actions { if ((isset($this->dataRecord["password"])) && ($this->dataRecord["password"] != '') && ($this->dataRecord["password"] != $this->dataRecord['passwordOld'])) { $hash = md5($this->dataRecord["username"] . ':' . $this->dataRecord["dir"] . ':' . $this->dataRecord["password"]); $this->dataRecord["password"] = $hash; - $app->db->query("UPDATE webdav_user SET password = '".$this->dataRecord["password"]."' WHERE webdav_user_id = ".$this->id); + $app->db->query("UPDATE webdav_user SET password = ? WHERE webdav_user_id = ?", $this->dataRecord["password"], $this->id); } } diff --git a/interface/web/tools/import_ispconfig.php b/interface/web/tools/import_ispconfig.php index 75e59929d..0998d1840 100644 --- a/interface/web/tools/import_ispconfig.php +++ b/interface/web/tools/import_ispconfig.php @@ -143,7 +143,7 @@ function start_domain_import($mail_domain) { //* Get the user and groupid for the new records $sys_groupid = $app->functions->intval($_POST['client_group_id']); - $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = $sys_groupid"); + $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $sys_groupid); $sys_userid = $app->functions->intval($tmp['userid']); unset($tmp); if($sys_groupid == 0) $error .= 'Inavlid groupid
'; @@ -159,7 +159,7 @@ function start_domain_import($mail_domain) { $mail_domain_rec = $client->mail_domain_get($remote_session_id, array('domain' => $mail_domain)); if(is_array($mail_domain_rec)) { $mail_domain_rec = $mail_domain_rec[0]; - $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM mail_domain WHERE domain = '".$app->db->quote($mail_domain)."'"); + $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM mail_domain WHERE domain = ?", $mail_domain); if($tmp['number'] > 0) $error .= 'Domain '.$mail_domain.' exists already in local database.
'; unset($tmp); @@ -182,7 +182,7 @@ function start_domain_import($mail_domain) { $mail_users = $client->mail_user_get($remote_session_id, array('email' => '%@'.$mail_domain)); if(is_array($mail_users)) { foreach($mail_users as $mail_user) { - $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE email = '".$app->db->quote($mail_user['email'])."'"); + $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE email = ?", $mail_user['email']); if($tmp['number'] == 0) { //* Prepare record @@ -229,7 +229,7 @@ function start_domain_import($mail_domain) { $mail_aliases = $client->mail_alias_get($remote_session_id, array('type' => 'alias', 'destination' => '%@'.$mail_domain)); if(is_array($mail_aliases)) { foreach($mail_aliases as $mail_alias) { - $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE `type` = 'alias' AND source = '".$app->db->quote($mail_alias['source'])."' AND destination = '".$app->db->quote($mail_alias['destination'])."'"); + $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE `type` = 'alias' AND source = ? AND destination = ?", $mail_alias['source'], $mail_alias['destination']); if($tmp['number'] == 0) { $mail_alias['sys_userid'] = $sys_userid; $mail_alias['sys_groupid'] = $sys_groupid; @@ -250,7 +250,7 @@ function start_domain_import($mail_domain) { $mail_aliases = $client->mail_alias_get($remote_session_id, array('type' => 'aliasdomain', 'destination' => '@'.$mail_domain)); if(is_array($mail_aliases)) { foreach($mail_aliases as $mail_alias) { - $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE `type` = 'aliasdomain' AND source = '".$app->db->quote($mail_alias['source'])."' AND destination = '".$app->db->quote($mail_alias['destination'])."'"); + $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE `type` = 'aliasdomain' AND source = ? AND destination = ?", $mail_alias['source'], $mail_alias['destination']); if($tmp['number'] == 0) { $mail_alias['sys_userid'] = $sys_userid; $mail_alias['sys_groupid'] = $sys_groupid; @@ -271,7 +271,7 @@ function start_domain_import($mail_domain) { $mail_forwards = $client->mail_forward_get($remote_session_id, array('type' => 'forward', 'source' => '%@'.$mail_domain)); if(is_array($mail_forwards)) { foreach($mail_forwards as $mail_forward) { - $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE `type` = 'forward' AND source = '".$app->db->quote($mail_forward['source'])."' AND destination = '".$app->db->quote($mail_forward['destination'])."'"); + $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE `type` = 'forward' AND source = ? AND destination = ?", $mail_forward['source'], $mail_forward['destination']); if($tmp['number'] == 0) { $mail_forward['sys_userid'] = $sys_userid; $mail_forward['sys_groupid'] = $sys_groupid; @@ -292,7 +292,7 @@ function start_domain_import($mail_domain) { $mail_spamfilters = $client->mail_spamfilter_user_get($remote_session_id, array('email' => '%@'.$mail_domain)); if(is_array($mail_spamfilters)) { foreach($mail_spamfilters as $mail_spamfilter) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM spamfilter_users WHERE email = '".$app->db->quote($mail_spamfilter['email'])."'"); + $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM spamfilter_users WHERE email = ?", $mail_spamfilter['email']); if($tmp['number'] == 0) { $mail_spamfilter['sys_userid'] = $sys_userid; $mail_spamfilter['sys_groupid'] = $sys_groupid; diff --git a/interface/web/tools/import_vpopmail.php b/interface/web/tools/import_vpopmail.php index b5db9affb..8f4334d1f 100644 --- a/interface/web/tools/import_vpopmail.php +++ b/interface/web/tools/import_vpopmail.php @@ -121,14 +121,14 @@ function start_import() { $groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('".$app->db->quote($pw_domain)."','',".$client_id.")", 'groupid'); $groups = $groupid; - $username = $app->db->quote($pw_domain); + $username = $pw_domain; $password = $pw_crypt_password; $modules = $conf['interface_modules_enabled']; $startmodule = 'dashboard'; - $usertheme = $app->db->quote('default'); + $usertheme = 'default'; $type = 'user'; $active = 1; - $language = $app->db->quote($conf["language"]); + $language = $conf["language"]; //$password = $app->auth->crypt_password($password); // Create the controlpaneluser for the client diff --git a/interface/web/vm/openvz_action.php b/interface/web/vm/openvz_action.php index 6e090d746..757f55e8b 100644 --- a/interface/web/vm/openvz_action.php +++ b/interface/web/vm/openvz_action.php @@ -17,7 +17,7 @@ $notify_msg = ''; if($vm_id == 0) die('Invalid VM ID'); -$vm = $app->db->queryOneRecord("SELECT server_id, veid FROM openvz_vm WHERE vm_id = $vm_id"); +$vm = $app->db->queryOneRecord("SELECT server_id, veid FROM openvz_vm WHERE vm_id = ?", $vm_id); $veid = $app->functions->intval($vm['veid']); $server_id = $app->functions->intval($vm['server_id']); @@ -47,15 +47,8 @@ if($action == 'show') { //* Start the virtual machine $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . - "VALUES (". - (int)$server_id . ", ". - time() . ", ". - "'openvz_start_vm', ". - $veid.", ". - "'pending', ". - "''". - ")"; - $app->db->query($sql); + "VALUES (?, UNIX_TIMESTAMP(), 'openvz_start_vm', ?, 'pending', '')"; + $app->db->query($sql, $server_id, $veid); $app->tpl->setVar('msg', $wb['start_exec_txt']); $options['start_option_enabled'] = 'checked="checked"'; @@ -64,15 +57,8 @@ if($action == 'show') { //* Stop the virtual machine $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . - "VALUES (". - (int)$server_id . ", ". - time() . ", ". - "'openvz_stop_vm', ". - $veid.", ". - "'pending', ". - "''". - ")"; - $app->db->query($sql); + "VALUES (?, UNIX_TIMESTAMP(), 'openvz_stop_vm', ?, 'pending', '')"; + $app->db->query($sql, $server_id, $veid); $app->tpl->setVar('msg', $wb['stop_exec_txt']); $options['stop_option_enabled'] = 'checked="checked"'; @@ -81,15 +67,8 @@ if($action == 'show') { //* Restart the virtual machine $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . - "VALUES (". - (int)$server_id . ", ". - time() . ", ". - "'openvz_restart_vm', ". - $veid.", ". - "'pending', ". - "''". - ")"; - $app->db->query($sql); + "VALUES (?, UNIX_TIMESTAMP(), 'openvz_restart_vm', ?, 'pending', '')"; + $app->db->query($sql, $server_id, $veid); $app->tpl->setVar('msg', $wb['restart_exec_txt']); $options['restart_option_enabled'] = 'checked="checked"'; @@ -104,30 +83,22 @@ if($action == 'show') { } //* Quote name - $ostemplate_name = $app->db->quote($ostemplate_name); //* Check for duplicates - $tmp = $app->db->queryOneRecord("SELECT count(ostemplate_id) as number FROM openvz_ostemplate WHERE template_file = '$ostemplate_name'"); + $tmp = $app->db->queryOneRecord("SELECT count(ostemplate_id) as number FROM openvz_ostemplate WHERE template_file = ?", $ostemplate_name); if($tmp['number'] > 0) $error_msg .= $wb['ostemplate_name_unique_error'].'
'; unset($tmp); if($error_msg == '') { //* Create ostemplate action $sql = "INSERT INTO sys_remoteaction (server_id, tstamp, action_type, action_param, action_state, response) " . - "VALUES (". - (int)$server_id . ", ". - time() . ", ". - "'openvz_create_ostpl', ". - "'".$veid.":".$ostemplate_name."', ". - "'pending', ". - "''". - ")"; - $app->db->query($sql); + "VALUES (?, UNIX_TIMESTAMP(), 'openvz_create_ostpl', ?, 'pending', '')"; + $app->db->query($sql, $server_id, $veid.":".$ostemplate_name); //* Create a record in the openvz_ostemplate table $sql = "INSERT INTO `openvz_ostemplate` (`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `template_name`, `template_file`, `server_id`, `allservers`, `active`, `description`) - VALUES(1, 1, 'riud', 'riud', '', '$ostemplate_name', '$ostemplate_name', $server_id, 'n', 'y', '')"; - $app->db->query($sql); + VALUES(1, 1, 'riud', 'riud', '', ?, ?, ?, 'n', 'y', '')"; + $app->db->query($sql, $ostemplate_name, $ostemplate_name, $server_id); $app->tpl->setVar('msg', $wb['ostemplate_exec_txt']); $options['ostemplate_option_enabled'] = 'checked="checked"'; diff --git a/interface/web/vm/openvz_template_edit.php b/interface/web/vm/openvz_template_edit.php index ec520d04d..097e55bb8 100644 --- a/interface/web/vm/openvz_template_edit.php +++ b/interface/web/vm/openvz_template_edit.php @@ -54,10 +54,7 @@ class page_action extends tform_actions { function onAfterInsert() { global $app, $conf; - $guar_ram = $app->functions->intval($this->dataRecord['ram']*256); - $burst_ram = $app->functions->intval($this->dataRecord['ram_burst']*256); - $sql = "UPDATE openvz_template SET shmpages = '$guar_ram:$guar_ram',vmguarpages = '$guar_ram:$guar_ram', oomguarpages = '$guar_ram:$guar_ram',privvmpages = '$burst_ram:$burst_ram' WHERE template_id = $this->id"; - $app->db->query($sql); + $this->onAfterUpdate(); } function onAfterUpdate() { @@ -65,8 +62,8 @@ class page_action extends tform_actions { $guar_ram = $app->functions->intval($this->dataRecord['ram']*256); $burst_ram = $app->functions->intval($this->dataRecord['ram_burst']*256); - $sql = "UPDATE openvz_template SET shmpages = '$guar_ram:$guar_ram',vmguarpages = '$guar_ram:$guar_ram', oomguarpages = '$guar_ram:$guar_ram',privvmpages = '$burst_ram:$burst_ram' WHERE template_id = $this->id"; - $app->db->query($sql); + $sql = "UPDATE openvz_template SET shmpages = ?,vmguarpages = ?, oomguarpages = ?,privvmpages = ? WHERE template_id = ?"; + $app->db->query($sql, $guar_ram . ':' . $guar_ram, $guar_ram . ':' . $guar_ram, $guar_ram . ':' . $guar_ram, $burst_ram . ':' . $burst_ram, $this->id); } } diff --git a/interface/web/vm/openvz_vm_edit.php b/interface/web/vm/openvz_vm_edit.php index d6f06db3e..fc8b66dcb 100644 --- a/interface/web/vm/openvz_vm_edit.php +++ b/interface/web/vm/openvz_vm_edit.php @@ -80,9 +80,9 @@ class page_action extends tform_actions { if($client['limit_openvz_vm_template_id'] == 0) { $sql = 'SELECT template_id,template_name FROM openvz_template WHERE 1 ORDER BY template_name'; } else { - $sql = 'SELECT template_id,template_name FROM openvz_template WHERE template_id = '.$app->functions->intval($client['limit_openvz_vm_template_id']).' ORDER BY template_name'; + $sql = 'SELECT template_id,template_name FROM openvz_template WHERE template_id = ? ORDER BY template_name'; } - $records = $app->db->queryAllRecords($sql); + $records = $app->db->queryAllRecords($sql, $client['limit_openvz_vm_template_id']); if(is_array($records)) { foreach( $records as $rec) { $selected = @($rec["template_id"] == $this->dataRecord["template_id"])?'SELECTED':''; @@ -100,9 +100,9 @@ class page_action extends tform_actions { //* Fill the client select field - $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 = ".$app->functions->intval($client['client_id'])." ORDER BY client.company_name, client.contact_name, sys_group.name"; - $records = $app->db->queryAllRecords($sql); - $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id'])); + $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 = ? ORDER BY client.company_name, client.contact_name, sys_group.name"; + $records = $app->db->queryAllRecords($sql, $client['client_id']); + $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client['client_id']); $client_select = ''; //$tmp_data_record = $app->tform->getDataRecord($this->id); if(is_array($records)) { @@ -117,9 +117,9 @@ class page_action extends tform_actions { if($client['limit_openvz_vm_template_id'] == 0) { $sql = 'SELECT template_id,template_name FROM openvz_template WHERE 1 ORDER BY template_name'; } else { - $sql = 'SELECT template_id,template_name FROM openvz_template WHERE template_id = '.$app->functions->intval($client['limit_openvz_vm_template_id']).' ORDER BY template_name'; + $sql = 'SELECT template_id,template_name FROM openvz_template WHERE template_id = ? ORDER BY template_name'; } - $records = $app->db->queryAllRecords($sql); + $records = $app->db->queryAllRecords($sql, $client['limit_openvz_vm_template_id']); if(is_array($records)) { foreach( $records as $rec) { $selected = @($rec["template_id"] == $this->dataRecord["template_id"])?'SELECTED':''; @@ -166,8 +166,8 @@ class page_action extends tform_actions { $tmp = $app->db->queryOneRecord('SELECT server_id FROM server WHERE vserver_server = 1 AND mirror_server_id = 0 ORDER BY server_name LIMIT 0,1'); $vm_server_id = $app->functions->intval($tmp['server_id']); } - $sql = "SELECT ip_address FROM openvz_ip WHERE reserved = 'n' AND (vm_id = 0 or vm_id = '".$this->id."') AND server_id = ".$app->functions->intval($vm_server_id)." ORDER BY ip_address"; - $ips = $app->db->queryAllRecords($sql); + $sql = "SELECT ip_address FROM openvz_ip WHERE reserved = 'n' AND (vm_id = 0 or vm_id = ?) AND server_id = ? ORDER BY ip_address"; + $ips = $app->db->queryAllRecords($sql, $this->id, $vm_server_id); $ip_select = ""; if(is_array($ips)) { foreach( $ips as $ip) { diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php index 213712acd..dc2b0160e 100755 --- a/server/lib/app.inc.php +++ b/server/lib/app.inc.php @@ -151,7 +151,7 @@ class app { if(isset($this->dbmaster)) { $server_id = $conf['server_id']; $loglevel = $priority; - $message = $this->dbmaster->quote($msg); + $message = $msg; $datalog_id = (isset($this->modules->current_datalog_id) && $this->modules->current_datalog_id > 0)?$this->modules->current_datalog_id:0; if($datalog_id > 0) { $tmp_rec = $this->dbmaster->queryOneRecord("SELECT count(syslog_id) as number FROM sys_log WHERE datalog_id = ? AND loglevel = ?", $datalog_id, LOGLEVEL_ERROR); diff --git a/server/lib/classes/cron.d/500-backup.inc.php b/server/lib/classes/cron.d/500-backup.inc.php index 81f806436..6b200989f 100644 --- a/server/lib/classes/cron.d/500-backup.inc.php +++ b/server/lib/classes/cron.d/500-backup.inc.php @@ -130,8 +130,6 @@ class cronjob_backup extends cronjob { 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'); $filesize = filesize($web_backup_dir.'/'.$web_backup_file); $sql = "INSERT INTO web_backup (server_id, parent_domain_id, backup_type, backup_mode, tstamp, filename, filesize) VALUES (?, ?, ?, ?, ?, ?, ?)"; $app->db->query($sql, $conf['server_id'], $web_id, 'web', $backup_mode, time(), $web_backup_file, $filesize); @@ -160,10 +158,6 @@ class cronjob_backup extends cronjob { for ($n = $backup_copies; $n <= 10; $n++) { if(isset($files[$n]) && is_file($web_backup_dir.'/'.$files[$n])) { unlink($web_backup_dir.'/'.$files[$n]); - //$sql = "SELECT backup_id FROM web_backup WHERE server_id = ".$conf['server_id']." AND parent_domain_id = $web_id AND filename = '".$app->db->quote($files[$n])."'"; - //$tmp = $app->dbmaster->queryOneRecord($sql); - //$app->dbmaster->datalogDelete('web_backup', 'backup_id', $tmp['backup_id']); - //$sql = "DELETE FROM web_backup WHERE backup_id = ".intval($tmp['backup_id']); $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; $app->db->query($sql, $conf['server_id'], $web_id, $files[$n]); if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id, $files[$n]); @@ -247,8 +241,6 @@ class cronjob_backup extends cronjob { 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'); $filesize = filesize($db_backup_dir.'/'.$db_backup_file.'.gz'); $sql = "INSERT INTO web_backup (server_id, parent_domain_id, backup_type, backup_mode, tstamp, filename, filesize) VALUES (?, ?, ?, ?, ?, ?, ?)"; $app->db->query($sql, $conf['server_id'], $web_id, 'mysql', 'sqlgz', time(), $db_backup_file.'.gz', $filesize); @@ -281,9 +273,6 @@ class cronjob_backup extends cronjob { for ($n = $backup_copies; $n <= 10; $n++) { if(isset($filelist[$n]) && is_file($db_backup_dir.'/'.$filelist[$n])) { unlink($db_backup_dir.'/'.$filelist[$n]); - //$sql = "SELECT backup_id FROM web_backup WHERE server_id = ".$conf['server_id']." AND parent_domain_id = $web_id AND filename = '".$app->db->quote($filelist[$n])."'"; - //$tmp = $app->dbmaster->queryOneRecord($sql); - //$sql = "DELETE FROM web_backup WHERE backup_id = ".intval($tmp['backup_id']); $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; $app->db->query($sql, $conf['server_id'], $web_id, $filelist[$n]); if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id, $filelist[$n]); diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index 8075d1f1f..218f1d304 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -615,20 +615,26 @@ class db extends mysqli if(is_array($insert_data)) { $key_str = ''; $val_str = ''; + $params = array($tablename); + $v_params = array(); foreach($insert_data as $key => $val) { - $key_str .= "`".$key ."`,"; - $val_str .= "'".$this->escape($val)."',"; + $key_str .= '??,' + $params[] = $key; + + $val_str .= '?,'; + $v_params[] = $val; } $key_str = substr($key_str, 0, -1); $val_str = substr($val_str, 0, -1); $insert_data_str = '('.$key_str.') VALUES ('.$val_str.')'; + $this->query("INSERT INTO ?? $insert_data_str", true, $params + $v_params); } else { + /* TODO: deprecate this method! */ $insert_data_str = $insert_data; + $this->query("INSERT INTO ?? $insert_data_str", $tablename); } - /* TODO: reduce risk of insert_data_str! */ - + $old_rec = array(); - $this->query("INSERT INTO ?? $insert_data_str", $tablename); $index_value = $this->insertID(); $new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ? = ?", $tablename, $index_field, $index_value); $this->datalogSave($tablename, 'INSERT', $index_field, $index_value, $old_rec, $new_rec); @@ -643,17 +649,23 @@ class db extends mysqli $old_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value); if(is_array($update_data)) { + $params = array($tablename); $update_data_str = ''; foreach($update_data as $key => $val) { - $update_data_str .= "`".$key ."` = '".$this->escape($val)."',"; + $update_data_str .= '?? = ?,'; + $params[] = $key; + $params[] = $val; } + $params[] = $index_field; + $params[] = $index_value; $update_data_str = substr($update_data_str, 0, -1); + $this->query("UPDATE ?? SET $update_data_str WHERE ?? = ?", true, $params); } else { + /* TODO: deprecate this method! */ $update_data_str = $update_data; + $this->query("UPDATE ?? SET $update_data_str WHERE ?? = ?", $tablename, $index_field, $index_value); } - /* TODO: reduce risk of update_data_str */ - $this->query("UPDATE ?? SET $update_data_str WHERE ?? = ?", $tablename, $index_field, $index_value); $new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value); $this->datalogSave($tablename, 'UPDATE', $index_field, $index_value, $old_rec, $new_rec, $force_update); @@ -676,7 +688,7 @@ class db extends mysqli public function datalogError($errormsg) { global $app; - if(isset($app->modules->current_datalog_id) && $app->modules->current_datalog_id > 0) $this->query("UPDATE sys_datalog set error = '".$this->quote($errormsg)."' WHERE datalog_id = ".$app->modules->current_datalog_id); + if(isset($app->modules->current_datalog_id) && $app->modules->current_datalog_id > 0) $this->query("UPDATE sys_datalog set error = ? WHERE datalog_id = ?", $errormsg, $app->modules->current_datalog_id); return true; } diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index d742c428b..1676a1a7a 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -108,23 +108,27 @@ class apache2_plugin { * php_version -> php ini path that changed (additional php versions) */ + $param = ''; $qrystr = "SELECT * FROM web_domain WHERE custom_php_ini != ''"; if($data['mode'] == 'mod') { $qrystr .= " AND php = 'mod'"; } elseif($data['mode'] == 'fast-cgi') { $qrystr .= " AND php = 'fast-cgi'"; if($data['php_version']) { - $qrystr .= " AND fastcgi_php_version LIKE '%:" . $app->db->quote($data['php_version']) . "'"; + $qrystr .= " AND fastcgi_php_version LIKE ?"; + $param = '%:' . $data['php_version']; } } elseif($data['mode'] == 'php-fpm') { $qrystr .= " AND php = 'php-fpm'"; if($data['php_version']) { - $qrystr .= " AND fastcgi_php_version LIKE '%:" . $app->db->quote($data['php_version']) . ":%'"; + $qrystr .= " AND fastcgi_php_version LIKE ?"; + $param = '%:' . $data['php_version'] . ':%'; } } elseif($data['mode'] == 'hhvm') { $qrystr .= " AND php = 'hhvm'"; if($data['php_version']) { - $qrystr .= " AND fastcgi_php_version LIKE '%:" . $app->db->quote($data['php_version']) . ":%'"; + $qrystr .= " AND fastcgi_php_version LIKE ?"; + $param = '%:' . $data['php_version'] . ':%'; } } else { $qrystr .= " AND php != 'mod' AND php != 'fast-cgi'"; @@ -132,7 +136,7 @@ class apache2_plugin { //** Get all the webs - $web_domains = $app->db->queryAllRecords($qrystr); + $web_domains = $app->db->queryAllRecords($qrystr, $param); foreach($web_domains as $web_data) { $custom_php_ini_dir = $web_config['website_basedir'].'/conf/'.$web_data['system_user']; $web_folder = 'web'; @@ -303,15 +307,15 @@ class apache2_plugin { $app->system->chmod($key_file2, 0400); @$app->system->unlink($config_file); @$app->system->unlink($rand_file); - $ssl_request = $app->db->quote($app->system->file_get_contents($csr_file)); - $ssl_cert = $app->db->quote($app->system->file_get_contents($crt_file)); - $ssl_key2 = $app->db->quote($app->system->file_get_contents($key_file2)); + $ssl_request = $app->system->file_get_contents($csr_file); + $ssl_cert = $app->system->file_get_contents($crt_file); + $ssl_key2 = $app->system->file_get_contents($key_file2); /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET ssl_request = '$ssl_request', ssl_cert = '$ssl_cert', ssl_key = '$ssl_key2' WHERE domain = '".$data['new']['domain']."'"); - $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->db->query("UPDATE web_domain SET ssl_request = ?, ssl_cert = ?, ssl_key = ? WHERE domain = ?", $ssl_request, $ssl_cert, $ssl_key2, $data['new']['domain']); + $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE web_domain SET ssl_request = '$ssl_request', ssl_cert = '$ssl_cert', ssl_key = '$ssl_key2' WHERE domain = '".$data['new']['domain']."'"); - $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->dbmaster->query("UPDATE web_domain SET ssl_request = ?, ssl_cert = ?, ssl_key = ? WHERE domain = ?", $ssl_request, $ssl_cert, $ssl_key2, $data['new']['domain']); + $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); } //* Save a SSL certificate to disk @@ -355,18 +359,18 @@ class apache2_plugin { $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)); + $ssl_key2 = $app->system->file_get_contents($key_file2); /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET ssl_key = '$ssl_key2' WHERE domain = '".$data['new']['domain']."'"); + $app->db->query("UPDATE web_domain SET ssl_key = ? WHERE domain = ?", $ssl_key2, $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE web_domain SET ssl_key = '$ssl_key2' WHERE domain = '".$data['new']['domain']."'"); + $app->dbmaster->query("UPDATE web_domain SET ssl_key = ? WHERE domain = ?", $ssl_key2, $data['new']['domain']); } /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); $app->log('Saving SSL Cert for: '.$domain, LOGLEVEL_DEBUG); } @@ -386,11 +390,11 @@ class apache2_plugin { $app->system->unlink($crt_file); $app->system->unlink($bundle_file); /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '' WHERE domain = '".$data['new']['domain']."'"); - $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '' WHERE domain = ?", $data['new']['domain']); + $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '' WHERE domain = '".$data['new']['domain']."'"); - $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '' WHERE domain = ?", $data['new']['domain']); + $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); $app->log('Deleting SSL Cert for: '.$domain, LOGLEVEL_DEBUG); } @@ -420,7 +424,7 @@ class apache2_plugin { // If the parent_domain_id has been changed, we will have to update the old site as well. if($this->action == 'update' && $data['new']['parent_domain_id'] != $data['old']['parent_domain_id']) { - $tmp = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = '.$old_parent_domain_id." AND active = 'y'"); + $tmp = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = ? AND active = ?', $old_parent_domain_id, 'y'); $data['new'] = $tmp; $data['old'] = $tmp; $this->action = 'update'; @@ -428,7 +432,7 @@ class apache2_plugin { } // This is not a vhost, so we need to update the parent record instead. - $tmp = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = '.$new_parent_domain_id." AND active = 'y'"); + $tmp = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = ? AND active = ', $new_parent_domain_id, 'y'); $data['new'] = $tmp; $data['old'] = $tmp; $this->action = 'update'; @@ -466,7 +470,7 @@ class apache2_plugin { $old_log_folder = 'log'; if($data['new']['type'] == 'vhostsubdomain' || $data['new']['type'] == 'vhostalias') { // new one - $tmp = $app->db->queryOneRecord('SELECT `domain` FROM web_domain WHERE domain_id = '.intval($data['new']['parent_domain_id'])); + $tmp = $app->db->queryOneRecord('SELECT `domain` FROM web_domain WHERE domain_id = ?', $data['new']['parent_domain_id']); $subdomain_host = preg_replace('/^(.*)\.' . preg_quote($tmp['domain'], '/') . '$/', '$1', $data['new']['domain']); if($subdomain_host == '') $subdomain_host = 'web'.$data['new']['domain_id']; $web_folder = $data['new']['web_folder']; @@ -475,7 +479,7 @@ class apache2_plugin { if(isset($data['old']['parent_domain_id'])) { // old one - $tmp = $app->db->queryOneRecord('SELECT `domain` FROM web_domain WHERE domain_id = '.intval($data['old']['parent_domain_id'])); + $tmp = $app->db->queryOneRecord('SELECT `domain` FROM web_domain WHERE domain_id = ?', $data['old']['parent_domain_id']); $subdomain_host = preg_replace('/^(.*)\.' . preg_quote($tmp['domain'], '/') . '$/', '$1', $data['old']['domain']); if($subdomain_host == '') $subdomain_host = 'web'.$data['old']['domain_id']; $old_web_folder = $data['old']['web_folder']; @@ -529,7 +533,7 @@ class apache2_plugin { if($this->action == 'update' && $data['new']['document_root'] != $data['old']['document_root']) { //* Get the old client ID - $old_client = $app->dbmaster->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = '.intval($data['old']['sys_groupid'])); + $old_client = $app->dbmaster->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = ?', $data['old']['sys_groupid']); $old_client_id = intval($old_client['client_id']); unset($old_client); @@ -671,7 +675,7 @@ class apache2_plugin { $app->system->web_folder_protection($data['new']['document_root'], true); // Get the client ID - $client = $app->dbmaster->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = '.intval($data['new']['sys_groupid'])); + $client = $app->dbmaster->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = ?', $data['new']['sys_groupid']); $client_id = intval($client['client_id']); unset($client); @@ -1031,7 +1035,7 @@ class apache2_plugin { // Custom Apache directives if(intval($data['new']['directive_snippets_id']) > 0){ - $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'apache' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); + $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'apache' AND active = 'y' AND customer_viewable = 'y'", $data['new']['directive_snippets_id']); if(isset($snippet['snippet'])){ $vhost_data['apache_directives'] = $snippet['snippet']; } @@ -1137,7 +1141,7 @@ class apache2_plugin { $auto_alias = $web_config['website_autoalias']; if($auto_alias != '') { // get the client username - $client = $app->db->queryOneRecord("SELECT `username` FROM `client` WHERE `client_id` = '" . intval($client_id) . "'"); + $client = $app->db->queryOneRecord("SELECT `username` FROM `client` WHERE `client_id` = ?", $client_id); $aa_search = array('[client_id]', '[website_id]', '[client_username]', '[website_domain]'); $aa_replace = array($client_id, $data['new']['domain_id'], $client['username'], $data['new']['domain']); $auto_alias = str_replace($aa_search, $aa_replace, $auto_alias); @@ -1148,7 +1152,7 @@ class apache2_plugin { } // get alias domains (co-domains and subdomains) - $aliases = $app->db->queryAllRecords('SELECT * FROM web_domain WHERE parent_domain_id = '.$data['new']['domain_id']." AND active = 'y' AND (type != 'vhostsubdomain' AND type != 'vhostalias')"); + $aliases = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE parent_domain_id = ? AND active = 'y' AND (type != 'vhostsubdomain' AND type != 'vhostalias')", $data['new']['domain_id']); $alias_seo_redirects = array(); switch($data['new']['subdomain']) { case 'www': @@ -1792,7 +1796,7 @@ class apache2_plugin { $log_folder = 'log'; $web_folder = ''; if($data['old']['type'] == 'vhostsubdomain' || $data['old']['type'] == 'vhostalias') { - $tmp = $app->db->queryOneRecord('SELECT `domain`,`document_root` FROM web_domain WHERE domain_id = '.intval($data['old']['parent_domain_id'])); + $tmp = $app->db->queryOneRecord('SELECT `domain`,`document_root` FROM web_domain WHERE domain_id = ?', $data['old']['parent_domain_id']); if($tmp['domain'] != ''){ $subdomain_host = preg_replace('/^(.*)\.' . preg_quote($tmp['domain'], '/') . '$/', '$1', $data['old']['domain']); } else { @@ -1864,7 +1868,7 @@ class apache2_plugin { if($data['old']['type'] != 'vhost' && $data['old']['type'] != 'vhostsubdomain' && $data['old']['type'] != 'vhostalias' && $data['old']['parent_domain_id'] > 0) { //* This is a alias domain or subdomain, so we have to update the website instead $parent_domain_id = intval($data['old']['parent_domain_id']); - $tmp = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = '.$parent_domain_id." AND active = 'y'"); + $tmp = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ? AND active = 'y'", $parent_domain_id); $data['new'] = $tmp; $data['old'] = $tmp; $this->action = 'update'; @@ -1918,7 +1922,7 @@ class apache2_plugin { } else { // read all vhost subdomains and alias with same parent domain $used_paths = array(); - $tmp = $app->db->queryAllRecords("SELECT `web_folder` FROM web_domain WHERE (type = 'vhostsubdomain' OR type = 'vhostalias') AND parent_domain_id = ".intval($data['old']['parent_domain_id'])." AND domain_id != ".intval($data['old']['domain_id'])); + $tmp = $app->db->queryAllRecords("SELECT `web_folder` FROM web_domain WHERE (type = 'vhostsubdomain' OR type = 'vhostalias') AND parent_domain_id = ? AND domain_id != ?", $data['old']['parent_domain_id'], $data['old']['domain_id']); foreach($tmp as $tmprec) { // we normalize the folder entries because we need to compare them $tmp_folder = preg_replace('/[\/]{2,}/', '/', $tmprec['web_folder']); // replace / occuring multiple times @@ -2000,7 +2004,7 @@ class apache2_plugin { $app->log('Removing website: '.$docroot, LOGLEVEL_DEBUG); // Delete the symlinks for the sites - $client = $app->db->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = '.intval($data['old']['sys_groupid'])); + $client = $app->db->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = ?', $data['old']['sys_groupid']); $client_id = intval($client['client_id']); unset($client); $tmp_symlinks_array = explode(':', $web_config['website_symlinks']); @@ -2089,7 +2093,7 @@ class apache2_plugin { $tpl = new tpl(); $tpl->newTemplate('apache_ispconfig.conf.master'); $tpl->setVar('apache_version', $app->system->getapacheversion()); - $records = $app->db->queryAllRecords('SELECT * FROM server_ip WHERE server_id = '.$conf['server_id']." AND virtualhost = 'y'"); + $records = $app->db->queryAllRecords("SELECT * FROM server_ip WHERE server_id = ? AND virtualhost = 'y'", $conf['server_id']); $records_out= array(); if(is_array($records)) { @@ -2135,8 +2139,8 @@ class apache2_plugin { $folder_id = $data['new']['web_folder_id']; } - $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE web_folder_id = ".intval($folder_id)); - $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($folder['parent_domain_id'])); + $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE web_folder_id = ?", $folder_id); + $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $folder['parent_domain_id']); if(!is_array($folder) or !is_array($website)) { $app->log('Not able to retrieve folder or website record.', LOGLEVEL_DEBUG); @@ -2172,19 +2176,6 @@ class apache2_plugin { $app->log('Created file '.$folder_path.'.htpasswd', LOGLEVEL_DEBUG); } - /* - $auth_users = $app->db->queryAllRecords("SELECT * FROM web_folder_user WHERE active = 'y' AND web_folder_id = ".intval($folder_id)); - $htpasswd_content = ''; - if(is_array($auth_users) && !empty($auth_users)){ - foreach($auth_users as $auth_user){ - $htpasswd_content .= $auth_user['username'].':'.$auth_user['password']."\n"; - } - } - $htpasswd_content = trim($htpasswd_content); - @file_put_contents($folder_path.'.htpasswd', $htpasswd_content); - $app->log('Changed .htpasswd file: '.$folder_path.'.htpasswd',LOGLEVEL_DEBUG); - */ - if(($data['new']['username'] != $data['old']['username'] || $data['new']['active'] == 'n') && $data['old']['username'] != '') { $app->system->removeLine($folder_path.'.htpasswd', $data['old']['username'].':'); $app->log('Removed user: '.$data['old']['username'], LOGLEVEL_DEBUG); @@ -2235,7 +2226,7 @@ class apache2_plugin { $folder_id = $data['old']['web_folder_id']; $folder = $data['old']; - $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($folder['parent_domain_id'])); + $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $folder['parent_domain_id']); if(!is_array($folder) or !is_array($website)) { $app->log('Not able to retrieve folder or website record.', LOGLEVEL_DEBUG); @@ -2290,7 +2281,7 @@ class apache2_plugin { function web_folder_update($event_name, $data) { global $app, $conf; - $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($data['new']['parent_domain_id'])); + $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); if(!is_array($website)) { $app->log('Not able to retrieve folder or website record.', LOGLEVEL_DEBUG); @@ -2450,7 +2441,7 @@ class apache2_plugin { /* * Get additional informations */ - $sitedata = $app->db->queryOneRecord('SELECT document_root, domain, system_user, system_group FROM web_domain WHERE domain_id = ' . $data['new']['parent_domain_id']); + $sitedata = $app->db->queryOneRecord('SELECT document_root, domain, system_user, system_group FROM web_domain WHERE domain_id = ?', $data['new']['parent_domain_id']); $documentRoot = $sitedata['document_root']; $domain = $sitedata['domain']; $user = $sitedata['system_user']; @@ -2538,7 +2529,7 @@ class apache2_plugin { /* * Get additional informations */ - $sitedata = $app->db->queryOneRecord('SELECT document_root, domain FROM web_domain WHERE domain_id = ' . $data['old']['parent_domain_id']); + $sitedata = $app->db->queryOneRecord('SELECT document_root, domain FROM web_domain WHERE domain_id = ?', $data['old']['parent_domain_id']); $documentRoot = $sitedata['document_root']; $domain = $sitedata['domain']; @@ -2925,7 +2916,7 @@ class apache2_plugin { $app->services->restartService('php-fpm', 'reload:'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); } } - $php_versions = $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 = ".$conf["server_id"]); + $php_versions = $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 = ?", $conf["server_id"]); if(is_array($php_versions) && !empty($php_versions)){ foreach($php_versions as $php_version){ if(substr($php_version['php_fpm_pool_dir'], -1) != '/') $php_version['php_fpm_pool_dir'] .= '/'; @@ -2989,7 +2980,7 @@ class apache2_plugin { $app->services->restartService('php-fpm', 'reload:'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); } } - $php_versions = $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 = ".$data['old']['server_id']); + $php_versions = $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 = ?", $data['old']['server_id']); if(is_array($php_versions) && !empty($php_versions)){ foreach($php_versions as $php_version){ if(substr($php_version['php_fpm_pool_dir'], -1) != '/') $php_version['php_fpm_pool_dir'] .= '/'; diff --git a/server/plugins-available/bind_dlz_plugin.inc.php b/server/plugins-available/bind_dlz_plugin.inc.php index 9de0775d5..fa839fe04 100644 --- a/server/plugins-available/bind_dlz_plugin.inc.php +++ b/server/plugins-available/bind_dlz_plugin.inc.php @@ -129,8 +129,7 @@ class bind_dlz_plugin { //$_db->dbName = 'named'; $app->db->query("INSERT INTO named.records (zone, ttl, type, primary_ns, resp_contact, serial, refresh, retry, expire, minimum, ispconfig_id) VALUES ". - "('$origin', $ttl, 'SOA', '{$data["new"]["ns"]}', '{$data["new"]["mbox"]}', '{$serial["serial"]}', '{$serial["refresh"]}'," . - "'{$serial["retry"]}', '{$serial["expire"]}', '{$serial["minimum"]}', $ispconfig_id)"); + "(?, ?, 'SOA', ?, ?, ?, ?, ?, ?, ?, ?)", $origin, $ttl, $data["new"]["ns"], $data["new"]["mbox"], $serial["serial"], $serial["refresh"], $serial["retry"], $serial["expire"], $serial["minimum"], $ispconfig_id); //unset($_db); } @@ -149,16 +148,14 @@ class bind_dlz_plugin { { $origin = substr($data["new"]["origin"], 0, -1); $ispconfig_id = $data["new"]["id"]; - $serial = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ".$ispconfig_id); + $serial = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ?", $ispconfig_id); $ttl = $data["new"]["ttl"]; //$_db = clone $app->db; //$_db->dbName = 'named'; - $app->db->query("UPDATE named.records SET zone = '$origin', ttl = $ttl, primary_ns = '{$data["new"]["ns"]}', resp_contact = '{$data["new"]["mbox"]}', ". - "serial = '{$serial["serial"]}', refresh = '{$serial["refresh"]}', retry = '{$serial["retry"]}', expire = '{$serial["expire"]}', ". - "minimum = '{$serial["minimum"]}' WHERE ispconfig_id = ".$data["new"]["id"]." AND type = 'SOA'"); + $app->db->query("UPDATE named.records SET zone = ?, ttl = ?, primary_ns = ?, resp_contact = ?, serial = ?, refresh = ?, retry = ?, expire = ?, minimum = ? WHERE ispconfig_id = ? AND type = 'SOA'", $origin, $ttl, $data["new"]["ns"], $data["new"]["mbox"], $serial["serial"], $serial["refresh"], $serial["retry"], $serial["expire"], $serial["minimum"], $data["new"]["id"]); //unset($_db); } else @@ -166,7 +163,7 @@ class bind_dlz_plugin { $this->soa_insert($event_name, $data); $ispconfig_id = $data["new"]["id"]; - if ($records = $app->db->queryAllRecords("SELECT * FROM dns_rr WHERE zone = $ispconfig_id AND active = 'Y'")) + if ($records = $app->db->queryAllRecords("SELECT * FROM dns_rr WHERE zone = ? AND active = 'Y'", $ispconfig_id)) { foreach($records as $record) { @@ -188,7 +185,7 @@ class bind_dlz_plugin { //$_db = clone $app->db; //$_db->dbName = 'named'; - $app->db->query( "DELETE FROM named.dns_records WHERE zone = '".substr($data['old']['origin'], 0, -1)."'"); + $app->db->query( "DELETE FROM named.dns_records WHERE zone = ?", substr($data['old']['origin'], 0, -1)); //unset($_db); } @@ -197,7 +194,7 @@ class bind_dlz_plugin { global $app, $conf; if($data["new"]["active"] != 'Y') return; - $zone = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ".$data["new"]["zone"]); + $zone = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ?", $data["new"]["zone"]); $origin = substr($zone["origin"], 0, -1); $ispconfig_id = $data["new"]["id"]; @@ -251,13 +248,13 @@ class bind_dlz_plugin { if ($type == 'MX') { $app->db->query("INSERT INTO named.records (zone, ttl, type, host, mx_priority, data, ispconfig_id)". - " VALUES ('$origin', $ttl, '$type', '$name', {$data["new"]["aux"]}, '$content', $ispconfig_id)"); + " VALUES (?, ?, ?, ?, ?, ?, ?)", $origin, $ttl, $type, $name, $data["new"]["aux"], $content, $ispconfig_id); } elseif ($type == 'SRV') { $app->db->query("INSERT INTO named.records (zone, ttl, type, data, ispconfig_id)". - " VALUES ('$origin', $ttl, '$type', '{$data["new"]["aux"]} $content', $ispconfig_id)"); + " VALUES (?, ?, ?, ?, ?)", $origin, $ttl, $type, $data["new"]["aux"] . ' ' . $content, $ispconfig_id); } else { $app->db->query("INSERT INTO named.records (zone, ttl, type, host, data, ispconfig_id)". - " VALUES ('$origin', $ttl, '$type', '$name', '$content', $ispconfig_id)"); + " VALUES (?, ?, ?, ?, ?, ?)", $origin, $ttl, $type, $name, $content, $ispconfig_id); } //unset($_db); @@ -276,7 +273,7 @@ class bind_dlz_plugin { { if ($data["old"]["active"] == 'Y') { - $zone = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ".$data["new"]["zone"]); + $zone = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ?", $data["new"]["zone"]); $origin = substr($zone["origin"], 0, -1); $ispconfig_id = $data["new"]["id"]; @@ -328,14 +325,11 @@ class bind_dlz_plugin { //$_db->dbName = 'named'; if ($type == 'MX') { - $app->db->query("UPDATE named.records SET zone = '$origin', ttl = $ttl, type = '$type', host = '$name', mx_priority = $prio, ". - "data = '$content' WHERE ispconfig_id = $ispconfig_id AND type != 'SOA'"); + $app->db->query("UPDATE named.records SET zone = ?, ttl = ?, type = ?, host = ?, mx_priority = ?, data = ? WHERE ispconfig_id = ? AND type != 'SOA'", $origin, $ttl, $type, $name, $prio, $content, $ispconfig_id); } elseif ($type == 'SRV') { - $app->db->query("UPDATE named.records SET zone = '$origin', ttl = $ttl, type = '$type', ". - "data = '$prio $content' WHERE ispconfig_id = $ispconfig_id AND type != 'SOA'"); + $app->db->query("UPDATE named.records SET zone = ?, ttl = ?, type = ?, data = ? WHERE ispconfig_id = ? AND type != 'SOA'", $origin, $ttl, $type, $prio . ' ' . $content, $ispconfig_id); } else { - $app->db->query("UPDATE named.records SET zone = '$origin', ttl = $ttl, type = '$type', host = '$name', ". - "data = '$content' WHERE ispconfig_id = $ispconfig_id AND type != 'SOA'"); + $app->db->query("UPDATE named.records SET zone = ?, ttl = ?, type = ?, host = ?, data = ? WHERE ispconfig_id = ? AND type != 'SOA'", $origin, $ttl, $type, $name, $content, $ispconfig_id); } //unset($_db); @@ -351,7 +345,7 @@ class bind_dlz_plugin { //$_db = clone $app->db; //$_db->dbName = 'named'; - $app->db->query( "DELETE FROM named.dns_records WHERE type != 'SOA' AND zone = '".substr($data['old']['origin'], 0, -1)."'"); + $app->db->query( "DELETE FROM named.dns_records WHERE type != 'SOA' AND zone = ?", substr($data['old']['origin'], 0, -1)); //unset($_db); } diff --git a/server/plugins-available/mongo_clientdb_plugin.inc.php b/server/plugins-available/mongo_clientdb_plugin.inc.php index 2f381121d..b4d274cba 100644 --- a/server/plugins-available/mongo_clientdb_plugin.inc.php +++ b/server/plugins-available/mongo_clientdb_plugin.inc.php @@ -500,8 +500,8 @@ class mongo_clientdb_plugin { return; } - $db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password_mongo` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['new']['database_user_id']) . "'"); - $db_ro_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password_mongo` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['new']['database_ro_user_id']) . "'"); + $db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password_mongo` FROM `web_database_user` WHERE `database_user_id` = ?", $data['new']['database_user_id']); + $db_ro_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password_mongo` FROM `web_database_user` WHERE `database_user_id` = ?", $data['new']['database_ro_user_id']); $user = $db_user['database_user']; $password = $db_user['database_password_mongo']; @@ -573,8 +573,8 @@ class mongo_clientdb_plugin { return; } - $db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password_mongo` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['new']['database_user_id']) . "'"); - $db_ro_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password_mongo` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['new']['database_ro_user_id']) . "'"); + $db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password_mongo` FROM `web_database_user` WHERE `database_user_id` = ?", $data['new']['database_user_id']); + $db_ro_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password_mongo` FROM `web_database_user` WHERE `database_user_id` = ?", $data['new']['database_ro_user_id']); $user = $db_user['database_user']; $password = $db_user['database_password_mongo']; @@ -600,7 +600,7 @@ class mongo_clientdb_plugin { } else { // selected user has changed -> drop old one if ($data['new']['database_user_id'] != $data['old']['database_user_id']) { - $old_db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password_mongo` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['old']['database_user_id']) . "'"); + $old_db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password_mongo` FROM `web_database_user` WHERE `database_user_id` = ?", $data['old']['database_user_id']); if ((bool) $old_db_user) { if ($old_db_user['database_user'] == 'root') { @@ -613,7 +613,7 @@ class mongo_clientdb_plugin { // selected read-only user has changed -> drop old one if ($data['new']['database_ro_user_id'] != $data['old']['database_ro_user_id']) { - $old_db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password_mongo` FROM `web_database_user` WHERE `database_user_id` = '" . intval($data['old']['database_ro_user_id']) . "'"); + $old_db_user = $app->db->queryOneRecord("SELECT `database_user`, `database_password_mongo` FROM `web_database_user` WHERE `database_user_id` = ?", $data['old']['database_ro_user_id']); if ((bool) $old_db_user) { if ($old_db_user['database_user'] == 'root') { diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index c256ae18f..15fd0461e 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -208,15 +208,15 @@ class nginx_plugin { $app->system->chmod($key_file2, 0400); @$app->system->unlink($config_file); @$app->system->unlink($rand_file); - $ssl_request = $app->db->quote($app->system->file_get_contents($csr_file)); - $ssl_cert = $app->db->quote($app->system->file_get_contents($crt_file)); - $ssl_key2 = $app->db->quote($app->system->file_get_contents($key_file2)); + $ssl_request = $app->system->file_get_contents($csr_file); + $ssl_cert = $app->system->file_get_contents($crt_file); + $ssl_key2 = $app->system->file_get_contents($key_file2); /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET ssl_request = '$ssl_request', ssl_cert = '$ssl_cert', ssl_key = '$ssl_key2' WHERE domain = '".$data['new']['domain']."'"); - $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->db->query("UPDATE web_domain SET ssl_request = ?, ssl_cert = ?, ssl_key = ? WHERE domain = ?", $ssl_request, $ssl_cert, $ssl_key2, $data['new']['domain']); + $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE web_domain SET ssl_request = '$ssl_request', ssl_cert = '$ssl_cert', ssl_key = '$ssl_key2' WHERE domain = '".$data['new']['domain']."'"); - $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->dbmaster->query("UPDATE web_domain SET ssl_request = ?, ssl_cert = ?, ssl_key = ? WHERE domain = ?", $ssl_request, $ssl_cert, $ssl_key2, $data['new']['domain']); + $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); } //* Save a SSL certificate to disk @@ -263,10 +263,10 @@ class nginx_plugin { unset($crt_file_contents); } /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); $app->log('Saving SSL Cert for: '.$domain, LOGLEVEL_DEBUG); } @@ -286,11 +286,11 @@ class nginx_plugin { $app->system->unlink($crt_file); //$app->system->unlink($bundle_file); /* Update the DB of the (local) Server */ - $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '' WHERE domain = '".$data['new']['domain']."'"); - $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '' WHERE domain = ?", $data['new']['domain']); + $app->db->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '' WHERE domain = '".$data['new']['domain']."'"); - $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->dbmaster->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '' WHERE domain = ?", $data['new']['domain']); + $app->dbmaster->query("UPDATE web_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); $app->log('Deleting SSL Cert for: '.$domain, LOGLEVEL_DEBUG); } @@ -326,7 +326,7 @@ class nginx_plugin { // If the parent_domain_id has been changed, we will have to update the old site as well. if($this->action == 'update' && $data['new']['parent_domain_id'] != $data['old']['parent_domain_id']) { - $tmp = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = '.$old_parent_domain_id." AND active = 'y'"); + $tmp = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ? AND active = 'y'", $old_parent_domain_id); $data['new'] = $tmp; $data['old'] = $tmp; $this->action = 'update'; @@ -334,7 +334,7 @@ class nginx_plugin { } // This is not a vhost, so we need to update the parent record instead. - $tmp = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = '.$new_parent_domain_id." AND active = 'y'"); + $tmp = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ? AND active = 'y'", $new_parent_domain_id); $data['new'] = $tmp; $data['old'] = $tmp; $this->action = 'update'; @@ -374,7 +374,7 @@ class nginx_plugin { $old_log_folder = 'log'; if($data['new']['type'] == 'vhostsubdomain' || $data['new']['type'] == 'vhostalias') { // new one - $tmp = $app->db->queryOneRecord('SELECT `domain` FROM web_domain WHERE domain_id = '.intval($data['new']['parent_domain_id'])); + $tmp = $app->db->queryOneRecord('SELECT `domain` FROM web_domain WHERE domain_id = ?', $data['new']['parent_domain_id']); $subdomain_host = preg_replace('/^(.*)\.' . preg_quote($tmp['domain'], '/') . '$/', '$1', $data['new']['domain']); if($subdomain_host == '') $subdomain_host = 'web'.$data['new']['domain_id']; $web_folder = $data['new']['web_folder']; @@ -383,7 +383,7 @@ class nginx_plugin { if(isset($data['old']['parent_domain_id'])) { // old one - $tmp = $app->db->queryOneRecord('SELECT `domain` FROM web_domain WHERE domain_id = '.intval($data['old']['parent_domain_id'])); + $tmp = $app->db->queryOneRecord('SELECT `domain` FROM web_domain WHERE domain_id = ?', $data['old']['parent_domain_id']); $subdomain_host = preg_replace('/^(.*)\.' . preg_quote($tmp['domain'], '/') . '$/', '$1', $data['old']['domain']); if($subdomain_host == '') $subdomain_host = 'web'.$data['old']['domain_id']; $old_web_folder = $data['old']['web_folder']; @@ -437,7 +437,7 @@ class nginx_plugin { if($this->action == 'update' && $data['new']['document_root'] != $data['old']['document_root']) { //* Get the old client ID - $old_client = $app->dbmaster->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = '.intval($data['old']['sys_groupid'])); + $old_client = $app->dbmaster->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = ?', $data['old']['sys_groupid']); $old_client_id = intval($old_client['client_id']); unset($old_client); @@ -576,7 +576,7 @@ class nginx_plugin { $app->system->web_folder_protection($data['new']['document_root'], true); // Get the client ID - $client = $app->dbmaster->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = '.intval($data['new']['sys_groupid'])); + $client = $app->dbmaster->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = ?', $data['new']['sys_groupid']); $client_id = intval($client['client_id']); unset($client); @@ -1090,7 +1090,7 @@ class nginx_plugin { // Custom nginx directives $final_nginx_directives = array(); if(intval($data['new']['directive_snippets_id']) > 0){ - $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'nginx' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); + $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'nginx' AND active = 'y' AND customer_viewable = 'y'", $data['new']['directive_snippets_id']); if(isset($snippet['snippet'])){ $nginx_directives = $snippet['snippet']; } else { @@ -1336,7 +1336,7 @@ class nginx_plugin { $auto_alias = $web_config['website_autoalias']; if($auto_alias != '') { // get the client username - $client = $app->db->queryOneRecord("SELECT `username` FROM `client` WHERE `client_id` = '" . intval($client_id) . "'"); + $client = $app->db->queryOneRecord("SELECT `username` FROM `client` WHERE `client_id` = ?", $client_id); $aa_search = array('[client_id]', '[website_id]', '[client_username]', '[website_domain]'); $aa_replace = array($client_id, $data['new']['domain_id'], $client['username'], $data['new']['domain']); $auto_alias = str_replace($aa_search, $aa_replace, $auto_alias); @@ -1356,7 +1356,7 @@ class nginx_plugin { } // get alias domains (co-domains and subdomains) - $aliases = $app->db->queryAllRecords('SELECT * FROM web_domain WHERE parent_domain_id = '.$data['new']['domain_id']." AND active = 'y' AND (type != 'vhostsubdomain' AND type != 'vhostalias')"); + $aliases = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE parent_domain_id = ? AND active = 'y' AND (type != 'vhostsubdomain' AND type != 'vhostalias')", $data['new']['domain_id']); $alias_seo_redirects = array(); if(is_array($aliases)) { foreach($aliases as $alias) { @@ -1805,7 +1805,7 @@ class nginx_plugin { $log_folder = 'log'; $web_folder = ''; if($data['old']['type'] == 'vhostsubdomain' || $data['old']['type'] == 'vhostalias') { - $tmp = $app->db->queryOneRecord('SELECT `domain`,`document_root` FROM web_domain WHERE domain_id = '.intval($data['old']['parent_domain_id'])); + $tmp = $app->db->queryOneRecord('SELECT `domain`,`document_root` FROM web_domain WHERE domain_id = ?', $data['old']['parent_domain_id']); if($tmp['domain'] != ''){ $subdomain_host = preg_replace('/^(.*)\.' . preg_quote($tmp['domain'], '/') . '$/', '$1', $data['old']['domain']); } else { @@ -1877,7 +1877,7 @@ class nginx_plugin { if($data['old']['type'] != 'vhost' && $data['old']['type'] != 'vhostsubdomain' && $data['old']['type'] != 'vhostalias' && $data['old']['parent_domain_id'] > 0) { //* This is a alias domain or subdomain, so we have to update the website instead $parent_domain_id = intval($data['old']['parent_domain_id']); - $tmp = $app->db->queryOneRecord('SELECT * FROM web_domain WHERE domain_id = '.$parent_domain_id." AND active = 'y'"); + $tmp = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ? AND active = 'y'", $parent_domain_id); $data['new'] = $tmp; $data['old'] = $tmp; $this->action = 'update'; @@ -1931,7 +1931,7 @@ class nginx_plugin { } else { // read all vhost subdomains with same parent domain $used_paths = array(); - $tmp = $app->db->queryAllRecords("SELECT `web_folder` FROM web_domain WHERE (type = 'vhostsubdomain' OR type = 'vhostalias') AND parent_domain_id = ".intval($data['old']['parent_domain_id'])." AND domain_id != ".intval($data['old']['domain_id'])); + $tmp = $app->db->queryAllRecords("SELECT `web_folder` FROM web_domain WHERE (type = 'vhostsubdomain' OR type = 'vhostalias') AND parent_domain_id = ? AND domain_id != ?", $data['old']['parent_domain_id'], $data['old']['domain_id']); foreach($tmp as $tmprec) { // we normalize the folder entries because we need to compare them $tmp_folder = preg_replace('/[\/]{2,}/', '/', $tmprec['web_folder']); // replace / occuring multiple times @@ -2014,7 +2014,7 @@ class nginx_plugin { $app->log('Removing website: '.$docroot, LOGLEVEL_DEBUG); // Delete the symlinks for the sites - $client = $app->db->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = '.intval($data['old']['sys_groupid'])); + $client = $app->db->queryOneRecord('SELECT client_id FROM sys_group WHERE sys_group.groupid = ?', $data['old']['sys_groupid']); $client_id = intval($client['client_id']); unset($client); $tmp_symlinks_array = explode(':', $web_config['website_symlinks']); @@ -2102,8 +2102,8 @@ class nginx_plugin { $folder_id = $data['new']['web_folder_id']; } - $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE web_folder_id = ".intval($folder_id)); - $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($folder['parent_domain_id'])); + $folder = $app->db->queryOneRecord("SELECT * FROM web_folder WHERE web_folder_id = ?", $folder_id); + $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $folder['parent_domain_id']); if(!is_array($folder) or !is_array($website)) { $app->log('Not able to retrieve folder or website record.', LOGLEVEL_DEBUG); @@ -2139,19 +2139,6 @@ class nginx_plugin { $app->log('Created file '.$folder_path.'.htpasswd', LOGLEVEL_DEBUG); } - /* - $auth_users = $app->db->queryAllRecords("SELECT * FROM web_folder_user WHERE active = 'y' AND web_folder_id = ".intval($folder_id)); - $htpasswd_content = ''; - if(is_array($auth_users) && !empty($auth_users)){ - foreach($auth_users as $auth_user){ - $htpasswd_content .= $auth_user['username'].':'.$auth_user['password']."\n"; - } - } - $htpasswd_content = trim($htpasswd_content); - @file_put_contents($folder_path.'.htpasswd', $htpasswd_content); - $app->log('Changed .htpasswd file: '.$folder_path.'.htpasswd',LOGLEVEL_DEBUG); - */ - if(($data['new']['username'] != $data['old']['username'] || $data['new']['active'] == 'n') && $data['old']['username'] != '') { $app->system->removeLine($folder_path.'.htpasswd', $data['old']['username'].':'); $app->log('Removed user: '.$data['old']['username'], LOGLEVEL_DEBUG); @@ -2180,7 +2167,7 @@ class nginx_plugin { $folder_id = $data['old']['web_folder_id']; $folder = $data['old']; - $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($folder['parent_domain_id'])); + $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $folder['parent_domain_id']); if(!is_array($folder) or !is_array($website)) { $app->log('Not able to retrieve folder or website record.', LOGLEVEL_DEBUG); @@ -2217,7 +2204,7 @@ class nginx_plugin { function web_folder_update($event_name, $data) { global $app, $conf; - $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".intval($data['new']['parent_domain_id'])); + $website = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $data['new']['parent_domain_id']); if(!is_array($website)) { $app->log('Not able to retrieve folder or website record.', LOGLEVEL_DEBUG); @@ -2286,7 +2273,7 @@ class nginx_plugin { //$app->load('tpl'); //$tpl = new tpl(); //$tpl->newTemplate('nginx_http_authentication.auth.master'); - $website_auth_locations = $app->db->queryAllRecords("SELECT * FROM web_folder WHERE active = 'y' AND parent_domain_id = ".intval($website['domain_id'])); + $website_auth_locations = $app->db->queryAllRecords("SELECT * FROM web_folder WHERE active = 'y' AND parent_domain_id = ?", $website['domain_id']); $basic_auth_locations = array(); if(is_array($website_auth_locations) && !empty($website_auth_locations)){ foreach($website_auth_locations as $website_auth_location){ @@ -2526,7 +2513,7 @@ class nginx_plugin { $app->services->restartService('php-fpm', 'reload:'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); } } - $php_versions = $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 = ".$conf["server_id"]); + $php_versions = $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 = ?", $conf["server_id"]); if(is_array($php_versions) && !empty($php_versions)){ foreach($php_versions as $php_version){ if(substr($php_version['php_fpm_pool_dir'], -1) != '/') $php_version['php_fpm_pool_dir'] .= '/'; @@ -2584,7 +2571,7 @@ class nginx_plugin { $app->services->restartService('php-fpm', 'reload:'.$conf['init_scripts'].'/'.$web_config['php_fpm_init_script']); } } - $php_versions = $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 = ".$data['old']['server_id']); + $php_versions = $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 = ?", $data['old']['server_id']); if(is_array($php_versions) && !empty($php_versions)){ foreach($php_versions as $php_version){ if(substr($php_version['php_fpm_pool_dir'], -1) != '/') $php_version['php_fpm_pool_dir'] .= '/'; diff --git a/server/plugins-available/xmpp_plugin.inc.php b/server/plugins-available/xmpp_plugin.inc.php index d5d36a05a..128a88ebb 100644 --- a/server/plugins-available/xmpp_plugin.inc.php +++ b/server/plugins-available/xmpp_plugin.inc.php @@ -315,17 +315,17 @@ class xmpp_plugin { exec("(cd /etc/metronome/certs && make $domain.csr)"); exec("(cd /etc/metronome/certs && make $domain.cert)"); - $ssl_key = $app->db->quote($app->system->file_get_contents($key_file)); + $ssl_key = $app->system->file_get_contents($key_file); $app->system->chmod($key_file, 0400); $app->system->chown($key_file, 'metronome'); - $ssl_request = $app->db->quote($app->system->file_get_contents($csr_file)); - $ssl_cert = $app->db->quote($app->system->file_get_contents($crt_file)); + $ssl_request = $app->system->file_get_contents($csr_file); + $ssl_cert = $app->system->file_get_contents($crt_file); /* Update the DB of the (local) Server */ - $app->db->query("UPDATE xmpp_domain SET ssl_request = '$ssl_request', ssl_cert = '$ssl_cert', ssl_key = '$ssl_key' WHERE domain = '".$data['new']['domain']."'"); - $app->db->query("UPDATE xmpp_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->db->query("UPDATE xmpp_domain SET ssl_request = ?, ssl_cert = ?, ssl_key = ? WHERE domain = ?", $ssl_request, $ssl_cert, $ssl_key, $data['new']['domain']); + $app->db->query("UPDATE xmpp_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE xmpp_domain SET ssl_request = '$ssl_request', ssl_cert = '$ssl_cert', ssl_key = '$ssl_key' WHERE domain = '".$data['new']['domain']."'"); - $app->dbmaster->query("UPDATE xmpp_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->dbmaster->query("UPDATE xmpp_domain SET ssl_request = ?, ssl_cert = ?, ssl_key = ? WHERE domain = ?", $ssl_request, $ssl_cert, $ssl_key, $data['new']['domain']); + $app->dbmaster->query("UPDATE xmpp_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); $app->log('Creating XMPP SSL Cert for: '.$domain, LOGLEVEL_DEBUG); } @@ -355,18 +355,18 @@ class xmpp_plugin { $app->system->chmod($key_file, 0400); $app->system->chown($key_file, 'metronome'); } else { - $ssl_key = $app->db->quote($app->system->file_get_contents($key_file)); + $ssl_key = $app->system->file_get_contents($key_file); /* Update the DB of the (local) Server */ - $app->db->query("UPDATE xmpp_domain SET ssl_key = '$ssl_key' WHERE domain = '".$data['new']['domain']."'"); + $app->db->query("UPDATE xmpp_domain SET ssl_key = ? WHERE domain = ?", $ssl_key, $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE xmpp_domain SET ssl_key = '$ssl_key' WHERE domain = '".$data['new']['domain']."'"); + $app->dbmaster->query("UPDATE xmpp_domain SET ssl_key = '$ssl_key' WHERE domain = ?", $data['new']['domain']); } /* Update the DB of the (local) Server */ - $app->db->query("UPDATE xmpp_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->db->query("UPDATE xmpp_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE xmpp_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->dbmaster->query("UPDATE xmpp_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); $app->log('Saving XMPP SSL Cert for: '.$domain, LOGLEVEL_DEBUG); } @@ -382,11 +382,11 @@ class xmpp_plugin { $app->system->unlink($key_file.'.bak'); $app->system->unlink($cnf_file.'.bak'); /* Update the DB of the (local) Server */ - $app->db->query("UPDATE xmpp_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = '".$data['new']['domain']."'"); - $app->db->query("UPDATE xmpp_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->db->query("UPDATE xmpp_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']); + $app->db->query("UPDATE xmpp_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); /* Update also the master-DB of the Server-Farm */ - $app->dbmaster->query("UPDATE xmpp_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = '".$data['new']['domain']."'"); - $app->dbmaster->query("UPDATE xmpp_domain SET ssl_action = '' WHERE domain = '".$data['new']['domain']."'"); + $app->dbmaster->query("UPDATE xmpp_domain SET ssl_request = '', ssl_cert = '', ssl_key = '' WHERE domain = ?", $data['new']['domain']); + $app->dbmaster->query("UPDATE xmpp_domain SET ssl_action = '' WHERE domain = ?", $data['new']['domain']); $app->log('Deleting SSL Cert for: '.$domain, LOGLEVEL_DEBUG); } -- GitLab From a6e3ae8120a09df8694d2bae51045fb4dd2b16fc Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Tue, 14 Apr 2015 19:01:12 +0200 Subject: [PATCH 200/287] - fixed some syntax errors from previous commit --- install/dist/lib/opensuse.lib.php | 4 ++-- interface/lib/classes/custom_datasource.inc.php | 2 +- interface/lib/classes/db_mysql.inc.php | 2 +- interface/lib/classes/remote.d/mail.inc.php | 2 +- interface/lib/classes/validate_domain.inc.php | 2 +- interface/lib/plugins/mail_mail_domain_plugin.inc.php | 4 ++-- interface/web/mail/mail_alias_edit.php | 2 +- interface/web/mail/mail_domain_catchall_edit.php | 2 +- interface/web/mail/mail_forward_edit.php | 2 +- interface/web/sites/web_folder_user_edit.php | 4 ++-- server/lib/classes/cron.d/200-logfiles.inc.php | 4 ++-- server/lib/classes/db_mysql.inc.php | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index 50d8aa74e..0b955d835 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -1099,9 +1099,9 @@ class installer_dist extends installer_base { $vserver_server_enabled = ($conf['services']['vserver'])?1:0; $sql = "UPDATE `server` SET mail_server = ?, web_server = ?, dns_server = ?, file_server = ?, db_server = ?, vserver_server = ? WHERE server_id = ?"; - $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']);); + $this->db->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']); if($conf['mysql']['master_slave_setup'] == 'y') { - $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']);); + $this->dbmaster->query($sql, $mail_server_enabled, $web_server_enabled, $dns_server_enabled, $file_server_enabled, $db_server_enabled, $vserver_server_enabled, $conf['server_id']); } // chown install dir to root and chmod 755 diff --git a/interface/lib/classes/custom_datasource.inc.php b/interface/lib/classes/custom_datasource.inc.php index 92caa8718..46af33fb5 100644 --- a/interface/lib/classes/custom_datasource.inc.php +++ b/interface/lib/classes/custom_datasource.inc.php @@ -70,7 +70,7 @@ class custom_datasource { // Get the limits of the client $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); $client = $app->db->queryOneRecord("SELECT default_slave_dnsserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ", $client_group_id); - $sql = "SELECT server_id,server_name FROM server WHERE server_id = ?"); + $sql = "SELECT server_id,server_name FROM server WHERE server_id = ?"; } else { $sql = "SELECT server_id,server_name FROM server WHERE dns_server = 1 ORDER BY server_name"; } diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index f5de1e6cf..d3ca38314 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -629,7 +629,7 @@ class db extends mysqli $params = array($tablename); $v_params = array(); foreach($insert_data as $key => $val) { - $key_str .= '??,' + $key_str .= '??,'; $params[] = $key; $val_str .= '?,'; diff --git a/interface/lib/classes/remote.d/mail.inc.php b/interface/lib/classes/remote.d/mail.inc.php index b28adc103..914777070 100644 --- a/interface/lib/classes/remote.d/mail.inc.php +++ b/interface/lib/classes/remote.d/mail.inc.php @@ -370,7 +370,7 @@ class remoting_mail extends remoting { } //* Save the record - if ($app->db->query("INSERT INTO `sys_remoteaction` SET `server_id` = ?, `tstamp` = ?, `action_type` = ?, `action_param` = ?, `action_state` = ?"), $server_id, $tstamp, $action_type, $primary_id, $action_state) { + if ($app->db->query("INSERT INTO `sys_remoteaction` SET `server_id` = ?, `tstamp` = ?, `action_type` = ?, `action_param` = ?, `action_state` = ?", $server_id, $tstamp, $action_type, $primary_id, $action_state)) { return true; } else { return false; diff --git a/interface/lib/classes/validate_domain.inc.php b/interface/lib/classes/validate_domain.inc.php index f3efe518b..b4acbd6db 100644 --- a/interface/lib/classes/validate_domain.inc.php +++ b/interface/lib/classes/validate_domain.inc.php @@ -190,7 +190,7 @@ class validate_domain { if($only_domain == false) { $qrystr = "SELECT d.domain_id, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ip_address, d.ip_address) as `ip_address`, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ipv6_address, d.ipv6_address) as `ipv6_address` FROM `web_domain` as d LEFT JOIN `web_domain` as p ON (p.domain_id = d.parent_domain_id) WHERE (CONCAT(d.subdomain, '.', d.domain)= ?" . $additional_sql2 . ") AND d.server_id = ? AND d.domain_id != ?" . ($primary_id ? " AND d.parent_domain_id != ?" : ""); $params = array($domain_name) + $domain_params + array($domain['server_id'], $primary_id, $primary_id); - $checks = $app->db->queryAllRecords($qrystr, true $params); + $checks = $app->db->queryAllRecords($qrystr, true, $params); if(is_array($checks) && !empty($checks)){ foreach($checks as $check){ if($domain['ip_address'] == '*') return false; diff --git a/interface/lib/plugins/mail_mail_domain_plugin.inc.php b/interface/lib/plugins/mail_mail_domain_plugin.inc.php index 6af0c9594..b307f2567 100644 --- a/interface/lib/plugins/mail_mail_domain_plugin.inc.php +++ b/interface/lib/plugins/mail_mail_domain_plugin.inc.php @@ -37,7 +37,7 @@ class mail_mail_domain_plugin { $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $client_group_id); $client_user_id = ($tmp['userid'] > 0)?$tmp['userid']:1; $updates .= ", sys_userid = ?"; - $update_params[] = $client_user_id + $update_params[] = $client_user_id; } $update_params[] = $page_form->id; $app->db->query("UPDATE mail_domain SET " . $updates . " WHERE domain_id = ?", true, $update_params); @@ -50,7 +50,7 @@ class mail_mail_domain_plugin { $tmp = $app->db->queryOneRecord("SELECT userid FROM sys_user WHERE default_group = ?", $client_group_id); $client_user_id = ($tmp['userid'] > 0)?$tmp['userid']:1; $updates .= ", sys_userid = ?"; - $update_params[] = $client_user_id + $update_params[] = $client_user_id; } $update_params[] = $page_form->id; $app->db->query("UPDATE mail_domain SET " . $updates . " WHERE domain_id = ?", true, $update_params); diff --git a/interface/web/mail/mail_alias_edit.php b/interface/web/mail/mail_alias_edit.php index 98e6bac60..4292f8f4c 100644 --- a/interface/web/mail/mail_alias_edit.php +++ b/interface/web/mail/mail_alias_edit.php @@ -149,7 +149,7 @@ class page_action extends tform_actions { function onAfterInsert() { global $app; - $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"]))); + $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"])); $app->db->query("update mail_forwarding SET sys_groupid = ? WHERE forwarding_id = ?", $domain['sys_groupid'], $this->id); } diff --git a/interface/web/mail/mail_domain_catchall_edit.php b/interface/web/mail/mail_domain_catchall_edit.php index 8dd2829ac..60da619e1 100644 --- a/interface/web/mail/mail_domain_catchall_edit.php +++ b/interface/web/mail/mail_domain_catchall_edit.php @@ -127,7 +127,7 @@ class page_action extends tform_actions { function onAfterInsert() { global $app; - $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"]))); + $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"])); $app->db->query("update mail_forwarding SET sys_groupid = ? WHERE forwarding_id = ?", $domain['sys_groupid'], $this->id); } diff --git a/interface/web/mail/mail_forward_edit.php b/interface/web/mail/mail_forward_edit.php index e226cf501..17ce213cb 100644 --- a/interface/web/mail/mail_forward_edit.php +++ b/interface/web/mail/mail_forward_edit.php @@ -131,7 +131,7 @@ class page_action extends tform_actions { function onAfterInsert() { global $app; - $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"]))); + $domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain = ? AND ".$app->tform->getAuthSQL('r'), $app->functions->idn_encode($_POST["email_domain"])); $app->db->query("update mail_forwarding SET sys_groupid = ? WHERE forwarding_id = ?", $domain['sys_groupid'], $this->id); } diff --git a/interface/web/sites/web_folder_user_edit.php b/interface/web/sites/web_folder_user_edit.php index 999a2824f..654578a31 100644 --- a/interface/web/sites/web_folder_user_edit.php +++ b/interface/web/sites/web_folder_user_edit.php @@ -80,8 +80,8 @@ class page_action extends tform_actions { // The web folder user entry shall be owned by the same group as the web folder $sys_groupid = $app->functions->intval($folder['sys_groupid']); - $sql = "UPDATE web_folder_user SET sys_groupid = ? WHERE web_folder_user_id = ?", $sys_groupid, $this->id; - $app->db->query($sql); + $sql = "UPDATE web_folder_user SET sys_groupid = ? WHERE web_folder_user_id = ?"; + $app->db->query($sql, $sys_groupid, $this->id); } function onAfterUpdate() { diff --git a/server/lib/classes/cron.d/200-logfiles.inc.php b/server/lib/classes/cron.d/200-logfiles.inc.php index 9eaa3d758..98dd662f6 100644 --- a/server/lib/classes/cron.d/200-logfiles.inc.php +++ b/server/lib/classes/cron.d/200-logfiles.inc.php @@ -60,8 +60,8 @@ class cronjob_logfiles extends cronjob { // Manage and compress web logfiles and create traffic statistics //###################################################################################################### - $sql = "SELECT domain_id, domain, type, document_root, web_folder, parent_domain_id FROM web_domain WHERE (type = 'vhost' or type = 'vhostsubdomain' or type = 'vhostalias') AND server_id = ?", $conf['server_id']; - $records = $app->db->queryAllRecords($sql); + $sql = "SELECT domain_id, domain, type, document_root, web_folder, parent_domain_id FROM web_domain WHERE (type = 'vhost' or type = 'vhostsubdomain' or type = 'vhostalias') AND server_id = ?"; + $records = $app->db->queryAllRecords($sql, $conf['server_id']); foreach($records as $rec) { //* create traffic statistics based on yesterdays access log file diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index 218f1d304..9c693e39a 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -618,7 +618,7 @@ class db extends mysqli $params = array($tablename); $v_params = array(); foreach($insert_data as $key => $val) { - $key_str .= '??,' + $key_str .= '??,'; $params[] = $key; $val_str .= '?,'; -- GitLab From 3bb9ef8a12ee71a16887ca73a86b6fc8eaa183fe Mon Sep 17 00:00:00 2001 From: Dominik Date: Wed, 15 Apr 2015 00:08:05 +0200 Subject: [PATCH 201/287] changed sql-syntax --- install/dist/lib/gentoo.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index affae723a..18527ad16 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -81,7 +81,7 @@ class installer extends installer_base } //* These postconf commands will be executed on installation and update - $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM `" . $this->db->quote($conf["mysql"]["database"]) . "`.`server` WHERE server_id = ".$conf['server_id']); + $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM ?.`server` WHERE server_id = ?", $conf["mysql"]["database"], $conf['server_id']); $server_ini_array = ini_to_array(stripslashes($server_ini_rec['config'])); unset($server_ini_rec); -- GitLab From 3a11d23a2f32a1b9b2ec43429917c000017c5eff Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 11:18:57 +0200 Subject: [PATCH 202/287] - changed code to use new method of passing values to datalogUpdate and datalogInsert --- interface/lib/classes/aps_crawler.inc.php | 18 +++-- .../lib/classes/aps_guicontroller.inc.php | 27 +++++-- interface/lib/classes/db_mysql.inc.php | 17 +++-- interface/lib/classes/remote.d/dns.inc.php | 72 +++++++++++++------ interface/lib/classes/remote.d/sites.inc.php | 4 +- interface/lib/classes/remoting_lib.inc.php | 11 +-- interface/lib/classes/tform_base.inc.php | 1 + .../plugins/mail_mail_domain_plugin.inc.php | 17 +++-- .../sites_web_vhost_domain_plugin.inc.php | 33 ++++----- .../lib/plugins/vm_openvz_plugin.inc.php | 23 ++++-- .../web/admin/software_package_install.php | 11 ++- interface/web/admin/software_package_list.php | 12 ++-- interface/web/admin/software_update_list.php | 10 ++- interface/web/admin/users_edit.php | 2 +- interface/web/client/client_edit.php | 4 +- interface/web/client/reseller_edit.php | 2 +- interface/web/dashboard/ajax_get_json.php | 2 +- interface/web/dns/dns_a_edit.php | 6 +- interface/web/dns/dns_aaaa_edit.php | 6 +- interface/web/dns/dns_alias_edit.php | 6 +- interface/web/dns/dns_cname_edit.php | 6 +- interface/web/dns/dns_dkim_edit.php | 6 +- interface/web/dns/dns_dmarc_edit.php | 6 +- interface/web/dns/dns_hinfo_edit.php | 6 +- interface/web/dns/dns_import.php | 58 +++++++++++---- interface/web/dns/dns_mx_edit.php | 6 +- interface/web/dns/dns_ns_edit.php | 6 +- interface/web/dns/dns_ptr_edit.php | 6 +- interface/web/dns/dns_rp_edit.php | 6 +- interface/web/dns/dns_rr_del.php | 2 +- interface/web/dns/dns_spf_edit.php | 6 +- interface/web/dns/dns_srv_edit.php | 6 +- interface/web/dns/dns_txt_edit.php | 6 +- interface/web/dns/dns_wizard.php | 72 +++++++++++++------ interface/web/mail/mail_aliasdomain_edit.php | 4 +- interface/web/mail/mail_domain_edit.php | 53 +++++++++----- interface/web/mail/mail_user_edit.php | 42 ++++++++--- interface/web/mail/xmpp_domain_edit.php | 2 +- .../mailuser/mail_user_spamfilter_edit.php | 17 ++++- interface/web/sites/database_user_del.php | 4 +- interface/web/tools/dns_import_tupa.php | 62 +++++++++++----- interface/web/tools/import_vpopmail.php | 64 +++++++++++++++-- interface/web/tools/resync.php | 4 +- .../classes/cron.d/300-quota_notify.inc.php | 18 ++--- server/lib/classes/cron.d/400-openvz.inc.php | 2 +- server/lib/classes/cron.d/600-cleanup.inc.php | 2 +- server/lib/classes/db_mysql.inc.php | 16 +++-- 47 files changed, 527 insertions(+), 245 deletions(-) diff --git a/interface/lib/classes/aps_crawler.inc.php b/interface/lib/classes/aps_crawler.inc.php index 5349be0b1..9331e4298 100644 --- a/interface/lib/classes/aps_crawler.inc.php +++ b/interface/lib/classes/aps_crawler.inc.php @@ -357,7 +357,7 @@ class ApsCrawler extends ApsBase if(file_exists($old_folder)) $this->removeDirectory($old_folder); $tmp = $app->db->queryOneRecord("SELECT id FROM aps_packages WHERE name = ? AND CONCAT(version, '-', CAST(`release` AS CHAR)) = ?", $app_name, $ex_ver); - $app->db->datalogUpdate('aps_packages', "package_status = ".PACKAGE_OUTDATED, 'id', $tmp['id']); + $app->db->datalogUpdate('aps_packages', array("package_status" => PACKAGE_OUTDATED), 'id', $tmp['id']); unset($tmp); } @@ -537,7 +537,7 @@ class ApsCrawler extends ApsBase $diff = array_diff($existing_packages, $pkg_list); foreach($diff as $todelete) { $tmp = $app->db->queryOneRecord("SELECT id FROM aps_packages WHERE path = ?", $todelete); - $app->db->datalogUpdate('aps_packages', "package_status = ".PACKAGE_ERROR_NOMETA, 'id', $tmp['id']); + $app->db->datalogUpdate('aps_packages', array("package_status" => PACKAGE_ERROR_NOMETA), 'id', $tmp['id']); unset($tmp); } @@ -569,11 +569,15 @@ class ApsCrawler extends ApsBase // Insert only if data is complete if($pkg != '' && $pkg_name != '' && $pkg_category != '' && $pkg_version != '' && $pkg_release != '' && $pkg_url){ - $insert_data = "(`path`, `name`, `category`, `version`, `release`, `package_url`, `package_status`) VALUES - ('".$app->db->quote($pkg)."', '".$app->db->quote($pkg_name)."', - '".$app->db->quote($pkg_category)."', '".$app->db->quote($pkg_version)."', - ".$app->db->quote($pkg_release).", '".$app->db->quote($pkg_url)."', ".PACKAGE_ENABLED.");"; - + $insert_data = array( + "path" => $pkg, + "name" => $pkg_name, + "category" => $pkg_category, + "version" => $pkg_version, + "release" => $pkg_release, + "package_url" => $pkg_url, + "package_status" => PACKAGE_ENABLED + ); $app->db->datalogInsert('aps_packages', $insert_data, 'id'); } else { if(file_exists($this->interface_pkg_dir.'/'.$pkg)) $this->removeDirectory($this->interface_pkg_dir.'/'.$pkg); diff --git a/interface/lib/classes/aps_guicontroller.inc.php b/interface/lib/classes/aps_guicontroller.inc.php index 84da2e0a3..db1c1487f 100644 --- a/interface/lib/classes/aps_guicontroller.inc.php +++ b/interface/lib/classes/aps_guicontroller.inc.php @@ -356,12 +356,12 @@ class ApsGUIController extends ApsBase //* Set PHP mode to php-fcgi and enable suexec in website on apache servers / set PHP mode to PHP-FPM on nginx servers if($web_config['server_type'] == 'apache') { if(($websrv['php'] != 'fast-cgi' || $websrv['suexec'] != 'y') && $websrv['php'] != 'php-fpm') { - $app->db->datalogUpdate('web_domain', "php = 'fast-cgi', suexec = 'y'", 'domain_id', $websrv['domain_id']); + $app->db->datalogUpdate('web_domain', array("php" => 'fast-cgi', "suexec" => 'y'), 'domain_id', $websrv['domain_id']); } } else { // nginx if($websrv['php'] != 'php-fpm' && $websrv['php'] != 'fast-cgi') { - $app->db->datalogUpdate('web_domain', "php = 'php-fpm'", 'domain_id', $websrv['domain_id']); + $app->db->datalogUpdate('web_domain', array("php" => 'php-fpm'), 'domain_id', $websrv['domain_id']); } } @@ -378,19 +378,34 @@ class ApsGUIController extends ApsBase } //* Insert new package instance - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `customer_id`, `package_id`, `instance_status`) VALUES (".$app->functions->intval($websrv['sys_userid']).", ".$app->functions->intval($websrv['sys_groupid']).", 'riud', '".$app->db->quote($websrv['sys_perm_group'])."', '', ".$app->db->quote($webserver_id).",".$app->db->quote($customerid).", ".$app->db->quote($packageid).", ".INSTANCE_PENDING.")"; + $insert_data = array( + "sys_userid" => $websrv['sys_userid'], + "sys_groupid" => $websrv['sys_groupid'], + "sys_perm_user" => 'riud', + "sys_perm_group" => $websrv['sys_perm_group'], + "sys_perm_other" => '', + "server_id" => $webserver_id, + "customer_id" => $customerid, + "package_id" => $packageid, + "instance_status" => INSTANCE_PENDING + ); $InstanceID = $app->db->datalogInsert('aps_instances', $insert_data, 'id'); //* Insert all package settings if(is_array($settings)) { foreach($settings as $key => $value) { - $insert_data = "(server_id, instance_id, name, value) VALUES (".$app->db->quote($webserver_id).",".$app->db->quote($InstanceID).", '".$app->db->quote($key)."', '".$app->db->quote($value)."')"; + $insert_data = array( + "server_id" => $webserver_id, + "instance_id" => $InstanceID, + "name" => $key, + "value" => $value + ); $app->db->datalogInsert('aps_instances_settings', $insert_data, 'id'); } } //* Set package status to install afetr we inserted the settings - $app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_INSTALL, 'id', $InstanceID); + $app->db->datalogUpdate('aps_instances', array("instance_status" => INSTANCE_INSTALL), 'id', $InstanceID); } /** @@ -413,7 +428,7 @@ class ApsGUIController extends ApsBase if($tmp['cnt'] < 1) $app->db->datalogDelete('web_database_user', 'database_user_id', $database_user); } - $app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_REMOVE, 'id', $instanceid); + $app->db->datalogUpdate('aps_instances', array("instance_status" => INSTANCE_REMOVE), 'id', $instanceid); } diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index d3ca38314..4d8068cca 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -137,13 +137,17 @@ class db extends mysqli } else { if(is_int($sValue) || is_float($sValue)) { $sTxt = $sValue; - } elseif(is_string($sValue) && (strcmp($sValue, '#NULL#') == 0)) { + } elseif(is_null($sValue) || (is_string($sValue) && (strcmp($sValue, '#NULL#') == 0))) { $sTxt = 'NULL'; } elseif(is_array($sValue)) { - $sTxt = ''; - foreach($sValue as $sVal) $sTxt .= ',\'' . $this->escape($sVal) . '\''; - $sTxt = '(' . substr($sTxt, 1) . ')'; - if($sTxt == '()') $sTxt = '(0)'; + if(isset($sValue['SQL'])) { + $sTxt = $sValue['SQL']; + } else { + $sTxt = ''; + foreach($sValue as $sVal) $sTxt .= ',\'' . $this->escape($sVal) . '\''; + $sTxt = '(' . substr($sTxt, 1) . ')'; + if($sTxt == '()') $sTxt = '(0)'; + } } else { $sTxt = '\'' . $this->escape($sValue) . '\''; } @@ -578,7 +582,6 @@ class db extends mysqli if(!preg_match('/^[a-zA-Z0-9\-\_\.]{1,64}$/',$db_table)) $app->error('Invalid table name '.$db_table); if(!preg_match('/^[a-zA-Z0-9\-\_]{1,64}$/',$primary_field)) $app->error('Invalid primary field '.$primary_field.' in table '.$db_table); - $primary_field = $this->quote($primary_field); $primary_id = intval($primary_id); if($force_update == true) { @@ -643,6 +646,7 @@ class db extends mysqli /* TODO: deprecate this method! */ $insert_data_str = $insert_data; $this->query("INSERT INTO ?? $insert_data_str", $tablename); + $app->log("deprecated use of passing values to datalogInsert() - table " . $tablename, 1); } $old_rec = array(); @@ -679,6 +683,7 @@ class db extends mysqli /* TODO: deprecate this method! */ $update_data_str = $update_data; $this->query("UPDATE ?? SET $update_data_str WHERE ?? = ?", $tablename, $index_field, $index_value); + $app->log("deprecated use of passing values to datalogUpdate() - table " . $tablename, 1); } $new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value); diff --git a/interface/lib/classes/remote.d/dns.inc.php b/interface/lib/classes/remote.d/dns.inc.php index f107c1676..57f7040e2 100644 --- a/interface/lib/classes/remote.d/dns.inc.php +++ b/interface/lib/classes/remote.d/dns.inc.php @@ -95,11 +95,11 @@ class remoting_dns extends remoting { if($section == 'dns_records') { $parts = explode('|', $row); $dns_rr[] = array( - 'name' => $app->db->quote($parts[1]), - 'type' => $app->db->quote($parts[0]), - 'data' => $app->db->quote($parts[2]), - 'aux' => $app->db->quote($parts[3]), - 'ttl' => $app->db->quote($parts[4]) + 'name' => $parts[1], + 'type' => $parts[0], + 'data' => $parts[2], + 'aux' => $parts[3], + 'ttl' => $parts[4] ); } } @@ -121,26 +121,58 @@ class remoting_dns extends remoting { $sys_userid = $tmp['userid']; $sys_groupid = $tmp['default_group']; unset($tmp); - $origin = $app->db->quote($vars['origin']); - $ns = $app->db->quote($vars['ns']); - $mbox = $app->db->quote(str_replace('@', '.', $vars['mbox'])); - $refresh = $app->db->quote($vars['refresh']); - $retry = $app->db->quote($vars['retry']); - $expire = $app->db->quote($vars['expire']); - $minimum = $app->db->quote($vars['minimum']); - $ttl = $app->db->quote($vars['ttl']); - $xfer = $app->db->quote($vars['xfer']); - $also_notify = $app->db->quote($vars['also_notify']); - $update_acl = $app->db->quote($vars['update_acl']); + $origin = $vars['origin']; + $ns = $vars['ns']; + $mbox = str_replace('@', '.', $vars['mbox']); + $refresh = $vars['refresh']; + $retry = $vars['retry']; + $expire = $vars['expire']; + $minimum = $vars['minimum']; + $ttl = $vars['ttl']; + $xfer = $vars['xfer']; + $also_notify = $vars['also_notify']; + $update_acl = $vars['update_acl']; $serial = $app->validate_dns->increase_serial(0); - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `origin`, `ns`, `mbox`, `serial`, `refresh`, `retry`, `expire`, `minimum`, `ttl`, `active`, `xfer`, `also_notify`, `update_acl`) VALUES - ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$origin', '$ns', '$mbox', '$serial', '$refresh', '$retry', '$expire', '$minimum', '$ttl', 'Y', '$xfer', '$also_notify', '$update_acl')"; + $insert_data = array( + "sys_userid" => $sys_userid, + "sys_groupid" => $sys_groupid, + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $server_id, + "origin" => $origin, + "ns" => $ns, + "mbox" => $mbox, + "serial" => $serial, + "refresh" => $refresh, + "retry" => $retry, + "expire" => $expire, + "minimum" => $minimum, + "ttl" => $ttl, + "active" => 'Y', + "xfer" => $xfer, + "also_notify" => $also_notify, + "update_acl" => $update_acl + ); $dns_soa_id = $app->db->datalogInsert('dns_soa', $insert_data, 'id'); // Insert the dns_rr records if(is_array($dns_rr) && $dns_soa_id > 0) { foreach($dns_rr as $rr) { - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `zone`, `name`, `type`, `data`, `aux`, `ttl`, `active`) VALUES - ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$dns_soa_id', '$rr[name]', '$rr[type]', '$rr[data]', '$rr[aux]', '$rr[ttl]', 'Y')"; + $insert_data = array( + "sys_userid" => $sys_userid, + "sys_groupid" => $sys_groupid, + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $server_id, + "zone" => $dns_soa_id, + "name" => $rr['name'], + "type" => $rr['type'], + "data" => $rr['data'], + "aux" => $rr['aux'], + "ttl" => $rr['ttl'], + "active" => 'Y' + ); $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id'); } } diff --git a/interface/lib/classes/remote.d/sites.inc.php b/interface/lib/classes/remote.d/sites.inc.php index f4e6a79a5..1c112e5e5 100644 --- a/interface/lib/classes/remote.d/sites.inc.php +++ b/interface/lib/classes/remote.d/sites.inc.php @@ -266,12 +266,12 @@ class remoting_sites extends remoting { $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE database_user_id = ?", $primary_id); foreach($records as $rec) { - $app->db->datalogUpdate('web_database', 'database_user_id=NULL', 'database_id', $rec['database_id']); + $app->db->datalogUpdate('web_database', array('database_user_id' => null), 'database_id', $rec['database_id']); } $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE database_ro_user_id = ?", $primary_id); foreach($records as $rec) { - $app->db->datalogUpdate('web_database', 'database_ro_user_id=NULL', 'database_id', $rec['database_id']); + $app->db->datalogUpdate('web_database', array('database_ro_user_id' => null), 'database_id', $rec['database_id']); } return $affected_rows; diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php index a2e398895..9ee3ca547 100644 --- a/interface/lib/classes/remoting_lib.inc.php +++ b/interface/lib/classes/remoting_lib.inc.php @@ -238,22 +238,23 @@ class remoting_lib extends tform_base { $sql_offset = 0; $sql_limit = 0; $sql_where = ''; + $params = array($this->formDef['db_table']); foreach($primary_id as $key => $val) { - $key = $app->db->quote($key); - $val = $app->db->quote($val); if($key == '#OFFSET#') $sql_offset = $app->functions->intval($val); elseif($key == '#LIMIT#') $sql_limit = $app->functions->intval($val); elseif(stristr($val, '%')) { - $sql_where .= "$key like '$val' AND "; + $sql_where .= "? like ? AND "; } else { - $sql_where .= "$key = '$val' AND "; + $sql_where .= "? = ? AND "; } + $params[] = $key; + $params[] = $val; } $sql_where = substr($sql_where, 0, -5); if($sql_where == '') $sql_where = '1'; $sql = "SELECT * FROM ?? WHERE ".$sql_where. " AND " . $this->getAuthSQL('r', $this->formDef['db_table']); if($sql_offset >= 0 && $sql_limit > 0) $sql .= ' LIMIT ' . $sql_offset . ',' . $sql_limit; - return $app->db->queryAllRecords($sql, $this->formDef['db_table']); + return $app->db->queryAllRecords($sql, true, $params); } else { $this->errorMessage = 'The ID must be either an integer or an array.'; return array(); diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index fb374346a..f5ae05b8e 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -1108,6 +1108,7 @@ class tform_base { * @param primary_id * @return record */ + /* TODO: check for double quoting */ protected function _getSQL($record, $tab, $action = 'INSERT', $primary_id = 0, $sql_ext_where = '', $api = false) { global $app; diff --git a/interface/lib/plugins/mail_mail_domain_plugin.inc.php b/interface/lib/plugins/mail_mail_domain_plugin.inc.php index b307f2567..90b1ac15b 100644 --- a/interface/lib/plugins/mail_mail_domain_plugin.inc.php +++ b/interface/lib/plugins/mail_mail_domain_plugin.inc.php @@ -73,9 +73,8 @@ class mail_mail_domain_plugin { $mail_parts = explode("@", $rec['email']); $maildir = str_replace("[domain]", $page_form->dataRecord['domain'], $mail_config["maildir_path"]); $maildir = str_replace("[localpart]", $mail_parts[0], $maildir); - $maildir = $app->db->quote($maildir); - $email = $app->db->quote($mail_parts[0].'@'.$page_form->dataRecord['domain']); - $app->db->datalogUpdate('mail_user', "maildir = '$maildir', email = '$email', sys_userid = $client_user_id, sys_groupid = '$sys_groupid'", 'mailuser_id', $rec['mailuser_id']); + $email = $mail_parts[0].'@'.$page_form->dataRecord['domain']; + $app->db->datalogUpdate('mail_user', array("maildir" => $maildir, "email" => $email, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailuser_id', $rec['mailuser_id']); } } @@ -83,9 +82,9 @@ class mail_mail_domain_plugin { $forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source LIKE ? OR destination LIKE ?", "%@" . $page_form->oldDataRecord['domain'], "%@" . $page_form->oldDataRecord['domain']); if(is_array($forwardings)) { foreach($forwardings as $rec) { - $destination = $app->db->quote(str_replace($page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $rec['destination'])); - $source = $app->db->quote(str_replace($page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $rec['source'])); - $app->db->datalogUpdate('mail_forwarding', "source = '$source', destination = '$destination', sys_userid = $client_user_id, sys_groupid = '$sys_groupid'", 'forwarding_id', $rec['forwarding_id']); + $destination = str_replace($page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $rec['destination']); + $source = str_replace($page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $rec['source']); + $app->db->datalogUpdate('mail_forwarding', array("source" => $source, "destination" => $destination, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'forwarding_id', $rec['forwarding_id']); } } @@ -93,7 +92,7 @@ class mail_mail_domain_plugin { $mailing_lists = $app->db->queryAllRecords("SELECT mailinglist_id FROM mail_mailinglist WHERE domain = ?", $page_form->oldDataRecord['domain']); if(is_array($mailing_lists)) { foreach($mailing_lists as $rec) { - $app->db->datalogUpdate('mail_mailinglist', "sys_userid = $client_user_id, sys_groupid = '$sys_groupid'", 'mailinglist_id', $rec['mailinglist_id']); + $app->db->datalogUpdate('mail_mailinglist', array("sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailinglist_id', $rec['mailinglist_id']); } } @@ -101,8 +100,8 @@ class mail_mail_domain_plugin { $mail_gets = $app->db->queryAllRecords("SELECT mailget_id, destination FROM mail_get WHERE destination LIKE ?", "%@" . $page_form->oldDataRecord['domain']); if(is_array($mail_gets)) { foreach($mail_gets as $rec) { - $destination = $app->db->quote(str_replace($page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $rec['destination'])); - $app->db->datalogUpdate('mail_get', "destination = '$destination', sys_userid = $client_user_id, sys_groupid = '$sys_groupid'", 'mailget_id', $rec['mailget_id']); + $destination = str_replace($page_form->oldDataRecord['domain'], $page_form->dataRecord['domain'], $rec['destination']); + $app->db->datalogUpdate('mail_get', array("destination" => $destination, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailget_id', $rec['mailget_id']); } } diff --git a/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php b/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php index dedc6d721..aeb562399 100644 --- a/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php +++ b/interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php @@ -107,7 +107,7 @@ class sites_web_vhost_domain_plugin { // Update the FTP user(s) too $records = $app->db->queryAllRecords("SELECT ftp_user_id FROM ftp_user WHERE parent_domain_id = ?", $page_form->id); foreach($records as $rec) { - $app->db->datalogUpdate('ftp_user', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."', uid = '$system_user', gid = '$system_group', dir = '$document_root'", 'ftp_user_id', $app->functions->intval($rec['ftp_user_id'])); + $app->db->datalogUpdate('ftp_user', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid'], "uid" => $system_user, "gid" => $system_group, "dir" => $document_root), 'ftp_user_id', $app->functions->intval($rec['ftp_user_id'])); } unset($records); unset($rec); @@ -115,7 +115,7 @@ class sites_web_vhost_domain_plugin { // Update the webdav user(s) too $records = $app->db->queryAllRecords("SELECT webdav_user_id FROM webdav_user WHERE parent_domain_id = ?", $page_form->id); foreach($records as $rec) { - $app->db->datalogUpdate('webdav_user', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'webdav_user_id', $app->functions->intval($rec['webdav_user_id'])); + $app->db->datalogUpdate('webdav_user', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']), 'webdav_user_id', $app->functions->intval($rec['webdav_user_id'])); } unset($records); unset($rec); @@ -123,7 +123,7 @@ class sites_web_vhost_domain_plugin { // Update the web folder(s) too $records = $app->db->queryAllRecords("SELECT web_folder_id FROM web_folder WHERE parent_domain_id = ?", $page_form->id); foreach($records as $rec) { - $app->db->datalogUpdate('web_folder', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'web_folder_id', $app->functions->intval($rec['web_folder_id'])); + $app->db->datalogUpdate('web_folder', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']), 'web_folder_id', $app->functions->intval($rec['web_folder_id'])); } unset($records); unset($rec); @@ -131,7 +131,7 @@ class sites_web_vhost_domain_plugin { //* Update all web folder users $records = $app->db->queryAllRecords("SELECT web_folder_user.web_folder_user_id FROM web_folder_user, web_folder WHERE web_folder_user.web_folder_id = web_folder.web_folder_id AND web_folder.parent_domain_id = ?", $page_form->id); foreach($records as $rec) { - $app->db->datalogUpdate('web_folder_user', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'web_folder_user_id', $app->functions->intval($rec['web_folder_user_id'])); + $app->db->datalogUpdate('web_folder_user', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']), 'web_folder_user_id', $app->functions->intval($rec['web_folder_user_id'])); } unset($records); unset($rec); @@ -139,7 +139,7 @@ class sites_web_vhost_domain_plugin { // Update the Shell user(s) too $records = $app->db->queryAllRecords("SELECT shell_user_id FROM shell_user WHERE parent_domain_id = ?", $page_form->id); foreach($records as $rec) { - $app->db->datalogUpdate('shell_user', "sys_userid = '".$web_rec['sys_userid']."', sys_groupid = '".$web_rec['sys_groupid']."', puser = '$system_user', pgroup = '$system_group', dir = '$document_root'", 'shell_user_id', $app->functions->intval($rec['shell_user_id'])); + $app->db->datalogUpdate('shell_user', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid'], "puser" => $system_user, "pgroup" => $system_group, "dir" => $document_root), 'shell_user_id', $app->functions->intval($rec['shell_user_id'])); } unset($records); unset($rec); @@ -147,7 +147,7 @@ class sites_web_vhost_domain_plugin { // Update the cron(s) too $records = $app->db->queryAllRecords("SELECT id FROM cron WHERE parent_domain_id = ?", $page_form->id); foreach($records as $rec) { - $app->db->datalogUpdate('cron', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'id', $app->functions->intval($rec['id'])); + $app->db->datalogUpdate('cron', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']), 'id', $app->functions->intval($rec['id'])); } unset($records); unset($rec); @@ -155,14 +155,15 @@ class sites_web_vhost_domain_plugin { //* Update all subdomains and alias domains $records = $app->db->queryAllRecords("SELECT domain_id, `domain`, `type`, `web_folder` FROM web_domain WHERE parent_domain_id = ?", $page_form->id); foreach($records as $rec) { - $update_columns = "sys_userid = '".$web_rec['sys_userid']."', sys_groupid = '".$web_rec['sys_groupid']."'"; + $update_columns = array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']); if($rec['type'] == 'vhostsubdomain' || $rec['type'] == 'vhostalias') { $php_open_basedir = str_replace("[website_path]/web", $document_root.'/'.$rec['web_folder'], $web_config["php_open_basedir"]); $php_open_basedir = str_replace("[website_domain]/web", $rec['domain'].'/'.$rec['web_folder'], $php_open_basedir); $php_open_basedir = str_replace("[website_path]", $document_root, $php_open_basedir); - $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $rec['domain'], $php_open_basedir)); + $php_open_basedir = str_replace("[website_domain]", $rec['domain'], $php_open_basedir); - $update_columns .= ", document_root = '".$document_root."', `php_open_basedir` = '".$php_open_basedir."'"; + $update_columns["document_root"] = $document_root; + $update_columns["php_open_basedir"] = $php_open_basedir; } $app->db->datalogUpdate('web_domain', $update_columns, 'domain_id', $rec['domain_id']); } @@ -172,13 +173,13 @@ class sites_web_vhost_domain_plugin { //* Update all databases $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE parent_domain_id = ?", $page_form->id); foreach($records as $rec) { - $app->db->datalogUpdate('web_database', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'database_id', $app->functions->intval($rec['database_id'])); + $app->db->datalogUpdate('web_database', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']), 'database_id', $app->functions->intval($rec['database_id'])); } //* Update all database users $records = $app->db->queryAllRecords("SELECT web_database_user.database_user_id FROM web_database_user, web_database WHERE web_database_user.database_user_id IN (web_database.database_user_id, web_database.database_ro_user_id) AND web_database.parent_domain_id = ?", $page_form->id); foreach($records as $rec) { - $app->db->datalogUpdate('web_database_user', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'database_user_id', $app->functions->intval($rec['database_user_id'])); + $app->db->datalogUpdate('web_database_user', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid']), 'database_user_id', $app->functions->intval($rec['database_user_id'])); } unset($records); unset($rec); @@ -187,7 +188,7 @@ class sites_web_vhost_domain_plugin { $records = $app->db->queryAllRecords("SELECT instance_id FROM aps_instances_settings WHERE name = 'main_domain' AND value = ?", $page_form->oldDataRecord["domain"]); if(is_array($records) && !empty($records)){ foreach($records as $rec){ - $app->db->datalogUpdate('aps_instances', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."', customer_id = '".$app->functions->intval($client_id)."'", 'id', $rec['instance_id']); + $app->db->datalogUpdate('aps_instances', array("sys_userid" => $web_rec['sys_userid'], "sys_groupid" => $web_rec['sys_groupid'], "customer_id" => $client_id), 'id', $rec['instance_id']); } } unset($records); @@ -199,8 +200,8 @@ class sites_web_vhost_domain_plugin { if(!empty($page_form->dataRecord["domain"]) && !empty($page_form->oldDataRecord["domain"]) && $page_form->dataRecord["domain"] != $page_form->oldDataRecord["domain"]) { $records = $app->db->queryAllRecords("SELECT domain_id,domain FROM web_domain WHERE (type = 'subdomain' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND domain LIKE ?", "%." . $page_form->oldDataRecord["domain"]); foreach($records as $rec) { - $subdomain = $app->db->quote(str_replace($page_form->oldDataRecord["domain"], $page_form->dataRecord["domain"], $rec['domain'])); - $app->db->datalogUpdate('web_domain', "domain = '".$subdomain."'", 'domain_id', $rec['domain_id']); + $subdomain = str_replace($page_form->oldDataRecord["domain"], $page_form->dataRecord["domain"], $rec['domain']); + $app->db->datalogUpdate('web_domain', array("domain" => $subdomain), 'domain_id', $rec['domain_id']); } unset($records); unset($rec); @@ -210,7 +211,7 @@ class sites_web_vhost_domain_plugin { $records = $app->db->queryAllRecords("SELECT id, instance_id FROM aps_instances_settings WHERE name = 'main_domain' AND value = ?", $page_form->oldDataRecord["domain"]); if(is_array($records) && !empty($records)){ foreach($records as $rec){ - $app->db->datalogUpdate('aps_instances_settings', "value = '".$app->db->quote($page_form->dataRecord["domain"])."'", 'id', $rec['id']); + $app->db->datalogUpdate('aps_instances_settings', array("value" => $page_form->dataRecord["domain"]), 'id', $rec['id']); } } unset($records); @@ -259,7 +260,7 @@ class sites_web_vhost_domain_plugin { if(isset($page_form->dataRecord['ip_address']) && ($page_form->dataRecord['ip_address'] != $page_form->oldDataRecord['ip_address'] || $page_form->dataRecord['ipv6_address'] != $page_form->oldDataRecord['ipv6_address'])) { $records = $app->db->queryAllRecords("SELECT domain_id FROM web_domain WHERE (type = 'vhostsubdomain' OR type = 'vhostalias') AND parent_domain_id = ?", $page_form->id); foreach($records as $rec) { - $app->db->datalogUpdate('web_domain', "ip_address = '".$app->db->quote($web_rec['ip_address'])."', ipv6_address = '".$app->db->quote($web_rec['ipv6_address'])."'", 'domain_id', $rec['domain_id']); + $app->db->datalogUpdate('web_domain', array("ip_address" => $web_rec['ip_address'], "ipv6_address" => $web_rec['ipv6_address']), 'domain_id', $rec['domain_id']); } unset($records); unset($rec); diff --git a/interface/lib/plugins/vm_openvz_plugin.inc.php b/interface/lib/plugins/vm_openvz_plugin.inc.php index ac1b0801c..dcd2df735 100644 --- a/interface/lib/plugins/vm_openvz_plugin.inc.php +++ b/interface/lib/plugins/vm_openvz_plugin.inc.php @@ -112,7 +112,7 @@ class vm_openvz_plugin { //* Free the IP address $tmp = $app->db->queryOneRecord("SELECT ip_address_id FROM openvz_ip WHERE vm_id = ?", $page_form->id); - $app->db->datalogUpdate('openvz_ip', 'vm_id = 0', 'ip_address_id', $tmp['ip_address_id']); + $app->db->datalogUpdate('openvz_ip', array('vm_id' => 0), 'ip_address_id', $tmp['ip_address_id']); unset($tmp); } @@ -232,12 +232,25 @@ class vm_openvz_plugin { if($rr_rec['id'] > 0) { $app->uses('validate_dns'); - $app->db->datalogUpdate('dns_rr', "data = '$ip_address'", 'id', $app->functions->intval($rr_rec['id'])); + $app->db->datalogUpdate('dns_rr', array("data" => $ip_address), 'id', $app->functions->intval($rr_rec['id'])); $serial = $app->validate_dns->increase_serial($zone_rec['serial']); - $app->db->datalogUpdate('dns_soa', "serial = '$serial'", 'id', $app->functions->intval($zone_rec['id'])); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $app->functions->intval($zone_rec['id'])); } else { - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `zone`, `name`, `type`, `data`, `aux`, `ttl`, `active`) VALUES - ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$dns_soa_id', '$hostname', 'A', '$ip_address', '0', '3600', 'Y')"; + $insert_data = array( + "sys_userid" => $sys_userid, + "sys_groupid" => $sys_groupid, + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $server_id, + "zone" => $dns_soa_id, + "name" => $hostname, + "type" => 'A', + "data" => $ip_address, + "aux" => '0', + "ttl" => '3600', + "active" => 'Y' + ); $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id'); } diff --git a/interface/web/admin/software_package_install.php b/interface/web/admin/software_package_install.php index 864e8d724..ccbfd73eb 100644 --- a/interface/web/admin/software_package_install.php +++ b/interface/web/admin/software_package_install.php @@ -63,7 +63,7 @@ if($package['package_installable'] == 'key' && $install_key != '') { $message_err = 'Verification of the key failed.'; } else { // Store the verified key into the database - $app->db->datalogUpdate('software_package', "package_key = '".$app->db->quote($install_key)."'", 'package_id', $package['package_id']); + $app->db->datalogUpdate('software_package', array("package_key" => $install_key), 'package_id', $package['package_id']); } } else { $message_ok = 'Please enter the software key for the package.'; @@ -91,7 +91,7 @@ if($install_server_id > 0 && $package_name != '' && ($package['package_installab 'database_host' => 'localhost'); $package_config_str = $app->ini_parser->get_ini_string($package_config_array); $package['package_config'] = $package_config_str; - $app->db->datalogUpdate('software_package', "package_config = '".$app->db->quote($package_config_str)."'", 'package_id', $package['package_id']); + $app->db->datalogUpdate('software_package', array("package_config" => $package_config_str), 'package_id', $package['package_id']); } } @@ -127,7 +127,12 @@ if($install_server_id > 0 && $package_name != '' && ($package['package_installab } //* Add the record to start the install process - $insert_data = "(package_name, server_id, software_update_id, status) VALUES ('".$app->db->quote($package_name)."', '".$app->db->quote($install_server_id)."', '".$app->db->quote($software_update_id)."','installing')"; + $insert_data = array( + "package_name" => $package_name, + "server_id" => $install_server_id, + "software_update_id" => $software_update_id, + "status" => 'installing' + ); $app->db->datalogInsert('software_update_inst', $insert_data, 'software_update_inst_id'); $message_ok = 'Starting package installation '."".$app->lng('next').""; diff --git a/interface/web/admin/software_package_list.php b/interface/web/admin/software_package_list.php index 19e637a6e..5e552dbee 100644 --- a/interface/web/admin/software_package_list.php +++ b/interface/web/admin/software_package_list.php @@ -104,13 +104,13 @@ if(is_array($repos) && isset($_GET['action']) && $_GET['action'] == 'repoupdate' $v3 = $app->functions->intval($version_array[2]); $v4 = $app->functions->intval($version_array[3]); - $package_name = $app->db->quote($u['package_name']); + $package_name = $u['package_name']; $software_repo_id = $app->functions->intval($repo['software_repo_id']); - $update_url = $app->db->quote($u['url']); - $update_md5 = $app->db->quote($u['md5']); - $update_dependencies = (isset($u['dependencies']))?$app->db->quote($u['dependencies']):''; - $update_title = $app->db->quote($u['title']); - $type = $app->db->quote($u['type']); + $update_url = $u['url']; + $update_md5 = $u['md5']; + $update_dependencies = (isset($u['dependencies']))?$u['dependencies']:''; + $update_title = $u['title']; + $type = $u['type']; // Check that we do not have this update in the database yet $sql = "SELECT * FROM software_update WHERE package_name = ? and v1 = ? and v2 = ? and v3 = ? and v4 = ?"; diff --git a/interface/web/admin/software_update_list.php b/interface/web/admin/software_update_list.php index cc22b8053..c987e9e04 100644 --- a/interface/web/admin/software_update_list.php +++ b/interface/web/admin/software_update_list.php @@ -101,12 +101,16 @@ if(is_array($repos)) { //* Install packages, if GET Request if(isset($_GET['action']) && $_GET['action'] == 'install' && $_GET['package'] != '' && $_GET['server_id'] > 0) { - $package_name = $app->db->quote($_GET['package']); + $package_name = $_GET['package']; $server_id = $app->functions->intval($_GET['server_id']); $software_update_id = $app->functions->intval($_GET['id']); - $insert_data = "(package_name, server_id, software_update_id, status) VALUES ('$package_name', '$server_id', '$software_update_id','installing')"; - // $insert_data = "(package_name, server_id, software_update_id, status) VALUES ('$package_name', '$server_id', '$software_update_id','installed')"; + $insert_data = array( + "package_name" => $package_name, + "server_id" => $server_id, + "software_update_id" => $software_update_id, + "status" => 'installing' + ); $app->db->datalogInsert('software_update_inst', $insert_data, 'software_update_inst_id'); } diff --git a/interface/web/admin/users_edit.php b/interface/web/admin/users_edit.php index 11f783c2a..e3919649b 100644 --- a/interface/web/admin/users_edit.php +++ b/interface/web/admin/users_edit.php @@ -106,7 +106,7 @@ class page_action extends tform_actions { $sql = "UPDATE client SET username = ? WHERE client_id = ? AND username = ?"; $app->db->query($sql, $username, $client_id, $old_username); $tmp = $app->db->queryOneRecord("SELECT * FROM sys_group WHERE client_id = ?", $client_id); - $app->db->datalogUpdate("sys_group", "name = '$username'", 'groupid', $tmp['groupid']); + $app->db->datalogUpdate("sys_group", array("name" => $username), 'groupid', $tmp['groupid']); unset($tmp); } diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php index f9bd9a00c..bbeb82223 100644 --- a/interface/web/client/client_edit.php +++ b/interface/web/client/client_edit.php @@ -241,7 +241,7 @@ class page_action extends tform_actions { function onAfterInsert() { global $app, $conf; // Create the group for the client - $groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('".$app->db->quote($this->dataRecord["username"])."','',".$this->id.")", 'groupid'); + $groupid = $app->db->datalogInsert('sys_group', array("name" => $this->dataRecord["username"], "description" => '', "client_id" => $this->id), 'groupid'); $groups = $groupid; $username = $this->dataRecord["username"]; @@ -325,7 +325,7 @@ class page_action extends tform_actions { //* save new counter value $system_config['misc']['customer_no_counter']++; $system_config_str = $app->ini_parser->get_ini_string($system_config); - $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($system_config_str)."'", 'sysini_id', 1); + $app->db->datalogUpdate('sys_ini', array("config" => $system_config_str), 'sysini_id', 1); } } else { //* Logged in user must be a reseller diff --git a/interface/web/client/reseller_edit.php b/interface/web/client/reseller_edit.php index 686c99e5c..fff420206 100644 --- a/interface/web/client/reseller_edit.php +++ b/interface/web/client/reseller_edit.php @@ -200,7 +200,7 @@ class page_action extends tform_actions { function onAfterInsert() { global $app, $conf; // Create the group for the reseller - $groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('".$app->db->quote($this->dataRecord["username"])."','',".$this->id.")", 'groupid'); + $groupid = $app->db->datalogInsert('sys_group', array("name" => $this->dataRecord["username"], "description" => '', "client_id" => $this->id), 'groupid'); $groups = $groupid; $username = $this->dataRecord["username"]; diff --git a/interface/web/dashboard/ajax_get_json.php b/interface/web/dashboard/ajax_get_json.php index 383cc090d..9ebb27e6c 100644 --- a/interface/web/dashboard/ajax_get_json.php +++ b/interface/web/dashboard/ajax_get_json.php @@ -40,7 +40,7 @@ $type = $_GET["type"]; //if($_SESSION["s"]["user"]["typ"] == 'admin') { - +/* TODO: change sql queries */ if($type == 'globalsearch'){ $q = $app->db->quote(trim($_GET["q"])); $authsql = " AND ".$app->tform->getAuthSQL('r'); diff --git a/interface/web/dns/dns_a_edit.php b/interface/web/dns/dns_a_edit.php index 792a90aaa..c70cc7989 100644 --- a/interface/web/dns/dns_a_edit.php +++ b/interface/web/dns/dns_a_edit.php @@ -118,12 +118,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } function onAfterUpdate() { @@ -133,7 +133,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_aaaa_edit.php b/interface/web/dns/dns_aaaa_edit.php index 867dabb94..ca4151ae3 100644 --- a/interface/web/dns/dns_aaaa_edit.php +++ b/interface/web/dns/dns_aaaa_edit.php @@ -113,12 +113,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".intval($soa['sys_groupid']), 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } function onAfterUpdate() { @@ -128,7 +128,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_alias_edit.php b/interface/web/dns/dns_alias_edit.php index 1c58bd8f5..697756bf0 100644 --- a/interface/web/dns/dns_alias_edit.php +++ b/interface/web/dns/dns_alias_edit.php @@ -113,12 +113,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } function onAfterUpdate() { @@ -128,7 +128,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_cname_edit.php b/interface/web/dns/dns_cname_edit.php index 0979b6fff..f9793881b 100644 --- a/interface/web/dns/dns_cname_edit.php +++ b/interface/web/dns/dns_cname_edit.php @@ -118,12 +118,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } function onAfterUpdate() { @@ -133,7 +133,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_dkim_edit.php b/interface/web/dns/dns_dkim_edit.php index 5756484de..a1c4c6f82 100644 --- a/interface/web/dns/dns_dkim_edit.php +++ b/interface/web/dns/dns_dkim_edit.php @@ -127,12 +127,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } function onAfterUpdate() { @@ -142,7 +142,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_dmarc_edit.php b/interface/web/dns/dns_dmarc_edit.php index d7f684dbd..49bf69909 100644 --- a/interface/web/dns/dns_dmarc_edit.php +++ b/interface/web/dns/dns_dmarc_edit.php @@ -350,12 +350,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $app->functions->intval($this->dataRecord["zone"])); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } @@ -366,7 +366,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $app->functions->intval($this->dataRecord["zone"])); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_hinfo_edit.php b/interface/web/dns/dns_hinfo_edit.php index 9a674bf2b..83cf60e14 100644 --- a/interface/web/dns/dns_hinfo_edit.php +++ b/interface/web/dns/dns_hinfo_edit.php @@ -113,12 +113,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } function onAfterUpdate() { @@ -128,7 +128,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_import.php b/interface/web/dns/dns_import.php index 8dee39b13..7e96a42d8 100644 --- a/interface/web/dns/dns_import.php +++ b/interface/web/dns/dns_import.php @@ -695,21 +695,38 @@ if(isset($_FILES['file']['name']) && is_uploaded_file($_FILES['file']['tmp_name' // Insert the soa record $sys_userid = $_SESSION['s']['user']['userid']; - $origin = $app->db->quote($soa['name']); - $ns = $app->db->quote($soa['ns']); - $mbox = $app->db->quote($soa['mbox']); - $refresh = $app->db->quote($soa['refresh']); - $retry = $app->db->quote($soa['retry']); - $expire = $app->db->quote($soa['expire']); - $minimum = $app->db->quote($soa['minimum']); - $ttl = $app->db->quote($soa['ttl']); - $xfer = $app->db->quote(''); - $serial = $app->db->quote($app->functions->intval($soa['serial'])+1); + $origin = $soa['name']; + $ns = $soa['ns']; + $mbox = $soa['mbox']; + $refresh = $soa['refresh']; + $retry = $soa['retry']; + $expire = $soa['expire']; + $minimum = $soa['minimum']; + $ttl = $soa['ttl']; + $xfer = ''; + $serial = $app->functions->intval($soa['serial']+1); //print_r($soa); //die(); if($valid_zone_file){ - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `origin`, `ns`, `mbox`, `serial`, `refresh`, `retry`, `expire`, `minimum`, `ttl`, `active`, `xfer`) VALUES - ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$origin', '$ns', '$mbox', '$serial', '$refresh', '$retry', '$expire', '$minimum', '$ttl', 'Y', '$xfer')"; + $insert_data = array( + "sys_userid" => $sys_userid, + "sys_groupid" => $sys_groupid, + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $server_id, + "origin" => $origin, + "ns" => $ns, + "mbox" => $mbox, + "serial" => $serial, + "refresh" => $refresh, + "retry" => $retry, + "expire" => $expire, + "minimum" => $minimum, + "ttl" => $ttl, + "active" => 'Y', + "xfer" => $xfer + ); $dns_soa_id = $app->db->datalogInsert('dns_soa', $insert_data, 'id'); // Insert the dns_rr records @@ -717,8 +734,21 @@ if(isset($_FILES['file']['name']) && is_uploaded_file($_FILES['file']['tmp_name' { foreach($dns_rr as $rr) { - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `zone`, `name`, `type`, `data`, `aux`, `ttl`, `active`) VALUES - ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$dns_soa_id', '".$app->db->quote($rr['name'])."', '".$app->db->quote($rr['type'])."', '".$app->db->quote($rr['data'])."', '".$app->db->quote($rr['aux'])."', '".$app->db->quote($rr['ttl'])."', 'Y')"; + $insert_data = array( + "sys_userid" => $sys_userid, + "sys_groupid" => $sys_groupid, + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $server_id, + "zone" => $dns_soa_id, + "name" => $rr['name'], + "type" => $rr['type'], + "data" => $rr['data'], + "aux" => $rr['aux'], + "ttl" => $rr['ttl'], + "active" => 'Y' + ); $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id'); } } diff --git a/interface/web/dns/dns_mx_edit.php b/interface/web/dns/dns_mx_edit.php index 0fcf53f7f..c74eab30b 100644 --- a/interface/web/dns/dns_mx_edit.php +++ b/interface/web/dns/dns_mx_edit.php @@ -136,12 +136,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } function onAfterUpdate() { @@ -151,7 +151,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_ns_edit.php b/interface/web/dns/dns_ns_edit.php index 7ed47f0f6..145823683 100644 --- a/interface/web/dns/dns_ns_edit.php +++ b/interface/web/dns/dns_ns_edit.php @@ -113,12 +113,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } function onAfterUpdate() { @@ -128,7 +128,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_ptr_edit.php b/interface/web/dns/dns_ptr_edit.php index 016cee8d5..ed1c11897 100644 --- a/interface/web/dns/dns_ptr_edit.php +++ b/interface/web/dns/dns_ptr_edit.php @@ -113,12 +113,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } function onAfterUpdate() { @@ -128,7 +128,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_rp_edit.php b/interface/web/dns/dns_rp_edit.php index 53cd879a8..d7c2edcc7 100644 --- a/interface/web/dns/dns_rp_edit.php +++ b/interface/web/dns/dns_rp_edit.php @@ -113,12 +113,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } function onAfterUpdate() { @@ -128,7 +128,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_rr_del.php b/interface/web/dns/dns_rr_del.php index 1098b653f..6504123da 100644 --- a/interface/web/dns/dns_rr_del.php +++ b/interface/web/dns/dns_rr_del.php @@ -57,7 +57,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($this->dataRecord["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_spf_edit.php b/interface/web/dns/dns_spf_edit.php index d3ddb6a25..ba770a9cf 100644 --- a/interface/web/dns/dns_spf_edit.php +++ b/interface/web/dns/dns_spf_edit.php @@ -242,12 +242,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT sys_groupid,serial FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $app->functions->intval($this->dataRecord["zone"])); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } @@ -258,7 +258,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $app->functions->intval($this->dataRecord["zone"])); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_srv_edit.php b/interface/web/dns/dns_srv_edit.php index 4589834b6..d9e36251c 100644 --- a/interface/web/dns/dns_srv_edit.php +++ b/interface/web/dns/dns_srv_edit.php @@ -134,12 +134,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } function onAfterUpdate() { @@ -149,7 +149,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_txt_edit.php b/interface/web/dns/dns_txt_edit.php index 20e0c5e76..748e302c6 100644 --- a/interface/web/dns/dns_txt_edit.php +++ b/interface/web/dns/dns_txt_edit.php @@ -113,12 +113,12 @@ class page_action extends tform_actions { //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', "sys_groupid = ".$soa['sys_groupid'], 'id', $this->id); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); //* Update the serial number of the SOA record $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } function onAfterUpdate() { @@ -128,7 +128,7 @@ class page_action extends tform_actions { $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); $soa_id = $app->functions->intval($_POST["zone"]); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php index 666ff6a6b..17dba998e 100644 --- a/interface/web/dns/dns_wizard.php +++ b/interface/web/dns/dns_wizard.php @@ -335,11 +335,11 @@ if($_POST['create'] == 1) { if($section == 'dns_records') { $parts = explode('|', $row); $dns_rr[] = array( - 'name' => $app->db->quote($parts[1]), - 'type' => $app->db->quote($parts[0]), - 'data' => $app->db->quote($parts[2]), - 'aux' => $app->db->quote($parts[3]), - 'ttl' => $app->db->quote($parts[4]) + 'name' => $parts[1], + 'type' => $parts[0], + 'data' => $parts[2], + 'aux' => $parts[3], + 'ttl' => $parts[4] ); } } @@ -359,28 +359,60 @@ if($_POST['create'] == 1) { if($error == '') { // Insert the soa record $sys_userid = $_SESSION['s']['user']['userid']; - $origin = $app->db->quote($vars['origin']); - $ns = $app->db->quote($vars['ns']); - $mbox = $app->db->quote(str_replace('@', '.', $vars['mbox'])); - $refresh = $app->db->quote($vars['refresh']); - $retry = $app->db->quote($vars['retry']); - $expire = $app->db->quote($vars['expire']); - $minimum = $app->db->quote($vars['minimum']); - $ttl = $app->db->quote($vars['ttl']); - $xfer = $app->db->quote($vars['xfer']); - $also_notify = $app->db->quote($vars['also_notify']); - $update_acl = $app->db->quote($vars['update_acl']); + $origin = $vars['origin']; + $ns = $vars['ns']; + $mbox = str_replace('@', '.', $vars['mbox']); + $refresh = $vars['refresh']; + $retry = $vars['retry']; + $expire = $vars['expire']; + $minimum = $vars['minimum']; + $ttl = $vars['ttl']; + $xfer = $vars['xfer']; + $also_notify = $vars['also_notify']; + $update_acl = $vars['update_acl']; $serial = $app->validate_dns->increase_serial(0); - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `origin`, `ns`, `mbox`, `serial`, `refresh`, `retry`, `expire`, `minimum`, `ttl`, `active`, `xfer`, `also_notify`, `update_acl`) VALUES - ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$origin', '$ns', '$mbox', '$serial', '$refresh', '$retry', '$expire', '$minimum', '$ttl', 'Y', '$xfer', '$also_notify', '$update_acl')"; + $insert_data = array( + "sys_userid" => $sys_userid, + "sys_groupid" => $sys_groupid, + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $server_id, + "origin" => $origin, + "ns" => $ns, + "mbox" => $mbox, + "serial" => $serial, + "refresh" => $refresh, + "retry" => $retry, + "expire" => $expire, + "minimum" => $minimum, + "ttl" => $ttl, + "active" => 'Y', + "xfer" => $xfer, + "also_notify" => $also_notify, + "update_acl" => $update_acl + ); $dns_soa_id = $app->db->datalogInsert('dns_soa', $insert_data, 'id'); // Insert the dns_rr records if(is_array($dns_rr) && $dns_soa_id > 0) { foreach($dns_rr as $rr) { - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `zone`, `name`, `type`, `data`, `aux`, `ttl`, `active`) VALUES - ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$dns_soa_id', '$rr[name]', '$rr[type]', '$rr[data]', '$rr[aux]', '$rr[ttl]', 'Y')"; + $insert_data = array( + "sys_userid" => $sys_userid, + "sys_groupid" => $sys_groupid, + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $server_id, + "zone" => $dns_soa_id, + "name" => $rr['name'], + "type" => $rr['type'], + "data" => $rr['data'], + "aux" => $rr['aux'], + "ttl" => $rr['ttl'], + "active" => 'Y' + ); $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id'); } } diff --git a/interface/web/mail/mail_aliasdomain_edit.php b/interface/web/mail/mail_aliasdomain_edit.php index 7e76ff04c..918a5f3a0 100644 --- a/interface/web/mail/mail_aliasdomain_edit.php +++ b/interface/web/mail/mail_aliasdomain_edit.php @@ -118,8 +118,8 @@ class page_action extends tform_actions { /* TODO: check if this quoting is correkt! */ // compose the source and destination field - $this->dataRecord["source"] = "@".$app->db->quote($this->dataRecord["source"]); - $this->dataRecord["destination"] = "@".$app->db->quote($this->dataRecord["destination"]); + $this->dataRecord["source"] = "@".$this->dataRecord["source"]; + $this->dataRecord["destination"] = "@".$this->dataRecord["destination"]; // Set the server id of the mailbox = server ID of mail domain. $this->dataRecord["server_id"] = $app->functions->intval($domain["server_id"]); diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index b09722fdd..9873c81bc 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -285,12 +285,23 @@ class page_action extends tform_actions { $tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", '@' . $this->dataRecord["domain"]); if($tmp_user["id"] > 0) { // There is already a record that we will update - $app->db->datalogUpdate('spamfilter_users', "policy_id = $policy_id", 'id', $tmp_user["id"]); + $app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]); } else { $tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id); // We create a new record - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`) - VALUES (".$_SESSION["s"]["user"]["userid"].", ".$app->functions->intval($tmp_domain["sys_groupid"]).", 'riud', 'riud', '', ".$app->functions->intval($this->dataRecord["server_id"]).", 5, ".$app->functions->intval($policy_id).", '@".$app->db->quote($this->dataRecord["domain"])."', '@".$app->db->quote($this->dataRecord["domain"])."', 'Y')"; + $insert_data = array( + "sys_userid" => $_SESSION["s"]["user"]["userid"], + "sys_groupid" => $tmp_domain["sys_groupid"], + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $this->dataRecord["server_id"], + "priority" => 5, + "policy_id" => $policy_id, + "email" => '@' . $this->dataRecord["domain"], + "fullname" => '@' . $this->dataRecord["domain"], + "local" => 'Y' + ); $app->db->datalogInsert('spamfilter_users', $insert_data, 'id'); unset($tmp_domain); } @@ -340,12 +351,23 @@ class page_action extends tform_actions { if($policy_id > 0) { if($tmp_user["id"] > 0) { // There is already a record that we will update - $app->db->datalogUpdate('spamfilter_users', "policy_id = $policy_id", 'id', $tmp_user["id"]); + $app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]); } else { $tmp_domain = $app->db->queryOneRecord("SELECT sys_groupid FROM mail_domain WHERE domain_id = ?", $this->id); // We create a new record - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`) - VALUES (".$_SESSION["s"]["user"]["userid"].", ".$app->functions->intval($tmp_domain["sys_groupid"]).", 'riud', 'riud', '', ".$app->functions->intval($this->dataRecord["server_id"]).", 5, ".$app->functions->intval($policy_id).", '@".$app->db->quote($this->dataRecord["domain"])."', '@".$app->db->quote($this->dataRecord["domain"])."', 'Y')"; + $insert_data = array( + "sys_userid" => $_SESSION["s"]["user"]["userid"], + "sys_groupid" => $tmp_domain["sys_groupid"], + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $this->dataRecord["server_id"], + "priority" => 5, + "policy_id" => $policy_id, + "email" => '@' . $this->dataRecord["domain"], + "fullname" => '@' . $this->dataRecord["domain"], + "local" => 'Y' + ); $app->db->datalogInsert('spamfilter_users', $insert_data, 'id'); unset($tmp_domain); } @@ -371,9 +393,8 @@ class page_action extends tform_actions { $mail_parts = explode("@", $rec['email']); $maildir = str_replace("[domain]", $this->dataRecord['domain'], $mail_config["maildir_path"]); $maildir = str_replace("[localpart]", $mail_parts[0], $maildir); - $maildir = $app->db->quote($maildir); - $email = $app->db->quote($mail_parts[0].'@'.$this->dataRecord['domain']); - $app->db->datalogUpdate('mail_user', "maildir = '$maildir', email = '$email', sys_userid = $client_user_id, sys_groupid = '$sys_groupid'", 'mailuser_id', $rec['mailuser_id']); + $email = $mail_parts[0].'@'.$this->dataRecord['domain']; + $app->db->datalogUpdate('mail_user', array("maildir" => $maildir, "email" => $email, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailuser_id', $rec['mailuser_id']); } } @@ -381,9 +402,9 @@ class page_action extends tform_actions { $forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE source like ? OR destination like ?", '%@' . $this->oldDataRecord['domain'], '%@' . $this->oldDataRecord['domain']); if(is_array($forwardings)) { foreach($forwardings as $rec) { - $destination = $app->db->quote(str_replace($this->oldDataRecord['domain'], $this->dataRecord['domain'], $rec['destination'])); - $source = $app->db->quote(str_replace($this->oldDataRecord['domain'], $this->dataRecord['domain'], $rec['source'])); - $app->db->datalogUpdate('mail_forwarding', "source = '$source', destination = '$destination', sys_userid = $client_user_id, sys_groupid = '$sys_groupid'", 'forwarding_id', $rec['forwarding_id']); + $destination = str_replace($this->oldDataRecord['domain'], $this->dataRecord['domain'], $rec['destination']); + $source = str_replace($this->oldDataRecord['domain'], $this->dataRecord['domain'], $rec['source']); + $app->db->datalogUpdate('mail_forwarding', array("source" => $source, "destination" => $destination, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'forwarding_id', $rec['forwarding_id']); } } @@ -394,8 +415,8 @@ class page_action extends tform_actions { $fetchmail = $app->db->queryAllRecords("SELECT * FROM mail_get WHERE destination like ?", '%@' . $this->oldDataRecord['domain']); if(is_array($fetchmail)) { foreach($fetchmail as $rec) { - $destination = $app->db->quote(str_replace($this->oldDataRecord['domain'], $this->dataRecord['domain'], $rec['destination'])); - $app->db->datalogUpdate('mail_get', "destination = '$destination', sys_userid = $client_user_id, sys_groupid = '$sys_groupid'", 'mailget_id', $rec['mailget_id']); + $destination = str_replace($this->oldDataRecord['domain'], $this->dataRecord['domain'], $rec['destination']); + $app->db->datalogUpdate('mail_get', array("destination" => $destination, "sys_userid" => $client_user_id, "sys_groupid" => $sys_groupid), 'mailget_id', $rec['mailget_id']); } } @@ -430,7 +451,7 @@ class page_action extends tform_actions { $app->db->datalogUpdate('dns_rr', $rec, 'id', $rec['id']); $soa_id = $app->functions->intval($soa['zone']); $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', "serial = $serial", 'id', $soa_id); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); } } } @@ -464,7 +485,7 @@ class page_action extends tform_actions { $app->db->datalogInsert('dns_rr', $new_rr, 'id', $new_rr['zone']); $zone = $app->db->queryOneRecord("SELECT id, serial FROM dns_soa WHERE active = 'Y' AND id = ?", $new_rr['zone']); $new_serial = $app->validate_dns->increase_serial($zone['serial']); - $app->db->datalogUpdate('dns_soa', "serial = '".$new_serial."'", 'id', $zone['id']); + $app->db->datalogUpdate('dns_soa', array("serial" => $new_serial), 'id', $zone['id']); } } diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index 5292c7781..3c3887325 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -266,11 +266,22 @@ class page_action extends tform_actions { $tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]); if($tmp_user["id"] > 0) { // There is already a record that we will update - $app->db->datalogUpdate('spamfilter_users', "policy_id = $policy_id", 'id', $tmp_user["id"]); + $app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]); } else { // We create a new record - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`) - VALUES (".$app->functions->intval($_SESSION["s"]["user"]["userid"]).", ".$app->functions->intval($domain["sys_groupid"]).", 'riud', 'riud', '', ".$app->functions->intval($domain["server_id"]).", 10, ".$app->functions->intval($policy_id).", '".$app->db->quote($this->dataRecord["email"])."', '".$app->db->quote($this->dataRecord["email"])."', 'Y')"; + $insert_data = array( + "sys_userid" => $_SESSION["s"]["user"]["userid"], + "sys_groupid" => $domain["sys_groupid"], + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $domain["server_id"], + "priority" => 10, + "policy_id" => $policy_id, + "email" => $this->dataRecord["email"], + "fullname" => $this->dataRecord["email"], + "local" => 'Y' + ); $app->db->datalogInsert('spamfilter_users', $insert_data, 'id'); } } // endif spamfilter policy @@ -302,11 +313,22 @@ class page_action extends tform_actions { if($policy_id > 0) { if($tmp_user["id"] > 0) { // There is already a record that we will update - $app->db->datalogUpdate('spamfilter_users', "policy_id = $policy_id", 'id', $tmp_user["id"]); + $app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]); } else { // We create a new record - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`) - VALUES (".$app->functions->intval($_SESSION["s"]["user"]["userid"]).", ".$app->functions->intval($domain["sys_groupid"]).", 'riud', 'riud', '', ".$app->functions->intval($domain["server_id"]).", 10, ".$app->functions->intval($policy_id).", '".$app->db->quote($this->dataRecord["email"])."', '".$app->db->quote($this->dataRecord["email"])."', 'Y')"; + $insert_data = array( + "sys_userid" => $_SESSION["s"]["user"]["userid"], + "sys_groupid" => $domain["sys_groupid"], + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $domain["server_id"], + "priority" => 10, + "policy_id" => $policy_id, + "email" => $this->dataRecord["email"], + "fullname" => $this->dataRecord["email"], + "local" => 'Y' + ); $app->db->datalogInsert('spamfilter_users', $insert_data, 'id'); } }else { @@ -336,8 +358,8 @@ class page_action extends tform_actions { $forwardings = $app->db->queryAllRecords("SELECT * FROM mail_forwarding WHERE destination = ?", $this->oldDataRecord['email']); if(is_array($forwardings)) { foreach($forwardings as $rec) { - $destination = $app->db->quote($this->dataRecord['email']); - $app->db->datalogUpdate('mail_forwarding', "destination = '$destination'", 'forwarding_id', $rec['forwarding_id']); + $destination = $this->dataRecord['email']; + $app->db->datalogUpdate('mail_forwarding', array("destination" => $destination), 'forwarding_id', $rec['forwarding_id']); } } @@ -345,9 +367,9 @@ class page_action extends tform_actions { //* Change backup options when user mail backup options have been changed if(isset($this->dataRecord['backup_interval']) && ($this->dataRecord['backup_interval'] != $this->oldDataRecord['backup_interval'] || $this->dataRecord['backup_copies'] != $this->oldDataRecord['backup_copies'])) { - $backup_interval = $app->db->quote($this->dataRecord['backup_interval']); + $backup_interval = $this->dataRecord['backup_interval']; $backup_copies = $app->functions->intval($this->dataRecord['backup_copies']); - $app->db->datalogUpdate('mail_user', "backup_interval = '$backup_interval', backup_copies = '$backup_copies'", 'mailuser_id', $rec['mailuser_id']); + $app->db->datalogUpdate('mail_user', array("backup_interval" => $backup_interval, "backup_copies" => $backup_copies), 'mailuser_id', $rec['mailuser_id']); unset($backup_copies); unset($backup_interval); } // end if backup options changed diff --git a/interface/web/mail/xmpp_domain_edit.php b/interface/web/mail/xmpp_domain_edit.php index 851986b0e..b5858e01e 100644 --- a/interface/web/mail/xmpp_domain_edit.php +++ b/interface/web/mail/xmpp_domain_edit.php @@ -468,7 +468,7 @@ class page_action extends tform_actions { // Refresh zone $zone = $app->db->queryOneRecord("SELECT id, serial FROM dns_soa WHERE active = 'Y' AND id = ?", $new_rr['zone']); $new_serial = $app->validate_dns->increase_serial($zone['serial']); - $app->db->datalogUpdate('dns_soa', "serial = '".$new_serial."'", 'id', $zone['id']); + $app->db->datalogUpdate('dns_soa', array("serial" => $new_serial), 'id', $zone['id']); } /* diff --git a/interface/web/mailuser/mail_user_spamfilter_edit.php b/interface/web/mailuser/mail_user_spamfilter_edit.php index 335aaece0..9d3735672 100644 --- a/interface/web/mailuser/mail_user_spamfilter_edit.php +++ b/interface/web/mailuser/mail_user_spamfilter_edit.php @@ -82,11 +82,22 @@ class page_action extends tform_actions { if($policy_id > 0) { if($tmp_user["id"] > 0) { // There is already a record that we will update - $app->db->datalogUpdate('spamfilter_users', "policy_id = $policy_id", 'id', $tmp_user["id"]); + $app->db->datalogUpdate('spamfilter_users', array("policy_id" => $policy_id), 'id', $tmp_user["id"]); } else { // We create a new record - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `priority`, `policy_id`, `email`, `fullname`, `local`) - VALUES (".$app->functions->intval($domain["sys_userid"]).", ".$app->functions->intval($domain["sys_groupid"]).", 'riud', 'riud', '', ".$app->functions->intval($domain["server_id"]).", 10, ".$app->functions->intval($policy_id).", '".$app->db->quote($rec["email"])."', '".$app->db->quote($rec["email"])."', 'Y')"; + $insert_data = array( + "sys_userid" => $domain["sys_userid"], + "sys_groupid" => $domain["sys_groupid"], + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $domain["server_id"], + "priority" => 10, + "policy_id" => $policy_id, + "email" => $rec["email"], + "fullname" => $rec["email"], + "local" => 'Y' + ); $app->db->datalogInsert('spamfilter_users', $insert_data, 'id'); } }else { diff --git a/interface/web/sites/database_user_del.php b/interface/web/sites/database_user_del.php index 2ca1ef58b..d80ba4f05 100644 --- a/interface/web/sites/database_user_del.php +++ b/interface/web/sites/database_user_del.php @@ -67,12 +67,12 @@ class page_action extends tform_actions { //* Update all records that belog to this user $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE database_user_id = ?", $this->id); foreach($records as $rec) { - $app->db->datalogUpdate('web_database', 'database_user_id=NULL', 'database_id', $rec['database_id']); + $app->db->datalogUpdate('web_database', array('database_user_id' => null), 'database_id', $rec['database_id']); } $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE database_ro_user_id = ?", $this->id); foreach($records as $rec) { - $app->db->datalogUpdate('web_database', 'database_ro_user_id=NULL', 'database_id', $rec['database_id']); + $app->db->datalogUpdate('web_database', array('database_ro_user_id' => null), 'database_id', $rec['database_id']); } } diff --git a/interface/web/tools/dns_import_tupa.php b/interface/web/tools/dns_import_tupa.php index b33b978da..b45a11b60 100644 --- a/interface/web/tools/dns_import_tupa.php +++ b/interface/web/tools/dns_import_tupa.php @@ -89,18 +89,35 @@ if(isset($_POST['start']) && $_POST['start'] == 1) { $soa = $exdb->queryOneRecord("SELECT * FROM records WHERE type = 'SOA' AND domain_id = ?", $domain['id']); if(is_array($soa)) { $parts = explode(' ', $soa['content']); - $origin = $app->db->quote(addot($soa['name'])); - $ns = $app->db->quote(addot($parts[0])); - $mbox = $app->db->quote(addot($parts[1])); - $serial = $app->db->quote($parts[2]); + $origin = addot($soa['name']); + $ns = addot($parts[0]); + $mbox = addot($parts[1]); + $serial = $parts[2]; $refresh = 7200; $retry = 540; $expire = 604800; $minimum = 86400; - $ttl = $app->db->quote($soa['ttl']); - - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `origin`, `ns`, `mbox`, `serial`, `refresh`, `retry`, `expire`, `minimum`, `ttl`, `active`, `xfer`) VALUES - ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$origin', '$ns', '$mbox', '$serial', '$refresh', '$retry', '$expire', '$minimum', '$ttl', 'Y', '')"; + $ttl = $soa['ttl']; + + $insert_data = array( + "sys_userid" => $sys_userid, + "sys_groupid" => $sys_groupid, + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $server_id, + "origin" => $origin, + "ns" => $ns, + "mbox" => $mbox, + "serial" => $serial, + "refresh" => $refresh, + "retry" => $retry, + "expire" => $expire, + "minimum" => $minimum, + "ttl" => $ttl, + "active" => 'Y', + "xfer" => '' + ); $dns_soa_id = $app->db->datalogInsert('dns_soa', $insert_data, 'id'); unset($parts); $msg .= 'Import Zone: '.$soa['name'].'
'; @@ -111,19 +128,32 @@ if(isset($_POST['start']) && $_POST['start'] == 1) { foreach($records as $rec) { $rr = array(); - $rr['name'] = $app->db->quote(addot($rec['name'])); - $rr['type'] = $app->db->quote($rec['type']); - $rr['aux'] = $app->db->quote($rec['prio']); - $rr['ttl'] = $app->db->quote($rec['ttl']); + $rr['name'] = addot($rec['name']); + $rr['type'] = $rec['type']; + $rr['aux'] = $rec['prio']; + $rr['ttl'] = $rec['ttl']; if($rec['type'] == 'NS' || $rec['type'] == 'MX' || $rec['type'] == 'CNAME') { - $rr['data'] = $app->db->quote(addot($rec['content'])); + $rr['data'] = addot($rec['content']); } else { - $rr['data'] = $app->db->quote($rec['content']); + $rr['data'] = $rec['content']; } - $insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `zone`, `name`, `type`, `data`, `aux`, `ttl`, `active`) VALUES - ('$sys_userid', '$sys_groupid', 'riud', 'riud', '', '$server_id', '$dns_soa_id', '$rr[name]', '$rr[type]', '$rr[data]', '$rr[aux]', '$rr[ttl]', 'Y')"; + $insert_data = array( + "sys_userid" => $sys_userid, + "sys_groupid" => $sys_groupid, + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $server_id, + "zone" => $dns_soa_id, + "name" => $rr['name'], + "type" => $rr['type'], + "data" => $rr['data'], + "aux" => $rr['aux'], + "ttl" => $rr['ttl'], + "active" => 'Y' + ); $dns_rr_id = $app->db->datalogInsert('dns_rr', $insert_data, 'id'); //$msg .= $insert_data.'
'; diff --git a/interface/web/tools/import_vpopmail.php b/interface/web/tools/import_vpopmail.php index 8f4334d1f..3c8db20ae 100644 --- a/interface/web/tools/import_vpopmail.php +++ b/interface/web/tools/import_vpopmail.php @@ -118,7 +118,7 @@ function start_import() { $client_id = $app->db->insertID(); //* add sys_group - $groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('".$app->db->quote($pw_domain)."','',".$client_id.")", 'groupid'); + $groupid = $app->db->datalogInsert('sys_group', array("name" => $pw_domain, "description" => '', "client_id" => $client_id), 'groupid'); $groups = $groupid; $username = $pw_domain; @@ -175,8 +175,16 @@ function start_import() { $sys_userid = ($user_rec['userid'] > 0)?$user_rec['userid']:1; $sys_groupid = ($user_rec['default_group'] > 0)?$user_rec['default_group']:1; - $sql = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `domain`, `active`) - VALUES(".$sys_userid.", ".$sys_groupid.", 'riud', 'riud', '', $local_server_id, '$domain', 'y')"; + $sql = array( + "sys_userid" => $sys_userid, + "sys_groupid" => $sys_groupid, + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $local_server_id, + "domain" => $domain, + "active" => 'y' + ); $app->db->datalogInsert('mail_domain', $sql, 'domain_id'); $msg .= "Imported domain $domain
"; } else { @@ -205,8 +213,40 @@ function start_import() { $maildir_path = "/var/vmail/".$rec['pw_domain']."/".$rec['pw_name']; //* Insert the mailbox - $sql = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `email`, `login`, `password`, `name`, `uid`, `gid`, `maildir`, `quota`, `cc`, `homedir`, `autoresponder`, `autoresponder_start_date`, `autoresponder_end_date`, `autoresponder_subject`, `autoresponder_text`, `move_junk`, `custom_mailfilter`, `postfix`, `access`, `disableimap`, `disablepop3`, `disabledeliver`, `disablesmtp`, `disablesieve`, `disablelda`, `disabledoveadm`) - VALUES(".$domain_rec['sys_userid'].", ".$domain_rec['sys_groupid'].", 'riud', 'riud', '', $local_server_id, '$email', '$email', '$pw_crypt_password', '$email', 5000, 5000, '$maildir_path', 0, '', '/var/vmail', 'n', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 'Out of office reply', '', 'n', '', 'y', 'n', 'n', 'n', 'n', 'n', 'n', 'n', 'n')"; + $sql = array( + "sys_userid" => $domain_rec['sys_userid'], + "sys_groupid" => $domain_rec['sys_groupid'], + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $local_server_id, + "email" => $email, + "login" => $email, + "password" => $pw_crypt_password, + "name" => $email, + "uid" => 5000, + "gid" => 5000, + "maildir" => $maildir_path, + "quota" => 0, + "cc" => '', + "homedir" => '/var/vmail', + "autoresponder" => 'n', + "autoresponder_start_date" => '0000-00-00 00:00:00', + "autoresponder_end_date" => '0000-00-00 00:00:00', + "autoresponder_subject" => 'Out of office reply', + "autoresponder_text" => '', + "move_junk" => 'n', + "custom_mailfilter" => '', + "postfix" => 'y', + "access" => 'n', + "disableimap" => 'n', + "disablepop3" => 'n', + "disabledeliver" => 'n', + "disablesmtp" => 'n', + "disablesieve" => 'n', + "disablelda" => 'n', + "disabledoveadm" => 'n' + ); $app->db->datalogInsert('mail_user', $sql, 'mailuser_id'); $msg .= "Imported mailbox $email
"; } @@ -250,8 +290,18 @@ function start_import() { $domain_rec = $app->db->queryOneRecord("SELECT * FROM mail_domain WHERE domain = ?", $rec['domain']); if(is_array($domain_rec)) { - $sql = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `source`, `destination`, `type`, `active`) - VALUES(".$domain_rec['sys_userid'].", ".$domain_rec['sys_groupid'].", 'riud', 'riud', '', $local_server_id, '".$app->db->quote($email)."', '".$app->db->quote($target)."', 'forward', 'y')"; + $sql = array( + "sys_userid" => $domain_rec['sys_userid'], + "sys_groupid" => $domain_rec['sys_groupid'], + "sys_perm_user" => 'riud', + "sys_perm_group" => 'riud', + "sys_perm_other" => '', + "server_id" => $local_server_id, + "source" => $email, + "destination" => $target, + "type" => 'forward', + "active" => 'y' + ); $app->db->datalogInsert('mail_forwarding', $sql, 'forwarding_id'); } $msg .= "Imported alias $email.
"; diff --git a/interface/web/tools/resync.php b/interface/web/tools/resync.php index 6738843bc..1cd150a73 100644 --- a/interface/web/tools/resync.php +++ b/interface/web/tools/resync.php @@ -511,13 +511,13 @@ class page_action extends tform_actions { if(!empty($rr_records)) { foreach($rr_records as $rec) { $new_serial = $app->validate_dns->increase_serial($rec['serial']); - $app->db->datalogUpdate('dns_rr', "serial = '".$new_serial."'", 'id', $rec['id']); + $app->db->datalogUpdate('dns_rr', array("serial" => $new_serial), 'id', $rec['id']); } } else { $msg .= $app->tform->wordbook['no_results_txt'].'
'; } $new_serial = $app->validate_dns->increase_serial($soa_rec['serial']); - $app->db->datalogUpdate('dns_soa', "serial = '".$new_serial."'", 'id', $soa_rec['id']); + $app->db->datalogUpdate('dns_soa', array("serial" => $new_serial), 'id', $soa_rec['id']); $msg .= '['.$server_name[$soa_rec['server_id']].'] '.$soa_rec['origin'].' ('.count($rr_records).')
'; } else $msg .= $app->tform->wordbook['no_results_txt'].'
'; diff --git a/server/lib/classes/cron.d/300-quota_notify.inc.php b/server/lib/classes/cron.d/300-quota_notify.inc.php index 5345f588b..9b2b79d0d 100644 --- a/server/lib/classes/cron.d/300-quota_notify.inc.php +++ b/server/lib/classes/cron.d/300-quota_notify.inc.php @@ -74,7 +74,7 @@ class cronjob_quota_notify extends cronjob { $web_traffic = round($tmp['total_traffic_bytes']/1024/1024); if($web_traffic_quota > 0 && $web_traffic > $web_traffic_quota) { - $app->dbmaster->datalogUpdate('web_domain', "traffic_quota_lock = 'y',active = 'n'", 'domain_id', $rec['domain_id']); + $app->dbmaster->datalogUpdate('web_domain', array("traffic_quota_lock" => 'y', "active" => 'n'), 'domain_id', $rec['domain_id']); $app->log('Traffic quota for '.$rec['domain'].' exceeded. Disabling website.', LOGLEVEL_DEBUG); //* Send traffic notifications @@ -104,7 +104,7 @@ class cronjob_quota_notify extends cronjob { } else { //* unlock the website, if traffic is lower then quota if($rec['traffic_quota_lock'] == 'y') { - $app->dbmaster->datalogUpdate('web_domain', "traffic_quota_lock = 'n',active = 'y'", 'domain_id', $rec['domain_id']); + $app->dbmaster->datalogUpdate('web_domain', array("traffic_quota_lock" => 'n', "active" => 'y'), 'domain_id', $rec['domain_id']); $app->log('Traffic quota for '.$rec['domain'].' ok again. Re-enabling website.', LOGLEVEL_DEBUG); } } @@ -192,7 +192,7 @@ class cronjob_quota_notify extends cronjob { // 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']); + if($rec['last_quota_notification']) $app->dbmaster->datalogUpdate('web_domain', array("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')) { @@ -229,7 +229,7 @@ class cronjob_quota_notify extends cronjob { //* 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']); + $app->dbmaster->datalogUpdate('web_domain', array("last_quota_notification" => array("SQL" => "CURDATE()")), 'domain_id', $rec['domain_id']); $placeholders = array('{domain}' => $rec['domain'], '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'), @@ -321,7 +321,7 @@ class cronjob_quota_notify extends cronjob { // 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']); + if($rec['last_quota_notification']) $app->dbmaster->datalogUpdate('mail_user', array("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')) { @@ -358,7 +358,7 @@ class cronjob_quota_notify extends cronjob { 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']); + $app->dbmaster->datalogUpdate('mail_user', array("last_quota_notification" => array("SQL" => "CURDATE()")), 'mailuser_id', $rec['mailuser_id']); $placeholders = array('{email}' => $rec['email'], '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'), @@ -438,9 +438,9 @@ class cronjob_quota_notify extends cronjob { if($used_ratio > 0.9) { //* reset notification date - if($rec['last_quota_notification']) $app->dbmaster->datalogUpdate('web_database', "last_quota_notification = NULL", 'database_id', $rec['database_id']); + if($rec['last_quota_notification']) $app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => null), 'database_id', $rec['database_id']); - $app->dbmaster->datalogUpdate('web_database', "last_quota_notification = CURDATE()", 'database_id', $rec['database_id']); + $app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => array("SQL" => "CURDATE()")), 'database_id', $rec['database_id']); // send notification - everything ok again if($rec['last_quota_notification'] && $web_config['overquota_notify_onok'] == 'y' && ($web_config['overquota_db_notify_admin'] == 'y' || $web_config['overquota_db_notify_client'] == 'y')) { @@ -475,7 +475,7 @@ class cronjob_quota_notify extends cronjob { //* Send quota notifications if(($web_config['overquota_db_notify_admin'] == 'y' || $web_config['overquota_db_notify_client'] == 'y') && $send_notification == true) { - $app->dbmaster->datalogUpdate('web_database', "last_quota_notification = CURDATE()", 'database_id', $rec['database_id']); + $app->dbmaster->datalogUpdate('web_database', array("last_quota_notification" => array("SQL" => "CURDATE()")), 'database_id', $rec['database_id']); $placeholders = array( '{database_name}' => $rec['database_name'], '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'), diff --git a/server/lib/classes/cron.d/400-openvz.inc.php b/server/lib/classes/cron.d/400-openvz.inc.php index ec2b4de63..5eba8d208 100644 --- a/server/lib/classes/cron.d/400-openvz.inc.php +++ b/server/lib/classes/cron.d/400-openvz.inc.php @@ -60,7 +60,7 @@ class cronjob_openvz extends cronjob { $records = $app->db->queryAllRecords($sql); if(is_array($records)) { foreach($records as $rec) { - $app->dbmaster->datalogUpdate('openvz_vm', "active = 'n'", 'vm_id', $rec['vm_id']); + $app->dbmaster->datalogUpdate('openvz_vm', array("active" => 'n'), 'vm_id', $rec['vm_id']); $app->log('Virtual machine active date expired. Disabling VM '.$rec['veid'], LOGLEVEL_DEBUG); } } diff --git a/server/lib/classes/cron.d/600-cleanup.inc.php b/server/lib/classes/cron.d/600-cleanup.inc.php index 903a20f59..e55c2599b 100644 --- a/server/lib/classes/cron.d/600-cleanup.inc.php +++ b/server/lib/classes/cron.d/600-cleanup.inc.php @@ -59,7 +59,7 @@ class cronjob_cleanup extends cronjob { if(is_array($records)) { foreach($records as $rec) { $tmp = $app->db->queryOneRecord("SELECT id FROM aps_instances_settings WHERE instance_id = ? AND name = ?", $rec['instance_id'], $rec['name']); - $app->db->datalogUpdate('aps_instances_settings', "value = ''", 'id', $tmp['id']); + $app->db->datalogUpdate('aps_instances_settings', array("value" => ''), 'id', $tmp['id']); } } } diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index 9c693e39a..51d546710 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -141,13 +141,17 @@ class db extends mysqli } else { if(is_int($sValue) || is_float($sValue)) { $sTxt = $sValue; - } elseif(is_string($sValue) && (strcmp($sValue, '#NULL#') == 0)) { + } elseif(is_null($sValue) || (is_string($sValue) && (strcmp($sValue, '#NULL#') == 0))) { $sTxt = 'NULL'; } elseif(is_array($sValue)) { - $sTxt = ''; - foreach($sValue as $sVal) $sTxt .= ',\'' . $this->escape($sVal) . '\''; - $sTxt = '(' . substr($sTxt, 1) . ')'; - if($sTxt == '()') $sTxt = '(0)'; + if(isset($sValue['SQL'])) { + $sTxt = $sValue['SQL']; + } else { + $sTxt = ''; + foreach($sValue as $sVal) $sTxt .= ',\'' . $this->escape($sVal) . '\''; + $sTxt = '(' . substr($sTxt, 1) . ')'; + if($sTxt == '()') $sTxt = '(0)'; + } } else { $sTxt = '\'' . $this->escape($sValue) . '\''; } @@ -632,6 +636,7 @@ class db extends mysqli /* TODO: deprecate this method! */ $insert_data_str = $insert_data; $this->query("INSERT INTO ?? $insert_data_str", $tablename); + $app->log("deprecated use of passing values to datalogInsert() - table " . $tablename, 1); } $old_rec = array(); @@ -664,6 +669,7 @@ class db extends mysqli /* TODO: deprecate this method! */ $update_data_str = $update_data; $this->query("UPDATE ?? SET $update_data_str WHERE ?? = ?", $tablename, $index_field, $index_value); + $app->log("deprecated use of passing values to datalogUpdate() - table " . $tablename, 1); } $new_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value); -- GitLab From 93429347fc68ea5c965435d54f2b7d6a1f93210c Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 11:53:40 +0200 Subject: [PATCH 203/287] - added dns edit base class and moved common methods into it to avoid duplicate code --- interface/web/dns/dns_a_edit.php | 95 +------------------ interface/web/dns/dns_aaaa_edit.php | 90 +----------------- interface/web/dns/dns_alias_edit.php | 90 +----------------- interface/web/dns/dns_cname_edit.php | 94 +------------------ interface/web/dns/dns_edit_base.php | 131 +++++++++++++++++++++++++++ interface/web/dns/dns_hinfo_edit.php | 90 +----------------- interface/web/dns/dns_mx_edit.php | 90 +----------------- interface/web/dns/dns_ns_edit.php | 90 +----------------- interface/web/dns/dns_ptr_edit.php | 90 +----------------- interface/web/dns/dns_rp_edit.php | 90 +----------------- interface/web/dns/dns_srv_edit.php | 90 +----------------- interface/web/dns/dns_txt_edit.php | 90 +----------------- 12 files changed, 159 insertions(+), 971 deletions(-) create mode 100644 interface/web/dns/dns_edit_base.php diff --git a/interface/web/dns/dns_a_edit.php b/interface/web/dns/dns_a_edit.php index c70cc7989..5b060c33a 100644 --- a/interface/web/dns/dns_a_edit.php +++ b/interface/web/dns/dns_a_edit.php @@ -40,102 +40,17 @@ $tform_def_file = "form/dns_a.tform.php"; require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; - -//* Check permissions for module -$app->auth->check_module_permissions('dns'); +require_once './dns_edit_base.php'; // Loading classes -$app->uses('tpl,tform,tform_actions,validate_dns'); -$app->load('tform_actions'); - -class page_action extends tform_actions { - - function onShowNew() { - global $app, $conf; - - // we will check only users, not admins - if($_SESSION["s"]["user"]["typ"] == 'user') { - - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } - - parent::onShowNew(); - } - - function onSubmit() { - global $app, $conf; - - // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]); - - // Check if Domain belongs to user - if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; - - // Check the client limits, if user is not the admin - if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($this->id == 0 && $client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } // end if user is not admin +class page_action extends dns_page_action { + protected function checkDuplicate() { //* Check for duplicates where IP and hostname are the same $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE (type = 'A' AND name = ? AND zone = ? and data = ? and id != ?) OR (type = 'CNAME' AND name = ? AND zone = ? and id != ?)", $this->dataRecord["name"], $this->dataRecord["zone"], $this->dataRecord["data"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id); - if($tmp['number'] > 0) $app->tform->errorMessage .= $app->tform->lng("data_error_duplicate")."
"; - unset($tmp); - - - // Set the server ID of the rr record to the same server ID as the parent record. - $this->dataRecord["server_id"] = $soa["server_id"]; - - // Update the serial number and timestamp of the RR record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); - $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); - $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); - - parent::onSubmit(); - } - - function onAfterInsert() { - global $app, $conf; - - //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); - - //* Update the serial number of the SOA record - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - - function onAfterUpdate() { - global $app, $conf; - - //* Update the serial number of the SOA record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); + if($tmp['number'] > 0) return true; + return false; } - } $page = new page_action; diff --git a/interface/web/dns/dns_aaaa_edit.php b/interface/web/dns/dns_aaaa_edit.php index ca4151ae3..006e71cf4 100644 --- a/interface/web/dns/dns_aaaa_edit.php +++ b/interface/web/dns/dns_aaaa_edit.php @@ -40,96 +40,10 @@ $tform_def_file = "form/dns_aaaa.tform.php"; require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; - -//* Check permissions for module -$app->auth->check_module_permissions('dns'); +require_once './dns_edit_base.php'; // Loading classes -$app->uses('tpl,tform,tform_actions,validate_dns'); -$app->load('tform_actions'); - -class page_action extends tform_actions { - - function onShowNew() { - global $app, $conf; - - // we will check only users, not admins - if($_SESSION["s"]["user"]["typ"] == 'user') { - - // Get the limits of the client - $client_group_id = $_SESSION["s"]["user"]["default_group"]; - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } - - parent::onShowNew(); - } - - function onSubmit() { - global $app, $conf; - - // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]); - - // Check if Domain belongs to user - if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; - - // Check the client limits, if user is not the admin - if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($this->id == 0 && $client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } // end if user is not admin - - - // Set the server ID of the rr record to the same server ID as the parent record. - $this->dataRecord["server_id"] = $soa["server_id"]; - - // Update the serial number and timestamp of the RR record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); - $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); - $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); - - parent::onSubmit(); - } - - function onAfterInsert() { - global $app, $conf; - - //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); - - //* Update the serial number of the SOA record - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - - function onAfterUpdate() { - global $app, $conf; - - //* Update the serial number of the SOA record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } +class page_action extends dns_page_action { } diff --git a/interface/web/dns/dns_alias_edit.php b/interface/web/dns/dns_alias_edit.php index 697756bf0..68f2743fe 100644 --- a/interface/web/dns/dns_alias_edit.php +++ b/interface/web/dns/dns_alias_edit.php @@ -40,96 +40,10 @@ $tform_def_file = "form/dns_alias.tform.php"; require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; - -//* Check permissions for module -$app->auth->check_module_permissions('dns'); +require_once './dns_edit_base.php'; // Loading classes -$app->uses('tpl,tform,tform_actions,validate_dns'); -$app->load('tform_actions'); - -class page_action extends tform_actions { - - function onShowNew() { - global $app, $conf; - - // we will check only users, not admins - if($_SESSION["s"]["user"]["typ"] == 'user') { - - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } - - parent::onShowNew(); - } - - function onSubmit() { - global $app, $conf; - - // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]); - - // Check if Domain belongs to user - if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; - - // Check the client limits, if user is not the admin - if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } // end if user is not admin - - - // Set the server ID of the rr record to the same server ID as the parent record. - $this->dataRecord["server_id"] = $soa["server_id"]; - - // Update the serial number and timestamp of the RR record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); - $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); - $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); - - parent::onSubmit(); - } - - function onAfterInsert() { - global $app, $conf; - - //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); - - //* Update the serial number of the SOA record - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - - function onAfterUpdate() { - global $app, $conf; - - //* Update the serial number of the SOA record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } +class page_action extends dns_page_action { } diff --git a/interface/web/dns/dns_cname_edit.php b/interface/web/dns/dns_cname_edit.php index f9793881b..b04af4005 100644 --- a/interface/web/dns/dns_cname_edit.php +++ b/interface/web/dns/dns_cname_edit.php @@ -40,100 +40,16 @@ $tform_def_file = "form/dns_cname.tform.php"; require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; - -//* Check permissions for module -$app->auth->check_module_permissions('dns'); +require_once './dns_edit_base.php'; // Loading classes -$app->uses('tpl,tform,tform_actions,validate_dns'); -$app->load('tform_actions'); - -class page_action extends tform_actions { - - function onShowNew() { - global $app, $conf; - - // we will check only users, not admins - if($_SESSION["s"]["user"]["typ"] == 'user') { - - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } - - parent::onShowNew(); - } - - function onSubmit() { - global $app, $conf; - - // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]); - - // Check if Domain belongs to user - if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; - - // Check the client limits, if user is not the admin - if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($this->id == 0 && $client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } // end if user is not admin +class page_action extends dns_page_action { + protected function checkDuplicate() { //* Check for duplicates where IP and hostname are the same $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE (type = 'A' AND name = ? AND zone = ? and id != ?) OR (type = 'CNAME' AND name = ? AND zone = ? and id != ?)", $this->dataRecord["name"], $this->dataRecord["zone"], $this->id, $this->dataRecord["name"], $this->dataRecord["zone"], $this->id); - if($tmp['number'] > 0) $app->tform->errorMessage .= $app->tform->lng("data_error_duplicate")."
"; - unset($tmp); - - - // Set the server ID of the rr record to the same server ID as the parent record. - $this->dataRecord["server_id"] = $soa["server_id"]; - - // Update the serial number and timestamp of the RR record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); - $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); - $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); - - parent::onSubmit(); - } - - function onAfterInsert() { - global $app, $conf; - - //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); - - //* Update the serial number of the SOA record - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - - function onAfterUpdate() { - global $app, $conf; - - //* Update the serial number of the SOA record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); + if($tmp['number'] > 0) return true; + return false; } } diff --git a/interface/web/dns/dns_edit_base.php b/interface/web/dns/dns_edit_base.php new file mode 100644 index 000000000..9cea8b6ae --- /dev/null +++ b/interface/web/dns/dns_edit_base.php @@ -0,0 +1,131 @@ +auth->check_module_permissions('dns'); + +// Loading classes +$app->uses('tpl,tform,tform_actions,validate_dns'); +$app->load('tform_actions'); + +class dns_page_action extends tform_actions { + + protected function checkDuplicate() { + return false; + } + + function onShowNew() { + global $app, $conf; + + // we will check only users, not admins + if($_SESSION["s"]["user"]["typ"] == 'user') { + + // Get the limits of the client + $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); + $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); + + // Check if the user may add another mailbox. + if($client["limit_dns_record"] >= 0) { + $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); + if($tmp["number"] >= $client["limit_dns_record"]) { + $app->error($app->tform->wordbook["limit_dns_record_txt"]); + } + } + } + + parent::onShowNew(); + } + + function onSubmit() { + global $app, $conf; + + // Get the parent soa record of the domain + $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]); + + // Check if Domain belongs to user + if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; + + // Check the client limits, if user is not the admin + if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin + // Get the limits of the client + $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); + $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); + + // Check if the user may add another mailbox. + if($this->id == 0 && $client["limit_dns_record"] >= 0) { + $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); + if($tmp["number"] >= $client["limit_dns_record"]) { + $app->error($app->tform->wordbook["limit_dns_record_txt"]); + } + } + } // end if user is not admin + + if($this->checkDuplicate()) $app->tform->errorMessage .= $app->tform->lng("data_error_duplicate")."
"; + + // Set the server ID of the rr record to the same server ID as the parent record. + $this->dataRecord["server_id"] = $soa["server_id"]; + + // Update the serial number and timestamp of the RR record + $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); + $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); + $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); + + parent::onSubmit(); + } + + function onAfterInsert() { + global $app, $conf; + + //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record + $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); + $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); + + //* Update the serial number of the SOA record + $soa_id = $app->functions->intval($_POST["zone"]); + $serial = $app->validate_dns->increase_serial($soa["serial"]); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); + } + + function onAfterUpdate() { + global $app, $conf; + + //* Update the serial number of the SOA record + $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); + $soa_id = $app->functions->intval($_POST["zone"]); + $serial = $app->validate_dns->increase_serial($soa["serial"]); + $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); + } + +} + +?> diff --git a/interface/web/dns/dns_hinfo_edit.php b/interface/web/dns/dns_hinfo_edit.php index 83cf60e14..58169cd9c 100644 --- a/interface/web/dns/dns_hinfo_edit.php +++ b/interface/web/dns/dns_hinfo_edit.php @@ -40,96 +40,10 @@ $tform_def_file = "form/dns_hinfo.tform.php"; require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; - -//* Check permissions for module -$app->auth->check_module_permissions('dns'); +require_once './dns_edit_base.php'; // Loading classes -$app->uses('tpl,tform,tform_actions,validate_dns'); -$app->load('tform_actions'); - -class page_action extends tform_actions { - - function onShowNew() { - global $app, $conf; - - // we will check only users, not admins - if($_SESSION["s"]["user"]["typ"] == 'user') { - - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } - - parent::onShowNew(); - } - - function onSubmit() { - global $app, $conf; - - // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]); - - // Check if Domain belongs to user - if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; - - // Check the client limits, if user is not the admin - if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($this->id == 0 && $client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } // end if user is not admin - - - // Set the server ID of the rr record to the same server ID as the parent record. - $this->dataRecord["server_id"] = $soa["server_id"]; - - // Update the serial number and timestamp of the RR record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); - $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); - $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); - - parent::onSubmit(); - } - - function onAfterInsert() { - global $app, $conf; - - //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); - - //* Update the serial number of the SOA record - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - - function onAfterUpdate() { - global $app, $conf; - - //* Update the serial number of the SOA record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } +class page_action extends dns_page_action { } diff --git a/interface/web/dns/dns_mx_edit.php b/interface/web/dns/dns_mx_edit.php index c74eab30b..1d0037e85 100644 --- a/interface/web/dns/dns_mx_edit.php +++ b/interface/web/dns/dns_mx_edit.php @@ -40,73 +40,10 @@ $tform_def_file = "form/dns_mx.tform.php"; require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; - -//* Check permissions for module -$app->auth->check_module_permissions('dns'); +require_once './dns_edit_base.php'; // Loading classes -$app->uses('tpl,tform,tform_actions,validate_dns'); -$app->load('tform_actions'); - -class page_action extends tform_actions { - - function onShowNew() { - global $app, $conf; - - // we will check only users, not admins - if($_SESSION["s"]["user"]["typ"] == 'user') { - - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } - - parent::onShowNew(); - } - - function onSubmit() { - global $app, $conf; - - // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]); - - // Check if Domain belongs to user - if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; - - // Check the client limits, if user is not the admin - if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($this->id == 0 && $client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } // end if user is not admin - - - // Set the server ID of the rr record to the same server ID as the parent record. - $this->dataRecord["server_id"] = $soa["server_id"]; - - // Update the serial number and timestamp of the RR record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); - $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); - $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); - - parent::onSubmit(); - } +class page_action extends dns_page_action { function onInsert() { global $app, $conf; @@ -131,29 +68,6 @@ class page_action extends tform_actions { parent::onUpdate(); } - function onAfterInsert() { - global $app, $conf; - - //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); - - //* Update the serial number of the SOA record - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - - function onAfterUpdate() { - global $app, $conf; - - //* Update the serial number of the SOA record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - } $page = new page_action; diff --git a/interface/web/dns/dns_ns_edit.php b/interface/web/dns/dns_ns_edit.php index 145823683..faded5f88 100644 --- a/interface/web/dns/dns_ns_edit.php +++ b/interface/web/dns/dns_ns_edit.php @@ -40,96 +40,10 @@ $tform_def_file = "form/dns_ns.tform.php"; require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; - -//* Check permissions for module -$app->auth->check_module_permissions('dns'); +require_once './dns_edit_base.php'; // Loading classes -$app->uses('tpl,tform,tform_actions,validate_dns'); -$app->load('tform_actions'); - -class page_action extends tform_actions { - - function onShowNew() { - global $app, $conf; - - // we will check only users, not admins - if($_SESSION["s"]["user"]["typ"] == 'user') { - - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } - - parent::onShowNew(); - } - - function onSubmit() { - global $app, $conf; - - // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]); - - // Check if Domain belongs to user - if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; - - // Check the client limits, if user is not the admin - if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($this->id == 0 && $client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } // end if user is not admin - - - // Set the server ID of the rr record to the same server ID as the parent record. - $this->dataRecord["server_id"] = $soa["server_id"]; - - // Update the serial number and timestamp of the RR record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); - $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); - $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); - - parent::onSubmit(); - } - - function onAfterInsert() { - global $app, $conf; - - //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); - - //* Update the serial number of the SOA record - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - - function onAfterUpdate() { - global $app, $conf; - - //* Update the serial number of the SOA record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } +class page_action extends dns_page_action { } diff --git a/interface/web/dns/dns_ptr_edit.php b/interface/web/dns/dns_ptr_edit.php index ed1c11897..1c3675d2c 100644 --- a/interface/web/dns/dns_ptr_edit.php +++ b/interface/web/dns/dns_ptr_edit.php @@ -40,96 +40,10 @@ $tform_def_file = "form/dns_ptr.tform.php"; require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; - -//* Check permissions for module -$app->auth->check_module_permissions('dns'); +require_once './dns_edit_base.php'; // Loading classes -$app->uses('tpl,tform,tform_actions,validate_dns'); -$app->load('tform_actions'); - -class page_action extends tform_actions { - - function onShowNew() { - global $app, $conf; - - // we will check only users, not admins - if($_SESSION["s"]["user"]["typ"] == 'user') { - - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } - - parent::onShowNew(); - } - - function onSubmit() { - global $app, $conf; - - // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]); - - // Check if Domain belongs to user - if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; - - // Check the client limits, if user is not the admin - if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($this->id == 0 && $client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } // end if user is not admin - - - // Set the server ID of the rr record to the same server ID as the parent record. - $this->dataRecord["server_id"] = $soa["server_id"]; - - // Update the serial number and timestamp of the RR record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ".$this->id); - $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); - $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); - - parent::onSubmit(); - } - - function onAfterInsert() { - global $app, $conf; - - //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); - - //* Update the serial number of the SOA record - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - - function onAfterUpdate() { - global $app, $conf; - - //* Update the serial number of the SOA record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } +class page_action extends dns_page_action { } diff --git a/interface/web/dns/dns_rp_edit.php b/interface/web/dns/dns_rp_edit.php index d7c2edcc7..1e55500cd 100644 --- a/interface/web/dns/dns_rp_edit.php +++ b/interface/web/dns/dns_rp_edit.php @@ -40,96 +40,10 @@ $tform_def_file = "form/dns_rp.tform.php"; require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; - -//* Check permissions for module -$app->auth->check_module_permissions('dns'); +require_once './dns_edit_base.php'; // Loading classes -$app->uses('tpl,tform,tform_actions,validate_dns'); -$app->load('tform_actions'); - -class page_action extends tform_actions { - - function onShowNew() { - global $app, $conf; - - // we will check only users, not admins - if($_SESSION["s"]["user"]["typ"] == 'user') { - - // Get the limits of the client - $client_group_id = $_SESSION["s"]["user"]["default_group"]; - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } - - parent::onShowNew(); - } - - function onSubmit() { - global $app, $conf; - - // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]); - - // Check if Domain belongs to user - if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; - - // Check the client limits, if user is not the admin - if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($this->id == 0 && $client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } // end if user is not admin - - - // Set the server ID of the rr record to the same server ID as the parent record. - $this->dataRecord["server_id"] = $soa["server_id"]; - - // Update the serial number and timestamp of the RR record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); - $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); - $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); - - parent::onSubmit(); - } - - function onAfterInsert() { - global $app, $conf; - - //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); - - //* Update the serial number of the SOA record - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - - function onAfterUpdate() { - global $app, $conf; - - //* Update the serial number of the SOA record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } +class page_action extends dns_page_action { } diff --git a/interface/web/dns/dns_srv_edit.php b/interface/web/dns/dns_srv_edit.php index d9e36251c..e2b290ab9 100644 --- a/interface/web/dns/dns_srv_edit.php +++ b/interface/web/dns/dns_srv_edit.php @@ -40,37 +40,10 @@ $tform_def_file = "form/dns_srv.tform.php"; require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; - -//* Check permissions for module -$app->auth->check_module_permissions('dns'); +require_once './dns_edit_base.php'; // Loading classes -$app->uses('tpl,tform,tform_actions,validate_dns'); -$app->load('tform_actions'); - -class page_action extends tform_actions { - - function onShowNew() { - global $app, $conf; - - // we will check only users, not admins - if($_SESSION["s"]["user"]["typ"] == 'user') { - - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } - - parent::onShowNew(); - } +class page_action extends dns_page_action { function onShowEnd() { global $app, $conf; @@ -93,65 +66,6 @@ class page_action extends tform_actions { $this->dataRecord['data'] = $this->dataRecord['weight'] .' '. $this->dataRecord['port'] .' '. $this->dataRecord['target']; } - function onSubmit() { - global $app, $conf; - - // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]); - - // Check if Domain belongs to user - if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; - - // Check the client limits, if user is not the admin - if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin - // Get the limits of the client - $client_group_id = $_SESSION["s"]["user"]["default_group"]; - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($this->id == 0 && $client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } // end if user is not admin - - - // Set the server ID of the rr record to the same server ID as the parent record. - $this->dataRecord["server_id"] = $soa["server_id"]; - - // Update the serial number and timestamp of the RR record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); - $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); - $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); - - parent::onSubmit(); - } - - function onAfterInsert() { - global $app, $conf; - - //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); - - //* Update the serial number of the SOA record - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - - function onAfterUpdate() { - global $app, $conf; - - //* Update the serial number of the SOA record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - } $page = new page_action; diff --git a/interface/web/dns/dns_txt_edit.php b/interface/web/dns/dns_txt_edit.php index 748e302c6..8f61d2bfe 100644 --- a/interface/web/dns/dns_txt_edit.php +++ b/interface/web/dns/dns_txt_edit.php @@ -40,96 +40,10 @@ $tform_def_file = "form/dns_txt.tform.php"; require_once '../../lib/config.inc.php'; require_once '../../lib/app.inc.php'; - -//* Check permissions for module -$app->auth->check_module_permissions('dns'); +require_once './dns_edit_base.php'; // Loading classes -$app->uses('tpl,tform,tform_actions,validate_dns'); -$app->load('tform_actions'); - -class page_action extends tform_actions { - - function onShowNew() { - global $app, $conf; - - // we will check only users, not admins - if($_SESSION["s"]["user"]["typ"] == 'user') { - - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } - - parent::onShowNew(); - } - - function onSubmit() { - global $app, $conf; - - // Get the parent soa record of the domain - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $_POST["zone"]); - - // Check if Domain belongs to user - if($soa["id"] != $_POST["zone"]) $app->tform->errorMessage .= $app->tform->wordbook["no_zone_perm"]; - - // Check the client limits, if user is not the admin - if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin - // Get the limits of the client - $client_group_id = intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_dns_record FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); - - // Check if the user may add another mailbox. - if($this->id == 0 && $client["limit_dns_record"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM dns_rr WHERE sys_groupid = ?", $client_group_id); - if($tmp["number"] >= $client["limit_dns_record"]) { - $app->error($app->tform->wordbook["limit_dns_record_txt"]); - } - } - } // end if user is not admin - - - // Set the server ID of the rr record to the same server ID as the parent record. - $this->dataRecord["server_id"] = $soa["server_id"]; - - // Update the serial number and timestamp of the RR record - $soa = $app->db->queryOneRecord("SELECT serial FROM dns_rr WHERE id = ?", $this->id); - $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]); - $this->dataRecord["stamp"] = date('Y-m-d H:i:s'); - - parent::onSubmit(); - } - - function onAfterInsert() { - global $app, $conf; - - //* Set the sys_groupid of the rr record to be the same then the sys_groupid of the soa record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $app->db->datalogUpdate('dns_rr', array("sys_groupid" => $soa['sys_groupid']), 'id', $this->id); - - //* Update the serial number of the SOA record - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } - - function onAfterUpdate() { - global $app, $conf; - - //* Update the serial number of the SOA record - $soa = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ? AND " . $app->tform->getAuthSQL('r'), $this->dataRecord["zone"]); - $soa_id = $app->functions->intval($_POST["zone"]); - $serial = $app->validate_dns->increase_serial($soa["serial"]); - $app->db->datalogUpdate('dns_soa', array("serial" => $serial), 'id', $soa_id); - } +class page_action extends dns_page_action { } -- GitLab From 0b45705bbd26d2ae35fa139ee1ad95f8c164defe Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 14:22:40 +0200 Subject: [PATCH 204/287] - patched templates (invalid html) --- interface/web/admin/templates/directive_snippets_list.htm | 2 +- interface/web/admin/templates/firewall_list.htm | 2 +- interface/web/admin/templates/groups_list.htm | 2 +- interface/web/admin/templates/iptables_list.htm | 2 +- interface/web/admin/templates/remote_user_list.htm | 2 +- interface/web/admin/templates/server_config_list.htm | 2 +- interface/web/admin/templates/server_ip_list.htm | 2 +- interface/web/admin/templates/server_list.htm | 2 +- interface/web/admin/templates/server_php_list.htm | 2 +- interface/web/admin/templates/software_package_list.htm | 4 ++-- interface/web/admin/templates/software_repo_list.htm | 2 +- interface/web/admin/templates/users_list.htm | 4 ++-- interface/web/client/templates/client_circle_list.htm | 2 +- .../web/client/templates/client_message_template_list.htm | 2 +- interface/web/client/templates/client_template_list.htm | 2 +- interface/web/client/templates/clients_list.htm | 6 +++--- interface/web/client/templates/domain_list.htm | 2 +- interface/web/client/templates/message_template_list.htm | 2 +- interface/web/client/templates/resellers_list.htm | 4 ++-- interface/web/dns/templates/dns_a_list.htm | 2 +- interface/web/dns/templates/dns_slave_admin_list.htm | 2 +- interface/web/dns/templates/dns_slave_list.htm | 2 +- interface/web/dns/templates/dns_soa_admin_list.htm | 2 +- interface/web/dns/templates/dns_soa_list.htm | 2 +- interface/web/dns/templates/dns_template_list.htm | 2 +- interface/web/help/templates/faq_manage_questions_list.htm | 4 ++-- interface/web/help/templates/help_faq_list.htm | 2 +- interface/web/help/templates/help_faq_sections_list.htm | 4 ++-- interface/web/help/templates/support_message_list.htm | 2 +- interface/web/mail/templates/mail_alias_list.htm | 2 +- interface/web/mail/templates/mail_aliasdomain_list.htm | 2 +- interface/web/mail/templates/mail_blacklist_list.htm | 2 +- interface/web/mail/templates/mail_content_filter_list.htm | 2 +- interface/web/mail/templates/mail_domain_admin_list.htm | 2 +- interface/web/mail/templates/mail_domain_catchall_list.htm | 2 +- interface/web/mail/templates/mail_domain_list.htm | 2 +- interface/web/mail/templates/mail_forward_list.htm | 2 +- interface/web/mail/templates/mail_get_list.htm | 2 +- interface/web/mail/templates/mail_mailinglist_list.htm | 4 ++-- interface/web/mail/templates/mail_relay_recipient_list.htm | 2 +- interface/web/mail/templates/mail_transport_list.htm | 2 +- interface/web/mail/templates/mail_user_filter_list.htm | 2 +- interface/web/mail/templates/mail_user_list.htm | 4 ++-- interface/web/mail/templates/mail_whitelist_list.htm | 2 +- interface/web/mail/templates/spamfilter_blacklist_list.htm | 2 +- interface/web/mail/templates/spamfilter_config_list.htm | 2 +- interface/web/mail/templates/spamfilter_policy_list.htm | 2 +- interface/web/mail/templates/spamfilter_users_list.htm | 2 +- interface/web/mailuser/templates/mail_user_filter_list.htm | 2 +- interface/web/monitor/templates/datalog_list.htm | 2 +- interface/web/monitor/templates/syslog_list.htm | 4 ++-- interface/web/sites/templates/cron_list.htm | 2 +- interface/web/sites/templates/database_admin_list.htm | 6 +++--- interface/web/sites/templates/database_list.htm | 6 +++--- interface/web/sites/templates/database_user_admin_list.htm | 4 ++-- interface/web/sites/templates/database_user_list.htm | 4 ++-- interface/web/sites/templates/shell_user_list.htm | 2 +- interface/web/sites/templates/web_childdomain_list.htm | 2 +- interface/web/sites/templates/web_folder_list.htm | 2 +- interface/web/sites/templates/web_folder_user_list.htm | 2 +- .../web/sites/templates/web_vhost_domain_admin_list.htm | 4 ++-- interface/web/sites/templates/webdav_user_list.htm | 2 +- interface/web/vm/templates/openvz_ip_list.htm | 2 +- interface/web/vm/templates/openvz_ostemplate_list.htm | 2 +- interface/web/vm/templates/openvz_template_list.htm | 2 +- interface/web/vm/templates/openvz_vm_list.htm | 4 ++-- 66 files changed, 84 insertions(+), 84 deletions(-) diff --git a/interface/web/admin/templates/directive_snippets_list.htm b/interface/web/admin/templates/directive_snippets_list.htm index 3aae3f361..bf43d4242 100644 --- a/interface/web/admin/templates/directive_snippets_list.htm +++ b/interface/web/admin/templates/directive_snippets_list.htm @@ -37,7 +37,7 @@
diff --git a/interface/web/admin/templates/firewall_list.htm b/interface/web/admin/templates/firewall_list.htm index f60294ebd..ac85f7e4f 100644 --- a/interface/web/admin/templates/firewall_list.htm +++ b/interface/web/admin/templates/firewall_list.htm @@ -40,7 +40,7 @@ diff --git a/interface/web/admin/templates/groups_list.htm b/interface/web/admin/templates/groups_list.htm index f18ee8251..d53ee58b2 100644 --- a/interface/web/admin/templates/groups_list.htm +++ b/interface/web/admin/templates/groups_list.htm @@ -35,7 +35,7 @@ diff --git a/interface/web/admin/templates/iptables_list.htm b/interface/web/admin/templates/iptables_list.htm index 379f587df..e1fcb3dc0 100644 --- a/interface/web/admin/templates/iptables_list.htm +++ b/interface/web/admin/templates/iptables_list.htm @@ -51,7 +51,7 @@ diff --git a/interface/web/admin/templates/remote_user_list.htm b/interface/web/admin/templates/remote_user_list.htm index 1b483456a..de65c6453 100644 --- a/interface/web/admin/templates/remote_user_list.htm +++ b/interface/web/admin/templates/remote_user_list.htm @@ -33,7 +33,7 @@ diff --git a/interface/web/admin/templates/server_config_list.htm b/interface/web/admin/templates/server_config_list.htm index 5f6a2dc97..ef0935552 100644 --- a/interface/web/admin/templates/server_config_list.htm +++ b/interface/web/admin/templates/server_config_list.htm @@ -24,7 +24,7 @@ diff --git a/interface/web/admin/templates/server_ip_list.htm b/interface/web/admin/templates/server_ip_list.htm index 7aa218227..373bc4c6d 100644 --- a/interface/web/admin/templates/server_ip_list.htm +++ b/interface/web/admin/templates/server_ip_list.htm @@ -45,7 +45,7 @@ diff --git a/interface/web/admin/templates/server_list.htm b/interface/web/admin/templates/server_list.htm index 016b0cd1d..dd054731f 100644 --- a/interface/web/admin/templates/server_list.htm +++ b/interface/web/admin/templates/server_list.htm @@ -45,7 +45,7 @@ diff --git a/interface/web/admin/templates/server_php_list.htm b/interface/web/admin/templates/server_php_list.htm index 659797477..0fb98965b 100644 --- a/interface/web/admin/templates/server_php_list.htm +++ b/interface/web/admin/templates/server_php_list.htm @@ -36,7 +36,7 @@ diff --git a/interface/web/admin/templates/software_package_list.htm b/interface/web/admin/templates/software_package_list.htm index 4653de43b..31969c057 100644 --- a/interface/web/admin/templates/software_package_list.htm +++ b/interface/web/admin/templates/software_package_list.htm @@ -32,8 +32,8 @@ diff --git a/interface/web/admin/templates/software_repo_list.htm b/interface/web/admin/templates/software_repo_list.htm index ab70e1484..8b1a48b56 100644 --- a/interface/web/admin/templates/software_repo_list.htm +++ b/interface/web/admin/templates/software_repo_list.htm @@ -37,7 +37,7 @@ diff --git a/interface/web/admin/templates/users_list.htm b/interface/web/admin/templates/users_list.htm index 1898974f3..b7872527f 100644 --- a/interface/web/admin/templates/users_list.htm +++ b/interface/web/admin/templates/users_list.htm @@ -42,8 +42,8 @@ diff --git a/interface/web/client/templates/client_circle_list.htm b/interface/web/client/templates/client_circle_list.htm index d1ec76766..56bce62d6 100644 --- a/interface/web/client/templates/client_circle_list.htm +++ b/interface/web/client/templates/client_circle_list.htm @@ -40,7 +40,7 @@ diff --git a/interface/web/client/templates/client_message_template_list.htm b/interface/web/client/templates/client_message_template_list.htm index cc409bd0f..46337c519 100644 --- a/interface/web/client/templates/client_message_template_list.htm +++ b/interface/web/client/templates/client_message_template_list.htm @@ -32,7 +32,7 @@ diff --git a/interface/web/client/templates/client_template_list.htm b/interface/web/client/templates/client_template_list.htm index 1d4ad1c3f..37b8aa289 100644 --- a/interface/web/client/templates/client_template_list.htm +++ b/interface/web/client/templates/client_template_list.htm @@ -37,7 +37,7 @@ diff --git a/interface/web/client/templates/clients_list.htm b/interface/web/client/templates/clients_list.htm index f458022e6..27d4b7da6 100644 --- a/interface/web/client/templates/clients_list.htm +++ b/interface/web/client/templates/clients_list.htm @@ -50,11 +50,11 @@ diff --git a/interface/web/client/templates/domain_list.htm b/interface/web/client/templates/domain_list.htm index a53be24af..825b29871 100644 --- a/interface/web/client/templates/domain_list.htm +++ b/interface/web/client/templates/domain_list.htm @@ -32,7 +32,7 @@ diff --git a/interface/web/client/templates/message_template_list.htm b/interface/web/client/templates/message_template_list.htm index f4d411966..70224abc8 100644 --- a/interface/web/client/templates/message_template_list.htm +++ b/interface/web/client/templates/message_template_list.htm @@ -32,7 +32,7 @@ diff --git a/interface/web/client/templates/resellers_list.htm b/interface/web/client/templates/resellers_list.htm index 0bb6afad2..9538e7108 100644 --- a/interface/web/client/templates/resellers_list.htm +++ b/interface/web/client/templates/resellers_list.htm @@ -49,8 +49,8 @@ diff --git a/interface/web/dns/templates/dns_a_list.htm b/interface/web/dns/templates/dns_a_list.htm index 4343d1bd9..790fbdcb3 100644 --- a/interface/web/dns/templates/dns_a_list.htm +++ b/interface/web/dns/templates/dns_a_list.htm @@ -71,7 +71,7 @@ diff --git a/interface/web/dns/templates/dns_slave_admin_list.htm b/interface/web/dns/templates/dns_slave_admin_list.htm index 094c1afda..f4395849b 100644 --- a/interface/web/dns/templates/dns_slave_admin_list.htm +++ b/interface/web/dns/templates/dns_slave_admin_list.htm @@ -59,7 +59,7 @@ diff --git a/interface/web/dns/templates/dns_slave_list.htm b/interface/web/dns/templates/dns_slave_list.htm index 47b5a918c..27916f4b2 100644 --- a/interface/web/dns/templates/dns_slave_list.htm +++ b/interface/web/dns/templates/dns_slave_list.htm @@ -56,7 +56,7 @@ diff --git a/interface/web/dns/templates/dns_soa_admin_list.htm b/interface/web/dns/templates/dns_soa_admin_list.htm index 87ffe368b..0f14534c5 100644 --- a/interface/web/dns/templates/dns_soa_admin_list.htm +++ b/interface/web/dns/templates/dns_soa_admin_list.htm @@ -64,7 +64,7 @@ diff --git a/interface/web/dns/templates/dns_soa_list.htm b/interface/web/dns/templates/dns_soa_list.htm index 6c5377954..516211990 100644 --- a/interface/web/dns/templates/dns_soa_list.htm +++ b/interface/web/dns/templates/dns_soa_list.htm @@ -61,7 +61,7 @@ diff --git a/interface/web/dns/templates/dns_template_list.htm b/interface/web/dns/templates/dns_template_list.htm index ce0fd485b..f7816cf4d 100644 --- a/interface/web/dns/templates/dns_template_list.htm +++ b/interface/web/dns/templates/dns_template_list.htm @@ -34,7 +34,7 @@ diff --git a/interface/web/help/templates/faq_manage_questions_list.htm b/interface/web/help/templates/faq_manage_questions_list.htm index e0a0d4549..7659d3909 100644 --- a/interface/web/help/templates/faq_manage_questions_list.htm +++ b/interface/web/help/templates/faq_manage_questions_list.htm @@ -24,10 +24,10 @@ diff --git a/interface/web/help/templates/help_faq_list.htm b/interface/web/help/templates/help_faq_list.htm index 93bb9d2af..e81dae2e0 100644 --- a/interface/web/help/templates/help_faq_list.htm +++ b/interface/web/help/templates/help_faq_list.htm @@ -5,7 +5,7 @@ {tmpl_var name='hf_answer'}

- + {tmpl_var name="edit_txt"}

diff --git a/interface/web/help/templates/help_faq_sections_list.htm b/interface/web/help/templates/help_faq_sections_list.htm index 6ccc7b49e..5a3733aa0 100644 --- a/interface/web/help/templates/help_faq_sections_list.htm +++ b/interface/web/help/templates/help_faq_sections_list.htm @@ -26,10 +26,10 @@
diff --git a/interface/web/help/templates/support_message_list.htm b/interface/web/help/templates/support_message_list.htm index 4b7ee5abc..1695cccd7 100644 --- a/interface/web/help/templates/support_message_list.htm +++ b/interface/web/help/templates/support_message_list.htm @@ -37,7 +37,7 @@ diff --git a/interface/web/mail/templates/mail_alias_list.htm b/interface/web/mail/templates/mail_alias_list.htm index d291a92dc..5f19fba13 100644 --- a/interface/web/mail/templates/mail_alias_list.htm +++ b/interface/web/mail/templates/mail_alias_list.htm @@ -53,7 +53,7 @@ diff --git a/interface/web/mail/templates/mail_aliasdomain_list.htm b/interface/web/mail/templates/mail_aliasdomain_list.htm index 2c1eeb75d..6ce208b48 100644 --- a/interface/web/mail/templates/mail_aliasdomain_list.htm +++ b/interface/web/mail/templates/mail_aliasdomain_list.htm @@ -53,7 +53,7 @@ diff --git a/interface/web/mail/templates/mail_blacklist_list.htm b/interface/web/mail/templates/mail_blacklist_list.htm index fdba439c7..b023f5404 100644 --- a/interface/web/mail/templates/mail_blacklist_list.htm +++ b/interface/web/mail/templates/mail_blacklist_list.htm @@ -56,7 +56,7 @@ diff --git a/interface/web/mail/templates/mail_content_filter_list.htm b/interface/web/mail/templates/mail_content_filter_list.htm index 04b997fe7..01689aa4d 100644 --- a/interface/web/mail/templates/mail_content_filter_list.htm +++ b/interface/web/mail/templates/mail_content_filter_list.htm @@ -56,7 +56,7 @@ diff --git a/interface/web/mail/templates/mail_domain_admin_list.htm b/interface/web/mail/templates/mail_domain_admin_list.htm index 94608b730..1b2b41f39 100644 --- a/interface/web/mail/templates/mail_domain_admin_list.htm +++ b/interface/web/mail/templates/mail_domain_admin_list.htm @@ -39,7 +39,7 @@ diff --git a/interface/web/mail/templates/mail_domain_catchall_list.htm b/interface/web/mail/templates/mail_domain_catchall_list.htm index 42a05ca51..29483ae3d 100644 --- a/interface/web/mail/templates/mail_domain_catchall_list.htm +++ b/interface/web/mail/templates/mail_domain_catchall_list.htm @@ -53,7 +53,7 @@ diff --git a/interface/web/mail/templates/mail_domain_list.htm b/interface/web/mail/templates/mail_domain_list.htm index 01d9ea52e..bb1eba146 100644 --- a/interface/web/mail/templates/mail_domain_list.htm +++ b/interface/web/mail/templates/mail_domain_list.htm @@ -53,7 +53,7 @@ diff --git a/interface/web/mail/templates/mail_forward_list.htm b/interface/web/mail/templates/mail_forward_list.htm index 298139343..bb4b95ed1 100644 --- a/interface/web/mail/templates/mail_forward_list.htm +++ b/interface/web/mail/templates/mail_forward_list.htm @@ -53,7 +53,7 @@ diff --git a/interface/web/mail/templates/mail_get_list.htm b/interface/web/mail/templates/mail_get_list.htm index 372d927c8..58a550a7d 100644 --- a/interface/web/mail/templates/mail_get_list.htm +++ b/interface/web/mail/templates/mail_get_list.htm @@ -59,7 +59,7 @@ diff --git a/interface/web/mail/templates/mail_mailinglist_list.htm b/interface/web/mail/templates/mail_mailinglist_list.htm index 3e3458936..7e15df3aa 100644 --- a/interface/web/mail/templates/mail_mailinglist_list.htm +++ b/interface/web/mail/templates/mail_mailinglist_list.htm @@ -50,9 +50,9 @@ diff --git a/interface/web/mail/templates/mail_relay_recipient_list.htm b/interface/web/mail/templates/mail_relay_recipient_list.htm index 7ab97fa22..7dac3e7ce 100644 --- a/interface/web/mail/templates/mail_relay_recipient_list.htm +++ b/interface/web/mail/templates/mail_relay_recipient_list.htm @@ -52,7 +52,7 @@ diff --git a/interface/web/mail/templates/mail_transport_list.htm b/interface/web/mail/templates/mail_transport_list.htm index a1fcb0885..4b4b2d9e5 100644 --- a/interface/web/mail/templates/mail_transport_list.htm +++ b/interface/web/mail/templates/mail_transport_list.htm @@ -59,7 +59,7 @@ diff --git a/interface/web/mail/templates/mail_user_filter_list.htm b/interface/web/mail/templates/mail_user_filter_list.htm index 6ab6e14b3..9c854d515 100644 --- a/interface/web/mail/templates/mail_user_filter_list.htm +++ b/interface/web/mail/templates/mail_user_filter_list.htm @@ -42,7 +42,7 @@ diff --git a/interface/web/mail/templates/mail_user_list.htm b/interface/web/mail/templates/mail_user_list.htm index 69719a7cd..0ac26e105 100644 --- a/interface/web/mail/templates/mail_user_list.htm +++ b/interface/web/mail/templates/mail_user_list.htm @@ -73,9 +73,9 @@ diff --git a/interface/web/mail/templates/mail_whitelist_list.htm b/interface/web/mail/templates/mail_whitelist_list.htm index 5740de6ff..cb3b783e7 100644 --- a/interface/web/mail/templates/mail_whitelist_list.htm +++ b/interface/web/mail/templates/mail_whitelist_list.htm @@ -40,7 +40,7 @@ diff --git a/interface/web/mail/templates/spamfilter_blacklist_list.htm b/interface/web/mail/templates/spamfilter_blacklist_list.htm index 24e208003..91a45916b 100644 --- a/interface/web/mail/templates/spamfilter_blacklist_list.htm +++ b/interface/web/mail/templates/spamfilter_blacklist_list.htm @@ -43,7 +43,7 @@ diff --git a/interface/web/mail/templates/spamfilter_config_list.htm b/interface/web/mail/templates/spamfilter_config_list.htm index e8dffcd46..486a79e6d 100644 --- a/interface/web/mail/templates/spamfilter_config_list.htm +++ b/interface/web/mail/templates/spamfilter_config_list.htm @@ -31,7 +31,7 @@ diff --git a/interface/web/mail/templates/spamfilter_policy_list.htm b/interface/web/mail/templates/spamfilter_policy_list.htm index 34de0ddf6..da1183d75 100644 --- a/interface/web/mail/templates/spamfilter_policy_list.htm +++ b/interface/web/mail/templates/spamfilter_policy_list.htm @@ -43,7 +43,7 @@ diff --git a/interface/web/mail/templates/spamfilter_users_list.htm b/interface/web/mail/templates/spamfilter_users_list.htm index 2315554d6..5f8ef83ba 100644 --- a/interface/web/mail/templates/spamfilter_users_list.htm +++ b/interface/web/mail/templates/spamfilter_users_list.htm @@ -43,7 +43,7 @@ diff --git a/interface/web/mailuser/templates/mail_user_filter_list.htm b/interface/web/mailuser/templates/mail_user_filter_list.htm index b4b615bac..8b9ea17c5 100644 --- a/interface/web/mailuser/templates/mail_user_filter_list.htm +++ b/interface/web/mailuser/templates/mail_user_filter_list.htm @@ -30,7 +30,7 @@ diff --git a/interface/web/monitor/templates/datalog_list.htm b/interface/web/monitor/templates/datalog_list.htm index 2d40a370c..eb79f46b5 100644 --- a/interface/web/monitor/templates/datalog_list.htm +++ b/interface/web/monitor/templates/datalog_list.htm @@ -33,7 +33,7 @@ diff --git a/interface/web/monitor/templates/syslog_list.htm b/interface/web/monitor/templates/syslog_list.htm index b9e2134f6..8f62422a8 100644 --- a/interface/web/monitor/templates/syslog_list.htm +++ b/interface/web/monitor/templates/syslog_list.htm @@ -34,10 +34,10 @@ diff --git a/interface/web/sites/templates/cron_list.htm b/interface/web/sites/templates/cron_list.htm index 60e5cfb52..77c89eedf 100644 --- a/interface/web/sites/templates/cron_list.htm +++ b/interface/web/sites/templates/cron_list.htm @@ -56,7 +56,7 @@ diff --git a/interface/web/sites/templates/database_admin_list.htm b/interface/web/sites/templates/database_admin_list.htm index dcf4b7fd1..c8149363a 100644 --- a/interface/web/sites/templates/database_admin_list.htm +++ b/interface/web/sites/templates/database_admin_list.htm @@ -52,10 +52,10 @@ diff --git a/interface/web/sites/templates/database_list.htm b/interface/web/sites/templates/database_list.htm index f3cda1b14..f75fd9871 100644 --- a/interface/web/sites/templates/database_list.htm +++ b/interface/web/sites/templates/database_list.htm @@ -66,10 +66,10 @@ diff --git a/interface/web/sites/templates/database_user_admin_list.htm b/interface/web/sites/templates/database_user_admin_list.htm index fcf222887..f13423856 100644 --- a/interface/web/sites/templates/database_user_admin_list.htm +++ b/interface/web/sites/templates/database_user_admin_list.htm @@ -29,8 +29,8 @@ diff --git a/interface/web/sites/templates/database_user_list.htm b/interface/web/sites/templates/database_user_list.htm index e0c44ccf5..b29d5c060 100644 --- a/interface/web/sites/templates/database_user_list.htm +++ b/interface/web/sites/templates/database_user_list.htm @@ -45,8 +45,8 @@ diff --git a/interface/web/sites/templates/shell_user_list.htm b/interface/web/sites/templates/shell_user_list.htm index 3de81689b..9be1d8485 100644 --- a/interface/web/sites/templates/shell_user_list.htm +++ b/interface/web/sites/templates/shell_user_list.htm @@ -56,7 +56,7 @@ diff --git a/interface/web/sites/templates/web_childdomain_list.htm b/interface/web/sites/templates/web_childdomain_list.htm index 82bda6c8a..0800fd180 100644 --- a/interface/web/sites/templates/web_childdomain_list.htm +++ b/interface/web/sites/templates/web_childdomain_list.htm @@ -56,7 +56,7 @@ diff --git a/interface/web/sites/templates/web_folder_list.htm b/interface/web/sites/templates/web_folder_list.htm index f94703005..aaccb4889 100644 --- a/interface/web/sites/templates/web_folder_list.htm +++ b/interface/web/sites/templates/web_folder_list.htm @@ -55,7 +55,7 @@ diff --git a/interface/web/sites/templates/web_folder_user_list.htm b/interface/web/sites/templates/web_folder_user_list.htm index 7f4689c47..6b67e0591 100644 --- a/interface/web/sites/templates/web_folder_user_list.htm +++ b/interface/web/sites/templates/web_folder_user_list.htm @@ -52,7 +52,7 @@ diff --git a/interface/web/sites/templates/web_vhost_domain_admin_list.htm b/interface/web/sites/templates/web_vhost_domain_admin_list.htm index 4787def9e..30502079c 100644 --- a/interface/web/sites/templates/web_vhost_domain_admin_list.htm +++ b/interface/web/sites/templates/web_vhost_domain_admin_list.htm @@ -45,8 +45,8 @@ diff --git a/interface/web/sites/templates/webdav_user_list.htm b/interface/web/sites/templates/webdav_user_list.htm index 68615e629..01764cc2f 100644 --- a/interface/web/sites/templates/webdav_user_list.htm +++ b/interface/web/sites/templates/webdav_user_list.htm @@ -56,7 +56,7 @@ diff --git a/interface/web/vm/templates/openvz_ip_list.htm b/interface/web/vm/templates/openvz_ip_list.htm index 69be02bdd..fd12694c3 100644 --- a/interface/web/vm/templates/openvz_ip_list.htm +++ b/interface/web/vm/templates/openvz_ip_list.htm @@ -39,7 +39,7 @@ diff --git a/interface/web/vm/templates/openvz_ostemplate_list.htm b/interface/web/vm/templates/openvz_ostemplate_list.htm index 299cc0ef0..85f46e673 100644 --- a/interface/web/vm/templates/openvz_ostemplate_list.htm +++ b/interface/web/vm/templates/openvz_ostemplate_list.htm @@ -42,7 +42,7 @@ diff --git a/interface/web/vm/templates/openvz_template_list.htm b/interface/web/vm/templates/openvz_template_list.htm index 85042fe73..5ec0cb791 100644 --- a/interface/web/vm/templates/openvz_template_list.htm +++ b/interface/web/vm/templates/openvz_template_list.htm @@ -33,7 +33,7 @@ diff --git a/interface/web/vm/templates/openvz_vm_list.htm b/interface/web/vm/templates/openvz_vm_list.htm index 6b03cda65..516b536bb 100644 --- a/interface/web/vm/templates/openvz_vm_list.htm +++ b/interface/web/vm/templates/openvz_vm_list.htm @@ -48,8 +48,8 @@ -- GitLab From e956aca559ffa3f53c9e39beed6226f342e1d526 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 14:25:39 +0200 Subject: [PATCH 205/287] - patches for some errors --- server/cron.php | 2 +- server/plugins-available/nginx_plugin.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/cron.php b/server/cron.php index 7a43d0490..c197da951 100644 --- a/server/cron.php +++ b/server/cron.php @@ -74,7 +74,7 @@ foreach($files as $f) { unset($cronjob); continue; } - print 'Included ' . $class_name . ' from ' . $file_path . ' -> will now run job.' . "\n"; + print 'Included ' . $class_name . ' from ' . $path . '/' . $f . ' -> will now run job.' . "\n"; $cronjob->run(); diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 15fd0461e..de6a7a451 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -2365,7 +2365,7 @@ class nginx_plugin { } elseif($data['new']['php'] != 'hhvm' && $data['old']['php'] == 'hhvm') { exec('/etc/init.d/hhvm_' . $data['old']['system_user'] . ' stop >/dev/null 2>&1'); exec('/usr/sbin/update-rc.d hhvm_' . $data['old']['system_user'] . ' remove >/dev/null 2>&1'); - unlink('/etc/init.d/hhvm_' . $data['old']['system_user'] . ' >/dev/null 2>&1'); + unlink('/etc/init.d/hhvm_' . $data['old']['system_user']); } } -- GitLab From 61f1f5a9a885b90ea585cc70b6917301c5f0df0f Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 14:51:38 +0200 Subject: [PATCH 206/287] - ported patches --- install/sql/ispconfig3.sql | 4 +- interface/lib/classes/functions.inc.php | 9 ++ interface/lib/classes/tform_base.inc.php | 3 + interface/web/admin/system_config_edit.php | 25 ++++++ .../templates/system_config_domains_edit.htm | 8 +- .../templates/system_config_misc_edit.htm | 88 ++++++++++++++++++- interface/web/client/form/client.tform.php | 10 ++- interface/web/client/form/reseller.tform.php | 10 ++- .../client/templates/client_circle_edit.htm | 5 +- .../client/templates/client_edit_limits.htm | 23 +++-- .../client_template_edit_template.htm | 4 +- .../web/client/templates/message_template.htm | 7 +- .../client/templates/reseller_edit_limits.htm | 21 ++--- interface/web/dns/templates/dns_import.htm | 4 +- interface/web/index.php | 13 +++ .../web/sites/form/web_childdomain.tform.php | 2 +- .../web/sites/form/web_vhost_domain.tform.php | 5 +- interface/web/sites/lib/module.conf.php | 22 ++++- .../sites/templates/web_childdomain_list.htm | 6 +- .../templates/web_vhost_domain_admin_list.htm | 6 +- .../sites/templates/web_vhost_domain_list.htm | 6 +- .../default/assets/stylesheets/ispconfig.css | 3 +- .../web/themes/default/templates/main.tpl.htm | 2 +- 23 files changed, 223 insertions(+), 63 deletions(-) diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 571d59d5f..5011f16f9 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1621,6 +1621,8 @@ CREATE TABLE `sys_group` ( CREATE TABLE `sys_ini` ( `sysini_id` int(11) unsigned NOT NULL auto_increment, `config` longtext, + `default_logo` text NOT NULL, + `custom_logo` text NOT NULL, PRIMARY KEY (`sysini_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; @@ -2369,7 +2371,7 @@ INSERT INTO `sys_group` (`groupid`, `name`, `description`, `client_id`) VALUES ( -- Dumping data for table `sys_ini` -- -INSERT INTO `sys_ini` (`sysini_id`, `config`) VALUES (1, ''); +INSERT INTO `sys_ini` (`sysini_id`, `config`, `default_logo`, `custom_logo`) VALUES (1, '', 'data:image/png;base64,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', ''); -- -------------------------------------------------------- diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php index 5bbff4015..43eec67fc 100644 --- a/interface/lib/classes/functions.inc.php +++ b/interface/lib/classes/functions.inc.php @@ -380,6 +380,15 @@ class functions { return true; } + + public function getimagesizefromstring($string){ + if (!function_exists('getimagesizefromstring')) { + $uri = 'data://application/octet-stream;base64,' . base64_encode($string); + return getimagesize($uri); + } else { + return getimagesizefromstring($string); + } + } } diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index f5ae05b8e..fb943c50b 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -810,6 +810,9 @@ class tform_base { case 'IDNTOUTF8': $returnval = $app->functions->idn_decode($returnval); break; + case 'TRIM': + $returnval = trim($returnval); + break; default: $this->errorMessage .= "Unknown Filter: ".$filter['type']; break; diff --git a/interface/web/admin/system_config_edit.php b/interface/web/admin/system_config_edit.php index 1e1fdc24f..c07810c8d 100644 --- a/interface/web/admin/system_config_edit.php +++ b/interface/web/admin/system_config_edit.php @@ -96,6 +96,17 @@ class page_action extends tform_actions { if($available_dashlets_txt == '') $available_dashlets_txt = '------'; $app->tpl->setVar("available_dashlets_txt", $available_dashlets_txt); + + // Logo + $sys_ini = $app->db->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = ?", $this->id); + if($sys_ini['custom_logo'] != ''){ + $logo = '  '; + } else { + $logo = ''; + } + $default_logo = ''; + $app->tpl->setVar("used_logo", $logo); + $app->tpl->setVar("default_logo", $default_logo); parent::onShowEnd(); } @@ -183,6 +194,20 @@ class page_action extends tform_actions { "FROM web_domain WHERE type NOT IN ('subdomain','vhostsubdomain')"; $app->db->query($sql); } + + //die(print_r($_FILES)); + // Logo + /* + if(isset($_FILES['file']['name']) && is_uploaded_file($_FILES['file']['tmp_name'])){ + //print_r($_FILES); + + $path= $_FILES['file']['tmp_name']; + $type = pathinfo($path, PATHINFO_EXTENSION); + $data = file_get_contents($path); + $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data); + $app->db->query("UPDATE sys_ini SET custom_logo = ? WHERE sysini_id = ?", $base64, $this->id); + } + */ // Maintenance mode if($server_config_array['misc']['maintenance_mode'] == 'y'){ diff --git a/interface/web/admin/templates/system_config_domains_edit.htm b/interface/web/admin/templates/system_config_domains_edit.htm index a9c870510..c651e4246 100644 --- a/interface/web/admin/templates/system_config_domains_edit.htm +++ b/interface/web/admin/templates/system_config_domains_edit.htm @@ -1,10 +1,10 @@ + -

+
+

- -

{tmpl_var name='use_domain_module_txt'}

diff --git a/interface/web/admin/templates/system_config_misc_edit.htm b/interface/web/admin/templates/system_config_misc_edit.htm index f36962f62..4674d4cdf 100644 --- a/interface/web/admin/templates/system_config_misc_edit.htm +++ b/interface/web/admin/templates/system_config_misc_edit.htm @@ -3,8 +3,14 @@

- - Misc +
+ +
+
+
+ + +
@@ -98,9 +104,83 @@ {tmpl_var name='maintenance_mode'}
+ + +

+
+ +

ERROR

+
- +
-
\ No newline at end of file + + \ 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 7507c1843..ef8ce3387 100644 --- a/interface/web/client/form/client.tform.php +++ b/interface/web/client/form/client.tform.php @@ -116,7 +116,10 @@ $form["tabs"]['address'] = array ( 'maxlength' => '255', 'rows' => '', 'cols' => '', - 'searchable' => 1 + 'searchable' => 1, + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'TRIM'), + ), ), 'contact_name' => array ( 'datatype' => 'VARCHAR', @@ -131,7 +134,10 @@ $form["tabs"]['address'] = array ( 'maxlength' => '255', 'rows' => '', 'cols' => '', - 'searchable' => 1 + 'searchable' => 1, + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'TRIM'), + ), ), 'customer_no' => array ( 'datatype' => 'VARCHAR', diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php index 75e9fa2e6..822e96ab7 100644 --- a/interface/web/client/form/reseller.tform.php +++ b/interface/web/client/form/reseller.tform.php @@ -116,7 +116,10 @@ $form["tabs"]['address'] = array ( 'maxlength' => '255', 'rows' => '', 'cols' => '', - 'searchable' => 1 + 'searchable' => 1, + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'TRIM'), + ), ), 'contact_name' => array ( 'datatype' => 'VARCHAR', @@ -131,7 +134,10 @@ $form["tabs"]['address'] = array ( 'maxlength' => '255', 'rows' => '', 'cols' => '', - 'searchable' => 1 + 'searchable' => 1, + 'filters' => array( 0 => array( 'event' => 'SAVE', + 'type' => 'TRIM'), + ), ), 'customer_no' => array ( 'datatype' => 'VARCHAR', diff --git a/interface/web/client/templates/client_circle_edit.htm b/interface/web/client/templates/client_circle_edit.htm index ddc3f6e1c..0bdf2f49a 100644 --- a/interface/web/client/templates/client_circle_edit.htm +++ b/interface/web/client/templates/client_circle_edit.htm @@ -1,10 +1,11 @@ + -

+
+

- {tmpl_var name='circle_txt'}
diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm index ed150b4d1..e7de5c665 100644 --- a/interface/web/client/templates/client_edit_limits.htm +++ b/interface/web/client/templates/client_edit_limits.htm @@ -1,20 +1,14 @@ + -

+
+

- -
-

{tmpl_var name="toolsarea_head_txt"}

-
- -
- -
- -
- Limits + +
+
Limits
+
+ +
-
+
    {tmpl_var name='template_additional_list'}
diff --git a/interface/web/client/templates/client_template_edit_template.htm b/interface/web/client/templates/client_template_edit_template.htm index 5e07d8df0..e06d07792 100644 --- a/interface/web/client/templates/client_template_edit_template.htm +++ b/interface/web/client/templates/client_template_edit_template.htm @@ -1,7 +1,9 @@ + -

+
+

Template diff --git a/interface/web/client/templates/message_template.htm b/interface/web/client/templates/message_template.htm index 26522d4b6..aa27d181f 100644 --- a/interface/web/client/templates/message_template.htm +++ b/interface/web/client/templates/message_template.htm @@ -18,12 +18,13 @@
-

{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"}
{tmpl_var name='variables_description_txt'} +
+
{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"}
{tmpl_var name='variables_description_txt'}
-
-
{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"}
{tmpl_var name='variables_description_txt'} +
+
{tmpl_var name='variables_txt'}: {tmpl_var name="message_variables"}
{tmpl_var name='variables_description_txt'}
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm index 7644b9574..d58e28416 100644 --- a/interface/web/client/templates/reseller_edit_limits.htm +++ b/interface/web/client/templates/reseller_edit_limits.htm @@ -1,20 +1,12 @@ + -

+
+

- -
-

{tmpl_var name="toolsarea_head_txt"}

-
- -
- -
-
-
Limits @@ -30,9 +22,14 @@ {tmpl_var name='tpl_add_select'}
+ +
+ +
+
-
+
    {tmpl_var name='template_additional_list'}
diff --git a/interface/web/dns/templates/dns_import.htm b/interface/web/dns/templates/dns_import.htm index de6d356b6..b72ef920e 100644 --- a/interface/web/dns/templates/dns_import.htm +++ b/interface/web/dns/templates/dns_import.htm @@ -38,11 +38,11 @@
-

+

- +
diff --git a/interface/web/index.php b/interface/web/index.php index f6929bafc..e942c1068 100644 --- a/interface/web/index.php +++ b/interface/web/index.php @@ -87,6 +87,19 @@ unset($js_d_files); $app->tpl->setVar('current_theme', isset($_SESSION['s']['theme']) ? $_SESSION['s']['theme'] : 'default'); +// Logo +$logo = $app->db->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = 1"); +if($logo['custom_logo'] != ''){ + $base64_logo_txt = $logo['custom_logo']; +} else { + $base64_logo_txt = $logo['default_logo']; +} +$tmp_base64 = explode(',', $base64_logo_txt, 2); +$logo_dimensions = $app->functions->getimagesizefromstring(base64_decode($tmp_base64[1])); +$app->tpl->setVar('base64_logo_width', $logo_dimensions[0]); +$app->tpl->setVar('base64_logo_height', $logo_dimensions[1]); +$app->tpl->setVar('base64_logo_txt', $base64_logo_txt); + $app->tpl_defaults(); $app->tpl->pparse(); ?> diff --git a/interface/web/sites/form/web_childdomain.tform.php b/interface/web/sites/form/web_childdomain.tform.php index 1081a233d..09145f976 100644 --- a/interface/web/sites/form/web_childdomain.tform.php +++ b/interface/web/sites/form/web_childdomain.tform.php @@ -58,7 +58,7 @@ $form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, $form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete $form["tabs"]['domain'] = array ( - 'title' => "Domain", + 'title' => ($childdomain_type == 'aliasdomain'? 'Aliasdomain' : 'Subdomain'), 'width' => 100, 'template' => "templates/web_childdomain_edit.htm", 'fields' => array ( diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php index 47f8f65ad..3c4723aba 100644 --- a/interface/web/sites/form/web_vhost_domain.tform.php +++ b/interface/web/sites/form/web_vhost_domain.tform.php @@ -41,16 +41,19 @@ $vhostdomain_type = 'domain'; $form_title = "Web Domain"; $validator_function = 'web_domain'; +$first_tab_title = "Domain"; if(isset($_SESSION['s']['var']['vhostdomain_type'])) { if($_SESSION['s']['var']['vhostdomain_type'] == 'subdomain') { $vhostdomain_type = 'subdomain'; $form_title = "Subdomain"; $validator_function = 'sub_domain'; + $first_tab_title = "Subomain"; } elseif($_SESSION['s']['var']['vhostdomain_type'] == 'aliasdomain') { $vhostdomain_type = 'aliasdomain'; $form_title = "Aliasdomain"; $validator_function = 'alias_domain'; + $first_tab_title = "Aliasomain"; } } @@ -96,7 +99,7 @@ $app->uses('getconf'); $web_config = $app->getconf->get_global_config('sites'); $form["tabs"]['domain'] = array ( - 'title' => "Domain", + 'title' => $first_tab_title, 'width' => 100, 'template' => "templates/web_vhost_domain_edit.htm", 'readonly' => $web_domain_edit_readonly, diff --git a/interface/web/sites/lib/module.conf.php b/interface/web/sites/lib/module.conf.php index b6d506a15..8e253fd27 100644 --- a/interface/web/sites/lib/module.conf.php +++ b/interface/web/sites/lib/module.conf.php @@ -96,10 +96,24 @@ if($app->auth->get_client_limit($userid, 'ftp_user') != 0) if($app->auth->get_client_limit($userid, 'webdav_user') != 0) { - $items[] = array( 'title' => "Webdav-User", - 'target' => 'content', - 'link' => 'sites/webdav_user_list.php', - 'html_id' => 'webdav_user_list'); + $apache_in_use = false; + $servers = $app->db->queryAllRecords("SELECT * FROM server WHERE web_server = 1 AND active = 1"); + if(is_array($servers) && !empty($servers)){ + foreach($servers as $server){ + $tmp_web_config = $app->getconf->get_server_config($server['server_id'], 'web'); + if(strtolower($tmp_web_config['server_type']) == 'apache'){ + $apache_in_use = true; + break; + } + } + } + + if($apache_in_use == true){ + $items[] = array( 'title' => "Webdav-User", + 'target' => 'content', + 'link' => 'sites/webdav_user_list.php', + 'html_id' => 'webdav_user_list'); + } } $items[] = array( 'title' => "Folder", diff --git a/interface/web/sites/templates/web_childdomain_list.htm b/interface/web/sites/templates/web_childdomain_list.htm index 0800fd180..51aadc157 100644 --- a/interface/web/sites/templates/web_childdomain_list.htm +++ b/interface/web/sites/templates/web_childdomain_list.htm @@ -1,5 +1,5 @@

@@ -22,7 +22,7 @@

{tmpl_var name="toolsarea_head_txt"}

- + @@ -35,7 +35,7 @@
- + diff --git a/interface/web/sites/templates/web_vhost_domain_admin_list.htm b/interface/web/sites/templates/web_vhost_domain_admin_list.htm index 30502079c..ccd16e21a 100644 --- a/interface/web/sites/templates/web_vhost_domain_admin_list.htm +++ b/interface/web/sites/templates/web_vhost_domain_admin_list.htm @@ -1,11 +1,11 @@

{tmpl_var name="toolsarea_head_txt"}

- + @@ -20,7 +20,7 @@ - + diff --git a/interface/web/sites/templates/web_vhost_domain_list.htm b/interface/web/sites/templates/web_vhost_domain_list.htm index 7ee6966d3..b40db40d3 100644 --- a/interface/web/sites/templates/web_vhost_domain_list.htm +++ b/interface/web/sites/templates/web_vhost_domain_list.htm @@ -1,5 +1,5 @@

@@ -22,7 +22,7 @@

{tmpl_var name="toolsarea_head_txt"}

- + @@ -36,7 +36,7 @@ - + diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css index 958c2b3d3..40b87ac71 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css @@ -65,7 +65,8 @@ body { float: left; width: 200px; height: 65px; - background: url("../images/logo.png") no-repeat; } + margin-top:10px; + /*background: url("../images/logo.png") no-repeat;*/ } #logo a { display: block; width: 100%; diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm index 67b37e895..d29ab0039 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -33,7 +33,7 @@ - +
-- GitLab From a563d594aeb6f9d6553bfb9ed10aff5ffdd20d10 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:02:14 +0200 Subject: [PATCH 207/287] - ported some patches --- interface/lib/classes/auth.inc.php | 29 ++++++++++++++++--- interface/web/admin/lib/module.conf.php | 1 + interface/web/admin/system_config_edit.php | 2 +- interface/web/admin/templates/server_list.htm | 4 +-- interface/web/client/lib/module.conf.php | 1 + interface/web/dashboard/dashboard.php | 2 +- interface/web/dashboard/dashlets/modules.php | 17 +++++++++-- .../web/dashboard/lib/custom_menu.inc.php | 2 +- interface/web/dashboard/lib/module.conf.php | 1 + interface/web/dns/lib/module.conf.php | 1 + interface/web/mail/lib/module.conf.php | 1 + interface/web/monitor/lib/module.conf.php | 1 + interface/web/nav.php | 18 +++++++++++- interface/web/sites/lib/module.conf.php | 1 + .../sites/templates/web_vhost_domain_edit.htm | 19 +++++++++++- interface/web/tools/lib/module.conf.php | 1 + 16 files changed, 88 insertions(+), 13 deletions(-) diff --git a/interface/lib/classes/auth.inc.php b/interface/lib/classes/auth.inc.php index 562cf4022..56e53ee42 100644 --- a/interface/lib/classes/auth.inc.php +++ b/interface/lib/classes/auth.inc.php @@ -129,11 +129,32 @@ class auth { public function check_module_permissions($module) { // Check if the current user has the permissions to access this module + $module = trim(preg_replace('@\s+@', '', $module)); $user_modules = explode(',',$_SESSION["s"]["user"]["modules"]); - if(!in_array($module,$user_modules)) { - // echo "LOGIN_REDIRECT:/index.php"; - header("Location: /index.php"); - exit; + if(strpos($module, ',') !== false){ + $can_use_module = false; + $tmp_modules = explode(',', $module); + if(is_array($tmp_modules) && !empty($tmp_modules)){ + foreach($tmp_modules as $tmp_module){ + if($tmp_module != ''){ + if(in_array($tmp_module,$user_modules)) { + $can_use_module = true; + break; + } + } + } + } + if(!$can_use_module){ + // echo "LOGIN_REDIRECT:/index.php"; + header("Location: /index.php"); + exit; + } + } else { + if(!in_array($module,$user_modules)) { + // echo "LOGIN_REDIRECT:/index.php"; + header("Location: /index.php"); + exit; + } } } diff --git a/interface/web/admin/lib/module.conf.php b/interface/web/admin/lib/module.conf.php index 7f4d19da1..727f7a2d5 100644 --- a/interface/web/admin/lib/module.conf.php +++ b/interface/web/admin/lib/module.conf.php @@ -7,6 +7,7 @@ $module['title'] = 'top_menu_system'; $module['template'] = 'module.tpl.htm'; $module['startpage'] = 'admin/server_list.php'; $module['tab_width'] = '60'; +$module['order'] = '90'; $items[] = array( 'title' => 'CP Users', diff --git a/interface/web/admin/system_config_edit.php b/interface/web/admin/system_config_edit.php index c07810c8d..f48f11b7e 100644 --- a/interface/web/admin/system_config_edit.php +++ b/interface/web/admin/system_config_edit.php @@ -89,7 +89,7 @@ class page_action extends tform_actions { $available_dashlets_txt = ''; $handle = @opendir(ISPC_WEB_PATH.'/dashboard/dashlets'); while ($file = @readdir($handle)) { - if ($file != '.' && $file != '..' && !is_dir($file)) { + if ($file != '.' && $file != '..' && !is_dir(ISPC_WEB_PATH.'/dashboard/dashlets/'.$file)) { $available_dashlets_txt .= '['.substr($file, 0, -4).'] '; } } diff --git a/interface/web/admin/templates/server_list.htm b/interface/web/admin/templates/server_list.htm index dd054731f..893872eed 100644 --- a/interface/web/admin/templates/server_list.htm +++ b/interface/web/admin/templates/server_list.htm @@ -51,13 +51,13 @@
- + - +
{tmpl_var name="type"} {tmpl_var name="customer_viewable"} - +
{tmpl_var name="tcp_port"} {tmpl_var name="udp_port"} - +
{tmpl_var name="name"} {tmpl_var name="description"} - +
{tmpl_var name="state"} {tmpl_var name="target"} - +
{tmpl_var name="remote_userid"} {tmpl_var name="remote_username"} - +
{tmpl_var name="server_name"} - +
{tmpl_var name="virtualhost"} {tmpl_var name="virtualhost_port"} - +
{tmpl_var name="vserver_server"} {tmpl_var name="xmpp_server"} - +
{tmpl_var name="client_id"} {tmpl_var name="name"} - +
{tmpl_var name="package_description"} ispapp{tmpl_var name="package_id"} - - + +
{tmpl_var name="repo_name"} {tmpl_var name="repo_url"} - +
{tmpl_var name="groups"} - - + +
{tmpl_var name="circle_name"} {tmpl_var name="description"} - +
{tmpl_var name="template_name"}
- +
{tmpl_var name="template_type"} {tmpl_var name="template_name"} - +
{tmpl_var name="country"} - + - + - +
{tmpl_var name="domain"} {tmpl_var name="sys_groupid"} - +
{tmpl_var name="template_name"}
- +
{tmpl_var name="city"} {tmpl_var name="country"} - - + +
{tmpl_var name="aux"} {tmpl_var name="ttl"} - +
{tmpl_var name="origin"} {tmpl_var name="ns"} - +
{tmpl_var name="origin"} {tmpl_var name="ns"} - +
{tmpl_var name="ns"} {tmpl_var name="mbox"} - +
{tmpl_var name="ns"} {tmpl_var name="mbox"} - +
{tmpl_var name="visible"} {tmpl_var name="name"} - +
{tmpl_var name='hf_question'} {tmpl_var name='hf_section'} - + - +
{tmpl_var name='hfs_name'} - + - +
{tmpl_var name="subject"} {tmpl_var name="tstamp"} - +
{tmpl_var name="source"} {tmpl_var name="destination"} - +
{tmpl_var name="source"} {tmpl_var name="destination"} - +
{tmpl_var name="source"} {tmpl_var name="type"} - +
{tmpl_var name="pattern"} {tmpl_var name="action"} - +
{tmpl_var name="server_id"} {tmpl_var name="domain"} - +
{tmpl_var name="source"} {tmpl_var name="destination"} - +
{tmpl_var name="server_id"} {tmpl_var name="domain"} - +
{tmpl_var name="source"} {tmpl_var name="destination"} - +
{tmpl_var name="source_username"} {tmpl_var name="destination"} - +
{tmpl_var name="domain"} - + - +
{tmpl_var name="server_id"} {tmpl_var name="source"} - +
{tmpl_var name="transport"} {tmpl_var name="sort_order"} - +
{tmpl_var name="rulename"} - +
{tmpl_var name="disablepop3"} - + - +
{tmpl_var name="source"} {tmpl_var name="type"} - +
{tmpl_var name="rid"} {tmpl_var name="email"} - +
{tmpl_var name="server_name"} - +
{tmpl_var name="banned_files_lover"} {tmpl_var name="bad_header_lover"} - +
{tmpl_var name="policy_id"} {tmpl_var name="fullname"} - +
{tmpl_var name="rulename"} - +
{tmpl_var name="action"} {tmpl_var name="dbtable"} - +
{tmpl_var name="message"} - + - +
{tmpl_var name="command"}
- +
{tmpl_var name="database_name"} - + - - + +
{tmpl_var name="database_name"} - + - - + +
{tmpl_var name="database_user"} - - + +
{tmpl_var name="database_user"} - - + +
{tmpl_var name="parent_domain_id"} {tmpl_var name="username"} - +
{tmpl_var name="parent_domain_id"} {tmpl_var name="domain"} - +
{tmpl_var name="parent_domain_id"} {tmpl_var name="path"} - +
{tmpl_var name="web_folder_id"} {tmpl_var name="username"} - +
{tmpl_var name="parent_domain_id"} {tmpl_var name="domain"} - - + +
{tmpl_var name="parent_domain_id"} {tmpl_var name="username"} - +
{tmpl_var name="ip_address"} {tmpl_var name="reserved"} - +
{tmpl_var name="server_id"} {tmpl_var name="allservers"} - +
{tmpl_var name="active"} {tmpl_var name="template_name"} - +
{tmpl_var name="hostname"} {tmpl_var name="ip_address"} - - + +
{tmpl_var name="aliasdomain_txt"}{tmpl_var name="subdomain_txt"} {tmpl_var name='search_limit'}
{tmpl_var name="domain_txt"}{tmpl_var name="subdomain_txt"}{tmpl_var name="aliasdomain_txt"} {tmpl_var name='search_limit'}
{tmpl_var name="domain_txt"}{tmpl_var name="subdomain_txt"}{tmpl_var name="aliasdomain_txt"} {tmpl_var name='search_limit'}
{tmpl_var name='globalsearch_noresults_text_txt'}{tmpl_var name='globalsearch_noresults_text_txt'}
diff --git a/interface/web/client/lib/module.conf.php b/interface/web/client/lib/module.conf.php index e4bddd72f..7d6f1b34e 100644 --- a/interface/web/client/lib/module.conf.php +++ b/interface/web/client/lib/module.conf.php @@ -5,6 +5,7 @@ $module["title"] = "top_menu_client"; $module["template"] = "module.tpl.htm"; $module["startpage"] = "client/client_list.php"; $module["tab_width"] = ''; +$module['order'] = '20'; $items[] = array( 'title' => "Edit Client", diff --git a/interface/web/dashboard/dashboard.php b/interface/web/dashboard/dashboard.php index c806e10d4..51068b108 100644 --- a/interface/web/dashboard/dashboard.php +++ b/interface/web/dashboard/dashboard.php @@ -146,7 +146,7 @@ $app->tpl->setloop('info', $info); $dashlet_list = array(); $handle = @opendir(ISPC_WEB_PATH.'/dashboard/dashlets'); while ($file = @readdir($handle)) { - if ($file != '.' && $file != '..' && !is_dir($file)) { + if ($file != '.' && $file != '..' && !is_dir(ISPC_WEB_PATH.'/dashboard/dashlets/'.$file)) { $dashlet_name = substr($file, 0, -4); $dashlet_class = 'dashlet_'.$dashlet_name; include_once ISPC_WEB_PATH.'/dashboard/dashlets/'.$file; diff --git a/interface/web/dashboard/dashlets/modules.php b/interface/web/dashboard/dashlets/modules.php index 1b1d2ef99..da1eb0be7 100644 --- a/interface/web/dashboard/dashlets/modules.php +++ b/interface/web/dashboard/dashlets/modules.php @@ -28,19 +28,32 @@ class dashlet_modules { include_once '../' . $mt.'/lib/module.conf.php'; /* We don't want to show the dashboard */ if ($mt != 'dashboard') { + if($mt == 'dns'){ + $dns_servers = $app->db->queryOneRecord("SELECT COUNT(*) as cnt FROM server WHERE dns_server = 1 AND active = 1"); + if($dns_servers['cnt'] == 0) continue; + } + if($mt == 'mail'){ + $mail_servers = $app->db->queryOneRecord("SELECT COUNT(*) as cnt FROM server WHERE mail_server = 1 AND active = 1"); + if($mail_servers['cnt'] == 0) continue; + } + if($mt == 'sites'){ + $web_servers = $app->db->queryOneRecord("SELECT COUNT(*) as cnt FROM server WHERE web_server = 1 AND active = 1"); + if($web_servers['cnt'] == 0) continue; + } + $module_title = $app->lng($module['title']); if(function_exists('mb_strlen')) { if(mb_strlen($module_title, "UTF-8") > 8) $module_title = mb_substr($module_title, 0, 7, "UTF-8").'..'; } else { if(strlen($module_title) > 8) $module_title = substr($module_title, 0, 7).'..'; } - $mod[] = array( 'modules_title' => $module_title, + $mod[$module['order']] = array( 'modules_title' => $module_title, 'modules_startpage' => $module['startpage'], 'modules_name' => $module['name']); } } } - + ksort($mod); $tpl->setloop('modules', $mod); } diff --git a/interface/web/dashboard/lib/custom_menu.inc.php b/interface/web/dashboard/lib/custom_menu.inc.php index b71bd16f6..176805ea0 100644 --- a/interface/web/dashboard/lib/custom_menu.inc.php +++ b/interface/web/dashboard/lib/custom_menu.inc.php @@ -71,7 +71,7 @@ if( $atom_url != '' ) { $rows[] = array('title' => $item->get_title(), 'link' => $item->get_link(), 'content' => $item->get_content(), - 'date' => $item->get_date('Y-m-d') + 'date' => $item->get_date($app->lng('conf_format_dateshort')) ); } $n++; diff --git a/interface/web/dashboard/lib/module.conf.php b/interface/web/dashboard/lib/module.conf.php index 67f769e6b..4471f9bf8 100644 --- a/interface/web/dashboard/lib/module.conf.php +++ b/interface/web/dashboard/lib/module.conf.php @@ -32,6 +32,7 @@ $module['title'] = 'top_menu_dashboard'; $module['template'] = 'dashboard.tpl.htm'; $module['startpage'] = 'dashboard/dashboard.php'; $module['tab_width'] = ''; +$module['order'] = '1'; //$items = array(); // diff --git a/interface/web/dns/lib/module.conf.php b/interface/web/dns/lib/module.conf.php index 83027c67d..75b17a98e 100644 --- a/interface/web/dns/lib/module.conf.php +++ b/interface/web/dns/lib/module.conf.php @@ -5,6 +5,7 @@ $module["title"] = "top_menu_dns"; $module["template"] = "module.tpl.htm"; $module["startpage"] = "dns/dns_soa_list.php"; $module["tab_width"] = ''; +$module['order'] = '50'; $items[] = array( 'title' => "Add DNS Zone", diff --git a/interface/web/mail/lib/module.conf.php b/interface/web/mail/lib/module.conf.php index b6df07e97..ca7d17786 100644 --- a/interface/web/mail/lib/module.conf.php +++ b/interface/web/mail/lib/module.conf.php @@ -7,6 +7,7 @@ $module['title'] = 'top_menu_email'; $module['template'] = 'module.tpl.htm'; $module['startpage'] = 'mail/mail_domain_list.php'; $module['tab_width'] = ''; +$module['order'] = '40'; //**** Email accounts menu diff --git a/interface/web/monitor/lib/module.conf.php b/interface/web/monitor/lib/module.conf.php index 6f31204a7..964d3c804 100644 --- a/interface/web/monitor/lib/module.conf.php +++ b/interface/web/monitor/lib/module.conf.php @@ -8,6 +8,7 @@ $module["title"] = "top_menu_monitor"; $module["template"] = "module.tpl.htm"; $module["tab_width"] = ''; $module["startpage"] = "monitor/show_sys_state.php?state=system"; +$module['order'] = '60'; unset($items); $items[] = array( 'title' => "Show Overview", diff --git a/interface/web/nav.php b/interface/web/nav.php index 4d8617cac..6475daa17 100644 --- a/interface/web/nav.php +++ b/interface/web/nav.php @@ -45,25 +45,41 @@ if(isset($_GET['nav']) && $_GET['nav'] == 'top') { /* * If the dashboard is in the list of modules it always has to be the first! */ + /* asort($modules); if (in_array('dashboard', $modules)) { $key = array_search('dashboard', $modules); unset($modules[$key]); $modules = array_merge(array('dashboard'), $modules); } + */ if(is_array($modules)) { foreach($modules as $mt) { if(is_file($mt.'/lib/module.conf.php')) { if(!preg_match("/^[a-z]{2,20}$/i", $mt)) die('module name contains unallowed chars.'); + if($mt == 'dns'){ + $dns_servers = $app->db->queryOneRecord("SELECT COUNT(*) as cnt FROM server WHERE dns_server = 1 AND active = 1"); + if($dns_servers['cnt'] == 0) continue; + } + if($mt == 'mail'){ + $mail_servers = $app->db->queryOneRecord("SELECT COUNT(*) as cnt FROM server WHERE mail_server = 1 AND active = 1"); + if($mail_servers['cnt'] == 0) continue; + } + if($mt == 'sites'){ + $web_servers = $app->db->queryOneRecord("SELECT COUNT(*) as cnt FROM server WHERE web_server = 1 AND active = 1"); + if($web_servers['cnt'] == 0) continue; + } + include_once $mt.'/lib/module.conf.php'; $language = (isset($_SESSION['s']['user']['language']))?$_SESSION['s']['user']['language']:$conf['language']; $app->load_language_file('web/'.$mt.'/lib/'.$language.'.lng'); $active = ($module['name'] == $_SESSION['s']['module']['name']) ? 1 : 0; - $topnav[] = array( 'title' => $app->lng($module['title']), + $topnav[$module['order']] = array( 'title' => $app->lng($module['title']), 'active' => $active, 'module' => $module['name']); } } + ksort($topnav); } } else { //* Loading Login Module diff --git a/interface/web/sites/lib/module.conf.php b/interface/web/sites/lib/module.conf.php index 8e253fd27..979aa63df 100644 --- a/interface/web/sites/lib/module.conf.php +++ b/interface/web/sites/lib/module.conf.php @@ -7,6 +7,7 @@ $module["title"] = "top_menu_sites"; $module["template"] = "module.tpl.htm"; $module["startpage"] = "sites/web_vhost_domain_list.php"; $module["tab_width"] = ''; +$module['order'] = '30'; // Websites menu $items=array(); diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm index e313b9f40..e0a827621 100644 --- a/interface/web/sites/templates/web_vhost_domain_edit.htm +++ b/interface/web/sites/templates/web_vhost_domain_edit.htm @@ -274,6 +274,8 @@ jQuery('#parent_domain_id').change(function() { reloadServerId(false); }); + // new Vhostsubdomains/Vhostaliasdomains + if(serverId == '') jQuery('#parent_domain_id').trigger('change'); function reloadServerId(noFormChange) { var parentWebId = jQuery('#parent_domain_id').val(); @@ -337,16 +339,31 @@ function reloadFastcgiPHPVersions(noFormChange) { jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, php_type : jQuery('#php').val(), type : "getphpfastcgi", client_group_id : clientGroupId}, function(data) { - var options = ''; + //var options = ''; + var options = ''; var phpfastcgiselected = ''; $.each(data, function(key, val) { + if($('#fastcgi_php_version').val() == key){ phpfastcgiselected = ' selected="selected"'; } else { phpfastcgiselected = ''; } + + phpfastcgiselected = ''; + options += ''; }); + + if($('#fastcgi_php_version').val() == ''){ + phpfastcgiselected = ' selected="selected"'; + } else { + phpfastcgiselected = ''; + } + + phpfastcgiselected = ''; + + options += ''; $('#fastcgi_php_version').html(options).change(); if(noFormChange) ISPConfig.resetFormChanged(); }); diff --git a/interface/web/tools/lib/module.conf.php b/interface/web/tools/lib/module.conf.php index 853fd649e..617ab0b6c 100644 --- a/interface/web/tools/lib/module.conf.php +++ b/interface/web/tools/lib/module.conf.php @@ -7,6 +7,7 @@ $module['title'] = 'top_menu_tools'; $module['template'] = 'module.tpl.htm'; $module['startpage'] = 'tools/index.php'; $module['tab_width'] = '60'; +$module['order'] = '80'; //**** Change User password -- GitLab From b418037acae8a5d9a65dd55c58a003d393cadf21 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:05:12 +0200 Subject: [PATCH 208/287] - ported some patches --- .../sql/incremental/upd_dev_collection.sql | 8 ++- install/sql/ispconfig3.sql | 9 +-- interface/lib/classes/validate_dkim.inc.php | 6 +- .../admin/form/directive_snippets.tform.php | 11 ++++ .../templates/directive_snippets_edit.htm | 12 +++- interface/web/dns/form/dns_a.tform.php | 2 +- interface/web/dns/form/dns_aaaa.tform.php | 2 +- interface/web/dns/form/dns_alias.tform.php | 2 +- interface/web/dns/form/dns_cname.tform.php | 2 +- interface/web/dns/form/dns_dkim.tform.php | 2 +- interface/web/dns/form/dns_hinfo.tform.php | 2 +- interface/web/dns/form/dns_mx.tform.php | 2 +- interface/web/dns/form/dns_ns.tform.php | 2 +- interface/web/dns/form/dns_ptr.tform.php | 2 +- interface/web/dns/form/dns_rp.tform.php | 2 +- interface/web/dns/form/dns_soa.tform.php | 2 +- interface/web/dns/form/dns_spf.tform.php | 2 +- interface/web/dns/form/dns_srv.tform.php | 2 +- interface/web/dns/form/dns_txt.tform.php | 2 +- interface/web/dns/list/dns_a.list.php | 2 +- .../web/mail/templates/mail_domain_edit.htm | 2 +- interface/web/tools/dns_import_tupa.php | 2 +- remoting_client/examples/dns_a_add.php | 2 +- remoting_client/examples/dns_aaaa_add.php | 2 +- remoting_client/examples/dns_alias_add.php | 2 +- remoting_client/examples/dns_cname_add.php | 2 +- remoting_client/examples/dns_hinfo_add.php | 2 +- remoting_client/examples/dns_mx_add.php | 2 +- remoting_client/examples/dns_ns_add.php | 2 +- remoting_client/examples/dns_ptr_add.php | 2 +- remoting_client/examples/dns_rp_add.php | 2 +- remoting_client/examples/dns_srv_add.php | 2 +- remoting_client/examples/dns_txt_add.php | 2 +- remoting_client/examples/dns_zone_add.php | 4 +- .../plugins-available/apache2_plugin.inc.php | 60 +++++++++++++++++++ .../plugins-available/bind_dlz_plugin.inc.php | 2 +- server/plugins-available/nginx_plugin.inc.php | 20 +++++++ 37 files changed, 149 insertions(+), 39 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index 6eea12b71..4395655c6 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -20,7 +20,7 @@ mbox={EMAIL}. refresh=7200 retry=540 expire=604800 -minimum=86400 +minimum=3600 ttl=3600 [DNS_RECORDS] @@ -134,3 +134,9 @@ CREATE TABLE `xmpp_user` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- + +UPDATE `dbispconfig`.`sys_ini` SET `default_logo` = 'data:image/png;base64,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' WHERE `sys_ini`.`sysini_id` = 1; + +ALTER TABLE `directive_snippets` ADD `required_php_snippets` VARCHAR(255) NOT NULL DEFAULT '' AFTER `customer_viewable`; +ALTER TABLE `dns_rr` CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600'; +ALTER TABLE `dns_soa` CHANGE `minimum` `minimum` INT(11) UNSIGNED NOT NULL DEFAULT '3600', CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600'; \ No newline at end of file diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 5011f16f9..a020d028a 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -442,6 +442,7 @@ CREATE TABLE IF NOT EXISTS `directive_snippets` ( `type` varchar(255) DEFAULT NULL, `snippet` mediumtext, `customer_viewable` ENUM('n','y') NOT NULL DEFAULT 'n', + `required_php_snippets` varchar(255) NOT NULL DEFAULT '', `active` enum('n','y') NOT NULL DEFAULT 'y', PRIMARY KEY (`directive_snippets_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; @@ -465,7 +466,7 @@ CREATE TABLE `dns_rr` ( `type` enum('A','AAAA','ALIAS','CNAME','HINFO','MX','NAPTR','NS','PTR','RP','SRV','TXT') default NULL, `data` TEXT NOT NULL DEFAULT '', `aux` int(11) unsigned NOT NULL default '0', - `ttl` int(11) unsigned NOT NULL default '86400', + `ttl` int(11) unsigned NOT NULL default '3600', `active` enum('N','Y') NOT NULL default 'Y', `stamp` timestamp NOT NULL default CURRENT_TIMESTAMP, `serial` int(10) unsigned default NULL, @@ -517,8 +518,8 @@ CREATE TABLE `dns_soa` ( `refresh` int(11) unsigned NOT NULL default '28800', `retry` int(11) unsigned NOT NULL default '7200', `expire` int(11) unsigned NOT NULL default '604800', - `minimum` int(11) unsigned NOT NULL default '86400', - `ttl` int(11) unsigned NOT NULL default '86400', + `minimum` int(11) unsigned NOT NULL default '3600', + `ttl` int(11) unsigned NOT NULL default '3600', `active` enum('N','Y') NOT NULL DEFAULT 'N', `xfer` varchar(255) NOT NULL DEFAULT '', `also_notify` varchar(255) default NULL, @@ -2316,7 +2317,7 @@ INSERT INTO `country` (`iso`, `name`, `printable_name`, `iso3`, `numcode`, `eu`) -- Dumping data for table `dns_template` -- -INSERT INTO `dns_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `name`, `fields`, `template`, `visible`) VALUES (1, 1, 1, 'riud', 'riud', '', 'Default', 'DOMAIN,IP,NS1,NS2,EMAIL,DKIM', '[ZONE]\norigin={DOMAIN}.\nns={NS1}.\nmbox={EMAIL}.\nrefresh=7200\nretry=540\nexpire=604800\nminimum=86400\nttl=3600\n\n[DNS_RECORDS]\nA|{DOMAIN}.|{IP}|0|3600\nA|www|{IP}|0|3600\nA|mail|{IP}|0|3600\nNS|{DOMAIN}.|{NS1}.|0|3600\nNS|{DOMAIN}.|{NS2}.|0|3600\nMX|{DOMAIN}.|mail.{DOMAIN}.|10|3600\nTXT|{DOMAIN}.|v=spf1 mx a ~all|0|3600', 'y'); +INSERT INTO `dns_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `name`, `fields`, `template`, `visible`) VALUES (1, 1, 1, 'riud', 'riud', '', 'Default', 'DOMAIN,IP,NS1,NS2,EMAIL,DKIM', '[ZONE]\norigin={DOMAIN}.\nns={NS1}.\nmbox={EMAIL}.\nrefresh=7200\nretry=540\nexpire=604800\nminimum=3600\nttl=3600\n\n[DNS_RECORDS]\nA|{DOMAIN}.|{IP}|0|3600\nA|www|{IP}|0|3600\nA|mail|{IP}|0|3600\nNS|{DOMAIN}.|{NS1}.|0|3600\nNS|{DOMAIN}.|{NS2}.|0|3600\nMX|{DOMAIN}.|mail.{DOMAIN}.|10|3600\nTXT|{DOMAIN}.|v=spf1 mx a ~all|0|3600', 'y'); -- -------------------------------------------------------- diff --git a/interface/lib/classes/validate_dkim.inc.php b/interface/lib/classes/validate_dkim.inc.php index 71fd8c545..5d7fb8f1e 100644 --- a/interface/lib/classes/validate_dkim.inc.php +++ b/interface/lib/classes/validate_dkim.inc.php @@ -62,8 +62,10 @@ class validate_dkim { */ function check_template($field_name, $field_value, $validator) { $dkim=false; - foreach($field_value as $field ) { if($field == 'DKIM') $dkim=true; } - if ($dkim && $field_value[0]!='DOMAIN') return $this->get_error($validator['errmsg']); + if(is_array($field_value) && !empty($field_value)){ + foreach($field_value as $field ) { if($field == 'DKIM') $dkim=true; } + if ($dkim && $field_value[0]!='DOMAIN') return $this->get_error($validator['errmsg']); + } } diff --git a/interface/web/admin/form/directive_snippets.tform.php b/interface/web/admin/form/directive_snippets.tform.php index 8db725b95..0c2502c6c 100644 --- a/interface/web/admin/form/directive_snippets.tform.php +++ b/interface/web/admin/form/directive_snippets.tform.php @@ -105,6 +105,17 @@ $form["tabs"]['directive_snippets'] = array ( 'default' => 'y', 'value' => array(0 => 'n', 1 => 'y') ), + 'required_php_snippets' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOXARRAY', + 'default' => '', + 'datasource' => array ( 'type' => 'SQL', + 'querystring' => "SELECT directive_snippets_id,name FROM directive_snippets WHERE type = 'php' AND active = 'y'ORDER BY name", + 'keyfield' => 'directive_snippets_id', + 'valuefield' => 'name' + ), + 'separator' => ',', + ), //################################# // ENDE Datatable fields //################################# diff --git a/interface/web/admin/templates/directive_snippets_edit.htm b/interface/web/admin/templates/directive_snippets_edit.htm index 7729fc163..21b76867e 100644 --- a/interface/web/admin/templates/directive_snippets_edit.htm +++ b/interface/web/admin/templates/directive_snippets_edit.htm @@ -17,6 +17,12 @@
  {tmpl_var name='variables_txt'}: {DOCROOT}, {FASTCGIPASS} +
+
+ +
+ {tmpl_var name='required_php_snippets'} +
@@ -48,15 +54,19 @@ if (jQuery('#type').val() != 'nginx' && jQuery('#type').val() != 'apache') { jQuery('#customer_viewable').closest('div.ctrlHolder:visible').hide(); - }else { + jQuery('.php:visible').hide(); + } else { jQuery('#customer_viewable').closest('div.ctrlHolder:hidden').show(); + jQuery('.php:hidden').show(); } jQuery('#type').change(function(){ if (jQuery(this).val() != 'nginx' && jQuery(this).val() != 'apache') { jQuery('#customer_viewable').closest('div.ctrlHolder:visible').hide(); + jQuery('.php:visible').hide(); } else { jQuery('#customer_viewable').closest('div.ctrlHolder:hidden').show(); + jQuery('.php:hidden').show(); } if(jQuery(this).val() == 'nginx'){ jQuery('.nginx:hidden').show(); diff --git a/interface/web/dns/form/dns_a.tform.php b/interface/web/dns/form/dns_a.tform.php index 95aa5b81c..cd5a3eb9a 100644 --- a/interface/web/dns/form/dns_a.tform.php +++ b/interface/web/dns/form/dns_a.tform.php @@ -133,7 +133,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_aaaa.tform.php b/interface/web/dns/form/dns_aaaa.tform.php index 47bbac39c..d381d5187 100644 --- a/interface/web/dns/form/dns_aaaa.tform.php +++ b/interface/web/dns/form/dns_aaaa.tform.php @@ -126,7 +126,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_alias.tform.php b/interface/web/dns/form/dns_alias.tform.php index 663bf8427..defcda085 100644 --- a/interface/web/dns/form/dns_alias.tform.php +++ b/interface/web/dns/form/dns_alias.tform.php @@ -142,7 +142,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_cname.tform.php b/interface/web/dns/form/dns_cname.tform.php index 957e6e19e..5fdf8c9b4 100644 --- a/interface/web/dns/form/dns_cname.tform.php +++ b/interface/web/dns/form/dns_cname.tform.php @@ -140,7 +140,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_dkim.tform.php b/interface/web/dns/form/dns_dkim.tform.php index bbc1214f2..550255da4 100644 --- a/interface/web/dns/form/dns_dkim.tform.php +++ b/interface/web/dns/form/dns_dkim.tform.php @@ -120,7 +120,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_hinfo.tform.php b/interface/web/dns/form/dns_hinfo.tform.php index 231bdfc65..76c8c79dc 100644 --- a/interface/web/dns/form/dns_hinfo.tform.php +++ b/interface/web/dns/form/dns_hinfo.tform.php @@ -132,7 +132,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_mx.tform.php b/interface/web/dns/form/dns_mx.tform.php index d5faeebcf..9aace37ae 100644 --- a/interface/web/dns/form/dns_mx.tform.php +++ b/interface/web/dns/form/dns_mx.tform.php @@ -141,7 +141,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_ns.tform.php b/interface/web/dns/form/dns_ns.tform.php index 82b30901f..063a896de 100644 --- a/interface/web/dns/form/dns_ns.tform.php +++ b/interface/web/dns/form/dns_ns.tform.php @@ -140,7 +140,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_ptr.tform.php b/interface/web/dns/form/dns_ptr.tform.php index 59a91e7c8..4cc046252 100644 --- a/interface/web/dns/form/dns_ptr.tform.php +++ b/interface/web/dns/form/dns_ptr.tform.php @@ -140,7 +140,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_rp.tform.php b/interface/web/dns/form/dns_rp.tform.php index 35b8e55ad..5f4610a45 100644 --- a/interface/web/dns/form/dns_rp.tform.php +++ b/interface/web/dns/form/dns_rp.tform.php @@ -133,7 +133,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_soa.tform.php b/interface/web/dns/form/dns_soa.tform.php index 1e4f9a63e..02afa86c5 100644 --- a/interface/web/dns/form/dns_soa.tform.php +++ b/interface/web/dns/form/dns_soa.tform.php @@ -197,7 +197,7 @@ $form["tabs"]['dns_soa'] = array ( 'range' => '60:', 'errmsg'=> 'minimum_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_spf.tform.php b/interface/web/dns/form/dns_spf.tform.php index 00ccb7628..ea2cf8310 100644 --- a/interface/web/dns/form/dns_spf.tform.php +++ b/interface/web/dns/form/dns_spf.tform.php @@ -127,7 +127,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_srv.tform.php b/interface/web/dns/form/dns_srv.tform.php index 2f35fd53d..ee0674fd1 100644 --- a/interface/web/dns/form/dns_srv.tform.php +++ b/interface/web/dns/form/dns_srv.tform.php @@ -131,7 +131,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/form/dns_txt.tform.php b/interface/web/dns/form/dns_txt.tform.php index 70e0fc5f0..01b731a2e 100644 --- a/interface/web/dns/form/dns_txt.tform.php +++ b/interface/web/dns/form/dns_txt.tform.php @@ -137,7 +137,7 @@ $form["tabs"]['dns'] = array ( 'range' => '60:', 'errmsg'=> 'ttl_range_error'), ), - 'default' => '86400', + 'default' => '3600', 'value' => '', 'width' => '10', 'maxlength' => '10' diff --git a/interface/web/dns/list/dns_a.list.php b/interface/web/dns/list/dns_a.list.php index 3b47cf10c..65429dfa7 100644 --- a/interface/web/dns/list/dns_a.list.php +++ b/interface/web/dns/list/dns_a.list.php @@ -132,7 +132,7 @@ $liste["item"][] = array( 'field' => "type", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('A'=>'A', 'AAAA' => 'AAAA', 'ALIAS'=>'ALIAS', 'CNAME'=>'CNAME', 'HINFO'=>'HINFO', 'MX'=>'MX', 'NS'=>'NS', 'PTR'=>'PTR', 'RP'=>'RP', 'SRV'=>'SRV', 'TXT'=>'TXT')); + 'value' => array('A'=>'A', 'AAAA' => 'AAAA', 'ALIAS'=>'ALIAS', 'CNAME'=>'CNAME', 'HINFO'=>'HINFO', 'MX'=>'MX', 'NS'=>'NS', 'PTR'=>'PTR', 'RP'=>'RP', 'SPF'=>'SPF', 'SRV'=>'SRV', 'TXT'=>'TXT')); ?> diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm index f56c27d87..307b0d153 100644 --- a/interface/web/mail/templates/mail_domain_edit.htm +++ b/interface/web/mail/templates/mail_domain_edit.htm @@ -86,7 +86,7 @@ -
+
diff --git a/interface/web/tools/dns_import_tupa.php b/interface/web/tools/dns_import_tupa.php index b45a11b60..b81a83bde 100644 --- a/interface/web/tools/dns_import_tupa.php +++ b/interface/web/tools/dns_import_tupa.php @@ -96,7 +96,7 @@ if(isset($_POST['start']) && $_POST['start'] == 1) { $refresh = 7200; $retry = 540; $expire = 604800; - $minimum = 86400; + $minimum = 3600; $ttl = $soa['ttl']; $insert_data = array( diff --git a/remoting_client/examples/dns_a_add.php b/remoting_client/examples/dns_a_add.php index 6bcb33c66..b669daaa1 100644 --- a/remoting_client/examples/dns_a_add.php +++ b/remoting_client/examples/dns_a_add.php @@ -23,7 +23,7 @@ try { 'type' => 'a', 'data' => '192.168.1.88', 'aux' => '0', - 'ttl' => '86400', + 'ttl' => '3600', 'active' => 'y', 'stamp' => 'CURRENT_TIMESTAMP', 'serial' => '1', diff --git a/remoting_client/examples/dns_aaaa_add.php b/remoting_client/examples/dns_aaaa_add.php index 4ee460b5b..eff4148f2 100644 --- a/remoting_client/examples/dns_aaaa_add.php +++ b/remoting_client/examples/dns_aaaa_add.php @@ -23,7 +23,7 @@ try { 'type' => 'aaaa', 'data' => '3ffe:b00:c18:3::a', 'aux' => '0', - 'ttl' => '86400', + 'ttl' => '3600', 'active' => 'y', 'stamp' => 'CURRENT_TIMESTAMP', 'serial' => '1', diff --git a/remoting_client/examples/dns_alias_add.php b/remoting_client/examples/dns_alias_add.php index 5b1c684ce..dd8a4da4b 100644 --- a/remoting_client/examples/dns_alias_add.php +++ b/remoting_client/examples/dns_alias_add.php @@ -23,7 +23,7 @@ try { 'type' => 'alias', 'data' => 'hostmachine', 'aux' => '0', - 'ttl' => '86400', + 'ttl' => '3600', 'active' => 'y', 'stamp' => 'CURRENT_TIMESTAMP', 'serial' => '1', diff --git a/remoting_client/examples/dns_cname_add.php b/remoting_client/examples/dns_cname_add.php index 2d70ca65b..7731a5473 100644 --- a/remoting_client/examples/dns_cname_add.php +++ b/remoting_client/examples/dns_cname_add.php @@ -23,7 +23,7 @@ try { 'type' => 'cname', 'data' => 'hostmachine', 'aux' => '0', - 'ttl' => '86400', + 'ttl' => '3600', 'active' => 'y', 'stamp' => 'CURRENT_TIMESTAMP', 'serial' => '1', diff --git a/remoting_client/examples/dns_hinfo_add.php b/remoting_client/examples/dns_hinfo_add.php index a0a8c47b3..106c79083 100644 --- a/remoting_client/examples/dns_hinfo_add.php +++ b/remoting_client/examples/dns_hinfo_add.php @@ -23,7 +23,7 @@ try { 'type' => 'hinfo', 'data' => '"Pentium Pro" Linux', 'aux' => '0', - 'ttl' => '86400', + 'ttl' => '3600', 'active' => 'y', 'stamp' => 'CURRENT_TIMESTAMP', 'serial' => '1', diff --git a/remoting_client/examples/dns_mx_add.php b/remoting_client/examples/dns_mx_add.php index b1e961780..d0838216c 100644 --- a/remoting_client/examples/dns_mx_add.php +++ b/remoting_client/examples/dns_mx_add.php @@ -23,7 +23,7 @@ try { 'type' => 'mx', 'data' => 'mail', 'aux' => '0', - 'ttl' => '86400', + 'ttl' => '3600', 'active' => 'y', 'stamp' => 'CURRENT_TIMESTAMP', 'serial' => '1', diff --git a/remoting_client/examples/dns_ns_add.php b/remoting_client/examples/dns_ns_add.php index d650d2a99..381041add 100644 --- a/remoting_client/examples/dns_ns_add.php +++ b/remoting_client/examples/dns_ns_add.php @@ -23,7 +23,7 @@ try { 'type' => 'ns', 'data' => 'ns1', 'aux' => '0', - 'ttl' => '86400', + 'ttl' => '3600', 'active' => 'y', 'stamp' => 'CURRENT_TIMESTAMP', 'serial' => '1', diff --git a/remoting_client/examples/dns_ptr_add.php b/remoting_client/examples/dns_ptr_add.php index 6d4ccab9f..a2dbdf54f 100644 --- a/remoting_client/examples/dns_ptr_add.php +++ b/remoting_client/examples/dns_ptr_add.php @@ -23,7 +23,7 @@ try { 'type' => 'ptr', 'data' => 'webmaster.test.int.', 'aux' => '0', - 'ttl' => '86400', + 'ttl' => '3600', 'active' => 'y', 'stamp' => 'CURRENT_TIMESTAMP', 'serial' => '1', diff --git a/remoting_client/examples/dns_rp_add.php b/remoting_client/examples/dns_rp_add.php index a30b70370..27329bbe7 100644 --- a/remoting_client/examples/dns_rp_add.php +++ b/remoting_client/examples/dns_rp_add.php @@ -23,7 +23,7 @@ try { 'type' => 'rp', 'data' => 'webmaster.test.int. contactinfo.test.int', 'aux' => '0', - 'ttl' => '86400', + 'ttl' => '3600', 'active' => 'y', 'stamp' => 'CURRENT_TIMESTAMP', 'serial' => '1', diff --git a/remoting_client/examples/dns_srv_add.php b/remoting_client/examples/dns_srv_add.php index 75c7df481..6270db75a 100644 --- a/remoting_client/examples/dns_srv_add.php +++ b/remoting_client/examples/dns_srv_add.php @@ -23,7 +23,7 @@ try { 'type' => 'srv', 'data' => '0 9 server.test.int.', 'aux' => '0', - 'ttl' => '86400', + 'ttl' => '3600', 'active' => 'y', 'stamp' => 'CURRENT_TIMESTAMP', 'serial' => '1', diff --git a/remoting_client/examples/dns_txt_add.php b/remoting_client/examples/dns_txt_add.php index 4ce025e64..90f06095e 100644 --- a/remoting_client/examples/dns_txt_add.php +++ b/remoting_client/examples/dns_txt_add.php @@ -23,7 +23,7 @@ try { 'type' => 'txt', 'data' => 'any text can go here', 'aux' => '0', - 'ttl' => '86400', + 'ttl' => '3600', 'active' => 'y', 'stamp' => 'CURRENT_TIMESTAMP', 'serial' => '1', diff --git a/remoting_client/examples/dns_zone_add.php b/remoting_client/examples/dns_zone_add.php index 677240968..62937c0bd 100644 --- a/remoting_client/examples/dns_zone_add.php +++ b/remoting_client/examples/dns_zone_add.php @@ -25,8 +25,8 @@ try { 'refresh' => '28800', 'retry' => '7200', 'expire' => '604800', - 'minimum' => '86400', - 'ttl' => '86400', + 'minimum' => '3600', + 'ttl' => '3600', 'active' => 'y', 'xfer' => '', 'also_notify' => '', diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 1676a1a7a..43b06f3dc 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -161,6 +161,26 @@ class apache2_plugin { if($master_php_ini_path != '' && substr($master_php_ini_path, -7) == 'php.ini' && is_file($master_php_ini_path)) { $php_ini_content .= $app->system->file_get_contents($master_php_ini_path)."\n"; } + + if(intval($web_data['directive_snippets_id']) > 0){ + $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'nginx' AND active = 'y' AND customer_viewable = 'y'", intval($web_data['directive_snippets_id'])); + if(isset($snippet['required_php_snippets']) && trim($snippet['required_php_snippets']) != ''){ + $required_php_snippets = explode(',', trim($snippet['required_php_snippets'])); + if(is_array($required_php_snippets) && !empty($required_php_snippets)){ + foreach($required_php_snippets as $required_php_snippet){ + $required_php_snippet = intval($required_php_snippet); + if($required_php_snippet > 0){ + $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); + $php_snippet['snippet'] = trim($php_snippet['snippet']); + if($php_snippet['snippet'] != ''){ + $web_data['custom_php_ini'] .= "\n".$php_snippet['snippet']; + } + } + } + } + } + } + $php_ini_content .= str_replace("\r", '', trim($web_data['custom_php_ini'])); $app->system->file_put_contents($custom_php_ini_dir.'/php.ini', $php_ini_content); $app->log('Info: rewrote custom php.ini for web ' . $web_data['domain_id'] . ' (' . $web_data['domain'] . ').', LOGLEVEL_DEBUG); @@ -1008,6 +1028,26 @@ class apache2_plugin { $php_ini_content .= $app->system->file_get_contents($master_php_ini_path)."\n"; } $php_ini_content .= str_replace("\r", '', trim($data['new']['custom_php_ini'])); + + if(intval($data['new']['directive_snippets_id']) > 0){ + $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'nginx' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); + if(isset($snippet['required_php_snippets']) && trim($snippet['required_php_snippets']) != ''){ + $required_php_snippets = explode(',', trim($snippet['required_php_snippets'])); + if(is_array($required_php_snippets) && !empty($required_php_snippets)){ + foreach($required_php_snippets as $required_php_snippet){ + $required_php_snippet = intval($required_php_snippet); + if($required_php_snippet > 0){ + $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); + $php_snippet['snippet'] = trim($php_snippet['snippet']); + if($php_snippet['snippet'] != ''){ + $php_ini_content .= "\n".$php_snippet['snippet']; + } + } + } + } + } + } + $app->system->file_put_contents($custom_php_ini_dir.'/php.ini', $php_ini_content); } else { $has_custom_php_ini = false; @@ -2864,6 +2904,26 @@ class apache2_plugin { // Custom php.ini settings $final_php_ini_settings = array(); $custom_php_ini_settings = trim($data['new']['custom_php_ini']); + + if(intval($data['new']['directive_snippets_id']) > 0){ + $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'apache' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); + if(isset($snippet['required_php_snippets']) && trim($snippet['required_php_snippets']) != ''){ + $required_php_snippets = explode(',', trim($snippet['required_php_snippets'])); + if(is_array($required_php_snippets) && !empty($required_php_snippets)){ + foreach($required_php_snippets as $required_php_snippet){ + $required_php_snippet = intval($required_php_snippet); + if($required_php_snippet > 0){ + $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); + $php_snippet['snippet'] = trim($php_snippet['snippet']); + if($php_snippet['snippet'] != ''){ + $custom_php_ini_settings .= "\n".$php_snippet['snippet']; + } + } + } + } + } + } + if($custom_php_ini_settings != ''){ // Make sure we only have Unix linebreaks $custom_php_ini_settings = str_replace("\r\n", "\n", $custom_php_ini_settings); diff --git a/server/plugins-available/bind_dlz_plugin.inc.php b/server/plugins-available/bind_dlz_plugin.inc.php index fa839fe04..89954ccab 100644 --- a/server/plugins-available/bind_dlz_plugin.inc.php +++ b/server/plugins-available/bind_dlz_plugin.inc.php @@ -34,7 +34,7 @@ TABLE STRUCTURE of the "named" database: CREATE TABLE IF NOT EXISTS `records` ( `id` int(10) unsigned NOT NULL auto_increment, `zone` varchar(255) NOT NULL, - `ttl` int(11) NOT NULL default '86400', + `ttl` int(11) NOT NULL default '3600', `type` varchar(255) NOT NULL, `host` varchar(255) NOT NULL default '@', `mx_priority` int(11) default NULL, diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index de6a7a451..4ff3c8c48 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -2461,6 +2461,26 @@ class nginx_plugin { // Custom php.ini settings $final_php_ini_settings = array(); $custom_php_ini_settings = trim($data['new']['custom_php_ini']); + + if(intval($data['new']['directive_snippets_id']) > 0){ + $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'nginx' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); + if(isset($snippet['required_php_snippets']) && trim($snippet['required_php_snippets']) != ''){ + $required_php_snippets = explode(',', trim($snippet['required_php_snippets'])); + if(is_array($required_php_snippets) && !empty($required_php_snippets)){ + foreach($required_php_snippets as $required_php_snippet){ + $required_php_snippet = intval($required_php_snippet); + if($required_php_snippet > 0){ + $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); + $php_snippet['snippet'] = trim($php_snippet['snippet']); + if($php_snippet['snippet'] != ''){ + $custom_php_ini_settings .= "\n".$php_snippet['snippet']; + } + } + } + } + } + } + if($custom_php_ini_settings != ''){ // Make sure we only have Unix linebreaks $custom_php_ini_settings = str_replace("\r\n", "\n", $custom_php_ini_settings); -- GitLab From af4c7ab6e3e66623af16686a56c28a38d3002375 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:07:36 +0200 Subject: [PATCH 209/287] - ported some patches --- interface/lib/classes/remote.d/sites.inc.php | 12 ++++++------ interface/lib/classes/remoting.inc.php | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/interface/lib/classes/remote.d/sites.inc.php b/interface/lib/classes/remote.d/sites.inc.php index 1c112e5e5..ad3f2e304 100644 --- a/interface/lib/classes/remote.d/sites.inc.php +++ b/interface/lib/classes/remote.d/sites.inc.php @@ -405,7 +405,7 @@ class remoting_sites extends remoting { return false; } $app->uses('remoting_lib'); - $app->remoting_lib->loadFormDef('../sites/form/web_domain.tform.php'); + $app->remoting_lib->loadFormDef('../sites/form/web_vhost_domain.tform.php'); return $app->remoting_lib->getDataRecord($primary_id); } @@ -434,7 +434,7 @@ class remoting_sites extends remoting { if($params['pm_min_spare_servers'] == '') $params['pm_min_spare_servers'] = 1; if($params['pm_max_spare_servers'] == '') $params['pm_max_spare_servers'] = 1; - $domain_id = $this->insertQuery('../sites/form/web_domain.tform.php', $client_id, $params, 'sites:web_domain:on_after_insert'); + $domain_id = $this->insertQuery('../sites/form/web_vhost_domain.tform.php', $client_id, $params, 'sites:web_domain:on_after_insert'); if ($readonly === true) $app->db->query("UPDATE web_domain SET `sys_userid` = '1' WHERE domain_id = ?", $domain_id); return $domain_id; @@ -454,7 +454,7 @@ class remoting_sites extends remoting { if($params['pm_min_spare_servers'] == '') $params['pm_min_spare_servers'] = 1; if($params['pm_max_spare_servers'] == '') $params['pm_max_spare_servers'] = 1; - $affected_rows = $this->updateQuery('../sites/form/web_domain.tform.php', $client_id, $primary_id, $params); + $affected_rows = $this->updateQuery('../sites/form/web_vhost_domain.tform.php', $client_id, $primary_id, $params); return $affected_rows; } @@ -465,7 +465,7 @@ class remoting_sites extends remoting { throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.'); return false; } - $affected_rows = $this->deleteQuery('../sites/form/web_domain.tform.php', $primary_id); + $affected_rows = $this->deleteQuery('../sites/form/web_vhost_domain.tform.php', $primary_id); return $affected_rows; } @@ -864,11 +864,11 @@ class remoting_sites extends remoting { } else { $status = 'n'; } - $app->remoting_lib->loadFormDef('../sites/form/web_domain.tform.php'); + $app->remoting_lib->loadFormDef('../sites/form/web_vhost_domain.tform.php'); $params = $app->remoting_lib->getDataRecord($primary_id); $params['active'] = $status; - $affected_rows = $this->updateQuery('../sites/form/web_domain.tform.php', 0, $primary_id, $params); + $affected_rows = $this->updateQuery('../sites/form/web_vhost_domain.tform.php', 0, $primary_id, $params); return $affected_rows; } else { throw new SoapFault('status_undefined', 'The status is not available'); diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php index 241bad700..204aebb15 100644 --- a/interface/lib/classes/remoting.inc.php +++ b/interface/lib/classes/remoting.inc.php @@ -340,6 +340,7 @@ class remoting { //* Get the SQL query $sql = $app->remoting_lib->getSQL($params, 'UPDATE', $primary_id); + // throw new SoapFault('debug', $sql); if($app->remoting_lib->errorMessage != '') { throw new SoapFault('data_processing_error', $app->remoting_lib->errorMessage); -- GitLab From 75b7fc56e18c81e66eefbae3952bf3902742c44f Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:12:20 +0200 Subject: [PATCH 210/287] - ported some patches --- install/lib/update.lib.php | 20 +++++++++++++++++++ .../sql/incremental/upd_dev_collection.sql | 3 ++- install/sql/ispconfig3.sql | 2 +- install/update.php | 3 +++ interface/web/dns/dns_soa_edit.php | 2 +- interface/web/dns/dns_wizard.php | 2 +- interface/web/mail/mail_domain_edit.php | 2 +- interface/web/sites/database_edit.php | 4 ++-- interface/web/sites/web_vhost_domain_edit.php | 4 ++-- 9 files changed, 33 insertions(+), 9 deletions(-) diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index 56f6bd6fb..11d29f1f4 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -385,4 +385,24 @@ function updateDbAndIni() { +function setDefaultServers(){ + global $inst, $conf; + + // clients + $clients = $inst->db->queryAllRecords("SELECT * FROM ".$conf["mysql"]["database"].".client"); + if(is_array($clients) && !empty($clients)){ + foreach($clients as $client){ + // mailserver + if(trim($client['mail_servers']) == '') $inst->db->query("UPDATE ".$conf["mysql"]["database"].".client SET mail_servers = '".trim($client['default_mailserver'])."' WHERE client_id = ".$client['client_id']); + // webserver + if(trim($client['web_servers']) == '') $inst->db->query("UPDATE ".$conf["mysql"]["database"].".client SET web_servers = '".trim($client['default_webserver'])."' WHERE client_id = ".$client['client_id']); + // dns server + if(trim($client['dns_servers']) == '') $inst->db->query("UPDATE ".$conf["mysql"]["database"].".client SET dns_servers = '".trim($client['default_dnsserver'])."' WHERE client_id = ".$client['client_id']); + // db server + if(trim($client['db_servers']) == '') $inst->db->query("UPDATE ".$conf["mysql"]["database"].".client SET db_servers = '".trim($client['default_dbserver'])."' WHERE client_id = ".$client['client_id']); + } + } + +} + ?> diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index 4395655c6..280231472 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -139,4 +139,5 @@ UPDATE `dbispconfig`.`sys_ini` SET `default_logo` = 'data:image/png;base64,iVBOR ALTER TABLE `directive_snippets` ADD `required_php_snippets` VARCHAR(255) NOT NULL DEFAULT '' AFTER `customer_viewable`; ALTER TABLE `dns_rr` CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600'; -ALTER TABLE `dns_soa` CHANGE `minimum` `minimum` INT(11) UNSIGNED NOT NULL DEFAULT '3600', CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600'; \ No newline at end of file +ALTER TABLE `dns_soa` CHANGE `minimum` `minimum` INT(11) UNSIGNED NOT NULL DEFAULT '3600', CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600'; +ALTER TABLE `client` CHANGE `web_php_options` `web_php_options` VARCHAR(255) NOT NULL DEFAULT 'no,fast-cgi,cgi,mod,suphp,php-fpm,hhvm'; \ No newline at end of file diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index a020d028a..9b8428d57 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -201,7 +201,7 @@ CREATE TABLE `client` ( `limit_web_ip` text, `limit_web_domain` int(11) NOT NULL DEFAULT '-1', `limit_web_quota` int(11) NOT NULL DEFAULT '-1', - `web_php_options` varchar(255) NOT NULL DEFAULT 'no,fast-cgi,cgi,mod,suphp,php-fpm', + `web_php_options` varchar(255) NOT NULL DEFAULT 'no,fast-cgi,cgi,mod,suphp,php-fpm,hhvm', `limit_cgi` enum('n','y') NOT NULL DEFAULT 'n', `limit_ssi` enum('n','y') NOT NULL DEFAULT 'n', `limit_perl` enum('n','y') NOT NULL DEFAULT 'n', diff --git a/install/update.php b/install/update.php index 8e05318ae..aa42c24b0 100644 --- a/install/update.php +++ b/install/update.php @@ -513,6 +513,9 @@ if($reconfigure_services_answer == 'yes') { } } +//* Set default servers +setDefaultServers(); + //* Create md5 filelist $md5_filename = '/usr/local/ispconfig/security/data/file_checksums_'.date('Y-m-d_h-i').'.md5'; exec('find /usr/local/ispconfig -type f -print0 | xargs -0 md5sum > '.$md5_filename); diff --git a/interface/web/dns/dns_soa_edit.php b/interface/web/dns/dns_soa_edit.php index 96c20a1cb..634a91d18 100644 --- a/interface/web/dns/dns_soa_edit.php +++ b/interface/web/dns/dns_soa_edit.php @@ -150,7 +150,7 @@ class page_action extends tform_actions { $options_dns_servers = ""; foreach ($dns_servers as $dns_server) { - $options_dns_servers .= ""; + $options_dns_servers .= ''; } $app->tpl->setVar("client_server_id", $options_dns_servers); diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php index 17dba998e..198245b29 100644 --- a/interface/web/dns/dns_wizard.php +++ b/interface/web/dns/dns_wizard.php @@ -147,7 +147,7 @@ if($_SESSION["s"]["user"]["typ"] != 'admin') $options_dns_servers = ""; foreach ($dns_servers as $dns_server) { - $options_dns_servers .= ""; + $options_dns_servers .= ''; } $app->tpl->setVar("server_id", $options_dns_servers); diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index 9873c81bc..693013b2f 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -139,7 +139,7 @@ class page_action extends tform_actions { $options_mail_servers = ""; foreach ($mail_servers as $mail_server) { - $options_mail_servers .= ""; + $options_mail_servers .= ''; } $app->tpl->setVar("client_server_id", $options_mail_servers); diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php index 01497ab84..7319e9a83 100644 --- a/interface/web/sites/database_edit.php +++ b/interface/web/sites/database_edit.php @@ -89,7 +89,7 @@ class page_action extends tform_actions { } foreach ($tmp as $db_server) { - $options_db_servers .= ""; + $options_db_servers .= ''; } $app->tpl->setVar("server_id", $options_db_servers); @@ -112,7 +112,7 @@ class page_action extends tform_actions { } foreach ($tmp as $db_server) { - $options_db_servers .= ""; + $options_db_servers .= ''; } $app->tpl->setVar("server_id", $options_db_servers); diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index d21da2a0b..eb0db5ada 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -173,7 +173,7 @@ class page_action extends tform_actions { $options_web_servers = ""; foreach ($web_servers as $web_server) { - $options_web_servers .= ""; + $options_web_servers .= ''; } $app->tpl->setVar("server_id", $options_web_servers); @@ -298,7 +298,7 @@ class page_action extends tform_actions { $options_web_servers = ""; foreach ($web_servers as $web_server) { - $options_web_servers .= ""; + $options_web_servers .= ''; } $app->tpl->setVar("server_id", $options_web_servers); -- GitLab From 7ee336c7ccb5f8d35b8eb05cf5e812a42154cbc2 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:19:30 +0200 Subject: [PATCH 211/287] - ported some patches --- interface/web/dns/list/dns_slave.list.php | 3 ++- interface/web/dns/list/dns_soa.list.php | 3 ++- interface/web/mail/list/mail_domain.list.php | 3 ++- interface/web/sites/list/database.list.php | 3 ++- interface/web/sites/list/web_vhost_domain.list.php | 3 ++- interface/web/themes/default/templates/sidenav.tpl.htm | 4 ++-- server/lib/classes/cron.d/300-quota_notify.inc.php | 5 +++++ server/lib/classes/cron.d/500-backup.inc.php | 2 +- 8 files changed, 18 insertions(+), 8 deletions(-) diff --git a/interface/web/dns/list/dns_slave.list.php b/interface/web/dns/list/dns_slave.list.php index 5c0be05fb..9be70553f 100644 --- a/interface/web/dns/list/dns_slave.list.php +++ b/interface/web/dns/list/dns_slave.list.php @@ -83,7 +83,8 @@ if($_SESSION['s']['user']['typ'] == 'admin') { 'prefix' => "", 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', - 'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name', + //'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name', + 'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name", 'keyfield'=> 'groupid', 'valuefield'=> 'name' ), diff --git a/interface/web/dns/list/dns_soa.list.php b/interface/web/dns/list/dns_soa.list.php index d6f56414e..f2adf6f61 100644 --- a/interface/web/dns/list/dns_soa.list.php +++ b/interface/web/dns/list/dns_soa.list.php @@ -83,7 +83,8 @@ if($_SESSION['s']['user']['typ'] == 'admin') { 'prefix' => "", 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', - 'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name', + //'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name', + 'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name", 'keyfield'=> 'groupid', 'valuefield'=> 'name' ), diff --git a/interface/web/mail/list/mail_domain.list.php b/interface/web/mail/list/mail_domain.list.php index 6756f5bb2..6da4b8f85 100644 --- a/interface/web/mail/list/mail_domain.list.php +++ b/interface/web/mail/list/mail_domain.list.php @@ -70,7 +70,8 @@ if($_SESSION['s']['user']['typ'] == 'admin') { 'prefix' => "", 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', - 'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name', + //'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name', + 'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name", 'keyfield'=> 'groupid', 'valuefield'=> 'name' ), diff --git a/interface/web/sites/list/database.list.php b/interface/web/sites/list/database.list.php index 599cf96f4..82da7b4eb 100644 --- a/interface/web/sites/list/database.list.php +++ b/interface/web/sites/list/database.list.php @@ -91,7 +91,8 @@ if($_SESSION['s']['user']['typ'] == 'admin') { 'prefix' => "", 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', - 'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name', + //'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name', + 'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name", 'keyfield'=> 'groupid', 'valuefield'=> 'name' ), diff --git a/interface/web/sites/list/web_vhost_domain.list.php b/interface/web/sites/list/web_vhost_domain.list.php index f997d7b41..eed93914f 100644 --- a/interface/web/sites/list/web_vhost_domain.list.php +++ b/interface/web/sites/list/web_vhost_domain.list.php @@ -88,7 +88,8 @@ if($_SESSION['s']['user']['typ'] == 'admin' && $vhostdomain_type == 'domain') { 'prefix' => "", 'suffix' => "", 'datasource' => array ( 'type' => 'SQL', - 'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name', + //'querystring' => 'SELECT groupid, name FROM sys_group WHERE groupid != 1 ORDER BY name', + 'querystring' => "SELECT sys_group.groupid,CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), IF(client.contact_firstname != '', CONCAT(client.contact_firstname, ' '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as name FROM sys_group, client WHERE sys_group.groupid != 1 AND sys_group.client_id = client.client_id ORDER BY client.company_name, client.contact_name", 'keyfield'=> 'groupid', 'valuefield'=> 'name' ), diff --git a/interface/web/themes/default/templates/sidenav.tpl.htm b/interface/web/themes/default/templates/sidenav.tpl.htm index 9515c40ab..b85100336 100644 --- a/interface/web/themes/default/templates/sidenav.tpl.htm +++ b/interface/web/themes/default/templates/sidenav.tpl.htm @@ -9,13 +9,13 @@ - -
+
+ diff --git a/server/lib/classes/cron.d/300-quota_notify.inc.php b/server/lib/classes/cron.d/300-quota_notify.inc.php index 9b2b79d0d..d250fe746 100644 --- a/server/lib/classes/cron.d/300-quota_notify.inc.php +++ b/server/lib/classes/cron.d/300-quota_notify.inc.php @@ -49,6 +49,11 @@ class cronjob_quota_notify extends cronjob { public function onRunJob() { global $app, $conf; + + /* used for all monitor cronjobs */ + $app->load('monitor_tools'); + $this->_tools = new monitor_tools(); + /* end global section for monitor cronjobs */ //###################################################################################################### // enforce traffic quota (run only on the "master-server") diff --git a/server/lib/classes/cron.d/500-backup.inc.php b/server/lib/classes/cron.d/500-backup.inc.php index 6b200989f..e16e2a89f 100644 --- a/server/lib/classes/cron.d/500-backup.inc.php +++ b/server/lib/classes/cron.d/500-backup.inc.php @@ -228,7 +228,7 @@ class cronjob_backup extends cronjob { $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."'"; - $command = "mysqldump -h ".escapeshellarg($clientdb_host)." -u ".escapeshellarg($clientdb_user)." -p".escapeshellarg($clientdb_password)." -c --add-drop-table --create-options --quick --result-file='".$db_backup_dir.'/'.$db_backup_file."' '".$db_name."'"; + $command = "mysqldump -h ".escapeshellarg($clientdb_host)." -u ".escapeshellarg($clientdb_user)." -p".escapeshellarg($clientdb_password)." -c --add-drop-table --create-options --quick --max_allowed_packet=512M --result-file='".$db_backup_dir.'/'.$db_backup_file."' '".$db_name."'"; exec($command, $tmp_output, $retval); //* Compress the backup with gzip -- GitLab From 2c408f413fe7e1bd1b17763d0845d3726ed3ff2e Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:24:37 +0200 Subject: [PATCH 212/287] - ported some patches --- .../lib/classes/plugin_backuplist.inc.php | 4 ++ .../admin/list/directive_snippets.list.php | 4 +- interface/web/admin/list/firewall.list.php | 2 +- interface/web/admin/list/iptables.list.php | 2 +- interface/web/admin/list/server.list.php | 14 ++--- interface/web/admin/list/server_ip.list.php | 2 +- .../web/admin/list/software_repo.list.php | 2 +- interface/web/admin/list/users.list.php | 2 +- .../web/client/list/client_circle.list.php | 2 +- interface/web/dns/list/dns_a.list.php | 2 +- interface/web/dns/list/dns_slave.list.php | 2 +- interface/web/dns/list/dns_soa.list.php | 2 +- interface/web/dns/list/dns_template.list.php | 2 +- interface/web/mail/list/mail_alias.list.php | 2 +- .../web/mail/list/mail_aliasdomain.list.php | 2 +- .../web/mail/list/mail_blacklist.list.php | 2 +- .../mail/list/mail_content_filter.list.php | 2 +- interface/web/mail/list/mail_domain.list.php | 2 +- .../mail/list/mail_domain_catchall.list.php | 2 +- interface/web/mail/list/mail_forward.list.php | 2 +- interface/web/mail/list/mail_get.list.php | 2 +- .../mail/list/mail_relay_recipient.list.php | 2 +- .../web/mail/list/mail_spamfilter.list.php | 2 +- .../web/mail/list/mail_transport.list.php | 2 +- interface/web/mail/list/mail_user.list.php | 10 ++-- .../web/mail/list/mail_whitelist.list.php | 2 +- .../mail/list/spamfilter_blacklist.list.php | 2 +- .../web/mail/list/spamfilter_policy.list.php | 8 +-- .../web/mail/list/spamfilter_users.list.php | 2 +- .../mail/list/spamfilter_whitelist.list.php | 2 +- interface/web/sites/list/cron.list.php | 2 +- interface/web/sites/list/database.list.php | 4 +- interface/web/sites/list/ftp_user.list.php | 2 +- interface/web/sites/list/shell_user.list.php | 2 +- .../web/sites/list/web_childdomain.list.php | 2 +- interface/web/sites/list/web_folder.list.php | 2 +- .../web/sites/list/web_folder_user.list.php | 2 +- .../web/sites/list/web_vhost_domain.list.php | 2 +- interface/web/sites/list/webdav_user.list.php | 2 +- .../sites/templates/database_admin_list.htm | 4 +- .../web/sites/templates/database_list.htm | 4 +- server/lib/classes/cron.d/500-backup.inc.php | 56 +++++++++++++++++-- 42 files changed, 113 insertions(+), 61 deletions(-) diff --git a/interface/lib/classes/plugin_backuplist.inc.php b/interface/lib/classes/plugin_backuplist.inc.php index e9cd40c8c..f47a819a5 100644 --- a/interface/lib/classes/plugin_backuplist.inc.php +++ b/interface/lib/classes/plugin_backuplist.inc.php @@ -126,6 +126,10 @@ class plugin_backuplist extends plugin_base { $rec['download_available'] = true; if($rec['server_id'] != $web['server_id']) $rec['download_available'] = false; + + if($rec['filesize'] > 0){ + $rec['filesize'] = $app->functions->currency_format($rec['filesize']/(1024*1024), 'client').' MB'; + } $records_new[] = $rec; } diff --git a/interface/web/admin/list/directive_snippets.list.php b/interface/web/admin/list/directive_snippets.list.php index 37fe89a42..078cebf86 100644 --- a/interface/web/admin/list/directive_snippets.list.php +++ b/interface/web/admin/list/directive_snippets.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('yes_txt')."
", 'n' => "
".$app->lng('no_txt')."
")); $liste["item"][] = array( 'field' => "name", @@ -82,6 +82,6 @@ $liste["item"][] = array( 'field' => "customer_viewable", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('yes_txt')."
", 'n' => "
".$app->lng('no_txt')."
")); ?> diff --git a/interface/web/admin/list/firewall.list.php b/interface/web/admin/list/firewall.list.php index 058e86c80..786b7b848 100644 --- a/interface/web/admin/list/firewall.list.php +++ b/interface/web/admin/list/firewall.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('yes_txt')."
", 'n' => "
".$app->lng('no_txt')."
")); $liste["item"][] = array( 'field' => "server_id", 'datatype' => "VARCHAR", diff --git a/interface/web/admin/list/iptables.list.php b/interface/web/admin/list/iptables.list.php index ad487e5b6..2426c80c5 100644 --- a/interface/web/admin/list/iptables.list.php +++ b/interface/web/admin/list/iptables.list.php @@ -18,7 +18,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array("y" => "
Yes
", "n" => "
No
")); + 'value' => array("y" => "
".$app->lng('yes_txt')."
", "n" => "
".$app->lng('no_txt')."
")); $liste["item"][] = array( 'field' => "server_id", 'datatype' => "VARCHAR", diff --git a/interface/web/admin/list/server.list.php b/interface/web/admin/list/server.list.php index 029063240..9ca54c07d 100644 --- a/interface/web/admin/list/server.list.php +++ b/interface/web/admin/list/server.list.php @@ -63,7 +63,7 @@ $liste['item'][] = array( 'field' => 'mail_server', 'prefix' => '%', 'suffix' => '%', 'width' => '', - 'value' => array('1' => "
Yes
", '0' => "
No
")); + 'value' => array('1' => "
".$app->lng('yes_txt')."
", '0' => "
".$app->lng('no_txt')."
")); $liste['item'][] = array( 'field' => 'web_server', 'datatype' => 'VARCHAR', @@ -72,7 +72,7 @@ $liste['item'][] = array( 'field' => 'web_server', 'prefix' => '%', 'suffix' => '%', 'width' => '', - 'value' => array('1' => "
Yes
", '0' => "
No
")); + 'value' => array('1' => "
".$app->lng('yes_txt')."
", '0' => "
".$app->lng('no_txt')."
")); $liste['item'][] = array( 'field' => 'dns_server', 'datatype' => 'VARCHAR', @@ -81,7 +81,7 @@ $liste['item'][] = array( 'field' => 'dns_server', 'prefix' => '%', 'suffix' => '%', 'width' => '', - 'value' => array('1' => "
Yes
", '0' => "
No
")); + 'value' => array('1' => "
".$app->lng('yes_txt')."
", '0' => "
".$app->lng('no_txt')."
")); $liste['item'][] = array( 'field' => 'file_server', 'datatype' => 'VARCHAR', @@ -90,7 +90,7 @@ $liste['item'][] = array( 'field' => 'file_server', 'prefix' => '%', 'suffix' => '%', 'width' => '', - 'value' => array('1' => "
Yes
", '0' => "
No
")); + 'value' => array('1' => "
".$app->lng('yes_txt')."
", '0' => "
".$app->lng('no_txt')."
")); $liste['item'][] = array( 'field' => 'db_server', 'datatype' => 'VARCHAR', @@ -99,7 +99,7 @@ $liste['item'][] = array( 'field' => 'db_server', 'prefix' => '%', 'suffix' => '%', 'width' => '', - 'value' => array('1' => "
Yes
", '0' => "
No
")); + 'value' => array('1' => "
".$app->lng('yes_txt')."
", '0' => "
".$app->lng('no_txt')."
")); $liste['item'][] = array( 'field' => 'vserver_server', 'datatype' => 'VARCHAR', @@ -108,7 +108,7 @@ $liste['item'][] = array( 'field' => 'vserver_server', 'prefix' => '%', 'suffix' => '%', 'width' => '', - 'value' => array('1' => "
Yes
", '0' => "
No
")); + 'value' => array('1' => "
".$app->lng('yes_txt')."
", '0' => "
".$app->lng('no_txt')."
")); $liste['item'][] = array( 'field' => 'xmpp_server', 'datatype' => 'VARCHAR', @@ -117,6 +117,6 @@ $liste['item'][] = array( 'field' => 'xmpp_server', 'prefix' => '%', 'suffix' => '%', 'width' => '', - 'value' => array('1' => "
Yes
", '0' => "
No
")); + 'value' => array('1' => "
".$app->lng('yes_txt')."
", '0' => "
".$app->lng('no_txt')."
")); ?> diff --git a/interface/web/admin/list/server_ip.list.php b/interface/web/admin/list/server_ip.list.php index dba0c68cb..6cc63cb2d 100644 --- a/interface/web/admin/list/server_ip.list.php +++ b/interface/web/admin/list/server_ip.list.php @@ -95,7 +95,7 @@ $liste["item"][] = array( 'field' => "virtualhost", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('yes_txt')."
", 'n' => "
".$app->lng('no_txt')."
")); $liste['item'][] = array( 'field' => 'virtualhost_port', diff --git a/interface/web/admin/list/software_repo.list.php b/interface/web/admin/list/software_repo.list.php index 2eb3dd520..824c66d6d 100644 --- a/interface/web/admin/list/software_repo.list.php +++ b/interface/web/admin/list/software_repo.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('yes_txt')."
", 'n' => "
".$app->lng('no_txt')."
")); $liste["item"][] = array( 'field' => "repo_name", 'datatype' => "VARCHAR", diff --git a/interface/web/admin/list/users.list.php b/interface/web/admin/list/users.list.php index b260c2b3c..53e3f440a 100644 --- a/interface/web/admin/list/users.list.php +++ b/interface/web/admin/list/users.list.php @@ -60,7 +60,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('1' => "
Yes
", '0' => "
No
")); + 'value' => array('1' => "
".$app->lng('yes_txt')."
", '0' => "
".$app->lng('no_txt')."
")); $liste['item'][] = array( 'field' => 'username', 'datatype' => 'VARCHAR', diff --git a/interface/web/client/list/client_circle.list.php b/interface/web/client/list/client_circle.list.php index d1ef3ad50..56085c4c3 100644 --- a/interface/web/client/list/client_circle.list.php +++ b/interface/web/client/list/client_circle.list.php @@ -63,7 +63,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('yes_txt')."
", 'n' => "
".$app->lng('no_txt')."
")); $liste["item"][] = array( 'field' => "circle_name", 'datatype' => "VARCHAR", diff --git a/interface/web/dns/list/dns_a.list.php b/interface/web/dns/list/dns_a.list.php index 65429dfa7..bf5bf1d52 100644 --- a/interface/web/dns/list/dns_a.list.php +++ b/interface/web/dns/list/dns_a.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "
Yes
", 'N' => "
No
")); + 'value' => array('Y' => "
".$app->lng('yes_txt')."
", 'N' => "
".$app->lng('no_txt')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/dns/list/dns_slave.list.php b/interface/web/dns/list/dns_slave.list.php index 9be70553f..529a18966 100644 --- a/interface/web/dns/list/dns_slave.list.php +++ b/interface/web/dns/list/dns_slave.list.php @@ -59,7 +59,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "
Yes
", 'N' => "
No
")); + 'value' => array('Y' => "
".$app->lng('yes_txt')."
", 'N' => "
".$app->lng('no_txt')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/dns/list/dns_soa.list.php b/interface/web/dns/list/dns_soa.list.php index f2adf6f61..2f4233e06 100644 --- a/interface/web/dns/list/dns_soa.list.php +++ b/interface/web/dns/list/dns_soa.list.php @@ -59,7 +59,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "
Yes
", 'N' => "
No
")); + 'value' => array('Y' => "
".$app->lng('yes_txt')."
", 'N' => "
".$app->lng('no_txt')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/dns/list/dns_template.list.php b/interface/web/dns/list/dns_template.list.php index 63302d956..be5d69341 100644 --- a/interface/web/dns/list/dns_template.list.php +++ b/interface/web/dns/list/dns_template.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "visible", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "
Yes
", 'N' => "
No
")); + 'value' => array('Y' => "
".$app->lng('yes_txt')."
", 'N' => "
".$app->lng('no_txt')."
")); $liste["item"][] = array( 'field' => "name", diff --git a/interface/web/mail/list/mail_alias.list.php b/interface/web/mail/list/mail_alias.list.php index 2f92e2c1c..fcbfb9459 100644 --- a/interface/web/mail/list/mail_alias.list.php +++ b/interface/web/mail/list/mail_alias.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "source", diff --git a/interface/web/mail/list/mail_aliasdomain.list.php b/interface/web/mail/list/mail_aliasdomain.list.php index c5dc4e3cf..8408e9e60 100644 --- a/interface/web/mail/list/mail_aliasdomain.list.php +++ b/interface/web/mail/list/mail_aliasdomain.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "source", diff --git a/interface/web/mail/list/mail_blacklist.list.php b/interface/web/mail/list/mail_blacklist.list.php index 434656b72..4b6c81be9 100644 --- a/interface/web/mail/list/mail_blacklist.list.php +++ b/interface/web/mail/list/mail_blacklist.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); diff --git a/interface/web/mail/list/mail_content_filter.list.php b/interface/web/mail/list/mail_content_filter.list.php index aa79312a4..231460d3f 100644 --- a/interface/web/mail/list/mail_content_filter.list.php +++ b/interface/web/mail/list/mail_content_filter.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); diff --git a/interface/web/mail/list/mail_domain.list.php b/interface/web/mail/list/mail_domain.list.php index 6da4b8f85..c2005aeb3 100644 --- a/interface/web/mail/list/mail_domain.list.php +++ b/interface/web/mail/list/mail_domain.list.php @@ -59,7 +59,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); if($_SESSION['s']['user']['typ'] == 'admin') { diff --git a/interface/web/mail/list/mail_domain_catchall.list.php b/interface/web/mail/list/mail_domain_catchall.list.php index 75d311df7..4413c491a 100644 --- a/interface/web/mail/list/mail_domain_catchall.list.php +++ b/interface/web/mail/list/mail_domain_catchall.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "source", diff --git a/interface/web/mail/list/mail_forward.list.php b/interface/web/mail/list/mail_forward.list.php index 524c2a7e8..831e8b458 100644 --- a/interface/web/mail/list/mail_forward.list.php +++ b/interface/web/mail/list/mail_forward.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "source", diff --git a/interface/web/mail/list/mail_get.list.php b/interface/web/mail/list/mail_get.list.php index aa9338620..154401a3a 100644 --- a/interface/web/mail/list/mail_get.list.php +++ b/interface/web/mail/list/mail_get.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/mail_relay_recipient.list.php b/interface/web/mail/list/mail_relay_recipient.list.php index cc2672143..eb6bdd91f 100644 --- a/interface/web/mail/list/mail_relay_recipient.list.php +++ b/interface/web/mail/list/mail_relay_recipient.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/mail_spamfilter.list.php b/interface/web/mail/list/mail_spamfilter.list.php index 645feac0b..77bd491ec 100644 --- a/interface/web/mail/list/mail_spamfilter.list.php +++ b/interface/web/mail/list/mail_spamfilter.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('1' => "
Yes
", '0' => "
No
")); + 'value' => array('1' => "
".$app->lng('Yes')."
", '0' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/mail_transport.list.php b/interface/web/mail/list/mail_transport.list.php index d554da96c..f45d083ed 100644 --- a/interface/web/mail/list/mail_transport.list.php +++ b/interface/web/mail/list/mail_transport.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/mail_user.list.php b/interface/web/mail/list/mail_user.list.php index 253aa90ed..fd15658ea 100644 --- a/interface/web/mail/list/mail_user.list.php +++ b/interface/web/mail/list/mail_user.list.php @@ -87,7 +87,7 @@ $liste["item"][] = array( 'field' => "autoresponder", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "postfix", 'datatype' => "VARCHAR", @@ -96,7 +96,7 @@ $liste["item"][] = array( 'field' => "postfix", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "disablesmtp", 'datatype' => "VARCHAR", @@ -105,7 +105,7 @@ $liste["item"][] = array( 'field' => "disablesmtp", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('n' => "
Yes
", 'y' => "
No
")); + 'value' => array('n' => "
".$app->lng('Yes')."
", 'y' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "disableimap", 'datatype' => "VARCHAR", @@ -114,7 +114,7 @@ $liste["item"][] = array( 'field' => "disableimap", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('n' => "
Yes
", 'y' => "
No
")); + 'value' => array('n' => "
".$app->lng('Yes')."
", 'y' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "disablepop3", 'datatype' => "VARCHAR", @@ -123,6 +123,6 @@ $liste["item"][] = array( 'field' => "disablepop3", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('n' => "
Yes
", 'y' => "
No
")); + 'value' => array('n' => "
".$app->lng('Yes')."
", 'y' => "
".$app->lng('No')."
")); ?> diff --git a/interface/web/mail/list/mail_whitelist.list.php b/interface/web/mail/list/mail_whitelist.list.php index 2069a6b53..d61da29e1 100644 --- a/interface/web/mail/list/mail_whitelist.list.php +++ b/interface/web/mail/list/mail_whitelist.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/spamfilter_blacklist.list.php b/interface/web/mail/list/spamfilter_blacklist.list.php index faadd5326..76f9ebba6 100644 --- a/interface/web/mail/list/spamfilter_blacklist.list.php +++ b/interface/web/mail/list/spamfilter_blacklist.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/spamfilter_policy.list.php b/interface/web/mail/list/spamfilter_policy.list.php index 03b39722a..eeb8746f0 100644 --- a/interface/web/mail/list/spamfilter_policy.list.php +++ b/interface/web/mail/list/spamfilter_policy.list.php @@ -65,7 +65,7 @@ $liste["item"][] = array( 'field' => "virus_lover", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "
Yes
", 'N' => "
No
")); + 'value' => array('Y' => "
".$app->lng('Yes')."
", 'N' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "spam_lover", @@ -75,7 +75,7 @@ $liste["item"][] = array( 'field' => "spam_lover", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "
Yes
", 'N' => "
No
")); + 'value' => array('Y' => "
".$app->lng('Yes')."
", 'N' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "banned_files_lover", @@ -85,7 +85,7 @@ $liste["item"][] = array( 'field' => "banned_files_lover", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "
Yes
", 'N' => "
No
")); + 'value' => array('Y' => "
".$app->lng('Yes')."
", 'N' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "bad_header_lover", @@ -95,7 +95,7 @@ $liste["item"][] = array( 'field' => "bad_header_lover", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "
Yes
", 'N' => "
No
")); + 'value' => array('Y' => "
".$app->lng('Yes')."
", 'N' => "
".$app->lng('No')."
")); diff --git a/interface/web/mail/list/spamfilter_users.list.php b/interface/web/mail/list/spamfilter_users.list.php index 6438d9fff..0d65df505 100644 --- a/interface/web/mail/list/spamfilter_users.list.php +++ b/interface/web/mail/list/spamfilter_users.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "local", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "
Yes
", 'N' => "
No
")); + 'value' => array('Y' => "
".$app->lng('Yes')."
", 'N' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/spamfilter_whitelist.list.php b/interface/web/mail/list/spamfilter_whitelist.list.php index 8e5d8b7fc..6f6463875 100644 --- a/interface/web/mail/list/spamfilter_whitelist.list.php +++ b/interface/web/mail/list/spamfilter_whitelist.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/list/cron.list.php b/interface/web/sites/list/cron.list.php index f13beabfb..b1625ebb1 100644 --- a/interface/web/sites/list/cron.list.php +++ b/interface/web/sites/list/cron.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/list/database.list.php b/interface/web/sites/list/database.list.php index 82da7b4eb..55450ef17 100644 --- a/interface/web/sites/list/database.list.php +++ b/interface/web/sites/list/database.list.php @@ -59,7 +59,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "remote_access", 'datatype' => "VARCHAR", @@ -68,7 +68,7 @@ $liste["item"][] = array( 'field' => "remote_access", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "type", 'datatype' => "VARCHAR", diff --git a/interface/web/sites/list/ftp_user.list.php b/interface/web/sites/list/ftp_user.list.php index fc15170e9..122e2b084 100644 --- a/interface/web/sites/list/ftp_user.list.php +++ b/interface/web/sites/list/ftp_user.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/list/shell_user.list.php b/interface/web/sites/list/shell_user.list.php index cd88eb2ad..33ba4ad0b 100644 --- a/interface/web/sites/list/shell_user.list.php +++ b/interface/web/sites/list/shell_user.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/list/web_childdomain.list.php b/interface/web/sites/list/web_childdomain.list.php index 49167389d..9a5f10713 100644 --- a/interface/web/sites/list/web_childdomain.list.php +++ b/interface/web/sites/list/web_childdomain.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/list/web_folder.list.php b/interface/web/sites/list/web_folder.list.php index fedef22a2..2c7989264 100644 --- a/interface/web/sites/list/web_folder.list.php +++ b/interface/web/sites/list/web_folder.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/list/web_folder_user.list.php b/interface/web/sites/list/web_folder_user.list.php index 04a851352..454e2c447 100644 --- a/interface/web/sites/list/web_folder_user.list.php +++ b/interface/web/sites/list/web_folder_user.list.php @@ -57,7 +57,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "web_folder_id", diff --git a/interface/web/sites/list/web_vhost_domain.list.php b/interface/web/sites/list/web_vhost_domain.list.php index eed93914f..ddeaacc6e 100644 --- a/interface/web/sites/list/web_vhost_domain.list.php +++ b/interface/web/sites/list/web_vhost_domain.list.php @@ -78,7 +78,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); if($_SESSION['s']['user']['typ'] == 'admin' && $vhostdomain_type == 'domain') { $liste["item"][] = array( 'field' => "sys_groupid", diff --git a/interface/web/sites/list/webdav_user.list.php b/interface/web/sites/list/webdav_user.list.php index 339bc0d1e..ab727ac1a 100644 --- a/interface/web/sites/list/webdav_user.list.php +++ b/interface/web/sites/list/webdav_user.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "
Yes
", 'n' => "
No
")); + 'value' => array('y' => "
".$app->lng('Yes')."
", 'n' => "
".$app->lng('No')."
")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/templates/database_admin_list.htm b/interface/web/sites/templates/database_admin_list.htm index c8149363a..8203fa109 100644 --- a/interface/web/sites/templates/database_admin_list.htm +++ b/interface/web/sites/templates/database_admin_list.htm @@ -61,13 +61,13 @@
{tmpl_var name='globalsearch_noresults_text_txt'}{tmpl_var name='globalsearch_noresults_text_txt'}
diff --git a/interface/web/sites/templates/database_list.htm b/interface/web/sites/templates/database_list.htm index f75fd9871..6aeb8518f 100644 --- a/interface/web/sites/templates/database_list.htm +++ b/interface/web/sites/templates/database_list.htm @@ -75,13 +75,13 @@
{tmpl_var name='globalsearch_noresults_text_txt'}{tmpl_var name='globalsearch_noresults_text_txt'}
diff --git a/server/lib/classes/cron.d/500-backup.inc.php b/server/lib/classes/cron.d/500-backup.inc.php index e16e2a89f..87321d5fc 100644 --- a/server/lib/classes/cron.d/500-backup.inc.php +++ b/server/lib/classes/cron.d/500-backup.inc.php @@ -76,6 +76,8 @@ class cronjob_backup extends cronjob { //* mount backup directory, if necessary if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $run_backups = false; if($run_backups){ + $web_array = array(); + //* backup only active domains $sql = "SELECT * FROM web_domain WHERE server_id = ? AND (type = 'vhost' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND active = 'y'"; $records = $app->db->queryAllRecords($sql, $conf['server_id']); @@ -89,6 +91,7 @@ class cronjob_backup extends cronjob { $web_user = $rec['system_user']; $web_group = $rec['system_group']; $web_id = $rec['domain_id']; + if(!in_array($web_id, $web_array)) $web_array[] = $web_id; $web_backup_dir = $backup_dir.'/web'.$web_id; if(!is_dir($web_backup_dir)) mkdir($web_backup_dir, 0750); chmod($web_backup_dir, 0750); @@ -157,10 +160,10 @@ class cronjob_backup extends cronjob { for ($n = $backup_copies; $n <= 10; $n++) { if(isset($files[$n]) && is_file($web_backup_dir.'/'.$files[$n])) { - unlink($web_backup_dir.'/'.$files[$n]); $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; $app->db->query($sql, $conf['server_id'], $web_id, $files[$n]); if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id, $files[$n]); + @unlink($web_backup_dir.'/'.$files[$n]); } } @@ -209,6 +212,7 @@ class cronjob_backup extends cronjob { if($rec['backup_interval'] == 'daily' or ($rec['backup_interval'] == 'weekly' && date('w') == 0) or ($rec['backup_interval'] == 'monthly' && date('d') == '01')) { $web_id = $rec['parent_domain_id']; + if(!in_array($web_id, $web_array)) $web_array[] = $web_id; $db_backup_dir = $backup_dir.'/web'.$web_id; if(!is_dir($db_backup_dir)) mkdir($db_backup_dir, 0750); chmod($db_backup_dir, 0750); @@ -260,7 +264,7 @@ class cronjob_backup extends cronjob { $dir_handle = dir($db_backup_dir); $files = array(); while (false !== ($entry = $dir_handle->read())) { - if($entry != '.' && $entry != '..' && preg_match('/^db_(.*?)_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}\.sql.gz$/', $entry, $matches) && is_file($db_backup_dir.'/'.$entry)) { + if($entry != '.' && $entry != '..' && preg_match('/^db_('.$db_name.')_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}\.sql.gz$/', $entry, $matches) && is_file($db_backup_dir.'/'.$entry)) { if(array_key_exists($matches[1], $files) == false) $files[$matches[1]] = array(); $files[$matches[1]][] = $entry; } @@ -272,10 +276,10 @@ class cronjob_backup extends cronjob { rsort($filelist); for ($n = $backup_copies; $n <= 10; $n++) { if(isset($filelist[$n]) && is_file($db_backup_dir.'/'.$filelist[$n])) { - unlink($db_backup_dir.'/'.$filelist[$n]); $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; $app->db->query($sql, $conf['server_id'], $web_id, $filelist[$n]); if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $web_id, $filelist[$n]); + @unlink($db_backup_dir.'/'.$filelist[$n]); } } } @@ -299,7 +303,51 @@ class cronjob_backup extends cronjob { if(!is_file($backup_file)){ $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; $app->db->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']); - if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']); + } + } + } + if($app->db->dbHost != $app->dbmaster->dbHost){ + $backups = $app->dbmaster->queryAllRecords("SELECT * FROM web_backup WHERE server_id = ?", $conf['server_id']); + if(is_array($backups) && !empty($backups)){ + foreach($backups as $backup){ + $backup_file = $backup_dir.'/web'.$backup['parent_domain_id'].'/'.$backup['filename']; + if(!is_file($backup_file)){ + $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; + $app->dbmaster->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']); + } + } + } + } + + // garbage collection (non-existing databases) + if(is_array($web_array) && !empty($web_array)){ + foreach($web_array as $tmp_web_id){ + $tmp_backup_dir = $backup_dir.'/web'.$tmp_web_id; + if(is_dir($tmp_backup_dir)){ + $dir_handle = dir($tmp_backup_dir); + $files = array(); + while (false !== ($entry = $dir_handle->read())) { + if($entry != '.' && $entry != '..' && preg_match('/^db_(.*?)_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}\.sql.gz$/', $entry, $matches) && is_file($tmp_backup_dir.'/'.$entry)) { + + $tmp_db_name = $matches[1]; + $tmp_database = $app->db->queryOneRecord("SELECT * FROM web_database WHERE server_id = ? AND parent_domain_id = ? AND database_name = ?", $conf['server_id'], $tmp_web_id, $tmp_db_name); + + if(is_array($tmp_database) && !empty($tmp_database)){ + if($tmp_database['backup_interval'] == 'none' || intval($tmp_database['backup_copies']) == 0){ + @unlink($tmp_backup_dir.'/'.$entry); + $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; + $app->db->query($sql, $conf['server_id'], $tmp_web_id, $entry); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $tmp_web_id, $entry); + } + } else { + @unlink($tmp_backup_dir.'/'.$entry); + $sql = "DELETE FROM web_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?"; + $app->db->query($sql, $conf['server_id'], $tmp_web_id, $entry); + if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $tmp_web_id, $entry); + } + } + } + $dir_handle->close(); } } } -- GitLab From c41c8f73a8f48e3a1ca73e644338fdb60cf2b88c Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:27:11 +0200 Subject: [PATCH 213/287] - ported some patches --- install/tpl/debian_dovecot2.conf.master | 2 ++ interface/web/sites/templates/web_backup_list.htm | 4 ++-- server/plugins-available/backup_plugin.inc.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/install/tpl/debian_dovecot2.conf.master b/install/tpl/debian_dovecot2.conf.master index 8b21f6a40..802d6a837 100644 --- a/install/tpl/debian_dovecot2.conf.master +++ b/install/tpl/debian_dovecot2.conf.master @@ -8,6 +8,7 @@ postmaster_address = postmaster@example.com ssl_cert = {tmpl_var name="filesize"}
- + - +
-- GitLab From ce55e07a21a766418eb4b73f0787e8c7a002aa39 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:38:14 +0200 Subject: [PATCH 217/287] - css change --- interface/web/themes/default/assets/stylesheets/ispconfig.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/web/themes/default/assets/stylesheets/ispconfig.css b/interface/web/themes/default/assets/stylesheets/ispconfig.css index 40b87ac71..6d29d5eda 100644 --- a/interface/web/themes/default/assets/stylesheets/ispconfig.css +++ b/interface/web/themes/default/assets/stylesheets/ispconfig.css @@ -475,6 +475,7 @@ span.flag-ec {background-position:0 -1365px} span.flag-ee {background-position:0 -1387px} span.flag-eg {background-position:0 -1409px} span.flag-eh {background-position:0 -1431px} +/*span.flag-en {background-position:0 -1453px}*/ span.flag-er {background-position:0 -1475px} span.flag-es {background-position:0 -1497px} span.flag-et {background-position:0 -1519px} @@ -485,7 +486,7 @@ span.flag-fm {background-position:0 -1651px} span.flag-fo {background-position:0 -1673px} span.flag-fr {background-position:0 -1695px} span.flag-ga {background-position:0 -1717px} -span.flag-gb {background-position:0 -1739px} +span.flag-gb, span.flag-en {background-position:0 -1739px} span.flag-gd {background-position:0 -1761px} span.flag-ge {background-position:0 -1783px} span.flag-gf {background-position:0 -1805px} -- GitLab From 024e13295f3d4446805918452f2d907dda96e5ce Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:44:33 +0200 Subject: [PATCH 218/287] - ported some patches --- install/tpl/server.ini.master | 1 + .../web/admin/form/server_config.tform.php | 4 +- interface/web/sites/web_sites_stats.php | 16 +++--- interface/web/sites/web_vhost_domain_edit.php | 2 +- .../default/assets/javascripts/ispconfig.js | 6 ++- .../themes/default/templates/error.tpl.htm | 2 +- .../default/templates/tabbed_form.tpl.htm | 2 +- .../classes/cron.d/100-mailbox_stats.inc.php | 53 +++++++++++++++++-- 8 files changed, 67 insertions(+), 19 deletions(-) diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index 20dca2d42..4cb2222d7 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -77,6 +77,7 @@ 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 htaccess_allow_override=All +enable_spdy=y awstats_conf_dir=/etc/awstats awstats_data_dir=/var/lib/awstats awstats_pl=/usr/lib/cgi-bin/awstats.pl diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index 351d4de86..53c184f51 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -321,7 +321,7 @@ $form["tabs"]['mail'] = array( 'datatype' => 'INTEGER', 'formtype' => 'SELECT', 'default' => '2048', - 'value' => array('1024' => 'week (1024)', '2048' => 'normal (2048)', '4096' => 'strong (4096)') + 'value' => array('1024' => 'weak (1024)', '2048' => 'normal (2048)', '4096' => 'strong (4096)') ), 'relayhost_password' => array( 'datatype' => 'VARCHAR', @@ -1024,7 +1024,7 @@ $form["tabs"]['web'] = array( 'enable_spdy' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', - 'default' => 'n', + 'default' => 'y', 'value' => array ( 0 => 'n', 1 => 'y' diff --git a/interface/web/sites/web_sites_stats.php b/interface/web/sites/web_sites_stats.php index a6af3dc8a..16c40d43e 100644 --- a/interface/web/sites/web_sites_stats.php +++ b/interface/web/sites/web_sites_stats.php @@ -42,26 +42,26 @@ class list_action extends listform_actions { $tmp_month = date('m'); $tmp_rec = $app->db->queryOneRecord("SELECT SUM(traffic_bytes) as t FROM web_traffic WHERE hostname = ? AND YEAR(traffic_date) = ? AND MONTH(traffic_date) = ?", $rec['domain'], $tmp_year, $tmp_month); $rec['this_month'] = $app->functions->formatBytes($tmp_rec['t']); - $this->sum_this_month += $app->functions->formatBytes($tmp_rec['t']); + $this->sum_this_month += $tmp_rec['t']; //** Traffic of the current year $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = ? AND YEAR(traffic_date) = ?", $rec['domain'], $tmp_year); $rec['this_year'] = $app->functions->formatBytes($tmp_rec['t']); - $this->sum_this_year += $app->functions->formatBytes($tmp_rec['t']); + $this->sum_this_year += $tmp_rec['t']; //** Traffic of the 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"))); $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = ? AND YEAR(traffic_date) = ? AND MONTH(traffic_date) = ?", $rec['domain'], $tmp_year, $tmp_month); $rec['last_month'] = $app->functions->formatBytes($tmp_rec['t']); - $this->sum_last_month += $app->functions->formatBytes($tmp_rec['t']); + $this->sum_last_month += $tmp_rec['t']; //** Traffic of the last year $tmp_year = date('Y', mktime(0, 0, 0, date("m"), date("d"), date("Y")-1)); $tmp_rec = $app->db->queryOneRecord("SELECT sum(traffic_bytes) as t FROM web_traffic WHERE hostname = ? AND YEAR(traffic_date) = ?", $rec['domain'], $tmp_year); $rec['last_year'] = $app->functions->formatBytes($tmp_rec['t']); - $this->sum_last_year += $app->functions->formatBytes($tmp_rec['t']); + $this->sum_last_year += $tmp_rec['t']; //* The variable "id" contains always the index variable $rec['id'] = $rec[$this->idx_key]; @@ -73,10 +73,10 @@ class list_action extends listform_actions { { global $app; - $app->tpl->setVar('sum_this_month', number_format($app->functions->intval($this->sum_this_month), 0, '.', ' ')); - $app->tpl->setVar('sum_this_year', number_format($app->functions->intval($this->sum_this_year), 0, '.', ' ')); - $app->tpl->setVar('sum_last_month', number_format($app->functions->intval($this->sum_last_month), 0, '.', ' ')); - $app->tpl->setVar('sum_last_year', number_format($app->functions->intval($this->sum_last_year), 0, '.', ' ')); + $app->tpl->setVar('sum_this_month', $app->functions->formatBytes($this->sum_this_month)); + $app->tpl->setVar('sum_this_year', $app->functions->formatBytes($this->sum_this_year)); + $app->tpl->setVar('sum_last_month', $app->functions->formatBytes($this->sum_last_month)); + $app->tpl->setVar('sum_last_year', $app->functions->formatBytes($this->sum_last_year)); $app->tpl->setVar('sum_txt', $app->listform->lng('sum_txt')); $app->tpl_defaults(); diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 5508440ed..af96fd8f7 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -635,7 +635,7 @@ class page_action extends tform_actions { if(is_array($ssl_domains)) { foreach( $ssl_domains as $ssl_domain) { $selected = ($ssl_domain == $this->dataRecord['ssl_domain'])?'SELECTED':''; - $ssl_domain_select .= "\r\n"; + $ssl_domain_select .= "\r\n"; } } $app->tpl->setVar("ssl_domain", $ssl_domain_select); diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.js b/interface/web/themes/default/assets/javascripts/ispconfig.js index bc5c988a3..0416e4043 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.js @@ -635,7 +635,11 @@ $(document).on('click', 'th[data-column]', function(e) { var dir = $self.attr('data-ordered'); - act = act + '?orderby=' + column; + var separator = '?'; + if(act.indexOf("?") >= 0){ + separator = '&'; + } + act = act + separator + 'orderby=' + column; ISPConfig.submitForm(form, act); $(document).ajaxComplete(function() { diff --git a/interface/web/themes/default/templates/error.tpl.htm b/interface/web/themes/default/templates/error.tpl.htm index f65df61bb..f0c10811c 100644 --- a/interface/web/themes/default/templates/error.tpl.htm +++ b/interface/web/themes/default/templates/error.tpl.htm @@ -1,5 +1,5 @@
-
ERROR
+
  1. ###ERRORMSG###
  2. diff --git a/interface/web/themes/default/templates/tabbed_form.tpl.htm b/interface/web/themes/default/templates/tabbed_form.tpl.htm index d0a268435..5560f3e12 100644 --- a/interface/web/themes/default/templates/tabbed_form.tpl.htm +++ b/interface/web/themes/default/templates/tabbed_form.tpl.htm @@ -10,7 +10,7 @@
    -
    ERROR
    +
    TODO: IP address is empty.
    diff --git a/server/lib/classes/cron.d/100-mailbox_stats.inc.php b/server/lib/classes/cron.d/100-mailbox_stats.inc.php index 259535ffd..9778b2fc5 100644 --- a/server/lib/classes/cron.d/100-mailbox_stats.inc.php +++ b/server/lib/classes/cron.d/100-mailbox_stats.inc.php @@ -32,6 +32,9 @@ class cronjob_mailbox_stats extends cronjob { // job schedule protected $_schedule = '0 0 * * *'; + protected $mailbox_traffic = array(); + protected $mail_boxes = array(); + protected $mail_rewrites = array(); /* this function is optional if it contains no custom code */ public function onPrepare() { @@ -164,7 +167,7 @@ class cronjob_mailbox_stats extends cronjob { $cur_line = false; if(file_exists($state_file)) { - $prev_line = parse_mail_log_line(trim(file_get_contents($state_file))); + $prev_line = $this->parse_mail_log_line(trim(file_get_contents($state_file))); //if($prev_line) echo "continuing from previous run, log position: " . $prev_line['message-id'] . " at " . strftime('%d.%m.%Y %H:%M:%S', $prev_line['timestamp']) . "\n"; } @@ -175,7 +178,8 @@ class cronjob_mailbox_stats extends cronjob { while($line = fgets($fp, 8192)) { $l++; //if($l % 1000 == 0) echo "\rline $l"; - $cur_line = parse_mail_log_line($line); + $cur_line = $this->parse_mail_log_line($line); + //print_r($cur_line); if(!$cur_line) continue; if($prev_line) { @@ -190,9 +194,13 @@ class cronjob_mailbox_stats extends cronjob { } } - add_mailbox_traffic($mailbox_traffic, $cur_line['from'], $cur_line['size']); + $this->add_mailbox_traffic($cur_line['from'], $cur_line['size']); + //echo "1\n"; + //print_r($this->mailbox_traffic); foreach($cur_line['to'] as $to) { - add_mailbox_traffic($mailbox_traffic, $to, $cur_line['size']); + $this->add_mailbox_traffic($to, $cur_line['size']); + //echo "2\n"; + //print_r($this->mailbox_traffic); } $last_line = $line; // store for the state file } @@ -207,7 +215,7 @@ class cronjob_mailbox_stats extends cronjob { while($line = fgets($fp, 8192)) { $l++; //if($l % 1000 == 0) echo "\rline $l"; - $cur_line = parse_mail_log_line($line); + $cur_line = $this->parse_mail_log_line($line); if(!$cur_line) continue; if($prev_line) { @@ -265,6 +273,41 @@ class cronjob_mailbox_stats extends cronjob { parent::onAfterRun(); } + + private function parse_mail_log_line($line) { + //Oct 31 17:35:48 mx01 amavis[32014]: (32014-05) Passed CLEAN, [IPv6:xxxxx] [IPv6:xxxxx] -> , Message-ID: , mail_id: xxxxxx, Hits: -1.89, size: 1591, queued_as: xxxxxxx, 946 ms + + if(preg_match('/^(\w+\s+\d+\s+\d+:\d+:\d+)\s+[^ ]+\s+amavis.* <([^>]+)>\s+->\s+((<[^>]+>,)+) .*Message-ID:\s+<([^>]+)>.* size:\s+(\d+),.*$/', $line, $matches) == false) return false; + + $timestamp = strtotime($matches[1]); + if(!$timestamp) return false; + + $to = array(); + $recipients = explode(',', $matches[3]); + foreach($recipients as $recipient) { + $recipient = substr($recipient, 1, -1); + if(!$recipient || $recipient == $matches[2]) continue; + $to[] = $recipient; + } + return array('line' => $line, 'timestamp' => $timestamp, 'size' => $matches[6], 'from' => $matches[2], 'to' => $to, 'message-id' => $matches[5]); + } + + private function add_mailbox_traffic($address, $traffic) { + + $address = strtolower($address); + + if(in_array($address, $this->mail_boxes) == true) { + if(!isset($this->mailbox_traffic[$address])) $this->mailbox_traffic[$address] = 0; + $this->mailbox_traffic[$address] += $traffic; + } elseif(array_key_exists($address, $this->mail_rewrites)) { + foreach($this->mail_rewrites[$address] as $address) { + if(!isset($this->mailbox_traffic[$address])) $this->mailbox_traffic[$address] = 0; + $this->mailbox_traffic[$address] += $traffic; + } + } else { + // this is not a local address - skip it + } + } } -- GitLab From d5f2d5f5504572a9c62aadbfc6f780bb08e1e156 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:45:45 +0200 Subject: [PATCH 219/287] - ported some patches --- install/install.php | 2 ++ install/lib/installer_base.lib.php | 26 ++++++++++++++ install/tpl/server.ini.master | 2 +- install/update.php | 2 ++ interface/lib/classes/tools_monitor.inc.php | 5 ++- .../web/admin/form/server_config.tform.php | 2 +- .../sites/templates/web_vhost_domain_edit.htm | 11 ++++-- interface/web/sites/web_vhost_domain_edit.php | 4 +++ .../default/assets/javascripts/ispconfig.js | 5 ++- .../default/assets/stylesheets/select2.css | 2 +- server/conf/hhvm_starter.master | 22 +++++++++--- .../plugins-available/apache2_plugin.inc.php | 33 ++++++++++++++++- server/plugins-available/nginx_plugin.inc.php | 35 +++++++++++++++++-- 13 files changed, 135 insertions(+), 16 deletions(-) diff --git a/install/install.php b/install/install.php index 3aedfefa8..90cdf6216 100644 --- a/install/install.php +++ b/install/install.php @@ -713,6 +713,8 @@ if($install_mode == 'standard') { } //* << $install_mode / 'Standard' or Genius +$inst->create_mount_script(); + //* Create md5 filelist $md5_filename = '/usr/local/ispconfig/security/data/file_checksums_'.date('Y-m-d_h-i').'.md5'; exec('find /usr/local/ispconfig -type f -print0 | xargs -0 md5sum > '.$md5_filename); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index a59945584..d4772aea2 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -2442,6 +2442,32 @@ Email Address []: } + public function create_mount_script(){ + global $app, $conf; + $mount_script = '/usr/local/ispconfig/server/scripts/backup_dir_mount.sh'; + $mount_command = ''; + + if(is_file($mount_script)) return; + if(is_file('/etc/rc.local')){ + $rc_local = file('/etc/rc.local'); + if(is_array($rc_local) && !empty($rc_local)){ + foreach($rc_local as $line){ + $line = trim($line); + if(substr($line, 0, 1) == '#') continue; + if(strpos($line, 'sshfs') !== false && strpos($line, '/var/backup') !== false){ + $mount_command = "#!/bin/sh\n\n"; + $mount_command .= $line."\n\n"; + file_put_contents($mount_script, $mount_command); + chmod($mount_script, 0755); + chown($mount_script, 'root'); + chgrp($mount_script, 'root'); + break; + } + } + } + } + } + // This function is called at the end of the update process and contains code to clean up parts of old ISPCONfig releases public function cleanup_ispconfig() { global $app,$conf; diff --git a/install/tpl/server.ini.master b/install/tpl/server.ini.master index 4cb2222d7..4259222c8 100644 --- a/install/tpl/server.ini.master +++ b/install/tpl/server.ini.master @@ -16,7 +16,7 @@ firewall=bastille loglevel=2 admin_notify_events=1 backup_dir=/var/backup -backup_dir_is_mount=n +backup_dir_is_mount=y backup_mode=rootgz backup_delete=y monit_url= diff --git a/install/update.php b/install/update.php index aa42c24b0..e0a6bd228 100644 --- a/install/update.php +++ b/install/update.php @@ -516,6 +516,8 @@ if($reconfigure_services_answer == 'yes') { //* Set default servers setDefaultServers(); +$inst->create_mount_script(); + //* Create md5 filelist $md5_filename = '/usr/local/ispconfig/security/data/file_checksums_'.date('Y-m-d_h-i').'.md5'; exec('find /usr/local/ispconfig -type f -print0 | xargs -0 md5sum > '.$md5_filename); diff --git a/interface/lib/classes/tools_monitor.inc.php b/interface/lib/classes/tools_monitor.inc.php index ad76e4eff..bd1a969d5 100644 --- a/interface/lib/classes/tools_monitor.inc.php +++ b/interface/lib/classes/tools_monitor.inc.php @@ -488,7 +488,7 @@ class tools_monitor { $data = unserialize($record['data']); if ($data == '') { $html .= '

    '. - 'fail2ban is not installed at this server.
    ' . + 'fail2ban is not installed on this server.
    ' . 'See more (for debian) here...'. '

    '; } @@ -522,8 +522,7 @@ class tools_monitor { $data = unserialize($record['data']); if ($data == '') { $html .= '

    '. - 'MongoDB is not installed at this server.
    ' . - 'See more (for debian) here...'. + 'MongoDB is not installed on this server.
    ' . '

    '; } else { diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index 53c184f51..c3f940ea6 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -182,7 +182,7 @@ $form["tabs"]['server'] = array( 'backup_dir_is_mount' => array( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', - 'default' => 'n', + 'default' => 'y', 'value' => array(0 => 'n', 1 => 'y') ), 'backup_mode' => array( diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm index e0a827621..fa5372705 100644 --- a/interface/web/sites/templates/web_vhost_domain_edit.htm +++ b/interface/web/sites/templates/web_vhost_domain_edit.htm @@ -333,9 +333,16 @@ } function reloadWebIP() { - ISPConfig.loadOptionInto('ip_address','sites/ajax_get_ip.php?ip_type=IPv4&server_id='+serverId+'&client_group_id='+clientGroupId); - ISPConfig.loadOptionInto('ipv6_address','sites/ajax_get_ip.php?ip_type=IPv6&server_id='+serverId+'&client_group_id='+clientGroupId); + ISPConfig.loadOptionInto('ip_address','sites/ajax_get_ip.php?ip_type=IPv4&server_id='+serverId+'&client_group_id='+clientGroupId, rerenderSelect2); + ISPConfig.loadOptionInto('ipv6_address','sites/ajax_get_ip.php?ip_type=IPv6&server_id='+serverId+'&client_group_id='+clientGroupId, rerenderSelect2); + + //$('#ip_address').add('#ipv6_address').select2(); + } + + function rerenderSelect2(elem) { + $('#'+elem).select2(); + } function reloadFastcgiPHPVersions(noFormChange) { jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, php_type : jQuery('#php').val(), type : "getphpfastcgi", client_group_id : clientGroupId}, function(data) { diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index af96fd8f7..5997804c8 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -719,6 +719,10 @@ class page_action extends tform_actions { if(is_array($tmp_client) && !empty($tmp_client) && trim($this->dataRecord['ssl_organisation']) == '' && trim($this->dataRecord['ssl_locality']) == '' && trim($this->dataRecord['ssl_state']) == '' && trim($this->dataRecord['ssl_organisation_unit']) == '') $app->tpl->setVar("show_helper_links", true); } + $sys_config = $app->getconf->get_global_config('misc'); + if($sys_config['use_combobox'] == 'y') { + $app->tpl->setVar('use_combobox', 'y'); + } parent::onShowEnd(); } diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.js b/interface/web/themes/default/assets/javascripts/ispconfig.js index 0416e4043..b68af577e 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.js @@ -464,7 +464,7 @@ var ISPConfig = { }); }, - loadOptionInto: function(elementid,pagename) { + loadOptionInto: function(elementid,pagename,callback) { var pageContentObject2 = $.ajax({ type: "GET", url: pagename, @@ -482,6 +482,9 @@ var ISPConfig = { foo2.value=elemente[i]; el.appendChild(foo2); } + if (typeof(callback) != 'undefined') { + callback(elementid,pagename); + } }, error: function() { ISPConfig.reportError('Ajax Request was not successful. 119'); diff --git a/interface/web/themes/default/assets/stylesheets/select2.css b/interface/web/themes/default/assets/stylesheets/select2.css index 2d07a0343..afa4e3fc0 100644 --- a/interface/web/themes/default/assets/stylesheets/select2.css +++ b/interface/web/themes/default/assets/stylesheets/select2.css @@ -442,7 +442,7 @@ disabled look for disabled choices in the results dropdown } .select2-results .select2-disabled { background: #f4f4f4; - display: list-item; + display: none; cursor: default; } diff --git a/server/conf/hhvm_starter.master b/server/conf/hhvm_starter.master index ee0bbec28..a4cac4642 100644 --- a/server/conf/hhvm_starter.master +++ b/server/conf/hhvm_starter.master @@ -37,15 +37,29 @@ do_start() umask 017 sudo -u {SYSTEM_USER} touch /var/run/hhvm/hhvm_{SYSTEM_USER}.pid + + BASEINIFILE="" + if [[ -e "/etc/hhvm/php.ini" ]] ; then + BASEINIFILE="--config /etc/hhvm/php.ini" ; + fi + INIFILE="" if [[ -e "/var/www/conf/{SYSTEM_USER}/php.ini" ]] ; then - INIFILE="-vServer.IniFile=/var/www/conf/{SYSTEM_USER}/php.ini" ; + INIFILE="--config /var/www/conf/{SYSTEM_USER}/php.ini" ; elif [[ -e "/etc/php5/hhvm/php.ini" ]] ; then - INIFILE="-vServer.IniFile=/etc/php5/hhvm/php.ini" ; + INIFILE="--config /etc/php5/hhvm/php.ini" ; + elif [[ -e "/etc/php5/fpm/php.ini" ]] ; then + INIFILE="--config /etc/php5/fpm/php.ini" ; elif [[ -e "/etc/php5/cgi/php.ini" ]] ; then - INIFILE="-vServer.IniFile=/etc/php5/cgi/php.ini" ; + INIFILE="--config /etc/php5/cgi/php.ini" ; fi - /usr/bin/hhvm --mode daemon -vServer.Type=fastcgi --user {SYSTEM_USER} -vServer.FileSocket=/var/run/hhvm/hhvm.{SYSTEM_USER}.sock -vLog.Level=Warning -vLog.UseLogFile=false -vRepo.Central.Path=/var/run/hhvm/hhvm.{SYSTEM_USER}.hhbc -vServer.FixPathInfo=false $INIFILE -vPidFile=/var/run/hhvm/hhvm_{SYSTEM_USER}.pid & echo $! > /var/run/hhvm/hhvm_{SYSTEM_USER}.pid + + CUSTOMINIFILE="" + if [[ -e "/etc/hhvm/{SYSTEM_USER}.ini" ]] ; then + CUSTOMINIFILE="--config /etc/hhvm/{SYSTEM_USER}.ini" ; + fi + + /usr/bin/hhvm --mode daemon -vServer.Type=fastcgi --user {SYSTEM_USER} -vServer.FileSocket=/var/run/hhvm/hhvm.{SYSTEM_USER}.sock -vLog.Level=Warning -vLog.UseLogFile=false -vRepo.Central.Path=/var/run/hhvm/hhvm.{SYSTEM_USER}.hhbc -vServer.FixPathInfo=false $BASEINIFILE $INIFILE $CUSTOMINIFILE -vPidFile=/var/run/hhvm/hhvm_{SYSTEM_USER}.pid & echo $! > /var/run/hhvm/hhvm_{SYSTEM_USER}.pid } do_stop() diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 43b06f3dc..34442c665 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -2800,7 +2800,37 @@ class apache2_plugin { $content = file_get_contents($conf['rootpath'] . '/conf/hhvm_starter.master'); } - if($data['new']['php'] == 'hhvm' && $data['old']['php'] != 'hhvm') { + if($data['new']['php'] == 'hhvm' && $data['old']['php'] != 'hhvm' || $data['new']['custom_php_ini'] != $data['old']['custom_php_ini']) { + + // Custom php.ini settings + $custom_php_ini_settings = trim($data['new']['custom_php_ini']); + if(intval($data['new']['directive_snippets_id']) > 0){ + $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'nginx' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); + if(isset($snippet['required_php_snippets']) && trim($snippet['required_php_snippets']) != ''){ + $required_php_snippets = explode(',', trim($snippet['required_php_snippets'])); + if(is_array($required_php_snippets) && !empty($required_php_snippets)){ + foreach($required_php_snippets as $required_php_snippet){ + $required_php_snippet = intval($required_php_snippet); + if($required_php_snippet > 0){ + $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); + $php_snippet['snippet'] = trim($php_snippet['snippet']); + if($php_snippet['snippet'] != ''){ + $custom_php_ini_settings .= "\n".$php_snippet['snippet']; + } + } + } + } + } + } + if($custom_php_ini_settings != ''){ + // Make sure we only have Unix linebreaks + $custom_php_ini_settings = str_replace("\r\n", "\n", $custom_php_ini_settings); + $custom_php_ini_settings = str_replace("\r", "\n", $custom_php_ini_settings); + file_put_contents('/etc/hhvm/'.$data['new']['system_user'].'.ini', $custom_php_ini_settings); + } else { + if(is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini'); + } + $content = str_replace('{SYSTEM_USER}', $data['new']['system_user'], $content); file_put_contents('/etc/init.d/hhvm_' . $data['new']['system_user'], $content); exec('chmod +x /etc/init.d/hhvm_' . $data['new']['system_user'] . ' >/dev/null 2>&1'); @@ -2810,6 +2840,7 @@ class apache2_plugin { exec('/etc/init.d/hhvm_' . $data['old']['system_user'] . ' stop >/dev/null 2>&1'); exec('/usr/sbin/update-rc.d hhvm_' . $data['old']['system_user'] . ' remove >/dev/null 2>&1'); unlink('/etc/init.d/hhvm_' . $data['old']['system_user']); + if(is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini'); } } diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 4ff3c8c48..8f8c62b23 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -2356,16 +2356,47 @@ class nginx_plugin { $content = file_get_contents($conf['rootpath'] . '/conf/hhvm_starter.master'); } - if($data['new']['php'] == 'hhvm' && $data['old']['php'] != 'hhvm') { + if($data['new']['php'] == 'hhvm' && $data['old']['php'] != 'hhvm' || $data['new']['custom_php_ini'] != $data['old']['custom_php_ini']) { + + // Custom php.ini settings + $custom_php_ini_settings = trim($data['new']['custom_php_ini']); + if(intval($data['new']['directive_snippets_id']) > 0){ + $snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'nginx' AND active = 'y' AND customer_viewable = 'y'", intval($data['new']['directive_snippets_id'])); + if(isset($snippet['required_php_snippets']) && trim($snippet['required_php_snippets']) != ''){ + $required_php_snippets = explode(',', trim($snippet['required_php_snippets'])); + if(is_array($required_php_snippets) && !empty($required_php_snippets)){ + foreach($required_php_snippets as $required_php_snippet){ + $required_php_snippet = intval($required_php_snippet); + if($required_php_snippet > 0){ + $php_snippet = $app->db->queryOneRecord("SELECT * FROM directive_snippets WHERE directive_snippets_id = ? AND type = 'php' AND active = 'y'", $required_php_snippet); + $php_snippet['snippet'] = trim($php_snippet['snippet']); + if($php_snippet['snippet'] != ''){ + $custom_php_ini_settings .= "\n".$php_snippet['snippet']; + } + } + } + } + } + } + if($custom_php_ini_settings != ''){ + // Make sure we only have Unix linebreaks + $custom_php_ini_settings = str_replace("\r\n", "\n", $custom_php_ini_settings); + $custom_php_ini_settings = str_replace("\r", "\n", $custom_php_ini_settings); + file_put_contents('/etc/hhvm/'.$data['new']['system_user'].'.ini', $custom_php_ini_settings); + } else { + if(is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini'); + } + $content = str_replace('{SYSTEM_USER}', $data['new']['system_user'], $content); file_put_contents('/etc/init.d/hhvm_' . $data['new']['system_user'], $content); exec('chmod +x /etc/init.d/hhvm_' . $data['new']['system_user'] . ' >/dev/null 2>&1'); exec('/usr/sbin/update-rc.d hhvm_' . $data['new']['system_user'] . ' defaults >/dev/null 2>&1'); - exec('/etc/init.d/hhvm_' . $data['new']['system_user'] . ' start >/dev/null 2>&1'); + exec('/etc/init.d/hhvm_' . $data['new']['system_user'] . ' restart >/dev/null 2>&1'); } elseif($data['new']['php'] != 'hhvm' && $data['old']['php'] == 'hhvm') { exec('/etc/init.d/hhvm_' . $data['old']['system_user'] . ' stop >/dev/null 2>&1'); exec('/usr/sbin/update-rc.d hhvm_' . $data['old']['system_user'] . ' remove >/dev/null 2>&1'); unlink('/etc/init.d/hhvm_' . $data['old']['system_user']); + if(is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini'); } } -- GitLab From f3bd6054b053ba2865a5eb7ee9a988b37becb15f Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:47:30 +0200 Subject: [PATCH 220/287] - ported some patches --- interface/web/sites/templates/web_vhost_domain_ssl.htm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/web/sites/templates/web_vhost_domain_ssl.htm b/interface/web/sites/templates/web_vhost_domain_ssl.htm index 167af9ecf..ad9629fe4 100644 --- a/interface/web/sites/templates/web_vhost_domain_ssl.htm +++ b/interface/web/sites/templates/web_vhost_domain_ssl.htm @@ -91,7 +91,7 @@ $('#reset_data').click(function(){ $('#ssl_organisation').add('#ssl_locality').add('#ssl_state').add('#ssl_organisation_unit').val(''); - $('#ssl_country').val($("#ssl_country option:first").val()); + $('#ssl_country').val($("#ssl_country option:first").val()).trigger('change'); }); $('#load_data').click(function(){ loadClientData(); @@ -104,7 +104,7 @@ jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {'web_id': web_id, 'type': "getclientssldata"}, function(data) { $('#ssl_organisation').val(data['company_name']); $('#ssl_locality').val(data['city']); - $('#ssl_country').val(data['country']); + $('#ssl_country').val(data['country']).trigger('change'); $('#ssl_state').val(data['state']); $('#ssl_organisation_unit').val('IT'); }); -- GitLab From 52e515877f632150913012fcf50a2995953eff31 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:48:12 +0200 Subject: [PATCH 221/287] - ported patches --- install/tpl/debian6_dovecot2.conf.master | 4 +++- install/tpl/debian_dovecot2.conf.master | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/install/tpl/debian6_dovecot2.conf.master b/install/tpl/debian6_dovecot2.conf.master index 8da19d195..e71fefcc5 100644 --- a/install/tpl/debian6_dovecot2.conf.master +++ b/install/tpl/debian6_dovecot2.conf.master @@ -7,6 +7,7 @@ mail_privileged_group = vmail ssl_cert = Date: Wed, 15 Apr 2015 15:50:32 +0200 Subject: [PATCH 222/287] - ported patches --- server/conf/hhvm_monit.master | 3 +++ server/plugins-available/apache2_plugin.inc.php | 15 +++++++++++++++ server/plugins-available/nginx_plugin.inc.php | 15 +++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 server/conf/hhvm_monit.master diff --git a/server/conf/hhvm_monit.master b/server/conf/hhvm_monit.master new file mode 100644 index 000000000..91642c535 --- /dev/null +++ b/server/conf/hhvm_monit.master @@ -0,0 +1,3 @@ +check process hhvm_{SYSTEM_USER} with pidfile /var/run/hhvm/hhvm_{SYSTEM_USER}.pid + start program = "/etc/init.d/hhvm_{SYSTEM_USER} restart" + stop program = "/etc/init.d/hhvm_{SYSTEM_USER} stop" \ No newline at end of file diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 34442c665..34a08e3ae 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -2799,6 +2799,11 @@ class apache2_plugin { } else { $content = file_get_contents($conf['rootpath'] . '/conf/hhvm_starter.master'); } + if(file_exists($conf['rootpath'] . '/conf-custom/hhvm_monit.master')) { + $monit_content = file_get_contents($conf['rootpath'] . '/conf-custom/hhvm_monit.master'); + } else { + $monit_content = file_get_contents($conf['rootpath'] . '/conf/hhvm_monit.master'); + } if($data['new']['php'] == 'hhvm' && $data['old']['php'] != 'hhvm' || $data['new']['custom_php_ini'] != $data['old']['custom_php_ini']) { @@ -2836,11 +2841,21 @@ class apache2_plugin { exec('chmod +x /etc/init.d/hhvm_' . $data['new']['system_user'] . ' >/dev/null 2>&1'); exec('/usr/sbin/update-rc.d hhvm_' . $data['new']['system_user'] . ' defaults >/dev/null 2>&1'); exec('/etc/init.d/hhvm_' . $data['new']['system_user'] . ' start >/dev/null 2>&1'); + + $monit_content = str_replace('{SYSTEM_USER}', $data['new']['system_user'], $monit_content); + file_put_contents('/etc/monit/conf.d/hhvm_' . $data['new']['system_user'], $monit_content); + exec('/etc/init.d/monit restart >/dev/null 2>&1'); + } elseif($data['new']['php'] != 'hhvm' && $data['old']['php'] == 'hhvm') { exec('/etc/init.d/hhvm_' . $data['old']['system_user'] . ' stop >/dev/null 2>&1'); exec('/usr/sbin/update-rc.d hhvm_' . $data['old']['system_user'] . ' remove >/dev/null 2>&1'); unlink('/etc/init.d/hhvm_' . $data['old']['system_user']); if(is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini'); + + if(is_file('/etc/monit/conf.d/hhvm_' . $data['new']['system_user'])){ + unlink('/etc/monit/conf.d/hhvm_' . $data['new']['system_user']); + exec('/etc/init.d/monit restart >/dev/null 2>&1'); + } } } diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 8f8c62b23..30e0eb0b7 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -2355,6 +2355,11 @@ class nginx_plugin { } else { $content = file_get_contents($conf['rootpath'] . '/conf/hhvm_starter.master'); } + if(file_exists($conf['rootpath'] . '/conf-custom/hhvm_monit.master')) { + $monit_content = file_get_contents($conf['rootpath'] . '/conf-custom/hhvm_monit.master'); + } else { + $monit_content = file_get_contents($conf['rootpath'] . '/conf/hhvm_monit.master'); + } if($data['new']['php'] == 'hhvm' && $data['old']['php'] != 'hhvm' || $data['new']['custom_php_ini'] != $data['old']['custom_php_ini']) { @@ -2392,11 +2397,21 @@ class nginx_plugin { exec('chmod +x /etc/init.d/hhvm_' . $data['new']['system_user'] . ' >/dev/null 2>&1'); exec('/usr/sbin/update-rc.d hhvm_' . $data['new']['system_user'] . ' defaults >/dev/null 2>&1'); exec('/etc/init.d/hhvm_' . $data['new']['system_user'] . ' restart >/dev/null 2>&1'); + + $monit_content = str_replace('{SYSTEM_USER}', $data['new']['system_user'], $monit_content); + file_put_contents('/etc/monit/conf.d/hhvm_' . $data['new']['system_user'], $monit_content); + exec('/etc/init.d/monit restart >/dev/null 2>&1'); + } elseif($data['new']['php'] != 'hhvm' && $data['old']['php'] == 'hhvm') { exec('/etc/init.d/hhvm_' . $data['old']['system_user'] . ' stop >/dev/null 2>&1'); exec('/usr/sbin/update-rc.d hhvm_' . $data['old']['system_user'] . ' remove >/dev/null 2>&1'); unlink('/etc/init.d/hhvm_' . $data['old']['system_user']); if(is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini'); + + if(is_file('/etc/monit/conf.d/hhvm_' . $data['new']['system_user'])){ + unlink('/etc/monit/conf.d/hhvm_' . $data['new']['system_user']); + exec('/etc/init.d/monit restart >/dev/null 2>&1'); + } } } -- GitLab From 0998a322e2704bfde459a34c39e92ebaa2dd638d Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:52:29 +0200 Subject: [PATCH 223/287] - ported some patches --- install/install.php | 14 +------------- interface/web/admin/templates/language_import.htm | 2 +- .../admin/templates/system_config_misc_edit.htm | 2 +- interface/web/client/templates/client_message.htm | 2 +- interface/web/dns/templates/dns_import.htm | 2 +- interface/web/dns/templates/dns_wizard.htm | 2 +- interface/web/login/logout.php | 4 +++- interface/web/login/templates/password_reset.htm | 2 +- .../web/mail/templates/mail_user_backup_list.htm | 2 +- interface/web/sites/templates/web_backup_list.htm | 2 +- interface/web/sites/web_vhost_domain_edit.php | 4 ++++ interface/web/tools/templates/dns_import_tupa.htm | 2 +- interface/web/tools/templates/import_ispconfig.htm | 2 +- interface/web/tools/templates/import_plesk.htm | 2 +- interface/web/tools/templates/import_vpopmail.htm | 2 +- interface/web/vm/templates/openvz_action.htm | 2 +- 16 files changed, 21 insertions(+), 27 deletions(-) diff --git a/install/install.php b/install/install.php index 90cdf6216..17ff544d1 100644 --- a/install/install.php +++ b/install/install.php @@ -627,19 +627,7 @@ if($install_mode == 'standard') { //* Configure Bastille Firewall $conf['services']['firewall'] = true; swriteln('Configuring Bastille Firewall'); - $inst->configure_firewall(); - /*} elseif($conf['ufw']['installed'] == true) { - //* Configure Ubuntu Firewall - $conf['services']['firewall'] = true; - swriteln('Configuring Ubuntu Firewall'); - $inst->configure_ufw_firewall(); - } else { - //* Configure Bastille Firewall - $conf['services']['firewall'] = true; - swriteln('Configuring Bastille Firewall'); - $inst->configure_bastille_firewall(); - } - */ + $inst->configure_bastille_firewall(); } //** Configure Firewall diff --git a/interface/web/admin/templates/language_import.htm b/interface/web/admin/templates/language_import.htm index 9b1c249bc..8bd653c13 100644 --- a/interface/web/admin/templates/language_import.htm +++ b/interface/web/admin/templates/language_import.htm @@ -23,7 +23,7 @@

    -

    ERROR

    +

    diff --git a/interface/web/admin/templates/system_config_misc_edit.htm b/interface/web/admin/templates/system_config_misc_edit.htm index 4674d4cdf..e8b6889de 100644 --- a/interface/web/admin/templates/system_config_misc_edit.htm +++ b/interface/web/admin/templates/system_config_misc_edit.htm @@ -109,7 +109,7 @@

    -

    ERROR

    +

    diff --git a/interface/web/client/templates/client_message.htm b/interface/web/client/templates/client_message.htm index 5808c89e6..e65846c74 100644 --- a/interface/web/client/templates/client_message.htm +++ b/interface/web/client/templates/client_message.htm @@ -9,7 +9,7 @@

    -

    ERROR

    +

    diff --git a/interface/web/dns/templates/dns_import.htm b/interface/web/dns/templates/dns_import.htm index b72ef920e..aa9346cad 100644 --- a/interface/web/dns/templates/dns_import.htm +++ b/interface/web/dns/templates/dns_import.htm @@ -49,7 +49,7 @@

    -

    ERROR

    +

    diff --git a/interface/web/dns/templates/dns_wizard.htm b/interface/web/dns/templates/dns_wizard.htm index fb2e81356..fc57fb99e 100644 --- a/interface/web/dns/templates/dns_wizard.htm +++ b/interface/web/dns/templates/dns_wizard.htm @@ -4,7 +4,7 @@

    -

    ERROR

    +

    diff --git a/interface/web/login/logout.php b/interface/web/login/logout.php index 8d947d40f..5092aeb02 100644 --- a/interface/web/login/logout.php +++ b/interface/web/login/logout.php @@ -43,9 +43,11 @@ if (isset($_GET['l']) && ($_GET['l']== 1)) $forceLogout = true; if ((isset($_SESSION['s_old']) && ($_SESSION['s_old']['user']['typ'] == 'admin' || $app->auth->has_clients($_SESSION['s_old']['user']['userid']))) && (!$forceLogout)){ $utype = ($_SESSION['s_old']['user']['typ'] == 'admin' ? 'admin' : 'reseller'); + $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_login_as.lng'; + include $lng_file; echo '



    - Do you want to re-login as ' . $utype . ' or log out?
    + '.str_replace('{UTYPE}', $utype, $wb['login_as_or_logout_txt']).'
    diff --git a/interface/web/login/templates/password_reset.htm b/interface/web/login/templates/password_reset.htm index eabb47271..66dc06a94 100644 --- a/interface/web/login/templates/password_reset.htm +++ b/interface/web/login/templates/password_reset.htm @@ -9,7 +9,7 @@

    -

    ERROR

    +

    diff --git a/interface/web/mail/templates/mail_user_backup_list.htm b/interface/web/mail/templates/mail_user_backup_list.htm index 87091b479..b8f29a87b 100644 --- a/interface/web/mail/templates/mail_user_backup_list.htm +++ b/interface/web/mail/templates/mail_user_backup_list.htm @@ -2,7 +2,7 @@

    -

    ERROR

    +

    diff --git a/interface/web/sites/templates/web_backup_list.htm b/interface/web/sites/templates/web_backup_list.htm index c0a1fc4e3..d933d64f3 100644 --- a/interface/web/sites/templates/web_backup_list.htm +++ b/interface/web/sites/templates/web_backup_list.htm @@ -2,7 +2,7 @@

    -

    ERROR

    +

    diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 5997804c8..6c3f4e9d7 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -693,6 +693,10 @@ class page_action extends tform_actions { $domain_select .= "\r\n"; } $app->tpl->setVar("domain_option", $domain_select); + } else { + + // remove the parent domain part of the domain name before we show it in the text field. + if($this->dataRecord["type"] == 'vhostsubdomain') $this->dataRecord["domain"] = str_replace('.'.$parent_domain["domain"], '', $this->dataRecord["domain"]); } if($this->_vhostdomain_type != 'domain') $app->tpl->setVar("domain", $this->dataRecord["domain"]); diff --git a/interface/web/tools/templates/dns_import_tupa.htm b/interface/web/tools/templates/dns_import_tupa.htm index d82978501..6aadf711e 100644 --- a/interface/web/tools/templates/dns_import_tupa.htm +++ b/interface/web/tools/templates/dns_import_tupa.htm @@ -25,7 +25,7 @@

    -

    ERROR

    +

    diff --git a/interface/web/tools/templates/import_ispconfig.htm b/interface/web/tools/templates/import_ispconfig.htm index a1a0bff62..83d79e671 100644 --- a/interface/web/tools/templates/import_ispconfig.htm +++ b/interface/web/tools/templates/import_ispconfig.htm @@ -70,7 +70,7 @@

    -

    ERROR

    +

    diff --git a/interface/web/tools/templates/import_plesk.htm b/interface/web/tools/templates/import_plesk.htm index 3efe2a1e6..645913abd 100644 --- a/interface/web/tools/templates/import_plesk.htm +++ b/interface/web/tools/templates/import_plesk.htm @@ -42,7 +42,7 @@

    -

    ERROR

    +

    diff --git a/interface/web/tools/templates/import_vpopmail.htm b/interface/web/tools/templates/import_vpopmail.htm index 761534053..749ce74a4 100644 --- a/interface/web/tools/templates/import_vpopmail.htm +++ b/interface/web/tools/templates/import_vpopmail.htm @@ -34,7 +34,7 @@

    -

    ERROR

    +

    diff --git a/interface/web/vm/templates/openvz_action.htm b/interface/web/vm/templates/openvz_action.htm index 840a8fd7d..2d95f9cb0 100644 --- a/interface/web/vm/templates/openvz_action.htm +++ b/interface/web/vm/templates/openvz_action.htm @@ -10,7 +10,7 @@

    -

    ERROR

    +

    -- GitLab From 8b49ff7a05157544abe8e4b8968943286b0f9383 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:53:48 +0200 Subject: [PATCH 224/287] - ported some patches --- interface/web/dashboard/ajax_get_json.php | 20 ++++++++++++-------- server/plugins-available/cron_plugin.inc.php | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/interface/web/dashboard/ajax_get_json.php b/interface/web/dashboard/ajax_get_json.php index 9ebb27e6c..30a668a77 100644 --- a/interface/web/dashboard/ajax_get_json.php +++ b/interface/web/dashboard/ajax_get_json.php @@ -55,19 +55,19 @@ if($type == 'globalsearch'){ $result[] = _search('client', 'reseller', "AND limit_client != 0"); // web sites - $result[] = _search('sites', 'web_domain', "AND type = 'vhost'"); + $result[] = _search('sites', 'web_vhost_domain', "AND type = 'vhost'"); // subdomains - $result[] = _search('sites', 'web_subdomain', "AND type = 'subdomain'"); + $result[] = _search('sites', 'web_childdomain', "AND type = 'subdomain'", 'type=subdomain'); // web site aliases - $result[] = _search('sites', 'web_aliasdomain', "AND type = 'alias'"); + $result[] = _search('sites', 'web_childdomain', "AND type = 'alias'", 'type=aliasdomain'); // vhostsubdomains - $result[] = _search('sites', 'web_vhost_subdomain', "AND type = 'vhostsubdomain'"); + $result[] = _search('sites', 'web_vhost_domain', "AND type = 'vhostsubdomain'", 'type=subdomain'); // vhostaliasdomains - $result[] = _search('sites', 'web_vhost_aliasdomain', "AND type = 'vhostalias'"); + $result[] = _search('sites', 'web_vhost_domain', "AND type = 'vhostalias'", 'type=aliasdomain'); // FTP users $result[] = _search('sites', 'ftp_user'); @@ -134,7 +134,7 @@ if($type == 'globalsearch'){ //} -function _search($module, $section, $additional_sql = ''){ +function _search($module, $section, $additional_sql = '', $params = ''){ global $app, $q, $authsql, $modules; $result_array = array('cheader' => array(), 'cdata' => array()); @@ -142,9 +142,13 @@ function _search($module, $section, $additional_sql = ''){ $search_fields = array(); $desc_fields = array(); if(is_file('../'.$module.'/form/'.$section.'.tform.php')){ - include_once '../'.$module.'/form/'.$section.'.tform.php'; + include '../'.$module.'/form/'.$section.'.tform.php'; $category_title = $form["title"]; + if($params == 'type=subdomain' && $section == 'web_childdomain') $category_title = 'Subdomain'; + if($params == 'type=aliasdomain' && $section == 'web_childdomain') $category_title = 'Aliasdomain'; + if($params == 'type=subdomain' && $section == 'web_vhost_domain') $category_title = 'Subdomain (Vhost)'; + if($params == 'type=aliasdomain' && $section == 'web_vhost_domain') $category_title = 'Aliasdomain (Vhost)'; $form_file = $form["action"]; $db_table = $form["db_table"]; $db_table_idx = $form["db_table_idx"]; @@ -205,7 +209,7 @@ function _search($module, $section, $additional_sql = ''){ $result_array['cdata'][] = array('title' => $wb[$title_key.'_txt'].': '.$result[$title_key], 'description' => $description, - 'onclick' => "ISPConfig.capp('".$module."','".$module."/".$form_file."?id=".$result[$db_table_idx]."');", + 'onclick' => "ISPConfig.capp('".$module."','".$module."/".$form_file.urlencode("?id=".$result[$db_table_idx]).($params != ''? urlencode('&'.$params) : '')."');", 'fill_text' => strtolower($result[$title_key]) ); } diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php index 307762d78..7d3c1383e 100644 --- a/server/plugins-available/cron_plugin.inc.php +++ b/server/plugins-available/cron_plugin.inc.php @@ -210,7 +210,7 @@ class cron_plugin { $log_root = ''; if($job['log'] == 'y') { if($job['type'] != 'chrooted') $log_root = $this->parent_domain['document_root']; - $log_root .= '/log'; + $log_root .= '/private'; $log_target = '>>' . $log_root . '/cron.log 2>>' . $log_root . '/cron_error.log'; $log_wget_target = $log_root . '/cron_wget.log'; -- GitLab From 15059193e4c7f82425d84a035537234072e378ec Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 15:56:04 +0200 Subject: [PATCH 225/287] - ported patch --- install/tpl/mysql-virtual_outgoing_bcc.cf.master | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 install/tpl/mysql-virtual_outgoing_bcc.cf.master diff --git a/install/tpl/mysql-virtual_outgoing_bcc.cf.master b/install/tpl/mysql-virtual_outgoing_bcc.cf.master new file mode 100644 index 000000000..6ca154f3b --- /dev/null +++ b/install/tpl/mysql-virtual_outgoing_bcc.cf.master @@ -0,0 +1,8 @@ +user = {mysql_server_ispconfig_user} +password = {mysql_server_ispconfig_password} +dbname = {mysql_server_database} +table = mail_user +select_field = sender_cc +where_field = email +additional_conditions = and postfix = 'y' and disabledeliver = 'n' and disablesmtp = 'n' +hosts = 127.0.0.1 \ No newline at end of file -- GitLab From ca2165e441005623b145a89837c95d8f1c6fedb0 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 15 Apr 2015 16:25:52 +0200 Subject: [PATCH 226/287] - fixed firewall part in installer --- install/dist/lib/fedora.lib.php | 2 +- install/dist/lib/opensuse.lib.php | 2 +- install/install.php | 16 +++++++++++----- install/lib/update.lib.php | 8 ++++---- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index 486bfea35..77bdf8536 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -791,7 +791,7 @@ class installer_dist extends installer_base { if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } - public function configure_firewall() + public function configure_bastille_firewall() { global $conf; diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index 0b955d835..133688298 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -865,7 +865,7 @@ class installer_dist extends installer_base { if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); } - public function configure_firewall() + public function configure_bastille_firewall() { global $conf; diff --git a/install/install.php b/install/install.php index 17ff544d1..9f7cca5b5 100644 --- a/install/install.php +++ b/install/install.php @@ -623,11 +623,17 @@ if($install_mode == 'standard') { //** Configure Firewall if(strtolower($inst->simple_query('Configure Firewall Server', array('y', 'n'), 'y','configure_firewall')) == 'y') { - //if($conf['bastille']['installed'] == true) { - //* Configure Bastille Firewall - $conf['services']['firewall'] = true; - swriteln('Configuring Bastille Firewall'); - $inst->configure_bastille_firewall(); + if($conf['ufw']['installed'] == true) { + //* Configure Ubuntu Firewall + $conf['services']['firewall'] = true; + swriteln('Configuring Ubuntu Firewall'); + $inst->configure_ufw_firewall(); + } else { + //* Configure Bastille Firewall + $conf['services']['firewall'] = true; + swriteln('Configuring Bastille Firewall'); + $inst->configure_bastille_firewall(); + } } //** Configure Firewall diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php index 11d29f1f4..1813a19a2 100644 --- a/install/lib/update.lib.php +++ b/install/lib/update.lib.php @@ -393,13 +393,13 @@ function setDefaultServers(){ if(is_array($clients) && !empty($clients)){ foreach($clients as $client){ // mailserver - if(trim($client['mail_servers']) == '') $inst->db->query("UPDATE ".$conf["mysql"]["database"].".client SET mail_servers = '".trim($client['default_mailserver'])."' WHERE client_id = ".$client['client_id']); + if(trim($client['mail_servers']) == '') $inst->db->query("UPDATE ?? SET mail_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_mailserver']), $client['client_id']); // webserver - if(trim($client['web_servers']) == '') $inst->db->query("UPDATE ".$conf["mysql"]["database"].".client SET web_servers = '".trim($client['default_webserver'])."' WHERE client_id = ".$client['client_id']); + if(trim($client['web_servers']) == '') $inst->db->query("UPDATE ?? SET web_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_webserver']), $client['client_id']); // dns server - if(trim($client['dns_servers']) == '') $inst->db->query("UPDATE ".$conf["mysql"]["database"].".client SET dns_servers = '".trim($client['default_dnsserver'])."' WHERE client_id = ".$client['client_id']); + if(trim($client['dns_servers']) == '') $inst->db->query("UPDATE ?? SET dns_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_dnsserver']), $client['client_id']); // db server - if(trim($client['db_servers']) == '') $inst->db->query("UPDATE ".$conf["mysql"]["database"].".client SET db_servers = '".trim($client['default_dbserver'])."' WHERE client_id = ".$client['client_id']); + if(trim($client['db_servers']) == '') $inst->db->query("UPDATE ?? SET db_servers = ? WHERE client_id = ?", $conf["mysql"]["database"].".client", trim($client['default_dbserver']), $client['client_id']); } } -- GitLab From badfbefd2360205042cf15e5c85fa92eda5c5314 Mon Sep 17 00:00:00 2001 From: Dominik Date: Wed, 15 Apr 2015 17:35:31 +0200 Subject: [PATCH 227/287] corrected sql query --- install/dist/lib/gentoo.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index 18527ad16..d23f777d3 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -81,7 +81,7 @@ class installer extends installer_base } //* These postconf commands will be executed on installation and update - $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM ?.`server` WHERE server_id = ?", $conf["mysql"]["database"], $conf['server_id']); + $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM ?? WHERE server_id = ?", $conf["mysql"]["database"].'.server', $conf['server_id']); $server_ini_array = ini_to_array(stripslashes($server_ini_rec['config'])); unset($server_ini_rec); -- GitLab From 40c6e8fd1822039f57b775488aaf7de58e490adb Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 16 Apr 2015 08:32:31 +0200 Subject: [PATCH 228/287] - fix for installer mysql lib --- install/lib/mysql.lib.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/install/lib/mysql.lib.php b/install/lib/mysql.lib.php index 1825eb3e3..f4f6734e6 100644 --- a/install/lib/mysql.lib.php +++ b/install/lib/mysql.lib.php @@ -71,7 +71,15 @@ class db extends mysqli $this->dbCharset = $conf["mysql"]["charset"]; $this->dbNewLink = false; $this->dbClientFlags = null; + } + public function __destruct() { + if($this->_iConnId) mysqli_close($this->_iConnId); + } + + private function connect() { + if($this->_iConnId) return true; + $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); $try = 0; while((!is_object($this->_iConnId) || mysqli_connect_error()) && $try < 5) { @@ -94,11 +102,7 @@ class db extends mysqli $this->_setCharset(); } - - public function __destruct() { - if($this->_iConnId) mysqli_close($this->_iConnId); - } - + public function close() { if($this->_iConnId) mysqli_close($this->_iConnId); $this->_iConnId = null; @@ -176,6 +180,8 @@ class db extends mysqli private function _query($sQuery = '') { global $app; + $this->connect(); + //if($this->isConnected == false) return false; if ($sQuery == '') { $this->_sqlerror('Keine Anfrage angegeben / No query given'); -- GitLab From d7ad8f37a67851225d6f48a7fe73d7e47bec59a3 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 16 Apr 2015 08:50:16 +0200 Subject: [PATCH 229/287] - fixed mysql lib again --- install/lib/mysql.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/lib/mysql.lib.php b/install/lib/mysql.lib.php index f4f6734e6..e151bc417 100644 --- a/install/lib/mysql.lib.php +++ b/install/lib/mysql.lib.php @@ -77,7 +77,7 @@ class db extends mysqli if($this->_iConnId) mysqli_close($this->_iConnId); } - private function connect() { + private function do_connect() { if($this->_iConnId) return true; $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); @@ -180,7 +180,7 @@ class db extends mysqli private function _query($sQuery = '') { global $app; - $this->connect(); + $this->do_connect(); //if($this->isConnected == false) return false; if ($sQuery == '') { -- GitLab From 5eafbcd5cfa99b624af7534fce798cbac29c3fbb Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 16 Apr 2015 08:53:27 +0200 Subject: [PATCH 230/287] - don't set connect params in constructor (too early) --- install/lib/mysql.lib.php | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/install/lib/mysql.lib.php b/install/lib/mysql.lib.php index e151bc417..c0f731796 100644 --- a/install/lib/mysql.lib.php +++ b/install/lib/mysql.lib.php @@ -60,10 +60,14 @@ class db extends mysqli //// */ - // constructor - public function __construct($host = NULL , $user = NULL, $pass = NULL, $database = NULL) { + public function __destruct() { + if($this->_iConnId) mysqli_close($this->_iConnId); + } + + private function do_connect() { global $conf; - + + if($this->_iConnId) return true; $this->dbHost = $conf["mysql"]["host"]; $this->dbName = ''; $this->dbUser = $conf["mysql"]["admin_user"]; @@ -71,14 +75,6 @@ class db extends mysqli $this->dbCharset = $conf["mysql"]["charset"]; $this->dbNewLink = false; $this->dbClientFlags = null; - } - - public function __destruct() { - if($this->_iConnId) mysqli_close($this->_iConnId); - } - - private function do_connect() { - if($this->_iConnId) return true; $this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass); $try = 0; -- GitLab From 5a0b54cd838be5b07be6220246ae0ff189ae420f Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 16 Apr 2015 08:55:35 +0200 Subject: [PATCH 231/287] - fixed inherited function declaration --- install/dist/lib/debian60.lib.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/install/dist/lib/debian60.lib.php b/install/dist/lib/debian60.lib.php index 41837647a..80ad28fae 100644 --- a/install/dist/lib/debian60.lib.php +++ b/install/dist/lib/debian60.lib.php @@ -154,10 +154,6 @@ class installer extends installer_base { */ } - public function configure_xmpp() { - parent::configure_xmpp(); - } - } ?> -- GitLab From a6a094ab2cb67b7d66307eb79c7f6ce2c94a14d3 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 16 Apr 2015 10:13:43 +0200 Subject: [PATCH 232/287] - added function to insert db data from array --- interface/lib/classes/db_mysql.inc.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index 4d8068cca..cbd9b1b79 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -538,7 +538,27 @@ class db extends mysqli } return $out; } - + + public function insertFromArray($tablename, $data) { + if(!is_array($data)) return false; + + $k_query = ''; + $v_query = ''; + + $params = array($tablename); + $v_params = array(); + + foreach($data as $key => $value) { + $k_query .= ($k_query != '' ? ', ' : '') . '??'; + $v_query .= ($v_query != '' ? ', ' : '') . '?'; + $params[] = $key; + $v_params[] = $value; + } + + $query = 'INSERT INTO ?? (' . $k_query . ') VALUES (' . $v_query . ')'; + return $this->query($query, true, $params + $v_params); + } + public function diffrec($record_old, $record_new) { $diffrec_full = array(); $diff_num = 0; -- GitLab From 64060a4cfc2eb6c0173a93520e92c8249ed4d69f Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 16 Apr 2015 10:41:10 +0200 Subject: [PATCH 233/287] - fixed installer mysql lib --- install/lib/mysql.lib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/lib/mysql.lib.php b/install/lib/mysql.lib.php index c0f731796..d99793bf2 100644 --- a/install/lib/mysql.lib.php +++ b/install/lib/mysql.lib.php @@ -69,7 +69,7 @@ class db extends mysqli if($this->_iConnId) return true; $this->dbHost = $conf["mysql"]["host"]; - $this->dbName = ''; + $this->dbName = $conf["mysql"]["database"]; $this->dbUser = $conf["mysql"]["admin_user"]; $this->dbPass = $conf["mysql"]["admin_password"]; $this->dbCharset = $conf["mysql"]["charset"]; @@ -178,7 +178,6 @@ class db extends mysqli $this->do_connect(); - //if($this->isConnected == false) return false; if ($sQuery == '') { $this->_sqlerror('Keine Anfrage angegeben / No query given'); return false; -- GitLab From 305dda7079bbf0bc2904ea526aeea22328146423 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 16 Apr 2015 10:52:58 +0200 Subject: [PATCH 234/287] - changed some things in mysql lib for installer --- install/install.php | 6 ++---- install/lib/installer_base.lib.php | 4 ++-- install/lib/mysql.lib.php | 18 +++++++++++++++--- install/update.php | 6 ++---- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/install/install.php b/install/install.php index 9f7cca5b5..e5f0abea7 100644 --- a/install/install.php +++ b/install/install.php @@ -449,10 +449,8 @@ if($install_mode == 'standard') { // initialize the connection to the master database $inst->dbmaster = new db(); if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); - $inst->dbmaster->dbHost = $conf['mysql']["master_host"]; - $inst->dbmaster->dbName = $conf['mysql']["master_database"]; - $inst->dbmaster->dbUser = $conf['mysql']["master_admin_user"]; - $inst->dbmaster->dbPass = $conf['mysql']["master_admin_password"]; + $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"]); + $inst->dbmaster->setDBName($conf['mysql']["master_database"]); } else { // the master DB is the same then the slave DB diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index cba305651..2d14c8369 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -172,7 +172,7 @@ class installer_base { } //* Set the database name in the DB library - $this->db->dbName = $conf['mysql']['database']; + $this->db->setDBName($conf['mysql']['database']); //* Load the database dump into the database, if database contains no tables $db_tables = $this->db->getTables(); @@ -224,7 +224,7 @@ class installer_base { $this->db->query('FLUSH PRIVILEGES;'); //* Set the database name in the DB library - $this->db->dbName = $conf['mysql']['database']; + $this->db->setDBName($conf['mysql']['database']); $tpl_ini_array = ini_to_array(rf('tpl/server.ini.master')); diff --git a/install/lib/mysql.lib.php b/install/lib/mysql.lib.php index d99793bf2..3a6d483ab 100644 --- a/install/lib/mysql.lib.php +++ b/install/lib/mysql.lib.php @@ -69,7 +69,7 @@ class db extends mysqli if($this->_iConnId) return true; $this->dbHost = $conf["mysql"]["host"]; - $this->dbName = $conf["mysql"]["database"]; + $this->dbName = false;//$conf["mysql"]["database"]; $this->dbUser = $conf["mysql"]["admin_user"]; $this->dbPass = $conf["mysql"]["admin_password"]; $this->dbCharset = $conf["mysql"]["charset"]; @@ -90,13 +90,25 @@ class db extends mysqli $this->_sqlerror('Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!'); return false; } + + if($this->dbName) $this->setDBName($this->dbName); + + $this->_setCharset(); + } + + public function setDBData($host, $user, $password) { + $this->dbHost = $host; + $this->dbUser = $user; + $this->dbPass = $password; + } + + public function setDBName($name) { + $this->dbName = $name; if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) { $this->close(); $this->_sqlerror('Datenbank nicht gefunden / Database not found'); return false; } - - $this->_setCharset(); } public function close() { diff --git a/install/update.php b/install/update.php index e0a6bd228..43942943f 100644 --- a/install/update.php +++ b/install/update.php @@ -267,10 +267,8 @@ if($conf['mysql']['master_slave_setup'] == 'y') { // initialize the connection to the master database $inst->dbmaster = new db(); if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); - $inst->dbmaster->dbHost = $conf['mysql']["master_host"]; - $inst->dbmaster->dbName = $conf['mysql']["master_database"]; - $inst->dbmaster->dbUser = $conf['mysql']["master_admin_user"]; - $inst->dbmaster->dbPass = $conf['mysql']["master_admin_password"]; + $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"]); + $inst->dbmaster->setDBName($conf['mysql']["master_database"]); } else { $inst->dbmaster = $inst->db; } -- GitLab From d7fe4dc96dcd2319a56216cdf683d2963f3ef110 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 16 Apr 2015 16:58:31 +0200 Subject: [PATCH 235/287] - Fixed problem with .* table info (GRANT X ON Y.*) --- interface/lib/classes/db_mysql.inc.php | 6 ++++-- server/lib/classes/db_mysql.inc.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index cbd9b1b79..e4c8d3196 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -128,8 +128,10 @@ class db extends mysqli $sTxt = $this->escape($sValue); $sTxt = str_replace('`', '', $sTxt); - if(strpos($sTxt, '.') !== false) $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt); - else $sTxt = '`' . $sTxt . '`'; + if(strpos($sTxt, '.') !== false) { + $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt); + $sTxt = str_replace('.`*`', '.*', $sTxt); + } else $sTxt = '`' . $sTxt . '`'; $sQuery = substr_replace($sQuery, $sTxt, $iPos2, 2); $iPos2 += strlen($sTxt); diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index 51d546710..d2592f5e4 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -132,8 +132,10 @@ class db extends mysqli if($iPos2 !== false && ($iPos === false || $iPos2 <= $iPos)) { $sTxt = $this->escape($sValue); - if(strpos($sTxt, '.') !== false) $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt); - else $sTxt = '`' . $sTxt . '`'; + if(strpos($sTxt, '.') !== false) { + $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt); + $sTxt = str_replace('.`*`', '.*', $sTxt); + } else $sTxt = '`' . $sTxt . '`'; $sQuery = substr_replace($sQuery, $sTxt, $iPos2, 2); $iPos2 += strlen($sTxt); -- GitLab From cf84b381049e382df640d51086dafd4e404877c9 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 16 Apr 2015 16:59:27 +0200 Subject: [PATCH 236/287] - Fixed missing file from previous commit --- install/lib/mysql.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install/lib/mysql.lib.php b/install/lib/mysql.lib.php index 3a6d483ab..8e4086265 100644 --- a/install/lib/mysql.lib.php +++ b/install/lib/mysql.lib.php @@ -144,8 +144,10 @@ class db extends mysqli if($iPos2 !== false && ($iPos === false || $iPos2 <= $iPos)) { $sTxt = $this->escape($sValue); - if(strpos($sTxt, '.') !== false) $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt); - else $sTxt = '`' . $sTxt . '`'; + if(strpos($sTxt, '.') !== false) { + $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt); + $sTxt = str_replace('.`*`', '.*', $sTxt); + } else $sTxt = '`' . $sTxt . '`'; $sQuery = substr_replace($sQuery, $sTxt, $iPos2, 2); $iPos2 += strlen($sTxt); -- GitLab From c6d4e838cb8d789c2213e96803aca641e1d8575f Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Thu, 16 Apr 2015 17:32:51 +0200 Subject: [PATCH 237/287] - $app object not available in this mysql lib --- install/lib/mysql.lib.php | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/install/lib/mysql.lib.php b/install/lib/mysql.lib.php index 8e4086265..c6078ca2b 100644 --- a/install/lib/mysql.lib.php +++ b/install/lib/mysql.lib.php @@ -188,8 +188,6 @@ class db extends mysqli } private function _query($sQuery = '') { - global $app; - $this->do_connect(); if ($sQuery == '') { @@ -206,10 +204,8 @@ class db extends mysqli if($this->errorNumber == '111') { // server is not available if($try > 9) { - if(isset($app) && isset($app->forceErrorExit)) { - $app->forceErrorExit('Database connection failure!'); - } - // if we reach this, the app object is missing or has no exit method, so we continue as normal + $this->_sqlerror('DB::query -> error connecting'); + exit; } sleep(30); // additional seconds, please! } @@ -441,18 +437,13 @@ class db extends mysqli * @return string escaped string */ public function escape($sString) { - global $app; if(!is_string($sString) && !is_numeric($sString)) { - $app->log('NON-String given in escape function! (' . gettype($sString) . ')', LOGLEVEL_INFO); - //$sAddMsg = getDebugBacktrace(); - $app->log($sAddMsg, LOGLEVEL_DEBUG); $sString = ''; } $cur_encoding = mb_detect_encoding($sString); if($cur_encoding != "UTF-8") { if($cur_encoding != 'ASCII') { - $app->log('String ' . substr($sString, 0, 25) . '... is ' . $cur_encoding . '.', LOGLEVEL_INFO); if($cur_encoding) $sString = mb_convert_encoding($sString, 'UTF-8', $cur_encoding); else $sString = mb_convert_encoding($sString, 'UTF-8'); } @@ -470,7 +461,7 @@ class db extends mysqli * @access private */ private function _sqlerror($sErrormsg = 'Unbekannter Fehler', $sAddMsg = '') { - global $app, $conf; + global $conf; $mysql_error = (is_object($this->_iConnId) ? mysqli_error($this->_iConnId) : mysqli_connect_error()); $mysql_errno = (is_object($this->_iConnId) ? mysqli_errno($this->_iConnId) : mysqli_connect_errno()); @@ -479,9 +470,7 @@ class db extends mysqli if($this->show_error_messages && $conf['demo_mode'] === false) { echo $sErrormsg . $sAddMsg; - } else if(is_object($app) && method_exists($app, 'log')) { - $app->log($sErrormsg . $sAddMsg . ' -> ' . $mysql_errno . ' (' . $mysql_error . ')', LOGLEVEL_WARN); - } + } } public function affectedRows() { -- GitLab From 07573272d90b9f3eccad8c4ec187cd9b62214106 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Fri, 17 Apr 2015 11:29:28 +0200 Subject: [PATCH 238/287] - fixed double escaping --- install/lib/installer_base.lib.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 2d14c8369..4e1ee478e 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -278,8 +278,7 @@ class installer_base { } $server_ini_content = array_to_ini($tpl_ini_array); - $server_ini_content = mysql_real_escape_string($server_ini_content); - + $mail_server_enabled = ($conf['services']['mail'])?1:0; $web_server_enabled = ($conf['services']['web'])?1:0; $dns_server_enabled = ($conf['services']['dns'])?1:0; -- GitLab From 9d983375dc86ecb80a999d58a938f063c60e63a4 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Fri, 17 Apr 2015 14:51:27 +0200 Subject: [PATCH 239/287] - fixed some typos in sql queries --- interface/lib/classes/auth.inc.php | 2 +- interface/lib/classes/custom_datasource.inc.php | 4 ++-- interface/lib/classes/remote.d/client.inc.php | 6 +++--- interface/web/client/client_del.php | 2 +- interface/web/client/domain_edit.php | 2 +- interface/web/login/index.php | 4 ++-- interface/web/mail/xmpp_user_edit.php | 4 ++-- interface/web/sites/cron_edit.php | 4 ++-- interface/web/sites/database_edit.php | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/interface/lib/classes/auth.inc.php b/interface/lib/classes/auth.inc.php index 56e53ee42..ae626b7e6 100644 --- a/interface/lib/classes/auth.inc.php +++ b/interface/lib/classes/auth.inc.php @@ -114,7 +114,7 @@ class auth { $groupid = $app->functions->intval($groupid); if($userid > 0 && $groupid > 0) { - $user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE userid = ", $userid); + $user = $app->db->queryOneRecord("SELECT * FROM sys_user WHERE userid = ?", $userid); $groups = explode(',', $user['groups']); $key = array_search($groupid, $groups); unset($groups[$key]); diff --git a/interface/lib/classes/custom_datasource.inc.php b/interface/lib/classes/custom_datasource.inc.php index 46af33fb5..414de29dc 100644 --- a/interface/lib/classes/custom_datasource.inc.php +++ b/interface/lib/classes/custom_datasource.inc.php @@ -47,7 +47,7 @@ class custom_datasource { if($_SESSION["s"]["user"]["typ"] == 'user') { // Get the limits of the client $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT default_dnsserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ", $client_group_id); + $client = $app->db->queryOneRecord("SELECT default_dnsserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); $sql = "SELECT server_id,server_name FROM server WHERE server_id = ?"; } else { $sql = "SELECT server_id,server_name FROM server WHERE dns_server = 1 ORDER BY server_name"; @@ -69,7 +69,7 @@ class custom_datasource { if($_SESSION["s"]["user"]["typ"] == 'user') { // Get the limits of the client $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT default_slave_dnsserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ", $client_group_id); + $client = $app->db->queryOneRecord("SELECT default_slave_dnsserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); $sql = "SELECT server_id,server_name FROM server WHERE server_id = ?"; } else { $sql = "SELECT server_id,server_name FROM server WHERE dns_server = 1 ORDER BY server_name"; diff --git a/interface/lib/classes/remote.d/client.inc.php b/interface/lib/classes/remote.d/client.inc.php index d1c753279..cccc04f11 100644 --- a/interface/lib/classes/remote.d/client.inc.php +++ b/interface/lib/classes/remote.d/client.inc.php @@ -400,10 +400,10 @@ class remoting_client extends remoting { $app->auth->remove_group_from_user($parent_user['userid'], $client_group['groupid']); //* delete the group of the client - $app->db->query("DELETE FROM sys_group WHERE client_id = ", $client_id); + $app->db->query("DELETE FROM sys_group WHERE client_id = ?", $client_id); //* delete the sys user(s) of the client - $app->db->query("DELETE FROM sys_user WHERE client_id = ", $client_id); + $app->db->query("DELETE FROM sys_user WHERE client_id = ?", $client_id); //* Delete all records (sub-clients, mail, web, etc....) of this client. $tables = 'client,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_traffic'; @@ -413,7 +413,7 @@ class remoting_client extends remoting { if($client_group_id > 1) { foreach($tables_array as $table) { if($table != '') { - $records = $app->db->queryAllRecords("SELECT * FROM $table WHERE sys_groupid = ", $client_group_id); + $records = $app->db->queryAllRecords("SELECT * FROM $table WHERE sys_groupid = ?", $client_group_id); //* find the primary ID of the table $table_info = $app->db->tableInfo($table); $index_field = ''; diff --git a/interface/web/client/client_del.php b/interface/web/client/client_del.php index 7817bc372..3e0d6bccb 100644 --- a/interface/web/client/client_del.php +++ b/interface/web/client/client_del.php @@ -74,7 +74,7 @@ class page_action extends tform_actions { $this->dataRecord = $app->tform->getDataRecord($this->id); $client_id = $app->functions->intval($this->dataRecord['client_id']); - $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ", $client_id); + $client_group = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ?", $client_id); // Get all records (sub-clients, mail, web, etc....) of this client. $tables = 'cron,client,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain'; diff --git a/interface/web/client/domain_edit.php b/interface/web/client/domain_edit.php index 694746f8e..9064581c1 100644 --- a/interface/web/client/domain_edit.php +++ b/interface/web/client/domain_edit.php @@ -97,7 +97,7 @@ class page_action extends tform_actions { } else { // Get the limits of the client $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT client.client_id, 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 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, 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(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 = ? ORDER BY client.company_name, client.contact_name, sys_group.name"; diff --git a/interface/web/login/index.php b/interface/web/login/index.php index 1bc2db7df..ddc6cfb34 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -109,7 +109,7 @@ class login_index { $sql = "SELECT * FROM sys_user WHERE USERNAME = ? and PASSWORT = ?"; $tmp = $app->db->queryOneRecord($sql, $username, $passwort); $client_group_id = $app->functions->intval($tmp['default_group']); - $tmp_client = $app->db->queryOneRecord("SELECT client.client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ", $client_group_id); + $tmp_client = $app->db->queryOneRecord("SELECT client.client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); if(!$tmp_client || $old_client["parent_client_id"] != $tmp_client["client_id"] || $tmp["default_group"] != $_SESSION["s_old"]["user"]["default_group"] ) { die("You don't have the right to 'login as' this user!"); @@ -125,7 +125,7 @@ class login_index { } elseif($_SESSION['s']['user']['typ'] != 'admin' && (!isset($_SESSION['s_old']['user']) || $_SESSION['s_old']['user']['typ'] != 'admin')) { /* a reseller wants to 'login as', we need to check if he is allowed to */ $res_client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $res_client = $app->db->queryOneRecord("SELECT client.client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ", $res_client_group_id); + $res_client = $app->db->queryOneRecord("SELECT client.client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $res_client_group_id); /* this is the user the reseller wants to 'login as' */ $sql = "SELECT * FROM sys_user WHERE USERNAME = ? and PASSWORT = ?"; diff --git a/interface/web/mail/xmpp_user_edit.php b/interface/web/mail/xmpp_user_edit.php index c1b9eedf5..16d440a9f 100644 --- a/interface/web/mail/xmpp_user_edit.php +++ b/interface/web/mail/xmpp_user_edit.php @@ -112,12 +112,12 @@ class page_action extends tform_actions { if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin // Get the limits of the client $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_xmpp_user, parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ", $client_group_id); + $client = $app->db->queryOneRecord("SELECT limit_xmpp_user, parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); // Check if the user may add another xmpp user. if($this->id == 0 && $client["limit_xmpp_user"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(xmppuser_id) as number FROM xmpp_user WHERE sys_groupid = ", $client_group_id); + $tmp = $app->db->queryOneRecord("SELECT count(xmppuser_id) as number FROM xmpp_user WHERE sys_groupid = ?", $client_group_id); if($tmp["number"] >= $client["limit_xmpp_user"]) { $app->tform->errorMessage .= $app->tform->lng("limit_xmpp_user_txt")."
    "; } diff --git a/interface/web/sites/cron_edit.php b/interface/web/sites/cron_edit.php index 2b3c1391b..a8326493c 100644 --- a/interface/web/sites/cron_edit.php +++ b/interface/web/sites/cron_edit.php @@ -87,7 +87,7 @@ class page_action extends tform_actions { if($_SESSION["s"]["user"]["typ"] != 'admin') { // Get the limits of the client $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]); - $client = $app->db->queryOneRecord("SELECT limit_cron, limit_cron_type FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ", $client_group_id); + $client = $app->db->queryOneRecord("SELECT limit_cron, limit_cron_type FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id); // When the record is updated if($this->id > 0) { @@ -95,7 +95,7 @@ class page_action extends tform_actions { } else { // Check if the user may add another cron job. if($client["limit_cron"] >= 0) { - $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM cron WHERE sys_groupid = ", $client_group_id); + $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM cron WHERE sys_groupid = ?", $client_group_id); if($tmp["number"] >= $client["limit_cron"]) { $app->error($app->tform->wordbook["limit_cron_txt"]); } diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php index 7319e9a83..2d051d118 100644 --- a/interface/web/sites/database_edit.php +++ b/interface/web/sites/database_edit.php @@ -174,7 +174,7 @@ class page_action extends tform_actions { if($_SESSION["s"]["user"]["typ"] != 'admin') { // Get the limits of the client $client_group_id = $_SESSION["s"]["user"]["default_group"]; - $client = $app->db->queryOneRecord("SELECT db_servers, limit_database, limit_database_quota, parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.groupid = ", $client_group_id); + $client = $app->db->queryOneRecord("SELECT db_servers, limit_database, limit_database_quota, parent_client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.groupid = ?", $client_group_id); // When the record is updated if($this->id > 0) { -- GitLab From 2df826da9c66633f78b6cb0b649e3bc221cd7c94 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Fri, 17 Apr 2015 14:55:28 +0200 Subject: [PATCH 240/287] - ported patches --- interface/web/admin/list/iptables.list.php | 8 ++++---- interface/web/admin/list/server_ip.list.php | 16 ++++++++-------- interface/web/admin/list/server_php.list.php | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/interface/web/admin/list/iptables.list.php b/interface/web/admin/list/iptables.list.php index 2426c80c5..3ad78404e 100644 --- a/interface/web/admin/list/iptables.list.php +++ b/interface/web/admin/list/iptables.list.php @@ -21,11 +21,11 @@ $liste["item"][] = array( 'field' => "active", 'value' => array("y" => "
    ".$app->lng('yes_txt')."
    ", "n" => "
    ".$app->lng('no_txt')."
    ")); $liste["item"][] = array( 'field' => "server_id", - 'datatype' => "VARCHAR", + 'datatype' => "INTEGER", 'formtype' => "SELECT", - 'op' => "like", - 'prefix' => "%", - 'suffix' => "%", + 'op' => "=", + 'prefix' => "", + 'suffix' => "", 'datasource' => array ( 'type' => "SQL", 'querystring' => "SELECT server_id,server_name FROM server WHERE {AUTHSQL} AND db_server = 1 ORDER BY server_name", 'keyfield'=> "server_id", diff --git a/interface/web/admin/list/server_ip.list.php b/interface/web/admin/list/server_ip.list.php index 6cc63cb2d..41ac76e2a 100644 --- a/interface/web/admin/list/server_ip.list.php +++ b/interface/web/admin/list/server_ip.list.php @@ -45,11 +45,11 @@ $liste['auth'] = 'no'; *****************************************************/ $liste['item'][] = array( 'field' => 'server_id', - 'datatype' => 'VARCHAR', + 'datatype' => 'INTEGER', 'formtype' => 'SELECT', - 'op' => 'like', - 'prefix' => '%', - 'suffix' => '%', + 'op' => '=', + 'prefix' => '', + 'suffix' => '', 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', 'keyfield'=> 'server_id', @@ -59,11 +59,11 @@ $liste['item'][] = array( 'field' => 'server_id', 'value' => ''); $liste['item'][] = array( 'field' => 'client_id', - 'datatype' => 'VARCHAR', + 'datatype' => 'INTEGER', 'formtype' => 'SELECT', - 'op' => 'like', - 'prefix' => '%', - 'suffix' => '%', + 'op' => '=', + 'prefix' => '', + 'suffix' => '', 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT client_id,contact_name FROM client WHERE {AUTHSQL} ORDER BY contact_name', 'keyfield'=> 'client_id', diff --git a/interface/web/admin/list/server_php.list.php b/interface/web/admin/list/server_php.list.php index ce8944d5a..2414cb8fe 100644 --- a/interface/web/admin/list/server_php.list.php +++ b/interface/web/admin/list/server_php.list.php @@ -45,11 +45,11 @@ $liste['auth'] = 'no'; *****************************************************/ $liste['item'][] = array( 'field' => 'server_id', - 'datatype' => 'VARCHAR', + 'datatype' => 'INTEGER', 'formtype' => 'SELECT', - 'op' => 'like', - 'prefix' => '%', - 'suffix' => '%', + 'op' => '=', + 'prefix' => '', + 'suffix' => '', 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', 'keyfield'=> 'server_id', @@ -59,11 +59,11 @@ $liste['item'][] = array( 'field' => 'server_id', 'value' => ''); $liste['item'][] = array( 'field' => 'client_id', - 'datatype' => 'VARCHAR', + 'datatype' => 'INTEGER', 'formtype' => 'SELECT', - 'op' => 'like', - 'prefix' => '%', - 'suffix' => '%', + 'op' => '=', + 'prefix' => '', + 'suffix' => '', 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT client_id,contact_name FROM client WHERE {AUTHSQL} ORDER BY contact_name', 'keyfield'=> 'client_id', -- GitLab From 0e14d73617c75afc53c159e56d2480867ab5aa3a Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Fri, 17 Apr 2015 15:08:38 +0200 Subject: [PATCH 241/287] - Fixed top navigation --- interface/web/nav.php | 2 +- interface/web/vm/lib/module.conf.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/web/nav.php b/interface/web/nav.php index 6475daa17..773f7d149 100644 --- a/interface/web/nav.php +++ b/interface/web/nav.php @@ -74,7 +74,7 @@ if(isset($_GET['nav']) && $_GET['nav'] == 'top') { $language = (isset($_SESSION['s']['user']['language']))?$_SESSION['s']['user']['language']:$conf['language']; $app->load_language_file('web/'.$mt.'/lib/'.$language.'.lng'); $active = ($module['name'] == $_SESSION['s']['module']['name']) ? 1 : 0; - $topnav[$module['order']] = array( 'title' => $app->lng($module['title']), + $topnav[$module['order'].'-'.$module['name']] = array( 'title' => $app->lng($module['title']), 'active' => $active, 'module' => $module['name']); } diff --git a/interface/web/vm/lib/module.conf.php b/interface/web/vm/lib/module.conf.php index a7e31bb53..ee5e6b6ad 100644 --- a/interface/web/vm/lib/module.conf.php +++ b/interface/web/vm/lib/module.conf.php @@ -5,6 +5,7 @@ $module['title'] = 'top_menu_vm'; $module['template'] = 'module.tpl.htm'; $module['startpage'] = 'vm/openvz_vm_list.php'; $module['tab_width'] = ''; +$module['order'] = '50'; //**** Templates menu $items = array(); -- GitLab From 7802d5714a9be14db84e737c85646c9fadbfae66 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Fri, 17 Apr 2015 16:07:07 +0200 Subject: [PATCH 242/287] fixed sql-query --- interface/web/tools/resync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/tools/resync.php b/interface/web/tools/resync.php index 1cd150a73..e99e5119d 100644 --- a/interface/web/tools/resync.php +++ b/interface/web/tools/resync.php @@ -182,7 +182,7 @@ class page_action extends tform_actions { //* firewall $array_out = array(); foreach($server_data as $db_table => $data) { - $sql = @(isset($data['server_id']))?"SELECT * FROM ?? WHERE server_id = ":"SELECT * FROM ??"; + $sql = @(isset($data['server_id']))?"SELECT * FROM ?? WHERE server_id = ?":"SELECT * FROM ??"; $records = $app->db->queryAllRecords($sql, $db_table, $server_id); if (!empty($records)) array_push($array_out, $db_table); } -- GitLab From 698294a2db2f86241d0c243853dfe373b6e65b14 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Fri, 17 Apr 2015 18:21:47 +0200 Subject: [PATCH 243/287] Added check for content of redirect variable. --- interface/web/capp.php | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/web/capp.php b/interface/web/capp.php index 2c143180f..b0568ba09 100644 --- a/interface/web/capp.php +++ b/interface/web/capp.php @@ -43,6 +43,7 @@ if($_SESSION["s"]["user"]['active'] != 1) { } if(!preg_match("/^[a-z]{2,20}$/i", $mod)) die('module name contains unallowed chars.'); +if($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,5}$/i", $redirect)) die('redirect contains unallowed chars.'); //* Check if user may use the module. $user_modules = explode(",", $_SESSION["s"]["user"]["modules"]); -- GitLab From a72b8b56f6fe1e6274835bc8bd190551d074193d Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Fri, 17 Apr 2015 18:22:19 +0200 Subject: [PATCH 244/287] Added check for content of redirect variable. --- interface/web/capp.php | 1 + 1 file changed, 1 insertion(+) diff --git a/interface/web/capp.php b/interface/web/capp.php index 2c143180f..b0568ba09 100644 --- a/interface/web/capp.php +++ b/interface/web/capp.php @@ -43,6 +43,7 @@ if($_SESSION["s"]["user"]['active'] != 1) { } if(!preg_match("/^[a-z]{2,20}$/i", $mod)) die('module name contains unallowed chars.'); +if($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,5}$/i", $redirect)) die('redirect contains unallowed chars.'); //* Check if user may use the module. $user_modules = explode(",", $_SESSION["s"]["user"]["modules"]); -- GitLab From fa4d8960a20a7571ef19809019cef6652895170a Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Fri, 17 Apr 2015 18:43:31 +0200 Subject: [PATCH 245/287] Allow ID's > 99999 for redirects. --- interface/web/capp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/capp.php b/interface/web/capp.php index b0568ba09..bf45644f2 100644 --- a/interface/web/capp.php +++ b/interface/web/capp.php @@ -43,7 +43,7 @@ if($_SESSION["s"]["user"]['active'] != 1) { } if(!preg_match("/^[a-z]{2,20}$/i", $mod)) die('module name contains unallowed chars.'); -if($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,5}$/i", $redirect)) die('redirect contains unallowed chars.'); +if($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,7}$/i", $redirect)) die('redirect contains unallowed chars.'); //* Check if user may use the module. $user_modules = explode(",", $_SESSION["s"]["user"]["modules"]); -- GitLab From f339ebf3a37fc23aac843ce1c7008d4a77d87fa8 Mon Sep 17 00:00:00 2001 From: Dominik Date: Sat, 25 Apr 2015 14:23:33 +0200 Subject: [PATCH 246/287] mdbox format as alternative for Maildir --- .../sql/incremental/upd_dev_collection.sql | 1 + install/sql/ispconfig3.sql | 1 + install/tpl/debian6_dovecot-sql.conf.master | 4 +- install/tpl/debian_dovecot-sql.conf.master | 4 +- install/tpl/fedora_dovecot-sql.conf.master | 4 +- install/tpl/opensuse_dovecot-sql.conf.master | 4 +- .../web/admin/form/server_config.tform.php | 6 + .../web/admin/lib/lang/ar_server_config.lng | 1 + .../web/admin/lib/lang/bg_server_config.lng | 1 + .../web/admin/lib/lang/br_server_config.lng | 1 + .../web/admin/lib/lang/cz_server_config.lng | 1 + .../web/admin/lib/lang/de_server_config.lng | 1 + .../web/admin/lib/lang/el_server_config.lng | 1 + .../web/admin/lib/lang/en_server_config.lng | 1 + .../web/admin/lib/lang/es_server_config.lng | 1 + .../web/admin/lib/lang/fi_server_config.lng | 1 + .../web/admin/lib/lang/fr_server_config.lng | 1 + .../web/admin/lib/lang/hr_server_config.lng | 1 + .../web/admin/lib/lang/hu_server_config.lng | 1 + .../web/admin/lib/lang/id_server_config.lng | 1 + .../web/admin/lib/lang/it_server_config.lng | 1 + .../web/admin/lib/lang/ja_server_config.lng | 1 + .../web/admin/lib/lang/nl_server_config.lng | 1 + .../web/admin/lib/lang/pl_server_config.lng | 1 + .../web/admin/lib/lang/pt_server_config.lng | 1 + .../web/admin/lib/lang/ro_server_config.lng | 1 + .../web/admin/lib/lang/ru_server_config.lng | 1 + .../web/admin/lib/lang/se_server_config.lng | 1 + .../web/admin/lib/lang/sk_server_config.lng | 1 + .../web/admin/lib/lang/tr_server_config.lng | 1 + .../templates/server_config_mail_edit.htm | 6 + interface/web/mail/mail_user_edit.php | 10 + .../classes/cron.d/500-backup_mail.inc.php | 60 +++- .../plugins-available/backup_plugin.inc.php | 69 +++- server/plugins-available/mail_plugin.inc.php | 305 ++++++++++-------- 35 files changed, 330 insertions(+), 167 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index 6eea12b71..221fde9ef 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -37,6 +37,7 @@ ALTER TABLE `web_backup` CHANGE `filesize` `filesize` VARCHAR(20) NOT NULL DEFAU ALTER TABLE `sys_datalog` ADD INDEX `dbtable` (`dbtable` (25), `dbidx` (25)), ADD INDEX (`action`); ALTER TABLE `mail_user` ADD `greylisting` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `postfix`; +ALTER TABLE `mail_user` ADD `maildir_format` varchar(255) NOT NULL default 'maildir' AFTER `maildir`; ALTER TABLE `mail_forwarding` ADD `greylisting` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `active`; ALTER TABLE `openvz_ip` CHANGE `ip_address` `ip_address` VARCHAR(39) DEFAULT NULL; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 571d59d5f..229f76d92 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -914,6 +914,7 @@ CREATE TABLE `mail_user` ( `uid` int(11) NOT NULL default '5000', `gid` int(11) NOT NULL default '5000', `maildir` varchar(255) NOT NULL default '', + `maildir_format` varchar(255) NOT NULL default 'maildir', `quota` bigint(20) NOT NULL default '-1', `cc` varchar(255) NOT NULL default '', `sender_cc` varchar(255) NOT NULL default '', diff --git a/install/tpl/debian6_dovecot-sql.conf.master b/install/tpl/debian6_dovecot-sql.conf.master index 3c58b304a..5f023501c 100644 --- a/install/tpl/debian6_dovecot-sql.conf.master +++ b/install/tpl/debian6_dovecot-sql.conf.master @@ -14,8 +14,8 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se default_pass_scheme = CRYPT # password-query with prefetch -password_query = SELECT email as user, password, maildir as userdb_home, CONCAT('maildir:', maildir, '/Maildir') as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' -user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' +password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' +user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. # Do not enable it on Dovecot 1.x servers diff --git a/install/tpl/debian_dovecot-sql.conf.master b/install/tpl/debian_dovecot-sql.conf.master index adeb8d9d9..647655f6d 100644 --- a/install/tpl/debian_dovecot-sql.conf.master +++ b/install/tpl/debian_dovecot-sql.conf.master @@ -121,8 +121,8 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se default_pass_scheme = CRYPT # password-query with prefetch -password_query = SELECT email as user, password, maildir as userdb_home, CONCAT('maildir:', maildir, '/Maildir') as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' -user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' +password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' +user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. # Do not enable it on Dovecot 1.x servers diff --git a/install/tpl/fedora_dovecot-sql.conf.master b/install/tpl/fedora_dovecot-sql.conf.master index 7e88dee6c..3815a0eb5 100644 --- a/install/tpl/fedora_dovecot-sql.conf.master +++ b/install/tpl/fedora_dovecot-sql.conf.master @@ -134,8 +134,8 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se default_pass_scheme = CRYPT # password-query with prefetch -password_query = SELECT email as user, password, maildir as userdb_home, CONCAT('maildir:', maildir, '/Maildir') as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' -user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' +password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' +user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. # Do not enable it on Dovecot 1.x servers diff --git a/install/tpl/opensuse_dovecot-sql.conf.master b/install/tpl/opensuse_dovecot-sql.conf.master index a28fa27f1..938975efb 100644 --- a/install/tpl/opensuse_dovecot-sql.conf.master +++ b/install/tpl/opensuse_dovecot-sql.conf.master @@ -134,8 +134,8 @@ connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_se default_pass_scheme = CRYPT # password-query with prefetch -password_query = SELECT email as user, password, maildir as userdb_home, CONCAT('maildir:', maildir, '/Maildir') as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' -user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' +password_query = SELECT email as user, password, maildir as userdb_home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' +user_query = SELECT email as user, maildir as home, CONCAT( maildir_format, ':', maildir, '/', IF(maildir_format='maildir','Maildir',maildir_format)) as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. # Do not enable it on Dovecot 1.x servers diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index 838ade897..7827b43f2 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -295,6 +295,12 @@ $form["tabs"]['mail'] = array( 'width' => '40', 'maxlength' => '255' ), + 'maildir_format' => array( + 'datatype' => 'VARCHAR', + 'formtype' => 'SELECT', + 'default' => '20', + 'value' => array('maildir' => 'Maildir', 'mdbox' => 'mdbox') + ), 'homedir_path' => array( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', diff --git a/interface/web/admin/lib/lang/ar_server_config.lng b/interface/web/admin/lib/lang/ar_server_config.lng index df6605cc2..b03eaebfd 100644 --- a/interface/web/admin/lib/lang/ar_server_config.lng +++ b/interface/web/admin/lib/lang/ar_server_config.lng @@ -19,6 +19,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI max. Requests'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Module'; $wb['maildir_path_txt'] = 'Maildir Path'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Homedir Path'; $wb['mailuser_uid_txt'] = 'Mailuser UID'; $wb['mailuser_gid_txt'] = 'Mailuser GID'; diff --git a/interface/web/admin/lib/lang/bg_server_config.lng b/interface/web/admin/lib/lang/bg_server_config.lng index 9611c4885..10fbc0b3d 100644 --- a/interface/web/admin/lib/lang/bg_server_config.lng +++ b/interface/web/admin/lib/lang/bg_server_config.lng @@ -17,6 +17,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI max. Requests'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Модул'; $wb['maildir_path_txt'] = 'Maildir Path'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Homedir Path'; $wb['mailuser_uid_txt'] = 'Mailuser UID'; $wb['mailuser_gid_txt'] = 'Mailuser GID'; diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng index 04e803480..8946db176 100644 --- a/interface/web/admin/lib/lang/br_server_config.lng +++ b/interface/web/admin/lib/lang/br_server_config.lng @@ -18,6 +18,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI: Requisições máximas'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Módulo'; $wb['maildir_path_txt'] = 'Caminho do diretório Maildir'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Caminho do diretório Home'; $wb['mailuser_uid_txt'] = 'UID usuário de email'; $wb['mailuser_gid_txt'] = 'GID usuário de email'; diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng index 80eeab8b7..c5a3dbc4f 100644 --- a/interface/web/admin/lib/lang/cz_server_config.lng +++ b/interface/web/admin/lib/lang/cz_server_config.lng @@ -19,6 +19,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI max. požadavků'; $wb['fastcgi_bin_txt'] = 'FastCGI cesta k binarnímu balíčku'; $wb['module_txt'] = 'Modul'; $wb['maildir_path_txt'] = 'Cesta k mail adresáři'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Cesta k domácímu adresáři'; $wb['mailuser_uid_txt'] = 'Mail uživatel UID'; $wb['mailuser_gid_txt'] = 'Mail uživatel GID'; diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index f291f7cfc..336cea82d 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -18,6 +18,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI max. Anfragen'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Modul'; $wb['maildir_path_txt'] = 'Maildir Pfad'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Homedir Pfad'; $wb['dkim_path_txt'] = 'DKIM Pfad'; $wb['mailuser_uid_txt'] = 'Mailbenutzer UID'; diff --git a/interface/web/admin/lib/lang/el_server_config.lng b/interface/web/admin/lib/lang/el_server_config.lng index 6376ccfcd..ca7cf2b26 100644 --- a/interface/web/admin/lib/lang/el_server_config.lng +++ b/interface/web/admin/lib/lang/el_server_config.lng @@ -19,6 +19,7 @@ $wb['fastcgi_max_requests_txt'] = 'Όριο πλήθους αιτήσεων Fast $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Άρθρωμα'; $wb['maildir_path_txt'] = 'Διαδρομή Maildir'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Διαδρομή Homedir'; $wb['mailuser_uid_txt'] = 'Mailuser UID'; $wb['mailuser_gid_txt'] = 'Mailuser GID'; diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index f11a44730..2628abf29 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -29,6 +29,7 @@ $wb["fastcgi_max_requests_txt"] = 'FastCGI max. Requests'; $wb["fastcgi_bin_txt"] = 'FastCGI Bin'; $wb["module_txt"] = 'Module'; $wb["maildir_path_txt"] = 'Maildir Path'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb["homedir_path_txt"] = 'Homedir Path'; $wb["dkim_path_txt"] = 'DKIM Path'; $wb["mailuser_uid_txt"] = 'Mailuser UID'; diff --git a/interface/web/admin/lib/lang/es_server_config.lng b/interface/web/admin/lib/lang/es_server_config.lng index 2d834c842..1c91d0dd6 100644 --- a/interface/web/admin/lib/lang/es_server_config.lng +++ b/interface/web/admin/lib/lang/es_server_config.lng @@ -17,6 +17,7 @@ $wb['fastcgi_max_requests_txt'] = 'Peticiones máximas de FastCGI'; $wb['fastcgi_bin_txt'] = 'Binario de FastCGI'; $wb['module_txt'] = 'Módulo'; $wb['maildir_path_txt'] = 'Ruta de buzones'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Ruta base de correo'; $wb['mailuser_uid_txt'] = 'UID del usuario de correo'; $wb['mailuser_gid_txt'] = 'GID del usuario de correo'; diff --git a/interface/web/admin/lib/lang/fi_server_config.lng b/interface/web/admin/lib/lang/fi_server_config.lng index 0316c47c2..8ece953fe 100755 --- a/interface/web/admin/lib/lang/fi_server_config.lng +++ b/interface/web/admin/lib/lang/fi_server_config.lng @@ -17,6 +17,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI-pyyntöraja'; $wb['fastcgi_bin_txt'] = 'FastCGI-binääri'; $wb['module_txt'] = 'Ohjelmaosio'; $wb['maildir_path_txt'] = 'Postilaatikon hakemistopolku'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Kotikansion hakemistopolku'; $wb['mailuser_uid_txt'] = 'Käyttäjätunnus'; $wb['mailuser_gid_txt'] = 'Käyttäjäryhmä'; diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng index 247dc7fee..d566538a5 100644 --- a/interface/web/admin/lib/lang/fr_server_config.lng +++ b/interface/web/admin/lib/lang/fr_server_config.lng @@ -17,6 +17,7 @@ $wb['fastcgi_max_requests_txt'] = 'Nombre maximal de requês FastCGI'; $wb['fastcgi_bin_txt'] = 'Exétable FastCGI'; $wb['module_txt'] = 'Module'; $wb['maildir_path_txt'] = 'Chemin Maildir'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Chemin Homedir'; $wb['mailuser_uid_txt'] = 'UID de l\'utilisateur mail'; $wb['mailuser_gid_txt'] = 'GID de l\'utilisateur mail'; diff --git a/interface/web/admin/lib/lang/hr_server_config.lng b/interface/web/admin/lib/lang/hr_server_config.lng index 38b5b08a6..4a73d3f63 100644 --- a/interface/web/admin/lib/lang/hr_server_config.lng +++ b/interface/web/admin/lib/lang/hr_server_config.lng @@ -18,6 +18,7 @@ $wb['fastcgi_max_requests_txt'] = 'Maks. broj FastCGI zahtjeva'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Modul'; $wb['maildir_path_txt'] = 'Put do Maildir-a'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Put do početne stranice'; $wb['mailuser_uid_txt'] = 'Mailuser UID'; $wb['mailuser_gid_txt'] = 'Mailuser GID'; diff --git a/interface/web/admin/lib/lang/hu_server_config.lng b/interface/web/admin/lib/lang/hu_server_config.lng index f59e19d73..b29b74413 100644 --- a/interface/web/admin/lib/lang/hu_server_config.lng +++ b/interface/web/admin/lib/lang/hu_server_config.lng @@ -17,6 +17,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI max. Requests'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Modul'; $wb['maildir_path_txt'] = 'Maildir Path'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Homedir Path'; $wb['mailuser_uid_txt'] = 'Mailuser UID'; $wb['mailuser_gid_txt'] = 'Mailuser GID'; diff --git a/interface/web/admin/lib/lang/id_server_config.lng b/interface/web/admin/lib/lang/id_server_config.lng index d2b7ce95d..930a58cbf 100644 --- a/interface/web/admin/lib/lang/id_server_config.lng +++ b/interface/web/admin/lib/lang/id_server_config.lng @@ -19,6 +19,7 @@ $wb['fastcgi_max_requests_txt'] = 'Maks. Request FastCGI'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Modul'; $wb['maildir_path_txt'] = 'Path Direktori Mail'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Path Direktori Home'; $wb['mailuser_uid_txt'] = 'UID Pengguna Mail'; $wb['mailuser_gid_txt'] = 'GID Pengguna Mail'; diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng index f2327c218..cba103ff8 100644 --- a/interface/web/admin/lib/lang/it_server_config.lng +++ b/interface/web/admin/lib/lang/it_server_config.lng @@ -16,6 +16,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI max. Requests'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Module'; $wb['maildir_path_txt'] = 'Maildir Path'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Homedir Path'; $wb['mailuser_uid_txt'] = 'Mailuser UID'; $wb['mailuser_gid_txt'] = 'Mailuser GID'; diff --git a/interface/web/admin/lib/lang/ja_server_config.lng b/interface/web/admin/lib/lang/ja_server_config.lng index 375dbaff9..37fb09ac5 100644 --- a/interface/web/admin/lib/lang/ja_server_config.lng +++ b/interface/web/admin/lib/lang/ja_server_config.lng @@ -19,6 +19,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI 最大リクエスト数'; $wb['fastcgi_bin_txt'] = 'FastCGI実行ファイル'; $wb['module_txt'] = 'モジュール'; $wb['maildir_path_txt'] = 'メールディレクトリ'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'ホームディレクトリ'; $wb['mailuser_uid_txt'] = 'メールユーザーのUID'; $wb['mailuser_gid_txt'] = 'メールユーザーのGID'; diff --git a/interface/web/admin/lib/lang/nl_server_config.lng b/interface/web/admin/lib/lang/nl_server_config.lng index ea33db0d8..44eea4402 100644 --- a/interface/web/admin/lib/lang/nl_server_config.lng +++ b/interface/web/admin/lib/lang/nl_server_config.lng @@ -19,6 +19,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI max. gequests'; $wb['fastcgi_bin_txt'] = 'FastCGI bin'; $wb['module_txt'] = 'Module'; $wb['maildir_path_txt'] = 'Maildir pad'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Homedir pad'; $wb['mailuser_uid_txt'] = 'Mailuser UID'; $wb['mailuser_gid_txt'] = 'Mailuser GID'; diff --git a/interface/web/admin/lib/lang/pl_server_config.lng b/interface/web/admin/lib/lang/pl_server_config.lng index 7e51ab2e2..5e17c41c5 100644 --- a/interface/web/admin/lib/lang/pl_server_config.lng +++ b/interface/web/admin/lib/lang/pl_server_config.lng @@ -19,6 +19,7 @@ $wb['fastcgi_max_requests_txt'] = 'Maksymalna ilość zadań FastCGI'; $wb['fastcgi_bin_txt'] = 'Kosz FastCGI'; $wb['module_txt'] = 'Moduł'; $wb['maildir_path_txt'] = 'Adres poczty e-mail'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Bazowy adres poczty e-mail'; $wb['mailuser_uid_txt'] = 'UID użytkownika e-mail'; $wb['mailuser_gid_txt'] = 'GID użytkownika e-mail'; diff --git a/interface/web/admin/lib/lang/pt_server_config.lng b/interface/web/admin/lib/lang/pt_server_config.lng index 3696aa6d7..adf708552 100644 --- a/interface/web/admin/lib/lang/pt_server_config.lng +++ b/interface/web/admin/lib/lang/pt_server_config.lng @@ -18,6 +18,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI: Requisições máximas'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Módulo'; $wb['maildir_path_txt'] = 'Pasta do Maildir'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Pasta Home'; $wb['mailuser_uid_txt'] = 'UID utilizador de email'; $wb['mailuser_gid_txt'] = 'GID utilizador de email'; diff --git a/interface/web/admin/lib/lang/ro_server_config.lng b/interface/web/admin/lib/lang/ro_server_config.lng index 1f0907109..a7ab9bc88 100644 --- a/interface/web/admin/lib/lang/ro_server_config.lng +++ b/interface/web/admin/lib/lang/ro_server_config.lng @@ -18,6 +18,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI max. Requests'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Module'; $wb['maildir_path_txt'] = 'Maildir Path'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Homedir Path'; $wb['mailuser_uid_txt'] = 'Mailuser UID'; $wb['mailuser_gid_txt'] = 'Mailuser GID'; diff --git a/interface/web/admin/lib/lang/ru_server_config.lng b/interface/web/admin/lib/lang/ru_server_config.lng index 8358162a9..6a4080a12 100644 --- a/interface/web/admin/lib/lang/ru_server_config.lng +++ b/interface/web/admin/lib/lang/ru_server_config.lng @@ -16,6 +16,7 @@ $wb['fastcgi_max_requests_txt'] = 'Макс.запросов для FastCGI'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Модуль'; $wb['maildir_path_txt'] = 'Путь Maildir'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Путь Homedir'; $wb['mailuser_uid_txt'] = 'Mailuser UID'; $wb['mailuser_gid_txt'] = 'Mailuser GID'; diff --git a/interface/web/admin/lib/lang/se_server_config.lng b/interface/web/admin/lib/lang/se_server_config.lng index 34d19128a..5818cfacb 100644 --- a/interface/web/admin/lib/lang/se_server_config.lng +++ b/interface/web/admin/lib/lang/se_server_config.lng @@ -17,6 +17,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI max. Requests'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Module'; $wb['maildir_path_txt'] = 'Maildir Path'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Homedir Path'; $wb['mailuser_uid_txt'] = 'Mailuser UID'; $wb['mailuser_gid_txt'] = 'Mailuser GID'; diff --git a/interface/web/admin/lib/lang/sk_server_config.lng b/interface/web/admin/lib/lang/sk_server_config.lng index c0bebe463..392664b7e 100644 --- a/interface/web/admin/lib/lang/sk_server_config.lng +++ b/interface/web/admin/lib/lang/sk_server_config.lng @@ -19,6 +19,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI max. Requests'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Modul'; $wb['maildir_path_txt'] = 'Maildir Cesta'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Cesta k domovskému adresáru'; $wb['mailuser_uid_txt'] = 'Mailuser UID'; $wb['mailuser_gid_txt'] = 'Mailuser GID'; diff --git a/interface/web/admin/lib/lang/tr_server_config.lng b/interface/web/admin/lib/lang/tr_server_config.lng index 4a50f56ee..60a24ee48 100644 --- a/interface/web/admin/lib/lang/tr_server_config.lng +++ b/interface/web/admin/lib/lang/tr_server_config.lng @@ -19,6 +19,7 @@ $wb['fastcgi_max_requests_txt'] = 'FastCGI max. Requests'; $wb['fastcgi_bin_txt'] = 'FastCGI Bin'; $wb['module_txt'] = 'Modül'; $wb['maildir_path_txt'] = 'Mail dizini yolu'; +$wb['maildir_format_txt'] = 'Maildir Format'; $wb['homedir_path_txt'] = 'Kullanıcı dizini yolu'; $wb['mailuser_uid_txt'] = 'Mail kullanıcısı UID'; $wb['mailuser_gid_txt'] = 'Mail kullanıcısı GID'; diff --git a/interface/web/admin/templates/server_config_mail_edit.htm b/interface/web/admin/templates/server_config_mail_edit.htm index e07606929..926be8e62 100644 --- a/interface/web/admin/templates/server_config_mail_edit.htm +++ b/interface/web/admin/templates/server_config_mail_edit.htm @@ -14,6 +14,12 @@
    +
    + +
    +
    diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index ddc0ceb89..ff9211587 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -207,6 +207,16 @@ class page_action extends tform_actions { $app->uses('getconf'); $mail_config = $app->getconf->get_server_config(!empty($domain["server_id"]) ? $domain["server_id"] : '', 'mail'); + // Set Maildir format + if ($this->id == 0) { + $this->dataRecord['maildir_format'] = $sys_config['maildir_format']; + } + else { + // restore Maildir format + $tmp = $app->db->queryOneRecord("SELECT maildir_format FROM mail_user WHERE mailuser_id = ".$app->functions->intval($this->id)); + $this->dataRecord['maildir_format'] = $tmp['maildir_format']; + } + //* compose the email field if(isset($_POST["email_local_part"]) && isset($_POST["email_domain"])) { $this->dataRecord["email"] = strtolower($_POST["email_local_part"]."@".$app->functions->idn_encode($_POST["email_domain"])); diff --git a/server/lib/classes/cron.d/500-backup_mail.inc.php b/server/lib/classes/cron.d/500-backup_mail.inc.php index 81e39ed0c..e16cce19e 100644 --- a/server/lib/classes/cron.d/500-backup_mail.inc.php +++ b/server/lib/classes/cron.d/500-backup_mail.inc.php @@ -31,6 +31,7 @@ class cronjob_backup_mail extends cronjob { // job schedule protected $_schedule = '0 0 * * *'; + private $tmp_backup_dir = ''; /* this function is optional if it contains no custom code */ public function onPrepare() { @@ -111,23 +112,46 @@ class cronjob_backup_mail extends cronjob { $mail_backup_file = 'mail'.$rec['mailuser_id'].'_'.date('Y-m-d_H-i'); - $domain_dir=explode('/',$rec['maildir']); - $_temp=array_pop($domain_dir);unset($_temp); - $domain_dir=implode('/',$domain_dir); - - $parts=explode('/',$rec['maildir']); - $source_dir=array_pop($parts); - unset($parts); - - //* create archives - if($backup_mode == 'userzip') { - $mail_backup_file.='.zip'; - exec('cd '.$domain_dir.' && zip '.$mail_backup_dir.'/'.$mail_backup_file.' -b /tmp -r '.$source_dir.' > /dev/null', $tmp_output, $retval); - } else { - /* Create a tar.gz backup */ - $mail_backup_file.='.tar.gz'; - exec(escapeshellcmd('tar pczf '.$mail_backup_dir.'/'.$mail_backup_file.' --directory '.$domain_dir.' '.$source_dir), $tmp_output, $retval); + // in case of mdbox -> create backup with doveadm before zipping + if ($rec['maildir_format'] == 'mdbox') { + if (empty($this->tmp_backup_dir)) $this->tmp_backup_dir = $rec['maildir']; + // Create temporary backup-mailbox + exec("su -c 'dsync backup -u \"".$rec["email"]."\" mdbox:".$this->tmp_backup_dir."/backup'", $tmp_output, $retval); + + if($backup_mode == 'userzip') { + $mail_backup_file.='.zip'; + exec('cd '.$this->tmp_backup_dir.' && zip '.$mail_backup_dir.'/'.$mail_backup_file.' -b /tmp -r backup > /dev/null && rm -rf backup', $tmp_output, $retval); + } + else { + $mail_backup_file.='.tar.gz'; + exec(escapeshellcmd('tar pczf '.$mail_backup_dir.'/'.$mail_backup_file.' --directory '.$this->tmp_backup_dir.' backup && rm -rf '.$this->tmp_backup_dir.'/backup'), $tmp_output, $retval); + } + + if ($retval != 0) { + // Cleanup + if (file_exists($this->tmp_backup_dir.'/backup')) exec('rm -rf '.$this->tmp_backup_dir.'/backup'); + } + } + else { + $domain_dir=explode('/',$rec['maildir']); + $_temp=array_pop($domain_dir);unset($_temp); + $domain_dir=implode('/',$domain_dir); + + $parts=explode('/',$rec['maildir']); + $source_dir=array_pop($parts); + unset($parts); + + //* create archives + if($backup_mode == 'userzip') { + $mail_backup_file.='.zip'; + exec('cd '.$domain_dir.' && zip '.$mail_backup_dir.'/'.$mail_backup_file.' -b /tmp -r '.$source_dir.' > /dev/null', $tmp_output, $retval); + } else { + /* Create a tar.gz backup */ + $mail_backup_file.='.tar.gz'; + exec(escapeshellcmd('tar pczf '.$mail_backup_dir.'/'.$mail_backup_file.' --directory '.$domain_dir.' '.$source_dir), $tmp_output, $retval); + } } + if($retval == 0){ chown($mail_backup_dir.'/'.$mail_backup_file, $backupusername); chgrp($mail_backup_dir.'/'.$mail_backup_file, $backupgroup); @@ -141,6 +165,10 @@ class cronjob_backup_mail extends cronjob { } else { /* Backup failed - remove archive */ if(is_file($mail_backup_dir.'/'.$mail_backup_file)) unlink($mail_backup_dir.'/'.$mail_backup_file); + // And remove backup-mdbox + if ($rec['maildir_format'] == 'mdbox') { + if(file_exists($rec['maildir'].'/backup')) exec("su -c 'rm -rf ".$rec['maildir']."/backup'"); + } $app->log($mail_backup_file.' NOK:'.implode('',$tmp_output), LOGLEVEL_DEBUG); } /* Remove old backups */ diff --git a/server/plugins-available/backup_plugin.inc.php b/server/plugins-available/backup_plugin.inc.php index 5b46930b1..380b7de2f 100644 --- a/server/plugins-available/backup_plugin.inc.php +++ b/server/plugins-available/backup_plugin.inc.php @@ -204,27 +204,68 @@ class backup_plugin { chown($domain_dir, $mail_config['mailuser_name']); chgrp($domain_dir, $mail_config['mailuser_group']); } + if (!is_dir($record['maildir'])) { + mkdir($record['maildir'], 0700); //* never create the full path + chown($record['maildir'], $mail_config['mailuser_name']); + chgrp($record['maildir'], $mail_config['mailuser_group']); + } - if(file_exists($mail_backup_file) && $record['homedir'] != '' && $record['homedir'] != '/' && !stristr($mail_backup_file,'..') && !stristr($mail_backup_file,'etc') && $mail_config['homedir_path'] == $record['homedir'] && is_dir($domain_dir)) { - if($mail_backup['backup_mode'] == 'userzip') { - copy($mail_backup_file, $domain_dir.'/'.$mail_backup['filename']); - chgrp($domain_dir.'/'.$mail_backup['filename'], $mail_config['mailuser_group']); - $command = 'sudo -u '.$mail_config['mailuser_name'].' unzip -qq -o '.escapeshellarg($domain_dir.'/'.$mail_backup['filename']).' -d '.escapeshellarg($domain_dir).' 2> /dev/null'; - exec($command,$tmp_output, $retval); - unlink($domain_dir.'/'.$mail_backup['filename']); + if(file_exists($mail_backup_file) && $record['homedir'] != '' && $record['homedir'] != '/' && !stristr($mail_backup_file,'..') && !stristr($mail_backup_file,'etc') && $mail_config['homedir_path'] == $record['homedir'] && is_dir($domain_dir) && is_dir($record['maildir'])) { + if ($record['maildir_format'] == 'mdbox') { + $retval = -1; + // First unzip backupfile to local backup-folder + if($mail_backup['backup_mode'] == 'userzip') { + copy($mail_backup_file, $record['maildir'].'/'.$mail_backup['filename']); + chgrp($record['maildir'].'/'.$mail_backup['filename'], $mail_config['mailuser_group']); + $command = 'sudo -u '.$mail_config['mailuser_name'].' unzip -qq -o '.escapeshellarg($record['maildir'].'/'.$mail_backup['filename']).' -d '.escapeshellarg($record['maildir']).' 2> /dev/null'; + exec($command,$tmp_output, $retval); + unlink($record['maildir'].'/'.$mail_backup['filename']); + } + if($mail_backup['backup_mode'] == 'rootgz') { + $command='tar xfz '.escapeshellarg($mail_backup_file).' --directory '.escapeshellarg($record['maildir']); + exec($command,$tmp_output, $retval); + } + + if($retval == 0) { + // Now import backup-mailbox into special backup-folder + $backupname = "backup-".date("Y-m-d", $mail_backup['tstamp']); + exec("doveadm mailbox create -u \"".$record["email"]."\" $backupname"); + exec("doveadm import -u \"".$record["email"]."\" mdbox:".$record['maildir']."/backup $backupname all", $tmp_output, $retval); + exec("for f in `doveadm mailbox list -u \"".$record["email"]."\" $backupname*`; do doveadm mailbox subscribe -u \"".$record["email"]."\" \$f; done", $tmp_output, $retval); + exec('rm -rf '.$record['maildir'].'/backup'); + } + if($retval == 0){ $app->log('Restored Mail backup '.$mail_backup_file,LOGLEVEL_DEBUG); } else { + // cleanup + if (file_exists($record['maildir'].'/'.$mail_backup['filename'])) unlink($record['maildir'].'/'.$mail_backup['filename']); + if (file_exists($record['maildir']."/backup")) exec('rm -rf '.$record['maildir']."/backup"); + $app->log('Unable to restore Mail backup '.$mail_backup_file.' '.$tmp_output,LOGLEVEL_ERROR); } } - if($mail_backup['backup_mode'] == 'rootgz') { - $command='tar xfz '.escapeshellarg($mail_backup_file).' --directory '.escapeshellarg($domain_dir); - exec($command,$tmp_output, $retval); - if($retval == 0){ - $app->log('Restored Mail backup '.$mail_backup_file,LOGLEVEL_DEBUG); - } else { - $app->log('Unable to restore Mail backup '.$mail_backup_file.' '.$tmp_output,LOGLEVEL_ERROR); + else { + if($mail_backup['backup_mode'] == 'userzip') { + copy($mail_backup_file, $domain_dir.'/'.$mail_backup['filename']); + chgrp($domain_dir.'/'.$mail_backup['filename'], $mail_config['mailuser_group']); + $command = 'sudo -u '.$mail_config['mailuser_name'].' unzip -qq -o '.escapeshellarg($domain_dir.'/'.$mail_backup['filename']).' -d '.escapeshellarg($domain_dir).' 2> /dev/null'; + exec($command,$tmp_output, $retval); + unlink($domain_dir.'/'.$mail_backup['filename']); + if($retval == 0){ + $app->log('Restored Mail backup '.$mail_backup_file,LOGLEVEL_DEBUG); + } else { + $app->log('Unable to restore Mail backup '.$mail_backup_file.' '.$tmp_output,LOGLEVEL_ERROR); + } + } + if($mail_backup['backup_mode'] == 'rootgz') { + $command='tar xfz '.escapeshellarg($mail_backup_file).' --directory '.escapeshellarg($domain_dir); + exec($command,$tmp_output, $retval); + if($retval == 0){ + $app->log('Restored Mail backup '.$mail_backup_file,LOGLEVEL_DEBUG); + } else { + $app->log('Unable to restore Mail backup '.$mail_backup_file.' '.$tmp_output,LOGLEVEL_ERROR); + } } } } diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php index 9b94fc20c..faa89f1cd 100644 --- a/server/plugins-available/mail_plugin.inc.php +++ b/server/plugins-available/mail_plugin.inc.php @@ -130,67 +130,80 @@ class mail_plugin { $app->log('Created Directory: '.$base_path, LOGLEVEL_DEBUG); } - // Dovecot uses a different mail layout with a separate 'Maildir' subdirectory. - if($mail_config['pop3_imap_daemon'] == 'dovecot') { - //exec("su -c 'mkdir -p ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); - $app->system->mkdirpath($maildomain_path, 0700, $user, $group); - $app->log('Created Directory: '.$maildomain_path, LOGLEVEL_DEBUG); - $maildomain_path .= '/Maildir'; + if ($data['new']['maildir_format'] == 'mdbox') { + exec("su -c 'doveadm mailbox create -u \"".$data["new"]["email"]."\" INBOX'"); + exec("su -c 'doveadm mailbox create -u \"".$data["new"]["email"]."\" Sent'"); + exec("su -c 'doveadm mailbox create -u \"".$data["new"]["email"]."\" Trash'"); + exec("su -c 'doveadm mailbox create -u \"".$data["new"]["email"]."\" Junk'"); + exec("su -c 'doveadm mailbox create -u \"".$data["new"]["email"]."\" Drafts'"); + + exec("su -c 'doveadm mailbox subscribe -u \"".$data["new"]["email"]."\" INBOX'"); + exec("su -c 'doveadm mailbox subscribe -u \"".$data["new"]["email"]."\" Sent'"); + exec("su -c 'doveadm mailbox subscribe -u \"".$data["new"]["email"]."\" Trash'"); + exec("su -c 'doveadm mailbox subscribe -u \"".$data["new"]["email"]."\" Junk'"); + exec("su -c 'doveadm mailbox subscribe -u \"".$data["new"]["email"]."\" Drafts'"); } - - //* When the mail user dir exists but it is not a valid maildir, move it to corrupted maildir folder - if(!empty($maildomain_path) && is_dir($maildomain_path) && !is_dir($maildomain_path.'/new') && !is_dir($maildomain_path.'/cur')) { - if(!is_dir($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'])) $app->system->mkdirpath($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'], 0700, $mail_config['mailuser_name'], $mail_config['mailuser_group']); - exec("su -c 'mv -f ".escapeshellcmd($data['new']['maildir'])." ".$mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id']."' vmail"); - $app->log('Moved invalid maildir to corrupted Maildirs folder: '.escapeshellcmd($data['new']['maildir']), LOGLEVEL_WARN); - } - - //* Create the maildir, if it doesn not exist, set permissions, set quota. - if(!empty($maildomain_path) && !is_dir($maildomain_path)) { - - //exec("su -c 'maildirmake ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); - $app->system->maildirmake($maildomain_path, $user, '', $group); - - //* This is to fix the maildrop quota not being rebuilt after the quota is changed. - if($mail_config['pop3_imap_daemon'] != 'dovecot') { - if(is_dir($maildomain_path)) exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($maildomain_path)."' ".$user); // Avoid maildirmake quota bug, see debian bug #214911 - $app->log('Created Maildir: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($maildomain_path)."' ".$user, LOGLEVEL_DEBUG); + else { + // Dovecot uses a different mail layout with a separate 'Maildir' subdirectory. + if($mail_config['pop3_imap_daemon'] == 'dovecot') { + $app->system->mkdirpath($maildomain_path, 0700, $user, $group); + $app->log('Created Directory: '.$maildomain_path, LOGLEVEL_DEBUG); + $maildomain_path .= '/Maildir'; } - } - - if(!is_dir($data['new']['maildir'].'/.Sent')) { - //exec("su -c 'maildirmake -f Sent ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); - //$app->log('Created submaildir Sent: '."su -c 'maildirmake -f Sent ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); - $app->system->maildirmake($maildomain_path, $user, 'Sent', $group); - } - if(!is_dir($data['new']['maildir'].'/.Drafts')) { - //exec("su -c 'maildirmake -f Drafts ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); - //$app->log('Created submaildir Drafts: '."su -c 'maildirmake -f Drafts ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); - $app->system->maildirmake($maildomain_path, $user, 'Drafts', $group); - } - if(!is_dir($data['new']['maildir'].'/.Trash')) { - //exec("su -c 'maildirmake -f Trash ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); - //$app->log('Created submaildir Trash: '."su -c 'maildirmake -f Trash ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); - $app->system->maildirmake($maildomain_path, $user, 'Trash', $group); - } - if(!is_dir($data['new']['maildir'].'/.Junk')) { - //exec("su -c 'maildirmake -f Junk ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); - //$app->log('Created submaildir Junk: '."su -c 'maildirmake -f Junk ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); - $app->system->maildirmake($maildomain_path, $user, 'Junk', $group); - } - - // Set permissions now recursive - exec('chown -R '.$user.':'.$group.' '.escapeshellcmd($data['new']['maildir'])); - $app->log('Set ownership on '.escapeshellcmd($data['new']['maildir']), LOGLEVEL_DEBUG); - - //* Set the maildir quota - if(is_dir($data['new']['maildir'].'/new') && $mail_config['pop3_imap_daemon'] != 'dovecot') { - if($data['new']['quota'] > 0) { - if(is_dir($data['new']['maildir'])) exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$user); - $app->log('Set Maildir quota: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$user, LOGLEVEL_DEBUG); + + //* When the mail user dir exists but it is not a valid maildir, move it to corrupted maildir folder + if(!empty($maildomain_path) && is_dir($maildomain_path) && !is_dir($maildomain_path.'/new') && !is_dir($maildomain_path.'/cur')) { + if(!is_dir($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'])) $app->system->mkdirpath($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'], 0700, $mail_config['mailuser_name'], $mail_config['mailuser_group']); + exec("su -c 'mv -f ".escapeshellcmd($data['new']['maildir'])." ".$mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id']."' vmail"); + $app->log('Moved invalid maildir to corrupted Maildirs folder: '.escapeshellcmd($data['new']['maildir']), LOGLEVEL_WARN); + } + + //* Create the maildir, if it doesn not exist, set permissions, set quota. + if(!empty($maildomain_path) && !is_dir($maildomain_path)) { + + //exec("su -c 'maildirmake ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); + $app->system->maildirmake($maildomain_path, $user, '', $group); + + //* This is to fix the maildrop quota not being rebuilt after the quota is changed. + if($mail_config['pop3_imap_daemon'] != 'dovecot') { + if(is_dir($maildomain_path)) exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($maildomain_path)."' ".$user); // Avoid maildirmake quota bug, see debian bug #214911 + $app->log('Created Maildir: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($maildomain_path)."' ".$user, LOGLEVEL_DEBUG); + } + } + + if(!is_dir($data['new']['maildir'].'/.Sent')) { + //exec("su -c 'maildirmake -f Sent ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); + //$app->log('Created submaildir Sent: '."su -c 'maildirmake -f Sent ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); + $app->system->maildirmake($maildomain_path, $user, 'Sent', $group); + } + if(!is_dir($data['new']['maildir'].'/.Drafts')) { + //exec("su -c 'maildirmake -f Drafts ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); + //$app->log('Created submaildir Drafts: '."su -c 'maildirmake -f Drafts ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); + $app->system->maildirmake($maildomain_path, $user, 'Drafts', $group); + } + if(!is_dir($data['new']['maildir'].'/.Trash')) { + //exec("su -c 'maildirmake -f Trash ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); + //$app->log('Created submaildir Trash: '."su -c 'maildirmake -f Trash ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); + $app->system->maildirmake($maildomain_path, $user, 'Trash', $group); + } + if(!is_dir($data['new']['maildir'].'/.Junk')) { + //exec("su -c 'maildirmake -f Junk ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); + //$app->log('Created submaildir Junk: '."su -c 'maildirmake -f Junk ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); + $app->system->maildirmake($maildomain_path, $user, 'Junk', $group); + } + + // Set permissions now recursive + exec('chown -R '.$user.':'.$group.' '.escapeshellcmd($data['new']['maildir'])); + $app->log('Set ownership on '.escapeshellcmd($data['new']['maildir']), LOGLEVEL_DEBUG); + + //* Set the maildir quota + if(is_dir($data['new']['maildir'].'/new') && $mail_config['pop3_imap_daemon'] != 'dovecot') { + if($data['new']['quota'] > 0) { + if(is_dir($data['new']['maildir'])) exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$user); + $app->log('Set Maildir quota: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$user, LOGLEVEL_DEBUG); + } } } - //* Send the welcome email message if(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$conf['language'].'.txt')) { @@ -252,6 +265,9 @@ class mail_plugin { } */ + // Maildir-Format must not be changed on this way !! + $data['new']['maildir_format'] = $data['old']['maildir_format']; + $maildomain_path = $data['new']['maildir']; $tmp_basepath = $data['new']['maildir']; $tmp_basepath_parts = explode('/', $tmp_basepath); @@ -296,86 +312,117 @@ class mail_plugin { $app->log('Created Directory: '.$base_path, LOGLEVEL_DEBUG); } - // Dovecot uses a different mail layout with a separate 'Maildir' subdirectory. - if($mail_config['pop3_imap_daemon'] == 'dovecot') { - $app->system->mkdirpath($maildomain_path, 0700, $user, $group); - $app->log('Created Directory: '.$base_path, LOGLEVEL_DEBUG); - $maildomain_path .= '/Maildir'; - } - - //* When the mail user dir exists but it is not a valid maildir, move it to corrupted maildir folder - if(!empty($maildomain_path) && is_dir($maildomain_path) && !is_dir($maildomain_path.'/new') && !is_dir($maildomain_path.'/cur')) { - if(!is_dir($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'])) $app->system->mkdirpath($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'], 0700, $mail_config['mailuser_name'], $mail_config['mailuser_group']); - exec("su -c 'mv -f ".escapeshellcmd($data['new']['maildir'])." ".$mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id']."' vmail"); - $app->log('Moved invalid maildir to corrupted Maildirs folder: '.escapeshellcmd($data['new']['maildir']), LOGLEVEL_WARN); + if ($data['new']['maildir_format'] == 'mdbox') { + // Move mailbox, if domain has changed and delete old mailbox + if($data['new']['maildir'] != $data['old']['maildir'] && is_dir($data['old']['maildir'])) { + if(is_dir($data['new']['maildir'])) { + exec("rm -fr ".escapeshellcmd($data['new']['maildir'])); + //rmdir($data['new']['maildir']); + } + exec('mv -f '.escapeshellcmd($data['old']['maildir']).' '.escapeshellcmd($data['new']['maildir'])); + // exec('mv -f '.escapeshellcmd($data['old']['maildir']).'/* '.escapeshellcmd($data['new']['maildir'])); + // if(is_file($data['old']['maildir'].'.ispconfig_mailsize'))exec('mv -f '.escapeshellcmd($data['old']['maildir']).'.ispconfig_mailsize '.escapeshellcmd($data['new']['maildir'])); + // rmdir($data['old']['maildir']); + $app->log('Moved Maildir from: '.$data['old']['maildir'].' to '.$data['new']['maildir'], LOGLEVEL_DEBUG); + } + + //* Create the maildir, if it doesn not exist, set permissions, set quota. + if(!is_dir($data['new']['maildir'].'/mdbox')) { + exec("su -c 'doveadm mailbox create -u \"".$data["new"]["email"]."\" INBOX'"); + exec("su -c 'doveadm mailbox create -u \"".$data["new"]["email"]."\" Sent'"); + exec("su -c 'doveadm mailbox create -u \"".$data["new"]["email"]."\" Trash'"); + exec("su -c 'doveadm mailbox create -u \"".$data["new"]["email"]."\" Junk'"); + exec("su -c 'doveadm mailbox create -u \"".$data["new"]["email"]."\" Drafts'"); + + exec("su -c 'doveadm mailbox subscribe -u \"".$data["new"]["email"]."\" INBOX'"); + exec("su -c 'doveadm mailbox subscribe -u \"".$data["new"]["email"]."\" Sent'"); + exec("su -c 'doveadm mailbox subscribe -u \"".$data["new"]["email"]."\" Trash'"); + exec("su -c 'doveadm mailbox subscribe -u \"".$data["new"]["email"]."\" Junk'"); + exec("su -c 'doveadm mailbox subscribe -u \"".$data["new"]["email"]."\" Drafts'"); + } } - - //* Create the maildir, if it doesn not exist, set permissions, set quota. - if(!empty($maildomain_path) && !is_dir($maildomain_path.'/new')) { - //exec("su -c 'maildirmake ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); - //$app->log("Created Maildir "."su -c 'maildirmake ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); - $app->system->maildirmake($maildomain_path, $user, '', $group); - - //* This is to fix the maildrop quota not being rebuilt after the quota is changed. - if($mail_config['pop3_imap_daemon'] != 'dovecot') { + else { + // Dovecot uses a different mail layout with a separate 'Maildir' subdirectory. + if($mail_config['pop3_imap_daemon'] == 'dovecot') { + $app->system->mkdirpath($maildomain_path, 0700, $user, $group); + $app->log('Created Directory: '.$base_path, LOGLEVEL_DEBUG); + $maildomain_path .= '/Maildir'; + } + + //* When the mail user dir exists but it is not a valid maildir, move it to corrupted maildir folder + if(!empty($maildomain_path) && is_dir($maildomain_path) && !is_dir($maildomain_path.'/new') && !is_dir($maildomain_path.'/cur')) { + if(!is_dir($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'])) $app->system->mkdirpath($mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id'], 0700, $mail_config['mailuser_name'], $mail_config['mailuser_group']); + exec("su -c 'mv -f ".escapeshellcmd($data['new']['maildir'])." ".$mail_config['homedir_path'].'/corrupted/'.$data['new']['mailuser_id']."' vmail"); + $app->log('Moved invalid maildir to corrupted Maildirs folder: '.escapeshellcmd($data['new']['maildir']), LOGLEVEL_WARN); + } + + //* Create the maildir, if it doesn not exist, set permissions, set quota. + if(!empty($maildomain_path) && !is_dir($maildomain_path.'/new')) { + //exec("su -c 'maildirmake ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); + //$app->log("Created Maildir "."su -c 'maildirmake ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); + $app->system->maildirmake($maildomain_path, $user, '', $group); + + //* This is to fix the maildrop quota not being rebuilt after the quota is changed. + if($mail_config['pop3_imap_daemon'] != 'dovecot') { + if($data['new']['quota'] > 0) { + if(is_dir($maildomain_path)) exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($maildomain_path)."' ".$user); // Avoid maildirmake quota bug, see debian bug #214911 + $app->log('Updated Maildir quota: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($maildomain_path)."' ".$user, LOGLEVEL_DEBUG); + } else { + if(file_exists($data['new']['maildir'].'/maildirsize')) unlink($data['new']['maildir'].'/maildirsize'); + $app->log('Set Maildir quota to unlimited.', LOGLEVEL_DEBUG); + } + } + } + + if(!is_dir($data['new']['maildir'].'/.Sent')) { + //exec("su -c 'maildirmake -f Sent ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); + //$app->log('Created submaildir Sent: '."su -c 'maildirmake -f Sent ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); + $app->system->maildirmake($maildomain_path, $user, 'Sent', $group); + } + if(!is_dir($data['new']['maildir'].'/.Drafts')) { + //exec("su -c 'maildirmake -f Drafts ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); + //$app->log('Created submaildir Drafts: '."su -c 'maildirmake -f Drafts ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); + $app->system->maildirmake($maildomain_path, $user, 'Drafts', $group); + } + if(!is_dir($data['new']['maildir'].'/.Trash')) { + //exec("su -c 'maildirmake -f Trash ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); + //$app->log('Created submaildir Trash: '."su -c 'maildirmake -f Trash ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); + $app->system->maildirmake($maildomain_path, $user, 'Trash', $group); + } + if(!is_dir($data['new']['maildir'].'/.Junk')) { + //exec("su -c 'maildirmake -f Junk ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); + //$app->log('Created submaildir Junk: '."su -c 'maildirmake -f Junk ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); + $app->system->maildirmake($maildomain_path, $user, 'Junk', $group); + } + + // Set permissions now recursive + exec('chown -R '.$user.':'.$group.' '.escapeshellcmd($data['new']['maildir'])); + $app->log('Set ownership on '.escapeshellcmd($data['new']['maildir']), LOGLEVEL_DEBUG); + + // Move mailbox, if domain has changed and delete old mailbox + if($data['new']['maildir'] != $data['old']['maildir'] && is_dir($data['old']['maildir'])) { + if(is_dir($data['new']['maildir'])) { + exec("rm -fr ".escapeshellcmd($data['new']['maildir'])); + //rmdir($data['new']['maildir']); + } + exec('mv -f '.escapeshellcmd($data['old']['maildir']).' '.escapeshellcmd($data['new']['maildir'])); + // exec('mv -f '.escapeshellcmd($data['old']['maildir']).'/* '.escapeshellcmd($data['new']['maildir'])); + // if(is_file($data['old']['maildir'].'.ispconfig_mailsize'))exec('mv -f '.escapeshellcmd($data['old']['maildir']).'.ispconfig_mailsize '.escapeshellcmd($data['new']['maildir'])); + // rmdir($data['old']['maildir']); + $app->log('Moved Maildir from: '.$data['old']['maildir'].' to '.$data['new']['maildir'], LOGLEVEL_DEBUG); + } + //This is to fix the maildrop quota not being rebuilt after the quota is changed. + // Courier Layout + if(is_dir($data['new']['maildir'].'/new') && $mail_config['pop3_imap_daemon'] != 'dovecot') { if($data['new']['quota'] > 0) { - if(is_dir($maildomain_path)) exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($maildomain_path)."' ".$user); // Avoid maildirmake quota bug, see debian bug #214911 - $app->log('Updated Maildir quota: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($maildomain_path)."' ".$user, LOGLEVEL_DEBUG); + if(is_dir($data['new']['maildir'])) exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$user); + $app->log('Updated Maildir quota: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$user, LOGLEVEL_DEBUG); } else { if(file_exists($data['new']['maildir'].'/maildirsize')) unlink($data['new']['maildir'].'/maildirsize'); $app->log('Set Maildir quota to unlimited.', LOGLEVEL_DEBUG); } } } - - if(!is_dir($data['new']['maildir'].'/.Sent')) { - //exec("su -c 'maildirmake -f Sent ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); - //$app->log('Created submaildir Sent: '."su -c 'maildirmake -f Sent ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); - $app->system->maildirmake($maildomain_path, $user, 'Sent', $group); - } - if(!is_dir($data['new']['maildir'].'/.Drafts')) { - //exec("su -c 'maildirmake -f Drafts ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); - //$app->log('Created submaildir Drafts: '."su -c 'maildirmake -f Drafts ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); - $app->system->maildirmake($maildomain_path, $user, 'Drafts', $group); - } - if(!is_dir($data['new']['maildir'].'/.Trash')) { - //exec("su -c 'maildirmake -f Trash ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); - //$app->log('Created submaildir Trash: '."su -c 'maildirmake -f Trash ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); - $app->system->maildirmake($maildomain_path, $user, 'Trash', $group); - } - if(!is_dir($data['new']['maildir'].'/.Junk')) { - //exec("su -c 'maildirmake -f Junk ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name']); - //$app->log('Created submaildir Junk: '."su -c 'maildirmake -f Junk ".escapeshellcmd($maildomain_path)."' ".$mail_config['mailuser_name'],LOGLEVEL_DEBUG); - $app->system->maildirmake($maildomain_path, $user, 'Junk', $group); - } - - // Set permissions now recursive - exec('chown -R '.$user.':'.$group.' '.escapeshellcmd($data['new']['maildir'])); - $app->log('Set ownership on '.escapeshellcmd($data['new']['maildir']), LOGLEVEL_DEBUG); - - // Move mailbox, if domain has changed and delete old mailbox - if($data['new']['maildir'] != $data['old']['maildir'] && is_dir($data['old']['maildir'])) { - if(is_dir($data['new']['maildir'])) { - exec("rm -fr ".escapeshellcmd($data['new']['maildir'])); - //rmdir($data['new']['maildir']); - } - exec('mv -f '.escapeshellcmd($data['old']['maildir']).' '.escapeshellcmd($data['new']['maildir'])); - // exec('mv -f '.escapeshellcmd($data['old']['maildir']).'/* '.escapeshellcmd($data['new']['maildir'])); - // if(is_file($data['old']['maildir'].'.ispconfig_mailsize'))exec('mv -f '.escapeshellcmd($data['old']['maildir']).'.ispconfig_mailsize '.escapeshellcmd($data['new']['maildir'])); - // rmdir($data['old']['maildir']); - $app->log('Moved Maildir from: '.$data['old']['maildir'].' to '.$data['new']['maildir'], LOGLEVEL_DEBUG); - } - //This is to fix the maildrop quota not being rebuilt after the quota is changed. - // Courier Layout - if(is_dir($data['new']['maildir'].'/new') && $mail_config['pop3_imap_daemon'] != 'dovecot') { - if($data['new']['quota'] > 0) { - if(is_dir($data['new']['maildir'])) exec("su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$user); - $app->log('Updated Maildir quota: '."su -c 'maildirmake -q ".$data['new']['quota']."S ".escapeshellcmd($data['new']['maildir'])."' ".$user, LOGLEVEL_DEBUG); - } else { - if(file_exists($data['new']['maildir'].'/maildirsize')) unlink($data['new']['maildir'].'/maildirsize'); - $app->log('Set Maildir quota to unlimited.', LOGLEVEL_DEBUG); - } - } } function user_delete($event_name, $data) { -- GitLab From 465dd856212f0f7dc0e57087a7a54a3b46263dab Mon Sep 17 00:00:00 2001 From: Dominik Date: Sat, 25 Apr 2015 14:26:29 +0200 Subject: [PATCH 247/287] purge mdboxes nightly --- .../cron.d/600-purge_mailboxes.inc.php | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 server/lib/classes/cron.d/600-purge_mailboxes.inc.php diff --git a/server/lib/classes/cron.d/600-purge_mailboxes.inc.php b/server/lib/classes/cron.d/600-purge_mailboxes.inc.php new file mode 100644 index 000000000..181dd517f --- /dev/null +++ b/server/lib/classes/cron.d/600-purge_mailboxes.inc.php @@ -0,0 +1,77 @@ +db->queryAllRecords($sql); + + if(is_array($records)) { + foreach($records as $rec){ + exec("su -c 'doveadm purge -u \"".$rec["email"]."\"'"); + } + } + + parent::onRunJob(); + } + + /* this function is optional if it contains no custom code */ + public function onAfterRun() { + global $app; + + parent::onAfterRun(); + } + +} + +?> -- GitLab From ffb04de2302e6cc71c0aa80e6e1fa2ee73a6a3c9 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Sat, 25 Apr 2015 17:11:28 +0200 Subject: [PATCH 248/287] - Changed password generation function - Fixed password length in lost password function --- interface/lib/classes/auth.inc.php | 41 ++++++++++++++++++++++---- interface/web/login/password_reset.php | 8 +++-- 2 files changed, 42 insertions(+), 7 deletions(-) diff --git a/interface/lib/classes/auth.inc.php b/interface/lib/classes/auth.inc.php index ae626b7e6..9640a4b3e 100644 --- a/interface/lib/classes/auth.inc.php +++ b/interface/lib/classes/auth.inc.php @@ -174,13 +174,44 @@ class auth { } - public function get_random_password($length = 8) { - $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + public function get_random_password($minLength = 8, $special = false) { + $minLength = $minLength || 10; + if($minLength < 8) $minLength = 8; + $maxLength = $minLength + 5; + $length = mt_rand($minLength, $maxLength); + + $alphachars = "abcdefghijklmnopqrstuvwxyz"; + $upperchars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + $numchars = "1234567890"; + $specialchars = "!@#_"; + + $num_special = 0; + if($special == true) { + $num_special = intval(mt_rand(0, round($length / 4))) + 1; + } + $numericlen = mt_rand(1, 2); + $alphalen = $length - $num_special - $numericlen; + $upperlen = intval($alphalen / 2); + $alphalen = $alphalen - $upperlen; $password = ''; - for ($n=0;$n<$length;$n++) { - $password.=$base64_alphabet[mt_rand(0, 63)]; + + for($i = 0; $i < $alphalen; $i++) { + $password .= substr($alphachars, mt_rand(0, strlen($alphachars) - 1), 1); + } + + for($i = 0; $i < $upperlen; $i++) { + $password .= substr($upperchars, mt_rand(0, strlen($upperchars) - 1), 1); + } + + for($i = 0; $i < $num_special; $i++) { + $password .= substr($specialchars, mt_rand(0, strlen($specialchars) - 1), 1); } - return $password; + + for($i = 0; $i < $numericlen; $i++) { + $password .= substr($numchars, mt_rand(0, strlen($numchars) - 1), 1); + } + + return str_shuffle($password); } public function crypt_password($cleartext_password) { diff --git a/interface/web/login/password_reset.php b/interface/web/login/password_reset.php index 96259349d..683a4bc03 100644 --- a/interface/web/login/password_reset.php +++ b/interface/web/login/password_reset.php @@ -60,7 +60,11 @@ if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != ' $app->tpl->setVar("error", $wb['lost_password_function_disabled_txt']); } else { if($client['client_id'] > 0) { - $new_password = $app->auth->get_random_password(); + $server_config_array = $app->getconf->get_global_config(); + $min_password_length = 8; + if(isset($server_config_array['misc']['min_password_length'])) $min_password_length = $server_config_array['misc']['min_password_length']; + + $new_password = $app->auth->get_random_password($min_password_length, true); $new_password_encrypted = $app->auth->crypt_password($new_password); $username = $client['username']; @@ -69,7 +73,7 @@ if(isset($_POST['username']) && $_POST['username'] != '' && $_POST['email'] != ' $app->tpl->setVar("message", $wb['pw_reset']); $app->uses('getconf,ispcmail'); - $mail_config = $app->getconf->get_global_config('mail'); + $mail_config = $server_config_array['mail']; if($mail_config['smtp_enabled'] == 'y') { $mail_config['use_smtp'] = true; $app->ispcmail->setOptions($mail_config); -- GitLab From 8ac67ceafbbc0bb330ec96244f0a0d52868318ea Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Sun, 26 Apr 2015 20:22:18 +0200 Subject: [PATCH 249/287] - fixed typo --- server/plugins-available/firewall_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/firewall_plugin.inc.php b/server/plugins-available/firewall_plugin.inc.php index 2cca769fd..d3538cc01 100644 --- a/server/plugins-available/firewall_plugin.inc.php +++ b/server/plugins-available/firewall_plugin.inc.php @@ -38,7 +38,7 @@ class firewall_plugin { public function onInstall() { global $conf; - if($conf['bastille']['installed'] = true && $conf['services']['firewall'] == true) { + if($conf['bastille']['installed'] == true && $conf['services']['firewall'] == true) { return true; } else { return false; -- GitLab From 19684b3003890fb4fda4d14ea6a7be9d47209921 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Sun, 26 Apr 2015 20:22:47 +0200 Subject: [PATCH 250/287] - ported patch --- interface/web/monitor/list/datalog.list.php | 8 ++++---- interface/web/monitor/list/log.list.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/interface/web/monitor/list/datalog.list.php b/interface/web/monitor/list/datalog.list.php index 81326e32a..3164b7ffd 100644 --- a/interface/web/monitor/list/datalog.list.php +++ b/interface/web/monitor/list/datalog.list.php @@ -55,11 +55,11 @@ $liste["item"][] = array( 'field' => "tstamp", $liste['item'][] = array( 'field' => 'server_id', - 'datatype' => 'VARCHAR', + 'datatype' => 'INTEGER', 'formtype' => 'SELECT', - 'op' => 'like', - 'prefix' => '%', - 'suffix' => '%', + 'op' => '=', + 'prefix' => '', + 'suffix' => '', 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', 'keyfield'=> 'server_id', diff --git a/interface/web/monitor/list/log.list.php b/interface/web/monitor/list/log.list.php index 49e0a08f3..26c898eea 100644 --- a/interface/web/monitor/list/log.list.php +++ b/interface/web/monitor/list/log.list.php @@ -54,11 +54,11 @@ $liste["item"][] = array( 'field' => "tstamp", $liste['item'][] = array( 'field' => 'server_id', - 'datatype' => 'VARCHAR', + 'datatype' => 'INTEGER', 'formtype' => 'SELECT', - 'op' => 'like', - 'prefix' => '%', - 'suffix' => '%', + 'op' => '=', + 'prefix' => '', + 'suffix' => '', 'datasource' => array ( 'type' => 'SQL', 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', 'keyfield'=> 'server_id', -- GitLab From ab79c2c487ddcf9cd730a4c43a87159559e463d6 Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Sun, 26 Apr 2015 20:23:25 +0200 Subject: [PATCH 251/287] - ported patch --- server/plugins-available/apache2_plugin.inc.php | 9 +++++++-- server/plugins-available/nginx_plugin.inc.php | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 34a08e3ae..e518f45cb 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1423,6 +1423,7 @@ class apache2_plugin { } else { $pool_dir = $custom_php_fpm_pool_dir; } + $pool_dir = trim($pool_dir); if(substr($pool_dir, -1) != '/') $pool_dir .= '/'; $pool_name = 'web'.$data['new']['domain_id']; $socket_dir = escapeshellcmd($web_config['php_fpm_socket_dir']); @@ -2862,6 +2863,7 @@ class apache2_plugin { //* Update the PHP-FPM pool configuration file private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, $socket_dir) { global $app, $conf; + $pool_dir = trim($pool_dir); //$reload = false; if($data['new']['php'] == 'php-fpm'){ @@ -3013,7 +3015,7 @@ class apache2_plugin { unset($tpl); // delete pool in all other PHP versions - $default_pool_dir = escapeshellcmd($web_config['php_fpm_pool_dir']); + $default_pool_dir = trim(escapeshellcmd($web_config['php_fpm_pool_dir'])); if(substr($default_pool_dir, -1) != '/') $default_pool_dir .= '/'; if($default_pool_dir != $pool_dir){ if ( @is_file($default_pool_dir.$pool_name.'.conf') ) { @@ -3025,6 +3027,7 @@ class apache2_plugin { $php_versions = $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 = ?", $conf["server_id"]); if(is_array($php_versions) && !empty($php_versions)){ foreach($php_versions as $php_version){ + $php_version['php_fpm_pool_dir'] = trim($php_version['php_fpm_pool_dir']); if(substr($php_version['php_fpm_pool_dir'], -1) != '/') $php_version['php_fpm_pool_dir'] .= '/'; if($php_version['php_fpm_pool_dir'] != $pool_dir){ if ( @is_file($php_version['php_fpm_pool_dir'].$pool_name.'.conf') ) { @@ -3065,6 +3068,7 @@ class apache2_plugin { } else { $pool_dir = $custom_php_fpm_pool_dir; } + $pool_dir = trim($pool_dir); if(substr($pool_dir, -1) != '/') $pool_dir .= '/'; $pool_name = 'web'.$data['old']['domain_id']; @@ -3077,7 +3081,7 @@ class apache2_plugin { } // delete pool in all other PHP versions - $default_pool_dir = escapeshellcmd($web_config['php_fpm_pool_dir']); + $default_pool_dir = trim(escapeshellcmd($web_config['php_fpm_pool_dir'])); if(substr($default_pool_dir, -1) != '/') $default_pool_dir .= '/'; if($default_pool_dir != $pool_dir){ if ( @is_file($default_pool_dir.$pool_name.'.conf') ) { @@ -3089,6 +3093,7 @@ class apache2_plugin { $php_versions = $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 = ?", $data['old']['server_id']); if(is_array($php_versions) && !empty($php_versions)){ foreach($php_versions as $php_version){ + $php_version['php_fpm_pool_dir'] = trim($php_version['php_fpm_pool_dir']); if(substr($php_version['php_fpm_pool_dir'], -1) != '/') $php_version['php_fpm_pool_dir'] .= '/'; if($php_version['php_fpm_pool_dir'] != $pool_dir){ if ( @is_file($php_version['php_fpm_pool_dir'].$pool_name.'.conf') ) { diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 30e0eb0b7..2b5073d8d 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -959,6 +959,7 @@ class nginx_plugin { } else { $pool_dir = $custom_php_fpm_pool_dir; } + $pool_dir = trim($pool_dir); if(substr($pool_dir, -1) != '/') $pool_dir .= '/'; $pool_name = 'web'.$data['new']['domain_id']; $socket_dir = escapeshellcmd($web_config['php_fpm_socket_dir']); @@ -2418,6 +2419,7 @@ class nginx_plugin { //* Update the PHP-FPM pool configuration file private function php_fpm_pool_update ($data, $web_config, $pool_dir, $pool_name, $socket_dir) { global $app, $conf; + $pool_dir = trim($pool_dir); /* if(trim($data['new']['fastcgi_php_version']) != ''){ $default_php_fpm = false; @@ -2570,7 +2572,7 @@ class nginx_plugin { unset($tpl); // delete pool in all other PHP versions - $default_pool_dir = escapeshellcmd($web_config['php_fpm_pool_dir']); + $default_pool_dir = trim(escapeshellcmd($web_config['php_fpm_pool_dir'])); if(substr($default_pool_dir, -1) != '/') $default_pool_dir .= '/'; if($default_pool_dir != $pool_dir){ if ( @is_file($default_pool_dir.$pool_name.'.conf') ) { @@ -2582,6 +2584,7 @@ class nginx_plugin { $php_versions = $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 = ?", $conf["server_id"]); if(is_array($php_versions) && !empty($php_versions)){ foreach($php_versions as $php_version){ + $php_version['php_fpm_pool_dir'] = trim($php_version['php_fpm_pool_dir']); if(substr($php_version['php_fpm_pool_dir'], -1) != '/') $php_version['php_fpm_pool_dir'] .= '/'; if($php_version['php_fpm_pool_dir'] != $pool_dir){ if ( @is_file($php_version['php_fpm_pool_dir'].$pool_name.'.conf') ) { @@ -2618,6 +2621,7 @@ class nginx_plugin { } else { $pool_dir = $custom_php_fpm_pool_dir; } + $pool_dir = trim($pool_dir); if(substr($pool_dir, -1) != '/') $pool_dir .= '/'; $pool_name = 'web'.$data['old']['domain_id']; @@ -2628,7 +2632,7 @@ class nginx_plugin { } // delete pool in all other PHP versions - $default_pool_dir = escapeshellcmd($web_config['php_fpm_pool_dir']); + $default_pool_dir = trim(escapeshellcmd($web_config['php_fpm_pool_dir'])); if(substr($default_pool_dir, -1) != '/') $default_pool_dir .= '/'; if($default_pool_dir != $pool_dir){ if ( @is_file($default_pool_dir.$pool_name.'.conf') ) { @@ -2640,6 +2644,7 @@ class nginx_plugin { $php_versions = $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 = ?", $data['old']['server_id']); if(is_array($php_versions) && !empty($php_versions)){ foreach($php_versions as $php_version){ + $php_version['php_fpm_pool_dir'] = trim($php_version['php_fpm_pool_dir']); if(substr($php_version['php_fpm_pool_dir'], -1) != '/') $php_version['php_fpm_pool_dir'] .= '/'; if($php_version['php_fpm_pool_dir'] != $pool_dir){ if ( @is_file($php_version['php_fpm_pool_dir'].$pool_name.'.conf') ) { -- GitLab From 6a61a1a579725676bdca7fb2ae526d15cdfa3238 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Sun, 26 Apr 2015 21:05:04 +0200 Subject: [PATCH 252/287] Added Debian Jessie to version detection code. --- install/lib/install.lib.php | 6 ++++++ server/lib/classes/monitor_tools.inc.php | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 9bd0e1d2b..113d7eaa1 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -178,6 +178,12 @@ function get_distname() { $distid = 'debian60'; $distbaseid = 'debian'; swriteln("Operating System: Debian 7.0 (Wheezy/Sid) or compatible\n"); + } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '8') || substr(trim(file_get_contents('/etc/debian_version')),0,1) == '8') { + $distname = 'Debian'; + $distver = 'Jessie'; + $distid = 'debian60'; + $distbaseid = 'debian'; + swriteln("Operating System: Debian 8.0 (Jessie) or compatible\n"); } else { $distname = 'Debian'; $distver = 'Unknown'; diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index f4e4507c2..aa1875e9d 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -149,6 +149,11 @@ class monitor_tools { $distver = 'Wheezy/Sid'; $distid = 'debian60'; $distbaseid = 'debian'; + } elseif(strstr(trim(file_get_contents('/etc/debian_version')), '8') || substr(trim(file_get_contents('/etc/debian_version')),0,1) == '8') { + $distname = 'Debian'; + $distver = 'Jessie'; + $distid = 'debian60'; + $distbaseid = 'debian'; } else { $distname = 'Debian'; $distver = 'Unknown'; -- GitLab From a6f6b63552a4e91818249b6a5331fbc4e9d96974 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Sun, 26 Apr 2015 21:05:49 +0200 Subject: [PATCH 253/287] Allow larger ID's in module changer. --- interface/web/capp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/web/capp.php b/interface/web/capp.php index b0568ba09..39392691f 100644 --- a/interface/web/capp.php +++ b/interface/web/capp.php @@ -43,7 +43,7 @@ if($_SESSION["s"]["user"]['active'] != 1) { } if(!preg_match("/^[a-z]{2,20}$/i", $mod)) die('module name contains unallowed chars.'); -if($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,5}$/i", $redirect)) die('redirect contains unallowed chars.'); +if($redirect != '' && !preg_match("/^[a-z0-9]+\/[a-z0-9_\.\-]+\?id=[0-9]{1,9}$/i", $redirect)) die('redirect contains unallowed chars.'); //* Check if user may use the module. $user_modules = explode(",", $_SESSION["s"]["user"]["modules"]); -- GitLab From 503bbb5b05c6ec24e1c5dc7afa71cee3ab8578c2 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Mon, 27 Apr 2015 13:24:09 +0200 Subject: [PATCH 254/287] added 'features' (like nfs:on) to openvz --- install/sql/incremental/upd_dev_collection.sql | 5 ++++- install/sql/ispconfig3.sql | 4 +++- interface/lib/plugins/vm_openvz_plugin.inc.php | 6 ++++-- interface/web/vm/form/openvz_template.tform.php | 8 ++++++++ interface/web/vm/form/openvz_vm.tform.php | 8 ++++++++ interface/web/vm/lib/lang/ar_openvz_template.lng | 1 + interface/web/vm/lib/lang/ar_openvz_vm.lng | 1 + interface/web/vm/lib/lang/bg_openvz_template.lng | 1 + interface/web/vm/lib/lang/bg_openvz_vm.lng | 1 + interface/web/vm/lib/lang/br_openvz_template.lng | 1 + interface/web/vm/lib/lang/br_openvz_vm.lng | 1 + interface/web/vm/lib/lang/cz_openvz_template.lng | 1 + interface/web/vm/lib/lang/cz_openvz_vm.lng | 1 + interface/web/vm/lib/lang/de_openvz_template.lng | 1 + interface/web/vm/lib/lang/el_openvz_template.lng | 1 + interface/web/vm/lib/lang/el_openvz_vm.lng | 1 + interface/web/vm/lib/lang/en_openvz_template.lng | 3 ++- interface/web/vm/lib/lang/en_openvz_vm.lng | 3 ++- interface/web/vm/lib/lang/es_openvz_template.lng | 1 + interface/web/vm/lib/lang/es_openvz_vm.lng | 1 + interface/web/vm/lib/lang/fi_openvz_template.lng | 1 + interface/web/vm/lib/lang/fi_openvz_vm.lng | 1 + interface/web/vm/lib/lang/fr_openvz_template.lng | 1 + interface/web/vm/lib/lang/fr_openvz_vm.lng | 1 + interface/web/vm/lib/lang/hr_openvz_template.lng | 1 + interface/web/vm/lib/lang/hr_openvz_vm.lng | 1 + interface/web/vm/lib/lang/hu_openvz_template.lng | 1 + interface/web/vm/lib/lang/hu_openvz_vm.lng | 1 + interface/web/vm/lib/lang/id_openvz_template.lng | 1 + interface/web/vm/lib/lang/id_openvz_vm.lng | 1 + interface/web/vm/lib/lang/it_openvz_template.lng | 1 + interface/web/vm/lib/lang/it_openvz_vm.lng | 1 + interface/web/vm/lib/lang/ja_openvz_template.lng | 1 + interface/web/vm/lib/lang/ja_openvz_vm.lng | 1 + interface/web/vm/lib/lang/nl_openvz_template.lng | 1 + interface/web/vm/lib/lang/nl_openvz_vm.lng | 1 + interface/web/vm/lib/lang/pl_openvz_template.lng | 1 + interface/web/vm/lib/lang/pl_openvz_vm.lng | 1 + interface/web/vm/lib/lang/pt_openvz_template.lng | 1 + interface/web/vm/lib/lang/pt_openvz_vm.lng | 1 + interface/web/vm/lib/lang/ro_openvz_template.lng | 1 + interface/web/vm/lib/lang/ro_openvz_vm.lng | 1 + interface/web/vm/lib/lang/ru_openvz_template.lng | 1 + interface/web/vm/lib/lang/ru_openvz_vm.lng | 1 + interface/web/vm/lib/lang/se_openvz_template.lng | 1 + interface/web/vm/lib/lang/se_openvz_vm.lng | 1 + interface/web/vm/lib/lang/sk_openvz_template.lng | 1 + interface/web/vm/lib/lang/sk_openvz_vm.lng | 1 + interface/web/vm/lib/lang/tr_openvz_template.lng | 1 + interface/web/vm/lib/lang/tr_openvz_vm.lng | 1 + interface/web/vm/templates/openvz.conf.tpl | 1 + .../web/vm/templates/openvz_template_advanced_edit.htm | 5 ++++- interface/web/vm/templates/openvz_vm_advanced_edit.htm | 9 +++++++-- 53 files changed, 86 insertions(+), 9 deletions(-) diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index 280231472..3b6deb6e2 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -140,4 +140,7 @@ UPDATE `dbispconfig`.`sys_ini` SET `default_logo` = 'data:image/png;base64,iVBOR ALTER TABLE `directive_snippets` ADD `required_php_snippets` VARCHAR(255) NOT NULL DEFAULT '' AFTER `customer_viewable`; ALTER TABLE `dns_rr` CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600'; ALTER TABLE `dns_soa` CHANGE `minimum` `minimum` INT(11) UNSIGNED NOT NULL DEFAULT '3600', CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600'; -ALTER TABLE `client` CHANGE `web_php_options` `web_php_options` VARCHAR(255) NOT NULL DEFAULT 'no,fast-cgi,cgi,mod,suphp,php-fpm,hhvm'; \ No newline at end of file +ALTER TABLE `client` CHANGE `web_php_options` `web_php_options` VARCHAR(255) NOT NULL DEFAULT 'no,fast-cgi,cgi,mod,suphp,php-fpm,hhvm'; + +ALTER TABLE openvz_template ADD COLUMN `features` varchar(255) DEFAULT NULL AFTER `capability`; +ALTER TABLE openvz_vm ADD COLUMN `features` TEXT DEFAULT NULL AFTER `capability`; diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 9b8428d57..c63476276 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1087,6 +1087,7 @@ CREATE TABLE IF NOT EXISTS `openvz_template` ( `nameserver` varchar(255) DEFAULT NULL, `create_dns` varchar(1) NOT NULL DEFAULT 'n', `capability` varchar(255) DEFAULT NULL, + `features` varchar(255) DEFAULT NULL, PRIMARY KEY (`template_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; @@ -1094,7 +1095,7 @@ CREATE TABLE IF NOT EXISTS `openvz_template` ( -- Dumping data for table `openvz_template` -- -INSERT INTO `openvz_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `template_name`, `diskspace`, `traffic`, `bandwidth`, `ram`, `ram_burst`, `cpu_units`, `cpu_num`, `cpu_limit`, `io_priority`, `active`, `description`, `numproc`, `numtcpsock`, `numothersock`, `vmguarpages`, `kmemsize`, `tcpsndbuf`, `tcprcvbuf`, `othersockbuf`, `dgramrcvbuf`, `oomguarpages`, `privvmpages`, `lockedpages`, `shmpages`, `physpages`, `numfile`, `avnumproc`, `numflock`, `numpty`, `numsiginfo`, `dcachesize`, `numiptent`, `swappages`, `hostname`, `nameserver`, `create_dns`, `capability`) VALUES(1, 1, 1, 'riud', 'riud', '', 'small', 10, -1, -1, 256, 512, 1000, 4, 400, 4, 'y', '', '999999:999999', '7999992:7999992', '7999992:7999992', '65536:65536', '2147483646:2147483646', '214748160:396774400', '214748160:396774400', '214748160:396774400', '214748160:396774400', '65536:65536', '131072:131072', '999999:999999', '65536:65536', '0:2147483647', '23999976:23999976', '180:180', '999999:999999', '500000:500000', '999999:999999', '2147483646:2147483646', '999999:999999', '256000:256000', 'v{VEID}.test.tld', '8.8.8.8 8.8.4.4', 'n', ''); +INSERT INTO `openvz_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `template_name`, `diskspace`, `traffic`, `bandwidth`, `ram`, `ram_burst`, `cpu_units`, `cpu_num`, `cpu_limit`, `io_priority`, `active`, `description`, `numproc`, `numtcpsock`, `numothersock`, `vmguarpages`, `kmemsize`, `tcpsndbuf`, `tcprcvbuf`, `othersockbuf`, `dgramrcvbuf`, `oomguarpages`, `privvmpages`, `lockedpages`, `shmpages`, `physpages`, `numfile`, `avnumproc`, `numflock`, `numpty`, `numsiginfo`, `dcachesize`, `numiptent`, `swappages`, `hostname`, `nameserver`, `create_dns`, `capability`, `features`) VALUES(1, 1, 1, 'riud', 'riud', '', 'small', 10, -1, -1, 256, 512, 1000, 4, 400, 4, 'y', '', '999999:999999', '7999992:7999992', '7999992:7999992', '65536:65536', '2147483646:2147483646', '214748160:396774400', '214748160:396774400', '214748160:396774400', '214748160:396774400', '65536:65536', '131072:131072', '999999:999999', '65536:65536', '0:2147483647', '23999976:23999976', '180:180', '999999:999999', '500000:500000', '999999:999999', '2147483646:2147483646', '999999:999999', '256000:256000', 'v{VEID}.test.tld', '8.8.8.8 8.8.4.4', 'n', '', ''); -- -------------------------------------------------------- @@ -1150,6 +1151,7 @@ CREATE TABLE IF NOT EXISTS `openvz_vm` ( `nameserver` varchar(255) NOT NULL DEFAULT '8.8.8.8 8.8.4.4', `create_dns` varchar(1) NOT NULL DEFAULT 'n', `capability` text, + `features` text, `config` mediumtext, PRIMARY KEY (`vm_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; diff --git a/interface/lib/plugins/vm_openvz_plugin.inc.php b/interface/lib/plugins/vm_openvz_plugin.inc.php index dcd2df735..7cf46e63c 100644 --- a/interface/lib/plugins/vm_openvz_plugin.inc.php +++ b/interface/lib/plugins/vm_openvz_plugin.inc.php @@ -132,9 +132,10 @@ class vm_openvz_plugin { $sql .= "io_priority = ?, "; $sql .= "nameserver = ?, "; $sql .= "create_dns = ?, "; - $sql .= "capability = ? "; + $sql .= "capability = ?, "; + $sql .= "features = ? "; $sql .= "WHERE vm_id = ?"; - $app->db->query($sql, $tpl['diskspace'], $tpl['ram'], $tpl['ram_burst'], $tpl['cpu_units'], $tpl['cpu_num'], $tpl['cpu_limit'], $tpl['io_priority'], $tpl['nameserver'], $tpl['create_dns'], $tpl['capability'], $this->id); + $app->db->query($sql, $tpl['diskspace'], $tpl['ram'], $tpl['ram_burst'], $tpl['cpu_units'], $tpl['cpu_num'], $tpl['cpu_limit'], $tpl['io_priority'], $tpl['nameserver'], $tpl['create_dns'], $tpl['capability'], $tpl['features'], $this->id); } @@ -193,6 +194,7 @@ class vm_openvz_plugin { $tpl->setVar('ip_address', $vm['ip_address']); $tpl->setVar('nameserver', $vm['nameserver']); $tpl->setVar('capability', $vm['capability']); + $tpl->setVar('features', $vm['features']); $tmp = $app->db->queryOneRecord("SELECT template_file FROM openvz_ostemplate WHERE ostemplate_id = ?", $app->functions->intval($vm['ostemplate_id'])); $tpl->setVar('ostemplate', $tmp['template_file']); diff --git a/interface/web/vm/form/openvz_template.tform.php b/interface/web/vm/form/openvz_template.tform.php index ea49e3a1f..b2dcc80db 100644 --- a/interface/web/vm/form/openvz_template.tform.php +++ b/interface/web/vm/form/openvz_template.tform.php @@ -459,6 +459,14 @@ $form["tabs"]['advanced'] = array ( 'width' => '30', 'maxlength' => '255' ), + 'features' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), //################################# // ENDE Datatable fields //################################# diff --git a/interface/web/vm/form/openvz_vm.tform.php b/interface/web/vm/form/openvz_vm.tform.php index 759ba2f00..4c04846b9 100644 --- a/interface/web/vm/form/openvz_vm.tform.php +++ b/interface/web/vm/form/openvz_vm.tform.php @@ -306,6 +306,14 @@ if($_SESSION["s"]["user"]["typ"] == 'admin') { 'width' => '30', 'maxlength' => '255' ), + 'features' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'TEXT', + 'default' => '', + 'value' => '', + 'width' => '30', + 'maxlength' => '255' + ), //################################# // ENDE Datatable fields //################################# diff --git a/interface/web/vm/lib/lang/ar_openvz_template.lng b/interface/web/vm/lib/lang/ar_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/ar_openvz_template.lng +++ b/interface/web/vm/lib/lang/ar_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/ar_openvz_vm.lng b/interface/web/vm/lib/lang/ar_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/ar_openvz_vm.lng +++ b/interface/web/vm/lib/lang/ar_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/bg_openvz_template.lng b/interface/web/vm/lib/lang/bg_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/bg_openvz_template.lng +++ b/interface/web/vm/lib/lang/bg_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/bg_openvz_vm.lng b/interface/web/vm/lib/lang/bg_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/bg_openvz_vm.lng +++ b/interface/web/vm/lib/lang/bg_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/br_openvz_template.lng b/interface/web/vm/lib/lang/br_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/br_openvz_template.lng +++ b/interface/web/vm/lib/lang/br_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/br_openvz_vm.lng b/interface/web/vm/lib/lang/br_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/br_openvz_vm.lng +++ b/interface/web/vm/lib/lang/br_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/cz_openvz_template.lng b/interface/web/vm/lib/lang/cz_openvz_template.lng index cf926f6b3..c7c30252f 100644 --- a/interface/web/vm/lib/lang/cz_openvz_template.lng +++ b/interface/web/vm/lib/lang/cz_openvz_template.lng @@ -90,5 +90,6 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Šablona'; $wb['Advanced'] = 'Pokročilý'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/cz_openvz_vm.lng b/interface/web/vm/lib/lang/cz_openvz_vm.lng index b9043e4a9..148c36227 100644 --- a/interface/web/vm/lib/lang/cz_openvz_vm.lng +++ b/interface/web/vm/lib/lang/cz_openvz_vm.lng @@ -37,5 +37,6 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Pokročilý'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/de_openvz_template.lng b/interface/web/vm/lib/lang/de_openvz_template.lng index 329a10601..add0b4192 100644 --- a/interface/web/vm/lib/lang/de_openvz_template.lng +++ b/interface/web/vm/lib/lang/de_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent ist leer.'; $wb['swappages_error_empty'] = 'Swappages ist leer.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Erweitert'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/el_openvz_template.lng b/interface/web/vm/lib/lang/el_openvz_template.lng index afe2bcda6..5aa53cdd4 100644 --- a/interface/web/vm/lib/lang/el_openvz_template.lng +++ b/interface/web/vm/lib/lang/el_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/el_openvz_vm.lng b/interface/web/vm/lib/lang/el_openvz_vm.lng index 4c7950af3..875ae3cf5 100644 --- a/interface/web/vm/lib/lang/el_openvz_vm.lng +++ b/interface/web/vm/lib/lang/el_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'Το Προτεραιότητα Ε/Ε είνα $wb['template_nameserver_error_empty'] = 'Το Nameserver(s) είναι κενό.'; $wb['Virtual server'] = 'Εικονικός server'; $wb['Advanced'] = 'Για προχωρημένους'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/en_openvz_template.lng b/interface/web/vm/lib/lang/en_openvz_template.lng index e52165b99..3e8c97dcd 100644 --- a/interface/web/vm/lib/lang/en_openvz_template.lng +++ b/interface/web/vm/lib/lang/en_openvz_template.lng @@ -90,4 +90,5 @@ $wb["numiptent_error_empty"] = 'Numiptent is empty.'; $wb["swappages_error_empty"] = 'Swappages is empty.'; $wb["Template"] = 'Template'; $wb["Advanced"] = 'Advanced'; -?> \ No newline at end of file +$wb['features_txt'] = 'Features'; +?> diff --git a/interface/web/vm/lib/lang/en_openvz_vm.lng b/interface/web/vm/lib/lang/en_openvz_vm.lng index ddd9903ce..1aa6e8b84 100644 --- a/interface/web/vm/lib/lang/en_openvz_vm.lng +++ b/interface/web/vm/lib/lang/en_openvz_vm.lng @@ -37,4 +37,5 @@ $wb["io_priority_error_empty"] = 'I/O priority is empty.'; $wb["template_nameserver_error_empty"] = 'Nameserver(s) is empty.'; $wb["Virtual server"] = 'Virtual server'; $wb["Advanced"] = 'Advanced'; -?> \ No newline at end of file +$wb['features_txt'] = 'Features'; +?> diff --git a/interface/web/vm/lib/lang/es_openvz_template.lng b/interface/web/vm/lib/lang/es_openvz_template.lng index 0f73d409c..6955e84e2 100644 --- a/interface/web/vm/lib/lang/es_openvz_template.lng +++ b/interface/web/vm/lib/lang/es_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent esta vacío.'; $wb['swappages_error_empty'] = 'Swappages esta vacío.'; $wb['Template'] = 'Plantilla'; $wb['Advanced'] = 'Avanzado'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/es_openvz_vm.lng b/interface/web/vm/lib/lang/es_openvz_vm.lng index ce5eccb74..22244628a 100644 --- a/interface/web/vm/lib/lang/es_openvz_vm.lng +++ b/interface/web/vm/lib/lang/es_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority está vacío.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) está vacío.'; $wb['Virtual server'] = 'Servidor virtual'; $wb['Advanced'] = 'Avanzado'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/fi_openvz_template.lng b/interface/web/vm/lib/lang/fi_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/fi_openvz_template.lng +++ b/interface/web/vm/lib/lang/fi_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/fi_openvz_vm.lng b/interface/web/vm/lib/lang/fi_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/fi_openvz_vm.lng +++ b/interface/web/vm/lib/lang/fi_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/fr_openvz_template.lng b/interface/web/vm/lib/lang/fr_openvz_template.lng index d33091bd9..5fe1152e9 100644 --- a/interface/web/vm/lib/lang/fr_openvz_template.lng +++ b/interface/web/vm/lib/lang/fr_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent est vide.'; $wb['swappages_error_empty'] = 'Swappages est vide.'; $wb['Template'] = 'Modèle'; $wb['Advanced'] = 'Avancé'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/fr_openvz_vm.lng b/interface/web/vm/lib/lang/fr_openvz_vm.lng index f3d69c10e..1b6ab566d 100644 --- a/interface/web/vm/lib/lang/fr_openvz_vm.lng +++ b/interface/web/vm/lib/lang/fr_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'Les priorités I/O sont vides.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) est vide.'; $wb['Virtual server'] = 'Serveur virtuel'; $wb['Advanced'] = 'Avancé'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/hr_openvz_template.lng b/interface/web/vm/lib/lang/hr_openvz_template.lng index cd2ad194c..eb2016086 100644 --- a/interface/web/vm/lib/lang/hr_openvz_template.lng +++ b/interface/web/vm/lib/lang/hr_openvz_template.lng @@ -90,6 +90,7 @@ $wb['numiptent_error_empty'] = 'Numiptent polje je prazno.'; $wb['swappages_error_empty'] = 'Swappages polje je prazno.'; $wb['Template'] = 'Predložak'; $wb['Advanced'] = 'Napredno'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/hr_openvz_vm.lng b/interface/web/vm/lib/lang/hr_openvz_vm.lng index bebfd297c..31b3ab3fe 100644 --- a/interface/web/vm/lib/lang/hr_openvz_vm.lng +++ b/interface/web/vm/lib/lang/hr_openvz_vm.lng @@ -37,6 +37,7 @@ $wb['io_priority_error_empty'] = 'I/O priority polje je prazno.'; $wb['template_nameserver_error_empty'] = 'Nameserver(i) polje je prazno.'; $wb['Virtual server'] = 'Virtualni server'; $wb['Advanced'] = 'Napredno'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/hu_openvz_template.lng b/interface/web/vm/lib/lang/hu_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/hu_openvz_template.lng +++ b/interface/web/vm/lib/lang/hu_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/hu_openvz_vm.lng b/interface/web/vm/lib/lang/hu_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/hu_openvz_vm.lng +++ b/interface/web/vm/lib/lang/hu_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/id_openvz_template.lng b/interface/web/vm/lib/lang/id_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/id_openvz_template.lng +++ b/interface/web/vm/lib/lang/id_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/id_openvz_vm.lng b/interface/web/vm/lib/lang/id_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/id_openvz_vm.lng +++ b/interface/web/vm/lib/lang/id_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/it_openvz_template.lng b/interface/web/vm/lib/lang/it_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/it_openvz_template.lng +++ b/interface/web/vm/lib/lang/it_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/it_openvz_vm.lng b/interface/web/vm/lib/lang/it_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/it_openvz_vm.lng +++ b/interface/web/vm/lib/lang/it_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/ja_openvz_template.lng b/interface/web/vm/lib/lang/ja_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/ja_openvz_template.lng +++ b/interface/web/vm/lib/lang/ja_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/ja_openvz_vm.lng b/interface/web/vm/lib/lang/ja_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/ja_openvz_vm.lng +++ b/interface/web/vm/lib/lang/ja_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/nl_openvz_template.lng b/interface/web/vm/lib/lang/nl_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/nl_openvz_template.lng +++ b/interface/web/vm/lib/lang/nl_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/nl_openvz_vm.lng b/interface/web/vm/lib/lang/nl_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/nl_openvz_vm.lng +++ b/interface/web/vm/lib/lang/nl_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/pl_openvz_template.lng b/interface/web/vm/lib/lang/pl_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/pl_openvz_template.lng +++ b/interface/web/vm/lib/lang/pl_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/pl_openvz_vm.lng b/interface/web/vm/lib/lang/pl_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/pl_openvz_vm.lng +++ b/interface/web/vm/lib/lang/pl_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/pt_openvz_template.lng b/interface/web/vm/lib/lang/pt_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/pt_openvz_template.lng +++ b/interface/web/vm/lib/lang/pt_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/pt_openvz_vm.lng b/interface/web/vm/lib/lang/pt_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/pt_openvz_vm.lng +++ b/interface/web/vm/lib/lang/pt_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/ro_openvz_template.lng b/interface/web/vm/lib/lang/ro_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/ro_openvz_template.lng +++ b/interface/web/vm/lib/lang/ro_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/ro_openvz_vm.lng b/interface/web/vm/lib/lang/ro_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/ro_openvz_vm.lng +++ b/interface/web/vm/lib/lang/ro_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/ru_openvz_template.lng b/interface/web/vm/lib/lang/ru_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/ru_openvz_template.lng +++ b/interface/web/vm/lib/lang/ru_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/ru_openvz_vm.lng b/interface/web/vm/lib/lang/ru_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/ru_openvz_vm.lng +++ b/interface/web/vm/lib/lang/ru_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/se_openvz_template.lng b/interface/web/vm/lib/lang/se_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/se_openvz_template.lng +++ b/interface/web/vm/lib/lang/se_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/se_openvz_vm.lng b/interface/web/vm/lib/lang/se_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/se_openvz_vm.lng +++ b/interface/web/vm/lib/lang/se_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/sk_openvz_template.lng b/interface/web/vm/lib/lang/sk_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/sk_openvz_template.lng +++ b/interface/web/vm/lib/lang/sk_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/sk_openvz_vm.lng b/interface/web/vm/lib/lang/sk_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/sk_openvz_vm.lng +++ b/interface/web/vm/lib/lang/sk_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/tr_openvz_template.lng b/interface/web/vm/lib/lang/tr_openvz_template.lng index d285512dc..c6c489f74 100644 --- a/interface/web/vm/lib/lang/tr_openvz_template.lng +++ b/interface/web/vm/lib/lang/tr_openvz_template.lng @@ -90,4 +90,5 @@ $wb['numiptent_error_empty'] = 'Numiptent is empty.'; $wb['swappages_error_empty'] = 'Swappages is empty.'; $wb['Template'] = 'Template'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/lib/lang/tr_openvz_vm.lng b/interface/web/vm/lib/lang/tr_openvz_vm.lng index f2be022dd..37066b413 100644 --- a/interface/web/vm/lib/lang/tr_openvz_vm.lng +++ b/interface/web/vm/lib/lang/tr_openvz_vm.lng @@ -37,4 +37,5 @@ $wb['io_priority_error_empty'] = 'I/O priority is empty.'; $wb['template_nameserver_error_empty'] = 'Nameserver(s) is empty.'; $wb['Virtual server'] = 'Virtual server'; $wb['Advanced'] = 'Advanced'; +$wb['features_txt'] = 'Features'; ?> diff --git a/interface/web/vm/templates/openvz.conf.tpl b/interface/web/vm/templates/openvz.conf.tpl index 5bdd385a4..49ead3c49 100644 --- a/interface/web/vm/templates/openvz.conf.tpl +++ b/interface/web/vm/templates/openvz.conf.tpl @@ -48,3 +48,4 @@ MEMINFO="privvmpages:1" # SWAPPAGES="{tmpl_var name='swappages'}" CAPABILITY="{tmpl_var name='capability'}" +FEATURES="{tmpl_var name='features'}" diff --git a/interface/web/vm/templates/openvz_template_advanced_edit.htm b/interface/web/vm/templates/openvz_template_advanced_edit.htm index 8146c295b..b8f3421d4 100644 --- a/interface/web/vm/templates/openvz_template_advanced_edit.htm +++ b/interface/web/vm/templates/openvz_template_advanced_edit.htm @@ -74,6 +74,9 @@
    +
    + +
    @@ -81,4 +84,4 @@
    -
    \ No newline at end of file +
    diff --git a/interface/web/vm/templates/openvz_vm_advanced_edit.htm b/interface/web/vm/templates/openvz_vm_advanced_edit.htm index 70d01cac2..f2bc68afd 100644 --- a/interface/web/vm/templates/openvz_vm_advanced_edit.htm +++ b/interface/web/vm/templates/openvz_vm_advanced_edit.htm @@ -48,7 +48,12 @@
    -
    +
    +
    +
    + +
    +
    @@ -56,4 +61,4 @@
    -
    \ No newline at end of file +
-- GitLab From a75c8169b5b6472a40ed16982d9ea5d06a42f7c7 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 28 Apr 2015 17:03:26 +0200 Subject: [PATCH 255/287] shows warning for missing services during install (and allows force-configure for missing / not detected services) --- install/install.php | 527 ++++++++++++++++++----------- install/lib/installer_base.lib.php | 20 +- 2 files changed, 341 insertions(+), 206 deletions(-) diff --git a/install/install.php b/install/install.php index e5f0abea7..3a2de4a10 100644 --- a/install/install.php +++ b/install/install.php @@ -218,141 +218,235 @@ include_once 'lib/mysql.lib.php'; $inst->db = new db(); //** Begin with standard or expert installation + +$conf['services']['mail'] = false; +$conf['services']['web'] = false; +$conf['services']['dns'] = false; +$conf['services']['file'] = false; +$conf['services']['db'] = true; +$conf['services']['vserver'] = false; +$conf['services']['firewall'] = false; +$conf['services']['proxy'] = false; +$conf['services']['xmpp'] = false; + if($install_mode == 'standard') { //* Create the MySQL database $inst->configure_database(); - //* Configure Webserver - Apache or nginx - if($conf['apache']['installed'] == true && $conf['nginx']['installed'] == true) { - $http_server_to_use = $inst->simple_query('Apache and nginx detected. Select server to use for ISPConfig:', array('apache', 'nginx'), 'apache','http_server'); - if($http_server_to_use == 'apache'){ - $conf['nginx']['installed'] = false; - } else { - $conf['apache']['installed'] = false; - } - } - //* Insert the Server record into the database $inst->add_database_server_record(); - //* Configure Postfix - $inst->configure_postfix(); + //* Configure Postgrey + $force = @($conf['postgrey']['installed']) ? true : $inst->force_configure_app('Postgrey'); + if($force) swriteln('Configuring Postgrey'); - //* Configure Mailman - if($conf['mailman']['installed'] == true) { - $inst->configure_mailman('install'); + //* Configure Postfix + $force = @($conf['postfix']['installed']) ? true : $inst->force_configure_app('Postfix'); + if($force) { + swriteln('Configuring Postfix'); + $inst->configure_postfix(); + $conf['services']['mail'] = true; } - //* Configure jailkit - swriteln('Configuring Jailkit'); - $inst->configure_jailkit(); + if($conf['services']['mail']) { - if($conf['dovecot']['installed'] == true) { + //* Configure Mailman + $force = @($conf['mailman']['installed']) ? true : $inst->force_configure_app('Mailman'); + if($force) { + swriteln('Configuring Mailman'); + $inst->configure_mailman(); + } + + //* Check for Dovecot and Courier + if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) { + $conf['dovecot']['installed'] = @($conf['dovecot']['installed']) ? false : $inst->force_configure_app('Dovecot'); + $conf['courier']['installed'] = @($conf['couier']['installed']) ? false : $inst->force_configure_app('Courier'); + } + //* Configure Mailserver - Dovecot or Courier + if($conf['dovecot']['installed'] && $conf['courier']['installed']) { + $mail_server_to_use = $inst->simple_query('Dovecot and Courier detected. Select server to use with ISPConfig:', array('dovecot', 'courier'), 'dovecot','mail_server'); + if($mail_server_to_use == 'dovecot'){ + $conf['courier']['installed'] = false; + } else { + $conf['dovecot']['installed'] = false; + } + } //* Configure Dovecot - swriteln('Configuring Dovecot'); - $inst->configure_dovecot(); - } else { - //* Configure saslauthd - swriteln('Configuring SASL'); - $inst->configure_saslauthd(); - - //* Configure PAM - swriteln('Configuring PAM'); - $inst->configure_pam(); - + if($conf['dovecot']['installed']) { + swriteln('Configuring Dovecot'); + $inst->configure_dovecot(); + } //* Configure Courier - swriteln('Configuring Courier'); - $inst->configure_courier(); - } + if($conf['courier']['installed']) { + swriteln('Configuring Courier'); + $inst->configure_courier(); + swriteln('Configuring SASL'); + $inst->configure_saslauthd(); + swriteln('Configuring PAM'); + $inst->configure_pam(); + } - //* Configure Spamasassin - swriteln('Configuring Spamassassin'); - $inst->configure_spamassassin(); + //* Configure Spamasassin + $force = @($conf['spamassassin']['installed']) ? true : $inst->force_configure_app('Spamassassin'); + if($force) { + swriteln('Configuring Spamassassin'); + $inst->configure_spamassassin(); + } + + //* Configure Amavis + $force = @($conf['amavis']['installed']) ? true : $inst->force_configure_app('Amavisd'); + if($force) { + swriteln('Configuring Amavisd'); + $inst->configure_amavis(); + } - //* Configure Amavis - if($conf['amavis']['installed'] == true) { - swriteln('Configuring Amavisd'); - $inst->configure_amavis(); - } + //* Configure Getmail + $force = @($conf['getmail']['installed']) ? true : $inst->force_configure_app('Getmail'); + if($force) { + swriteln('Configuring Getmail'); + $inst->configure_getmail(); + } - //* Configure Getmail - swriteln('Configuring Getmail'); - $inst->configure_getmail(); + } else swriteln('[ERROR] Postfix not installed - skipping Mail'); - //* Configure Pureftpd - swriteln('Configuring Pureftpd'); - $inst->configure_pureftpd(); - - //* Configure DNS - if($conf['powerdns']['installed'] == true) { + //* Check for DNS + if(!$conf['powerdns']['installed'] && !$conf['bind']['installed'] && !$conf['mydns']['installed']) { + $conf['powerdns']['installed'] = $inst->force_configure_app('PowerDNS'); + $conf['bind']['installed'] = $inst->force_configure_app('BIND'); + $conf['mydns']['installed'] = $inst->force_configure_app('MyDNS'); + } + //* Configure PowerDNS + if($conf['powerdns']['installed']) { swriteln('Configuring PowerDNS'); $inst->configure_powerdns(); - } elseif($conf['bind']['installed'] == true) { + $conf['services']['dns'] = true; + } + //* Configure Bind + if($conf['bind']['installed']) { swriteln('Configuring BIND'); $inst->configure_bind(); - } else { + $conf['services']['dns'] = true; + } + //* Configure MyDNS + if($conf['mydns']['installed']) { swriteln('Configuring MyDNS'); $inst->configure_mydns(); + $conf['services']['dns'] = true; + } + + //* Configure Jailkit + $force = @($conf['jailkit']['installed']) ? true : $inst->force_configure_app('Jailkit'); + if($force) { + swriteln('Configuring Jailkit'); + $inst->configure_jailkit(); + } + + //* Configure Pureftpd + $force = @($conf['pureftpd']['installed']) ? true : $inst->force_configure_app('pureftpd'); + if($force) { + swriteln('Configuring Pureftpd'); + $inst->configure_pureftpd(); + } + + //* Check for Web-Server + if(!$conf['apache']['installed'] && !$conf['nginx']['installed']) { + $conf['apache']['installed'] = $inst->force_configure_app('Apache'); + $conf['nginx']['installed'] = $inst->force_configure_app('nginx'); + } + + //* Configure Webserver - Apache or nginx + if($conf['apache']['installed'] && $conf['nginx']['installed']) { + $http_server_to_use = $inst->simple_query('Apache and nginx detected. Select server to use for ISPConfig:', array('apache', 'nginx'), 'apache','http_server'); + if($http_server_to_use == 'apache'){ + $conf['nginx']['installed'] = false; + } else { + $conf['apache']['installed'] = false; + } } //* Configure Apache - if($conf['apache']['installed'] == true){ + if($conf['apache']['installed']){ swriteln('Configuring Apache'); $inst->configure_apache(); + $conf['services']['web'] = true; + $conf['services']['file'] = true; + //* Configure Vlogger + $force = @($conf['vlogger']['installed']) ? true : $inst->force_configure_app('vlogger'); + if($force) { + swriteln('Configuring vlogger'); + $inst->configure_vlogger(); + } + //* Configure squid +/* + $force = @($conf['squid']['installed']) ? true : $inst->force_configure_app('squid'); + if($force) { + swriteln('Configuring Squid'); + $inst->configure_squid(); + $conf['services']['proxy'] = true; + } +*/ } //* Configure nginx - if($conf['nginx']['installed'] == true){ + if($conf['nginx']['installed']){ swriteln('Configuring nginx'); $inst->configure_nginx(); + $conf['services']['web'] = true; } - //** Configure Vlogger - swriteln('Configuring Vlogger'); - $inst->configure_vlogger(); - - //** Configure apps vhost - swriteln('Configuring Apps vhost'); - $inst->configure_apps_vhost(); + //* Configure XMPP + $force = @($conf['xmpp']['installed']) ? true : $inst->force_configure_app('Metronome XMPP Server'); + if($force) { + swriteln('Configuring Metronome XMPP Server'); + $inst->configure_xmpp(); + $conf['services']['xmpp'] = true; + } - //* Configure Firewall - if($conf['ufw']['installed'] == true) { - //* Configure Ubuntu Firewall - $conf['services']['firewall'] = true; + //* Check for Firewall + if(!$conf['ufw']['installed'] && !$conf['firewall']['installed']) { + $conf['ufw']['installed'] = $inst->force_configure_app('Ubuntu Firewall'); + $conf['firewall']['installed'] = $inst->force_configure_app('Bastille Firewall'); + } + //* Configure Firewall - Ubuntu or Bastille + if($conf['ufw']['installed'] && $conf['firewall']['installed']) { + $firewall_to_use = $inst->simple_query('Ubuntu and Bastille Firewall detected. Select firewall to use with ISPConfig:', array('bastille', 'ubuntu'), 'bastille','firewall_server'); + if($firewall_to_use == 'bastille'){ + $conf['ufw']['installed'] = false; + } else { + $conf['firewall']['installed'] = false; + } + } + //* Configure Ubuntu Firewall + if($conf['ufw']['installed']){ swriteln('Configuring Ubuntu Firewall'); $inst->configure_ufw_firewall(); - } else { - //* Configure Bastille Firewall $conf['services']['firewall'] = true; + } + //* Configure Bastille Firewall + if($conf['firewall']['installed']){ swriteln('Configuring Bastille Firewall'); $inst->configure_bastille_firewall(); + $conf['services']['firewall'] = true; } //* Configure Fail2ban - if($conf['fail2ban']['installed'] == true) { + $force = @($conf['fail2ban']['installed']) ? true : $inst->force_configure_app('Fail2ban'); + if($force) { swriteln('Configuring Fail2ban'); $inst->configure_fail2ban(); } - /* - if($conf['squid']['installed'] == true) { - $conf['services']['proxy'] = true; - swriteln('Configuring Squid'); - $inst->configure_squid(); - } else if($conf['nginx']['installed'] == true) { - $conf['services']['proxy'] = true; - swriteln('Configuring Nginx'); - $inst->configure_nginx(); + //* Configure OpenVZ + $force = @($conf['openvz']['installed']) ? true : $inst->force_configure_app('OpenVZ'); + if($force) { + $conf['services']['vserver'] = true; + swriteln('Configuring OpenVZ'); } - */ - //* Configure XMPP - if($conf['xmpp']['installed'] == true){ - $conf['services']['xmpp'] = true; - swriteln('Configuring Metronome XMPP Server'); - $inst->configure_xmpp(); - } + //** Configure apps vhost + swriteln('Configuring Apps vhost'); + $inst->configure_apps_vhost(); //* Configure ISPConfig swriteln('Installing ISPConfig'); @@ -374,8 +468,10 @@ if($install_mode == 'standard') { $inst->configure_dbserver(); //* Configure ISPConfig - swriteln('Installing ISPConfig crontab'); - $inst->install_crontab(); + if($conf['cron']['installed']) { + swriteln('Installing ISPConfig crontab'); + $inst->install_crontab(); + } else swriteln('[ERROR] Cron not found'); swriteln('Restarting services ...'); if($conf['mysql']['installed'] == true && $conf['mysql']['init_script'] != '') system($inst->getinitcommand($conf['mysql']['init_script'], 'restart').' >/dev/null 2>&1'); @@ -407,17 +503,7 @@ if($install_mode == 'standard') { if($conf['ufw']['installed'] == true && $conf['ufw']['init_script'] != '') system($inst->getinitcommand($conf['ufw']['init_script'], 'restart').' &> /dev/null'); if($conf['xmpp']['installed'] == true && $conf['xmpp']['init_script'] != '') system($inst->getinitcommand($conf['xmpp']['init_script'], 'restart').' &> /dev/null'); -} else { - - //* In expert mode, we select the services in the following steps, only db is always available - $conf['services']['mail'] = false; - $conf['services']['web'] = false; - $conf['services']['dns'] = false; - $conf['services']['db'] = true; - $conf['services']['firewall'] = false; - $conf['services']['proxy'] = false; - $conf['services']['xmpp'] = false; - +} else { //* expert mode //** Get Server ID // $conf['server_id'] = $inst->free_query('Unique Numeric ID of the server','1'); @@ -460,11 +546,17 @@ if($install_mode == 'standard') { //* Create the mysql database $inst->configure_database(); + //* Check for Web-Server + if($conf['apache']['installed'] != true && $conf['nginx']['installed'] != true) { + $conf['apache']['installed'] = $inst->force_configure_app('Apache'); + $conf['nginx']['installed'] = $inst->force_configure_app('nginx'); + } //* Configure Webserver - Apache or nginx if($conf['apache']['installed'] == true && $conf['nginx']['installed'] == true) { $http_server_to_use = $inst->simple_query('Apache and nginx detected. Select server to use for ISPConfig:', array('apache', 'nginx'), 'apache','http_server'); if($http_server_to_use == 'apache'){ $conf['nginx']['installed'] = false; + $conf['services']['file'] = true; } else { $conf['apache']['installed'] = false; } @@ -479,44 +571,73 @@ if($install_mode == 'standard') { $conf['services']['mail'] = true; + //* Configure Postgrey + $force = @($conf['postgrey']['installed']) ? true : $inst->force_configure_app('Postgrey'); + if($force) swriteln('Configuring Postgrey'); + //* Configure Postfix - swriteln('Configuring Postfix'); - $inst->configure_postfix(); + $force = @($conf['postfix']['installed']) ? true : $inst->force_configure_app('Postfix'); + if($force) { + swriteln('Configuring Postfix'); + $inst->configure_postfix(); + } //* Configure Mailman - swriteln('Configuring Mailman'); - $inst->configure_mailman(); + $force = @($conf['mailman']['installed']) ? true : $inst->force_configure_app('Mailman'); + if($force) { + swriteln('Configuring Mailman'); + $inst->configure_mailman(); + } - if($conf['dovecot']['installed'] == true) { - //* Configure dovecot + //* Check for Dovecot and Courier + if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) { + $conf['dovecot']['installed'] = @($conf['dovecot']['installed']) ? false : $inst->force_configure_app('Dovecot'); + $conf['courier']['installed'] = @($conf['couier']['installed']) ? false : $inst->force_configure_app('Courier'); + } + //* Configure Mailserver - Dovecot or Courier + if($conf['dovecot']['installed'] && $conf['courier']['installed']) { + $mail_server_to_use = $inst->simple_query('Dovecot and Courier detected. Select server to use with ISPConfig:', array('dovecot', 'courier'), 'dovecot','mail_server'); + if($mail_server_to_use == 'dovecot'){ + $conf['courier']['installed'] = false; + } else { + $conf['dovecot']['installed'] = false; + } + } + //* Configure Dovecot + if($conf['dovecot']['installed']) { swriteln('Configuring Dovecot'); $inst->configure_dovecot(); - } else { - - //* Configure saslauthd + } + //* Configure Courier + if($conf['courier']['installed']) { + swriteln('Configuring Courier'); + $inst->configure_courier(); swriteln('Configuring SASL'); $inst->configure_saslauthd(); - - //* Configure PAM swriteln('Configuring PAM'); $inst->configure_pam(); - - //* Configure courier - swriteln('Configuring Courier'); - $inst->configure_courier(); } //* Configure Spamasassin - swriteln('Configuring Spamassassin'); - $inst->configure_spamassassin(); - + $force = @($conf['spamassassin']['installed']) ? true : $inst->force_configure_app('Spamassassin'); + if($force) { + swriteln('Configuring Spamassassin'); + $inst->configure_spamassassin(); + } + //* Configure Amavis - swriteln('Configuring Amavisd'); - $inst->configure_amavis(); + $force = @($conf['amavis']['installed']) ? true : $inst->force_configure_app('Amavisd'); + if($force) { + swriteln('Configuring Amavisd'); + $inst->configure_amavis(); + } //* Configure Getmail - swriteln('Configuring Getmail'); - $inst->configure_getmail(); + $force = @($conf['getmail']['installed']) ? true : $inst->force_configure_app('Getmail'); + if($force) { + swriteln('Configuring Getmail'); + $inst->configure_getmail(); + } if($conf['postfix']['installed'] == true && $conf['postfix']['init_script'] != '') system($inst->getinitcommand($conf['postfix']['init_script'], 'restart')); if($conf['saslauthd']['installed'] == true && $conf['saslauthd']['init_script'] != '') system($inst->getinitcommand($conf['saslauthd']['init_script'], 'restart')); @@ -533,122 +654,122 @@ if($install_mode == 'standard') { if($conf['mailman']['installed'] == true && $conf['mailman']['init_script'] != '') system('nohup '.$inst->getinitcommand($conf['mailman']['init_script'], 'restart').' >/dev/null 2>&1 &'); } - //** Configure Jailkit - if(strtolower($inst->simple_query('Configure Jailkit', array('y', 'n'), 'y','configure_jailkit') ) == 'y') { + //* Configure Jailkit + $force = @($conf['jailkit']['installed']) ? true : $inst->force_configure_app('Jailkit'); + if($force) { swriteln('Configuring Jailkit'); $inst->configure_jailkit(); } - //** Configure Pureftpd - if(strtolower($inst->simple_query('Configure FTP Server', array('y', 'n'), 'y','configure_ftp') ) == 'y') { + //* Configure Pureftpd + $force = @($conf['pureftpd']['installed']) ? true : $inst->force_configure_app('pureftpd'); + if($force) { swriteln('Configuring Pureftpd'); $inst->configure_pureftpd(); - if($conf['pureftpd']['installed'] == true && $conf['pureftpd']['init_script'] != '') system($inst->getinitcommand($conf['pureftpd']['init_script'], 'restart')); } //** Configure DNS if(strtolower($inst->simple_query('Configure DNS Server', array('y', 'n'), 'y','configure_dns')) == 'y') { $conf['services']['dns'] = true; - //* Configure DNS - if($conf['powerdns']['installed'] == true) { + + //* Check for DNS + if(!$conf['powerdns']['installed'] && !$conf['bind']['installed'] && !$conf['mydns']['installed']) { + $conf['powerdns']['installed'] = $inst->force_configure_app('PowerDNS'); + $conf['bind']['installed'] = $inst->force_configure_app('BIND'); + $conf['mydns']['installed'] = $inst->force_configure_app('MyDNS'); + } + //* Configure PowerDNS + if($conf['powerdns']['installed']) { swriteln('Configuring PowerDNS'); $inst->configure_powerdns(); - if($conf['powerdns']['init_script'] != '') system($inst->getinitcommand($conf['powerdns']['init_script'], 'restart').' &> /dev/null'); - } elseif($conf['bind']['installed'] == true) { + $conf['services']['dns'] = true; + } + //* Configure Bind + if($conf['bind']['installed']) { swriteln('Configuring BIND'); $inst->configure_bind(); - if($conf['bind']['init_script'] != '') system($inst->getinitcommand($conf['bind']['init_script'], 'restart').' &> /dev/null'); - } else { + $conf['services']['dns'] = true; + } + //* Configure MyDNS + if($conf['mydns']['installed']) { swriteln('Configuring MyDNS'); $inst->configure_mydns(); - if($conf['mydns']['init_script'] != '') system($inst->getinitcommand($conf['mydns']['init_script'], 'restart').' &> /dev/null'); + $conf['services']['dns'] = true; } } - /* - //** Configure Squid - if(strtolower($inst->simple_query('Configure Proxy Server', array('y','n'),'y') ) == 'y') { - if($conf['squid']['installed'] == true) { - $conf['services']['proxy'] = true; - swriteln('Configuring Squid'); - $inst->configure_squid(); - if($conf['squid']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['squid']['init_script']))system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); - } else if($conf['nginx']['installed'] == true) { - $conf['services']['proxy'] = true; - swriteln('Configuring Nginx'); - $inst->configure_nginx(); - if($conf['nginx']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['nginx']['init_script']))system($conf['init_scripts'].'/'.$conf['nginx']['init_script'].' restart &> /dev/null'); - } - } - */ + if(strtolower($inst->simple_query('Configure Web Server', array('y', 'n'), 'y','configure_webserver')) == 'y') { + $conf['services']['web'] = true; - //** Configure Apache - if($conf['apache']['installed'] == true){ - swriteln("\nHint: If this server shall run the ISPConfig interface, select 'y' in the 'Configure Apache Server' option.\n"); - if(strtolower($inst->simple_query('Configure Apache Server', array('y', 'n'), 'y','configure_apache')) == 'y') { - $conf['services']['web'] = true; + //* Configure Apache + if($conf['apache']['installed']){ swriteln('Configuring Apache'); $inst->configure_apache(); - - //** Configure Vlogger - swriteln('Configuring Vlogger'); - $inst->configure_vlogger(); - - //** Configure apps vhost - swriteln('Configuring Apps vhost'); - $inst->configure_apps_vhost(); + $conf['services']['file'] = true; + //* Configure Vlogger + $force = @($conf['vlogger']['installed']) ? true : $inst->force_configure_app('vlogger'); + if($force) { + swriteln('Configuring vlogger'); + $inst->configure_vlogger(); + } + //* Configure squid +/* + $force = @($conf['squid']['installed']) ? true : $inst->force_configure_app('squid'); + if($force) { + swriteln('Configuring Squid'); + $inst->configure_squid(); + $conf['services']['proxy'] = true; + if($conf['squid']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['squid']['init_script']))system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); + } +*/ } - } - - //** Configure nginx - if($conf['nginx']['installed'] == true){ - swriteln("\nHint: If this server shall run the ISPConfig interface, select 'y' in the 'Configure nginx Server' option.\n"); - if(strtolower($inst->simple_query('Configure nginx Server', array('y', 'n'), 'y','configure_nginx')) == 'y') { - $conf['services']['web'] = true; + //* Configure nginx + if($conf['nginx']['installed']){ swriteln('Configuring nginx'); $inst->configure_nginx(); + } + } - //** Configure Vlogger - //swriteln('Configuring Vlogger'); - //$inst->configure_vlogger(); + if($conf['openvz']['installed'] = true && strtolower($inst->simple_query('Enable Openvz-Server', array('y', 'n'), 'y','configure_openvz')) == 'y') + $conf['services']['vserver'] = true; - //** Configure apps vhost - swriteln('Configuring Apps vhost'); - $inst->configure_apps_vhost(); + if(strtolower($inst->simple_query('Configure Firewall Server', array('y', 'n'), 'y','configure_firewall')) == 'y') { + //* Check for Firewall + if(!$conf['ufw']['installed'] && !$conf['firewall']['installed']) { + $conf['ufw']['installed'] = $inst->force_configure_app('Ubuntu Firewall'); + $conf['firewall']['installed'] = $inst->force_configure_app('Bastille Firewall'); + } + //* Configure Firewall - Ubuntu or Bastille + if($conf['ufw']['installed'] && $conf['firewall']['installed']) { + $firewall_to_use = $inst->simple_query('Ubuntu and Bastille Firewall detected. Select firewall to use with ISPConfig:', array('bastille', 'ubuntu'), 'bastille','firewall_server'); + if($firewall_to_use == 'bastille'){ + $conf['ufw']['installed'] = false; + } else { + $conf['firewall']['installed'] = false; + } + } + //* Configure Ubuntu Firewall + if($conf['ufw']['installed']){ + swriteln('Configuring Ubuntu Firewall'); + $inst->configure_ufw_firewall(); + $conf['services']['firewall'] = true; + } + //* Configure Bastille Firewall + if($conf['firewall']['installed']){ + swriteln('Configuring Bastille Firewall'); + $inst->configure_bastille_firewall(); + $conf['services']['firewall'] = true; } } - //** Configure Firewall - if(strtolower($inst->simple_query('Configure Firewall Server', array('y', 'n'), 'y','configure_firewall')) == 'y') { - if($conf['ufw']['installed'] == true) { - //* Configure Ubuntu Firewall - $conf['services']['firewall'] = true; - swriteln('Configuring Ubuntu Firewall'); - $inst->configure_ufw_firewall(); - } else { - //* Configure Bastille Firewall - $conf['services']['firewall'] = true; - swriteln('Configuring Bastille Firewall'); - $inst->configure_bastille_firewall(); - } - } - - //** Configure Firewall - /*if(strtolower($inst->simple_query('Configure Firewall Server',array('y','n'),'y')) == 'y') { - swriteln('Configuring Firewall'); - $inst->configure_firewall(); - }*/ - - //** Configure XMPP - if($conf['xmpp']['installed'] == true){ - if(strtolower($inst->simple_query('Configure Metronome XMPP Server', array('y', 'n'), 'y', 'configure_xmpp')) == 'y'){ - $conf['services']['xmpp'] = true; - swriteln('Configuring Metronome XMPP Server'); - $inst->configure_xmpp(); - if($conf['xmpp']['installed'] == true && $conf['xmpp']['init_script'] != '') system($inst->getinitcommand($conf['xmpp']['init_script'], 'restart').' &> /dev/null'); - } - } + //* Configure XMPP + $force = @($conf['xmpp']['installed']) ? true : $inst->force_configure_app('Metronome XMPP Server'); + if($force) { + swriteln('Configuring Metronome XMPP Server'); + $inst->configure_xmpp(); + $conf['services']['xmpp'] = true; + } //** Configure ISPConfig :-) $install_ispconfig_interface_default = ($conf['mysql']['master_slave_setup'] == 'y')?'n':'y'; diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 4e1ee478e..317c1a567 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -136,7 +136,7 @@ class installer_base { if(is_installed('mysql') || is_installed('mysqld')) $conf['mysql']['installed'] = true; if(is_installed('postfix')) $conf['postfix']['installed'] = true; if(is_installed('postgrey')) $conf['postgrey']['installed'] = true; - if(is_installed('mailman')) $conf['mailman']['installed'] = true; + if(is_installed('mailman') || is_installed('mmsitepass')) $conf['mailman']['installed'] = true; if(is_installed('apache') || is_installed('apache2') || is_installed('httpd') || is_installed('httpd2')) $conf['apache']['installed'] = true; if(is_installed('getmail')) $conf['getmail']['installed'] = true; if(is_installed('courierlogger')) $conf['courier']['installed'] = true; @@ -154,12 +154,26 @@ class installer_base { if(is_installed('iptables') && is_installed('ufw')) $conf['ufw']['installed'] = true; if(is_installed('fail2ban-server')) $conf['fail2ban']['installed'] = true; if(is_installed('vzctl')) $conf['openvz']['installed'] = true; - if(is_dir("/etc/Bastille")) $conf['bastille']['installed'] = true; - if(is_installed('metronome') && is_installed('metronomectl')) $conf['xmpp']['installed'] = true; + if(is_installed('iptables') && is_installed('bastille-netfilter')) $conf['bastille']['installed'] = true; + if(is_installed('metronome') && is_installed('metronomectl')) $conf['xmpp']['installed'] = true; + if(is_installed('spamassassin')) $conf['spamassasin']['installed'] = true; + if(is_installed('vlogger')) $conf['vlogger']['installed'] = true; + if(is_installed('cron')) $conf['cron']['installed'] = true; if ($conf['services']['web'] && (($conf['apache']['installed'] && is_file($conf['apache']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")) || ($conf['nginx']['installed'] && is_file($conf['nginx']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")))) $this->ispconfig_interface_installed = true; } + public function force_configure_app($service) { + $force = false; + swriteln("[WARN] autodetect for $service failed"); + if(strtolower($this->simple_query("Force configure $service", array('y', 'n'), 'n') ) == 'y') { +// swriteln("Configure $service"); + $force = true; + } else swriteln("Skipping $service\n"); + return $force; + } + + /** Create the database for ISPConfig */ -- GitLab From 12ab95f8be7c788e30c54f1e0b5f4c1b8eebe80f Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Wed, 29 Apr 2015 07:37:04 +0200 Subject: [PATCH 256/287] fixed typos in install.php --- install/install.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/install.php b/install/install.php index 3a2de4a10..bdc33dab8 100644 --- a/install/install.php +++ b/install/install.php @@ -260,8 +260,8 @@ if($install_mode == 'standard') { //* Check for Dovecot and Courier if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) { - $conf['dovecot']['installed'] = @($conf['dovecot']['installed']) ? false : $inst->force_configure_app('Dovecot'); - $conf['courier']['installed'] = @($conf['couier']['installed']) ? false : $inst->force_configure_app('Courier'); + $conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot'); + $conf['courier']['installed'] = $inst->force_configure_app('Courier'); } //* Configure Mailserver - Dovecot or Courier if($conf['dovecot']['installed'] && $conf['courier']['installed']) { @@ -591,8 +591,8 @@ if($install_mode == 'standard') { //* Check for Dovecot and Courier if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) { - $conf['dovecot']['installed'] = @($conf['dovecot']['installed']) ? false : $inst->force_configure_app('Dovecot'); - $conf['courier']['installed'] = @($conf['couier']['installed']) ? false : $inst->force_configure_app('Courier'); + $conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot'); + $conf['courier']['installed'] = $inst->force_configure_app('Courier'); } //* Configure Mailserver - Dovecot or Courier if($conf['dovecot']['installed'] && $conf['courier']['installed']) { -- GitLab From d35b34d03ffe0d92cbaeb4410c913550150fab4e Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Mon, 4 May 2015 19:56:31 +0200 Subject: [PATCH 257/287] - prepared layout change for login page --- interface/web/index.php | 1 + interface/web/login/templates/index.htm | 1 - .../web/themes/default/assets/stylesheets/login.css | 9 +++++++++ interface/web/themes/default/templates/main.tpl.htm | 9 +++++---- 4 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 interface/web/themes/default/assets/stylesheets/login.css diff --git a/interface/web/index.php b/interface/web/index.php index e942c1068..af91b265a 100644 --- a/interface/web/index.php +++ b/interface/web/index.php @@ -35,6 +35,7 @@ if(!isset($_SESSION['s']['module']['name'])) $_SESSION['s']['module']['name'] = $app->uses('tpl'); $app->tpl->newTemplate('main.tpl.htm'); +$app->tpl->setVar('logged_in', ($_SESSION['s']['user']['active'] != 1 ? 'n' : 'y')); // tab change warning? // read misc config diff --git a/interface/web/login/templates/index.htm b/interface/web/login/templates/index.htm index d6972b9ef..3083148a8 100644 --- a/interface/web/login/templates/index.htm +++ b/interface/web/login/templates/index.htm @@ -13,7 +13,6 @@
- {tmpl_var name='login_txt'}
diff --git a/interface/web/themes/default/assets/stylesheets/login.css b/interface/web/themes/default/assets/stylesheets/login.css new file mode 100644 index 000000000..73379eb8b --- /dev/null +++ b/interface/web/themes/default/assets/stylesheets/login.css @@ -0,0 +1,9 @@ +#content { + margin: 0 auto; + float: none; +} + +.form-group input[type="checkbox"] { + width: auto; + height: auto; +} \ 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 d29ab0039..253c989be 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -18,6 +18,7 @@ /assets/stylesheets/themes/default/theme.min.css' /> /assets/stylesheets/select2.css' /> /assets/stylesheets/select2-bootstrap.css' /> + /assets/stylesheets/login.css' /> @@ -59,8 +60,8 @@
-
-
+
+
@@ -69,8 +70,8 @@
- +
powered by " target="_blank"> -- GitLab From 0adcbbfd969731a9834ce4e018576b99fa2ecf56 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Mon, 4 May 2015 22:00:32 +0200 Subject: [PATCH 258/287] changed if-else in installer to write configs for the latest version with force-install (package not yet installed) --- install/lib/installer_base.lib.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 317c1a567..42c054474 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -885,12 +885,12 @@ class installer_base { unset($parts); unset($out); - if(version_compare($saslversion , '2.1.23') > 0) { - //* Configfile for saslauthd versions 2.1.24 and newer - $configfile = 'sasl_smtpd2.conf'; - } else { + if(version_compare($saslversion , '2.1.23', '<=')) { //* Configfile for saslauthd versions up to 2.1.23 $configfile = 'sasl_smtpd.conf'; + } else { + //* Configfile for saslauthd versions 2.1.24 and newer + $configfile = 'sasl_smtpd2.conf'; } 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~'); @@ -1052,22 +1052,22 @@ class installer_base { unset($tmp); //* Copy dovecot configuration file - if(version_compare($dovecot_version,2) >= 0) { + if(version_compare($dovecot_version,1, '<=')) { //* Dovecot 1.x + 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); + } + } else { //* Dovecot 2.x 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); } replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0); - if(version_compare($dovecot_version,2.1) < 0) { + if(version_compare($dovecot_version, 2.1, '<')) { removeLine($config_dir.'/'.$configfile, 'ssl_protocols ='); } - } else { - 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 -- GitLab From 55cb0239acf8fde69ada4862baaf1912804d277a Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 5 May 2015 12:47:54 +0200 Subject: [PATCH 259/287] FS#2213 - Ask for admin password while installation --- install/install.php | 2 ++ install/lib/installer_base.lib.php | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/install/install.php b/install/install.php index bdc33dab8..6bc198dc5 100644 --- a/install/install.php +++ b/install/install.php @@ -453,6 +453,7 @@ if($install_mode == 'standard') { //** Customize the port ISPConfig runs on $ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port'); + $conf['interface_password'] = $inst->free_query('Admin password', 'admin'); if($conf['apache']['installed'] == true) $conf['apache']['vhost_port'] = $ispconfig_vhost_port; if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port'] = $ispconfig_vhost_port; unset($ispconfig_vhost_port); @@ -792,6 +793,7 @@ if($install_mode == 'standard') { //** Customise the port ISPConfig runs on $ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port'); + $conf['interface_password'] = $inst->free_query('Admin password', 'admin'); if($conf['apache']['installed'] == true) $conf['apache']['vhost_port'] = $ispconfig_vhost_port; if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port'] = $ispconfig_vhost_port; unset($ispconfig_vhost_port); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 42c054474..24cf42897 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -2200,6 +2200,11 @@ Email Address []: $command = "chmod +x $install_dir/server/scripts/*.sh"; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + if ($this->install_ispconfig_interface == true && isset($conf['interface_password']) && $conf['interface_password']!='admin') { + $sql = "UPDATE sys_user SET passwort = md5(?) WHERE username = 'admin';"; + $this->db->query($sql, $conf['interface_password']); + } + if($conf['apache']['installed'] == true && $this->install_ispconfig_interface == true){ //* Copy the ISPConfig vhost for the controlpanel $vhost_conf_dir = $conf['apache']['vhost_conf_dir']; -- GitLab From 272da6d78134d1270292fb370a3d5420148d4b6e Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Tue, 5 May 2015 16:14:51 +0200 Subject: [PATCH 260/287] 'repeat password'-query if the default password is not used --- install/install.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/install/install.php b/install/install.php index 6bc198dc5..684e1c9d1 100644 --- a/install/install.php +++ b/install/install.php @@ -454,6 +454,17 @@ if($install_mode == 'standard') { //** Customize the port ISPConfig runs on $ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port'); $conf['interface_password'] = $inst->free_query('Admin password', 'admin'); + if($conf['interface_password'] != 'admin') { + $check = false; + do { + unset($temp_password); + $temp_password = $inst->free_query('Re-enter Admin password', ''); + $check = @($temp_password == $conf['interface_password'])?true:false; + if(!$check) swriteln('Passwords do noz match.'); + } while (!$check); + } + unset($check); + unset($temp_password); if($conf['apache']['installed'] == true) $conf['apache']['vhost_port'] = $ispconfig_vhost_port; if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port'] = $ispconfig_vhost_port; unset($ispconfig_vhost_port); @@ -794,6 +805,17 @@ if($install_mode == 'standard') { //** Customise the port ISPConfig runs on $ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port'); $conf['interface_password'] = $inst->free_query('Admin password', 'admin'); + if($conf['interface_password'] != 'admin') { + $check = false; + do { + unset($temp_password); + $temp_password = $inst->free_query('Re-enter Admin password', ''); + $check = @($temp_password == $conf['interface_password'])?true:false; + if(!$check) swriteln('Passwords do noz match.'); + } while (!$check); + } + unset($check); + unset($temp_password); if($conf['apache']['installed'] == true) $conf['apache']['vhost_port'] = $ispconfig_vhost_port; if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port'] = $ispconfig_vhost_port; unset($ispconfig_vhost_port); -- GitLab From 480ebab07341507e76924eef9f5054b6abcafcab Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Tue, 5 May 2015 16:25:17 +0200 Subject: [PATCH 261/287] Fixed smaller typo --- install/install.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/install.php b/install/install.php index 684e1c9d1..447d79345 100644 --- a/install/install.php +++ b/install/install.php @@ -458,9 +458,9 @@ if($install_mode == 'standard') { $check = false; do { unset($temp_password); - $temp_password = $inst->free_query('Re-enter Admin password', ''); + $temp_password = $inst->free_query('Re-enter admin password', ''); $check = @($temp_password == $conf['interface_password'])?true:false; - if(!$check) swriteln('Passwords do noz match.'); + if(!$check) swriteln('Passwords do not match.'); } while (!$check); } unset($check); @@ -809,9 +809,9 @@ if($install_mode == 'standard') { $check = false; do { unset($temp_password); - $temp_password = $inst->free_query('Re-enter Admin password', ''); + $temp_password = $inst->free_query('Re-enter admin password', ''); $check = @($temp_password == $conf['interface_password'])?true:false; - if(!$check) swriteln('Passwords do noz match.'); + if(!$check) swriteln('Passwords do not match.'); } while (!$check); } unset($check); @@ -861,4 +861,4 @@ chmod($md5_filename,0700); echo "Installation completed.\n"; -?> +?> \ No newline at end of file -- GitLab From ee405d849b027618eec69425ed845afdc076b562 Mon Sep 17 00:00:00 2001 From: Florian Schaal Date: Wed, 6 May 2015 16:08:15 +0200 Subject: [PATCH 262/287] Prevent empty hostname during install --- install/install.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/install/install.php b/install/install.php index 447d79345..a8e2abc18 100644 --- a/install/install.php +++ b/install/install.php @@ -174,6 +174,18 @@ exec('hostname -f', $tmp_out); $conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg server1.domain.tld ', @$tmp_out[0],'hostname'); unset($tmp_out); +//** Prevent empty hostname +$conf['hostname']=trim($conf['hostname']); +if($conf['hostname'] === '') { + $check = false; + do { + swriteln('Hostname may not be empty.'); + $conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg server1.domain.tld ', '', 'hostname'); + $conf['hostname']=trim($conf['hostname']); + $check = @($conf['hostname'] !== '')?true:false; + } while (!$check); +} + // Check if the mysql functions are loaded in PHP if(!function_exists('mysql_connect')) die('No PHP MySQL functions available. Please ensure that the PHP MySQL module is loaded.'); @@ -861,4 +873,4 @@ chmod($md5_filename,0700); echo "Installation completed.\n"; -?> \ No newline at end of file +?> -- GitLab From ed46b479b558fd5dba53f4bf79caf360130ba4ce Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 6 May 2015 18:31:05 +0200 Subject: [PATCH 263/287] Added Support for Ubuntu 15.04 in OS detect code. --- install/lib/install.lib.php | 3 +++ server/lib/classes/monitor_tools.inc.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 9bd0e1d2b..630bf0456 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -86,6 +86,9 @@ function get_distname() { $mainver = array_filter($mainver); $mainver = current($mainver).'.'.next($mainver); switch ($mainver){ + case "15.04": + $relname = "(Vivid Vervet)"; + break; case "14.10": $relname = "(Utopic Unicorn)"; break; diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index 13c0f8dcb..3b451cd0b 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -62,6 +62,9 @@ class monitor_tools { $mainver = array_filter($mainver); $mainver = current($mainver).'.'.next($mainver); switch ($mainver){ + case "15.04": + $relname = "(Vivid Vervet)"; + break; case "14.10": $relname = "(Utopic Unicorn)"; break; -- GitLab From 68af0bbdd603e8b8bb9eae2cbd55264ce0647ddb Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Wed, 6 May 2015 18:33:08 +0200 Subject: [PATCH 264/287] Added Support for Ubuntu 15.04 in OS detect code. --- install/lib/install.lib.php | 3 +++ server/lib/classes/monitor_tools.inc.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 113d7eaa1..f17b98279 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -86,6 +86,9 @@ function get_distname() { $mainver = array_filter($mainver); $mainver = current($mainver).'.'.next($mainver); switch ($mainver){ + case "15.04": + $relname = "(Vivid Vervet)"; + break; case "14.10": $relname = "(Utopic Unicorn)"; break; diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index aa1875e9d..8b0862cfd 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -62,6 +62,9 @@ class monitor_tools { $mainver = array_filter($mainver); $mainver = current($mainver).'.'.next($mainver); switch ($mainver){ + case "15.04": + $relname = "(Vivid Vervet)"; + break; case "14.10": $relname = "(Utopic Unicorn)"; break; -- GitLab From 43e5b6608a6302e33824f27e9768079d883b38ac Mon Sep 17 00:00:00 2001 From: Marius Cramer Date: Wed, 6 May 2015 18:54:08 +0200 Subject: [PATCH 265/287] - replaced date time selects by textbox with datepicker --- interface/lib/classes/tform.inc.php | 10 +- interface/lib/classes/tform_base.inc.php | 20 ++-- interface/web/js/uni-form/uni-form.jquery.js | 107 ------------------ .../web/sites/templates/ftp_user_advanced.htm | 12 +- .../templates/ftp_user_advanced_client.htm | 2 +- .../bootstrap-datetimepicker.min.js | 1 + .../default/assets/javascripts/ispconfig.js | 18 +++ .../assets/javascripts/ispconfig.min.js | 2 +- .../bootstrap-datetimepicker.min.css | 9 ++ .../web/themes/default/templates/main.tpl.htm | 2 + interface/web/vm/openvz_vm_edit.php | 1 + interface/web/vm/templates/openvz_vm_edit.htm | 7 +- 12 files changed, 59 insertions(+), 132 deletions(-) delete mode 100644 interface/web/js/uni-form/uni-form.jquery.js create mode 100644 interface/web/themes/default/assets/javascripts/bootstrap-datetimepicker.min.js create mode 100644 interface/web/themes/default/assets/stylesheets/bootstrap-datetimepicker.min.css diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php index 30a71db63..1376d7ded 100644 --- a/interface/lib/classes/tform.inc.php +++ b/interface/lib/classes/tform.inc.php @@ -255,9 +255,13 @@ class tform extends tform_base { if ($display_seconds === true) { $dselect[] = 'second'; } + + $tmp_dt = strtr($this->datetimeformat,array('d' => 'dd', 'm' => 'mm', 'Y' => 'yyyy', 'y' => 'yy', 'H' => 'hh', 'h' => 'HH', 'i' => 'ii')) . ($display_seconds ? ':ss' : ''); $out = ''; - + + return ''; +/* foreach ($dselect as $dt_element) { $dt_options = array(); @@ -318,7 +322,7 @@ class tform extends tform_base { $selected_value = (int)floor(date('s', $_datetime)); break; } - + $out .= "' . str_repeat(' ', $dt_space); } - return $out; + return $out;*/ } } diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index fb943c50b..9fbd530c8 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -98,6 +98,7 @@ class tform_base { var $errorMessage = ''; var $dateformat = "d.m.Y"; + var $datetimeformat = 'd.m.Y H:i'; var $formDef = array(); var $wordbook; var $module; @@ -153,6 +154,7 @@ class tform_base { $this->wordbook = $wb; $this->dateformat = $app->lng('conf_format_dateshort'); + $this->datetimeformat = $app->lng('conf_format_datetime'); return true; } @@ -708,13 +710,8 @@ class tform_base { if($record[$key] != '' && $record[$key] != '0000-00-00') { if(function_exists('date_parse_from_format')) { $date_parts = date_parse_from_format($this->dateformat, $record[$key]); - //list($tag,$monat,$jahr) = explode('.',$record[$key]); $new_record[$key] = $date_parts['year'].'-'.$date_parts['month'].'-'.$date_parts['day']; - //$tmp = strptime($record[$key],$this->dateformat); - //$new_record[$key] = ($tmp['tm_year']+1900).'-'.($tmp['tm_mon']+1).'-'.$tmp['tm_mday']; } else { - //$tmp = strptime($record[$key],$this->dateformat); - //$new_record[$key] = ($tmp['tm_year']+1900).'-'.($tmp['tm_mon']+1).'-'.$tmp['tm_mday']; $tmp = strtotime($record[$key]); $new_record[$key] = date('Y-m-d', $tmp); } @@ -724,8 +721,6 @@ class tform_base { break; case 'INTEGER': $new_record[$key] = (isset($record[$key]))?$app->functions->intval($record[$key]):0; - //if($new_record[$key] != $record[$key]) $new_record[$key] = $field['default']; - //if($key == 'refresh') die($record[$key]); break; case 'DOUBLE': $new_record[$key] = $record[$key]; @@ -735,7 +730,7 @@ class tform_base { break; case 'DATETIME': - if (is_array($record[$key])) + /*if (is_array($record[$key])) { $filtered_values = array_map(create_function('$item', 'return (int)$item;'), $record[$key]); extract($filtered_values, EXTR_PREFIX_ALL, '_dt'); @@ -743,7 +738,14 @@ class tform_base { if ($_dt_day != 0 && $_dt_month != 0 && $_dt_year != 0) { $new_record[$key] = date( 'Y-m-d H:i:s', mktime($_dt_hour, $_dt_minute, $_dt_second, $_dt_month, $_dt_day, $_dt_year) ); } - } + } else {*/ + if($record[$key] != '' && $record[$key] != '0000-00-00 00:00:00') { + $tmp = strtotime($record[$key]); + $new_record[$key] = date($this->datetimeformat, $tmp); + } else { + $new_record[$key] = '0000-00-00 00:00:00'; + } + /*}*/ break; } diff --git a/interface/web/js/uni-form/uni-form.jquery.js b/interface/web/js/uni-form/uni-form.jquery.js deleted file mode 100644 index f103d1ffe..000000000 --- a/interface/web/js/uni-form/uni-form.jquery.js +++ /dev/null @@ -1,107 +0,0 @@ -jQuery.fn.uniform = function(settings) { - settings = jQuery.extend({ - valid_class : 'valid', - invalid_class : 'invalid', - focused_class : 'focused', - holder_class : 'ctrlHolder', - field_selector : 'input, select, textarea' - }, settings); - - return this.each(function() { - var form = jQuery(this); - - // Focus specific control holder - var focusControlHolder = function(element) { - var parent = element.parent(); - - while(typeof(parent) == 'object') { - if(parent) { - if(parent[0] && (parent[0].className.indexOf(settings.holder_class) >= 0)) { - parent.addClass(settings.focused_class); - return; - } // if - } // if - parent = jQuery(parent.parent()); - } // while - }; - - // Select form fields and attach them higlighter functionality - form.find(settings.field_selector).focus(function() { - form.find('.' + settings.focused_class).removeClass(settings.focused_class); - focusControlHolder(jQuery(this)); - }).blur(function() { - form.find('.' + settings.focused_class).removeClass(settings.focused_class); - }); - }); -}; - -// Auto set on page load... -$(document).ready(function() { - jQuery('form.uniForm').uniform(); -}); - -function AR_ResetDates() -{ - if ($("#autoresponder:checked").val() == null) { - $("form.uniForm select").each( - function(){ - $(this).val( $("#" + $(this).attr("id") + " option:first").val() ); - } - ); - } -} - -function AR_SetNow() -{ - DateTime_SetValues('autoresponder_start_date'); - - now = new Date(); - end_date = new Date(now.getFullYear(), now.getMonth(), now.getDate()+2, 0, 0); - - DateTime_SetValues('autoresponder_end_date', end_date); -} - -function DateTime_SetValues(datetime_id, date_obj) -{ - var selects = ['day', 'month', 'year', 'hour', 'minute', 'second']; - - if ( (typeof(date_obj) == 'object') && (typeof(date_obj.getDate()) == 'number') ) { - var now = date_obj; - } else { - var now = new Date(); - } - - jQuery.each(selects, function() { - var unit_name = this.toString(); - var unit_value = ''; - - switch(unit_name) - { - case 'day': - unit_value = now.getDate(); - break; - case 'month': - unit_value = now.getMonth() + 1; - if(unit_value < 10) unit_value = '0'+unit_value; - break; - case 'year': - unit_value = now.getFullYear(); - break; - case 'hour': - unit_value = now.getHours(); - break; - case 'minute': - unit_value = Math.round(parseInt(now.getMinutes())/5)*5; - break; - case 'second': - unit_value = now.getSeconds(); - break; - } - - unit_obj = $("#"+ datetime_id + "_" + unit_name); - if (unit_obj.val() !== null) { - unit_obj.val(unit_value); - unit_obj.change(); - } - }); -} \ No newline at end of file diff --git a/interface/web/sites/templates/ftp_user_advanced.htm b/interface/web/sites/templates/ftp_user_advanced.htm index 8dbe0398e..11069aee9 100644 --- a/interface/web/sites/templates/ftp_user_advanced.htm +++ b/interface/web/sites/templates/ftp_user_advanced.htm @@ -16,27 +16,27 @@
-
+
{tmpl_var name='quota_files_unity_txt'}
-
+
-
+
-
+
kb/s
-
+
kb/s
- {tmpl_var name='expires'} +
{tmpl_var name='expires'}
diff --git a/interface/web/sites/templates/ftp_user_advanced_client.htm b/interface/web/sites/templates/ftp_user_advanced_client.htm index 40fe9e30a..02479c9e2 100644 --- a/interface/web/sites/templates/ftp_user_advanced_client.htm +++ b/interface/web/sites/templates/ftp_user_advanced_client.htm @@ -10,7 +10,7 @@
- {tmpl_var name='expires'} +
{tmpl_var name='expires'}
diff --git a/interface/web/themes/default/assets/javascripts/bootstrap-datetimepicker.min.js b/interface/web/themes/default/assets/javascripts/bootstrap-datetimepicker.min.js new file mode 100644 index 000000000..4b4a17cc8 --- /dev/null +++ b/interface/web/themes/default/assets/javascripts/bootstrap-datetimepicker.min.js @@ -0,0 +1 @@ +!function(d){function g(){return new Date(Date.UTC.apply(Date,arguments))}function b(){var h=new Date();return g(h.getUTCFullYear(),h.getUTCMonth(),h.getUTCDate(),h.getUTCHours(),h.getUTCMinutes(),h.getUTCSeconds(),0)}var f=function(j,i){var l=this;this.element=d(j);this.container=i.container||"body";this.language=i.language||this.element.data("date-language")||"en";this.language=this.language in e?this.language:"en";this.isRTL=e[this.language].rtl||false;this.formatType=i.formatType||this.element.data("format-type")||"standard";this.format=c.parseFormat(i.format||this.element.data("date-format")||e[this.language].format||c.getDefaultFormat(this.formatType,"input"),this.formatType);this.isInline=false;this.isVisible=false;this.isInput=this.element.is("input");this.fontAwesome=i.fontAwesome||this.element.data("font-awesome")||false;this.bootcssVer=i.bootcssVer||(this.isInput?(this.element.is(".form-control")?3:2):(this.bootcssVer=this.element.is(".input-group")?3:2));this.component=this.element.is(".date")?(this.bootcssVer==3?this.element.find(".input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-calendar, .input-group-addon .glyphicon-calendar, .input-group-addon .fa-calendar, .input-group-addon .fa-clock-o").parent():this.element.find(".add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar .fa-calendar .fa-clock-o").parent()):false;this.componentReset=this.element.is(".date")?(this.bootcssVer==3?this.element.find(".input-group-addon .glyphicon-remove, .input-group-addon .fa-times").parent():this.element.find(".add-on .icon-remove, .add-on .fa-times").parent()):false;this.hasInput=this.component&&this.element.find("input").length;if(this.component&&this.component.length===0){this.component=false}this.linkField=i.linkField||this.element.data("link-field")||false;this.linkFormat=c.parseFormat(i.linkFormat||this.element.data("link-format")||c.getDefaultFormat(this.formatType,"link"),this.formatType);this.minuteStep=i.minuteStep||this.element.data("minute-step")||5;this.pickerPosition=i.pickerPosition||this.element.data("picker-position")||"bottom-right";this.showMeridian=i.showMeridian||this.element.data("show-meridian")||false;this.initialDate=i.initialDate||new Date();this.zIndex=i.zIndex||this.element.data("z-index")||undefined;this.icons={leftArrow:this.fontAwesome?"fa-arrow-left":(this.bootcssVer===3?"glyphicon-arrow-left":"icon-arrow-left"),rightArrow:this.fontAwesome?"fa-arrow-right":(this.bootcssVer===3?"glyphicon-arrow-right":"icon-arrow-right")};this.icontype=this.fontAwesome?"fa":"glyphicon";this._attachEvents();this.formatViewType="datetime";if("formatViewType" in i){this.formatViewType=i.formatViewType}else{if("formatViewType" in this.element.data()){this.formatViewType=this.element.data("formatViewType")}}this.minView=0;if("minView" in i){this.minView=i.minView}else{if("minView" in this.element.data()){this.minView=this.element.data("min-view")}}this.minView=c.convertViewMode(this.minView);this.maxView=c.modes.length-1;if("maxView" in i){this.maxView=i.maxView}else{if("maxView" in this.element.data()){this.maxView=this.element.data("max-view")}}this.maxView=c.convertViewMode(this.maxView);this.wheelViewModeNavigation=false;if("wheelViewModeNavigation" in i){this.wheelViewModeNavigation=i.wheelViewModeNavigation}else{if("wheelViewModeNavigation" in this.element.data()){this.wheelViewModeNavigation=this.element.data("view-mode-wheel-navigation")}}this.wheelViewModeNavigationInverseDirection=false;if("wheelViewModeNavigationInverseDirection" in i){this.wheelViewModeNavigationInverseDirection=i.wheelViewModeNavigationInverseDirection}else{if("wheelViewModeNavigationInverseDirection" in this.element.data()){this.wheelViewModeNavigationInverseDirection=this.element.data("view-mode-wheel-navigation-inverse-dir")}}this.wheelViewModeNavigationDelay=100;if("wheelViewModeNavigationDelay" in i){this.wheelViewModeNavigationDelay=i.wheelViewModeNavigationDelay}else{if("wheelViewModeNavigationDelay" in this.element.data()){this.wheelViewModeNavigationDelay=this.element.data("view-mode-wheel-navigation-delay")}}this.startViewMode=2;if("startView" in i){this.startViewMode=i.startView}else{if("startView" in this.element.data()){this.startViewMode=this.element.data("start-view")}}this.startViewMode=c.convertViewMode(this.startViewMode);this.viewMode=this.startViewMode;this.viewSelect=this.minView;if("viewSelect" in i){this.viewSelect=i.viewSelect}else{if("viewSelect" in this.element.data()){this.viewSelect=this.element.data("view-select")}}this.viewSelect=c.convertViewMode(this.viewSelect);this.forceParse=true;if("forceParse" in i){this.forceParse=i.forceParse}else{if("dateForceParse" in this.element.data()){this.forceParse=this.element.data("date-force-parse")}}var k=this.bootcssVer===3?c.templateV3:c.template;while(k.indexOf("{iconType}")!==-1){k=k.replace("{iconType}",this.icontype)}while(k.indexOf("{leftArrow}")!==-1){k=k.replace("{leftArrow}",this.icons.leftArrow)}while(k.indexOf("{rightArrow}")!==-1){k=k.replace("{rightArrow}",this.icons.rightArrow)}this.picker=d(k).appendTo(this.isInline?this.element:this.container).on({click:d.proxy(this.click,this),mousedown:d.proxy(this.mousedown,this)});if(this.wheelViewModeNavigation){if(d.fn.mousewheel){this.picker.on({mousewheel:d.proxy(this.mousewheel,this)})}else{console.log("Mouse Wheel event is not supported. Please include the jQuery Mouse Wheel plugin before enabling this option")}}if(this.isInline){this.picker.addClass("datetimepicker-inline")}else{this.picker.addClass("datetimepicker-dropdown-"+this.pickerPosition+" dropdown-menu")}if(this.isRTL){this.picker.addClass("datetimepicker-rtl");var h=this.bootcssVer===3?".prev span, .next span":".prev i, .next i";this.picker.find(h).toggleClass(this.icons.leftArrow+" "+this.icons.rightArrow)}d(document).on("mousedown",function(m){if(d(m.target).closest(".datetimepicker").length===0){l.hide()}});this.autoclose=false;if("autoclose" in i){this.autoclose=i.autoclose}else{if("dateAutoclose" in this.element.data()){this.autoclose=this.element.data("date-autoclose")}}this.keyboardNavigation=true;if("keyboardNavigation" in i){this.keyboardNavigation=i.keyboardNavigation}else{if("dateKeyboardNavigation" in this.element.data()){this.keyboardNavigation=this.element.data("date-keyboard-navigation")}}this.todayBtn=(i.todayBtn||this.element.data("date-today-btn")||false);this.todayHighlight=(i.todayHighlight||this.element.data("date-today-highlight")||false);this.weekStart=((i.weekStart||this.element.data("date-weekstart")||e[this.language].weekStart||0)%7);this.weekEnd=((this.weekStart+6)%7);this.startDate=-Infinity;this.endDate=Infinity;this.daysOfWeekDisabled=[];this.setStartDate(i.startDate||this.element.data("date-startdate"));this.setEndDate(i.endDate||this.element.data("date-enddate"));this.setDaysOfWeekDisabled(i.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled"));this.setMinutesDisabled(i.minutesDisabled||this.element.data("date-minute-disabled"));this.setHoursDisabled(i.hoursDisabled||this.element.data("date-hour-disabled"));this.fillDow();this.fillMonths();this.update();this.showMode();if(this.isInline){this.show()}};f.prototype={constructor:f,_events:[],_attachEvents:function(){this._detachEvents();if(this.isInput){this._events=[[this.element,{focus:d.proxy(this.show,this),keyup:d.proxy(this.update,this),keydown:d.proxy(this.keydown,this)}]]}else{if(this.component&&this.hasInput){this._events=[[this.element.find("input"),{focus:d.proxy(this.show,this),keyup:d.proxy(this.update,this),keydown:d.proxy(this.keydown,this)}],[this.component,{click:d.proxy(this.show,this)}]];if(this.componentReset){this._events.push([this.componentReset,{click:d.proxy(this.reset,this)}])}}else{if(this.element.is("div")){this.isInline=true}else{this._events=[[this.element,{click:d.proxy(this.show,this)}]]}}}for(var h=0,j,k;h=this.startDate&&h<=this.endDate){this.date=h;this.setValue();this.viewDate=this.date;this.fill()}else{this.element.trigger({type:"outOfRange",date:h,startDate:this.startDate,endDate:this.endDate})}},setFormat:function(i){this.format=c.parseFormat(i,this.formatType);var h;if(this.isInput){h=this.element}else{if(this.component){h=this.element.find("input")}}if(h&&h.val()){this.setValue()}},setValue:function(){var h=this.getFormattedDate();if(!this.isInput){if(this.component){this.element.find("input").val(h)}this.element.data("date",h)}else{this.element.val(h)}if(this.linkField){d("#"+this.linkField).val(this.getFormattedDate(this.linkFormat))}},getFormattedDate:function(h){if(h==undefined){h=this.format}return c.formatDate(this.date,h,this.language,this.formatType)},setStartDate:function(h){this.startDate=h||-Infinity;if(this.startDate!==-Infinity){this.startDate=c.parseDate(this.startDate,this.format,this.language,this.formatType)}this.update();this.updateNavArrows()},setEndDate:function(h){this.endDate=h||Infinity;if(this.endDate!==Infinity){this.endDate=c.parseDate(this.endDate,this.format,this.language,this.formatType)}this.update();this.updateNavArrows()},setDaysOfWeekDisabled:function(h){this.daysOfWeekDisabled=h||[];if(!d.isArray(this.daysOfWeekDisabled)){this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)}this.daysOfWeekDisabled=d.map(this.daysOfWeekDisabled,function(i){return parseInt(i,10)});this.update();this.updateNavArrows()},setMinutesDisabled:function(h){this.minutesDisabled=h||[];if(!d.isArray(this.minutesDisabled)){this.minutesDisabled=this.minutesDisabled.split(/,\s*/)}this.minutesDisabled=d.map(this.minutesDisabled,function(i){return parseInt(i,10)});this.update();this.updateNavArrows()},setHoursDisabled:function(h){this.hoursDisabled=h||[];if(!d.isArray(this.hoursDisabled)){this.hoursDisabled=this.hoursDisabled.split(/,\s*/)}this.hoursDisabled=d.map(this.hoursDisabled,function(i){return parseInt(i,10)});this.update();this.updateNavArrows()},place:function(){if(this.isInline){return}if(!this.zIndex){var h=0;d("div").each(function(){var m=parseInt(d(this).css("zIndex"),10);if(m>h){h=m}});this.zIndex=h+10}var l,k,j,i;if(this.container instanceof d){i=this.container.offset()}else{i=d(this.container).offset()}if(this.component){l=this.component.offset();j=l.left;if(this.pickerPosition=="bottom-left"||this.pickerPosition=="top-left"){j+=this.component.outerWidth()-this.picker.outerWidth()}}else{l=this.element.offset();j=l.left}if(j+220>document.body.clientWidth){j=document.body.clientWidth-220}if(this.pickerPosition=="top-left"||this.pickerPosition=="top-right"){k=l.top-this.picker.outerHeight()}else{k=l.top+this.height}k=k-i.top;j=j-i.left;if(this.container!="body"){k=k+document.body.scrollTop}this.picker.css({top:k,left:j,zIndex:this.zIndex})},update:function(){var h,i=false;if(arguments&&arguments.length&&(typeof arguments[0]==="string"||arguments[0] instanceof Date)){h=arguments[0];i=true}else{h=(this.isInput?this.element.val():this.element.find("input").val())||this.element.data("date")||this.initialDate;if(typeof h=="string"||h instanceof String){h=h.replace(/^\s+|\s+$/g,"")}}if(!h){h=new Date();i=false}this.date=c.parseDate(h,this.format,this.language,this.formatType);if(i){this.setValue()}if(this.datethis.endDate){this.viewDate=new Date(this.endDate)}else{this.viewDate=new Date(this.date)}}this.fill()},fillDow:function(){var h=this.weekStart,i="
'+I.getUTCDate()+"
'+c.headTemplate+c.contTemplate+c.footTemplate+'
'+c.headTemplate+c.contTemplate+c.footTemplate+'
'+c.headTemplate+""+c.footTemplate+'
'+c.headTemplate+c.contTemplate+c.footTemplate+'
'+c.headTemplate+c.contTemplate+c.footTemplate+"
";c.templateV3='
'+c.headTemplateV3+c.contTemplate+c.footTemplate+'
'+c.headTemplateV3+c.contTemplate+c.footTemplate+'
'+c.headTemplateV3+""+c.footTemplate+'
'+c.headTemplateV3+c.contTemplate+c.footTemplate+'
'+c.headTemplateV3+c.contTemplate+c.footTemplate+"
";d.fn.datetimepicker.DPGlobal=c;d.fn.datetimepicker.noConflict=function(){d.fn.datetimepicker=a;return this};d(document).on("focus.datetimepicker.data-api click.datetimepicker.data-api",'[data-provide="datetimepicker"]',function(i){var h=d(this);if(h.data("datetimepicker")){return}i.preventDefault();h.datetimepicker("show")});d(function(){d('[data-provide="datetimepicker-inline"]').datetimepicker()})}(window.jQuery); \ No newline at end of file diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.js b/interface/web/themes/default/assets/javascripts/ispconfig.js index b68af577e..2db94df10 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.js @@ -121,6 +121,24 @@ var ISPConfig = { }); } + $('input[data-input-element="date"]').datetimepicker({ + 'language': 'en', // TODO + 'todayHighlight': true, + 'todayBtn': 'linked', + 'bootcssVer': 3, + 'fontAwesome': true, + 'autoclose': true, + 'minView': 'month' + }); + $('input[data-input-element="datetime"]').datetimepicker({ + 'language': 'en', // TODO + 'todayHighlight': true, + 'todayBtn': 'linked', + 'bootcssVer': 3, + 'fontAwesome': true, + 'autoclose': true + }); + ISPConfig.callHook('onAfterContentLoad', {'url': url, 'data': data }); }, diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.min.js b/interface/web/themes/default/assets/javascripts/ispconfig.min.js index 8c1585729..d85f7c644 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.min.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.min.js @@ -1 +1 @@ -var ISPConfig={pageFormChanged:false,tabChangeWarningTxt:"",tabChangeDiscardTxt:"",tabChangeWarning:false,tabChangeDiscard:false,requestsRunning:0,indicatorCompleted:false,registeredHooks:new Array(),new_tpl_add_id:0,options:{useLoadIndicator:false,useComboBox:false,},setOption:function(a,b){ISPConfig.options[a]=b},setOptions:function(a){$.extend(ISPConfig.options,a)},reportError:function(a){},registerHook:function(a,c){if(!ISPConfig.registeredHooks[a]){ISPConfig.registeredHooks[a]=new Array()}var b=ISPConfig.registeredHooks[a].length;ISPConfig.registeredHooks[a][b]=c},callHook:function(a,c){if(!ISPConfig.registeredHooks[a]){return}for(var b=0;b